:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --line: #e2e8f0;
  --text: #0f172a;
  --muted: #475569;
  --primary: #e85d04;
  --primary-dark: #f48c06;
  --accent: #16a34a;
  --accent-dark: #15803d;
  --focus-ring: rgba(232, 93, 4, 0.14);
  --focus-outline: rgba(232, 93, 4, 0.45);
  --panel-soft: #ffffff;
  --panel-strong: #f1f5f9;
  --line-strong: #cbd5e1;
  --shadow-soft: 0 4px 14px rgba(15, 23, 42, 0.05);
  --shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
  --shadow-strong: 0 12px 28px rgba(15, 23, 42, 0.08);
  --radius: 10px;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: Sarabun, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.5;
}

body::before {
  content: none;
}

body::after {
  content: none;
}

.app-frame {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 208px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  min-height: 100vh;
  padding: 0;
  border-right: 0;
  background: #0d1b2a;
  color: #e5eef8;
  display: flex;
  flex-direction: column;
  gap: 0;
  box-shadow: none;
  z-index: 1;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px 10px;
  border-bottom: 1px solid #1e2d42;
}

.sidebar-brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(232, 93, 4, 0.12);
  color: #ffffff;
  font-size: 18px;
  flex-shrink: 0;
}

.sidebar-brand-mark::before {
  content: 'FC';
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.sidebar-brand-name {
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.1;
}

.sidebar-brand-sub {
  margin-top: 3px;
  color: #94a3b8;
  font-size: 10px;
  font-weight: 500;
}

.sidebar-brand p,
.sidebar-card p {
  margin: 0;
  color: rgba(226, 232, 240, 0.82);
  line-height: 1.65;
  font-size: 14px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 8px 0;
}

.sidebar-nav-section {
  padding: 8px 14px 6px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
}

.nav-link {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 7px 14px;
  border-radius: 0;
  color: #94a3b8;
  text-decoration: none;
  font-weight: 700;
  font-size: 12px;
  border: 0;
  border-left: 3px solid transparent;
  background: transparent;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.nav-link:hover,
.nav-link-active {
  background: #162032;
  border-left-color: var(--primary);
  color: #ffffff;
}

.nav-link:hover {
  transform: none;
}

.sidebar-card {
  margin: 0 12px 12px;
  padding: 10px 12px;
  border: 1px solid #1e2d42;
  border-radius: 10px;
  background: #162032;
  backdrop-filter: none;
  box-shadow: none;
}

.sidebar-card-label {
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
}

.sidebar-card-support,
.sidebar-meta-card {
  display: none;
}

.sidebar-user-card {
  margin: auto 12px 12px;
  padding: 10px 12px;
  border: 1px solid #1e2d42;
  border-radius: 10px;
  background: #162032;
}

.sidebar-logout-btn {
  margin: 0 12px 12px;
  width: calc(100% - 24px);
  justify-content: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  box-shadow: none;
}

.sidebar-logout-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  box-shadow: none;
}

.sidebar-user-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
}

.sidebar-user-value {
  margin-top: 8px;
  color: #e2e8f0;
  font-size: 10px;
  line-height: 1.5;
  word-break: break-all;
}

.sidebar-user-meta {
  margin-top: 10px;
}

.sidebar-user-meta,
#auth-status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid #243247;
  background: #0f2133;
  color: #cbd5e1;
  font-size: 10px;
  font-weight: 700;
}

.app-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 0 16px;
  margin: 0;
  width: 100%;
  min-height: 48px;
  background: #fbfcfd;
  border-bottom: 1px solid var(--line);
}

.topbar::before {
  content: none;
}

.topbar-copy {
  max-width: 860px;
  padding: 9px 0;
}

.topbar-copy-compact {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.topbar-page-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.topbar-page-sub {
  color: var(--muted);
  line-height: 1.4;
  font-size: 10px;
}

.topbar-meta-label {
  color: #64748b;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.topbar-eyebrow {
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
}

.topbar-copy h2 {
  margin: 0 0 8px;
  font-size: 15px;
  line-height: 1.1;
}

.topbar-copy p {
  margin: 0;
  max-width: 760px;
  color: var(--muted);
  line-height: 1.4;
  font-size: 11px;
}

.content-shell {
  padding: 12px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin: 0;
}

#page-login .panel {
  min-height: 100%;
}

.login-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 12px;
  align-items: stretch;
}

.login-intro-panel,
.login-form-panel {
  background: #ffffff;
}

.login-intro-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-brand-block {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 82px;
  padding: 4px 2px 2px;
}

.login-brand-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  font-size: 28px;
  flex-shrink: 0;
}

.login-brand-title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--text);
}

.login-brand-sub {
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
}

.login-summary-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.compact-head h2 {
  margin-bottom: 4px;
  font-size: 13px;
}

.login-form-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.login-card-head {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.login-form-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 14px;
}

.btn-block {
  width: 100%;
}

.page-view {
  display: none;
}

.page-view-active {
  display: block;
  animation: page-fade-in 0.18s ease;
}

