@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap");

:root {
  --bg: #edf2f9;
  --card: #ffffff;
  --line: #d3dbe8;
  --ink: #0a1a2f;
  --ink-soft: #415169;
  --brand: #113a68;
  --brand-2: #1f7bd8;
  --danger: #b42318;
  --ok: #117a4c;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Space Grotesk", "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(circle at 10% -20%, #d8e8ff 0%, rgba(216, 232, 255, 0) 46%),
    linear-gradient(180deg, #eaf1fa 0%, var(--bg) 40%);
  color: var(--ink);
}

.topbar {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  padding: 10px 18px;
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand { font-weight: 700; color: var(--brand); letter-spacing: 0.2px; }
.nav { display: flex; gap: 14px; flex-wrap: wrap; }
.nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 600;
  padding: 5px 8px;
  border-radius: 8px;
}
.nav a:hover { color: var(--brand); background: #edf4ff; }
.container { max-width: 1560px; margin: 10px auto; padding: 0 12px; }

.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px 12px;
  margin-bottom: 10px;
  box-shadow: 0 6px 20px rgba(12, 34, 66, 0.06);
}

h1, h2, h3 { margin-top: 0; }
h1 { margin-bottom: 2px; }
h2 { margin-bottom: 8px; font-size: 19px; }
table { width: 100%; border-collapse: collapse; }
th, td { border-bottom: 1px solid #e6ecf5; padding: 3px 6px; text-align: left; vertical-align: middle; line-height: 1.05; }
th, td { border-bottom: 1px solid #e6ecf5; }
th {
  font-size: 11px;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}
tbody tr:hover { background: #f8fbff; }
tbody tr:hover { background: #f8fbff; }
.table-scroll {
  overflow: auto;
}
.table-compact {
  table-layout: fixed;
}
.table-compact th,
.table-compact td {
  padding: 2px 6px;
  height: 24px;
}
.table-compact td {
  font-size: 13px;
}
.payload-cell {
  max-width: 520px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mono-cell {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
}

form.inline-form { display: inline-flex; gap: 8px; align-items: center; margin: 2px 0; }
.inline-form.compact { gap: 4px; margin: 1px 0; }
input, select, button {
  border-radius: 10px;
  border: 1px solid var(--line);
  padding: 7px 9px;
  font-size: 13px;
  font-family: inherit;
}
button {
  background: #0f2748;
  color: #fff;
  border-color: #0f2748;
  cursor: pointer;
  font-weight: 600;
}
button.danger { background: var(--danger); border-color: var(--danger); }
.logout { display: inline-flex; align-items: center; gap: 10px; }
pre { margin: 0; white-space: pre-wrap; max-width: 450px; font-size: 12px; }

.login-page { min-height: 100vh; display: grid; place-items: center; }
.login-card { width: min(420px, 94vw); display: grid; gap: 10px; }
.error {
  background: #fee4e2;
  border: 1px solid #fda29b;
  color: #b42318;
  border-radius: 8px;
  padding: 8px 10px;
}
.flash {
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 10px;
}
.flash.is-ok {
  background: #e7f9f0;
  border: 1px solid #aae8c8;
  color: #0f6a42;
}
.flash.is-error {
  background: #fee4e2;
  border: 1px solid #fda29b;
  color: #b42318;
}

.page-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 8px;
}
.page-head p {
  margin: 0;
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 14px;
}

.server-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 6px 12px;
}
.server-grid > div {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 10px;
  align-items: baseline;
  border-bottom: 1px dashed #e5ecf7;
  padding: 4px 0;
}
.server-grid .k {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
}
.server-grid .v {
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.server-cyber {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 8px;
  padding: 8px;
  border: 1px solid #20385d;
  border-radius: 12px;
  background:
    radial-gradient(circle at 85% 8%, rgba(59, 243, 198, 0.12) 0%, rgba(59, 243, 198, 0) 35%),
    radial-gradient(circle at 0% 100%, rgba(57, 145, 255, 0.12) 0%, rgba(57, 145, 255, 0) 40%),
    linear-gradient(180deg, #0b1220 0%, #0a101b 100%);
}
.cyber-tile {
  border: 1px solid #2a446d;
  border-radius: 10px;
  padding: 8px 10px;
  background: linear-gradient(180deg, #111a2d 0%, #0d1627 100%);
  min-height: 70px;
  display: grid;
  gap: 5px;
}
.cyber-tile small {
  color: #80a2d7;
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 700;
}
.cyber-tile b {
  color: #e0ecff;
  font-size: 18px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.cyber-sub {
  color: #7fa2d8;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  overflow-wrap: anywhere;
}
.cyber-meter {
  height: 5px;
  border-radius: 999px;
  background: #162742;
  border: 1px solid #27446c;
  overflow: hidden;
}
.cyber-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #35d7ff 0%, #22e7b6 65%, #74ffcc 100%);
  box-shadow: 0 0 10px rgba(53, 215, 255, 0.45);
}

.compact-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}
.mini-card {
  border: 1px solid #dbe4f2;
  border-radius: 12px;
  padding: 8px 10px;
  background: #f8fbff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.mini-card b {
  font-size: 12px;
  color: var(--ink-soft);
}
.mini-card span {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.danger-btn {
  background: var(--danger);
  border-color: var(--danger);
}
.small-note {
  margin: -2px 0 8px;
  font-size: 12px;
}

.logs-controls {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}
.logs-filter-form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 8px;
}
.logs-filter-form label {
  display: grid;
  gap: 4px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
}
.logs-filter-form input {
  min-width: 220px;
}
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid #cfd8e8;
  background: #f5f8ff;
  color: #1c3557;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
}
.pill.active {
  background: #12345a;
  border-color: #12345a;
  color: #fff;
}
.log-block h2 {
  margin-bottom: 8px;
}
.log-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.log-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}
.log-pre {
  margin: 0;
  min-height: 180px;
  max-height: 300px;
  overflow: auto;
  border: 1px solid #d9e3f3;
  border-radius: 10px;
  padding: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  line-height: 1.35;
  background: #f8fbff;
  color: #0f2038;
  white-space: pre-wrap;
  word-break: break-word;
}
.log-pre.is-bad {
  background: #fff6f5;
  border-color: #f4c6c2;
  color: #8a2218;
}

.settings-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 8px 10px;
}
.settings-form label {
  display: grid;
  gap: 4px;
  font-size: 12px;
  color: var(--ink-soft);
  font-weight: 600;
}
.settings-form textarea {
  resize: vertical;
  min-height: 70px;
  border-radius: 10px;
  border: 1px solid var(--line);
  padding: 8px 10px;
  font-family: inherit;
  font-size: 13px;
}
.settings-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.status-line {
  margin-bottom: 8px;
  border-radius: 8px;
  padding: 7px 9px;
  font-size: 12px;
  font-weight: 700;
}
.status-line.saved,
.status-line.applied {
  background: #e7f7ef;
  color: #0f6d41;
  border: 1px solid #9dd7bb;
}
.status-line.error {
  background: #fee4e2;
  color: #b42318;
  border: 1px solid #fda29b;
}

@media (max-width: 980px) {
  .log-grid {
    grid-template-columns: 1fr;
  }
  .settings-form {
    grid-template-columns: 1fr;
  }
  .logs-filter-form input {
    min-width: 0;
  }
  .server-cyber {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }
}

.symbol-form {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 8px;
}
.symbol-form label {
  display: grid;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
}
.symbol-form input { min-width: 0; }
.tv-check-line {
  display: flex;
  gap: 6px;
  align-items: center;
}
.tv-url-line {
  display: flex;
  gap: 6px;
  align-items: center;
}
.tv-check-line [data-tv-input] {
  flex: 1 1 auto;
  min-width: 0;
}
.tv-url-line [data-tv-url] {
  flex: 1 1 auto;
  min-width: 0;
}
.tv-check-btn {
  flex: 0 0 auto;
  height: 34px;
  padding: 0 10px;
  border-radius: 9px;
  font-size: 12px;
}
.tv-check-status {
  min-height: 14px;
  font-size: 11px;
  color: #5f6f87;
}
.tv-check-status.is-ok {
  color: #117a4c;
}
.tv-check-status.is-bad {
  color: #b42318;
}
.submit-wide {
  grid-column: span 2;
  justify-self: end;
  min-width: 170px;
}
.repair-form {
  flex-wrap: wrap;
  row-gap: 6px;
}
.repair-form label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ink-soft);
}
.repair-form select {
  min-width: 190px;
}
.inline-check input[type="checkbox"] {
  margin: 0;
}

.symbols-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.symbols-toolbar input[type="search"] {
  min-width: 260px;
}
.symbols-toolbar label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 12px;
}

