:root {
  --zt-bg: #08111b;
  --zt-panel: #0f1927;
  --zt-panel-strong: #142338;
  --zt-panel-soft: rgba(255, 255, 255, 0.035);
  --zt-line: rgba(148, 163, 184, 0.18);
  --zt-line-strong: rgba(99, 211, 255, 0.22);
  --zt-text: #edf4ff;
  --zt-muted: #95a6bd;
  --zt-accent: #63d3ff;
  --zt-good: #34d399;
  --zt-good-text: #a7f3d0;
  --zt-danger: #ef4444;
  --zt-danger-text: #fecaca;
  --zt-warn: #f59e0b;
  --zt-warn-text: #fcd34d;
  --zt-blue-text: #bfdbfe;
  --zt-radius-card: 14px;
  --zt-radius-panel: 18px;
  --zt-radius-tool: 8px;
  --zt-shadow-card: 0 10px 22px rgba(0, 0, 0, 0.16);
  --zt-shadow-panel: 0 20px 50px rgba(0, 0, 0, 0.24);
  --zt-font: "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
  --zt-control-height: 40px;
  --zt-table-row: 42px;
}

body {
  font-family: var(--zt-font);
  letter-spacing: 0;
}

button,
.btn,
.login-btn,
input,
select,
textarea {
  font-family: var(--zt-font);
  letter-spacing: 0;
}

button,
.btn {
  min-height: var(--zt-control-height);
  padding: 8px 14px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.20);
  background: linear-gradient(180deg, rgba(28, 38, 54, 0.95), rgba(17, 24, 35, 0.95));
  color: var(--zt-text);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

button:hover,
.btn:hover {
  background: linear-gradient(180deg, rgba(34, 48, 70, 0.98), rgba(19, 29, 44, 0.98));
  border-color: rgba(99, 211, 255, 0.35);
}


.btn-primary,
.primary-action,
.btn.primary-action {
  border-color: rgba(99, 211, 255, 0.46);
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.92), rgba(29, 78, 216, 0.88));
  color: #eff6ff;
}

.btn-danger,
.btn.danger,
button.danger {
  border-color: rgba(239, 68, 68, 0.42);
  background: linear-gradient(180deg, rgba(127, 29, 29, 0.82), rgba(69, 10, 10, 0.82));
  color: var(--zt-danger-text);
}

.summary-card,
.gate-summary-card,
.candidate-summary-strip div,
.candidate-meta-grid div,
.asset-health-strip .summary-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--zt-radius-card);
  background: linear-gradient(180deg, rgba(14, 23, 36, 0.95), rgba(8, 14, 22, 0.95));
  box-shadow: var(--zt-shadow-card);
}

.summary-card::before,
.gate-summary-card::before,
.candidate-summary-strip div::before,
.candidate-meta-grid div::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.07), transparent 38%);
}

.summary-card > *,
.gate-summary-card > *,
.candidate-summary-strip div > *,
.candidate-meta-grid div > * {
  position: relative;
}

.summary-card strong,
.summary-value,
.gate-summary-card strong,
.candidate-summary-strip strong,
.candidate-meta-grid strong {
  color: var(--zt-text);
  font-weight: 600;
}

.summary-card span,
.summary-card div,
.summary-label,
.gate-summary-card span,
.candidate-summary-strip span,
.candidate-meta-grid span {
  color: var(--zt-muted);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.summary-long,
.summary-today,
.summary-target,
.gate-summary-matched {
  border-color: rgba(52, 211, 153, 0.28);
}

.summary-long strong,
.summary-today .summary-value,
.summary-target .summary-value,
.gate-summary-matched strong {
  color: var(--zt-good-text);
}

.summary-short,
.summary-stop {
  border-color: rgba(239, 68, 68, 0.30);
}

.summary-short strong,
.summary-stop .summary-value {
  color: var(--zt-danger-text);
}

.summary-near,
.gate-summary-scanned {
  border-color: rgba(245, 158, 11, 0.28);
}

.summary-near .summary-value,
.gate-summary-scanned strong {
  color: var(--zt-warn-text);
}

.summary-running,
.gate-summary-shown {
  border-color: rgba(59, 130, 246, 0.28);
}

.summary-running .summary-value,
.gate-summary-shown strong {
  color: var(--zt-blue-text);
}

.pill,
.status-pill,
.alert-chip,
.order-pill,
.qty-pill,
.candidate-bias-pill,
.gate-direction-pill,
.candidate-signal-pill,
.candidate-source-label,
.badge,
.user-pill,
.refresh-info,
.meta-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(148, 163, 184, 0.10);
  color: #d7e5f3;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.pill.long,
.candidate-bias-buy,
.status-pill.match,
.status-pill.candidate-triggered,
.status-pill.candidate-ready,
.status-pill.gate-triggered,
.status-pill.gate-event_ready,
.status-pill.gate-valid {
  border-color: rgba(52, 211, 153, 0.36);
  background: linear-gradient(180deg, rgba(52, 211, 153, 0.30), rgba(21, 128, 61, 0.30));
  color: var(--zt-good-text);
}

.pill.short,
.candidate-bias-sell,
.status-pill.miss,
.status-pill.candidate-invalidated,
.status-pill.candidate-error,
.status-pill.gate-invalidated,
.status-pill.gate-blocked,
.btn-danger {
  border-color: rgba(239, 68, 68, 0.36);
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.30), rgba(153, 27, 27, 0.30));
  color: var(--zt-danger-text);
}