@keyframes page-fade-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.dashboard-page-shell,
.sessions-page-shell {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dashboard-page-toolbar,
.sessions-page-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.dashboard-page-shell {
  gap: 8px;
}

.dashboard-page-toolbar {
  gap: 8px;
}

.dashboard-toolbar-copy {
  max-width: 760px;
}

.dashboard-toolbar-copy h3 {
  margin: 2px 0 4px;
  font-size: 15px;
  line-height: 1.12;
}

.dashboard-toolbar-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.35;
}

.dashboard-toolbar-actions {
  justify-content: flex-end;
  gap: 6px;
}

.dashboard-entry-inline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid #f1e2cf;
  border-radius: 6px;
  background: #fffdf9;
}

.dashboard-entry-inline-copy {
  min-width: 0;
}

.dashboard-entry-inline-title {
  font-size: 11px;
  font-weight: 700;
  color: #0f172a;
}

.dashboard-entry-note {
  margin-top: 2px;
  max-width: 780px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.35;
}

.dashboard-entry-actions {
  flex-shrink: 0;
  justify-content: flex-end;
  gap: 6px;
}

.dashboard-entry-actions .btn,
.dashboard-toolbar-actions .btn {
  white-space: nowrap;
}

.dashboard-primary-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.dashboard-secondary-stat-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
}

.stat-card-secondary {
  min-height: 78px;
}

.stat-card-tone-ok::before {
  background: #16a34a;
}

.stat-card-tone-fail::before {
  background: #dc2626;
}

.stat-card-tone-amber::before {
  background: #f59e0b;
}

.dashboard-overview-grid-gas {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 6px;
}

.dashboard-panel {
  background: #ffffff;
}

.dashboard-panel .data-card-head {
  padding: 7px 9px;
}

.dashboard-panel .data-card-head h3 {
  margin: 0;
  font-size: 11px;
  line-height: 1.15;
}

.dashboard-panel .data-card-head span {
  font-size: 8px;
}

.dashboard-focus-body,
.dashboard-next-body {
  padding: 8px 9px;
}

.dashboard-focus-headline {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.dashboard-focus-title {
  font-size: 7px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #94a3b8;
}

.dashboard-focus-id {
  margin-top: 3px;
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
}

.dashboard-focus-meta {
  max-width: 240px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.35;
  text-align: right;
}

.dashboard-progress-track {
  margin-top: 8px;
  height: 7px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.dashboard-progress-bar {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #f97316 0%, #f59e0b 100%);
  transition: width 0.18s ease;
}

.dashboard-progress-meta {
  margin-top: 5px;
  display: flex;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 8px;
  color: var(--muted);
}

.dashboard-focus-stats {
  margin-top: 6px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.dashboard-focus-stat {
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 8px;
  color: var(--muted);
}

.dashboard-focus-stat strong {
  font-size: 15px;
  color: #0f172a;
}

.dashboard-focus-stat-fail {
  background: #fff7ed;
  border-color: #fed7aa;
}

.dashboard-summary-grid-gas {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 8px 9px;
}

.dashboard-summary-box {
  min-height: 68px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
}

.dashboard-summary-label {
  display: block;
  font-size: 7px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #94a3b8;
}

.dashboard-summary-value {
  display: block;
  margin-top: 6px;
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.1;
}

.dashboard-split-grid-gas {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 6px;
}

.dashboard-history-wrap table {
  min-width: 100%;
}

.dashboard-history-wrap th,
.dashboard-history-wrap td {
  padding: 5px 7px;
  font-size: 8px;
}

.dashboard-history-wrap th {
  font-size: 6px;
}

.dashboard-next-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  color: #0f172a;
}

.dashboard-next-subtitle {
  margin-top: 4px;
  font-size: 9px;
  color: var(--muted);
  line-height: 1.35;
}

.dashboard-next-meta,
.dashboard-next-helper {
  margin-top: 4px;
  font-size: 8px;
  color: var(--muted);
  line-height: 1.35;
}

.dashboard-next-actions {
  margin-top: 8px;
  gap: 4px;
}

.dashboard-context-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.dashboard-context-strip .context-card {
  padding: 8px 9px;
  min-height: 72px;
}

.dashboard-context-strip .context-label {
  font-size: 7px;
  letter-spacing: 0.1em;
}

.dashboard-context-strip .context-value {
  margin-top: 4px;
  font-size: 16px;
}

.dashboard-context-strip .context-note {
  margin-top: 2px;
  font-size: 8px;
  line-height: 1.3;
}

.dashboard-context-panel,
.dashboard-quick-actions-panel,
.sessions-control-panel {
  background: #ffffff;
}

.context-grid-dense {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.quick-actions-grid-compact .quick-action-card {
  min-height: 92px;
}

.dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 12px;
  margin-bottom: 12px;
  align-items: stretch;
  position: static;
  overflow: visible;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.dashboard-hero::before {
  content: none;
}

.dashboard-hero::after {
  content: none;
}

.dashboard-hero-copy,
.dashboard-context-grid {
  position: relative;
  z-index: 1;
}

.dashboard-hero-copy h3 {
  margin: 4px 0 8px;
  max-width: 720px;
  font-size: 22px;
  line-height: 1.2;
}

.dashboard-hero-copy p {
  margin: 0;
  color: var(--muted);
  max-width: 780px;
  line-height: 1.6;
  font-size: 12px;
}

.dashboard-kicker {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
}

.hero-inline-note {
  display: inline-flex;
  align-items: center;
  margin-top: 10px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
  font-size: 11px;
  font-weight: 600;
  box-shadow: none;
}

.dashboard-context-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.context-card,
.quick-action-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: none;
}

.context-card {
  padding: 12px;
  position: relative;
  overflow: hidden;
}

.context-card-spotlight {
  background: #fff7ed;
  border-color: #fed7aa;
  box-shadow: none;
}

.context-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
}

.context-value {
  margin-top: 8px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.1;
}

.context-note {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.quick-actions-grid-dashboard {
  gap: 14px;
}

.quick-action-card {
  appearance: none;
  width: 100%;
  min-height: 86px;
  padding: 12px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease;
  position: relative;
  overflow: hidden;
}

.context-card::before,
.quick-action-card::before,
.data-card::before,
.stat-card::after {
  content: none;
}

.context-card::before,
.quick-action-card::before,
.data-card::before {
  background: none;
}

.quick-action-card::after {
  content: none;
}

.quick-action-card:hover {
  transform: none;
  box-shadow: none;
  border-color: #94a3b8;
  background: #f8fafc;
}

.quick-action-card:focus-visible,
.actionable-stat-card:focus-visible,
.nav-link:focus-visible,
.btn:focus-visible,
.input:focus-visible,
.row-clickable:focus-visible,
.result-select-checkbox:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.quick-action-card:focus-visible,
.actionable-stat-card:focus-visible,
.nav-link:focus-visible,
.btn:focus-visible,
.row-clickable:focus-visible {
  border-color: var(--focus-outline);
}

.quick-action-title {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}

.quick-action-note {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.session-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.product-session-summary-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.session-overview-grid-primary .context-card {
  min-height: 132px;
}

.session-overview-grid.compact {
  grid-template-columns: repeat(3, minmax(0, 180px));
}

.session-overview-grid-compact .context-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(245, 249, 255, 0.98) 100%);
}

.compact-card {
  padding: 12px 14px;
}

.results-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: none;
}