.symbols-table {
  table-layout: fixed;
}
.symbols-table .col-symbol { width: 16%; }
.symbols-table .col-name { width: 18%; }
.symbols-table .col-category { width: 10%; }
.symbols-table .col-alias { width: 47%; }
.symbols-table .col-status { width: 9%; }
.symbols-table .col-actions { width: 54px; }
.symbols-table thead th {
  white-space: nowrap;
}
.symbols-table tbody tr td {
  padding-top: 2px;
  padding-bottom: 2px;
  height: 30px;
}
.symbols-table td:nth-child(2),
.symbols-table td:nth-child(3),
.symbols-table td:nth-child(5) {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.th-sort {
  margin: 0;
}
.th-btn {
  background: transparent;
  border: 0;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0;
}
.th-btn:hover {
  color: var(--brand);
}

.symbol-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  min-width: 0;
}
.symbol-icon, .symbol-fallback {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  border: 1px solid #dbe6f6;
  flex: 0 0 24px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(10, 26, 47, 0.08);
}
.symbol-icon {
  object-fit: contain;
  padding: 2px;
}
.symbol-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #1a3c66;
  background: #eef4ff;
}
.symbol-cell strong {
  overflow: hidden;
  text-overflow: ellipsis;
}

.alias-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 3px;
  overflow: hidden;
  white-space: nowrap;
}
.alias-chip {
  display: inline-flex;
  gap: 3px;
  align-items: center;
  padding: 0 6px;
  border: 1px solid #dbe6f6;
  background: #f4f8ff;
  border-radius: 999px;
  font-size: 10px;
  line-height: 16px;
  color: #173154;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid transparent;
}
.status-pill.is-on {
  color: #0f5132;
  background: #e9f8f0;
  border-color: #b8e8ce;
}
.status-pill.is-off {
  color: #6c2a22;
  background: #fdecea;
  border-color: #f2b9b0;
}

