:root {
  --green-regimental: #2f3f2c;
  --ivory-parchment: #d8d2c3;
  --red-oxblood: #7c0f18;
  --taupe-stone: #6f6b60;
  --brown-walnut: #6f4426;
  --gold-brass: #c99a2b;
  --glass-surface: rgba(255, 252, 240, 0.58);
  --glass-surface-strong: rgba(255, 252, 240, 0.72);
  --glass-border: rgba(255, 255, 255, 0.28);
  --glass-shadow: 0 24px 70px rgba(44, 35, 24, 0.16);
  --hq-ink: #251f17;
  --hq-muted: #6f6b60;
  --hq-ivory-text: #f8f1df;
  --hq-radius-lg: 28px;
  --hq-radius-md: 18px;
}

body.hq-shell-ready {
  background:
    radial-gradient(circle at 12% 8%, rgba(201, 154, 43, 0.16), transparent 28rem),
    radial-gradient(circle at 82% 18%, rgba(124, 15, 24, 0.10), transparent 24rem),
    linear-gradient(135deg, #101914 0%, #16231c 42%, #0a100d 100%);
}

body.hq-shell-ready::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: .42;
  z-index: 0;
}

body.hq-shell-ready .app-shell,
body.hq-shell-ready .command-shell,
body.hq-shell-ready .qm-shell,
body.hq-shell-ready .battlefield-shell,
body.hq-shell-ready .mo-shell,
body.hq-shell-ready .login-shell,
body.hq-shell-ready .public-request-shell {
  position: relative;
  z-index: 1;
}

body.hq-shell-ready .command-shell,
body.hq-shell-ready .qm-shell,
body.hq-shell-ready .battlefield-shell,
body.hq-shell-ready .mo-shell {
  width: min(1500px, calc(100vw - 28px));
  margin: 0 auto;
}

body.hq-shell-ready .command-header,
body.hq-shell-ready .qm-header,
body.hq-shell-ready .battlefield-header,
body.hq-shell-ready .mo-header,
body.hq-shell-ready .topbar {
  border: 1px solid rgba(255,255,255,.22);
  border-radius: var(--hq-radius-lg);
  background: linear-gradient(135deg, rgba(255,252,240,.74), rgba(255,252,240,.52));
  color: var(--hq-ink);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(18px) saturate(130%);
}

body.hq-shell-ready .command-header h1,
body.hq-shell-ready .qm-header h1,
body.hq-shell-ready .battlefield-header h1,
body.hq-shell-ready .mo-header h1,
body.hq-shell-ready .topbar h2,
body.hq-shell-ready .panel-header h2,
body.hq-shell-ready .panel-header h3,
body.hq-shell-ready .view-header h2,
body.hq-shell-ready .view-header h3 {
  color: var(--green-regimental);
  font-family: Georgia, 'Times New Roman', serif;
  letter-spacing: .025em;
}

body.hq-shell-ready .command-header .eyebrow,
body.hq-shell-ready .qm-header .eyebrow,
body.hq-shell-ready .battlefield-header .eyebrow,
body.hq-shell-ready .mo-header .eyebrow,
body.hq-shell-ready .topbar .eyebrow,
body.hq-shell-ready .panel-header .eyebrow,
body.hq-shell-ready .view-header .eyebrow {
  color: var(--red-oxblood);
}

body.hq-shell-ready .session-line,
body.hq-shell-ready .small-copy,
body.hq-shell-ready .work-card p,
body.hq-shell-ready .metric-card p,
body.hq-shell-ready .hero-card p {
  color: var(--hq-muted);
}

body.hq-shell-ready .brand-mark,
body.hq-shell-ready .compact-mark {
  border-radius: 18px;
  border: 1px solid rgba(201, 154, 43, .52);
  color: var(--gold-brass);
  background: linear-gradient(145deg, rgba(47,63,44,.92), rgba(22,35,28,.92));
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 800;
}

body.hq-shell-ready .sidebar,
body.hq-shell-ready .access-card,
body.hq-shell-ready .work-card,
body.hq-shell-ready .metric-card,
body.hq-shell-ready .hero-card,
body.hq-shell-ready .qm-profile-card,
body.hq-shell-ready .bf-member-card,
body.hq-shell-ready .document-card,
body.hq-shell-ready .drawer-panel {
  border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--hq-radius-lg);
  background: linear-gradient(145deg, rgba(255,252,240,.70), rgba(255,252,240,.48));
  color: var(--hq-ink);
  box-shadow: 0 20px 58px rgba(44,35,24,.14);
  backdrop-filter: blur(16px) saturate(128%);
}

body.hq-shell-ready .sidebar {
  background: linear-gradient(180deg, rgba(47,63,44,.86), rgba(14,24,19,.88));
  color: var(--hq-ivory-text);
}
body.hq-shell-ready .sidebar .eyebrow,
body.hq-shell-ready .sidebar h1,
body.hq-shell-ready .sidebar strong { color: var(--hq-ivory-text); }
body.hq-shell-ready .sidebar .small-copy { color: rgba(248,241,223,.72); }