.results-filter-grid {
  min-width: min(680px, 100%);
}

.results-toolbar-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.sessions-toolbar {
  position: relative;
  overflow: hidden;
  border-color: var(--line);
}

.sessions-toolbar .token-chip {
  background: #ffffff;
  border-color: var(--line);
}

.sessions-control-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.sessions-lookup-grid {
  margin-bottom: 10px;
}

.sessions-actions-toolbar {
  padding: 0;
  border: 0;
  background: transparent;
}

.sessions-workspace-grid-product {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.6fr);
  gap: 10px;
  align-items: start;
}

.session-list-panel-product {
  align-self: start;
}

.sessions-main-column {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sessions-detail-grid-product {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

#sessions-workspace-hint {
  border-style: dashed;
}

.dashboard-shell,
.sessions-shell {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(249, 251, 254, 0.98) 100%);
}

.field-inline {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.field-inline span {
  min-width: 64px;
}

.field-inline .input {
  min-width: 180px;
}

.row-selected {
  background: #fff7ed;
  box-shadow: inset 3px 0 0 var(--primary);
}

.result-select-checkbox {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}

.result-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.result-status-pass {
  background: #ecfdf5;
  color: #047857;
}

.result-status-fail {
  background: #fef2f2;
  color: #b91c1c;
}

.result-status-skip {
  background: #fff7ed;
  color: #c2410c;
}

.result-status-unknown {
  background: #f1f5f9;
  color: #475569;
}

.result-note-cell {
  display: inline-block;
  max-width: 260px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.result-detail-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
  box-shadow: none;
}

.result-detail-group-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #94a3b8;
}

.result-detail-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.result-detail-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.result-detail-key {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #94a3b8;
}

.result-detail-value {
  margin-top: 6px;
  color: var(--text);
  font-size: 11px;
  line-height: 1.6;
  word-break: break-word;
}

.hero {
  margin-bottom: 18px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(215, 58, 49, 0.1);
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
}

.hero h1 {
  margin: 14px 0 8px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.08;
}

.hero p {
  margin: 0;
  max-width: 820px;
  color: var(--muted);
  line-height: 1.7;
}

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

.panel {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: none;
  padding: 14px;
}

.full-width {
  grid-column: 1 / -1;
}

.stack-lg {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.section-head h2,
.data-card-head h3,
.dashboard-hero-copy h3 {
  text-wrap: balance;
}

.section-head h2,
.data-card-head h3 {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 10px;
}

.status-pill,
.token-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #ffffff;
  color: #334155;
  font-size: 9px;
  font-weight: 600;
  border: 1px solid var(--line);
  box-shadow: none;
}