.menu-cell {
  text-align: right;
  position: relative;
}
.row-menu {
  position: relative;
  display: inline-block;
}
.row-menu summary {
  list-style: none;
}
.row-menu summary::-webkit-details-marker {
  display: none;
}
.dots-btn {
  width: 26px;
  height: 22px;
  border: 1px solid #cdd8ea;
  border-radius: 8px;
  background: #fff;
  color: #31455f;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  user-select: none;
}
.row-menu[open] .dots-btn {
  background: #f2f7ff;
  border-color: #9ec0eb;
}
.menu-pop {
  position: absolute;
  right: 0;
  top: 24px;
  min-width: 120px;
  padding: 6px;
  border-radius: 10px;
  border: 1px solid #d4deee;
  background: #fff;
  box-shadow: 0 10px 24px rgba(10, 26, 47, 0.14);
  z-index: 10;
}
.menu-form {
  margin: 0;
}
.menu-btn {
  width: 100%;
  margin: 0;
  padding: 5px 8px;
  border-radius: 8px;
  font-size: 11px;
}
.menu-btn + .menu-btn,
.menu-form + .menu-form {
  margin-top: 4px;
}
.menu-link {
  display: block;
  text-decoration: none;
  border: 1px solid #d4deee;
  color: #20354f;
  background: #f7faff;
  width: 100%;
  margin-top: 4px;
  padding: 5px 8px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}
.menu-link:hover {
  background: #ecf4ff;
}

.empty-row {
  text-align: center;
  color: var(--ink-soft);
  padding: 16px 8px;
}