body.hq-shell-ready .nav-link,
body.hq-shell-ready .qm-tab,
body.hq-shell-ready .bf-tab,
body.hq-shell-ready .mo-tab,
body.hq-shell-ready .drawer-tab,
body.hq-shell-ready .qm-subtab {
  border-radius: 999px;
  border: 1px solid rgba(201,154,43,.24);
  background: rgba(255,255,255,.08);
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
}

body.hq-shell-ready .nav-link:hover,
body.hq-shell-ready .nav-link.active,
body.hq-shell-ready .nav-link.hq-current-program,
body.hq-shell-ready .qm-tab.active,
body.hq-shell-ready .bf-tab.active,
body.hq-shell-ready .mo-tab.active,
body.hq-shell-ready .drawer-tab.active,
body.hq-shell-ready .qm-subtab.active {
  border-color: rgba(201,154,43,.72);
  background: rgba(201,154,43,.14);
  transform: translateY(-1px);
}

body.hq-shell-ready .hr-summary-strip,
body.hq-shell-ready .qm-summary-strip,
body.hq-shell-ready .bf-summary-strip,
body.hq-shell-ready .status-pills,
body.hq-shell-ready .qm-order-board,
body.hq-shell-ready .dispatch-queue-grid {
  border-radius: var(--hq-radius-md);
}

body.hq-shell-ready .hr-summary-strip > div,
body.hq-shell-ready .qm-summary-strip > div,
body.hq-shell-ready .bf-summary-strip > div,
body.hq-shell-ready .metric-card,
body.hq-shell-ready .dispatch-mini-card {
  border-color: rgba(47,63,44,.14);
  background: rgba(255,255,255,.36);
  color: var(--hq-ink);
}

body.hq-shell-ready input,
body.hq-shell-ready select,
body.hq-shell-ready textarea {
  border-radius: 14px;
  border-color: rgba(47,63,44,.18);
  background: rgba(255,255,255,.52);
  color: var(--hq-ink);
}
body.hq-shell-ready input:focus,
body.hq-shell-ready select:focus,
body.hq-shell-ready textarea:focus {
  border-color: rgba(201,154,43,.74);
  box-shadow: 0 0 0 3px rgba(201,154,43,.14);
}

body.hq-shell-ready .primary-action,
body.hq-shell-ready .official-action {
  border-radius: 999px;
  background: var(--green-regimental);
  color: var(--hq-ivory-text);
  border-color: rgba(201,154,43,.45);
}
body.hq-shell-ready .secondary-action,
body.hq-shell-ready .quick-action,
body.hq-shell-ready .link-button {
  border-radius: 999px;
  background: rgba(255,255,255,.44);
  color: var(--green-regimental);
  border-color: rgba(47,63,44,.20);
}
body.hq-shell-ready .danger-action {
  border-radius: 999px;
  background: rgba(124,15,24,.12);
  color: var(--red-oxblood);
  border-color: rgba(124,15,24,.38);
}

body.hq-shell-ready table,
body.hq-shell-ready .record-table,
body.hq-shell-ready .member-table {
  border-collapse: separate;
  border-spacing: 0;
  color: var(--hq-ink);
}
body.hq-shell-ready th {
  color: var(--red-oxblood);
  background: rgba(255,255,255,.32);
}
body.hq-shell-ready td {
  border-color: rgba(47,63,44,.10);
}

body.hq-shell-ready dialog.modal-card {
  border-radius: 24px;
  border-color: rgba(255,255,255,.30);
  background: linear-gradient(145deg, rgba(255,252,240,.88), rgba(255,252,240,.74));
  color: var(--hq-ink);
  box-shadow: 0 30px 100px rgba(0,0,0,.36);
  backdrop-filter: blur(18px) saturate(130%);
}
body.hq-shell-ready dialog::backdrop { background: rgba(7,16,13,.56); backdrop-filter: blur(4px); }

.hq-status-chip,
.hq-seal-chip,
.hq-context-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid rgba(201,154,43,.42);
  border-radius: 999px;
  padding: 7px 11px;
  color: var(--green-regimental);
  background: rgba(255,255,255,.38);
  font-size: .72rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-weight: 800;
  text-decoration: none;
}
.hq-status-chip.good{border-color:rgba(55,110,74,.42);color:#25452c;background:rgba(55,110,74,.10)}
.hq-status-chip.warn{border-color:rgba(201,154,43,.50);color:#6d4f12;background:rgba(201,154,43,.12)}
.hq-status-chip.alert{border-color:rgba(124,15,24,.44);color:var(--red-oxblood);background:rgba(124,15,24,.10)}
.hq-seal-chip{border-radius:18px;font-family:Georgia,'Times New Roman',serif;color:var(--red-oxblood)}

body.hq-integrated-shell .hq-command-rail,
body.hq-integrated-shell .hq-top-command-bar,
body.hq-integrated-shell .hq-dispatch-drawer {
  display: none !important;
}

@media (max-width: 760px) {
  body.hq-shell-ready .command-shell,
  body.hq-shell-ready .qm-shell,
  body.hq-shell-ready .battlefield-shell,
  body.hq-shell-ready .mo-shell {
    width: min(100vw - 16px, 1500px);
  }
}