#auth-status-chip {
  min-height: 28px;
}

.auth-status-guest {
  background: #f1f5f9 !important;
  color: #64748b !important;
  border-color: #cbd5e1 !important;
}

.auth-status-checking {
  background: #fef9c3 !important;
  color: #854d0e !important;
  border-color: #fde68a !important;
}

.auth-status-authenticated {
  background: #dcfce7 !important;
  color: #14532d !important;
  border-color: #86efac !important;
  font-weight: 700 !important;
}

.topbar-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.auth-status-guest {
  background: #fff7ed;
  color: #9a3412;
}

.auth-status-checking {
  background: #eff6ff;
  color: #1d4ed8;
}

.auth-status-authenticated {
  background: #ecfdf5;
  color: #047857;
}

#connection-status.status-pill {
  min-height: 38px;
  font-weight: 800;
}

.field-grid {
  display: grid;
  gap: 10px;
}

.field-grid.one {
  grid-template-columns: minmax(0, 1fr);
}

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

.field-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field span {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
}

.form-hint {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 9px 10px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
  position: relative;
  overflow: hidden;
}

.input {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  padding: 0 9px;
  font-size: 10px;
  color: var(--text);
  box-shadow: none;
}

.input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.input:disabled {
  background: #f1f5f9;
  color: #94a3b8;
  cursor: not-allowed;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.actions.wrap {
  align-items: center;
}

.btn {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  min-height: 30px;
  padding: 0 10px;
  background: #ffffff;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease;
}

.btn:hover {
  transform: none;
  box-shadow: none;
  border-color: #475569;
}

.btn:disabled {
  opacity: 0.58;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.quick-action-card:disabled {
  opacity: 0.58;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: none;
}

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.actions-toolbar {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: none;
}

.dashboard-shell > .actions-toolbar {
  border-radius: 10px;
  background: #ffffff;
}

.message-box,
.json-view,
.table-wrap,
.data-card,
.stat-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: none;
}

.message-box {
  padding: 9px 10px;
  color: var(--muted);
  line-height: 1.6;
  background: #ffffff;
  position: relative;
  overflow: hidden;
  font-size: 10px;
}

.message-box::before,
.form-hint::before {
  content: none;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-stat-grid {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.stat-card {
  position: relative;
  overflow: hidden;
  min-height: 96px;
  padding: 12px;
}

.stat-card-tone-navy {
  background: #0d1b2a;
  border-color: #15283f;
}

.stat-card-tone-navy::before {
  background: #f59e0b;
}

.stat-card-tone-navy .stat-label,
.stat-card-tone-navy .stat-note,
.stat-card-tone-navy .stat-value {
  color: #f8fafc;
}

.stat-card::before {
  content: '';
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: var(--primary);
  opacity: 1;
}

.actionable-stat-card {
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}

.actionable-stat-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
  border-color: #cbd5e1;
}

.actionable-stat-card::after {
  content: '↗';
  position: absolute;
  right: 16px;
  top: 16px;
  color: rgba(15, 23, 42, 0.18);
  font-size: 18px;
  font-weight: 800;
}

.actionable-stat-card.stat-card-disabled {
  cursor: default;
  opacity: 0.82;
}

.actionable-stat-card.stat-card-disabled:hover {
  transform: none;
  box-shadow: var(--shadow-soft);
  border-color: rgba(214, 226, 237, 0.95);
}

.actionable-stat-card.stat-card-disabled::after {
  color: rgba(148, 163, 184, 0.28);
}

.stat-action-hint {
  margin-top: auto;
  padding-top: 10px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
}

.stat-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
}

.stat-value {
  margin-top: 10px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.1;
}

.stat-note {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.data-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.9fr);
  gap: 10px;
}

.sessions-data-grid {
  align-items: start;
}

.data-card {
  padding: 0;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
}

.session-results-card {
  background: #ffffff;
  border-color: var(--line);
}

.result-detail-card,
.payload-card,
.session-list-card {
  background: #ffffff;
}

.workspace-debug-card {
  display: none;
}

.data-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 0;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.session-results-card .data-card-head,
.result-detail-card .data-card-head {
  align-items: flex-start;
}

.data-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.data-card-head span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.table-wrap {
  overflow: auto;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.65) transparent;
}

table {
  width: 100%;
  border-collapse: collapse;
}

.session-list-card table {
  min-width: 460px;
}

.session-results-card table {
  min-width: 940px;
}

th, td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 10px;
  vertical-align: middle;
}

th {
  position: sticky;
  top: 0;
  background: #f8fafc;
  backdrop-filter: none;
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #94a3b8;
  z-index: 1;
}

tbody tr:hover {
  background: #f8fafc;
}

.row-clickable {
  cursor: pointer;
  transition: background 0.12s ease, transform 0.12s ease;
}

.row-clickable:focus-visible {
  position: relative;
  z-index: 1;
}

.empty-cell {
  text-align: center;
  color: var(--muted);
  padding: 22px 14px;
  line-height: 1.7;
  background: #ffffff;
  font-size: 11px;
}

