:root {
  --bg: #06101d;
  --bg-deep: #040b14;
  --panel: #0a1726;
  --panel-soft: #0d1c2d;
  --panel-hover: #102238;
  --line: rgba(137, 174, 213, 0.13);
  --line-strong: rgba(137, 174, 213, 0.22);
  --text: #edf5ff;
  --muted: #72869f;
  --muted-light: #9bb0c8;
  --accent: #44b8ff;
  --accent-soft: rgba(68, 184, 255, 0.12);
  --green: #66e3aa;
  --green-soft: rgba(102, 227, 170, 0.12);
  --amber: #f4c86b;
  --red: #ff7a8a;
  --radius: 18px;
  --radius-small: 11px;
  --shadow:
    0 22px 70px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.hidden {
  display: none !important;
}


/* LOGIN */

.login-shell {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 24px;
  background:
    radial-gradient(
      circle at 50% 20%,
      rgba(32, 137, 220, 0.16),
      transparent 36%
    ),
    linear-gradient(
      160deg,
      #071321 0%,
      #040b14 100%
    );
}

.login-glow {
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background:
    rgba(27, 145, 225, 0.08);
  filter: blur(90px);
  pointer-events: none;
}

.login-card {
  position: relative;
  z-index: 1;
  width: min(430px, 100%);
  padding: 42px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(
      145deg,
      rgba(13, 29, 47, 0.96),
      rgba(7, 18, 31, 0.97)
    );
  box-shadow: var(--shadow);
}

.brand-mark {
  display: flex;
  margin-bottom: 34px;
}

.brand-symbol,
.mini-brand {
  display: grid;
  place-items: center;
  font-weight: 800;
  letter-spacing: -0.06em;
  color: #07111f;
  background:
    linear-gradient(
      145deg,
      #80d2ff,
      #35a9f5
    );
}

.brand-symbol {
  width: 52px;
  height: 52px;
  border-radius: 15px;
  font-size: 25px;
}

.login-heading h1 {
  margin: 5px 0 10px;
  font-size: 32px;
  letter-spacing: -0.04em;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.login-copy {
  margin: 0;
  color: var(--muted-light);
  line-height: 1.6;
  font-size: 14px;
}

.login-form {
  display: grid;
  gap: 18px;
  margin-top: 34px;
}

.login-form label {
  display: grid;
  gap: 8px;
}

.login-form label span {
  color: var(--muted-light);
  font-size: 12px;
  font-weight: 650;
}

.login-form input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  outline: none;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  color: var(--text);
  background: rgba(4, 12, 22, 0.72);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.login-form input:focus {
  border-color: rgba(68, 184, 255, 0.7);
  box-shadow:
    0 0 0 3px rgba(68, 184, 255, 0.1);
}

.primary-button {
  height: 48px;
  margin-top: 3px;
  border: 0;
  border-radius: 11px;
  cursor: pointer;
  color: #03101b;
  background:
    linear-gradient(
      135deg,
      #7fd3ff,
      #3ab0f8
    );
  font-weight: 800;
}

.primary-button:disabled {
  opacity: 0.55;
  cursor: default;
}

.form-error {
  min-height: 16px;
  margin: -4px 0 -4px;
  color: var(--red);
  font-size: 12px;
}

.security-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 25px;
  color: var(--muted);
  font-size: 11px;
}

.security-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow:
    0 0 12px rgba(102, 227, 170, 0.65);
}


/* APPLICATION */

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  background: var(--bg);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 27px 20px 22px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: var(--bg-deep);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 6px 29px;
  border-bottom: 1px solid var(--line);
}

.mini-brand {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 16px;
}

.sidebar-brand strong {
  display: block;
  font-size: 14px;
  letter-spacing: 0.08em;
}

.sidebar-brand span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.nav-list {
  display: grid;
  gap: 5px;
  margin-top: 26px;
}

.nav-item {
  height: 44px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 10px;
  cursor: default;
  text-align: left;
  color: #8195ac;
  background: transparent;
  font-size: 12px;
  font-weight: 650;
}

.nav-item.active {
  color: var(--text);
  background:
    linear-gradient(
      90deg,
      rgba(68, 184, 255, 0.13),
      rgba(68, 184, 255, 0.035)
    );
  box-shadow:
    inset 2px 0 0 var(--accent);
}