.pagination {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.page-form {
  margin: 0;
}
.page-form button {
  min-width: 34px;
  height: 28px;
  padding: 0 8px;
  border-radius: 8px;
  font-size: 12px;
}
.page-form button.is-current {
  background: #1b4d86;
  border-color: #1b4d86;
}
.page-meta {
  margin-left: auto;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
}

.embedded-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.embed-wrap {
  border: 1px solid #dbe4f2;
  border-radius: 12px;
  overflow: hidden;
  background: #f3f7ff;
}
.embed-wrap iframe {
  display: block;
  width: 100%;
  min-height: 760px;
  border: 0;
}

.monitor-summary {
  margin-bottom: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.monitor-summary > div {
  background: #f6f9ff;
  border: 1px solid #d9e4f6;
  border-radius: 9px;
  padding: 6px 10px;
  font-size: 12px;
}
.monitor-summary-wide > div {
  min-width: 180px;
}
.source-summary {
  margin-bottom: 10px;
}
.source-summary-card {
  border: 1px solid #dbe4f2;
  border-radius: 12px;
  padding: 8px 10px;
  background: #fbfdff;
}
.source-summary-card h3 {
  margin: 0 0 8px;
  font-size: 15px;
}
.monitor-wrap {
  border: 1px solid #dbe4f2;
  border-radius: 12px;
  overflow: hidden;
}
.monitor-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  table-layout: fixed;
}
.monitor-table th,
.monitor-table td {
  border-bottom: 1px solid #e6ecf5;
  padding: 2px 6px;
  white-space: nowrap;
  height: 22px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.monitor-table th {
  background: #f7faff;
}
.monitor-controls {
  margin: 2px 0 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.monitor-controls label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ink-soft);
  font-weight: 600;
}
.monitor-search input {
  min-width: 260px;
  height: 30px;
}
.monitor-controls select {
  height: 30px;
  padding: 4px 7px;
}
.th-sort-btn {
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--ink-soft);
  padding: 0;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
}
.th-sort-btn.is-active,
.th-sort-btn:hover {
  color: #123d6a;
}
.monitor-pagination {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.monitor-pagination button {
  min-width: 34px;
  height: 28px;
  padding: 0 8px;
  border-radius: 8px;
  font-size: 12px;
}
.monitor-pagination button.is-current {
  background: #1b4d86;
  border-color: #1b4d86;
}
.checkbtn {
  font-size: 11px;
  line-height: 1;
  padding: 4px 7px;
  border-radius: 7px;
}
.muted {
  color: #5f6f87;
}
.icon {
  width: 44px;
  height: 22px;
  vertical-align: -2px;
  margin-right: 6px;
}
.dir {
  margin-left: 6px;
}
.dir.up { color: #2fa84f; }
.dir.down { color: #d33; }
.ok { color: #2fa84f; }
.warn { color: #c58a00; }
.bad { color: #d33; }
.ops-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}
.metric-card {
  display: grid;
  gap: 4px;
  min-height: 92px;
}
.metric-card span {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.metric-card strong {
  font-size: 30px;
  line-height: 1;
}
.metric-card small {
  color: var(--ink-soft);
  font-weight: 600;
}
.usage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}
.usage-meter {
  border: 1px solid #e2e9f4;
  border-radius: 10px;
  padding: 10px;
  display: grid;
  gap: 6px;
  background: #fbfdff;
}
.usage-meter span {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.usage-meter strong {
  font-size: 26px;
  line-height: 1;
}
.usage-meter small {
  color: var(--ink-soft);
  font-weight: 600;
}
.usage-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 99px;
  background: #e6edf7;
}
.usage-bar span {
  display: block;
  height: 100%;
  min-width: 0;
  background: linear-gradient(90deg, #2f80ed, #20a977);
}
.client-usage-card {
  overflow: hidden;
}
.client-usage-card .usage-grid {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}
.client-usage-layout {
  display: grid;
  grid-template-columns: minmax(520px, 1.25fr) minmax(220px, 0.55fr) minmax(250px, 0.65fr);
  gap: 12px;
  align-items: start;
}
.client-usage-panel {
  min-width: 0;
  overflow: hidden;
}
.client-usage-panel h3 {
  margin-bottom: 6px;
}
.client-usage-table {
  table-layout: fixed;
}
.client-usage-table th,
.client-usage-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.client-usage-table .count-col {
  width: 46px;
}
.client-usage-table .events-col {
  width: 74px;
}
.client-usage-clients-table .client-col {
  width: 34%;
}
.client-usage-clients-table .symbols-col {
  width: 29%;
}
.client-usage-clients-table .last-col {
  width: 108px;
}
.client-usage-table .num-cell {
  text-align: right;
}
.ops-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}
.note-box {
  border: 1px solid #dbe4f2;
  border-radius: 12px;
  padding: 10px 12px;
  background: #f8fbff;
  display: grid;
  gap: 4px;
}
.note-box strong {
  color: var(--brand);
}
.note-box span {
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
}
.quote-table td,
.quote-table th {
  white-space: nowrap;
}
.monitor-details {
  position: fixed;
  top: 70px;
  right: 20px;
  min-width: 280px;
  max-width: 420px;
  background: #fff;
  border: 1px solid #d4deee;
  box-shadow: 0 12px 30px rgba(10, 26, 47, 0.2);
  border-radius: 10px;
  padding: 14px 16px;
  display: none;
  z-index: 30;
}
.monitor-close {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  padding: 0;
}

.actions-col {
  width: 110px;
}
.source-state-table td {
  font-size: 12px;
}
.source-override-form {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 4px;
}
.source-override-form input,
.source-override-form select {
  height: 27px;
  padding: 4px 8px;
  font-size: 12px;
}
.source-override-form button {
  height: 27px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 12px;
}
.stack-actions {
  display: inline-grid;
  gap: 4px;
}
.stack-actions button {
  min-width: 72px;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 11px;
}

@media (max-width: 1200px) {
  .client-usage-layout { grid-template-columns: 1fr; }
  .symbol-form { grid-template-columns: repeat(3, minmax(130px, 1fr)); }
  .submit-wide { grid-column: span 3; justify-self: stretch; }
  .symbols-table .col-alias { width: 42%; }
}

@media (max-width: 840px) {
  .nav { gap: 8px; }
  .symbol-form { grid-template-columns: 1fr; }
  .submit-wide { grid-column: span 1; }
  .symbols-table { font-size: 13px; }
  .symbols-toolbar {
    flex-wrap: wrap;
  }
  .symbols-toolbar input[type="search"] {
    min-width: 180px;
    flex: 1 1 220px;
  }
  .symbols-table .col-name { width: 20%; }
  .symbols-table .col-alias { width: 40%; }
  .monitor-search input {
    min-width: 180px;
  }
  .server-cyber {
    grid-template-columns: 1fr;
  }
  .source-override-form {
    grid-template-columns: 1fr;
  }
}