.json-view {
  margin: 0;
  min-height: 360px;
  padding: 16px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 11px;
  line-height: 1.65;
  background: #0d1b2a;
  color: #dbe7f3;
  border-color: #1e2d42;
}

.payload-card .json-view {
  border: 0;
  border-radius: 0 0 10px 10px;
}

.mono {
  font-family: var(--mono);
}

.ok {
  color: var(--accent);
}

.warn {
  color: #b45309;
}

.err {
  color: #b91c1c;
}

.message-box.ok,
.form-hint.ok {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.message-box.warn,
.form-hint.warn {
  border-color: #fde68a;
  background: #fef3c7;
}

.message-box.err,
.form-hint.err {
  border-color: #fecaca;
  background: #fee2e2;
}

@media (max-width: 1200px) {
  .dashboard-primary-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

  .sidebar {
    position: static;
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid #1e2d42;
    box-shadow: none;
  }

  .section-grid,
  .login-layout,
  .dashboard-page-toolbar,
  .sessions-page-toolbar,
  .dashboard-overview-grid-product,
  .dashboard-overview-grid-gas,
  .dashboard-split-grid-gas,
  .dashboard-hero,
  .dashboard-secondary-stat-grid,
  .dashboard-context-grid,
  .dashboard-context-strip,
  .quick-actions-grid,
  .session-overview-grid,
  .product-session-summary-grid,
  .sessions-workspace-grid-product,
  .sessions-detail-grid-product,
  .result-detail-grid,
  .result-detail-list,
  .field-grid.two,
  .summary-grid,
  .data-grid,
  .dashboard-stat-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .data-card-head,
  .data-card-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-page-toolbar,
  .sessions-page-toolbar {
    flex-direction: column;
  }

  .dashboard-entry-inline,
  .dashboard-focus-headline {
    flex-direction: column;
    align-items: flex-start;
  }

  .dashboard-entry-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .dashboard-focus-meta {
    max-width: none;
    text-align: left;
  }

  .results-toolbar-meta {
    justify-content: flex-start;
  }

  .field-inline {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
  }

  .field-inline .input,
  .results-toolbar-meta .btn,
  .results-toolbar-meta .token-chip {
    width: 100%;
  }

  .actions-toolbar,
  .results-toolbar {
    padding: 14px;
  }

  .sessions-actions-toolbar {
    padding: 0;
  }

  .topbar {
    width: 100%;
    padding: 10px 14px;
  }
}

@media (max-width: 640px) {
  .topbar,
  .content-shell {
    padding-left: 12px;
    padding-right: 12px;
  }

  .panel {
    padding: 16px;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar-meta {
    width: 100%;
    justify-content: flex-start;
  }

  .sidebar {
    padding: 0;
  }

  .dashboard-toolbar-copy h3,
  .login-brand-title {
    font-size: 18px;
  }

  .hero-inline-note {
    width: 100%;
    justify-content: center;
    text-align: center;
    padding: 10px 14px;
  }

  .stat-card,
  .context-card,
  .quick-action-card {
    min-height: auto;
  }

  .dashboard-summary-grid-gas,
  .dashboard-focus-stats {
    grid-template-columns: minmax(0, 1fr);
  }

  .table-wrap {
    padding: 0;
  }

  th, td {
    padding: 12px 10px;
  }

  .sidebar-user-card {
    margin-top: 0;
  }

  .nav-link:hover {
    transform: none;
  }
}

/* ── New dashboard production elements ── */

.btn-sm-inline {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 5px;
  min-height: 24px;
  padding: 0 8px;
  background: #ffffff;
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.12s ease, background 0.12s ease;
}

.btn-sm-inline:hover {
  border-color: #475569;
  background: #f8fafc;
}

.btn-sm-inline:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.dashboard-info-box {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 10px;
  padding: 8px 10px;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  background: #eff6ff;
  color: #1e40af;
  font-size: 10px;
  line-height: 1.55;
}

.dashboard-info-box span {
  flex-shrink: 0;
  font-size: 13px;
  line-height: 1.3;
}

.expiry-badge-red {
  background: #fef2f2 !important;
  color: #b91c1c !important;
  border-color: #fecaca !important;
  font-weight: 700 !important;
}

.expiry-badge-amber {
  background: #fff7ed !important;
  color: #c2410c !important;
  border-color: #fed7aa !important;
  font-weight: 700 !important;
}

.expiry-badge-ok {
  background: #ecfdf5 !important;
  color: #047857 !important;
  border-color: #a7f3d0 !important;
  font-weight: 700 !important;
}

.dashboard-factory-inline {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
}

.dashboard-expiry-card {
  background: #ffffff;
}

.dashboard-expiry-wrap table {
  min-width: 100%;
}

.dashboard-expiry-wrap th,
.dashboard-expiry-wrap td {
  padding: 6px 9px;
  font-size: 10px;
}

.dashboard-expiry-wrap th {
  font-size: 8px;
}

.dashboard-user-chip {
  font-size: 10px;
  font-weight: 700;
}

/* ===== MODAL OVERLAY ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(13, 27, 42, 0.6);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-box {
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  display: flex;
  flex-direction: column;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.modal-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
}

.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: var(--text-secondary);
  padding: 4px 8px;
  border-radius: 6px;
  line-height: 1;
}

.modal-close:hover {
  background: var(--bg-subtle);
  color: var(--text);
}

.modal-body {
  padding: 16px 20px;
  flex: 1;
  overflow-y: auto;
}

.modal-foot {
  padding: 12px 20px 16px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-shrink: 0;
}

/* ===== MAINT TABS ===== */
.maint-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.maint-tab-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--text-secondary);
  cursor: pointer;
}