.nav-icon {
  width: 20px;
  color: var(--accent);
  text-align: center;
  font-size: 16px;
}

.sidebar-bottom {
  margin-top: auto;
  display: grid;
  gap: 13px;
}

.foundation-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.foundation-badge span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
}

.logout-button {
  height: 39px;
  border: 1px solid var(--line);
  border-radius: 9px;
  cursor: pointer;
  color: var(--muted-light);
  background: transparent;
  font-size: 11px;
}

.logout-button:hover {
  border-color: var(--line-strong);
  background: var(--panel);
}

.workspace {
  min-width: 0;
}

.topbar {
  min-height: 82px;
  padding: 0 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: rgba(6, 16, 29, 0.88);
}

.topbar h2 {
  margin: 4px 0 0;
  font-size: 19px;
  letter-spacing: -0.02em;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 19px;
}

.time-block {
  padding-right: 18px;
  text-align: right;
  border-right: 1px solid var(--line);
}

.time-block span {
  display: block;
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.time-block strong {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.user-avatar {
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(68, 184, 255, 0.28);
  border-radius: 50%;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 10px;
  font-weight: 800;
}

.dashboard {
  width: min(1420px, 100%);
  margin: 0 auto;
  padding: 28px 34px 50px;
}

.system-strip {
  min-height: 69px;
  display: grid;
  grid-template-columns: 1.6fr repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--panel);
}

.strip-status,
.strip-item {
  padding: 15px 20px;
  display: flex;
  align-items: center;
}

.strip-status {
  gap: 11px;
}

.strip-item {
  justify-content: center;
  flex-direction: column;
  border-left: 1px solid var(--line);
}

.strip-status small,
.strip-item small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.strip-status strong,
.strip-item strong {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  letter-spacing: 0.04em;
}

.pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  box-shadow:
    0 0 16px rgba(102, 227, 170, 0.7);
}

.safe-text {
  color: var(--green) !important;
}

.hero-panel {
  position: relative;
  min-height: 225px;
  margin-top: 22px;
  padding: 37px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(
      circle at 86% 45%,
      rgba(56, 170, 242, 0.13),
      transparent 27%
    ),
    linear-gradient(
      120deg,
      #0c1c2c,
      #081522
    );
}