.status-pill.partial,
.status-pill.candidate-near-trigger,
.status-pill.candidate-needs-rules,
.status-pill.gate-forming,
.status-pill.gate-extended,
.status-pill.correction-like {
  border-color: rgba(245, 158, 11, 0.34);
  background: rgba(113, 63, 18, 0.36);
  color: var(--zt-warn-text);
}

.toolbar,
.notebook-toolbar,
.lab-toolbar,
.candidate-toolbar-row,
.table-top,
.top-nav,
.lab-header,
.signal-top-strip {
  border-color: var(--zt-line);
}

.card,
.zones-surface,
.notebook-table-frame,
.lab-results-shell,
.table-frame,
.table-scroll,
.candidate-table-frame,
.signal-list article,
.notes-dialog,
.table-shell {
  border-color: var(--zt-line);
  background: linear-gradient(180deg, rgba(12, 20, 31, 0.96), rgba(7, 13, 22, 0.96));
}

table {
  border-collapse: separate;
  border-spacing: 0;
}

th {
  color: #8fa4bb;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}

td {
  color: #dce7f5;
}

th,
td {
  vertical-align: middle;
}

tbody tr:hover td {
  background-color: rgba(255, 255, 255, 0.045);
}

.notebook-shell,
.notebook-shell button,
.notebook-shell input,
.notebook-shell select,
.notebook-shell textarea {
  font-family: var(--zt-font);
}

.notebook-shell .notebook-toolbar h1,
.notebook-shell .nav-title,
.notebook-shell .notebook-drawer h3 {
  font-weight: 600;
}

.notebook-shell label span,
.notebook-shell .summary-card div,
.notebook-shell th,
.notebook-shell .index-list,
.notebook-shell .symbol,
.notebook-shell .scenario-pill,
.notebook-shell .scenario-meta,
.notebook-shell .notebook-drawer-form label {
  font-weight: 600;
}

.notebook-shell td,
.notebook-shell select,
.notebook-shell input,
.notebook-shell textarea,
.notebook-shell .notebook-toolbar p,
.notebook-shell .summary-card span {
  font-weight: 500;
}

.notebook-shell .summary-card strong {
  font-weight: 600;
}

.signal-row,
.indicator-row {
  min-height: var(--zt-table-row);
}

.signal-header-row,
thead th {
  background: rgba(12, 20, 31, 0.98);
}

input,
select,
textarea {
  border-color: var(--zt-line);
  background: rgba(5, 12, 20, 0.96);
  color: var(--zt-text);
  border-radius: var(--zt-radius-tool);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(99, 211, 255, 0.52);
  box-shadow: 0 0 0 3px rgba(99, 211, 255, 0.10);
}

@media (max-width: 900px) {
  .summary-card,
  .gate-summary-card,
  .candidate-summary-strip div,
  .candidate-meta-grid div {
    border-radius: 12px;
  }
}

/* Shared app header — used by Zone Trading System, Intraday Desk, and future top-level pages */
.header {
  background: rgba(8, 14, 22, 0.78);
  border-bottom: 1px solid var(--zt-line);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(18px);
}

.header h1 {
  font-size: 18px;
  font-weight: 600;
  color: var(--zt-text);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.fyers-token-clock {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(96, 165, 250, 0.36);
  background: rgba(18, 35, 63, 0.88);
  color: #dbeafe;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.24);
}

.fyers-token-clock.warning {
  border-color: rgba(245, 158, 11, 0.42);
  background: rgba(73, 48, 8, 0.9);
  color: #fde68a;
}

.fyers-token-clock.danger {
  border-color: rgba(248, 113, 113, 0.46);
  background: rgba(91, 24, 24, 0.9);
  color: #fecaca;
}

.fyers-warning {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(248, 113, 113, 0.42);
  background: rgba(91, 24, 24, 0.82);
  color: #fecaca;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  box-shadow: 0 10px 24px rgba(60, 16, 16, 0.24);
}

.fyers-warning.show {
  display: inline-flex;
}

/* Full-app GUI standardisation guard.
   Page CSS may define layout, but repeated controls should keep one font
   density, card language, pill treatment, and table rhythm. */
body,
.notebook-shell,
.lab-shell,
.finder-shell,
.calc-shell,
.trade-shell,
.page-shell,
.chart-shell,
.login-shell,
.archive-toolbar,
.archive-table-shell {
  font-family: var(--zt-font) !important;
  letter-spacing: 0;
}

.notebook-shell *,
.lab-shell *,
.finder-shell *,
.calc-shell *,
.trade-shell *,
.page-shell *,
.chart-shell *,
.archive-table-shell *,
.archive-toolbar * {
  letter-spacing: 0;
}

.notebook-shell h1,
.notebook-shell h2,
.notebook-shell h3,
.lab-shell h1,
.lab-shell h2,
.lab-shell h3,
.finder-shell h1,
.finder-shell h2,
.finder-shell h3,
.calc-shell h1,
.calc-shell h2,
.calc-shell h3,
.trade-shell h1,
.trade-shell h2,
.trade-shell h3,
.page-shell h1,
.page-shell h2,
.page-shell h3,
.chart-shell h1,
.chart-shell h2,
.chart-shell h3,
.archive-table-head h2,
.login-shell h1,
.login-shell h2,
.login-shell h3 {
  font-weight: 600 !important;
}

.notebook-shell label,
.notebook-shell label span,
.lab-shell label,
.lab-shell label span,
.finder-shell label,
.calc-shell label,
.page-shell label,
.page-shell label span,
.toolbar-meta,
.compact-page-kicker,
.summary-label,
.summary-card-label,
.table-top p,
.archive-table-head p,
.chart-shell p,
.login-shell p {
  font-weight: 500 !important;
}

.notebook-shell th,
.lab-shell th,
.finder-shell th,
.calc-shell th,
.trade-shell th,
.page-shell th,
.chart-shell th,
.archive-table-shell th,
.notebook-shell .summary-card div,
.lab-shell .summary-card-label,
.page-shell .summary-card .summary-label {
  color: #8fa4bb;
  font-size: 10px;
  font-weight: 600 !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.notebook-shell td,
.lab-shell td,
.finder-shell td,
.calc-shell td,
.trade-shell td,
.page-shell td,
.chart-shell td,
.archive-table-shell td,
.notebook-shell input,
.notebook-shell select,
.notebook-shell textarea,
.lab-shell input,
.lab-shell select,
.lab-shell textarea,
.finder-shell input,
.finder-shell select,
.finder-shell textarea,
.calc-shell input,
.calc-shell select,
.calc-shell textarea,
.page-shell input,
.page-shell select,
.page-shell textarea {
  font-weight: 500 !important;
}

.notebook-shell .summary-card strong,
.lab-shell .summary-card-count,
.page-shell .summary-card .summary-value,
.summary-card strong,
.summary-value,
.candidate-summary-strip strong,
.candidate-meta-grid strong {
  font-weight: 600 !important;
}

.notebook-shell .btn,
.lab-shell .btn,
.finder-shell .btn,
.calc-shell .btn,
.trade-shell .btn,
.page-shell .btn,
.chart-shell .btn,
.archive-toolbar .btn,
.archive-table-shell .btn,
.login-shell .login-btn {
  min-height: var(--zt-control-height);
  border-radius: var(--zt-radius-tool) !important;
  border: 1px solid rgba(148, 163, 184, 0.20);
  background: linear-gradient(180deg, rgba(24, 36, 53, 0.98), rgba(16, 25, 39, 0.98));
  color: var(--zt-text);
  font-weight: 600 !important;
}

.notebook-shell .summary-card,
.lab-shell .summary-card,
.finder-card,
.calc-card,
.page-shell .summary-card,
.page-shell .shell-card,
.archive-table-shell,
.chart-panel,
.reading-panel,
.login-shell .auth-pane,
.login-shell .hero-pane {
  border-radius: var(--zt-radius-card) !important;
  border-color: rgba(148, 163, 184, 0.16);
  background: linear-gradient(180deg, rgba(14, 23, 36, 0.95), rgba(8, 14, 22, 0.95));
  box-shadow: var(--zt-shadow-card);
}

.notebook-shell .status-pill,
.notebook-shell .scenario-pill,
.lab-shell .status-pill,
.finder-shell .rating-pill,
.calc-shell .rating-pill,
.trade-shell .status-pill,
.trade-shell .candidate-signal-pill,
.page-shell .status-pill,
.page-shell .rating-pill,
.chart-shell .live-status,
.archive-table-shell .status-pill,
.login-shell .role-pill,
.login-shell .feature-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px !important;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(148, 163, 184, 0.10);
  color: #d7e5f3;
  font-weight: 600 !important;
  letter-spacing: 0.02em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.notebook-table-frame table,
.lab-table-frame table,
.finder-shell table,
.calc-shell table,
.trade-shell table,
.page-shell table,
.archive-table-shell table {
  border-collapse: separate;
  border-spacing: 0;
}

.empty-state-inline {
  display: grid;
  gap: 4px;
  justify-items: center;
  text-align: center;
  padding: 22px 14px;
  color: var(--zt-muted, #95a6bd);
}

.empty-state-inline strong {
  color: var(--zt-text, #edf4ff);
  font-size: 14px;
  font-weight: 600;
}

.empty-state-inline span {
  font-size: 12px;
  max-width: 420px;
}