.maint-tab-btn:hover {
  border-color: var(--navy);
  color: var(--navy);
}

.maint-tab-btn.maint-tab-active {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

.maint-tab-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.maint-tab-count {
  font-family: var(--font-mono);
  font-size: 11px;
  opacity: 0.8;
}

/* ===== NAV BADGE ===== */
.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  margin-left: 4px;
  line-height: 1;
}

/* ===== TABLE PAGER ===== */
.table-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 0 4px;
  flex-wrap: wrap;
}

/* ===== Stitch redesign layer ===== */
:root {
  --bg: #f7f9fb;
  --bg-soft: #f2f4f6;
  --bg-elevated: #ffffff;
  --surface: #f7f9fb;
  --surface-container: #f2f4f6;
  --surface-container-low: #eef2f5;
  --surface-container-lowest: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --primary: #9f3d00;
  --primary-dark: #7c2d12;
  --primary-soft: #c74e00;
  --accent: #005cad;
  --accent-dark: #0f4f8a;
  --line: rgba(15, 23, 42, 0.08);
  --line-strong: rgba(15, 23, 42, 0.14);
  --shadow-soft: 0 16px 30px rgba(15, 28, 44, 0.04);
  --shadow: 0 22px 48px rgba(15, 28, 44, 0.06);
  --shadow-strong: 0 28px 64px rgba(15, 28, 44, 0.08);
  --focus-ring: rgba(159, 61, 0, 0.12);
  --focus-outline: rgba(159, 61, 0, 0.36);
  --radius: 18px;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html {
  scroll-behavior: smooth;
  background: var(--surface);
}

body {
  background:
    radial-gradient(circle at top left, rgba(199, 78, 0, 0.08), transparent 26%),
    radial-gradient(circle at top right, rgba(0, 92, 173, 0.08), transparent 24%),
    linear-gradient(180deg, #fbfcfd 0%, #f7f9fb 44%, #f2f4f6 100%);
  color: var(--text);
  font-family: var(--sans);
}

.app-frame {
  grid-template-columns: 296px minmax(0, 1fr);
  background: transparent;
}

.sidebar {
  padding: 20px 16px 16px;
  background: linear-gradient(180deg, #10263f 0%, #0d1b2a 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 12px 0 34px rgba(15, 28, 44, 0.12);
}

.sidebar-brand {
  padding: 0 0 16px;
  border-bottom: 0;
}

.sidebar-brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: linear-gradient(45deg, var(--primary), var(--primary-soft));
  box-shadow: 0 12px 24px rgba(159, 61, 0, 0.3);
}

.sidebar-brand-mark::before {
  content: 'FC';
  letter-spacing: 0.06em;
}

.sidebar-brand-name,
.sidebar-brand-sub,
.sidebar-nav-section,
.nav-link,
.sidebar-card p,
.sidebar-user-value,
.sidebar-user-label {
  font-family: var(--sans);
}

.sidebar-brand-name {
  font-size: 15px;
}

.sidebar-brand-sub {
  color: rgba(226, 232, 240, 0.7);
}

.sidebar-nav {
  gap: 6px;
  padding: 18px 0 10px;
}

.sidebar-nav-section {
  padding: 14px 12px 4px;
  color: rgba(148, 163, 184, 0.74);
}

.nav-link {
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 14px;
  border-left: 0;
  color: rgba(226, 232, 240, 0.76);
  background: transparent;
}

.nav-link:hover,
.nav-link-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.sidebar-card,
.sidebar-user-card {
  margin: 12px 0 0;
  padding: 14px 14px 12px;
  border: 0;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(12px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.sidebar-card-label,
.sidebar-user-label {
  color: rgba(226, 232, 240, 0.62);
  letter-spacing: 0.08em;
}

.sidebar-user-card {
  margin-top: auto;
}

.sidebar-user-value,
.sidebar-user-meta,
#auth-status-chip {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-color: transparent;
}

.app-main {
  min-height: 100vh;
  background: transparent;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 18px 28px;
  min-height: 88px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  background: rgba(247, 249, 251, 0.84);
  backdrop-filter: blur(16px);
}

.topbar-page-title,
.section-head h2,
.section-head h3,
.dashboard-toolbar-copy h3,
.login-brand-title,
.login-card-head h2 {
  font-family: 'Manrope', var(--sans);
  letter-spacing: -0.02em;
}

.topbar-page-title {
  font-size: 22px;
  font-weight: 800;
}

.topbar-page-sub,
.dashboard-toolbar-copy p,
.section-head p,
.login-brand-sub,
.form-hint,
.message-box {
  color: var(--muted);
}

.content-shell {
  padding: 24px 28px 36px;
}

.page-view {
  display: none;
}

.page-view.page-view-active {
  display: block;
}

.panel,
.data-card,
.stat-card,
.context-card,
.quick-action-card,
.login-summary-card,
.login-form-panel,
.dashboard-page-shell,
.sidebar-card,
.sidebar-user-card,
.table-wrap,
.modal-box {
  border: 0;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-soft);
}

.dashboard-page-shell,
.login-layout,
.dashboard-overview-grid-gas,
.dashboard-split-grid-gas,
.dashboard-primary-stat-grid {
  gap: 18px;
}

.dashboard-page-toolbar,
.login-brand-block,
.section-head,
.data-card-head,
.modal-head {
  border-bottom: 0;
}

.dashboard-page-toolbar,
.dashboard-toolbar-actions,
.actions.wrap,
.login-form-body,
.login-summary-card,
.field-grid,
.dashboard-focus-body,
.dashboard-summary-grid-gas,
.dashboard-split-grid-gas,
.dashboard-primary-stat-grid {
  gap: 14px;
}

.login-layout {
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
}

.login-intro-panel,
.login-form-panel,
.dashboard-panel,
.dashboard-compliance-panel,
.dashboard-focus-panel {
  padding: 24px;
}

#page-login {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at top left, rgba(232, 93, 4, 0.08), transparent 26%),
    radial-gradient(circle at bottom right, rgba(148, 163, 184, 0.08), transparent 30%),
    linear-gradient(180deg, #f8fafc 0%, #eef4fb 100%);
}

#page-login::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(148, 163, 184, 0.25) 1px, transparent 1px);
  background-size: 42px 42px;
  opacity: 0.5;
  pointer-events: none;
}

#page-login .content-shell {
  position: relative;
  z-index: 1;
}