.hero-panel h1 {
  max-width: 650px;
  margin: 10px 0;
  font-size: clamp(28px, 3vw, 43px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.hero-panel h1 span {
  color: #8299b3;
}

.hero-panel > div > p:last-child {
  max-width: 560px;
  margin: 0;
  color: var(--muted-light);
  font-size: 13px;
  line-height: 1.6;
}

.hero-orbit {
  position: relative;
  width: 165px;
  height: 165px;
  margin-right: 48px;
  flex: 0 0 auto;
}

.orbit-ring {
  position: absolute;
  border: 1px solid rgba(68, 184, 255, 0.17);
  border-radius: 50%;
}

.ring-one {
  inset: 0;
}

.ring-two {
  inset: 25px;
}

.orbit-core {
  position: absolute;
  inset: 50px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(68, 184, 255, 0.42);
  border-radius: 50%;
  color: var(--accent);
  background: rgba(68, 184, 255, 0.08);
  box-shadow:
    0 0 40px rgba(68, 184, 255, 0.12);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.section-heading {
  margin: 32px 0 14px;
  display: flex;
  align-items: end;
  justify-content: space-between;
}

.section-heading h3 {
  margin: 4px 0 0;
  font-size: 17px;
}

.read-only-label {
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.bot-grid {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 17px;
}

.bot-card,
.info-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.bot-card {
  padding: 22px;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.bot-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  background: var(--panel-soft);
}

.bot-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.bot-identity {
  display: flex;
  align-items: center;
  gap: 13px;
}

.bot-logo {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 900;
}

.alpha-logo {
  color: #79d1ff;
  border: 1px solid rgba(68, 184, 255, 0.2);
  background: rgba(68, 184, 255, 0.1);
}

.tactile-logo {
  color: #8ce6b9;
  border: 1px solid rgba(102, 227, 170, 0.2);
  background: rgba(102, 227, 170, 0.09);
}

.bot-type {
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.bot-identity h3 {
  margin: 3px 0 0;
  font-size: 17px;
}

.status-pill {
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.status-pill.offline {
  color: var(--muted-light);
  border: 1px solid var(--line);
  background: rgba(120, 142, 166, 0.05);
}

.bot-details {
  margin-top: 24px;
  display: grid;
  grid-template-columns:
    repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 11px;
}

.bot-details > div {
  min-width: 0;
  padding: 13px;
}

.bot-details > div + div {
  border-left: 1px solid var(--line);
}

.bot-details small {
  display: block;
  color: var(--muted);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.11em;
}

.bot-details strong {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: #d7e4f2;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bot-flow {
  min-height: 67px;
  margin-top: 16px;
  padding: 14px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(4, 12, 22, 0.38);
}

.bot-flow span {
  color: var(--muted-light);
  font-size: 8px;
  font-weight: 700;
  white-space: nowrap;
}

.bot-flow i {
  width: 20px;
  height: 1px;
  margin: 0 7px;
  background: var(--line-strong);
}

.entry-sequence {
  min-height: 67px;
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.entry-sequence div {
  display: grid;
  justify-items: center;
  gap: 4px;
}

.entry-sequence div span {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--muted-light);
  font-size: 9px;
  font-weight: 800;
}

.entry-sequence div:first-child span {
  color: var(--accent);
  border-color: rgba(68, 184, 255, 0.32);
  background: var(--accent-soft);
}

.entry-sequence small {
  color: var(--muted);
  font-size: 7px;
  font-weight: 800;
}

.entry-sequence i {
  width: 60px;
  height: 1px;
  margin: 0 10px 14px;
  background: var(--line);
}

.bot-footer {
  margin-top: 15px;
  padding-top: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
}

.bot-footer > span {
  color: var(--muted);
  font-size: 9px;
}

.bot-footer button {
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 9px;
  font-weight: 700;
}

.bot-footer button span {
  margin-left: 5px;
}

.lower-grid {
  margin-top: 17px;
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 17px;
}

.info-card {
  padding: 22px;
}

.card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title h3 {
  margin: 4px 0 0;
  font-size: 15px;
}

.shield,
.version-chip {
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--green);
  background: var(--green-soft);
  font-size: 10px;
  font-weight: 800;
}

.shield {
  width: 30px;
  height: 30px;
  border-radius: 50%;
}

.version-chip {
  min-width: 32px;
  height: 25px;
  padding: 0 8px;
  border-radius: 7px;
}

.authority-row {
  margin-top: 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.authority-row span {
  color: var(--muted-light);
  font-size: 10px;
}

.authority-row strong {
  color: #c3d3e4;
  font-size: 8px;
  letter-spacing: 0.08em;
}

.authority-line {
  height: 1px;
  margin-top: 14px;
  background: var(--line);
}

.metric-large {
  margin-top: 20px;
}

.metric-large strong {
  display: block;
  color: #dceaff;
  font-size: 24px;
  letter-spacing: -0.04em;
}

.metric-large span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.foundation-meta {
  margin-top: 18px;
  display: flex;
  gap: 20px;
  color: var(--muted);
  font-size: 9px;
}

.foundation-meta span {
  display: grid;
  gap: 3px;
}

.foundation-meta b {
  color: var(--green);
  font-size: 8px;
}


/* RESPONSIVE */

@media (max-width: 1040px) {
  .app-shell {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .sidebar {
    padding-inline: 12px;
  }

  .sidebar-brand {
    justify-content: center;
  }

  .sidebar-brand > div:last-child,
  .nav-item:not(.active) {
    font-size: 0;
  }

  .nav-item {
    justify-content: center;
  }

  .nav-item.active {
    font-size: 0;
  }

  .nav-icon {
    font-size: 17px;
  }

  .foundation-badge,
  .logout-button {
    font-size: 0;
  }

  .foundation-badge {
    justify-content: center;
  }

  .logout-button::after {
    content: "↪";
    font-size: 16px;
  }

  .hero-orbit {
    margin-right: 10px;
  }

  .bot-details {
    grid-template-columns: repeat(2, 1fr);
  }

  .bot-details > div:nth-child(3) {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .bot-details > div:nth-child(4) {
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 760px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    z-index: 20;
    top: auto;
    bottom: 0;
    width: 100%;
    height: 64px;
    padding: 7px 10px;
    flex-direction: row;
    border-top: 1px solid var(--line);
    border-right: 0;
  }

  .sidebar-brand,
  .sidebar-bottom {
    display: none;
  }

  .nav-list {
    width: 100%;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
  }

  .nav-item,
  .nav-item.active,
  .nav-item:not(.active) {
    height: 48px;
    padding: 0;
    justify-content: center;
    font-size: 0;
  }

  .nav-item.active {
    box-shadow:
      inset 0 -2px 0 var(--accent);
  }

  .topbar {
    padding: 0 18px;
  }

  .dashboard {
    padding: 20px 16px 90px;
  }

  .system-strip {
    grid-template-columns:
      repeat(2, 1fr);
  }

  .strip-status {
    grid-column: 1 / -1;
  }

  .strip-item {
    border-top: 1px solid var(--line);
  }

  .strip-item:nth-child(even) {
    border-left: 0;
  }

  .hero-panel {
    min-height: 220px;
    padding: 28px;
  }

  .hero-orbit {
    display: none;
  }

  .bot-grid,
  .lower-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .login-card {
    padding: 29px 23px;
  }

  .topbar {
    min-height: 72px;
  }

  .topbar-right {
    gap: 10px;
  }

  .time-block {
    padding-right: 10px;
  }

  .bot-card {
    padding: 18px;
  }

  .bot-card-head {
    align-items: flex-start;
  }

  .status-pill {
    margin-top: 3px;
  }

  .bot-flow {
    overflow-x: auto;
    justify-content: flex-start;
  }

  .foundation-meta {
    flex-direction: column;
  }
}

/* MATCC_R6B_TACTICAL_LIVE_CARD */

.status-pill.scheduled {
  color: #ffd786;
  border: 1px solid rgba(255, 190, 82, 0.23);
  background: rgba(255, 190, 82, 0.08);
}

.status-pill.standby {
  color: #79d1ff;
  border: 1px solid rgba(68, 184, 255, 0.22);
  background: rgba(68, 184, 255, 0.08);
}

.status-pill.active {
  color: #8ce6b9;
  border: 1px solid rgba(102, 227, 170, 0.24);
  background: rgba(102, 227, 170, 0.09);
}

.status-pill.degraded {
  color: #ffadad;
  border: 1px solid rgba(255, 112, 112, 0.22);
  background: rgba(255, 112, 112, 0.07);
}

.tactile-live-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns:
    repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.012);
}

.tactile-live-grid > div {
  min-width: 0;
  padding: 11px 13px;
}

.tactile-live-grid > div + div {
  border-left: 1px solid var(--line);
}

.tactile-live-grid small {
  display: block;
  color: var(--muted);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.11em;
}

.tactile-live-grid strong {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: #dceaff;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .tactile-live-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

  .tactile-live-grid > div:nth-child(3) {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .tactile-live-grid > div:nth-child(4) {
    border-top: 1px solid var(--line);
  }
}


/* MATCC_R7B_TACTICAL_DETAIL */

.read-only-open {
  cursor: pointer;
}

.bot-detail-view {
  display: grid;
  gap: 16px;
}

.detail-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.detail-back {
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted-light);
  cursor: pointer;
  font: inherit;
  font-size: 9px;
  font-weight: 800;
}

.detail-back:hover {
  border-color: var(--line-strong);
  background: var(--panel-soft);
}

.detail-toolbar-tags {
  display: flex;
  gap: 8px;
}

.detail-chip {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted-light);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.detail-hero {
  min-height: 154px;
  padding: 24px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.detail-hero h3 {
  margin: 5px 0 8px;
  font-size: 25px;
}

.detail-hero p:last-child {
  max-width: 660px;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
}

.detail-kpis {
  display: grid;
  grid-template-columns:
    repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.detail-kpis > div {
  min-width: 0;
  padding: 16px;
}

.detail-kpis > div + div {
  border-left: 1px solid var(--line);
}

.detail-kpis small,
.detail-performance small {
  display: block;
  color: var(--muted);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.11em;
}

.detail-kpis strong {
  display: block;
  margin-top: 7px;
  color: #dceaff;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.detail-kpis span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 8px;
  overflow-wrap: anywhere;
}

.detail-grid {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.detail-panel {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.detail-panel-wide {
  grid-column: 1 / -1;
}

.detail-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
}

.detail-panel-head h4 {
  margin: 4px 0 0;
  font-size: 15px;
}

.detail-rows {
  margin-top: 18px;
}

.detail-rows > div {
  min-height: 35px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid var(--line);
}

.detail-rows > div:first-child {
  border-top: 0;
}

.detail-rows span {
  color: var(--muted);
  font-size: 9px;
}

.detail-rows strong {
  max-width: 62%;
  color: #dceaff;
  font-size: 9px;
  text-align: right;
  overflow-wrap: anywhere;
}

.detail-performance {
  margin-top: 18px;
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 10px;
}

.detail-performance > div {
  min-width: 0;
  padding: 13px;
}

.detail-performance > div:nth-child(even) {
  border-left: 1px solid var(--line);
}

.detail-performance > div:nth-child(n+3) {
  border-top: 1px solid var(--line);
}

.detail-performance strong {
  display: block;
  margin-top: 6px;
  color: #dceaff;
  font-size: 11px;
  overflow-wrap: anywhere;
}

.detail-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.6;
}

.detail-ladder {
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.detail-ladder > div {
  min-width: 94px;
  padding: 13px 10px;
  display: grid;
  place-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.018);
}

.detail-ladder > div > span {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--muted-light);
  font-size: 9px;
  font-weight: 900;
}

.detail-ladder strong {
  color: var(--muted-light);
  font-size: 8px;
  letter-spacing: 0.05em;
}

.detail-ladder i {
  width: 38px;
  height: 1px;
  background: var(--line-strong);
}

.detail-locks {
  margin-top: 22px;
  display: grid;
  grid-template-columns:
    repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 10px;
}

.detail-locks > div {
  min-height: 54px;
  padding: 10px 12px;
  display: grid;
  align-content: center;
  gap: 5px;
  border-top: 0;
}

.detail-locks > div + div {
  border-left: 1px solid var(--line);
}

.detail-locks strong {
  max-width: none;
  text-align: left;
}

@media (max-width: 900px) {
  .detail-kpis {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

  .detail-kpis > div:nth-child(3) {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .detail-kpis > div:nth-child(4) {
    border-top: 1px solid var(--line);
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .detail-panel-wide {
    grid-column: auto;
  }
}

@media (max-width: 620px) {
  .detail-hero {
    flex-direction: column;
  }

  .detail-kpis {
    grid-template-columns: 1fr;
  }

  .detail-kpis > div + div {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .detail-performance {
    grid-template-columns: 1fr;
  }

  .detail-performance > div:nth-child(even) {
    border-left: 0;
  }

  .detail-performance > div + div {
    border-top: 1px solid var(--line);
  }

  .detail-ladder {
    justify-content: flex-start;
    overflow-x: auto;
  }

  .detail-locks {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

  .detail-locks > div:nth-child(3) {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .detail-locks > div:nth-child(4) {
    border-top: 1px solid var(--line);
  }
}


/* MATCC_R8C_OPERATIONS_VIEWS */

.operations-view {
  display: grid;
  gap: 16px;
}

.operations-head {
  min-height: 130px;
  padding: 22px 24px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.operations-head h3 {
  margin: 5px 0 8px;
  font-size: 23px;
}

.operations-head p:last-child {
  max-width: 660px;
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.7;
}

.operations-grid {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.operations-table-card {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.operations-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.operations-table {
  width: 100%;
  min-width: 840px;
  border-collapse: collapse;
}

.operations-table th {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line-strong);
  color: var(--muted);
  font-size: 7px;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-align: left;
  white-space: nowrap;
}

.operations-table td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--line);
  color: #dceaff;
  font-size: 9px;
  vertical-align: middle;
  white-space: nowrap;
}

.operations-table tbody tr:last-child td {
  border-bottom: 0;
}

.operations-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.018);
}

.operations-empty {
  padding: 28px !important;
  color: var(--muted) !important;
  text-align: center;
}

.operations-note {
  margin-top: 16px;
}

.trade-result {
  font-weight: 850;
}

.trade-result.win {
  color: #8ce6b9;
}

.trade-result.loss {
  color: #ffadad;
}

.trade-result.neutral {
  color: var(--muted-light);
}

.alerts-list {
  display: grid;
  gap: 10px;
}

.alert-item {
  padding: 15px 17px;
  display: flex;
  align-items: flex-start;
  gap: 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--panel);
}

.alert-marker {
  width: 9px;
  height: 9px;
  margin-top: 3px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--muted);
}

.alert-item strong {
  color: #dceaff;
  font-size: 10px;
}

.alert-item p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
}

.alert-item.ok .alert-marker {
  background: #66e3aa;
}

.alert-item.info .alert-marker {
  background: #79d1ff;
}

.alert-item.warning .alert-marker {
  background: #ffd786;
}

.alert-item.danger .alert-marker {
  background: #ff7979;
}

.alert-item.ok {
  border-color: rgba(102, 227, 170, 0.18);
}

.alert-item.info {
  border-color: rgba(68, 184, 255, 0.18);
}

.alert-item.warning {
  border-color: rgba(255, 190, 82, 0.2);
}

.alert-item.danger {
  border-color: rgba(255, 112, 112, 0.22);
}

@media (max-width: 900px) {
  .operations-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .operations-head {
    min-height: auto;
    flex-direction: column;
  }

  .operations-table-card {
    padding: 14px;
  }
}



/* MATCC_B4_R2B2B_CONTROL_UI_DRYRUN */

.tactile-control-panel {
  margin-top: 18px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(
      135deg,
      rgba(21, 34, 53, 0.72),
      rgba(10, 18, 31, 0.88)
    );
  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    auto;
  gap: 18px 24px;
  align-items: center;
}

.tactile-control-copy {
  min-width: 0;
}

.tactile-control-copy h4 {
  margin: 4px 0 7px;
  font-size: 17px;
  font-weight: 650;
}

.tactile-control-copy > p:last-child {
  margin: 0;
  max-width: 620px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.tactile-control-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tactile-control-button {
  min-width: 96px;
  height: 42px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(7, 14, 25, 0.76);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition:
    transform 140ms ease,
    border-color 140ms ease,
    background 140ms ease,
    opacity 140ms ease;
}

.tactile-control-button.start {
  color: #8ce6b9;
  border-color:
    rgba(102, 227, 170, 0.28);
  background:
    rgba(102, 227, 170, 0.07);
}

.tactile-control-button.stop {
  color: #ffadad;
  border-color:
    rgba(255, 112, 112, 0.28);
  background:
    rgba(255, 112, 112, 0.07);
}

.tactile-control-button:not(:disabled):hover {
  transform: translateY(-1px);
}

.tactile-control-button.start:not(:disabled):hover {
  border-color:
    rgba(102, 227, 170, 0.55);
  background:
    rgba(102, 227, 170, 0.12);
}

.tactile-control-button.stop:not(:disabled):hover {
  border-color:
    rgba(255, 112, 112, 0.55);
  background:
    rgba(255, 112, 112, 0.12);
}

.tactile-control-button:disabled {
  opacity: 0.34;
  cursor: not-allowed;
  transform: none;
}

.tactile-control-state {
  grid-column: 1 / -1;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.tactile-control-state > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 3px;
}

.tactile-control-state strong {
  font-size: 12px;
  font-weight: 650;
}

.tactile-control-state > div > span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.tactile-control-badge {
  flex: 0 0 auto;
  min-width: 76px;
  padding: 6px 9px;
  border-radius: 999px;
  text-align: center;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.08em;
  border: 1px solid var(--line);
}

.tactile-control-badge.ready {
  color: #79d1ff;
  border-color:
    rgba(68, 184, 255, 0.24);
  background:
    rgba(68, 184, 255, 0.07);
}

.tactile-control-badge.pending {
  color: #ffd786;
  border-color:
    rgba(255, 190, 82, 0.26);
  background:
    rgba(255, 190, 82, 0.08);
}

.tactile-control-badge.success {
  color: #8ce6b9;
  border-color:
    rgba(102, 227, 170, 0.26);
  background:
    rgba(102, 227, 170, 0.08);
}

.tactile-control-badge.error {
  color: #ffadad;
  border-color:
    rgba(255, 112, 112, 0.26);
  background:
    rgba(255, 112, 112, 0.08);
}


@media (max-width: 620px) {
  .tactile-control-panel {
    grid-template-columns: 1fr;
    padding: 16px;
    gap: 16px;
  }

  .tactile-control-actions {
    width: 100%;
  }

  .tactile-control-button {
    flex: 1 1 0;
    min-width: 0;
  }

  .tactile-control-state {
    grid-column: 1;
    align-items: flex-start;
  }
}