#page-login .login-layout {
  max-width: 1160px;
  margin: 0 auto;
  align-items: stretch;
}

#page-login .login-intro-panel {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 250, 252, 0.98) 100%);
  color: var(--text);
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.08);
}

#page-login .login-intro-panel::before {
  content: '';
  position: absolute;
  inset: -24% -16%;
  background:
    radial-gradient(circle at top right, rgba(232, 93, 4, 0.16), transparent 28%),
    radial-gradient(circle at bottom left, rgba(15, 23, 42, 0.05), transparent 24%);
  pointer-events: none;
}

#page-login .login-intro-panel > * {
  position: relative;
  z-index: 1;
}

#page-login .login-brand-icon {
  background: linear-gradient(45deg, #9f3d00, #c74e00);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 16px 30px rgba(159, 61, 0, 0.28);
}

#page-login .login-brand-title {
  color: var(--text);
  font-size: 26px;
}

#page-login .login-brand-sub {
  color: var(--muted);
  font-size: 12px;
}

#page-login .login-summary-card .section-head h2 {
  color: var(--text);
  font-size: 15px;
}

#page-login .login-summary-card .section-head p {
  color: var(--muted);
}

#page-login .login-summary-card .field span {
  color: var(--muted);
}

#page-login .login-summary-card .input {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(226, 232, 240, 0.95);
  color: var(--text);
}

#page-login .login-summary-card .input::placeholder {
  color: rgba(148, 163, 184, 0.8);
}

#page-login .login-summary-card .input:focus {
  background: #fff;
  box-shadow: 0 0 0 4px rgba(232, 93, 4, 0.12), inset 0 0 0 1px rgba(247, 148, 30, 0.16);
}

#page-login .login-summary-card .message-box {
  background: rgba(248, 250, 252, 0.96);
  border-color: rgba(226, 232, 240, 0.95);
  color: var(--muted);
}

#page-login .login-form-panel {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(18px);
}

#page-login .login-form-panel .login-card-head {
  border-bottom-color: rgba(148, 163, 184, 0.18);
}

#page-login .login-form-panel h2 {
  font-size: 19px;
  color: var(--text);
}

#page-login .login-form-panel .form-hint {
  background: rgba(248, 250, 252, 0.92);
  border-color: rgba(226, 232, 240, 0.95);
}

#page-login .login-form-panel .btn-primary {
  background: linear-gradient(45deg, #9f3d00, #c74e00);
  box-shadow: 0 16px 32px rgba(159, 61, 0, 0.22);
}

#page-login .login-form-panel .btn-primary:hover {
  box-shadow: 0 20px 36px rgba(159, 61, 0, 0.28);
}

.field span,
.dashboard-summary-label,
.stat-label,
.dashboard-kicker,
.sidebar-nav-section {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.input,
select.input,
textarea.input {
  min-height: 46px;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: var(--surface-container-lowest);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
  color: var(--text);
}

.input:focus,
select.input:focus,
textarea.input:focus {
  border-color: transparent;
  box-shadow: 0 0 0 4px var(--focus-ring), inset 0 0 0 1px rgba(159, 61, 0, 0.22);
  background: #fff;
}

.btn {
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.04);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.12), var(--shadow-soft);
}

.btn-primary {
  background: linear-gradient(45deg, var(--primary), var(--primary-soft));
  color: #fff;
  box-shadow: 0 14px 28px rgba(159, 61, 0, 0.25);
}

.btn-primary:hover {
  box-shadow: 0 18px 36px rgba(159, 61, 0, 0.28);
}

.btn-sm,
.btn-sm-inline {
  min-height: 32px;
  padding: 0 10px;
  border-radius: 10px;
}

.message-box,
.form-hint,
.sidebar-card p,
.sidebar-user-meta {
  border-radius: 16px;
}

.message-box.ok,
.form-hint.ok,
.status-pill.ok,
.sidebar-user-meta.auth-status-authenticated {
  background: rgba(34, 197, 94, 0.12);
  color: #14532d;
}

.message-box.warn,
.form-hint.warn,
.status-pill.warn,
.sidebar-user-meta.auth-status-checking {
  background: rgba(245, 158, 11, 0.14);
  color: #92400e;
}

.message-box.err,
.form-hint.err,
.status-pill.err {
  background: rgba(239, 68, 68, 0.12);
  color: #991b1b;
}

.dashboard-primary-stat-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-card {
  padding: 20px;
  border-left: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.88) 0%, rgba(242,244,246,0.92) 100%);
}

.stat-card-tone-navy {
  background: linear-gradient(135deg, rgba(15, 91, 164, 0.14), rgba(255, 255, 255, 0.9));
}

.stat-card-tone-ok {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.12), rgba(255, 255, 255, 0.9));
}

.stat-card-tone-fail {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.12), rgba(255, 255, 255, 0.9));
}

.stat-card-tone-amber {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(255, 255, 255, 0.9));
}

.stat-value {
  font-family: 'Manrope', var(--sans);
  font-size: 30px;
  font-weight: 800;
}

.dashboard-focus-panel,
.dashboard-compliance-panel {
  overflow: hidden;
}

.dashboard-progress-track {
  overflow: hidden;
  height: 12px;
  border-radius: 999px;
  background: var(--surface-container);
}

.dashboard-progress-bar {
  border-radius: 999px;
  background: linear-gradient(45deg, var(--primary), var(--primary-soft));
}

.dashboard-summary-grid-gas {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-summary-box {
  border: 0;
  border-radius: 18px;
  background: var(--surface-container-lowest);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
}

.table-wrap {
  padding: 0;
  overflow: hidden;
}

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

thead th {
  background: var(--surface-container);
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

tbody tr:hover td,
.row-clickable:hover td {
  background: rgba(199, 78, 0, 0.04);
}

tbody tr.row-selected td {
  background: rgba(159, 61, 0, 0.08);
}

.status-pill,
.token-chip,
.nav-badge,
#auth-status-chip {
  border: 0;
  border-radius: 999px;
  box-shadow: none;
}

.modal-overlay {
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(10px);
}

.modal-box {
  max-width: 740px;
  border-radius: 28px;
}

@media (max-width: 1180px) {
  .app-frame {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .dashboard-primary-stat-grid,
  .dashboard-summary-grid-gas,
  .login-layout {
    grid-template-columns: 1fr;
  }

  .topbar,
  .content-shell {
    padding-left: 18px;
    padding-right: 18px;
  }
}

.topbar-page-title,
.dashboard-toolbar-copy h3,
.section-head h2,
.section-head h3,
.login-brand-title,
.login-card-head h2,
.dashboard-next-title,
.dashboard-focus-title,
.stat-label,
.dashboard-summary-label {
  color: #0f172a;
}

.topbar-page-sub,
.dashboard-toolbar-copy p,
.section-head p,
.login-brand-sub,
.form-hint,
.message-box,
.stat-note,
.dashboard-next-subtitle,
.dashboard-next-meta,
.dashboard-focus-meta,
.dashboard-focus-session-meta {
  color: #334155;
}

.btn-danger {
  background: #fee2e2;
  color: #991b1b;
  box-shadow: inset 0 0 0 1px #fecaca;
}

.btn-danger:hover {
  background: #fecaca;
  color: #7f1d1d;
  box-shadow: inset 0 0 0 1px #fca5a5;
}

.login-intro-panel,
.login-form-panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(247, 249, 251, 0.98) 100%);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.login-brand-icon {
  background: linear-gradient(180deg, #fff7ed 0%, #ffedd5 100%);
  border-color: #fdba74;
}

.login-summary-card,
.message-box,
.form-hint,
.dashboard-summary-box,
.dashboard-next-body,
.dashboard-focus-body {
  color: #0f172a;
}

.dashboard-page-toolbar,
.dashboard-page-shell,
.dashboard-panel,
.dashboard-compliance-panel,
.dashboard-focus-panel,
.stat-card,
.data-card,
.table-wrap {
  border: 1px solid rgba(15, 23, 42, 0.08);
}


