:root {
  --radius: var(--radius-4);
  --radius-md: var(--radius-3);
  --radius-sm: var(--radius-2);

  --background: 223 34% 10%;
  --foreground: 210 35% 96%;
  --card: 221 35% 15%;
  --card-foreground: 210 35% 96%;
  --primary: 192 96% 58%;
  --primary-foreground: 223 32% 8%;
  --secondary: 220 22% 22%;
  --secondary-foreground: 210 32% 92%;
  --muted: 219 20% 24%;
  --muted-foreground: 214 16% 67%;
  --accent: 203 76% 55%;
  --accent-foreground: 218 34% 95%;
  --destructive: 352 81% 58%;
  --destructive-foreground: 0 0% 98%;
  --border: 218 22% 27%;
  --input: 218 20% 30%;
  --ring: 192 96% 58%;
  --theme-flow-speed: 7s;
  --theme-flow-glow: 0.7;
  --theme-camo-a: 220 24% 21%;
  --theme-camo-b: 217 24% 28%;
  --theme-image-pos-x: 26vw;
  --theme-image-pos-y: 4rem;
  --theme-image-scale: 1;
  --theme-image-opacity: 0.06;
  --theme-image-blur: 0px;
  --theme-image-rotate: 0deg;
}

/* ALP Cinematic UI Revamp */
.alp-cinematic {
  --alp-red: 356 88% 61%;
  --alp-cyan: 190 95% 66%;
  --alp-amber: 39 94% 62%;
  --alp-green: 151 76% 55%;
  --alp-surface: rgba(5, 11, 22, 0.86);
  --alp-surface-strong: rgba(8, 16, 31, 0.96);
  --alp-border: rgba(125, 211, 252, 0.22);
  position: relative;
}

.alp-cinematic::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(125, 211, 252, 0.03), transparent 30%),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.018), rgba(255,255,255,0.018) 1px, transparent 1px, transparent 6px);
  z-index: 0;
}

.alp-cinematic > * {
  position: relative;
  z-index: 1;
}

.alp-cinematic-header,
.alp-queue-lane,
.alp-dossier-panel,
.alp-action-console,
.alp-admin-editor,
.alp-intake-preview,
.alp-record-row {
  border: 1px solid var(--alp-border);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(14, 25, 45, 0.96), rgba(5, 10, 18, 0.94)),
    radial-gradient(circle at top right, rgba(125, 211, 252, 0.12), transparent 32%);
  box-shadow: 0 24px 80px rgba(2, 6, 23, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.alp-cinematic-header {
  display: grid;
  gap: 1.25rem;
  padding: clamp(1rem, 2vw, 1.5rem);
  overflow: hidden;
}

.alp-header-title-row,
.alp-header-actions,
.alp-header-metrics,
.alp-lane-header,
.alp-queue-card-top,
.alp-queue-card-meta,
.alp-timeline-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.alp-header-title-row h1,
.alp-action-console-header h2,
.alp-lane-header h2 {
  margin: 0;
  color: rgb(207 250 254);
  font-weight: 900;
  letter-spacing: 0;
}

.alp-header-copy p,
.alp-action-console-header p,
.alp-metric-hint,
.alp-dossier-meta,
.alp-queue-card-meta,
.alp-timeline-actor,
.alp-timeline-body p {
  color: hsl(var(--muted-foreground));
}

.alp-header-actions {
  justify-content: flex-start;
}

.alp-header-metrics {
  align-items: stretch;
}

.alp-metric-tile {
  min-width: min(100%, 11rem);
  flex: 1 1 10rem;
  border: 1px solid rgba(125, 211, 252, 0.18);
  border-radius: var(--radius-sm);
  padding: 1rem;
  background: rgba(2, 6, 23, 0.38);
}

.alp-metric-kicker,
.alp-lane-kicker,
.alp-dossier-kicker {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: rgb(165 243 252);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.alp-metric-value {
  margin-top: 0.45rem;
  color: rgb(236 254 255);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 950;
  letter-spacing: 0;
}

.alp-queue-lane {
  padding: 1rem;
}

.alp-lane-header {
  justify-content: space-between;
  margin-bottom: 0.9rem;
}

.alp-lane-stack,
.alp-action-console-stack,
.alp-dossier-stack,
.alp-admin-editor-stack {
  display: grid;
  gap: 0.75rem;
}

.alp-queue-card,
.alp-empty-state,
.alp-action-block,
.alp-timeline-entry,
.alp-admin-row,
.alp-preset-chip {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: var(--radius-sm);
  background: rgba(2, 6, 23, 0.34);
}

.alp-queue-card {
  display: block;
  padding: 0.85rem;
  transition: border-color 180ms ease, transform 180ms ease, background 180ms ease;
}

.alp-queue-card:hover {
  border-color: rgba(125, 211, 252, 0.52);
  transform: translateY(-1px);
}

.alp-queue-card-top {
  justify-content: space-between;
  color: rgb(207 250 254);
}

.alp-queue-card-meta {
  margin-top: 0.5rem;
  font-size: 0.75rem;
}

.alp-queue-card-action {
  margin-top: 0.7rem;
  color: rgb(254 240 138);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.alp-dossier-panel {
  padding: 1rem;
}

.alp-dossier-panel h3 {
  margin: 0.45rem 0 0;
  color: rgb(207 250 254);
  font-weight: 850;
}

.alp-dossier-meta {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.65rem;
  font-size: 0.85rem;
}

.alp-action-console {
  padding: 1rem;
}

.alp-action-block-toggle {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.8rem;
  color: rgb(207 250 254);
  font-weight: 800;
  text-align: left;
}

.alp-action-block-body {
  padding: 0 0.8rem 0.8rem;
}

.alp-timeline-entry {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.75rem;
  padding: 0.8rem;
}

.alp-timeline-node {
  width: 0.7rem;
  height: 0.7rem;
  margin-top: 0.3rem;
  border-radius: 999px;
  background: rgb(125 211 252);
  box-shadow: 0 0 20px rgba(125, 211, 252, 0.65);
}

.alp-admin-row,
.alp-preset-chip {
  padding: 0.75rem;
}

.alp-preset-chip {
  color: rgb(207 250 254);
  transition: border-color 180ms ease, background 180ms ease;
}

.alp-preset-chip:hover {
  border-color: rgba(248, 113, 113, 0.5);
  background: rgba(127, 29, 29, 0.18);
}

.alp-admin-editor {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
}

.alp-admin-editor-header,
.alp-wizard-footer,
.alp-preset-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.alp-admin-editor-header {
  justify-content: space-between;
}

.alp-admin-row {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
}

.alp-admin-row label {
  display: grid;
  gap: 0.35rem;
  color: hsl(var(--muted-foreground));
  font-size: 0.78rem;
}

.alp-admin-row input {
  min-width: 0;
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-sm);
  background: rgba(2, 6, 23, 0.42);
  color: hsl(var(--foreground));
  padding: 0.55rem 0.65rem;
}

.alp-advanced-json {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
}

.alp-advanced-json summary {
  color: rgb(165 243 252);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.alp-tone-red {
  --alp-border: rgba(248, 113, 113, 0.32);
}

.alp-tone-amber {
  --alp-border: rgba(251, 191, 36, 0.32);
}

.alp-tone-green {
  --alp-border: rgba(52, 211, 153, 0.32);
}

@media (min-width: 1280px) {
  .alp-action-console,
  .alp-intake-preview {
    position: sticky;
    top: 1.5rem;
  }
}

@media (max-width: 767px) {
  .alp-header-actions,
  .alp-header-metrics,
  .alp-queue-card-meta {
    align-items: stretch;
    flex-direction: column;
  }
}

:root[data-theme="senate"] {
  --background: 223 34% 10%;
  --foreground: 210 35% 96%;
  --card: 221 35% 15%;
  --card-foreground: 210 35% 96%;
  --primary: 192 96% 58%;
  --primary-foreground: 223 32% 8%;
  --secondary: 220 22% 22%;
  --secondary-foreground: 210 32% 92%;
  --muted: 219 20% 24%;
  --muted-foreground: 214 16% 67%;
  --accent: 203 76% 55%;
  --accent-foreground: 218 34% 95%;
  --destructive: 352 81% 58%;
  --destructive-foreground: 0 0% 98%;
  --border: 218 22% 27%;
  --input: 218 20% 30%;
  --ring: 192 96% 58%;
}

:root[data-theme="senate-deluxe"] {
  --background: 34 12% 2%;
  --foreground: 42 88% 83%;
  --card: 38 18% 5%;
  --card-foreground: 43 100% 89%;
  --primary: 41 84% 67%;
  --primary-foreground: 34 56% 7%;
  --secondary: 37 25% 9%;
  --secondary-foreground: 42 81% 78%;
  --muted: 39 19% 12%;
  --muted-foreground: 41 30% 58%;
  --accent: 45 100% 73%;
  --accent-foreground: 34 58% 8%;
  --destructive: 12 68% 56%;
  --destructive-foreground: 0 0% 98%;
  --border: 40 57% 33%;
  --input: 38 36% 16%;
  --ring: 43 92% 70%;
  --theme-camo-a: 41 70% 22%;
  --theme-camo-b: 33 54% 12%;
  --theme-flow-speed: 4.8s;
  --theme-flow-glow: 1.55;
  --theme-image-pos-x: 18vw;
  --theme-image-pos-y: 1.5rem;
  --theme-image-scale: 1.16;
  --theme-image-opacity: 0.12;
  --theme-image-rotate: -4deg;
}

:root[data-theme="501st"] {
  --background: 226 90% 4%;
  --foreground: 220 100% 98%;
  --card: 226 81% 12%;
  --card-foreground: 220 100% 98%;
  --primary: 226 100% 53%;
  --primary-foreground: 0 0% 100%;
  --secondary: 225 88% 22%;
  --secondary-foreground: 224 100% 95%;
  --muted: 224 80% 26%;
  --muted-foreground: 223 100% 82%;
  --accent: 220 100% 98%;
  --accent-foreground: 226 81% 12%;
  --destructive: 351 72% 58%;
  --destructive-foreground: 0 0% 98%;
  --border: 229 100% 60%;
  --input: 224 75% 36%;
  --ring: 228 100% 71%;
  --theme-camo-a: 223 86% 24%;
  --theme-camo-b: 220 100% 98%;
  --theme-flow-speed: 5.1s;
  --theme-flow-glow: 1.58;
}

:root[data-theme="sith"] {
  --background: 348 82% 5%;
  --foreground: 352 100% 95%;
  --card: 345 74% 8%;
  --card-foreground: 352 100% 95%;
  --primary: 349 100% 59%;
  --primary-foreground: 350 100% 98%;
  --secondary: 348 74% 12%;
  --secondary-foreground: 349 100% 90%;
  --muted: 347 64% 16%;
  --muted-foreground: 347 30% 70%;
  --accent: 352 100% 65%;
  --accent-foreground: 350 100% 98%;
  --destructive: 6 93% 57%;
  --destructive-foreground: 0 0% 98%;
  --border: 347 72% 28%;
  --input: 349 68% 19%;
  --ring: 352 100% 66%;
  --theme-camo-a: 350 82% 25%;
  --theme-camo-b: 326 70% 20%;
  --theme-flow-speed: 5.9s;
  --theme-flow-glow: 1.36;
}

:root[data-theme="purge"] {
  --background: 280 100% 4%;
  --foreground: 281 100% 96%;
  --card: 281 84% 7%;
  --card-foreground: 281 100% 96%;
  --primary: 276 100% 68%;
  --primary-foreground: 281 100% 5%;
  --secondary: 282 78% 12%;
  --secondary-foreground: 282 100% 92%;
  --muted: 281 62% 16%;
  --muted-foreground: 282 41% 74%;
  --accent: 296 100% 64%;
  --accent-foreground: 286 100% 6%;
  --destructive: 344 100% 61%;
  --destructive-foreground: 0 0% 100%;
  --border: 263 100% 62%;
  --input: 277 58% 26%;
  --ring: 289 100% 72%;
  --theme-camo-a: 276 74% 30%;
  --theme-camo-b: 296 70% 34%;
  --theme-flow-speed: 4.7s;
  --theme-flow-glow: 1.72;
  --theme-image-opacity: 0.12;
  --theme-image-scale: 1.08;
}

:root[data-theme="41st"] {
  --background: 142 58% 5%;
  --foreground: 138 42% 94%;
  --card: 143 50% 10%;
  --card-foreground: 138 42% 94%;
  --primary: 142 72% 51%;
  --primary-foreground: 140 57% 7%;
  --secondary: 143 42% 15%;
  --secondary-foreground: 140 34% 91%;
  --muted: 143 38% 18%;
  --muted-foreground: 137 18% 67%;
  --accent: 82 62% 52%;
  --accent-foreground: 139 42% 95%;
  --destructive: 10 80% 56%;
  --destructive-foreground: 0 0% 98%;
  --border: 135 34% 35%;
  --input: 144 32% 27%;
  --ring: 138 78% 60%;
  --theme-camo-a: 139 42% 25%;
  --theme-camo-b: 83 44% 28%;
  --theme-flow-speed: 7.4s;
  --theme-flow-glow: 1.02;
}

:root[data-theme="stormtrooper"] {
  --background: 215 27% 96%;
  --foreground: 221 31% 9%;
  --card: 0 0% 100%;
  --card-foreground: 221 31% 9%;
  --primary: 218 44% 22%;
  --primary-foreground: 0 0% 100%;
  --secondary: 216 20% 91%;
  --secondary-foreground: 221 31% 12%;
  --muted: 214 23% 87%;
  --muted-foreground: 218 20% 31%;
  --accent: 211 45% 30%;
  --accent-foreground: 0 0% 100%;
  --destructive: 0 72% 46%;
  --destructive-foreground: 0 0% 100%;
  --border: 216 21% 66%;
  --input: 216 18% 77%;
  --ring: 221 29% 15%;
  --theme-flow-speed: 8.4s;
  --theme-flow-glow: 0.8;
}

:root[data-theme="212th"] {
  --background: 20 64% 5%;
  --foreground: 36 100% 94%;
  --card: 21 71% 10%;
  --card-foreground: 36 100% 94%;
  --primary: 22 90% 52%;
  --primary-foreground: 20 100% 4%;
  --secondary: 24 74% 14%;
  --secondary-foreground: 33 100% 87%;
  --muted: 24 72% 19%;
  --muted-foreground: 27 55% 72%;
  --accent: 36 100% 94%;
  --accent-foreground: 21 71% 10%;
  --destructive: 9 81% 54%;
  --destructive-foreground: 0 0% 100%;
  --border: 23 80% 43%;
  --input: 24 80% 25%;
  --ring: 24 100% 58%;
  --theme-camo-a: 20 78% 29%;
  --theme-camo-b: 36 100% 94%;
  --theme-flow-speed: 5.4s;
  --theme-flow-glow: 1.48;
}

:root[data-theme="naval"] {
  --background: 224 71% 4%;
  --foreground: 225 17% 88%;
  --card: 220 63% 7%;
  --card-foreground: 225 24% 91%;
  --primary: 220 28% 88%;
  --primary-foreground: 224 71% 4%;
  --secondary: 219 50% 10%;
  --secondary-foreground: 224 18% 79%;
  --muted: 218 45% 13%;
  --muted-foreground: 221 11% 54%;
  --accent: 39 46% 52%;
  --accent-foreground: 38 50% 3%;
  --destructive: 358 64% 61%;
  --destructive-foreground: 0 0% 100%;
  --border: 222 20% 29%;
  --input: 218 31% 18%;
  --ring: 39 54% 53%;
  --theme-camo-a: 221 38% 15%;
  --theme-camo-b: 38 46% 25%;
  --theme-flow-speed: 7.2s;
  --theme-flow-glow: 0.92;
}

:root[data-theme="dt"] {
  --background: 126 43% 4%;
  --foreground: 132 100% 92%;
  --card: 128 47% 7%;
  --card-foreground: 132 100% 92%;
  --primary: 129 100% 57%;
  --primary-foreground: 126 56% 8%;
  --secondary: 126 45% 11%;
  --secondary-foreground: 130 82% 88%;
  --muted: 128 43% 13%;
  --muted-foreground: 132 42% 67%;
  --accent: 135 100% 64%;
  --accent-foreground: 128 73% 8%;
  --destructive: 6 82% 54%;
  --destructive-foreground: 0 0% 100%;
  --border: 130 100% 43%;
  --input: 128 42% 22%;
  --ring: 136 100% 70%;
  --theme-flow-speed: 5.7s;
  --theme-flow-glow: 1.25;
}

:root[data-theme="commandos"] {
  --background: 220 22% 3%;
  --foreground: 210 18% 94%;
  --card: 220 21% 7%;
  --card-foreground: 210 18% 94%;
  --primary: 212 18% 87%;
  --primary-foreground: 220 22% 3%;
  --secondary: 218 26% 11%;
  --secondary-foreground: 210 16% 86%;
  --muted: 216 22% 16%;
  --muted-foreground: 214 11% 66%;
  --accent: 4 65% 51%;
  --accent-foreground: 8 100% 98%;
  --destructive: 4 84% 62%;
  --destructive-foreground: 0 0% 100%;
  --border: 215 13% 39%;
  --input: 215 20% 18%;
  --ring: 4 100% 65%;
  --theme-camo-a: 215 22% 16%;
  --theme-camo-b: 4 58% 33%;
  --theme-flow-speed: 6.8s;
  --theme-flow-glow: 1.22;
  --theme-image-opacity: 0.12;
  --theme-image-scale: 1.06;
}

:root[data-theme="stormtrooper"] .text-cyan-100,
:root[data-theme="stormtrooper"] .text-cyan-200,
:root[data-theme="stormtrooper"] .text-cyan-300,
:root[data-theme="stormtrooper"] .text-cyan-400 {
  color: hsl(216 20% 18%) !important;
}

/* Layout decision: ambient layered background for depth without reducing text contrast. */
.panel-shell {
  position: relative;
  font-family: "Space Grotesk", "Inter", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 18% 24%, hsl(var(--theme-camo-a) / 0.28) 0, transparent 36%),
    radial-gradient(circle at 76% 68%, hsl(var(--theme-camo-b) / 0.28) 0, transparent 39%),
    radial-gradient(circle at 10% 5%, color-mix(in oklab, var(--cyan-5), transparent 80%) 0, transparent 38%),
    radial-gradient(circle at 90% 95%, color-mix(in oklab, var(--red-5), transparent 83%) 0, transparent 34%),
    linear-gradient(var(--theme-gradient-angle, 165deg), hsl(var(--theme-gradient-start, var(--background))), hsl(var(--theme-gradient-end, var(--background))));
}

.panel-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: var(--theme-regiment-image);
  background-repeat: no-repeat;
  background-position: calc(50% + var(--theme-image-pos-x, 26vw)) calc(0% + var(--theme-image-pos-y, 4rem));
  background-size: calc(min(40vw, 560px) * var(--theme-image-scale, 1));
  opacity: var(--theme-image-opacity, var(--theme-watermark-opacity, 0.06));
  mix-blend-mode: screen;
  filter: blur(var(--theme-image-blur, 0px));
  transform: rotate(var(--theme-image-rotate, 0deg));
}

.panel-shell > * {
  position: relative;
  z-index: 1;
}

:root[data-theme="commandos"] .panel-shell::before {
  opacity: 0.1;
  mix-blend-mode: screen;
  filter: blur(0.5px) saturate(1.08);
}

.panel-sidebar {
  border: 1px solid color-mix(in oklab, hsl(var(--border)) 65%, transparent);
  background:
    linear-gradient(178deg, hsl(var(--card) / 0.98), hsl(var(--card) / 0.9)),
    radial-gradient(circle at 12% 8%, hsl(var(--accent) / 0.16), transparent 42%);
  backdrop-filter: blur(14px);
}

.panel-surface {
  position: relative;
  overflow: hidden;
  border: 1px solid color-mix(in oklab, hsl(var(--border)) 50%, transparent);
  background: hsl(var(--card) / 0.78);
  box-shadow: var(--shadow-3);
  backdrop-filter: blur(12px);
}

.panel-surface,
.panel-sidebar,
.command-row,
.discord-voice-row,
.discord-message,
.discord-application-card,
.command-select-menu {
  position: relative;
  overflow: hidden;
}

.panel-surface::before,
.panel-sidebar::before,
.command-row::before,
.discord-voice-row::before,
.discord-message::before,
.discord-application-card::before,
.command-select-menu::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  pointer-events: none;
  background:
    conic-gradient(from 0deg,
      transparent 0deg 26deg,
      hsl(var(--ring) / 0.95) 27deg 36deg,
      transparent 48deg 130deg,
      hsl(var(--accent) / 0.9) 131deg 164deg,
      transparent 177deg 290deg,
      hsl(var(--primary) / 0.94) 291deg 314deg,
      transparent 328deg 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.5;
  filter: drop-shadow(0 0 calc(8px * var(--theme-flow-glow)) hsl(var(--ring) / 0.65));
  animation: flow-border-spin var(--theme-flow-speed, 7s) linear infinite;
}

@keyframes flow-border-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.panel-surface::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: var(--theme-regiment-image);
  background-repeat: no-repeat;
  background-position: calc(50% + (var(--theme-image-pos-x, 26vw) * 0.5)) calc(30% + (var(--theme-image-pos-y, 4rem) * 0.35));
  background-size: calc(320px * var(--theme-image-scale, 1));
  opacity: calc(var(--theme-image-opacity, 0.08) * 0.7);
  filter: blur(calc(var(--theme-image-blur, 0px) * 0.8));
}

.panel-nav-item {
  display: flex;
  align-items: center;
  gap: var(--size-2);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: var(--size-2) var(--size-3);
  color: hsl(var(--foreground));
  text-decoration: none;
  transition: 220ms ease-out;
}

.panel-nav-item svg {
  width: 1rem;
  height: 1rem;
  flex: 0 0 1rem;
}

.panel-nav-item:hover {
  border-color: color-mix(in oklab, hsl(var(--accent)) 30%, transparent);
  background: hsl(var(--muted) / 0.55);
  color: hsl(var(--accent-foreground));
  transform: translateX(2px);
  box-shadow: var(--shadow-1);
}

.panel-nav-item.is-active {
  border-color: color-mix(in oklab, hsl(var(--accent)) 72%, hsl(var(--destructive)) 8%);
  background: linear-gradient(92deg, hsl(var(--accent) / 0.28), hsl(var(--accent) / 0.15));
  box-shadow: var(--shadow-3);
  color: #f5fbff;
}

:root[data-theme="dt"] .panel-nav-item:hover,
:root[data-theme="dt"] .panel-nav-item.is-active {
  border-color: hsl(128 100% 56% / 0.92);
  box-shadow: 0 0 16px hsl(128 100% 56% / 0.36), 0 0 24px hsl(128 100% 56% / 0.22);
}

:root[data-theme="dt"] .command-btn,
:root[data-theme="dt"] .discord-control-btn,
:root[data-theme="dt"] .discord-send-btn {
  border-color: hsl(128 100% 56% / 0.55) !important;
  box-shadow: 0 0 10px hsl(128 100% 56% / 0.28);
}

:root[data-theme="purge"] .panel-nav-item:hover,
:root[data-theme="purge"] .panel-nav-item.is-active,
:root[data-theme="purge"] .command-btn:hover,
:root[data-theme="purge"] .discord-control-btn:hover {
  border-color: hsl(276 100% 68% / 0.86) !important;
  background: linear-gradient(100deg, hsl(276 100% 68% / 0.22), hsl(296 100% 64% / 0.12)) !important;
  box-shadow: 0 0 18px hsl(276 100% 68% / 0.32), 0 0 26px hsl(296 100% 64% / 0.18);
}

:root[data-theme="212th"] .panel-nav-item:hover,
:root[data-theme="212th"] .panel-nav-item.is-active,
:root[data-theme="212th"] .command-btn:hover,
:root[data-theme="212th"] .discord-control-btn:hover {
  border-color: hsl(22 90% 52% / 0.86) !important;
  background: linear-gradient(100deg, hsl(22 90% 52% / 0.22), hsl(36 100% 94% / 0.12)) !important;
  box-shadow: 0 0 18px hsl(22 90% 52% / 0.32), 0 0 26px hsl(36 100% 94% / 0.14);
}

:root[data-theme="501st"] .panel-nav-item:hover,
:root[data-theme="501st"] .panel-nav-item.is-active,
:root[data-theme="501st"] .command-btn:hover,
:root[data-theme="501st"] .discord-control-btn:hover {
  border-color: hsl(226 100% 53% / 0.9) !important;
  background: linear-gradient(100deg, hsl(226 100% 53% / 0.26), hsl(220 100% 98% / 0.13)) !important;
  box-shadow: 0 0 20px hsl(226 100% 53% / 0.42), 0 0 28px hsl(220 100% 98% / 0.18);
}

:root[data-theme="naval"] .panel-nav-item:hover,
:root[data-theme="naval"] .panel-nav-item.is-active,
:root[data-theme="naval"] .command-btn:hover,
:root[data-theme="naval"] .discord-control-btn:hover {
  border-color: hsl(39 46% 52% / 0.78) !important;
  background: linear-gradient(100deg, hsl(220 28% 88% / 0.1), hsl(39 46% 52% / 0.13)) !important;
  box-shadow: 0 0 16px hsl(39 46% 52% / 0.2), 0 0 28px hsl(220 28% 88% / 0.1);
}

:root[data-theme="commandos"] .panel-nav-item:hover,
:root[data-theme="commandos"] .panel-nav-item.is-active,
:root[data-theme="commandos"] .command-btn:hover,
:root[data-theme="commandos"] .discord-control-btn:hover {
  border-color: hsl(4 65% 51% / 0.78) !important;
  background: linear-gradient(100deg, hsl(212 18% 87% / 0.12), hsl(4 65% 51% / 0.12)) !important;
  box-shadow: 0 0 16px hsl(4 65% 51% / 0.24), 0 0 24px hsl(212 18% 87% / 0.1);
}

:root[data-theme="senate-deluxe"] .panel-shell::before {
  opacity: max(var(--theme-image-opacity, 0.12), 0.12);
  filter: blur(1px) saturate(1.1);
}

:root[data-theme="senate-deluxe"] .panel-shell::after {
  opacity: 0.18;
  filter: blur(12px);
}

:root[data-theme="senate-deluxe"] .panel-nav-item:hover,
:root[data-theme="senate-deluxe"] .panel-nav-item.is-active,
:root[data-theme="senate-deluxe"] .command-btn:hover,
:root[data-theme="senate-deluxe"] .discord-control-btn:hover,
:root[data-theme="senate-deluxe"] .discord-send-btn:hover {
  border-color: hsl(var(--primary) / 0.88) !important;
  background: linear-gradient(135deg, hsl(var(--primary) / 0.16), hsl(var(--background) / 0.72));
  box-shadow: 0 0 18px hsl(var(--primary) / 0.18);
}

:root[data-theme="senate-deluxe"] .panel-surface,
:root[data-theme="senate-deluxe"] .liquid-panel,
:root[data-theme="senate-deluxe"] .command-center-card,
:root[data-theme="senate-deluxe"] .stats-surface {
  border-color: hsl(var(--border) / 0.88);
  box-shadow:
    0 0 0 1px hsl(var(--border) / 0.16),
    0 34px 100px -50px hsl(35 82% 6% / 0.98),
    0 0 28px hsl(var(--primary) / 0.08);
}

:root[data-theme="senate-deluxe"] .text-cyan-100,
:root[data-theme="senate-deluxe"] .text-cyan-200,
:root[data-theme="senate-deluxe"] .text-cyan-300,
:root[data-theme="senate-deluxe"] .text-cyan-400 {
  color: hsl(var(--foreground)) !important;
  text-shadow: 0 0 18px hsl(var(--primary) / 0.16);
}

.panel-theme-picker-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
}

.panel-theme-chip {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  min-height: 3.15rem;
  border: 1px solid hsl(var(--border) / 0.72);
  border-radius: 0.95rem;
  background: linear-gradient(145deg, hsl(var(--card) / 0.86), hsl(var(--background) / 0.62));
  padding: 0.7rem 0.8rem;
  text-align: left;
  color: hsl(var(--foreground));
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.panel-theme-chip:hover {
  transform: translateY(-1px);
  border-color: hsl(var(--primary) / 0.8);
  box-shadow: 0 0 20px hsl(var(--primary) / 0.12);
}

.panel-theme-chip.is-active {
  border-color: hsl(var(--primary) / 0.95);
  box-shadow: 0 0 0 1px hsl(var(--primary) / 0.18), 0 0 24px hsl(var(--primary) / 0.16);
}

.panel-theme-chip.is-locked {
  opacity: 0.82;
}

.panel-theme-chip[aria-disabled="true"] {
  cursor: not-allowed;
}

.panel-theme-chip-swatch {
  position: relative;
  width: 2.6rem;
  height: 2.6rem;
  flex: 0 0 2.6rem;
  border-radius: 0.85rem;
  border: 1px solid hsl(var(--border) / 0.8);
  box-shadow: inset 0 0 0 1px hsl(255 255 255 / 0.04), 0 0 16px rgb(0 0 0 / 0.24);
  overflow: hidden;
}

.panel-theme-chip-swatch::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 24% 28%, rgb(255 255 255 / 0.18) 0, transparent 36%),
    linear-gradient(150deg, var(--swatch-a), var(--swatch-b));
}

.panel-theme-chip-swatch[data-theme-swatch="senate"] { --swatch-a: #0d1428; --swatch-b: #2ad7ff; }
.panel-theme-chip-swatch[data-theme-swatch="senate-deluxe"] { --swatch-a: #040404; --swatch-b: #f2c969; }
.panel-theme-chip-swatch[data-theme-swatch="501st"] { --swatch-a: #01040f; --swatch-b: #0f4cff; --swatch-c: #f6f8ff; }
.panel-theme-chip-swatch[data-theme-swatch="sith"] { --swatch-a: #100206; --swatch-b: #ff3755; }
.panel-theme-chip-swatch[data-theme-swatch="purge"] { --swatch-a: #07000c; --swatch-b: #b85cff; }
.panel-theme-chip-swatch[data-theme-swatch="41st"] { --swatch-a: #08130c; --swatch-b: #22cc60; }
.panel-theme-chip-swatch[data-theme-swatch="stormtrooper"] { --swatch-a: #eef2f7; --swatch-b: #1d2f4b; }
.panel-theme-chip-swatch[data-theme-swatch="212th"] { --swatch-a: #170b05; --swatch-b: #f36b16; --swatch-c: #fff3df; }
.panel-theme-chip-swatch[data-theme-swatch="naval"] { --swatch-a: #020611; --swatch-b: #d8dce7; --swatch-c: #b68a3a; }
.panel-theme-chip-swatch[data-theme-swatch="dt"] { --swatch-a: #020602; --swatch-b: #2dff6e; }
.panel-theme-chip-swatch[data-theme-swatch="commandos"] { --swatch-a: #050609; --swatch-b: #d6dde6; --swatch-c: #d43f31; }

.panel-theme-chip-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 0.16rem;
}

.panel-theme-chip-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.panel-theme-chip-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  border: 1px solid hsl(var(--border) / 0.8);
  background: linear-gradient(135deg, hsl(var(--accent) / 0.22), hsl(var(--background) / 0.55));
  padding: 0.15rem 0.42rem;
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: hsl(var(--foreground));
}

.panel-theme-chip-lock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: hsl(var(--accent));
  opacity: 0.94;
}

.panel-theme-picker-note {
  font-size: 0.62rem;
  line-height: 1.45;
  color: hsl(var(--muted-foreground));
}

.panel-nav-item-accent:hover,
.panel-nav-item-accent.is-active {
  border-color: color-mix(in oklab, hsl(var(--destructive)) 70%, hsl(var(--accent)) 12%);
  background: hsl(var(--destructive) / 0.12);
}

.panel-sub-item {
  font-size: 0.78rem;
  padding: 0.4rem 0.55rem;
  border-radius: var(--radius-sm);
}

.panel-regiment-tree > summary {
  list-style: none;
}

.panel-regiment-tree > summary::-webkit-details-marker {
  display: none;
}

.panel-regiment-tree details > summary {
  list-style: none;
}

.panel-regiment-tree details > summary::-webkit-details-marker {
  display: none;
}

.panel-regiment-list {
  border-radius: var(--radius-sm);
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, hsl(var(--foreground) / 0.04), transparent 18%),
    linear-gradient(
      180deg,
      color-mix(in oklab, hsl(var(--card)) 82%, hsl(var(--background)) 18%) 0%,
      color-mix(in oklab, hsl(var(--background)) 88%, hsl(var(--accent)) 12%) 100%
    );
  box-shadow:
    inset 0 0 0 1px hsl(var(--border) / 0.42),
    inset 0 1px 0 hsl(var(--foreground) / 0.06),
    0 14px 28px -24px hsl(var(--shadow) / 0.78);
  backdrop-filter: blur(10px) saturate(120%);
}

.panel-regiment-item {
  background:
    linear-gradient(155deg, hsl(var(--background) / 0.56), hsl(var(--background) / 0.42)) !important;
  box-shadow: var(--shadow-2);
  border-left: 3px solid color-mix(in oklab, var(--regiment-color, #22d3ee) 65%, transparent);
  outline: none;
}

.panel-regiment-summary {
  appearance: none;
  display: block;
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.5rem;
  background: transparent;
  transition: 140ms ease;
}

.panel-regiment-summary::marker,
.panel-regiment-summary::-webkit-details-marker {
  display: none;
  content: "";
}

.panel-regiment-summary:hover {
  background: linear-gradient(130deg, color-mix(in oklab, var(--regiment-color, #22d3ee) 24%, transparent), hsl(var(--destructive) / 0.14));
}

.panel-regiment-summary:focus,
.panel-regiment-summary:focus-visible,
.panel-regiment-item:focus-within {
  outline: none;
  border-color: color-mix(in oklab, var(--regiment-color, #22d3ee) 56%, hsl(var(--accent)) 24%) !important;
  background:
    linear-gradient(135deg, color-mix(in oklab, var(--regiment-color, #22d3ee) 14%, transparent), hsl(var(--background) / 0.5)) !important;
  box-shadow:
    inset 0 1px 0 hsl(var(--foreground) / 0.08),
    0 0 0 1px color-mix(in oklab, var(--regiment-color, #22d3ee) 28%, transparent),
    0 10px 18px -18px hsl(var(--accent) / 0.18);
}

.panel-regiment-link {
  background: linear-gradient(145deg, hsl(var(--background) / 0.52), hsl(var(--background) / 0.35));
  border-color: color-mix(in oklab, hsl(var(--border)) 70%, transparent);
}

.panel-regiment-link:hover {
  background: linear-gradient(130deg, hsl(var(--accent) / 0.2), hsl(var(--destructive) / 0.15));
}

.panel-regiment-link.is-active {
  border-color: color-mix(in oklab, var(--regiment-color, #22d3ee) 70%, hsl(var(--destructive)) 25%);
  background: linear-gradient(132deg, color-mix(in oklab, var(--regiment-color, #22d3ee) 36%, transparent), hsl(var(--destructive) / 0.2));
  box-shadow: 0 0 16px hsl(var(--destructive) / 0.16), 0 0 18px hsl(var(--accent) / 0.2);
}

.panel-quick-item {
  display: block;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  padding: var(--size-2) var(--size-3);
  color: hsl(var(--foreground));
  text-decoration: none;
  transition: 150ms ease;
}

.panel-quick-item:hover {
  border-color: hsl(var(--border));
  background: hsl(var(--muted) / 0.4);
}

.profile-trigger {
  display: grid;
  place-items: center;
  width: 2.7rem;
  height: 2.7rem;
  border-radius: 999px;
  border: 1px solid color-mix(in oklab, hsl(var(--accent)) 48%, transparent);
  background: hsl(var(--muted) / 0.35);
  box-shadow: var(--shadow-3);
  transition: transform 180ms ease;
}

.profile-trigger:hover {
  transform: translateY(-1px);
}

.senate-card {
  border-radius: var(--radius);
  border: 1px solid color-mix(in oklab, hsl(var(--border)) 42%, transparent);
  background:
    linear-gradient(165deg, hsl(var(--card) / 0.95), hsl(var(--card) / 0.86));
  color: hsl(var(--card-foreground));
  box-shadow: var(--shadow-4);
}

.senate-card-header {
  margin-bottom: var(--size-4);
  border-bottom: 1px solid color-mix(in oklab, hsl(var(--border)) 48%, transparent);
  padding-bottom: var(--size-3);
}

.permission-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--size-1);
  border-radius: var(--radius-round);
  border: 1px solid hsl(var(--border));
  background: hsl(var(--muted) / 0.4);
  color: hsl(var(--foreground));
  padding: 0.2rem 0.6rem;
  font-size: 0.74rem;
  font-weight: 700;
}

.help-tip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 999px;
  border: 1px solid hsl(var(--border));
  color: hsl(var(--muted-foreground));
  font-size: 0.68rem;
}

.empty-state {
  border: 1px dashed hsl(var(--border));
  border-radius: var(--radius-sm);
  padding: var(--size-4);
  text-align: center;
  color: hsl(var(--muted-foreground));
}

/* Keep legacy form class hooks, but re-theme them through Tailwind/Open Props variables. */
.form-control,
.form-select,
.form-check-input,
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([class]),
select:not([class]),
textarea:not([class]) {
  appearance: none;
  width: 100%;
  border-radius: var(--radius-sm) !important;
  border: 1px solid hsl(var(--input)) !important;
  background:
    linear-gradient(160deg, hsl(var(--background) / 0.78), hsl(var(--background) / 0.58)) !important;
  color: hsl(var(--foreground)) !important;
  box-shadow: var(--shadow-1);
}

.form-control,
.form-select {
  min-height: 2.5rem;
  padding: 0.5rem 0.75rem;
}

.form-control:focus,
.form-select:focus,
input:focus,
select:focus,
textarea:focus {
  border-color: hsl(var(--ring)) !important;
  box-shadow: 0 0 0 0.15rem hsl(var(--ring) / 0.2) !important;
}

select,
.form-select,
select:not([class]) {
  background-image:
    linear-gradient(45deg, transparent 50%, hsl(var(--muted-foreground)) 50%),
    linear-gradient(135deg, hsl(var(--muted-foreground)) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(1em + 1px),
    calc(100% - 13px) calc(1em + 1px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 2.25rem !important;
}

option,
optgroup {
  background: hsl(var(--card)) !important;
  color: hsl(var(--foreground)) !important;
}

.table-shell {
  position: relative;
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid color-mix(in oklab, hsl(var(--border)) 40%, transparent);
  background:
    linear-gradient(165deg, hsl(var(--card) / 0.94), hsl(var(--card) / 0.86));
  box-shadow: var(--shadow-4);
}

.table-shell table {
  width: 100%;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0 0.5rem;
  margin: 0;
}

.table-shell thead {
  background: transparent;
  color: hsl(var(--muted-foreground));
}

.table-shell th,
.table-shell td {
  padding: 0.7rem 1rem;
  text-align: left;
  vertical-align: top;
}

.table-shell th {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid color-mix(in oklab, hsl(var(--border)) 55%, transparent);
  padding-bottom: 0.55rem;
}

.table-shell tbody tr {
  background:
    linear-gradient(140deg, hsl(var(--background) / 0.52), hsl(var(--background) / 0.36));
  box-shadow: var(--shadow-1);
  transition: 180ms ease;
}

.table-shell tbody tr:nth-child(odd) {
  background:
    linear-gradient(140deg, hsl(var(--background) / 0.58), hsl(var(--background) / 0.42));
}

.table-shell tbody td {
  border-top: 1px solid color-mix(in oklab, hsl(var(--border)) 34%, transparent);
  border-bottom: 1px solid color-mix(in oklab, hsl(var(--border)) 34%, transparent);
}

.table-shell tbody td:first-child {
  border-left: 1px solid color-mix(in oklab, hsl(var(--border)) 34%, transparent);
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.table-shell tbody td:last-child {
  border-right: 1px solid color-mix(in oklab, hsl(var(--border)) 34%, transparent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.table-shell tbody tr:hover {
  transform: translateY(-1px);
  background:
    linear-gradient(140deg, hsl(var(--accent) / 0.16), hsl(var(--destructive) / 0.11));
  box-shadow: var(--shadow-2);
}

.command-list {
  display: grid;
  gap: 0.65rem;
}

.command-row {
  position: relative;
  display: grid;
  gap: 0.6rem;
  border-radius: var(--radius-sm);
  background:
    linear-gradient(160deg, hsl(var(--background) / 0.62), hsl(var(--background) / 0.42));
  box-shadow: var(--shadow-2);
  padding: 0.8rem 0.95rem 0.8rem 1rem;
}

.command-row::before {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  background: linear-gradient(180deg, hsl(var(--destructive) / 0.45), hsl(var(--accent) / 0.52), hsl(var(--destructive) / 0.35));
  box-shadow: 0 0 9px hsl(var(--destructive) / 0.28);
  animation: redPulse 4.8s ease-in-out infinite;
}

.command-row-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
}

.command-row-title {
  font-weight: 700;
  color: hsl(var(--foreground));
}

.command-row-meta {
  font-size: 0.76rem;
  color: hsl(var(--muted-foreground));
}

.command-row-kv {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.8rem;
  font-size: 0.78rem;
  color: hsl(var(--muted-foreground));
}

.scope-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.16rem 0.55rem;
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: linear-gradient(130deg, hsl(var(--accent) / 0.2), hsl(var(--destructive) / 0.18));
  color: hsl(var(--accent-foreground));
}

.command-select-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

.command-select-wrap {
  position: relative;
  width: 100%;
}

.command-select-trigger {
  width: 100%;
  min-height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid hsl(var(--input));
  background:
    linear-gradient(155deg, hsl(var(--background) / 0.78), hsl(var(--background) / 0.58));
  color: hsl(var(--foreground));
  box-shadow: var(--shadow-1);
  padding: 0.55rem 0.75rem;
  font-size: 0.9rem;
  transition: 170ms ease;
}

.command-select-trigger:hover {
  border-color: color-mix(in oklab, hsl(var(--accent)) 55%, hsl(var(--destructive)) 20%);
  box-shadow: var(--shadow-2);
}

.command-select-trigger:focus-visible {
  outline: none;
  border-color: hsl(var(--ring));
  box-shadow:
    0 0 0 0.14rem hsl(var(--ring) / 0.2),
    0 0 0 0.08rem hsl(var(--destructive) / 0.16);
}

.command-select-trigger::after {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid hsl(var(--muted-foreground));
  border-bottom: 2px solid hsl(var(--muted-foreground));
  transform: rotate(45deg) translateY(-2px);
  transition: transform 140ms ease;
}

.command-select-wrap.is-open .command-select-trigger::after {
  transform: rotate(-135deg) translateX(-2px);
}

.command-select-menu {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  right: 0;
  z-index: 90;
  max-height: 16rem;
  overflow: auto;
  border-radius: var(--radius-sm);
  background:
    linear-gradient(170deg, hsl(var(--card) / 0.95), hsl(var(--card) / 0.88));
  box-shadow: var(--shadow-4);
  padding: 0.35rem;
}

.command-select-option {
  width: 100%;
  text-align: left;
  border-radius: calc(var(--radius-sm) - 0.15rem);
  padding: 0.5rem 0.65rem 0.52rem 0.8rem;
  font-size: 0.84rem;
  color: hsl(var(--foreground));
  background: transparent;
  transition: 140ms ease;
  position: relative;
}

.command-select-option:hover {
  background: linear-gradient(130deg, hsl(var(--accent) / 0.2), hsl(var(--destructive) / 0.14));
  box-shadow: inset 0 0 0 1px color-mix(in oklab, hsl(var(--accent)) 42%, hsl(var(--destructive)) 30%);
}

.command-select-option.is-selected::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, hsl(var(--destructive) / 0.6), hsl(var(--accent) / 0.65));
}

.command-accent,
.panel-surface,
.senate-card,
.table-shell,
.panel-sidebar,
.panel-regiment-tree details {
  position: relative;
}

.command-accent::after,
.panel-surface::after,
.senate-card::after,
.table-shell::after {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  background: linear-gradient(180deg, hsl(var(--destructive) / 0.25), hsl(var(--accent) / 0.3), hsl(var(--destructive) / 0.2));
  box-shadow: 0 0 14px hsl(var(--destructive) / 0.22);
  opacity: 0.72;
  animation: redPulse 4.8s ease-in-out infinite;
}

.panel-regiment-tree details::before {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: auto 0 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, hsl(var(--destructive) / 0.45), hsl(var(--accent) / 0.45), transparent);
  opacity: 0.55;
  animation: redScan 6.4s linear infinite;
}

@keyframes redPulse {
  0%, 100% { opacity: 0.48; }
  50% { opacity: 0.86; }
}

@keyframes redScan {
  0% { transform: translateX(-8%); }
  50% { transform: translateX(8%); }
  100% { transform: translateX(-8%); }
}

.panel-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at center, hsl(var(--accent) / 0.2), rgba(3, 7, 18, 0.95));
}

html.panel-route-pending body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9998;
  width: 100%;
  height: 3px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, hsl(var(--accent)), rgb(56 189 248), transparent);
  box-shadow: 0 0 22px hsl(var(--accent) / 0.55);
  animation: panelRoutePending 0.9s ease-in-out infinite;
}

@keyframes panelRoutePending {
  0% { transform: translateX(-100%); opacity: 0.46; }
  45% { opacity: 1; }
  100% { transform: translateX(100%); opacity: 0.46; }
}

.loader-core {
  text-align: center;
}

.loader-ring,
.loader-ring-alt {
  width: 9.5rem;
  height: 9.5rem;
  border-radius: 999px;
  border: 3px solid hsl(var(--border));
  animation: orbit 2s linear infinite;
}

.loader-ring {
  border-top-color: hsl(var(--destructive));
}

.loader-ring-alt {
  margin-top: -9.5rem;
  border-bottom-color: hsl(var(--accent));
  animation-direction: reverse;
  animation-duration: 2.6s;
}

.loader-logo {
  margin-top: -6.2rem;
  letter-spacing: 0.24em;
  font-weight: 800;
  color: hsl(var(--foreground));
}

.loader-text {
  margin-top: 4rem;
  color: hsl(var(--muted-foreground));
  font-size: 0.78rem;
  letter-spacing: 0.05em;
}

.loader-fade-out {
  opacity: 0;
  transition: opacity 0.45s ease;
  pointer-events: none;
}

@keyframes orbit {
  to { transform: rotate(360deg); }
}

@media (max-width: 1024px) {
  .table-shell th,
  .table-shell td {
    padding: 0.65rem 0.75rem;
  }

  .discord-voice-dock {
    left: .75rem;
    right: .75rem;
    bottom: .75rem;
    width: auto;
    transform: none;
    align-items: flex-start;
    flex-direction: column;
  }

  .discord-voice-dock-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

/* =========================================================
   Cinematic Command Overhaul (Premium Red+Blue Identity)
========================================================= */
.command-surface {
  background:
    linear-gradient(155deg, hsl(var(--card)/0.94), hsl(var(--card)/0.82)),
    radial-gradient(circle at 12% 8%, hsl(var(--accent)/0.2), transparent 36%),
    radial-gradient(circle at 88% 100%, hsl(var(--destructive)/0.16), transparent 34%);
  border-color: color-mix(in oklab, hsl(var(--accent)) 42%, hsl(var(--destructive)) 35%) !important;
  box-shadow:
    0 0 0 1px hsl(var(--border)/0.45),
    0 12px 26px hsl(var(--background)/0.55),
    0 0 26px hsl(var(--accent)/0.12),
    0 0 26px hsl(var(--destructive)/0.1);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.command-surface:hover {
  transform: translateY(-2px);
  box-shadow:
    0 0 0 1px color-mix(in oklab, hsl(var(--accent)) 48%, hsl(var(--destructive)) 42%),
    0 16px 30px hsl(var(--background)/0.65),
    0 0 30px hsl(var(--accent)/0.18),
    0 0 30px hsl(var(--destructive)/0.16);
}

.command-surface-header {
  border-image: linear-gradient(90deg, hsl(var(--accent)/0.38), hsl(var(--destructive)/0.35)) 1;
}

.command-btn {
  border: 1px solid color-mix(in oklab, hsl(var(--accent)) 36%, hsl(var(--destructive)) 28%);
  box-shadow: inset 0 1px 0 hsl(var(--foreground)/0.08), 0 0 18px hsl(var(--accent)/0.14), 0 0 16px hsl(var(--destructive)/0.12);
  transform: translateZ(0);
}

.command-btn:hover {
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 hsl(var(--foreground)/0.1), 0 0 22px hsl(var(--accent)/0.2), 0 0 20px hsl(var(--destructive)/0.18);
}

.command-btn-primary {
  background: linear-gradient(140deg, hsl(var(--accent)/0.88), hsl(var(--destructive)/0.78));
}

.command-btn-secondary {
  background: linear-gradient(145deg, hsl(var(--background)/0.72), hsl(var(--muted)/0.72));
}

.command-btn-outline {
  background: linear-gradient(145deg, hsl(var(--background)/0.52), hsl(var(--background)/0.38));
}

.command-btn-red {
  background: linear-gradient(140deg, hsl(var(--destructive)/0.92), hsl(var(--accent)/0.7));
}

.command-input {
  background:
    linear-gradient(155deg, hsl(var(--background)/0.9), hsl(var(--background)/0.72)),
    radial-gradient(circle at 10% 0, hsl(var(--accent)/0.1), transparent 28%),
    radial-gradient(circle at 100% 100%, hsl(var(--destructive)/0.08), transparent 28%);
  border-color: color-mix(in oklab, hsl(var(--accent)) 30%, hsl(var(--destructive)) 24%) !important;
  box-shadow: inset 0 0 0 1px hsl(var(--background)/0.35), 0 8px 18px hsl(var(--background)/0.35);
}

.command-input:focus {
  border-color: color-mix(in oklab, hsl(var(--accent)) 55%, hsl(var(--destructive)) 40%) !important;
}

.panel-nav-item,
.panel-regiment-link,
.panel-regiment-summary,
.panel-quick-item {
  box-shadow: inset 0 0 0 1px hsl(var(--accent)/0.08), inset 0 0 0 999px hsl(var(--destructive)/0.02);
}

.panel-nav-item:hover,
.panel-regiment-link:hover,
.panel-regiment-summary:hover,
.panel-quick-item:hover {
  box-shadow: inset 0 0 0 1px hsl(var(--accent)/0.26), inset 0 0 0 999px hsl(var(--destructive)/0.08), 0 0 20px hsl(var(--accent)/0.18), 0 0 18px hsl(var(--destructive)/0.16);
}

.panel-nav-item.is-active {
  box-shadow: inset 0 0 0 1px hsl(var(--accent)/0.5), inset 0 0 0 999px hsl(var(--destructive)/0.15), 0 0 28px hsl(var(--accent)/0.24), 0 0 24px hsl(var(--destructive)/0.2);
}

.command-hero-card {
  border-radius: var(--radius);
  border: 1px solid color-mix(in oklab, hsl(var(--accent)) 44%, hsl(var(--destructive)) 38%);
  background:
    linear-gradient(150deg, hsl(var(--card)/0.9), hsl(var(--card)/0.78)),
    radial-gradient(circle at 12% 0, hsl(var(--accent)/0.22), transparent 36%),
    radial-gradient(circle at 88% 100%, hsl(var(--destructive)/0.2), transparent 34%);
  padding: 1rem;
  box-shadow: 0 0 34px hsl(var(--accent)/0.14), 0 0 30px hsl(var(--destructive)/0.12);
}

.command-tile-link {
  display: block;
  border-radius: var(--radius-sm);
  border: 1px solid color-mix(in oklab, hsl(var(--accent)) 30%, hsl(var(--destructive)) 24%);
  background: linear-gradient(145deg, hsl(var(--background)/0.7), hsl(var(--background)/0.52));
  color: hsl(var(--foreground));
  text-decoration: none;
  padding: .7rem .8rem;
  transition: .2s ease;
}

.command-tile-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 18px hsl(var(--accent)/0.2), 0 0 18px hsl(var(--destructive)/0.18);
}

/* Chat */
.discord-shell {
  position: relative;
  display: grid;
  grid-template-columns: 4.25rem 18rem 1fr 18rem;
  height: 100vh;
  width: 100vw;
  background: linear-gradient(155deg, hsl(var(--background)/0.96), hsl(var(--background)/0.9));
}

.discord-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: var(--theme-regiment-image);
  background-repeat: no-repeat;
  background-position: right -5rem bottom -4rem;
  background-size: min(38vw, 540px);
  opacity: 0.08;
}

.discord-regiment-bar {
  border-right: 1px solid hsl(var(--border)/0.55);
  background: linear-gradient(180deg, hsl(var(--card)/0.95), hsl(var(--background)/0.9));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .6rem;
  padding: .55rem .4rem;
}

.discord-regiment-home,
.discord-regiment-tile {
  width: 2.7rem;
  height: 2.7rem;
  border-radius: .85rem;
  border: 1px solid hsl(var(--border));
  background: linear-gradient(145deg, hsl(var(--background)/0.8), hsl(var(--background)/0.62));
  color: hsl(var(--foreground));
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  display: grid;
  place-items: center;
  transition: .2s ease;
  text-decoration: none;
}

.discord-regiment-home:hover,
.discord-regiment-tile:hover,
.discord-regiment-tile.is-active {
  border-color: color-mix(in oklab, hsl(var(--accent)) 58%, hsl(var(--destructive)) 46%);
  box-shadow: 0 0 16px hsl(var(--accent)/0.2), 0 0 14px hsl(var(--destructive)/0.18);
}

.discord-regiment-scroll {
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.discord-channel-list {
  border-right: 1px solid hsl(var(--border)/0.5);
  background: linear-gradient(180deg, hsl(var(--card)/0.92), hsl(var(--background)/0.88));
  display: flex;
  flex-direction: column;
  padding: .75rem .6rem;
}

.discord-channel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .4rem;
  margin-bottom: .35rem;
}

.discord-channel-header-title {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: hsl(var(--muted-foreground));
  font-weight: 700;
}

.discord-plus-btn {
  width: 1.3rem;
  height: 1.3rem;
  border-radius: .35rem;
  border: 1px solid hsl(var(--border));
  background: linear-gradient(140deg, hsl(var(--background)/0.74), hsl(var(--background)/0.58));
  color: hsl(var(--foreground));
  line-height: 1;
}

.discord-channel-scroll {
  overflow: auto;
}

.discord-channel-row {
  display: flex;
  align-items: center;
  gap: .5rem;
  width: 100%;
  border-radius: .45rem;
  border: 1px solid transparent;
  padding: .38rem .45rem;
  text-decoration: none;
  transition: .16s ease;
}

.discord-channel-row:hover,
.discord-voice-row-main:hover {
  border-color: color-mix(in oklab, hsl(var(--accent)) 36%, hsl(var(--destructive)) 30%);
  background: linear-gradient(135deg, hsl(var(--accent)/0.12), hsl(var(--destructive)/0.1));
  box-shadow: 0 0 13px hsl(var(--accent)/0.14), 0 0 11px hsl(var(--destructive)/0.12);
}

.discord-channel-row.is-active {
  border-color: color-mix(in oklab, hsl(var(--accent)) 62%, hsl(var(--destructive)) 40%);
  background: linear-gradient(132deg, hsl(var(--accent)/0.22), hsl(var(--destructive)/0.18));
}

.discord-channel-prefix {
  color: hsl(var(--muted-foreground));
  width: .95rem;
  text-align: center;
  font-size: .8rem;
}

.discord-channel-label {
  color: hsl(var(--foreground));
  font-size: .84rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.discord-voice-regiment-block {
  border: 1px solid hsl(var(--border)/0.65);
  border-radius: .5rem;
  padding: .35rem;
  margin-bottom: .5rem;
  background: hsl(var(--background)/0.32);
}

.discord-voice-regiment-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .4rem;
  margin-bottom: .3rem;
  font-size: .66rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: hsl(var(--muted-foreground));
  font-weight: 700;
}

.discord-category-title {
  position: relative;
  overflow: hidden;
  justify-content: flex-start;
  gap: .35rem;
  border-radius: .35rem;
  padding: .16rem .24rem;
}

.discord-category-title::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: var(--theme-regiment-image);
  background-repeat: no-repeat;
  background-position: right -2rem center;
  background-size: 120px;
  opacity: 0.08;
}

.discord-category-toggle {
  width: 1rem;
  border: 0;
  background: transparent;
  color: hsl(var(--muted-foreground));
  line-height: 1;
}

.discord-category-thumb {
  width: 1rem;
  height: 1rem;
  border-radius: .2rem;
  object-fit: cover;
  border: 1px solid hsl(var(--border)/0.6);
}

.discord-category-scope {
  margin-left: auto;
  font-size: .58rem;
  letter-spacing: .06em;
  color: hsl(var(--muted-foreground));
}

.discord-category-title form {
  display: inline-flex;
}

.discord-voice-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: .25rem;
}

.discord-voice-row-main {
  flex: 1;
  display: flex;
  align-items: center;
  gap: .45rem;
  border-radius: .42rem;
  border: 1px solid transparent;
  background: transparent;
  padding: .35rem .4rem;
}

.discord-voice-members {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  padding: 0 .4rem .3rem 1.7rem;
}

.discord-voice-member-pill {
  display: inline-flex;
  align-items: center;
  gap: .38rem;
  min-width: 0;
  border: 1px solid hsl(var(--border) / 0.72);
  border-radius: 999px;
  background: linear-gradient(145deg, hsl(var(--background) / 0.72), hsl(var(--background) / 0.5));
  padding: .18rem .42rem .18rem .22rem;
}

.discord-voice-member-pill.is-watchable {
  cursor: pointer;
}

.discord-voice-member-pill.is-speaking {
  border-color: color-mix(in oklab, hsl(var(--accent)) 58%, hsl(var(--destructive)) 34%);
  box-shadow: 0 0 12px hsl(var(--accent) / 0.18), 0 0 10px hsl(var(--destructive) / 0.16);
}

.discord-voice-member-avatar {
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 999px;
  overflow: hidden;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: linear-gradient(180deg, hsl(var(--accent) / 0.28), hsl(var(--destructive) / 0.18));
  color: hsl(var(--foreground));
  font-size: .54rem;
  font-weight: 700;
}

.discord-voice-member-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.discord-voice-member-name {
  max-width: 9.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .7rem;
  color: hsl(var(--foreground));
}

.discord-voice-member-live {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: hsl(var(--destructive));
  color: hsl(var(--destructive-foreground));
  padding: .1rem .34rem;
  font-size: .56rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.discord-voice-join-state {
  margin-left: auto;
  font-size: .62rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: hsl(var(--muted-foreground));
}

.discord-voice-count {
  margin-left: .35rem;
  font-size: .69rem;
  color: hsl(var(--muted-foreground));
}

.discord-voice-row.is-connecting .discord-voice-join-state {
  color: hsl(var(--accent));
}

.discord-voice-row.is-connected .discord-voice-join-state {
  color: hsl(var(--foreground));
}

.discord-voice-row.is-connected .discord-voice-row-main {
  border-color: color-mix(in oklab, hsl(var(--accent)) 58%, hsl(var(--destructive)) 28%);
  background: linear-gradient(130deg, hsl(var(--accent)/0.2), hsl(var(--destructive)/0.12));
}

.discord-voice-row.is-failed .discord-voice-join-state {
  color: hsl(var(--destructive-foreground));
}

.discord-voice-row.is-failed .discord-voice-row-main {
  border-color: hsl(var(--destructive)/0.62);
  background: linear-gradient(130deg, hsl(var(--destructive)/0.22), hsl(var(--background)/0.5));
}

.discord-speaking-dot {
  width: .42rem;
  height: .42rem;
  border-radius: 999px;
  background: hsl(var(--muted));
}

.discord-speaking-dot.is-active {
  background: hsl(var(--destructive));
  box-shadow: 0 0 10px hsl(var(--destructive)/0.72), 0 0 14px hsl(var(--destructive)/0.5), 0 0 10px hsl(var(--accent)/0.28);
  animation: voicePulse 1s ease-in-out infinite;
}

.discord-voice-delete {
  width: 1.2rem;
  height: 1.2rem;
  border-radius: .32rem;
  border: 1px solid hsl(var(--border));
  color: hsl(var(--destructive-foreground));
  background: hsl(var(--destructive)/0.55);
  line-height: 1;
}

.discord-main-area {
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: linear-gradient(160deg, hsl(var(--background)/0.76), hsl(var(--background)/0.68));
}

.discord-main-header {
  height: 3.1rem;
  border-bottom: 1px solid hsl(var(--border)/0.5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 .95rem;
  position: relative;
  overflow: hidden;
}

.discord-main-header::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: var(--theme-regiment-image);
  background-repeat: no-repeat;
  background-position: right -2.2rem center;
  background-size: 230px;
  opacity: 0.07;
}

.discord-mode-header {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.discord-main-title {
  font-size: .95rem;
  font-weight: 700;
  color: hsl(var(--foreground));
}

.discord-header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: .45rem;
  position: relative;
}

.discord-theme-lock {
  border: 1px solid color-mix(in oklab, hsl(var(--accent)) 52%, hsl(var(--border)));
  border-radius: .4rem;
  background: linear-gradient(145deg, hsl(var(--accent)/0.2), hsl(var(--background)/0.5));
  color: hsl(var(--foreground));
  font-size: .62rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .2rem .42rem;
  white-space: nowrap;
}

.discord-voice-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + .35rem);
  width: 18rem;
  max-height: 18rem;
  overflow: auto;
  border: 1px solid color-mix(in oklab, hsl(var(--accent)) 36%, hsl(var(--destructive)) 30%);
  border-radius: .55rem;
  background: linear-gradient(155deg, hsl(var(--card)/0.96), hsl(var(--background)/0.9));
  box-shadow: 0 0 18px hsl(var(--destructive)/0.18), 0 0 14px hsl(var(--accent)/0.16);
  padding: .45rem;
  z-index: 20;
}

.discord-voice-dropdown-title {
  font-size: .72rem;
  color: hsl(var(--muted-foreground));
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 700;
  margin-bottom: .35rem;
}

.discord-voice-dropdown-list {
  display: grid;
  gap: .35rem;
}

.discord-main-pane {
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.discord-application-summary {
  border-bottom: 1px solid hsl(var(--border)/0.5);
  padding: .75rem 1rem;
  display: grid;
  gap: .5rem;
  max-height: 42vh;
  overflow: auto;
}

.discord-group-summary {
  gap: .42rem;
}

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

.discord-group-roster {
  display: grid;
  gap: .34rem;
}

.discord-group-member-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .4rem;
  border: 1px solid hsl(var(--border)/0.42);
  border-radius: .4rem;
  background: hsl(var(--background)/0.26);
  padding: .3rem .38rem;
}

.discord-group-member-meta {
  min-width: 0;
  font-size: .74rem;
  color: hsl(var(--foreground));
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.discord-group-member-actions {
  display: inline-flex;
  gap: .32rem;
  flex-shrink: 0;
}

.discord-group-invite-card {
  display: grid;
  gap: .4rem;
}

.discord-application-summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.discord-inline-feedback {
  border-radius: 1rem;
  padding: .82rem 1rem;
  margin-bottom: .9rem;
  border: 1px solid transparent;
  backdrop-filter: blur(18px);
  font-size: .9rem;
  line-height: 1.45;
}

.discord-inline-feedback-success {
  color: hsl(var(--foreground));
  border-color: color-mix(in srgb, hsl(var(--primary)) 55%, transparent);
  background:
    linear-gradient(135deg, color-mix(in srgb, hsl(var(--primary)) 14%, transparent), transparent 58%),
    hsl(var(--background)/0.62);
}

.discord-inline-feedback-error {
  color: hsl(var(--foreground));
  border-color: hsl(var(--destructive)/0.5);
  background:
    linear-gradient(135deg, hsl(var(--destructive)/0.18), transparent 62%),
    hsl(var(--background)/0.62);
}

.discord-application-summary-title {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: hsl(var(--muted-foreground));
}

.discord-application-summary-status {
  font-size: .68rem;
  border: 1px solid hsl(var(--border));
  border-radius: .4rem;
  padding: .12rem .38rem;
}

.discord-application-summary-subtitle {
  margin-top: .24rem;
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  font-size: .76rem;
  color: hsl(var(--foreground) / 0.9);
}

.discord-application-reminder-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  border: 1px solid hsl(var(--border)/0.5);
  border-radius: .75rem;
  padding: .75rem .85rem;
  background:
    linear-gradient(135deg, color-mix(in srgb, hsl(var(--primary)) 10%, transparent), transparent 68%),
    hsl(var(--background)/0.28);
}

.discord-application-reminder-copy {
  min-width: 0;
}

.discord-application-reason {
  border: 1px solid hsl(var(--destructive)/0.55);
  border-radius: .45rem;
  background: hsl(var(--destructive)/0.16);
  color: hsl(var(--foreground));
  padding: .35rem .45rem;
  font-size: .74rem;
}

.discord-application-card {
  border: 1px solid hsl(var(--border)/0.55);
  border-radius: .45rem;
  padding: .42rem .5rem;
  background: hsl(var(--background)/0.35);
}

.discord-application-card-statement {
  background:
    linear-gradient(135deg, color-mix(in srgb, hsl(var(--primary)) 10%, transparent), transparent 72%),
    hsl(var(--background)/0.35);
}

.discord-application-answer-grid {
  display: grid;
  gap: .5rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.discord-application-question {
  font-size: .66rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: hsl(var(--muted-foreground));
  font-weight: 700;
}

.discord-application-answer {
  margin-top: .2rem;
  white-space: pre-wrap;
  font-size: .8rem;
}

.discord-application-reminder-row .discord-application-answer {
  margin-top: .28rem;
  max-width: 60ch;
}

.discord-application-staff-notes {
  margin-top: .1rem;
  border-top: 1px dashed hsl(var(--border)/0.55);
  padding-top: .4rem;
  display: grid;
  gap: .34rem;
}

.discord-application-staff-title {
  font-size: .66rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: hsl(var(--muted-foreground));
  font-weight: 700;
}

.discord-application-note {
  border: 1px solid hsl(var(--border)/0.5);
  border-radius: .42rem;
  padding: .34rem .45rem;
  background: hsl(var(--background)/0.3);
}

.discord-application-note-meta {
  font-size: .64rem;
  color: hsl(var(--muted-foreground));
}

.discord-application-note-body {
  margin-top: .14rem;
  white-space: pre-wrap;
  font-size: .76rem;
}

.discord-message-stream {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: .9rem 1rem;
  display: grid;
  gap: .45rem;
}

.discord-message {
  border-radius: .48rem;
  padding: .5rem .58rem;
  border: 1px solid hsl(var(--border)/0.42);
  background: hsl(var(--background)/0.42);
}

.discord-message.is-system {
  border-color: color-mix(in oklab, hsl(var(--destructive)) 48%, hsl(var(--accent)) 30%);
  background: linear-gradient(135deg, hsl(var(--destructive)/0.16), hsl(var(--background)/0.5));
}

.discord-message.is-summary {
  border-color: hsl(var(--accent)/0.6);
  background: linear-gradient(135deg, hsl(var(--accent)/0.16), hsl(var(--background)/0.5));
}

.discord-message-meta {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-size: .71rem;
}

.discord-message-author-wrap {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
}

.discord-message-author {
  color: hsl(var(--foreground));
  font-weight: 700;
}

.discord-message-time {
  color: hsl(var(--muted-foreground));
}

.discord-message-pin {
  border: 1px solid hsl(var(--accent)/0.6);
  border-radius: .38rem;
  padding: .05rem .28rem;
  font-size: .58rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: hsl(var(--accent-foreground));
}

.discord-message-content {
  margin-top: .2rem;
  color: hsl(var(--foreground));
  font-size: .84rem;
  line-height: 1.38;
  white-space: pre-wrap;
}

.discord-inline-mention {
  display: inline-flex;
  align-items: center;
  padding: .06rem .34rem;
  border-radius: .42rem;
  background: hsl(var(--accent) / 0.18);
  color: hsl(var(--accent-foreground));
  font-weight: 700;
}

.discord-chat-image-btn {
  margin-top: .45rem;
  border: 1px solid hsl(var(--border)/0.65);
  border-radius: .55rem;
  padding: 0;
  background: hsl(var(--background)/0.4);
  max-width: min(26rem, 100%);
  overflow: hidden;
}

.discord-chat-image {
  display: block;
  width: 100%;
  max-height: 20rem;
  object-fit: contain;
  background: hsl(var(--background)/0.3);
}

.discord-image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: hsl(224 55% 4% / 0.88);
  display: grid;
  place-items: center;
  padding: 1rem;
}

.discord-image-lightbox.hidden {
  display: none;
  pointer-events: none;
}

.discord-image-lightbox-img {
  max-width: min(92vw, 72rem);
  max-height: 88vh;
  border-radius: .7rem;
  border: 1px solid hsl(var(--border));
  box-shadow: 0 0 30px hsl(var(--accent)/0.28);
}

.discord-image-lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2rem;
  height: 2rem;
  border-radius: .45rem;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--background)/0.72);
  color: hsl(var(--foreground));
  line-height: 1;
}

.discord-message-input-wrap {
  border-top: 1px solid hsl(var(--border)/0.55);
  padding: .56rem .72rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.discord-mention-menu {
  margin: .2rem .72rem 0;
  display: grid;
  gap: .32rem;
  padding: .45rem;
  border: 1px solid hsl(var(--border) / 0.72);
  border-radius: .8rem;
  background:
    radial-gradient(circle at top right, hsl(var(--accent) / 0.12), transparent 28%),
    linear-gradient(180deg, hsl(var(--card) / 0.98), hsl(var(--background) / 0.94));
  box-shadow: 0 24px 50px -30px hsl(var(--shadow) / 0.88);
}

.discord-mention-menu.hidden {
  display: none;
}

.discord-mention-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .55rem .65rem;
  border: 1px solid transparent;
  border-radius: .7rem;
  background: transparent;
  color: hsl(var(--foreground));
  text-align: left;
}

.discord-mention-option:hover,
.discord-mention-option.is-active {
  border-color: hsl(var(--accent) / 0.35);
  background: hsl(var(--accent) / 0.12);
}

.discord-mention-option-avatar {
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: hsl(var(--accent) / 0.18);
  color: hsl(var(--accent-foreground));
  font-weight: 700;
}

.discord-mention-option-copy {
  min-width: 0;
  display: grid;
}

.discord-mention-option-name {
  color: hsl(var(--foreground));
  font-weight: 700;
}

.discord-mention-option-rank {
  color: hsl(var(--muted-foreground));
  font-size: .72rem;
}

.discord-message-input {
  flex: 1;
  border: 1px solid hsl(var(--input));
  border-radius: .55rem;
  background: hsl(var(--background)/0.56);
  color: hsl(var(--foreground));
  padding: .42rem .62rem;
  min-height: 2rem;
}

.discord-message-input-sm {
  min-height: 1.85rem;
  padding: .34rem .55rem;
  font-size: .84rem;
}

.discord-send-btn,
.discord-control-btn {
  border: 1px solid color-mix(in oklab, hsl(var(--accent)) 35%, hsl(var(--destructive)) 30%);
  border-radius: .55rem;
  background: linear-gradient(130deg, hsl(var(--accent)/0.72), hsl(var(--destructive)/0.56));
  color: hsl(var(--foreground));
  padding: .45rem .7rem;
}

.discord-control-btn-sm {
  padding: .26rem .5rem;
  font-size: .72rem;
  line-height: 1.15;
}

.discord-voice-center {
  flex: 1;
  display: grid;
  place-content: center;
  gap: .9rem;
  text-align: center;
}

.discord-voice-status {
  font-size: .85rem;
  color: hsl(var(--muted-foreground));
}

.discord-voice-controls {
  display: flex;
  justify-content: center;
  gap: .45rem;
}

.discord-voice-share-shell {
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
  border: 1px solid hsl(var(--border) / 0.7);
  border-radius: calc(var(--radius-sm) + 6px);
  background:
    radial-gradient(circle at top right, hsl(var(--gradB) / 0.1), transparent 28%),
    linear-gradient(180deg, hsl(var(--background) / 0.34), hsl(var(--background) / 0.16));
  text-align: left;
}

.discord-voice-share-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.discord-voice-share-status {
  margin-top: 0.25rem;
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-size: 0.95rem;
  color: hsl(var(--foreground));
}

.discord-voice-share-note {
  max-width: 20rem;
  font-size: 0.72rem;
  line-height: 1.45;
  color: hsl(var(--muted-foreground));
}

.discord-voice-share-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 0.85rem;
}

.discord-voice-dock {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  z-index: 82;
  transform: translateX(-50%);
  width: min(68rem, calc(100vw - 2rem));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem 1rem;
  border: 1px solid hsl(var(--border) / 0.84);
  border-radius: 1rem;
  background:
    radial-gradient(circle at top right, hsl(var(--gradA) / 0.18), transparent 22%),
    linear-gradient(180deg, hsl(var(--card) / 0.98), hsl(var(--bg2) / 0.94));
  box-shadow:
    0 28px 72px -38px hsl(var(--shadow) / 0.96),
    0 16px 36px -22px hsl(var(--accent) / 0.24);
  backdrop-filter: blur(calc(var(--blur) + 2px));
}

.discord-voice-dock.hidden {
  display: none;
}

.discord-voice-dock-copy {
  min-width: 0;
  display: grid;
  gap: .14rem;
}

.discord-voice-dock-kicker {
  font-size: .65rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: hsl(var(--muted-foreground));
  font-weight: 700;
}

.discord-voice-dock-title {
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: hsl(var(--foreground));
}

.discord-voice-dock-meta {
  font-size: .78rem;
  color: hsl(var(--muted-foreground));
}

.discord-voice-dock-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .45rem;
}

.discord-voice-live-menu {
  position: fixed;
  z-index: 91;
  display: grid;
  gap: .35rem;
  padding: .5rem;
  border: 1px solid hsl(var(--border) / 0.88);
  border-radius: .8rem;
  background:
    radial-gradient(circle at top right, hsl(var(--gradB) / 0.18), transparent 26%),
    linear-gradient(180deg, hsl(var(--card) / 0.98), hsl(var(--background) / 0.94));
  box-shadow: 0 22px 48px -26px hsl(var(--shadow) / 0.88);
}

.discord-voice-live-menu.hidden {
  display: none;
}

.discord-voice-live-viewer {
  width: min(88vw, 72rem);
  max-height: 88vh;
  display: grid;
  gap: .8rem;
  border-radius: 1rem;
  border: 1px solid hsl(var(--border) / 0.84);
  background:
    radial-gradient(circle at top right, hsl(var(--gradA) / 0.16), transparent 24%),
    linear-gradient(180deg, hsl(var(--card) / 0.98), hsl(var(--background) / 0.9));
  box-shadow:
    0 30px 72px -34px hsl(var(--shadow) / 0.98),
    inset 0 1px 0 hsl(var(--foreground) / 0.08);
  overflow: hidden;
  padding: 1rem;
}

.discord-voice-live-viewer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.discord-voice-live-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .55rem;
}

.discord-voice-live-title {
  margin-top: .2rem;
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-size: 1.15rem;
  color: hsl(var(--foreground));
}

.discord-voice-live-meta {
  margin-top: .12rem;
  font-size: .76rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: hsl(var(--muted-foreground));
}

.discord-voice-live-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  align-items: stretch;
}

.discord-voice-live-layout.has-side-chat {
  grid-template-columns: minmax(0, 1.75fr) minmax(19rem, .95fr);
}

.discord-voice-live-stage {
  min-width: 0;
}

.discord-voice-live-video {
  width: 100%;
  max-height: calc(88vh - 7rem);
  border-radius: .9rem;
  border: 1px solid hsl(var(--border) / 0.72);
  background: hsl(var(--background) / 0.8);
}

.discord-voice-live-chat {
  min-width: 0;
  max-height: calc(88vh - 8.5rem);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: .75rem;
  padding: .9rem;
  border-radius: .9rem;
  border: 1px solid hsl(var(--border) / 0.78);
  background:
    radial-gradient(circle at top right, hsl(var(--gradB) / 0.12), transparent 28%),
    linear-gradient(180deg, hsl(var(--panel) / 0.94), hsl(var(--bg2) / 0.84));
  box-shadow: inset 0 1px 0 hsl(var(--foreground) / 0.08);
}

.discord-voice-live-chat-head {
  display: grid;
  gap: .25rem;
}

.discord-voice-live-chat-title {
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-size: .96rem;
  color: hsl(var(--foreground));
}

.discord-voice-live-chat-stream {
  min-height: 0;
  max-height: none;
  padding-right: .35rem;
  overflow-y: auto;
}

.discord-voice-live-chat-stream .discord-message {
  padding-inline: .1rem;
}

@media (max-width: 1100px) {
  .discord-voice-live-layout.has-side-chat {
    grid-template-columns: minmax(0, 1fr);
  }

  .discord-voice-live-chat {
    max-height: 18rem;
  }
}

.discord-voice-share-card {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid hsl(var(--border) / 0.74);
  background:
    linear-gradient(180deg, hsl(var(--panel) / 0.94), hsl(var(--bg2) / 0.82));
  box-shadow:
    inset 0 1px 0 hsl(var(--foreground) / 0.08),
    0 24px 40px -34px hsl(var(--shadow) / 0.98);
}

.discord-voice-share-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background:
    linear-gradient(135deg, hsl(var(--background) / 0.92), hsl(var(--card) / 0.72));
}

.discord-voice-share-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.8rem 0.9rem 0.9rem;
}

.discord-voice-share-card-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: hsl(var(--foreground));
}

.discord-voice-share-card-meta {
  margin-top: 0.12rem;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: hsl(var(--muted-foreground));
}

.discord-voice-share-card-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid hsl(var(--border) / 0.68);
  background:
    linear-gradient(180deg, hsl(var(--accent) / 0.26), hsl(var(--accent) / 0.14));
  padding: 0.28rem 0.6rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: hsl(var(--foreground));
}

.discord-voice-share-card-badge.is-live {
  border-color: hsl(var(--primary) / 0.44);
  background:
    linear-gradient(180deg, hsl(var(--primary) / 0.28), hsl(var(--accent) / 0.14));
  color: hsl(var(--primary-foreground, var(--foreground)));
}

.discord-media-prompt {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 89;
  width: min(24rem, calc(100vw - 1.25rem));
  max-height: min(70vh, 32rem);
  overflow: auto;
  padding: .95rem 1rem;
  border-radius: calc(var(--radius) + 2px);
  border: 1px solid hsl(var(--border) / 0.88);
  background:
    radial-gradient(circle at top right, hsl(var(--gradA) / 0.18), transparent 26%),
    linear-gradient(180deg, hsl(var(--card) / 0.98), hsl(var(--bg2) / 0.9));
  box-shadow:
    0 34px 80px -36px hsl(var(--shadow) / 0.96),
    0 18px 36px -24px hsl(var(--primaryGlow) / 0.36);
  backdrop-filter: blur(calc(var(--blur) + 3px));
  animation: mediaPromptSlide .18s ease both;
}

.discord-media-prompt-kicker {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: hsl(var(--muted-foreground));
}

.discord-media-prompt-title {
  margin-top: 0.45rem;
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-size: 1.25rem;
  line-height: 1.2;
  color: hsl(var(--foreground));
}

.discord-media-prompt-body {
  margin-top: 0.65rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: hsl(var(--foreground));
}

.discord-media-prompt-list {
  margin-top: 0.8rem;
  display: grid;
  gap: 0.45rem;
  padding-left: 1.1rem;
  color: hsl(var(--muted-foreground));
  font-size: 0.82rem;
  line-height: 1.5;
}

.discord-media-prompt-footnote {
  margin-top: 0.9rem;
  border-top: 1px solid hsl(var(--border) / 0.64);
  padding-top: 0.8rem;
  font-size: 0.76rem;
  line-height: 1.45;
  color: hsl(var(--muted-foreground));
}

.discord-media-prompt-actions {
  margin-top: 1rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
}

.discord-user-name-line {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  min-width: 0;
}

.discord-user-live-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: hsl(var(--destructive));
  color: hsl(var(--destructive-foreground));
  padding: .12rem .36rem;
  font-size: .58rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

@keyframes mediaPromptSlide {
  from {
    opacity: 0;
    transform: translate3d(0, -10px, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.discord-user-list {
  border-left: 1px solid hsl(var(--border)/0.5);
  background: linear-gradient(180deg, hsl(var(--card)/0.9), hsl(var(--background)/0.86));
  display: flex;
  flex-direction: column;
}

.discord-user-header {
  height: 3.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 .75rem;
  border-bottom: 1px solid hsl(var(--border)/0.5);
  font-size: .73rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: hsl(var(--muted-foreground));
  font-weight: 700;
}

.discord-user-scroll {
  overflow: auto;
  padding: .65rem;
  display: grid;
  gap: .42rem;
}

.discord-user-row {
  border: 1px solid hsl(var(--border)/0.58);
  border-radius: .48rem;
  background: hsl(var(--background)/0.36);
  padding: .43rem .48rem;
  display: flex;
  gap: .5rem;
  align-items: center;
}

.discord-user-row.is-watchable {
  cursor: pointer;
}

.discord-user-row.is-speaking {
  border-color: color-mix(in oklab, hsl(var(--accent)) 56%, hsl(var(--destructive)) 40%);
  box-shadow: 0 0 10px hsl(var(--accent)/0.2), 0 0 8px hsl(var(--destructive)/0.14);
}

.discord-user-avatar {
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 999px;
  border: 1px solid hsl(var(--border));
  display: grid;
  place-items: center;
  font-size: .66rem;
  font-weight: 700;
  color: hsl(var(--foreground));
  overflow: hidden;
  transition: box-shadow .16s ease, border-color .16s ease;
}

.discord-user-avatar-sm {
  width: 1.4rem;
  height: 1.4rem;
}

.discord-user-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 999px;
}

.discord-user-avatar-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}

.discord-user-row:hover .discord-user-avatar,
.discord-message:hover .discord-user-avatar {
  border-color: color-mix(in oklab, hsl(var(--accent)) 54%, hsl(var(--destructive)) 42%);
  box-shadow: 0 0 10px hsl(var(--accent)/0.22), 0 0 8px hsl(var(--destructive)/0.18);
}

.discord-user-row.is-speaking .discord-user-avatar {
  border-color: color-mix(in oklab, hsl(var(--accent)) 66%, hsl(var(--destructive)) 52%);
  box-shadow: 0 0 12px hsl(var(--accent)/0.34), 0 0 10px hsl(var(--destructive)/0.26);
}

.discord-user-name {
  font-size: .79rem;
  color: hsl(var(--foreground));
  font-weight: 600;
}

.discord-user-rank {
  font-size: .68rem;
  color: hsl(var(--muted-foreground));
}

.voice-activity-orb {
  width: .48rem;
  height: .48rem;
  border-radius: 999px;
  background: hsl(var(--muted));
  margin-left: auto;
}

.voice-activity-orb.is-active {
  background: hsl(var(--destructive));
  box-shadow: 0 0 10px hsl(var(--destructive)/0.76), 0 0 14px hsl(var(--destructive)/0.5), 0 0 8px hsl(var(--accent)/0.24);
  animation: voicePulse 1s ease-in-out infinite;
}

.voice-volume-slider {
  width: 4.5rem;
  accent-color: hsl(var(--destructive));
}

.voice-mod-btn {
  border: 1px solid color-mix(in oklab, hsl(var(--accent)) 32%, hsl(var(--destructive)) 34%);
  border-radius: .4rem;
  background: linear-gradient(130deg, hsl(var(--background)/0.72), hsl(var(--destructive)/0.26));
  color: hsl(var(--foreground));
  font-size: .65rem;
  padding: .15rem .35rem;
}

.voice-mod-btn:hover {
  box-shadow: 0 0 9px hsl(var(--destructive)/0.22), 0 0 8px hsl(var(--accent)/0.18);
}

@keyframes voicePulse {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.2); opacity: 1; }
}

.discord-empty {
  font-size: .74rem;
  color: hsl(var(--muted-foreground));
  padding: .4rem;
}

@media (max-width: 1200px) {
  .discord-shell {
    grid-template-columns: 3.9rem 15rem 1fr;
  }
  .discord-user-list {
    display: none;
  }
}

@media (max-width: 900px) {
  .discord-shell {
    grid-template-columns: 3.9rem 1fr;
  }
  .discord-channel-list {
    display: none;
  }
}

.discord-rail {
  display: flex;
  flex-direction: column;
  gap: .85rem;
}

.discord-channel-group {
  border: 1px solid color-mix(in oklab, hsl(var(--accent)) 22%, hsl(var(--destructive)) 18%);
  border-radius: var(--radius-sm);
  background: linear-gradient(155deg, hsl(var(--background)/0.6), hsl(var(--background)/0.42));
  padding: .55rem;
}

.discord-channel-group-title {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: hsl(var(--muted-foreground));
  margin-bottom: .45rem;
}

.discord-channel-row {
  display: flex;
  align-items: center;
  gap: .5rem;
  border-radius: .45rem;
  padding: .36rem .45rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: .16s ease;
}

.discord-channel-row:hover {
  border-color: color-mix(in oklab, hsl(var(--accent)) 32%, hsl(var(--destructive)) 26%);
  background: linear-gradient(135deg, hsl(var(--accent)/0.12), hsl(var(--destructive)/0.1));
}

.discord-channel-row.is-active {
  border-color: color-mix(in oklab, hsl(var(--accent)) 58%, hsl(var(--destructive)) 40%);
  background: linear-gradient(135deg, hsl(var(--accent)/0.22), hsl(var(--destructive)/0.18));
  box-shadow: 0 0 16px hsl(var(--accent)/0.16), 0 0 14px hsl(var(--destructive)/0.14);
}

.discord-channel-icon {
  width: 1rem;
  text-align: center;
  color: hsl(var(--muted-foreground));
  font-size: .82rem;
  line-height: 1;
}

.discord-channel-name {
  color: hsl(var(--foreground));
  font-size: .84rem;
  font-weight: 600;
}

.discord-channel-sub {
  margin-left: 1.55rem;
  margin-top: .1rem;
  margin-bottom: .35rem;
  font-size: .67rem;
  color: hsl(var(--muted-foreground));
}

.discord-voice-regiment {
  border: 1px solid hsl(var(--border)/0.7);
  border-radius: .45rem;
  background: hsl(var(--background)/0.34);
  padding: .4rem;
}

.discord-voice-row {
  border: 1px solid hsl(var(--border)/0.6);
  border-radius: .45rem;
  background: linear-gradient(145deg, hsl(var(--background)/0.62), hsl(var(--background)/0.48));
  padding: .4rem .45rem;
}

.chat-channel-tile {
  display: block;
  border-radius: var(--radius-sm);
  border: 1px solid color-mix(in oklab, hsl(var(--accent)) 30%, hsl(var(--destructive)) 26%);
  background: linear-gradient(145deg, hsl(var(--background)/0.7), hsl(var(--background)/0.48));
  padding: .7rem .8rem;
  text-decoration: none;
  transition: .18s ease;
}

.chat-channel-title { color: hsl(var(--foreground)); font-weight: 700; }
.chat-channel-meta { font-size: .72rem; color: hsl(var(--muted-foreground)); margin-top: .1rem; }

.chat-channel-tile:hover {
  transform: translateX(2px);
  box-shadow: 0 0 20px hsl(var(--accent)/0.2), 0 0 18px hsl(var(--destructive)/0.18);
}

.chat-channel-tile.is-active {
  box-shadow: inset 0 0 0 1px hsl(var(--accent)/0.62), 0 0 28px hsl(var(--accent)/0.26), 0 0 24px hsl(var(--destructive)/0.24);
  background: linear-gradient(145deg, hsl(var(--accent)/0.2), hsl(var(--destructive)/0.18));
}

.chat-channel-tile.is-private {
  border-color: color-mix(in oklab, hsl(var(--accent)) 48%, hsl(var(--destructive)) 44%);
  background: linear-gradient(140deg, hsl(var(--accent)/0.14), hsl(var(--destructive)/0.14));
}

.secure-dm-banner {
  border: 1px solid color-mix(in oklab, hsl(var(--accent)) 50%, hsl(var(--destructive)) 46%);
  border-radius: var(--radius-sm);
  background: linear-gradient(145deg, hsl(var(--accent)/0.2), hsl(var(--destructive)/0.18));
  color: hsl(var(--foreground));
  padding: .55rem .7rem;
  font-size: .78rem;
}

.chat-message-bubble {
  border-radius: var(--radius-sm);
  border: 1px solid color-mix(in oklab, hsl(var(--accent)) 28%, hsl(var(--destructive)) 22%);
  background: linear-gradient(145deg, hsl(var(--background)/0.66), hsl(var(--background)/0.46));
  padding: .7rem .8rem;
  animation: chatReveal .18s ease both;
}

.chat-message-bubble.is-system {
  border-color: color-mix(in oklab, hsl(var(--destructive)) 46%, hsl(var(--accent)) 30%);
  background: linear-gradient(145deg, hsl(var(--destructive)/0.2), hsl(var(--background)/0.55));
}

.chat-message-bubble.is-announcement {
  box-shadow: 0 0 18px hsl(var(--accent)/0.18), 0 0 16px hsl(var(--destructive)/0.14);
}

.chat-message-meta {
  font-size: .72rem;
  color: hsl(var(--muted-foreground));
}

.chat-input-shell {
  border-top: 1px solid color-mix(in oklab, hsl(var(--accent)) 22%, hsl(var(--destructive)) 20%);
  padding-top: .9rem;
}

.voice-channel-tile {
  border: 1px solid color-mix(in oklab, hsl(var(--accent)) 28%, hsl(var(--destructive)) 24%);
  border-radius: var(--radius-sm);
  background: linear-gradient(145deg, hsl(var(--background)/0.65), hsl(var(--background)/0.45));
  padding: .55rem .6rem;
}

.voice-user-tile {
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-sm);
  background: hsl(var(--background)/0.45);
  padding: .45rem .55rem;
}

.voice-user-tile.is-speaking {
  border-color: color-mix(in oklab, hsl(var(--accent)) 65%, hsl(var(--destructive)) 42%);
  box-shadow: 0 0 12px hsl(var(--accent)/0.28), 0 0 10px hsl(var(--destructive)/0.2);
}

/* Rich documents */
.docs-share-dropdown {
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-sm);
  background: hsl(var(--card) / 0.42);
  padding: 0.55rem 0.65rem;
}

.docs-share-regiment-row {
  border: 1px solid hsl(var(--border) / 0.9);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.55rem;
  background: hsl(var(--background) / 0.4);
}

.docs-share-regiment-head {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.docs-share-regiment-check {
  width: 16px;
  height: 16px;
  accent-color: hsl(var(--ring));
  appearance: auto;
}

.docs-share-regiment-toggle {
  flex: 1;
  border: 1px solid hsl(var(--border));
  border-radius: 8px;
  background: transparent;
  color: hsl(var(--foreground));
  padding: 0.3rem 0.45rem;
  text-align: left;
  font-size: 0.8rem;
}

.docs-share-regiment-toggle:hover {
  border-color: hsl(var(--ring) / 0.7);
  background: hsl(var(--muted) / 0.25);
}

.docs-share-ranks {
  margin-top: 0.45rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.docs-share-role-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
  border: 1px solid hsl(var(--border));
  border-radius: 8px;
  background: transparent;
  color: hsl(var(--muted-foreground));
  padding: 0.27rem 0.45rem;
  text-align: left;
  font-size: 0.75rem;
}

.docs-share-role-btn:hover:not(:disabled) {
  border-color: hsl(var(--ring) / 0.7);
  color: hsl(var(--foreground));
}

.docs-share-role-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.docs-share-role-btn.is-selected {
  border-color: hsl(var(--ring));
  color: hsl(var(--foreground));
  background: hsl(var(--primary) / 0.12);
}

.docs-share-role-tick {
  width: 1rem;
  text-align: center;
  color: hsl(var(--ring));
  font-weight: 700;
}

.doc-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  align-items: center;
}

.doc-toolbar button {
  border: 1px solid color-mix(in oklab, hsl(var(--accent)) 34%, hsl(var(--destructive)) 30%);
  background: linear-gradient(145deg, hsl(var(--background)/0.8), hsl(var(--background)/0.58));
  color: hsl(var(--foreground));
  border-radius: .55rem;
  font-size: .78rem;
  padding: .32rem .62rem;
  transition: .18s ease;
}

.doc-toolbar button:hover {
  box-shadow: 0 8px 22px hsl(var(--accent)/0.16);
}

.doc-toolbar select {
  min-height: 2rem;
  border-radius: .55rem;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--background)/0.78);
  color: hsl(var(--foreground));
  padding: .25rem .5rem;
}

.doc-editor {
  min-height: 18rem;
  border-radius: var(--radius-sm);
  border: 1px solid color-mix(in oklab, hsl(var(--accent)) 34%, hsl(var(--destructive)) 28%);
  background: linear-gradient(150deg, hsl(var(--background)/0.82), hsl(var(--background)/0.62));
  box-shadow: inset 0 0 0 1px hsl(var(--background)/0.4);
  padding: .85rem;
  color: hsl(var(--foreground));
  line-height: 1.55;
}

.doc-editor:focus {
  outline: none;
  box-shadow: inset 0 0 0 1px hsl(var(--accent)/0.36), 0 0 20px hsl(var(--accent)/0.18), 0 0 16px hsl(var(--destructive)/0.16);
}

.doc-editor .ProseMirror {
  min-height: 16rem;
  outline: none;
}

.doc-editor .ProseMirror table {
  width: 100%;
  border-collapse: collapse;
}

.doc-editor .ProseMirror td,
.doc-editor .ProseMirror th {
  border: 1px solid hsl(var(--border));
  padding: .4rem .5rem;
}

.doc-editor-gdocs {
  min-height: 65vh;
  border-color: color-mix(in oklab, hsl(var(--accent)) 25%, hsl(var(--border)) 75%);
  background:
    linear-gradient(180deg, hsl(var(--background)/0.86), hsl(var(--background)/0.72)),
    radial-gradient(circle at top right, hsl(var(--accent)/0.06), transparent 40%);
}

.doc-editor-gdocs .ProseMirror {
  min-height: 60vh;
  max-width: 52rem;
  margin: 0 auto;
  background: hsl(var(--card)/0.82);
  border: 1px solid hsl(var(--border)/0.75);
  border-radius: calc(var(--radius-sm) + 2px);
  padding: 2rem 2.1rem;
  box-shadow: 0 18px 40px hsl(var(--background)/0.4);
}

.doc-editor-shell-full {
  grid-column: 1 / -1;
}

.docs-workspace {
  display: grid;
  gap: 1rem;
}

.docs-topbar {
  border: 1px solid hsl(var(--border)/0.7);
  border-radius: var(--radius);
  background: linear-gradient(145deg, hsl(var(--card)/0.82), hsl(var(--background)/0.76));
  padding: .9rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  flex-wrap: wrap;
}

.docs-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: hsl(var(--foreground));
}

.docs-subtitle {
  color: hsl(var(--muted-foreground));
  font-size: .82rem;
}

.docs-topbar-actions {
  display: inline-flex;
  gap: .45rem;
  flex-wrap: wrap;
}

.docs-layout {
  display: grid;
  grid-template-columns: 17rem minmax(0, 1fr) 20rem;
  gap: .9rem;
  min-height: 70vh;
}

.docs-explorer,
.docs-editor-shell,
.docs-sidepanel {
  border: 1px solid hsl(var(--border)/0.7);
  border-radius: var(--radius);
  background: linear-gradient(145deg, hsl(var(--card)/0.84), hsl(var(--background)/0.76));
}

.docs-explorer,
.docs-sidepanel {
  padding: .7rem;
}

.docs-explorer-head {
  display: grid;
  gap: .45rem;
}

.docs-filter-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .4rem;
}

.docs-list {
  margin-top: .6rem;
  display: grid;
  gap: .42rem;
  max-height: 62vh;
  overflow: auto;
}

.docs-regiment-group {
  display: grid;
  gap: .35rem;
}

.docs-regiment-heading {
  font-size: .66rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: hsl(var(--muted-foreground));
  border-bottom: 1px solid hsl(var(--border) / 0.75);
  padding-bottom: .2rem;
}

.docs-regiment-list {
  display: grid;
  gap: .35rem;
}

.docs-doc-row {
  display: flex;
  align-items: stretch;
  gap: .35rem;
}

.docs-doc-row .chat-channel-tile {
  flex: 1;
}

.docs-doc-row.is-draggable .chat-channel-tile {
  cursor: grab;
}

.docs-doc-row.is-dragging {
  opacity: .55;
}

.docs-doc-row.is-drag-over .chat-channel-tile {
  border-color: hsl(var(--ring));
  box-shadow: 0 0 0 1px hsl(var(--ring) / 0.5);
}

.docs-doc-drag-handle {
  width: 2rem;
  min-width: 2rem;
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-sm);
  background: hsl(var(--background) / 0.52);
  color: hsl(var(--muted-foreground));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .88rem;
  line-height: 1;
  cursor: grab;
  user-select: none;
}

.docs-doc-drag-handle.is-disabled {
  opacity: .45;
  cursor: not-allowed;
}

.docs-editor-shell {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: .5rem;
  padding: .6rem;
}

.docs-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  flex-wrap: wrap;
}

.docs-status-wrap {
  font-size: .72rem;
  color: hsl(var(--muted-foreground));
  display: inline-flex;
  align-items: center;
  gap: .3rem;
}

.docs-side-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .32rem;
}

.docs-tab-btn {
  border: 1px solid hsl(var(--border));
  border-radius: .46rem;
  background: hsl(var(--background)/0.45);
  color: hsl(var(--muted-foreground));
  font-size: .67rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: .3rem .2rem;
}

.docs-tab-btn.is-active {
  color: hsl(var(--foreground));
  border-color: color-mix(in oklab, hsl(var(--accent)) 45%, hsl(var(--destructive)) 35%);
  background: linear-gradient(130deg, hsl(var(--accent)/0.22), hsl(var(--destructive)/0.2));
}

.docs-tab {
  display: none;
  margin-top: .7rem;
  gap: .45rem;
}

.docs-tab.is-active {
  display: grid;
}

.docs-panel-title {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: hsl(var(--muted-foreground));
}

.docs-list-compact {
  display: grid;
  gap: .4rem;
  max-height: 40vh;
  overflow: auto;
}

@media (max-width: 1280px) {
  .docs-layout {
    grid-template-columns: 15rem minmax(0, 1fr);
  }

  .docs-sidepanel {
    grid-column: 1 / -1;
  }
}

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

.doc-preview {
  max-height: 13rem;
  overflow: auto;
  border: 1px solid hsl(var(--border)/0.7);
  border-radius: var(--radius-sm);
  background: hsl(var(--background)/0.44);
  padding: .7rem;
}

/* Stack all table shells into card rows */
.table-shell,
.table-shell table,
.table-shell thead,
.table-shell tbody,
.table-shell tr,
.table-shell th,
.table-shell td {
  display: block;
  width: 100%;
}

.table-shell thead {
  display: none;
}

.table-shell tbody {
  display: grid;
  gap: .65rem;
}

.table-shell tbody tr {
  border-radius: var(--radius-sm);
  border: 1px solid color-mix(in oklab, hsl(var(--accent)) 28%, hsl(var(--destructive)) 24%);
  background: linear-gradient(145deg, hsl(var(--background)/0.66), hsl(var(--background)/0.46));
  padding: .7rem .8rem;
}

.table-shell tbody td {
  border: 0 !important;
  border-radius: 0 !important;
  padding: .18rem 0 !important;
}

/* Utility for inline action buttons in JS-rendered rows */
.command-inline-btn {
  border: 1px solid color-mix(in oklab, hsl(var(--accent)) 34%, hsl(var(--destructive)) 28%);
  background: linear-gradient(140deg, hsl(var(--background)/0.78), hsl(var(--background)/0.56));
  color: hsl(var(--foreground));
  border-radius: .48rem;
  font-size: .73rem;
  padding: .26rem .55rem;
}

.command-inline-btn-red {
  border-color: color-mix(in oklab, hsl(var(--destructive)) 55%, hsl(var(--accent)) 24%);
  color: hsl(var(--destructive-foreground));
  background: linear-gradient(140deg, hsl(var(--destructive)/0.62), hsl(var(--accent)/0.42));
}

.command-status-pill {
  display: inline-flex;
  border-radius: 999px;
  padding: .1rem .45rem;
  font-size: .66rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  background: linear-gradient(130deg, hsl(var(--accent)/0.24), hsl(var(--destructive)/0.2));
}

@keyframes chatReveal {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Premium overhaul layer */
:root {
  --radius: 1.45rem;
  --radius-md: 1rem;
  --radius-sm: 0.88rem;
}

html,
body {
  background: hsl(var(--bg));
}

body {
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: hsl(var(--text));
}

h1,
h2,
h3,
h4,
.loader-logo,
.panel-nav-item > span:first-of-type {
  font-family: "Space Grotesk", "Manrope", sans-serif;
}

.panel-shell {
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 12%, hsl(var(--gradB) / 0.18), transparent 34%),
    radial-gradient(circle at 88% 18%, hsl(var(--gradC) / 0.16), transparent 32%),
    radial-gradient(circle at 55% 88%, hsl(var(--gradA) / 0.14), transparent 28%),
    linear-gradient(180deg, hsl(var(--bg)), hsl(var(--bg2)));
}

.panel-ribbon-layer,
.panel-grain-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.panel-ribbon-layer {
  opacity: 0.95;
  background:
    radial-gradient(circle at 20% 18%, hsl(var(--primaryGlow) / 0.26), transparent 38%),
    radial-gradient(circle at 80% 20%, hsl(var(--primary2) / 0.21), transparent 34%),
    radial-gradient(circle at 68% 72%, hsl(var(--success) / 0.15), transparent 28%);
}

.panel-ribbon-layer::before,
.panel-ribbon-layer::after {
  content: "";
  position: absolute;
  inset: auto;
  width: min(58vw, 52rem);
  height: min(22vw, 17rem);
  border-radius: 999px;
  filter: blur(28px);
  opacity: 0.7;
  transform: rotate(-14deg);
  background:
    linear-gradient(90deg, transparent 0%, hsl(var(--gradB) / 0.5) 18%, hsl(var(--gradC) / 0.38) 56%, transparent 100%);
  mask-image: radial-gradient(circle at center, black 52%, transparent 76%);
}

.panel-ribbon-layer::before {
  top: 4rem;
  left: -8rem;
}

.panel-ribbon-layer::after {
  right: -10rem;
  bottom: 5rem;
  transform: rotate(18deg);
  background:
    linear-gradient(90deg, transparent 0%, hsl(var(--gradA) / 0.42) 16%, hsl(var(--success) / 0.28) 52%, transparent 100%);
}

.panel-grain-layer {
  opacity: 0.07;
  background-image:
    linear-gradient(0deg, transparent 24%, rgba(255,255,255,0.42) 25%, transparent 26%),
    linear-gradient(90deg, transparent 24%, rgba(255,255,255,0.38) 25%, transparent 26%);
  background-size: 5px 5px;
  mix-blend-mode: soft-light;
}

.panel-shell::before {
  opacity: max(var(--theme-image-opacity, var(--theme-watermark-opacity, 0.06)), 0.08);
  mix-blend-mode: screen;
  filter: blur(calc(var(--theme-image-blur, 0px) + 6px));
}

.panel-shell::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    linear-gradient(180deg, transparent 0%, hsl(var(--bg) / 0.16) 58%, hsl(var(--bg) / 0.72) 100%);
}

.panel-shell > * {
  position: relative;
  z-index: 1;
}

.panel-sidebar,
.panel-surface,
.command-surface,
.command-select-menu,
.command-modal,
.discord-shell-card {
  background:
    linear-gradient(180deg, hsl(var(--card) / 0.82), hsl(var(--card2) / 0.66));
  border: 1px solid hsl(var(--border) / 0.82);
  box-shadow: var(--panel-shadow);
  backdrop-filter: blur(var(--blur));
}

.panel-sidebar {
  background:
    linear-gradient(180deg, hsl(var(--card) / 0.9), hsl(var(--bg2) / 0.86));
  border-color: hsl(var(--primary) / 0.12);
}

.panel-sidebar::before,
.panel-surface::before,
.command-surface::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg, hsl(var(--text) / 0.06), transparent 24%);
}

.panel-surface {
  position: relative;
  overflow: hidden;
}

.panel-nav-item,
.panel-sub-item,
.panel-quick-item {
  position: relative;
  border: 1px solid transparent;
  border-radius: calc(var(--radius-sm) - 2px);
  color: hsl(var(--muted2));
  transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.panel-nav-item:hover,
.panel-sub-item:hover,
.panel-quick-item:hover,
.panel-nav-item.is-active,
.panel-sub-item.is-active {
  color: hsl(var(--text));
  border-color: hsl(var(--primary2) / 0.24);
  background:
    linear-gradient(135deg, hsl(var(--primary) / 0.16), hsl(var(--card) / 0.66));
  box-shadow: 0 24px 55px -36px hsl(var(--primaryGlow) / 0.8);
  transform: translateX(2px);
}

.panel-nav-item.is-active::after,
.panel-sub-item.is-active::after {
  content: "";
  position: absolute;
  top: 0.65rem;
  bottom: 0.65rem;
  left: 0.55rem;
  width: 2px;
  border-radius: 999px;
  background: linear-gradient(180deg, hsl(var(--gradB)), hsl(var(--gradC)));
}

.panel-nav-item-accent {
  border-color: hsl(var(--primary2) / 0.2);
  background: linear-gradient(135deg, hsl(var(--primary2) / 0.1), transparent);
}

.command-surface,
.command-accent {
  position: relative;
  overflow: hidden;
}

.command-surface-header {
  color: hsl(var(--muted2));
}

.command-btn {
  transform: translateY(0);
}

.command-btn:hover {
  transform: translateY(-1px);
}

.command-btn-primary {
  border-color: hsl(var(--primaryGlow) / 0.2);
  background:
    linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(var(--primary2)) 54%, hsl(var(--success) / 0.9) 100%);
}

.command-btn-secondary {
  border-color: hsl(var(--border) / 0.92);
  background:
    linear-gradient(180deg, hsl(var(--panel) / 0.96), hsl(var(--bg2) / 0.86));
}

.command-btn-outline {
  border-color: hsl(var(--border) / 0.9);
  background: hsl(var(--panel) / 0.48);
}

.command-btn-red {
  border-color: hsl(var(--danger) / 0.28);
  background:
    linear-gradient(135deg, hsl(var(--danger) / 0.88), color-mix(in oklab, hsl(var(--danger)) 70%, hsl(var(--primary2)) 30%));
}

.command-input,
.command-select-native,
textarea.command-input {
  color-scheme: dark;
}

.command-input::placeholder,
textarea.command-input::placeholder {
  color: hsl(var(--muted2));
}

input[type="color"].command-input {
  min-width: 3.5rem;
  padding: 0.3rem;
}

.empty-state {
  border: 1px dashed hsl(var(--border) / 0.75);
  border-radius: calc(var(--radius-sm) - 1px);
  background: linear-gradient(180deg, hsl(var(--panel) / 0.74), hsl(var(--bg2) / 0.5));
  color: hsl(var(--muted2));
  padding: 1rem 1.1rem;
}

.command-row,
.roster-row,
.friend-row,
.friend-request-row {
  border: 1px solid hsl(var(--border) / 0.78);
  border-radius: calc(var(--radius-sm) - 1px);
  background: linear-gradient(180deg, hsl(var(--panel) / 0.8), hsl(var(--bg2) / 0.62));
  box-shadow: 0 18px 40px -34px hsl(var(--shadow) / 0.85);
}

.command-row-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.command-row-title {
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-weight: 700;
  color: hsl(var(--text));
}

.command-row-kv {
  margin-top: 0.65rem;
  display: grid;
  gap: 0.35rem 1rem;
  color: hsl(var(--muted2));
}

@media (min-width: 640px) {
  .command-row-kv {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.command-select-menu {
  border-radius: calc(var(--radius-sm) - 2px);
}

.panel-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid hsl(var(--border) / 0.82);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at top left, hsl(var(--primaryGlow) / 0.18), transparent 40%),
    radial-gradient(circle at bottom right, hsl(var(--success) / 0.12), transparent 32%),
    linear-gradient(180deg, hsl(var(--card) / 0.88), hsl(var(--bg2) / 0.76));
  box-shadow: var(--panel-shadow);
  padding: clamp(1.35rem, 2vw, 2rem);
  backdrop-filter: blur(var(--blur));
}

.panel-hero > * {
  position: relative;
  z-index: 1;
}

.panel-hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -55% 42%;
  height: 16rem;
  border-radius: 999px;
  background: linear-gradient(90deg, hsl(var(--gradB) / 0.18), hsl(var(--gradC) / 0.06));
  filter: blur(34px);
  pointer-events: none;
}

.panel-kicker {
  color: hsl(var(--muted2));
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.panel-section-shell {
  border: 1px solid hsl(var(--border) / 0.78);
  border-radius: var(--radius);
  background: linear-gradient(180deg, hsl(var(--card) / 0.84), hsl(var(--card2) / 0.66));
  box-shadow: var(--panel-shadow);
  backdrop-filter: blur(var(--blur));
}

.panel-stat-grid {
  display: grid;
  gap: 1rem;
}

.panel-stat {
  position: relative;
  overflow: hidden;
  border: 1px solid hsl(var(--border) / 0.74);
  border-radius: calc(var(--radius-sm) - 1px);
  background: linear-gradient(180deg, hsl(var(--panel) / 0.82), hsl(var(--bg2) / 0.62));
  padding: 1rem;
}

.panel-stat::before {
  content: "";
  position: absolute;
  inset: auto -18% -40% auto;
  width: 8rem;
  height: 8rem;
  border-radius: 999px;
  background: radial-gradient(circle, hsl(var(--primaryGlow) / 0.26), transparent 72%);
}

.panel-stat-label {
  color: hsl(var(--muted2));
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.panel-stat-value {
  position: relative;
  z-index: 1;
  margin-top: 0.55rem;
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-size: clamp(1.4rem, 2vw, 2rem);
  font-weight: 700;
  color: hsl(var(--text));
}

.panel-muted-copy {
  color: hsl(var(--muted2));
}

.panel-topbar {
  overflow: visible;
}

.panel-notification-wrap {
  position: static;
}

.panel-notification-backdrop {
  position: fixed;
  inset: 0;
  z-index: 164;
  background:
    linear-gradient(180deg, hsl(var(--shadow) / 0.18), hsl(var(--shadow) / 0.4)),
    radial-gradient(circle at right center, hsl(var(--primaryGlow) / 0.12), transparent 34%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.panel-notification-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.panel-notification-dropdown {
  position: fixed;
  z-index: 170;
  top: 0.75rem;
  right: 0.75rem;
  bottom: 0.75rem;
  width: min(28rem, calc(100vw - 1.5rem));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid hsl(var(--border) / 0.88);
  background:
    radial-gradient(circle at top right, hsl(var(--primaryGlow) / 0.18), transparent 34%),
    linear-gradient(180deg, hsl(var(--card) / 0.96), hsl(var(--card2) / 0.88));
  box-shadow:
    0 24px 70px -34px hsl(var(--shadow) / 0.95),
    0 18px 42px -28px hsl(var(--primaryGlow) / 0.42);
  backdrop-filter: blur(calc(var(--blur) + 2px));
  transform: translateX(calc(100% + 1rem));
  opacity: 0;
  pointer-events: none;
  transition: transform 220ms ease, opacity 220ms ease;
}

.panel-notification-dropdown.is-open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.panel-notification-dropdown::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, hsl(var(--text) / 0.06), transparent 22%),
    radial-gradient(circle at 88% 12%, hsl(var(--gradA) / 0.14), transparent 22%);
}

.panel-notification-drawer-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1rem 0.9rem;
  border-bottom: 1px solid hsl(var(--border) / 0.72);
  background:
    linear-gradient(180deg, hsl(var(--foreground) / 0.04), transparent 76%),
    linear-gradient(135deg, hsl(var(--card) / 0.92), hsl(var(--card2) / 0.82));
}

.panel-notification-drawer-body {
  position: relative;
  z-index: 1;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0.85rem;
}

.notification-item {
  position: relative;
  overflow: hidden;
  border-color: hsl(var(--border) / 0.78) !important;
  background:
    linear-gradient(180deg, hsl(var(--panel) / 0.88), hsl(var(--bg2) / 0.68)) !important;
  box-shadow: 0 18px 30px -32px hsl(var(--shadow) / 0.85);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.notification-item:hover {
  transform: translateY(-1px);
  border-color: hsl(var(--primary) / 0.54) !important;
  box-shadow:
    0 24px 40px -30px hsl(var(--primaryGlow) / 0.45),
    0 0 0 1px hsl(var(--text) / 0.04) inset;
}

.notification-item::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, hsl(var(--gradA)), hsl(var(--gradB)), hsl(var(--gradC)));
  opacity: 0.9;
}

@media (max-width: 640px) {
  .panel-notification-dropdown {
    top: 0.5rem;
    right: 0.5rem;
    bottom: 0.5rem;
    width: calc(100vw - 1rem);
  }
}

.discord-shell {
  position: relative;
  display: grid;
  grid-template-columns: 5rem 21rem minmax(0, 1fr) 19rem;
  gap: 1rem;
  height: calc(100vh - 0.15rem);
  width: 100%;
  padding: 0.2rem;
  background: transparent;
}

.discord-shell::before {
  background-position: right -3rem bottom -3rem;
  background-size: min(34vw, 520px);
  opacity: 0.11;
}

.discord-regiment-bar,
.discord-channel-list,
.discord-main-area,
.discord-user-list {
  position: relative;
  min-height: 0;
  overflow: hidden;
  border: 1px solid hsl(var(--border) / 0.82);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, hsl(var(--card) / 0.9), hsl(var(--card2) / 0.76));
  box-shadow: var(--panel-shadow);
  backdrop-filter: blur(var(--blur));
}

.discord-regiment-bar::before,
.discord-channel-list::before,
.discord-main-area::before,
.discord-user-list::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg, hsl(var(--text) / 0.05), transparent 16%);
}

.discord-regiment-bar {
  gap: 0.85rem;
  padding: 1rem 0.6rem;
  align-items: center;
  background:
    radial-gradient(circle at top, hsl(var(--gradA) / 0.16), transparent 30%),
    linear-gradient(180deg, hsl(var(--card) / 0.96), hsl(var(--bg2) / 0.88));
}

.discord-regiment-scroll {
  width: 100%;
  padding-right: 0.1rem;
}

.discord-regiment-home,
.discord-regiment-tile {
  width: 3.1rem;
  height: 3.1rem;
  margin: 0 auto;
  border-radius: 1.1rem;
  border: 1px solid hsl(var(--border) / 0.8);
  background:
    linear-gradient(180deg, hsl(var(--panel) / 0.92), hsl(var(--bg2) / 0.72));
  box-shadow: 0 20px 28px -28px hsl(var(--shadow) / 0.95);
}

.discord-regiment-home {
  font-size: 1rem;
}

.discord-regiment-home:hover,
.discord-regiment-tile:hover,
.discord-regiment-tile.is-active {
  transform: translateY(-1px);
  border-color: hsl(var(--primary) / 0.56);
  background:
    linear-gradient(180deg, hsl(var(--panel) / 0.94), hsl(var(--bg2) / 0.74)),
    radial-gradient(circle at top, hsl(var(--primaryGlow) / 0.16), transparent 40%);
}

.discord-channel-list {
  padding: 0.75rem 0.7rem 0.7rem;
  background:
    radial-gradient(circle at top right, hsl(var(--gradB) / 0.12), transparent 26%),
    linear-gradient(180deg, hsl(var(--card) / 0.94), hsl(var(--bg2) / 0.84));
}

.discord-channel-header {
  margin-bottom: 0.8rem;
}

.discord-channel-header-copy {
  display: grid;
  gap: 0.18rem;
}

.discord-channel-header-title,
.discord-room-hero-kicker,
.discord-channel-banner-kicker,
.discord-voice-stage-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: hsl(var(--muted2));
}

.discord-channel-header-subtitle {
  color: hsl(var(--muted2));
  font-size: 0.78rem;
  line-height: 1.4;
}

.discord-channel-banner {
  margin-bottom: 0.65rem;
  padding: 0.75rem 0.8rem;
  border-radius: calc(var(--radius-sm) + 2px);
  background:
    radial-gradient(circle at top right, hsl(var(--gradA) / 0.16), transparent 28%),
    linear-gradient(180deg, hsl(var(--panel) / 0.92), hsl(var(--bg2) / 0.72));
}

.discord-channel-banner-title,
.discord-room-hero-title,
.discord-voice-stage-title {
  margin-top: 0.45rem;
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: hsl(var(--text));
}

.discord-channel-banner-copy,
.discord-room-hero-copy {
  margin-top: 0.5rem;
  color: hsl(var(--muted2));
  font-size: 0.82rem;
  line-height: 1.55;
}

.discord-channel-banner-stats,
.discord-room-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.8rem;
}

.discord-channel-banner-stats span,
.discord-room-hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2rem;
  padding: 0.4rem 0.65rem;
  border-radius: 999px;
  border: 1px solid hsl(var(--border) / 0.75);
  background: hsl(var(--background) / 0.36);
  color: hsl(var(--muted2));
  font-size: 0.72rem;
}

.discord-channel-banner-stats strong,
.discord-room-hero-pill strong,
.discord-voice-stage-value {
  color: hsl(var(--text));
  font-weight: 700;
}

.discord-sidebar-tools {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 0.8rem;
}

.discord-sidebar-search {
  display: grid;
  gap: 0.35rem;
}

.discord-sidebar-search-label {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: hsl(var(--muted2));
  font-weight: 700;
}

.discord-filter-row {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.discord-channel-filter {
  min-height: 2rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid hsl(var(--border) / 0.75);
  background: hsl(var(--background) / 0.28);
  color: hsl(var(--muted2));
  font-size: 0.74rem;
  font-weight: 700;
}

.discord-channel-filter.is-active {
  border-color: hsl(var(--primary) / 0.7);
  background: linear-gradient(135deg, hsl(var(--primary) / 0.2), hsl(var(--gradA) / 0.16));
  color: hsl(var(--text));
}

.discord-sidebar-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.discord-sidebar-helper {
  border-radius: calc(var(--radius-sm) - 1px);
  border: 1px dashed hsl(var(--border) / 0.7);
  padding: 0.65rem 0.75rem;
  background: hsl(var(--background) / 0.18);
  color: hsl(var(--muted2));
  font-size: 0.76rem;
  line-height: 1.5;
}

.discord-sidebar-voice-panel {
  display: grid;
  gap: 0.7rem;
  padding: 0.8rem;
  border-radius: calc(var(--radius-sm) + 1px);
  border: 1px solid hsl(var(--border) / 0.75);
  background:
    radial-gradient(circle at top right, hsl(var(--gradA) / 0.12), transparent 28%),
    linear-gradient(180deg, hsl(var(--panel) / 0.86), hsl(var(--bg2) / 0.68));
}

.discord-sidebar-voice-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 0.7rem;
}

.discord-sidebar-voice-title {
  color: hsl(var(--text));
  font-size: 0.82rem;
  line-height: 1.45;
}

.discord-sidebar-voice-create {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem;
}

.discord-sidebar-voice-stats {
  display: grid;
  gap: 0.45rem;
}

.discord-sidebar-voice-stat {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.45rem 0.55rem;
  border-radius: 0.8rem;
  border: 1px solid hsl(var(--border) / 0.68);
  background: hsl(var(--background) / 0.24);
}

.discord-sidebar-voice-stat-label {
  color: hsl(var(--muted2));
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.discord-sidebar-voice-stat-value {
  color: hsl(var(--text));
  font-size: 0.77rem;
  font-weight: 700;
  text-align: right;
}

.discord-channel-scroll,
.discord-message-stream,
.discord-user-scroll {
  scrollbar-width: thin;
}

.discord-voice-regiment-block {
  border-radius: calc(var(--radius-sm) + 1px);
  border-color: hsl(var(--border) / 0.78);
  padding: 0.55rem;
  margin-bottom: 0.7rem;
  background:
    linear-gradient(180deg, hsl(var(--panel) / 0.78), hsl(var(--bg2) / 0.54));
  box-shadow: 0 18px 24px -28px hsl(var(--shadow) / 0.85);
}

.discord-category-title {
  min-height: 2.3rem;
  border-radius: calc(var(--radius-sm) - 3px);
  padding: 0.4rem 0.45rem;
  background: hsl(var(--background) / 0.22);
}

.discord-category-scope {
  border-radius: 999px;
  border: 1px solid hsl(var(--border) / 0.72);
  padding: 0.15rem 0.4rem;
  background: hsl(var(--background) / 0.34);
}

.discord-channel-row,
.discord-voice-row-main {
  min-height: 2.5rem;
  border-radius: 0.8rem;
  padding: 0.55rem 0.65rem;
}

.discord-channel-details {
  display: grid;
  min-width: 0;
  gap: 0.12rem;
  flex: 1 1 auto;
}

.discord-channel-row.is-active {
  box-shadow:
    0 18px 30px -26px hsl(var(--primaryGlow) / 0.48),
    inset 0 1px 0 hsl(var(--text) / 0.05);
}

.discord-voice-row {
  align-items: stretch;
  gap: 0.45rem;
}

.discord-voice-row-main {
  background: hsl(var(--background) / 0.16);
}

.discord-channel-row-meta {
  color: hsl(var(--muted2));
  font-size: 0.7rem;
  line-height: 1.35;
}

.discord-channel-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.16rem 0.48rem;
  border-radius: 999px;
  border: 1px solid hsl(var(--border) / 0.78);
  background: hsl(var(--background) / 0.35);
  color: hsl(var(--muted2));
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.discord-voice-delete,
.discord-plus-btn {
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 0.55rem;
  display: inline-grid;
  place-items: center;
}

.discord-main-area {
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at top right, hsl(var(--gradA) / 0.1), transparent 22%),
    linear-gradient(180deg, hsl(var(--card) / 0.92), hsl(var(--bg2) / 0.82));
}

.discord-main-header {
  min-height: 3.2rem;
  height: auto;
  padding: 0.4rem 0.75rem;
  border-bottom-color: hsl(var(--border) / 0.74);
}

.discord-main-header::after {
  background-position: right -1rem center;
  background-size: 260px;
  opacity: 0.08;
}

.discord-mode-header-rich {
  align-items: flex-start;
}

.discord-header-copy {
  display: grid;
  gap: 0.2rem;
}

.discord-main-title {
  font-size: 1.05rem;
  font-family: "Space Grotesk", "Manrope", sans-serif;
}

.discord-main-subtitle {
  display: none;
}

.discord-header-actions {
  gap: 0.55rem;
}

.discord-voice-dropdown,
.discord-floating-modal,
.discord-floating-menu {
  border-radius: calc(var(--radius-sm) + 3px);
  border: 1px solid hsl(var(--border) / 0.86);
  background:
    radial-gradient(circle at top right, hsl(var(--gradA) / 0.14), transparent 24%),
    linear-gradient(180deg, hsl(var(--card) / 0.96), hsl(var(--bg2) / 0.86));
  box-shadow:
    0 26px 70px -38px hsl(var(--shadow) / 0.98),
    0 24px 46px -42px hsl(var(--primaryGlow) / 0.55);
  backdrop-filter: blur(calc(var(--blur) + 2px));
}

.discord-room-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin: 0.45rem 0.45rem 0;
  padding: 0.95rem 1rem;
}

.discord-main-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0.45rem 0.45rem 0;
  padding: 0.7rem 0.85rem;
  border-radius: calc(var(--radius-sm) + 1px);
  border: 1px solid hsl(var(--border) / 0.74);
  background:
    linear-gradient(180deg, hsl(var(--panel) / 0.76), hsl(var(--bg2) / 0.62));
}

.discord-main-toolbar-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.discord-main-toolbar-meta {
  color: hsl(var(--muted2));
  font-size: 0.76rem;
  line-height: 1.5;
  text-align: right;
}

.discord-application-summary {
  margin: 0.45rem 0.45rem 0;
  border: 1px solid hsl(var(--border) / 0.72);
  border-radius: calc(var(--radius-sm) + 2px);
  background:
    linear-gradient(180deg, hsl(var(--panel) / 0.8), hsl(var(--bg2) / 0.66));
  box-shadow: 0 18px 30px -34px hsl(var(--shadow) / 0.92);
  max-height: 34vh;
}

.discord-message-stream {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.35rem 0.45rem 0.55rem;
  gap: 0.95rem;
  align-items: stretch;
}

.discord-message {
  position: relative;
  display: flex;
  flex: none;
  flex-shrink: 0;
  align-items: flex-start;
  gap: 0.8rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.discord-message::before {
  display: none;
}

.discord-message::after {
  content: "";
  position: absolute;
  left: 0.95rem;
  top: 0.15rem;
  bottom: 0.15rem;
  width: 1px;
  border-radius: 999px;
  background: linear-gradient(180deg, hsl(var(--gradA) / 0.65), hsl(var(--gradB) / 0.18), transparent);
  opacity: 0.65;
}

.discord-message.is-system,
.discord-message.is-summary {
  width: 100%;
}

.discord-message-gutter {
  position: relative;
  z-index: 1;
  flex: none;
  width: 2.5rem;
  min-width: 2.5rem;
  display: flex;
  justify-content: center;
  padding-top: 0.1rem;
}

.discord-message-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  gap: 0.28rem;
  padding: 0.15rem 0 0.15rem;
}

.discord-message-body::before {
  content: "";
  position: absolute;
  inset: -0.3rem -0.45rem;
  border-radius: 0.9rem;
  background:
    linear-gradient(180deg, hsl(var(--text) / 0.035), transparent 55%),
    linear-gradient(90deg, hsl(var(--primaryGlow) / 0.08), transparent 32%);
  opacity: 0;
  transition: opacity 160ms ease;
  pointer-events: none;
}

.discord-message:hover .discord-message-body::before {
  opacity: 1;
}

.discord-message-content {
  margin-top: 0;
  color: hsl(var(--text));
  font-size: 0.89rem;
  line-height: 1.62;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  min-width: 0;
}

.discord-message-meta,
.discord-message-author-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  row-gap: 0.35rem;
  column-gap: 0.45rem;
  min-width: 0;
}

.discord-message-author-wrap {
  min-width: 0;
}

.discord-message-author,
.discord-message-time {
  overflow-wrap: anywhere;
  min-width: 0;
}

.discord-message-author {
  font-size: 0.82rem;
  font-weight: 700;
  color: hsl(var(--text));
}

.discord-message-time {
  font-size: 0.72rem;
  color: hsl(var(--muted2));
}

.discord-message-pin {
  border: 0;
  border-radius: 999px;
  padding: 0.16rem 0.45rem;
  background: linear-gradient(90deg, hsl(var(--gradA) / 0.18), hsl(var(--gradB) / 0.12));
  color: hsl(var(--muted));
}

.discord-message.is-system .discord-message-body::before,
.discord-message.is-summary .discord-message-body::before {
  opacity: 1;
}

.discord-message.is-system .discord-message-body::before {
  background:
    linear-gradient(180deg, hsl(var(--danger) / 0.08), transparent 58%),
    linear-gradient(90deg, hsl(var(--danger) / 0.16), transparent 34%);
}

.discord-message.is-summary .discord-message-body::before {
  background:
    linear-gradient(180deg, hsl(var(--primaryGlow) / 0.08), transparent 58%),
    linear-gradient(90deg, hsl(var(--primary) / 0.16), transparent 34%);
}

.discord-chat-image-btn {
  margin-top: 0.35rem;
  max-width: min(32rem, 100%);
  border-radius: 0.9rem;
  border: 1px solid hsl(var(--border) / 0.72);
  background: linear-gradient(180deg, hsl(var(--panel) / 0.68), hsl(var(--bg2) / 0.52));
  box-shadow: 0 18px 32px -34px hsl(var(--shadow) / 0.96);
}

.discord-chat-image {
  max-height: 24rem;
}

.discord-user-avatar.discord-user-avatar-sm {
  width: 2.1rem;
  height: 2.1rem;
  min-width: 2.1rem;
  border-radius: 999px;
}

@media (max-width: 640px) {
  .discord-message-stream {
    padding: 0.85rem 0.75rem 1rem;
    gap: 0.8rem;
  }

  .discord-message {
    gap: 0.65rem;
  }

  .discord-message::after {
    left: 0.8rem;
  }

  .discord-message-gutter {
    width: 2.15rem;
    min-width: 2.15rem;
  }

  .discord-user-avatar.discord-user-avatar-sm {
    width: 1.9rem;
    height: 1.9rem;
    min-width: 1.9rem;
  }
}

.discord-message-input-wrap {
  position: relative;
  margin: 0 0.45rem 0.35rem;
  padding: 0.45rem;
  border-top: 0;
  border: 1px solid hsl(var(--border) / 0.76);
  border-radius: calc(var(--radius-sm) + 2px);
  background:
    radial-gradient(circle at top left, hsl(var(--primaryGlow) / 0.12), transparent 26%),
    linear-gradient(180deg, hsl(var(--panel) / 0.92), hsl(var(--bg2) / 0.76));
  box-shadow: 0 22px 40px -36px hsl(var(--shadow) / 0.96);
}

.discord-message-input-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.7rem;
  align-items: end;
}

.discord-message-compose-main {
  display: grid;
  gap: 0.45rem;
}

.discord-message-input {
  border-radius: 0.9rem;
  border-color: hsl(var(--input) / 0.92);
  background: hsl(var(--background) / 0.54);
  box-shadow: inset 0 1px 0 hsl(var(--text) / 0.04);
}

.discord-message-textarea {
  width: 100%;
  min-height: 3.5rem;
  max-height: 13.75rem;
  resize: none;
  padding: 0.9rem 0.95rem;
  line-height: 1.55;
}

.discord-message-input-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.discord-send-btn,
.discord-control-btn {
  min-height: 2.6rem;
  border-radius: 0.9rem;
  box-shadow: 0 18px 24px -24px hsl(var(--primaryGlow) / 0.46);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.discord-send-btn:hover,
.discord-control-btn:hover,
.voice-mod-btn:hover {
  transform: translateY(-1px);
}

.discord-composer-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  color: hsl(var(--muted2));
  font-size: 0.72rem;
}

.discord-composer-shortcuts span {
  border-radius: 999px;
  border: 1px solid hsl(var(--border) / 0.7);
  padding: 0.18rem 0.45rem;
  background: hsl(var(--background) / 0.22);
}

.discord-composer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.55rem;
  color: hsl(var(--muted2));
  font-size: 0.76rem;
  line-height: 1.45;
}

.discord-composer-counter {
  color: hsl(var(--text));
  font-weight: 700;
}

.discord-voice-center {
  padding: 1rem;
}

.discord-voice-stage {
  width: min(100%, 56rem);
  padding: clamp(1.15rem, 2vw, 1.6rem);
  display: grid;
  gap: 1rem;
  border-radius: calc(var(--radius) - 2px);
  background:
    radial-gradient(circle at top right, hsl(var(--gradA) / 0.18), transparent 26%),
    linear-gradient(180deg, hsl(var(--panel) / 0.94), hsl(var(--bg2) / 0.74));
}

.discord-voice-stage-grid {
  display: grid;
  gap: 0.75rem;
}

.discord-voice-stage-stat {
  padding: 0.9rem 1rem;
  border-radius: calc(var(--radius-sm) + 1px);
  background:
    linear-gradient(180deg, hsl(var(--background) / 0.46), hsl(var(--background) / 0.26));
}

.discord-voice-stage-stat .discord-voice-stage-value {
  display: block;
  margin-top: 0.4rem;
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-size: 0.95rem;
  line-height: 1.35;
}

.discord-voice-controls {
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 0.65rem;
}

.discord-user-list {
  background:
    radial-gradient(circle at top left, hsl(var(--gradB) / 0.1), transparent 24%),
    linear-gradient(180deg, hsl(var(--card) / 0.94), hsl(var(--bg2) / 0.84));
}

.discord-user-header {
  min-height: 4.1rem;
  height: auto;
  padding: 1rem;
  color: hsl(var(--muted2));
}

.discord-user-header-wrap {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.7rem;
}

.discord-user-header-title {
  color: hsl(var(--text));
  font-size: 0.98rem;
  font-weight: 700;
}

.discord-user-search {
  width: 100%;
}

.discord-user-scroll {
  padding: 0.9rem;
  gap: 0.6rem;
}

.discord-user-row {
  padding: 0.72rem 0.78rem;
  border-radius: 0.95rem;
  border-color: hsl(var(--border) / 0.74);
  background:
    linear-gradient(180deg, hsl(var(--panel) / 0.88), hsl(var(--bg2) / 0.72));
  box-shadow: 0 20px 30px -32px hsl(var(--shadow) / 0.92);
}

.discord-user-name {
  font-size: 0.82rem;
}

.voice-volume-slider {
  width: 5.2rem;
}

.voice-mod-btn {
  min-height: 2rem;
  border-radius: 0.7rem;
  padding: 0.3rem 0.55rem;
}

.discord-empty {
  border: 1px dashed hsl(var(--border) / 0.7);
  border-radius: calc(var(--radius-sm) - 1px);
  background: hsl(var(--background) / 0.22);
  color: hsl(var(--muted2));
  padding: 0.7rem 0.8rem;
}

.discord-workspace-empty {
  margin: 0.45rem;
  padding: clamp(1rem, 3vw, 1.5rem);
  border-radius: calc(var(--radius) - 4px);
  border: 1px solid hsl(var(--border) / 0.76);
  background:
    radial-gradient(circle at top right, hsl(var(--gradA) / 0.18), transparent 28%),
    linear-gradient(180deg, hsl(var(--panel) / 0.9), hsl(var(--bg2) / 0.7));
  box-shadow: 0 28px 48px -42px hsl(var(--shadow) / 0.96);
}

.discord-workspace-empty-kicker {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: hsl(var(--muted2));
  font-weight: 700;
}

.discord-workspace-empty-title {
  margin-top: 0.5rem;
  color: hsl(var(--text));
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-size: clamp(1.3rem, 2vw, 1.8rem);
  font-weight: 700;
}

.discord-workspace-empty-copy {
  margin-top: 0.7rem;
  color: hsl(var(--muted2));
  font-size: 0.9rem;
  line-height: 1.65;
  max-width: 44rem;
}

.discord-workspace-empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

@media (min-width: 900px) {
  .discord-voice-stage-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1360px) {
  .discord-shell {
    grid-template-columns: 4.8rem 18rem minmax(0, 1fr) 17rem;
  }
}

@media (max-width: 1180px) {
  .discord-shell {
    grid-template-columns: 4.5rem 17rem minmax(0, 1fr);
  }

  .discord-user-list {
    display: none;
  }
}

@media (max-width: 820px) {
  .discord-shell {
    grid-template-columns: 4.2rem 15rem minmax(0, 1fr);
    gap: 0.75rem;
    padding: 0.2rem;
  }

  .discord-main-header,
  .discord-user-header {
    padding: 0.45rem 0.7rem;
  }

  .discord-room-hero {
    flex-direction: column;
  }

  .discord-main-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .discord-main-toolbar-meta {
    text-align: left;
  }
}

@media (max-width: 640px) {
  .discord-shell {
    grid-template-columns: 4rem minmax(13rem, 42vw) minmax(0, 1fr);
    gap: 0.55rem;
    padding: 0.15rem;
  }

  .discord-regiment-home,
  .discord-regiment-tile {
    width: 2.7rem;
    height: 2.7rem;
    border-radius: 0.95rem;
  }

  .discord-main-header {
    padding: 0.4rem 0.6rem;
  }

  .discord-header-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .discord-message-input-wrap {
    flex-wrap: wrap;
  }

  .discord-message-input-shell {
    grid-template-columns: 1fr;
  }

  .discord-message-input-actions {
    width: 100%;
  }

  .discord-message-input,
  .discord-send-btn,
  .discord-control-btn {
    width: 100%;
  }

  .discord-sidebar-voice-create {
    grid-template-columns: 1fr;
  }

  .discord-message {
    width: 100%;
  }
}

.donor-name {
  position: relative;
  font-weight: 800;
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
  text-shadow: 0 0 0.6rem hsl(var(--ring) / 0.22);
  animation: donor-gradient-shift 2.8s linear infinite, donor-flicker 1.25s ease-in-out infinite;
}

.donor-name-standard {
  background-image: linear-gradient(90deg, #ffd36e 0%, #6bffd7 32%, #76b0ff 66%, #ffd36e 100%);
}

.donor-name-top {
  background-image: linear-gradient(90deg, #ff7a00 0%, #ffe07d 22%, #fff9d8 50%, #ffd25a 72%, #ff7300 100%);
  text-shadow: 0 0 0.75rem rgba(255, 183, 0, 0.55);
  animation: donor-gradient-shift 1.8s linear infinite, donor-flicker 0.85s ease-in-out infinite, donor-top-pop 1.6s ease-in-out infinite;
}

.donor-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.16rem 0.58rem;
  font-size: 0.66rem;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
  border: 1px solid transparent;
  white-space: nowrap;
}

.donor-badge-standard {
  color: #f7f9ff;
  border-color: rgba(111, 226, 255, 0.6);
  background: linear-gradient(135deg, rgba(53, 137, 255, 0.72), rgba(98, 238, 208, 0.72));
  box-shadow: 0 0.35rem 0.9rem -0.62rem rgba(104, 229, 255, 0.85);
  animation: donor-badge-pulse 1.45s ease-in-out infinite;
}

.donor-badge-top {
  color: #1f1300;
  border-color: rgba(255, 218, 112, 0.95);
  background: linear-gradient(130deg, rgba(255, 136, 18, 0.96), rgba(255, 236, 142, 0.97));
  box-shadow: 0 0.48rem 1.2rem -0.62rem rgba(255, 175, 30, 0.95);
  animation: donor-badge-pulse 0.95s ease-in-out infinite;
}

@keyframes donor-gradient-shift {
  0% { background-position: 0% 50%; }
  100% { background-position: 220% 50%; }
}

@keyframes donor-flicker {
  0%, 100% { opacity: 1; }
  35% { opacity: 0.82; }
  42% { opacity: 1; }
  72% { opacity: 0.88; }
}

@keyframes donor-badge-pulse {
  0%, 100% { transform: translateY(0); filter: saturate(1); }
  50% { transform: translateY(-1px); filter: saturate(1.28); }
}

@keyframes donor-top-pop {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

@media (prefers-reduced-motion: reduce) {
  .donor-name,
  .donor-name-top,
  .donor-badge-standard,
  .donor-badge-top {
    animation: none !important;
  }
}

/* =========================================================
   Liquid Metal Layer
========================================================= */

:root {
  --liquid-metal-deep: color-mix(in oklab, hsl(var(--card)) 78%, hsl(var(--background)) 22%);
  --liquid-metal-plate: color-mix(in oklab, hsl(var(--card)) 64%, hsl(var(--background)) 36%);
  --liquid-metal-rim: color-mix(in oklab, hsl(var(--border)) 72%, hsl(var(--accent)) 28%);
  --liquid-metal-rim-strong: color-mix(in oklab, hsl(var(--border)) 54%, hsl(var(--accent)) 46%);
  --liquid-metal-surface:
    linear-gradient(180deg, hsl(var(--foreground) / 0.06), transparent 14%),
    linear-gradient(
      160deg,
      color-mix(in oklab, hsl(var(--card)) 88%, hsl(var(--background)) 12%) 0%,
      color-mix(in oklab, hsl(var(--card)) 76%, hsl(var(--background)) 24%) 52%,
      color-mix(in oklab, hsl(var(--background)) 76%, hsl(var(--accent)) 24%) 100%
    ),
    radial-gradient(circle at 86% 14%, hsl(var(--accent) / 0.17), transparent 28%),
    radial-gradient(circle at 14% 0%, hsl(var(--foreground) / 0.08), transparent 34%);
  --liquid-metal-shadow:
    0 22px 42px -30px hsl(var(--shadow) / 0.96),
    0 10px 24px -22px hsl(var(--accent) / 0.22),
    inset 0 1px 0 hsl(var(--foreground) / 0.14),
    inset 0 -1px 0 hsl(var(--background) / 0.52);
}

.liquid-surface,
.liquid-panel,
.liquid-table-shell,
.command-select-trigger,
.command-select-menu,
.panel-topbar,
.panel-sidebar,
.panel-section-shell,
.panel-stat,
.panel-notification-dropdown,
.notification-item,
.panel-regiment-item,
.discord-voice-dropdown,
.discord-floating-modal,
.discord-floating-menu,
.command-modal {
  border-color: var(--liquid-metal-rim) !important;
  background: var(--liquid-metal-surface) !important;
  box-shadow: var(--liquid-metal-shadow) !important;
  backdrop-filter: blur(calc(var(--blur) + 2px)) saturate(135%);
}

.liquid-panel,
.liquid-table-shell,
.liquid-button,
.liquid-badge {
  position: relative;
  isolation: isolate;
}

.liquid-panel::before,
.liquid-table-shell::before,
.liquid-button::before,
.liquid-badge::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, hsl(var(--foreground) / 0.38) 18%, hsl(var(--accent) / 0.34) 56%, transparent);
  opacity: 0.88;
}

.liquid-button::after {
  content: "";
  position: absolute;
  inset: -24% -120%;
  pointer-events: none;
  background: linear-gradient(112deg, transparent 38%, hsl(var(--foreground) / 0.03) 44%, hsl(var(--accent) / 0.13) 49%, hsl(var(--foreground) / 0.08) 52%, transparent 60%);
  mix-blend-mode: screen;
  opacity: 0.72;
  transform: translateX(-28%);
  transition: transform 720ms ease, opacity 220ms ease;
}

.liquid-button:hover::after {
  transform: translateX(28%);
  opacity: 0.92;
}

.liquid-surface-header {
  position: relative;
  border-image: linear-gradient(90deg, hsl(var(--foreground) / 0.08), hsl(var(--accent) / 0.28), transparent) 1 !important;
}

.liquid-surface-header::after {
  content: "";
  position: absolute;
  inset: auto 0 -1px;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, hsl(var(--foreground) / 0.12) 22%, hsl(var(--accent) / 0.24) 58%, transparent);
}

.liquid-button {
  overflow: hidden;
  border-color: var(--liquid-metal-rim) !important;
  background:
    linear-gradient(180deg, hsl(var(--foreground) / 0.08), transparent 46%),
    linear-gradient(155deg, var(--liquid-metal-deep), var(--liquid-metal-plate)) !important;
  box-shadow:
    0 16px 28px -24px hsl(var(--shadow) / 0.9),
    0 10px 20px -18px hsl(var(--accent) / 0.2),
    inset 0 1px 0 hsl(var(--foreground) / 0.14),
    inset 0 -1px 0 hsl(var(--background) / 0.45) !important;
}

.liquid-button-primary {
  background:
    linear-gradient(180deg, hsl(var(--foreground) / 0.14), transparent 42%),
    linear-gradient(
      150deg,
      color-mix(in oklab, hsl(var(--primary)) 68%, white 32%) 0%,
      color-mix(in oklab, hsl(var(--accent)) 58%, hsl(var(--background)) 42%) 56%,
      color-mix(in oklab, hsl(var(--accent)) 42%, hsl(var(--background)) 58%) 100%
    ) !important;
  border-color: color-mix(in oklab, hsl(var(--primary)) 52%, white 18%) !important;
}

.liquid-button-secondary,
.liquid-button-outline {
  background:
    linear-gradient(180deg, hsl(var(--foreground) / 0.08), transparent 48%),
    linear-gradient(
      152deg,
      color-mix(in oklab, hsl(var(--card)) 74%, hsl(var(--foreground)) 6%) 0%,
      color-mix(in oklab, hsl(var(--background)) 72%, hsl(var(--accent)) 28%) 100%
    ) !important;
}

.liquid-button-danger {
  background:
    linear-gradient(180deg, hsl(var(--foreground) / 0.12), transparent 42%),
    linear-gradient(
      150deg,
      color-mix(in oklab, hsl(var(--destructive)) 74%, white 18%) 0%,
      color-mix(in oklab, hsl(var(--destructive)) 58%, hsl(var(--background)) 42%) 54%,
      color-mix(in oklab, hsl(var(--accent)) 34%, hsl(var(--background)) 66%) 100%
    ) !important;
  border-color: color-mix(in oklab, hsl(var(--destructive)) 64%, hsl(var(--accent)) 18%) !important;
}

.liquid-button:hover {
  border-color: var(--liquid-metal-rim-strong) !important;
  box-shadow:
    0 18px 34px -24px hsl(var(--shadow) / 0.95),
    0 14px 28px -22px hsl(var(--accent) / 0.3),
    inset 0 1px 0 hsl(var(--foreground) / 0.16),
    inset 0 -1px 0 hsl(var(--background) / 0.4) !important;
}

.liquid-button:disabled::after {
  display: none;
}

.liquid-input,
.command-select-trigger,
.form-control,
.form-select,
textarea:not([class]),
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([class]),
select:not([class]) {
  border-color: var(--liquid-metal-rim) !important;
  background:
    linear-gradient(180deg, hsl(var(--foreground) / 0.05), transparent 24%),
    linear-gradient(
      160deg,
      color-mix(in oklab, hsl(var(--card)) 76%, hsl(var(--background)) 24%) 0%,
      color-mix(in oklab, hsl(var(--background)) 82%, hsl(var(--accent)) 18%) 100%
    ),
    radial-gradient(circle at 92% 12%, hsl(var(--accent) / 0.14), transparent 24%) !important;
  box-shadow:
    inset 0 1px 0 hsl(var(--foreground) / 0.1),
    inset 0 -1px 0 hsl(var(--background) / 0.45),
    0 14px 26px -24px hsl(var(--shadow) / 0.9),
    0 8px 16px -18px hsl(var(--accent) / 0.16) !important;
}

.liquid-input:hover,
.command-select-trigger:hover,
.form-control:hover,
.form-select:hover,
textarea:not([class]):hover,
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([class]):hover,
select:not([class]):hover {
  border-color: var(--liquid-metal-rim-strong) !important;
}

.liquid-input:focus,
.command-select-trigger:focus-visible,
.form-control:focus,
.form-select:focus,
textarea:not([class]):focus,
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([class]):focus,
select:not([class]):focus {
  border-color: var(--liquid-metal-rim-strong) !important;
  box-shadow:
    0 0 0 0.15rem hsl(var(--ring) / 0.18),
    inset 0 1px 0 hsl(var(--foreground) / 0.12),
    inset 0 -1px 0 hsl(var(--background) / 0.4),
    0 18px 30px -24px hsl(var(--accent) / 0.26) !important;
}

.liquid-badge {
  border-color: color-mix(in oklab, hsl(var(--border)) 64%, hsl(var(--accent)) 36%) !important;
  background:
    linear-gradient(180deg, hsl(var(--foreground) / 0.08), transparent 48%),
    linear-gradient(
      150deg,
      color-mix(in oklab, hsl(var(--card)) 78%, hsl(var(--background)) 22%) 0%,
      color-mix(in oklab, hsl(var(--background)) 74%, hsl(var(--accent)) 26%) 100%
    ) !important;
  box-shadow:
    inset 0 1px 0 hsl(var(--foreground) / 0.12),
    0 12px 22px -20px hsl(var(--shadow) / 0.85),
    0 6px 14px -16px hsl(var(--accent) / 0.18);
}

.liquid-table-head,
.table-shell thead {
  background:
    linear-gradient(180deg, hsl(var(--foreground) / 0.08), transparent 52%),
    linear-gradient(
      160deg,
      color-mix(in oklab, hsl(var(--card)) 76%, hsl(var(--foreground)) 8%) 0%,
      color-mix(in oklab, hsl(var(--background)) 78%, hsl(var(--accent)) 22%) 100%
    ) !important;
  box-shadow: inset 0 -1px 0 hsl(var(--foreground) / 0.06);
}

.panel-sidebar {
  background:
    linear-gradient(180deg, hsl(var(--foreground) / 0.06), transparent 13%),
    linear-gradient(
      180deg,
      color-mix(in oklab, hsl(var(--card)) 90%, hsl(var(--background)) 10%),
      color-mix(in oklab, hsl(var(--card)) 78%, hsl(var(--background)) 22%)
    ),
    radial-gradient(circle at 78% 8%, hsl(var(--accent) / 0.16), transparent 28%) !important;
}

.panel-topbar {
  background:
    linear-gradient(180deg, hsl(var(--foreground) / 0.07), transparent 12%),
    linear-gradient(
      155deg,
      color-mix(in oklab, hsl(var(--card)) 86%, hsl(var(--background)) 14%) 0%,
      color-mix(in oklab, hsl(var(--card)) 72%, hsl(var(--background)) 28%) 100%
    ),
    radial-gradient(circle at 88% 10%, hsl(var(--accent) / 0.16), transparent 24%) !important;
}

.panel-nav-item,
.panel-regiment-link,
.panel-regiment-summary,
.panel-quick-item {
  border-color: color-mix(in oklab, hsl(var(--border)) 24%, transparent) !important;
  background:
    linear-gradient(180deg, hsl(var(--foreground) / 0.04), transparent 44%),
    linear-gradient(
      155deg,
      color-mix(in oklab, hsl(var(--background)) 90%, hsl(var(--foreground)) 3%) 0%,
      color-mix(in oklab, hsl(var(--background)) 76%, hsl(var(--accent)) 24%) 100%
    ) !important;
  box-shadow:
    inset 0 1px 0 hsl(var(--foreground) / 0.08),
    inset 0 -1px 0 hsl(var(--background) / 0.46),
    0 12px 18px -20px hsl(var(--shadow) / 0.82) !important;
}

.panel-nav-item:hover,
.panel-regiment-link:hover,
.panel-regiment-summary:hover,
.panel-quick-item:hover {
  border-color: var(--liquid-metal-rim-strong) !important;
  box-shadow:
    inset 0 1px 0 hsl(var(--foreground) / 0.1),
    0 16px 26px -20px hsl(var(--shadow) / 0.88),
    0 10px 18px -18px hsl(var(--accent) / 0.24) !important;
}

.panel-nav-item.is-active,
.panel-regiment-link.is-active {
  border-color: var(--liquid-metal-rim-strong) !important;
  background:
    linear-gradient(180deg, hsl(var(--foreground) / 0.08), transparent 40%),
    linear-gradient(
      150deg,
      color-mix(in oklab, hsl(var(--accent)) 26%, hsl(var(--card)) 74%) 0%,
      color-mix(in oklab, hsl(var(--accent)) 18%, hsl(var(--background)) 82%) 100%
    ) !important;
}

.profile-trigger {
  border-color: var(--liquid-metal-rim) !important;
  background:
    linear-gradient(180deg, hsl(var(--foreground) / 0.08), transparent 46%),
    linear-gradient(155deg, color-mix(in oklab, hsl(var(--card)) 78%, hsl(var(--background)) 22%), color-mix(in oklab, hsl(var(--background)) 74%, hsl(var(--accent)) 26%)) !important;
  box-shadow:
    0 16px 26px -22px hsl(var(--shadow) / 0.92),
    inset 0 1px 0 hsl(var(--foreground) / 0.14);
}

.panel-stat {
  background:
    linear-gradient(180deg, hsl(var(--foreground) / 0.07), transparent 16%),
    linear-gradient(
      160deg,
      color-mix(in oklab, hsl(var(--card)) 82%, hsl(var(--background)) 18%) 0%,
      color-mix(in oklab, hsl(var(--background)) 78%, hsl(var(--accent)) 22%) 100%
    ),
    radial-gradient(circle at 88% 18%, hsl(var(--accent) / 0.16), transparent 28%) !important;
}

.panel-stat-value {
  text-shadow: 0 0 18px hsl(var(--accent) / 0.08);
}

.panel-section-shell,
.empty-state {
  background:
    linear-gradient(180deg, hsl(var(--foreground) / 0.05), transparent 16%),
    linear-gradient(
      158deg,
      color-mix(in oklab, hsl(var(--card)) 84%, hsl(var(--background)) 16%) 0%,
      color-mix(in oklab, hsl(var(--background)) 80%, hsl(var(--accent)) 20%) 100%
    ) !important;
}

.empty-state {
  border-style: solid;
  border-color: color-mix(in oklab, hsl(var(--border)) 58%, hsl(var(--accent)) 42%) !important;
  box-shadow:
    inset 0 1px 0 hsl(var(--foreground) / 0.08),
    0 14px 28px -26px hsl(var(--shadow) / 0.86);
}

.docs-tab-btn,
.liquid-tab {
  position: relative;
  overflow: hidden;
  border-color: var(--liquid-metal-rim) !important;
  background:
    linear-gradient(180deg, hsl(var(--foreground) / 0.08), transparent 48%),
    linear-gradient(
      155deg,
      color-mix(in oklab, hsl(var(--card)) 76%, hsl(var(--background)) 24%) 0%,
      color-mix(in oklab, hsl(var(--background)) 74%, hsl(var(--accent)) 26%) 100%
    ) !important;
  box-shadow:
    inset 0 1px 0 hsl(var(--foreground) / 0.12),
    0 12px 22px -20px hsl(var(--shadow) / 0.85);
  transition: border-color 180ms ease, color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.docs-tab-btn.is-active,
.liquid-tab.is-active {
  border-color: var(--liquid-metal-rim-strong) !important;
  background:
    linear-gradient(180deg, hsl(var(--foreground) / 0.1), transparent 44%),
    linear-gradient(
      152deg,
      color-mix(in oklab, hsl(var(--accent)) 24%, hsl(var(--card)) 76%) 0%,
      color-mix(in oklab, hsl(var(--accent)) 14%, hsl(var(--background)) 86%) 100%
    ) !important;
  box-shadow:
    inset 0 1px 0 hsl(var(--foreground) / 0.16),
    0 14px 24px -18px hsl(var(--accent) / 0.22);
}

.command-select-trigger,
.command-select-option,
.notification-item,
.docs-tab-btn {
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease, background 180ms ease, opacity 180ms ease;
}

.command-select-option {
  border: 1px solid transparent;
  background:
    linear-gradient(180deg, hsl(var(--foreground) / 0.03), transparent 48%),
    linear-gradient(
      155deg,
      color-mix(in oklab, hsl(var(--card)) 78%, hsl(var(--background)) 22%) 0%,
      color-mix(in oklab, hsl(var(--background)) 78%, hsl(var(--accent)) 22%) 100%
    );
  box-shadow: inset 0 1px 0 hsl(var(--foreground) / 0.05);
}

.command-select-option:hover,
.notification-item:hover {
  border-color: var(--liquid-metal-rim-strong) !important;
  box-shadow:
    inset 0 1px 0 hsl(var(--foreground) / 0.1),
    0 14px 24px -18px hsl(var(--accent) / 0.2) !important;
}

#alpNarrativeEditor,
#promoJustificationEditor,
#caseNoteEditor,
.doc-editor .ProseMirror {
  border-color: var(--liquid-metal-rim) !important;
  background:
    linear-gradient(180deg, hsl(var(--foreground) / 0.05), transparent 18%),
    linear-gradient(
      160deg,
      color-mix(in oklab, hsl(var(--card)) 76%, hsl(var(--background)) 24%) 0%,
      color-mix(in oklab, hsl(var(--background)) 80%, hsl(var(--accent)) 20%) 100%
    ) !important;
  box-shadow:
    inset 0 1px 0 hsl(var(--foreground) / 0.08),
    0 16px 28px -24px hsl(var(--shadow) / 0.88);
}

.applications-workspace {
  --applications-line: hsl(var(--border) / 0.75);
  --applications-surface:
    linear-gradient(180deg, hsl(var(--foreground) / 0.04), transparent 36%),
    linear-gradient(160deg, hsl(var(--card) / 0.88), hsl(var(--background) / 0.82));
  width: min(98vw, 116rem);
  max-width: calc(100vw - 1.25rem);
}

.applications-hero,
.applications-shell-card,
.applications-stat-card,
.applications-glass-card,
.applications-case-card,
.applications-template-card,
.applications-review-card,
.applications-detail-card,
.applications-question-card,
.applications-review-bucket {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--applications-line);
  background: var(--applications-surface);
  box-shadow:
    inset 0 1px 0 hsl(var(--foreground) / 0.06),
    0 18px 34px -28px hsl(var(--shadow) / 0.72);
}

.applications-hero {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.9fr);
  padding: 1.5rem;
}

.applications-kicker,
.applications-section-kicker,
.applications-card-kicker,
.applications-detail-label {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: hsl(var(--muted-foreground));
}

.applications-title {
  margin-top: .45rem;
  font-size: clamp(2rem, 3vw, 3.3rem);
  font-weight: 800;
  line-height: .95;
  color: hsl(var(--foreground));
}

.applications-subtitle {
  margin-top: .85rem;
  max-width: 52rem;
  color: hsl(var(--foreground) / 0.8);
  line-height: 1.75;
}

.applications-chip-row,
.applications-action-row,
.applications-meta-row,
.applications-review-form,
.applications-review-bucket-head {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: center;
}

.applications-chip {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  border: 1px solid hsl(var(--border) / 0.65);
  border-radius: 999px;
  padding: .55rem .8rem;
  background: hsl(var(--background) / 0.5);
  color: hsl(var(--foreground) / 0.88);
  font-size: .82rem;
}

.applications-hero-stats {
  display: grid;
  gap: .85rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.applications-stat-card,
.applications-shell-card,
.applications-glass-card,
.applications-case-card,
.applications-template-card,
.applications-review-card,
.applications-review-bucket {
  border-radius: 1.2rem;
  padding: 1rem;
}

.applications-stat-label {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: hsl(var(--muted-foreground));
}

.applications-stat-value {
  display: block;
  margin-top: .35rem;
  font-size: 1.35rem;
  color: hsl(var(--foreground));
}

.applications-stat-meta,
.applications-detail-muted {
  margin-top: .35rem;
  font-size: .85rem;
  color: hsl(var(--muted-foreground));
}

.applications-banner,
.applications-inline-callout {
  border-radius: 1rem;
  border: 1px solid hsl(var(--border) / 0.68);
  padding: .82rem 1rem;
  background: hsl(var(--background) / 0.55);
  color: hsl(var(--foreground));
}

.applications-banner-danger,
.applications-inline-callout-danger {
  border-color: hsl(var(--destructive) / 0.55);
  background: linear-gradient(135deg, hsl(var(--destructive) / 0.16), transparent 70%), hsl(var(--background) / 0.58);
}

.applications-banner-success {
  border-color: color-mix(in srgb, hsl(var(--primary)) 45%, transparent);
  background: linear-gradient(135deg, color-mix(in srgb, hsl(var(--primary)) 16%, transparent), transparent 70%), hsl(var(--background) / 0.58);
}

.applications-inline-callout-warning {
  border-color: color-mix(in srgb, hsl(var(--accent)) 52%, transparent);
  background: linear-gradient(135deg, color-mix(in srgb, hsl(var(--accent)) 16%, transparent), transparent 70%), hsl(var(--background) / 0.58);
}

.applications-section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.applications-section-title,
.applications-subsection-title,
.applications-card-title {
  color: hsl(var(--foreground));
  font-weight: 700;
}

.applications-section-title {
  margin-top: .28rem;
  font-size: 1.4rem;
}

.applications-subsection,
.applications-review-bucket {
  margin-top: 1rem;
}

.applications-subsection-head {
  margin-bottom: .8rem;
}

.applications-subsection-title {
  font-size: 1rem;
}

.applications-card-grid,
.applications-stack {
  display: grid;
  gap: 1rem;
}

.applications-card-grid {
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
}

.applications-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: .8rem;
  min-width: 0;
}

.applications-card-head > * {
  min-width: 0;
}

.applications-card-title {
  margin-top: .28rem;
  font-size: 1.08rem;
  overflow-wrap: anywhere;
}

.applications-meta-row {
  margin-top: .75rem;
  font-size: .82rem;
  color: hsl(var(--muted-foreground));
}

.applications-body-copy,
.applications-detail-value,
.applications-answer-value {
  margin-top: .35rem;
  white-space: pre-wrap;
  color: hsl(var(--foreground) / 0.94);
  line-height: 1.6;
}

.applications-content-grid,
.applications-review-layout {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.applications-content-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.applications-review-layout {
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.25fr);
}

.applications-detail-card,
.applications-question-card {
  border-radius: 1rem;
  padding: .9rem;
}

.applications-template-card,
.applications-question-card {
  overflow: visible;
}

.applications-question-card .command-select-wrap {
  z-index: 1;
}

.applications-question-card .command-select-wrap.is-open {
  z-index: 120;
}

.applications-answer-grid,
.applications-answer-list {
  display: grid;
  gap: .75rem;
  margin-top: .75rem;
}

.applications-answer-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.applications-answer-item {
  border: 1px solid hsl(var(--border) / 0.58);
  border-radius: .95rem;
  padding: .8rem;
  background: hsl(var(--background) / 0.5);
}

.applications-answer-question {
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: hsl(var(--muted-foreground));
}

.applications-template-card form,
.applications-review-card form + form,
.applications-case-card form + form {
  margin-top: .85rem;
}

.applications-card-summary {
  cursor: pointer;
  display: block;
  border-radius: .95rem;
  list-style: none;
  min-width: 0;
}

.applications-card-summary::-webkit-details-marker {
  display: none;
}

.applications-card-summary::marker {
  content: "";
}

.applications-collapsible-card:not([open]) {
  padding-bottom: 1rem;
}

.applications-template-card[open] {
  grid-column: 1 / -1;
}

.applications-collapsible-card[open] .applications-card-summary {
  margin-bottom: .95rem;
}

.applications-expanded-body {
  display: grid;
  gap: 1rem;
  max-height: min(74vh, 54rem);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  border: 1px solid hsl(var(--border) / .54);
  border-radius: 1rem;
  padding: .95rem;
  background:
    linear-gradient(180deg, hsl(var(--foreground) / .025), transparent 38%),
    hsl(var(--background) / .36);
  box-shadow: inset 0 1px 0 hsl(var(--foreground) / .045);
}

.applications-collapse-indicator {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid hsl(var(--border) / .58);
  border-radius: 999px;
  padding: .34rem .58rem;
  background: hsl(var(--background) / .46);
  color: hsl(var(--foreground) / .78);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.applications-collapsible-card[open] .applications-collapse-indicator {
  border-color: color-mix(in srgb, hsl(var(--primary)) 55%, hsl(var(--border)));
  color: hsl(var(--foreground));
}

.applications-collapsible-card:not([open]) .applications-collapse-indicator::before {
  content: "Show ";
}

.applications-collapsible-card[open] .applications-collapse-indicator::before {
  content: "Hide ";
}

.applications-template-form {
  display: grid;
  gap: 1rem;
}

.applications-form-grid {
  display: grid;
  grid-template-columns: minmax(220px, .55fr) minmax(320px, 1.45fr);
  gap: .85rem;
  align-items: stretch;
}

.applications-question-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr));
  gap: .85rem;
  align-items: start;
}

.applications-question-card-wide {
  grid-column: span 2;
}

.applications-question-card {
  min-width: 0;
}

.applications-question-card :is(input, textarea, select) {
  width: 100%;
}

.applications-yesno-value {
  display: none !important;
}

.applications-yesno-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
  margin-top: .85rem;
}

.applications-yesno-option {
  position: relative;
  display: flex;
  min-height: 3rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  border: 1px solid hsl(var(--border) / .68);
  border-radius: .9rem;
  background:
    linear-gradient(180deg, hsl(var(--foreground) / .04), transparent 52%),
    hsl(var(--background) / .62);
  color: hsl(var(--foreground) / .9);
  font-size: .88rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.applications-yesno-option input {
  width: 1rem !important;
  height: 1rem;
  flex: 0 0 1rem;
  accent-color: hsl(var(--primary));
}

.applications-yesno-option:has(input:checked) {
  border-color: hsl(var(--primary) / .82);
  background:
    linear-gradient(180deg, hsl(var(--primary) / .18), transparent 58%),
    hsl(var(--primary) / .1);
  box-shadow:
    inset 0 1px 0 hsl(var(--foreground) / .12),
    0 16px 24px -22px hsl(var(--primary) / .48);
}

.applications-yesno-option:hover {
  border-color: color-mix(in srgb, hsl(var(--primary)) 55%, hsl(var(--border)));
  transform: translateY(-1px);
}

.applications-workspace :is(input, textarea, select).app-question-input,
.applications-template-form :is(input, textarea, select),
.applications-review-form :is(input, textarea, select),
.applications-bulk-bar :is(input, select) {
  border-color: color-mix(in srgb, hsl(var(--border)) 78%, hsl(var(--primary)) 22%) !important;
  background:
    linear-gradient(180deg, hsl(var(--foreground) / .035), transparent 40%),
    hsl(var(--background) / .82) !important;
  color: hsl(var(--foreground)) !important;
  box-shadow:
    inset 0 1px 0 hsl(var(--foreground) / .07),
    0 12px 18px -18px hsl(var(--shadow) / .82);
}

.applications-workspace :is(input, textarea, select).app-question-input:focus,
.applications-template-form :is(input, textarea, select):focus,
.applications-review-form :is(input, textarea, select):focus,
.applications-bulk-bar :is(input, select):focus {
  border-color: hsl(var(--primary) / .82) !important;
  box-shadow:
    inset 0 1px 0 hsl(var(--foreground) / .1),
    0 0 0 1px hsl(var(--primary) / .18),
    0 16px 24px -22px hsl(var(--primary) / .42) !important;
}

.applications-workspace textarea {
  min-height: 7rem;
}

.applications-workspace textarea.app-question-input {
  min-height: 6.25rem;
}

.applications-expanded-body .applications-action-row,
.applications-expanded-body .applications-review-form {
  border: 1px solid hsl(var(--border) / .44);
  border-radius: .9rem;
  padding: .65rem;
  background: hsl(var(--background) / .34);
}

.applications-score-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid color-mix(in srgb, hsl(var(--primary)) 34%, hsl(var(--border)));
  border-radius: 1rem;
  padding: .9rem;
  background:
    linear-gradient(135deg, hsl(var(--primary) / .11), transparent 58%),
    hsl(var(--background) / .44);
  box-shadow:
    inset 0 1px 0 hsl(var(--foreground) / .08),
    0 18px 26px -24px hsl(var(--primary) / .38);
}

.applications-score-value {
  margin-top: .2rem;
  color: hsl(var(--foreground));
  font-size: clamp(1.45rem, 2.4vw, 2.35rem);
  font-weight: 900;
  line-height: 1;
}

.applications-score-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: .4rem;
}

.applications-mini-action {
  border: 1px solid hsl(var(--border) / .58);
  border-radius: 999px;
  padding: .4rem .62rem;
  background: hsl(var(--background) / .42);
  color: hsl(var(--foreground) / .86);
  font-size: .72rem;
  font-weight: 800;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.applications-mini-action:hover {
  border-color: color-mix(in srgb, hsl(var(--primary)) 55%, hsl(var(--border)));
  background: hsl(var(--primary) / .1);
  transform: translateY(-1px);
}

.applications-command-tools {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: .55rem;
  align-items: center;
}

.applications-command-bar {
  position: sticky;
  top: .75rem;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, .9fr);
  gap: 1rem;
  align-items: center;
  border: 1px solid var(--applications-line);
  border-radius: 1.15rem;
  padding: .85rem;
  background:
    linear-gradient(180deg, hsl(var(--foreground) / .055), transparent 44%),
    linear-gradient(150deg, hsl(var(--card) / .92), hsl(var(--background) / .86));
  box-shadow:
    inset 0 1px 0 hsl(var(--foreground) / .08),
    0 16px 32px -28px hsl(var(--shadow) / .82);
  backdrop-filter: blur(18px);
}

.applications-command-links,
.applications-filter-row,
.applications-builder-toolbar,
.applications-card-actions,
.applications-bulk-bar {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  align-items: center;
}

.applications-command-link,
.applications-filter-button,
.applications-select-case,
.applications-builder-step {
  border: 1px solid hsl(var(--border) / .68);
  background:
    linear-gradient(180deg, hsl(var(--foreground) / .045), transparent 52%),
    hsl(var(--background) / .48);
  color: hsl(var(--foreground) / .86);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease, background 180ms ease, color 180ms ease;
}

.applications-command-link,
.applications-filter-button,
.applications-select-case {
  display: inline-flex;
  min-height: 2.15rem;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  border-radius: 999px;
  padding: .45rem .75rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.applications-command-link:hover,
.applications-filter-button:hover,
.applications-select-case:hover,
.applications-builder-step:hover {
  border-color: color-mix(in srgb, hsl(var(--primary)) 55%, hsl(var(--border)));
  box-shadow:
    inset 0 1px 0 hsl(var(--foreground) / .12),
    0 16px 26px -22px hsl(var(--primary) / .38);
  transform: translateY(-1px);
}

.applications-command-link:focus-visible,
.applications-filter-button:focus-visible,
.applications-builder-step:focus-visible {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
}

.applications-filter-button.is-active,
.applications-builder-step.is-active {
  border-color: color-mix(in srgb, hsl(var(--primary)) 70%, hsl(var(--border)));
  background:
    linear-gradient(180deg, hsl(var(--primary) / .18), transparent 64%),
    hsl(var(--primary) / .1);
  color: hsl(var(--foreground));
  box-shadow:
    inset 0 1px 0 hsl(var(--foreground) / .15),
    0 18px 30px -24px hsl(var(--primary) / .42);
}

.applications-command-search {
  display: grid;
  gap: .55rem;
}

.applications-section-copy {
  margin-top: .35rem;
  max-width: 48rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.6;
}

.applications-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
  margin-top: .85rem;
}

.applications-meta-grid span {
  border: 1px solid hsl(var(--border) / .55);
  border-radius: .85rem;
  padding: .72rem;
  background: hsl(var(--background) / .42);
  color: hsl(var(--muted-foreground));
  font-size: .82rem;
}

.applications-meta-grid strong {
  color: hsl(var(--foreground));
}

.applications-required-dot {
  display: inline-flex;
  margin-left: .45rem;
  border: 1px solid color-mix(in srgb, hsl(var(--destructive)) 55%, transparent);
  border-radius: 999px;
  padding: .14rem .42rem;
  background: hsl(var(--destructive) / .12);
  color: color-mix(in srgb, hsl(var(--destructive)) 78%, hsl(var(--foreground)));
  font-size: .64rem;
  letter-spacing: .08em;
}

.applications-builder-shell {
  display: grid;
  grid-template-columns: 16rem minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.applications-builder-rail,
.applications-builder-main,
.applications-bulk-bar {
  border: 1px solid hsl(var(--border) / .62);
  border-radius: 1rem;
  background:
    linear-gradient(180deg, hsl(var(--foreground) / .035), transparent 42%),
    hsl(var(--background) / .43);
  box-shadow: inset 0 1px 0 hsl(var(--foreground) / .055);
}

.applications-builder-rail {
  position: sticky;
  top: 6rem;
  display: grid;
  gap: .65rem;
  padding: .75rem;
}

.applications-builder-main {
  min-width: 0;
  padding: 1rem;
}

.applications-builder-step {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: flex-start;
  gap: .65rem;
  border-radius: .85rem;
  padding: .72rem .8rem;
  font-size: .84rem;
  font-weight: 800;
  text-align: left;
}

.applications-builder-step span {
  display: inline-grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: .72rem;
  background: hsl(var(--foreground) / .08);
  color: hsl(var(--foreground));
  font-size: .72rem;
}

.applications-builder-mini {
  display: grid;
  gap: .45rem;
  margin-top: .55rem;
  border-top: 1px solid hsl(var(--border) / .55);
  padding-top: .75rem;
}

.applications-builder-toolbar {
  justify-content: space-between;
  border: 1px solid hsl(var(--border) / .55);
  border-radius: .95rem;
  padding: .65rem;
  background: hsl(var(--background) / .4);
}

.applications-checkbox-line {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  width: fit-content;
  border: 1px solid hsl(var(--border) / .58);
  border-radius: 999px;
  padding: .52rem .75rem;
  background: hsl(var(--background) / .44);
  color: hsl(var(--foreground) / .86);
  font-size: .86rem;
}

.applications-bulk-bar {
  margin-bottom: 1rem;
  padding: .75rem;
}

.applications-select-case {
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
}

.applications-select-case input,
.applications-checkbox-line input {
  accent-color: hsl(var(--primary));
}

.applications-case-card,
.applications-template-card,
.applications-review-card {
  transition: opacity 180ms ease, transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.applications-case-card:hover,
.applications-template-card:hover,
.applications-review-card:hover {
  border-color: color-mix(in srgb, hsl(var(--primary)) 45%, hsl(var(--border)));
  box-shadow:
    inset 0 1px 0 hsl(var(--foreground) / .08),
    0 22px 38px -30px hsl(var(--primary) / .34);
}

[data-application-card].is-hidden {
  display: none;
}

@media (max-width: 980px) {
  .applications-hero,
  .applications-review-layout,
  .applications-command-bar,
  .applications-builder-shell,
  .applications-form-grid {
    grid-template-columns: 1fr;
  }

  .applications-command-bar,
  .applications-builder-rail {
    position: static;
  }

  .applications-hero-stats {
    grid-template-columns: 1fr;
  }

  .applications-question-card-wide {
    grid-column: auto;
  }
}

@media (max-width: 640px) {
  .applications-hero,
  .applications-shell-card,
  .applications-glass-card,
  .applications-case-card,
  .applications-template-card,
  .applications-review-card,
  .applications-review-bucket {
    padding: .9rem;
    border-radius: 1rem;
  }

  .applications-command-links,
  .applications-filter-row,
  .applications-bulk-bar,
  .applications-review-form {
    align-items: stretch;
  }

  .applications-command-link,
  .applications-filter-button,
  .applications-bulk-bar > *,
  .applications-review-form > *,
  .applications-command-tools > * {
    width: 100%;
  }

  .applications-command-tools {
    grid-template-columns: 1fr;
  }

  .applications-card-grid,
  .applications-question-grid {
    grid-template-columns: 1fr;
  }

  .applications-meta-grid {
    grid-template-columns: 1fr;
  }
}

.applications-workspace {
  --applications-line: color-mix(in srgb, hsl(var(--border)) 72%, hsl(var(--primary)) 28%);
  --applications-red: #9f2f2f;
  --applications-gold: #d5ad6d;
  --applications-cyan: #6ee7f5;
  --applications-green: #74d99f;
  --applications-deep:
    linear-gradient(180deg, hsl(var(--foreground) / .055), transparent 34%),
    linear-gradient(135deg, hsl(var(--card) / .96), hsl(var(--background) / .9) 58%, hsl(var(--card) / .94));
  width: min(99vw, 132rem);
}

.applications-workspace::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg, hsl(var(--foreground) / .025) 1px, transparent 1px),
    linear-gradient(180deg, hsl(var(--foreground) / .018) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(180deg, black, transparent 72%);
}

.applications-hero,
.applications-command-bar,
.applications-shell-card,
.applications-stat-card,
.applications-glass-card,
.applications-case-card,
.applications-template-card,
.applications-review-card,
.applications-detail-card,
.applications-question-card,
.applications-review-bucket {
  border-color: var(--applications-line);
  background: var(--applications-deep);
  box-shadow:
    inset 0 1px 0 hsl(var(--foreground) / .09),
    0 22px 60px -42px hsl(var(--shadow) / .95);
}

.applications-hero {
  grid-template-columns: minmax(0, 1.1fr) minmax(26rem, .9fr);
  min-height: 25rem;
  padding: 1.5rem;
  border-radius: 1.45rem;
  background:
    linear-gradient(90deg, hsl(var(--foreground) / .035) 1px, transparent 1px),
    linear-gradient(180deg, hsl(var(--foreground) / .025) 1px, transparent 1px),
    radial-gradient(circle at 16% 16%, color-mix(in srgb, var(--applications-gold) 22%, transparent), transparent 26%),
    radial-gradient(circle at 86% 18%, color-mix(in srgb, var(--applications-red) 25%, transparent), transparent 28%),
    linear-gradient(135deg, #07080c, #171015 46%, #071116);
  background-size: 48px 48px, 48px 48px, auto, auto, auto;
}

.applications-hero::after {
  content: "";
  position: absolute;
  inset: auto 1.25rem 1.15rem 1.25rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--applications-gold), transparent);
  opacity: .62;
}

.applications-kicker,
.applications-section-kicker,
.applications-card-kicker,
.applications-detail-label {
  color: color-mix(in srgb, var(--applications-gold) 82%, hsl(var(--muted-foreground)));
  letter-spacing: .14em;
}

.applications-title {
  max-width: 48rem;
  font-size: 3.1rem;
  letter-spacing: 0;
}

.applications-subtitle {
  max-width: 54rem;
  color: hsl(var(--foreground) / .82);
  font-size: 1rem;
}

.applications-hero-actions,
.applications-template-preview-row,
.applications-status-grid,
.applications-review-metrics,
.applications-score-input-grid {
  display: grid;
  gap: .7rem;
}

.applications-hero-actions {
  grid-template-columns: repeat(auto-fit, minmax(11rem, max-content));
  margin-top: 1.15rem;
}

.applications-primary-action,
.applications-secondary-action {
  display: inline-flex;
  min-height: 2.55rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: .65rem 1rem;
  font-size: .8rem;
  font-weight: 900;
  color: hsl(var(--foreground));
  text-transform: uppercase;
  transition: border-color 170ms ease, background 170ms ease, transform 170ms ease, box-shadow 170ms ease;
}

.applications-primary-action {
  border: 1px solid color-mix(in srgb, var(--applications-gold) 76%, hsl(var(--border)));
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--applications-gold) 26%, transparent), transparent),
    color-mix(in srgb, var(--applications-red) 28%, hsl(var(--background)));
  box-shadow: 0 18px 32px -24px color-mix(in srgb, var(--applications-gold) 55%, transparent);
}

.applications-secondary-action {
  border: 1px solid hsl(var(--border) / .72);
  background: hsl(var(--background) / .58);
}

.applications-primary-action:hover,
.applications-secondary-action:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--applications-cyan) 62%, hsl(var(--border)));
  box-shadow: 0 18px 34px -24px color-mix(in srgb, var(--applications-cyan) 55%, transparent);
}

.applications-radar-panel {
  display: grid;
  grid-template-columns: 14rem minmax(0, 1fr);
  gap: 1rem;
  align-items: stretch;
}

.applications-radar-ring,
.applications-progress-dial {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border: 1px solid hsl(var(--border) / .72);
  border-radius: 50%;
  background:
    radial-gradient(circle, hsl(var(--background) / .95) 0 56%, transparent 57%),
    conic-gradient(var(--applications-gold) calc(var(--capacity, 0) * 1%), hsl(var(--foreground) / .08) 0),
    hsl(var(--background) / .54);
  box-shadow:
    inset 0 1px 0 hsl(var(--foreground) / .08),
    0 24px 38px -30px color-mix(in srgb, var(--applications-gold) 58%, transparent);
  text-align: center;
}

.applications-radar-ring {
  width: clamp(8.75rem, 18vw, 13.5rem);
  max-width: 100%;
  justify-self: center;
}

.applications-radar-ring > div,
.applications-progress-dial > div {
  min-width: 0;
  max-width: calc(100% - 1.8rem);
}

.applications-radar-ring span,
.applications-progress-dial span {
  display: block;
  overflow-wrap: anywhere;
  color: hsl(var(--muted-foreground));
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.applications-radar-ring strong,
.applications-progress-dial strong {
  display: block;
  color: hsl(var(--foreground));
  font-size: 2rem;
  font-weight: 950;
  line-height: 1;
  overflow-wrap: anywhere;
}

.applications-radar-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .85rem;
}

.applications-stat-card {
  min-height: 8rem;
}

.applications-stat-value {
  font-size: 1.5rem;
  letter-spacing: 0;
}

.applications-chip {
  border-color: hsl(var(--border) / .62);
  background:
    linear-gradient(180deg, hsl(var(--foreground) / .05), transparent),
    hsl(var(--background) / .56);
}

.applications-chip-strong {
  border-color: color-mix(in srgb, var(--applications-gold) 55%, hsl(var(--border)));
  background: color-mix(in srgb, var(--applications-gold) 12%, hsl(var(--background)));
}

.applications-command-bar {
  top: .65rem;
  grid-template-columns: minmax(18rem, .8fr) minmax(30rem, 1.2fr);
  border-radius: 1.1rem;
}

.applications-result-count {
  color: hsl(var(--muted-foreground));
  font-size: .78rem;
}

.applications-ops-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(22rem, .85fr);
  gap: 1rem;
}

.applications-status-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.applications-status-tile {
  display: grid;
  min-height: 6.4rem;
  gap: .35rem;
  align-content: center;
  border: 1px solid hsl(var(--border) / .68);
  border-radius: 1rem;
  padding: .9rem;
  background: hsl(var(--background) / .48);
  color: hsl(var(--foreground));
  text-align: left;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.applications-status-tile span {
  color: hsl(var(--muted-foreground));
  font-size: .76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.applications-status-tile strong {
  font-size: 2rem;
  line-height: 1;
}

.applications-status-tile:hover,
.applications-status-tile.is-active {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--applications-cyan) 55%, hsl(var(--border)));
  box-shadow: 0 22px 32px -28px color-mix(in srgb, var(--applications-cyan) 60%, transparent);
}

.applications-status-warning { background: linear-gradient(135deg, color-mix(in srgb, var(--applications-gold) 16%, transparent), hsl(var(--background) / .5)); }
.applications-status-info { background: linear-gradient(135deg, color-mix(in srgb, var(--applications-cyan) 14%, transparent), hsl(var(--background) / .5)); }
.applications-status-success { background: linear-gradient(135deg, color-mix(in srgb, var(--applications-green) 14%, transparent), hsl(var(--background) / .5)); }
.applications-status-danger { background: linear-gradient(135deg, color-mix(in srgb, var(--applications-red) 18%, transparent), hsl(var(--background) / .5)); }

.applications-mini-feed {
  display: grid;
  gap: .55rem;
  margin-top: 1rem;
}

.applications-mini-feed-row {
  display: flex;
  justify-content: space-between;
  gap: .8rem;
  border: 1px solid hsl(var(--border) / .58);
  border-radius: .9rem;
  padding: .72rem .85rem;
  background: hsl(var(--background) / .42);
  color: hsl(var(--foreground) / .86);
}

.applications-mini-feed-row strong {
  color: hsl(var(--foreground));
  white-space: nowrap;
}

.applications-capacity-meter {
  display: grid;
  gap: .65rem;
}

.applications-capacity-track {
  height: .72rem;
  overflow: hidden;
  border-radius: 999px;
  background: hsl(var(--foreground) / .09);
}

.applications-capacity-track span {
  display: block;
  width: var(--capacity, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--applications-gold), var(--applications-red));
}

.applications-capacity-meta {
  display: flex;
  justify-content: space-between;
  gap: .8rem;
  color: hsl(var(--muted-foreground));
  font-size: .85rem;
}

.applications-capacity-meta strong {
  color: hsl(var(--foreground));
}

.applications-card-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 34rem), 1fr));
}

.applications-template-card[open],
.applications-review-card[open] {
  border-color: color-mix(in srgb, var(--applications-gold) 48%, hsl(var(--border)));
  box-shadow:
    inset 0 1px 0 hsl(var(--foreground) / .11),
    0 28px 70px -48px color-mix(in srgb, var(--applications-gold) 52%, transparent);
}

.applications-template-preview-row {
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  margin-top: .9rem;
}

.applications-template-preview-row span {
  min-width: 0;
  overflow: hidden;
  border: 1px solid hsl(var(--border) / .52);
  border-radius: 999px;
  padding: .48rem .65rem;
  background: hsl(var(--background) / .42);
  color: hsl(var(--muted-foreground));
  font-size: .78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.applications-intake-layout {
  display: grid;
  grid-template-columns: minmax(13rem, .24fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.applications-intake-rail {
  position: sticky;
  top: 6.25rem;
  display: grid;
  gap: .8rem;
  border: 1px solid hsl(var(--border) / .58);
  border-radius: 1rem;
  padding: .85rem;
  background:
    linear-gradient(180deg, hsl(var(--foreground) / .04), transparent),
    hsl(var(--background) / .48);
}

.applications-progress-dial {
  --capacity: 0;
  width: min(100%, 10rem);
  margin-inline: auto;
  background:
    radial-gradient(circle, hsl(var(--background) / .95) 0 56%, transparent 57%),
    conic-gradient(var(--applications-cyan) var(--progress, 0%), hsl(var(--foreground) / .08) 0),
    hsl(var(--background) / .54);
}

.applications-question-index {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

.applications-question-index a {
  border: 1px solid hsl(var(--border) / .56);
  border-radius: 999px;
  padding: .34rem .5rem;
  background: hsl(var(--background) / .44);
  color: hsl(var(--muted-foreground));
  font-size: .74rem;
  font-weight: 800;
}

.applications-intake-main {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.applications-question-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .65rem;
  margin-bottom: .55rem;
  color: hsl(var(--muted-foreground));
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.applications-question-card {
  min-height: 12rem;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.applications-question-card.is-complete {
  border-color: color-mix(in srgb, var(--applications-green) 46%, hsl(var(--border)));
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--applications-green) 8%, transparent), transparent),
    hsl(var(--background) / .48);
}

.applications-optional-dot {
  display: inline-flex;
  border: 1px solid hsl(var(--border) / .58);
  border-radius: 999px;
  padding: .14rem .42rem;
  background: hsl(var(--background) / .45);
  color: hsl(var(--muted-foreground));
  font-size: .64rem;
  letter-spacing: .08em;
}

.applications-submit-dock {
  position: sticky;
  bottom: .35rem;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid color-mix(in srgb, var(--applications-gold) 44%, hsl(var(--border)));
  border-radius: 1rem;
  padding: .8rem;
  background:
    linear-gradient(180deg, hsl(var(--foreground) / .06), transparent),
    hsl(var(--background) / .92);
  box-shadow:
    inset 0 1px 0 hsl(var(--foreground) / .08),
    0 18px 34px -28px hsl(var(--shadow) / .9);
  backdrop-filter: blur(14px);
}

.applications-submit-dock strong,
.applications-submit-dock span {
  display: block;
}

.applications-submit-dock span {
  color: hsl(var(--muted-foreground));
  font-size: .84rem;
}

.applications-review-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(21rem, .34fr);
  gap: 1rem;
  align-items: start;
}

.applications-review-main {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.applications-review-sidecar {
  position: sticky;
  top: 6.2rem;
  display: grid;
  gap: .8rem;
  border: 1px solid hsl(var(--border) / .62);
  border-radius: 1rem;
  padding: .85rem;
  background:
    linear-gradient(180deg, hsl(var(--foreground) / .05), transparent 46%),
    hsl(var(--background) / .48);
}

.applications-review-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.applications-review-metrics div {
  border: 1px solid hsl(var(--border) / .52);
  border-radius: .85rem;
  padding: .65rem;
  background: hsl(var(--background) / .42);
}

.applications-review-metrics span,
.applications-review-metrics strong {
  display: block;
}

.applications-review-metrics span {
  color: hsl(var(--muted-foreground));
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.applications-review-metrics strong {
  margin-top: .18rem;
  color: hsl(var(--foreground));
  font-size: 1.05rem;
}

.applications-decision-form {
  display: grid;
  gap: .65rem;
}

.applications-score-input-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.applications-admin-tools {
  border: 1px solid hsl(var(--border) / .5);
  border-radius: .9rem;
  padding: .65rem;
  background: hsl(var(--background) / .36);
}

.applications-admin-tools summary {
  cursor: pointer;
  color: hsl(var(--muted-foreground));
  font-size: .78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.applications-yesno-option.applications-yes:has(input:checked) {
  border-color: color-mix(in srgb, var(--applications-green) 72%, hsl(var(--border)));
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--applications-green) 18%, transparent), transparent),
    hsl(var(--background) / .6);
}

.applications-yesno-option.applications-no:has(input:checked) {
  border-color: color-mix(in srgb, var(--applications-red) 72%, hsl(var(--border)));
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--applications-red) 18%, transparent), transparent),
    hsl(var(--background) / .6);
}

@media (max-width: 1180px) {
  .applications-hero,
  .applications-radar-panel,
  .applications-command-bar,
  .applications-ops-grid,
  .applications-intake-layout,
  .applications-review-workspace {
    grid-template-columns: 1fr;
  }

  .applications-radar-ring {
    width: min(16rem, 100%);
    margin-inline: auto;
  }

  .applications-intake-rail,
  .applications-review-sidecar {
    position: static;
  }
}

@media (max-width: 760px) {
  .applications-title {
    font-size: 2.35rem;
  }

  .applications-radar-grid,
  .applications-status-grid,
  .applications-review-metrics,
  .applications-score-input-grid {
    grid-template-columns: 1fr;
  }

  .applications-submit-dock,
  .applications-capacity-meta {
    align-items: stretch;
    flex-direction: column;
  }

  .applications-hero-actions {
    grid-template-columns: 1fr;
  }
}

.applications-workspace,
.applications-workspace * {
  min-width: 0;
}

.applications-workspace :is(#ban-appeals, #my-cases, #available-applications, #application-builder, #review-desk),
.applications-collapsible-card,
.applications-question-card {
  scroll-margin-top: 7.5rem;
}

.applications-shell-card,
.applications-glass-card,
.applications-case-card,
.applications-template-card,
.applications-review-card,
.applications-detail-card,
.applications-question-card,
.applications-review-bucket {
  overflow: visible;
}

.applications-hero,
.applications-stat-card,
.applications-radar-ring,
.applications-progress-dial {
  overflow: hidden;
}

.applications-hero {
  grid-template-columns: minmax(0, 1fr) minmax(0, 36rem);
  min-height: auto;
}

.applications-radar-panel {
  grid-template-columns: minmax(9rem, 12rem) minmax(0, 1fr);
}

.applications-radar-grid,
.applications-status-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
}

.applications-command-bar {
  top: 4.75rem;
  grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr);
}

.applications-command-tools {
  grid-template-columns: minmax(0, 1fr) minmax(7.5rem, auto) minmax(7.5rem, auto);
}

.applications-command-link,
.applications-filter-button,
.applications-primary-action,
.applications-secondary-action,
.applications-mini-action,
.applications-select-case {
  white-space: nowrap;
}

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

.applications-card-actions {
  flex: 0 0 auto;
  justify-content: flex-end;
}

.applications-meta-row,
.applications-chip-row,
.applications-action-row,
.applications-review-form,
.applications-bulk-bar {
  row-gap: .55rem;
}

.applications-meta-row span,
.applications-chip,
.applications-mini-feed-row,
.applications-stat-value,
.applications-section-title,
.applications-card-title,
.applications-detail-value,
.applications-answer-value {
  overflow-wrap: anywhere;
}

.applications-expanded-body {
  max-height: none;
  overflow: visible;
  scrollbar-gutter: auto;
}

.applications-form-grid {
  grid-template-columns: minmax(0, .55fr) minmax(0, 1.45fr);
}

.applications-question-card-wide {
  grid-column: auto;
}

@media (min-width: 1320px) {
  .applications-question-card-wide {
    grid-column: span 2;
  }
}

.applications-template-preview-row span {
  min-height: 2.25rem;
  white-space: normal;
}

.applications-submit-dock {
  bottom: .75rem;
}

.applications-review-workspace {
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 24rem);
}

.applications-review-sidecar {
  max-width: 100%;
}

.applications-score-panel {
  align-items: flex-start;
}

.applications-score-panel > * {
  min-width: 0;
}

.applications-review-metrics {
  grid-template-columns: repeat(auto-fit, minmax(5.4rem, 1fr));
}

.applications-fit-check-button {
  display: inline-flex;
  min-height: 2.35rem;
  align-items: center;
  justify-content: center;
  border: 1px solid color-mix(in srgb, var(--applications-cyan) 58%, hsl(var(--border)));
  border-radius: .9rem;
  padding: .62rem .75rem;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--applications-cyan) 16%, transparent), transparent 62%),
    hsl(var(--background) / .54);
  color: hsl(var(--foreground));
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.applications-fit-check-button:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--applications-gold) 70%, hsl(var(--border)));
  box-shadow: 0 18px 28px -24px color-mix(in srgb, var(--applications-cyan) 62%, transparent);
}

.applications-fit-result {
  display: grid;
  gap: .75rem;
  border: 1px solid hsl(var(--border) / .58);
  border-radius: 1rem;
  padding: .8rem;
  background:
    linear-gradient(180deg, hsl(var(--foreground) / .045), transparent 54%),
    hsl(var(--background) / .42);
}

.applications-fit-result[hidden] {
  display: none !important;
}

.applications-fit-success {
  border-color: color-mix(in srgb, var(--applications-green) 55%, hsl(var(--border)));
}

.applications-fit-warning {
  border-color: color-mix(in srgb, var(--applications-gold) 58%, hsl(var(--border)));
}

.applications-fit-danger {
  border-color: color-mix(in srgb, var(--applications-red) 62%, hsl(var(--border)));
}

.applications-fit-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}

.applications-fit-head span {
  color: hsl(var(--foreground));
  font-size: .95rem;
  font-weight: 900;
}

.applications-fit-head strong {
  color: hsl(var(--foreground));
  font-size: 1.45rem;
  line-height: 1;
}

.applications-fit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
}

.applications-fit-grid ul {
  margin: .35rem 0 0;
  padding-left: 1rem;
  color: hsl(var(--foreground) / .86);
  font-size: .8rem;
  line-height: 1.45;
}

.applications-fit-prompts {
  display: grid;
  gap: .42rem;
}

.applications-fit-prompts span {
  border: 1px solid hsl(var(--border) / .48);
  border-radius: .75rem;
  padding: .5rem .58rem;
  background: hsl(var(--background) / .38);
  color: hsl(var(--foreground) / .82);
  font-size: .78rem;
  line-height: 1.35;
}

@media (max-width: 1320px) {
  .applications-command-bar,
  .applications-hero,
  .applications-radar-panel,
  .applications-ops-grid,
  .applications-intake-layout,
  .applications-review-workspace {
    grid-template-columns: 1fr;
  }

  .applications-command-bar,
  .applications-intake-rail,
  .applications-review-sidecar,
  .applications-builder-rail {
    position: static;
  }
}

@media (max-width: 860px) {
  .applications-command-tools,
  .applications-form-grid,
  .applications-fit-grid {
    grid-template-columns: 1fr;
  }

  .applications-card-head,
  .applications-submit-dock,
  .applications-capacity-meta {
    align-items: stretch;
    flex-direction: column;
  }

  .applications-card-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .applications-command-link,
  .applications-filter-button,
  .applications-primary-action,
  .applications-secondary-action,
  .applications-mini-action,
  .applications-select-case {
    white-space: normal;
  }
}

/* Applications final layout hardening.
   This sits after the duplicated Applications rules so the command center cannot
   overflow the panel shell or let the hero dial collide with status text. */
.applications-workspace {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: clip;
  padding-inline: 0;
}

.applications-workspace :is(
  .applications-hero,
  .applications-command-bar,
  .applications-ops-grid,
  .applications-card-grid,
  .applications-intake-layout,
  .applications-review-workspace,
  .applications-builder-shell,
  .applications-form-grid,
  .applications-radar-panel,
  .applications-radar-grid
) {
  max-width: 100%;
}

.applications-hero {
  grid-template-columns: 1fr !important;
  min-height: 0 !important;
  align-items: start;
}

.applications-hero-copy {
  min-width: 0;
}

.applications-title {
  font-size: clamp(2rem, 2.7vw, 3rem) !important;
  line-height: 1.02;
}

.applications-radar-panel {
  grid-template-columns: minmax(0, 9.5rem) minmax(0, 1fr) !important;
  align-items: center !important;
  max-width: 100%;
}

.applications-radar-ring {
  width: 9.25rem !important;
  max-width: 9.25rem !important;
  min-width: 0 !important;
  justify-self: center;
  z-index: 1;
}

.applications-radar-ring > div {
  display: grid;
  place-items: center;
  gap: .15rem;
  line-height: 1;
  padding: .5rem;
}

.applications-radar-ring strong {
  font-size: 1.45rem !important;
}

.applications-radar-ring span {
  font-size: .66rem !important;
}

.applications-radar-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)) !important;
  min-width: 0;
}

.applications-stat-card {
  min-height: auto !important;
}

.applications-stat-value {
  font-size: 1.15rem !important;
  line-height: 1.15;
}

.applications-command-bar {
  position: relative !important;
  top: auto !important;
  grid-template-columns: 1fr !important;
}

.applications-command-links,
.applications-filter-row,
.applications-command-tools,
.applications-bulk-bar,
.applications-review-form,
.applications-card-actions {
  min-width: 0;
}

.applications-command-tools {
  grid-template-columns: 1fr !important;
}

.applications-command-link,
.applications-filter-button,
.applications-primary-action,
.applications-secondary-action,
.applications-select-case,
.applications-mini-action {
  white-space: normal !important;
  text-align: center;
}

.applications-ops-grid,
.applications-intake-layout,
.applications-review-workspace {
  grid-template-columns: 1fr !important;
}

.applications-card-grid,
.applications-question-grid,
.applications-answer-grid,
.applications-status-grid,
.applications-meta-grid,
.applications-review-metrics,
.applications-fit-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)) !important;
}

.applications-expanded-body {
  max-height: none !important;
  overflow: visible !important;
}

.applications-intake-rail,
.applications-review-sidecar,
.applications-builder-rail,
.applications-submit-dock {
  position: relative !important;
  top: auto !important;
  bottom: auto !important;
}

.applications-submit-dock {
  align-items: stretch;
  flex-direction: column;
}

.applications-card-head {
  flex-wrap: wrap;
  min-width: 0;
}

.applications-card-actions {
  max-width: 100%;
  min-width: 0;
  justify-content: flex-start;
}

.applications-template-preview-row span,
.applications-meta-grid span,
.applications-mini-feed-row,
.applications-chip {
  white-space: normal !important;
}

.applications-card-actions > *,
.applications-status-tile,
.applications-mini-feed-row,
.applications-score-panel,
.applications-review-sidecar,
.applications-answer-item,
.applications-detail-card {
  min-width: 0;
}

.applications-collapse-indicator,
.applications-select-case,
.applications-filter-button,
.applications-command-link {
  line-height: 1.2;
}

.applications-status-tile strong {
  overflow-wrap: anywhere;
}

.panel-ui-enhanced form[data-panel-dirty="1"] :is(input, textarea, select):not(:disabled) {
  border-color: color-mix(in oklab, hsl(var(--accent)) 38%, hsl(var(--border)) 62%);
}

.panel-ui-enhanced form[data-panel-dirty="1"] :is(input, textarea, select):focus {
  border-color: hsl(var(--accent) / 0.78);
}

.panel-ui-enhanced :is(input, textarea, select, button, a):focus-visible {
  outline: 2px solid hsl(var(--accent) / 0.72);
  outline-offset: 2px;
}

.rcp-regiment-page :is(input, select, textarea, button),
.applications-workspace :is(input, select, textarea, button) {
  max-width: 100%;
}

.rcp-member-remove-preview {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  white-space: normal;
}

.rcp-member-remove-results {
  max-height: min(32rem, 62vh) !important;
  scrollbar-gutter: stable;
}

.rcp-member-remove-row {
  min-height: 3.6rem;
  cursor: pointer;
}

.rcp-member-remove-row > span:first-child {
  min-width: 0;
}

.rcp-member-remove-name,
.rcp-member-remove-meta {
  overflow: visible !important;
  overflow-wrap: anywhere;
  text-overflow: clip !important;
  white-space: normal !important;
}

.rcp-member-remove-pill {
  justify-self: end;
  white-space: nowrap;
}

@media (min-width: 1180px) {
  .applications-hero {
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr) !important;
  }

  .applications-radar-panel {
    grid-template-columns: minmax(0, 9.5rem) minmax(0, 1fr) !important;
  }

  .applications-command-tools {
    grid-template-columns: minmax(0, 1fr) auto auto !important;
  }

  .applications-ops-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, .85fr) !important;
  }

  .applications-intake-layout {
    grid-template-columns: minmax(0, 12rem) minmax(0, 1fr) !important;
  }

  .applications-review-workspace {
    grid-template-columns: minmax(0, 1fr) minmax(0, 23rem) !important;
  }

  .applications-submit-dock {
    align-items: center;
    flex-direction: row;
  }
}

@media (prefers-reduced-motion: reduce) {
  .liquid-button::after {
    transition: none !important;
  }
}

/* Chat system redesign */
.discord-shell {
  grid-template-columns: 4.1rem 15.5rem minmax(0, 1fr) 16rem;
  gap: 0;
  background:
    radial-gradient(circle at top left, rgba(36, 92, 62, 0.16), transparent 20%),
    radial-gradient(circle at bottom right, rgba(20, 31, 51, 0.55), transparent 30%),
    #0b0f17;
}

.discord-shell::before {
  opacity: 0.04;
}

.discord-regiment-bar,
.discord-channel-list,
.discord-main-area,
.discord-user-list {
  background: transparent;
}

.discord-regiment-bar,
.discord-channel-list,
.discord-user-list {
  border-color: rgba(160, 180, 198, 0.12);
}

.discord-channel-list,
.discord-user-list {
  padding: 0.8rem 0.7rem;
}

.discord-channel-header,
.discord-user-header,
.discord-main-header,
.discord-main-toolbar,
.discord-message-input-wrap,
.discord-channel-banner,
.discord-voice-regiment-block,
.discord-user-row,
.discord-empty,
.discord-sidebar-voice-widget,
.discord-context-pane,
.discord-voice-dock,
.discord-voice-overlay-panel {
  border: 1px solid rgba(160, 180, 198, 0.11);
  box-shadow: none;
}

.discord-channel-banner,
.discord-main-toolbar,
.discord-message-input-wrap,
.discord-voice-regiment-block,
.discord-user-row,
.discord-empty,
.discord-sidebar-voice-widget,
.discord-context-pane,
.discord-voice-overlay-panel,
.discord-main-header {
  background: rgba(15, 22, 35, 0.82);
}

.discord-channel-banner {
  margin-bottom: 0.8rem;
  padding: 0.8rem 0.85rem;
}

.discord-channel-banner-copy,
.discord-sidebar-helper,
.discord-main-toolbar-meta,
.discord-channel-context-meta,
.discord-user-rank,
.discord-channel-row-meta,
.discord-message-time,
.discord-composer-meta,
.discord-composer-shortcuts,
.discord-voice-dock-meta,
.discord-sidebar-voice-widget-meta {
  color: rgba(193, 205, 218, 0.68);
}

.discord-sidebar-tools {
  gap: 0.65rem;
}

.discord-filter-row,
.discord-sidebar-quick-actions {
  gap: 0.4rem;
}

.discord-channel-filter,
.discord-control-btn,
.discord-send-btn,
.discord-message-inline-btn {
  border-color: rgba(127, 154, 135, 0.24);
  background: rgba(18, 28, 35, 0.88);
  color: rgba(237, 242, 245, 0.92);
  box-shadow: none;
}

.discord-control-btn:hover,
.discord-send-btn:hover,
.discord-message-inline-btn:hover,
.discord-channel-filter:hover,
.voice-mod-btn:hover {
  transform: none;
  border-color: rgba(127, 185, 143, 0.42);
  background: rgba(23, 36, 44, 0.95);
}

.discord-channel-filter.is-active,
.discord-send-btn {
  border-color: rgba(109, 177, 128, 0.44);
  background:
    linear-gradient(180deg, rgba(43, 76, 54, 0.94), rgba(25, 47, 35, 0.94));
  color: #f5fbf7;
}

.discord-channel-scroll {
  padding-right: 0.15rem;
}

.discord-voice-regiment-block {
  margin-bottom: 0.7rem;
  padding: 0.5rem;
  background: rgba(15, 22, 35, 0.58);
}

.discord-category-title {
  min-height: 2.1rem;
  padding: 0.3rem 0.25rem;
  background: transparent;
}

.discord-category-scope {
  border-color: rgba(160, 180, 198, 0.14);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(193, 205, 218, 0.62);
}

.discord-channel-row,
.discord-voice-row-main {
  position: relative;
  gap: 0.6rem;
  min-height: 2.65rem;
  padding: 0.56rem 0.68rem;
  border-radius: 0.85rem;
  border: 1px solid transparent;
  background: transparent;
}

.discord-channel-row:hover,
.discord-voice-row-main:hover {
  border-color: transparent;
  background: rgba(255, 255, 255, 0.04);
}

.discord-channel-row.is-active,
.discord-voice-row.is-connected .discord-voice-row-main {
  border-color: rgba(109, 177, 128, 0.12);
  background: rgba(109, 177, 128, 0.08);
}

.discord-channel-row.is-active::before,
.discord-voice-row.is-connected .discord-voice-row-main::before {
  content: "";
  position: absolute;
  left: -0.32rem;
  top: 0.38rem;
  bottom: 0.38rem;
  width: 3px;
  border-radius: 999px;
  background: #6db180;
  box-shadow: 0 0 12px rgba(109, 177, 128, 0.22);
}

.discord-channel-row.has-unread .discord-channel-label::after {
  content: "";
  display: inline-block;
  width: 0.42rem;
  height: 0.42rem;
  margin-left: 0.45rem;
  border-radius: 999px;
  background: #6db180;
  vertical-align: middle;
}

.discord-sidebar-voice-widget {
  display: grid;
  gap: 0.7rem;
  margin-top: auto;
  padding: 0.85rem;
}

.discord-sidebar-voice-widget-copy {
  display: grid;
  gap: 0.14rem;
}

.discord-sidebar-voice-widget-kicker {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(193, 205, 218, 0.58);
}

.discord-sidebar-voice-widget-title {
  font-size: 0.94rem;
  font-weight: 700;
  color: #f4f8fb;
}

.discord-sidebar-voice-widget-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.discord-sidebar-voice-widget-count {
  font-size: 0.76rem;
  color: rgba(193, 205, 218, 0.68);
}

.discord-main-area {
  min-width: 0;
  background: transparent;
}

.discord-main-header {
  min-height: 3.8rem;
  padding: 0.7rem 1.1rem;
  border-width: 0 0 1px;
  border-radius: 0;
}

.discord-main-subtitle {
  display: block;
  font-size: 0.78rem;
  line-height: 1.45;
  color: rgba(193, 205, 218, 0.62);
}

.discord-channel-settings-menu {
  right: 1rem;
  top: calc(100% + 0.45rem);
  min-width: 13rem;
  padding: 0.45rem;
}

.discord-channel-settings-action {
  width: 100%;
  display: block;
  padding: 0.6rem 0.72rem;
  border: 0;
  border-radius: 0.7rem;
  background: transparent;
  color: #eef4f7;
  text-align: left;
}

.discord-channel-settings-action:hover {
  background: rgba(255, 255, 255, 0.05);
}

.discord-channel-settings-note {
  padding: 0.55rem 0.7rem 0.25rem;
  font-size: 0.72rem;
  line-height: 1.45;
  color: rgba(193, 205, 218, 0.62);
}

.discord-main-toolbar {
  margin: 0;
  padding: 0.75rem 1.1rem 0.65rem;
  border-width: 0 0 1px;
  border-radius: 0;
  background: transparent;
}

.discord-main-toolbar-group {
  gap: 0.45rem;
}

.discord-application-summary,
.discord-workspace-empty {
  margin: 0.85rem 1.1rem 0;
}

.discord-message-stream {
  position: relative;
  padding: 1rem 1.1rem 6.75rem;
  gap: 0.15rem;
}

.discord-message {
  gap: 0.75rem;
  padding: 0.22rem 0;
}

.discord-message::after {
  display: none;
}

.discord-message-body {
  padding: 0.25rem 0;
}

.discord-message-body::before {
  inset: -0.15rem -0.6rem;
  border-radius: 0.8rem;
  background: rgba(255, 255, 255, 0.04);
}

.discord-message.is-grouped {
  margin-top: -0.12rem;
}

.discord-message.is-grouped .discord-message-gutter {
  visibility: hidden;
}

.discord-message.is-mentioned .discord-message-body::before {
  opacity: 1;
  background:
    linear-gradient(90deg, rgba(109, 177, 128, 0.12), transparent 28%),
    rgba(255, 255, 255, 0.04);
}

.discord-message-actions {
  margin-left: auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity 150ms ease;
}

.discord-message:hover .discord-message-actions {
  opacity: 1;
  pointer-events: auto;
}

.discord-message:focus-within .discord-message-actions {
  opacity: 1;
  pointer-events: auto;
}

.discord-message.is-deep-linked .discord-message-body {
  border-color: rgba(97, 197, 255, 0.34);
  background:
    linear-gradient(90deg, rgba(97, 197, 255, 0.1), transparent 44%),
    rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 1px rgba(97, 197, 255, 0.12), 0 18px 34px rgba(7, 19, 33, 0.26);
}

.discord-message-action-btn {
  border: 1px solid rgba(160, 180, 198, 0.14);
  border-radius: 999px;
  padding: 0.22rem 0.55rem;
  background: rgba(11, 15, 23, 0.85);
  color: rgba(237, 242, 245, 0.84);
  font-size: 0.68rem;
}

.discord-load-older-btn,
.discord-jump-latest {
  align-self: center;
  border: 1px solid rgba(109, 177, 128, 0.24);
  border-radius: 999px;
  padding: 0.42rem 0.8rem;
  background: rgba(15, 22, 35, 0.94);
  color: #eff6f2;
}

.discord-jump-latest {
  position: sticky;
  bottom: 1rem;
  z-index: 3;
  margin-left: auto;
}

.discord-jump-latest.hidden {
  display: none;
}

.discord-message-input-wrap {
  position: sticky;
  bottom: 0;
  z-index: 4;
  margin: auto 1.1rem 1rem;
  padding: 0.8rem 0.9rem 0.75rem;
  border-radius: 1rem;
  background:
    linear-gradient(180deg, rgba(15, 22, 35, 0.98), rgba(15, 22, 35, 0.96));
  backdrop-filter: blur(10px);
}

.discord-message-input-shell {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.6rem;
}

.discord-message-compose-field {
  position: relative;
}

.discord-message-textarea {
  min-height: 3.65rem;
  padding: 0.88rem 5rem 0.9rem 0.95rem;
  border-radius: 1rem;
  background: rgba(11, 15, 23, 0.62);
}

.discord-message-inline-tools {
  position: absolute;
  right: 0.7rem;
  bottom: 0.72rem;
  display: flex;
  gap: 0.35rem;
}

.discord-message-inline-btn {
  width: 2rem;
  height: 2rem;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  padding: 0;
  font-weight: 700;
}

.discord-message-input-actions {
  justify-content: flex-end;
}

.discord-send-btn {
  min-width: 4.8rem;
}

.discord-composer-shortcuts span {
  border-color: rgba(160, 180, 198, 0.14);
  background: rgba(255, 255, 255, 0.03);
}

.discord-mention-menu {
  margin: 0.4rem 1.1rem 0;
  padding: 0.4rem;
  border-color: rgba(160, 180, 198, 0.14);
  background: rgba(15, 22, 35, 0.98);
}

.discord-context-pane {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 1.6rem);
  overflow: hidden;
}

.discord-user-header {
  padding: 0.95rem 0.95rem 0.8rem;
  background: transparent;
  border: 0;
}

.discord-user-scroll {
  padding: 0 0.95rem 0.95rem;
}

.discord-user-row {
  background: rgba(15, 22, 35, 0.7);
}

.discord-user-row.is-speaking,
.discord-voice-member-pill.is-speaking {
  border-color: rgba(109, 177, 128, 0.3);
  box-shadow: 0 0 0 1px rgba(109, 177, 128, 0.08);
}

.discord-voice-overlay {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: grid;
  place-items: end center;
  padding: 1rem 1rem 5.9rem;
  background: rgba(11, 15, 23, 0.44);
  backdrop-filter: blur(8px);
}

.discord-voice-overlay.hidden {
  display: none;
}

.discord-voice-overlay-panel {
  width: min(100%, 58rem);
  display: grid;
  gap: 1rem;
  padding: 1rem;
  border-radius: 1.15rem;
  background: rgba(15, 22, 35, 0.97);
}

.discord-voice-overlay-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.discord-voice-stage-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.discord-voice-stage-stat {
  background: rgba(255, 255, 255, 0.03);
}

.discord-voice-mic-test {
  display: grid;
  gap: 0.55rem;
}

.discord-voice-mic-test-meter {
  height: 0.58rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.discord-voice-mic-test-meter span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #6db180, #b9e7c0);
  transition: width 120ms linear;
}

.discord-voice-autojoin-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: rgba(193, 205, 218, 0.72);
  font-size: 0.78rem;
}

.discord-voice-dock {
  bottom: 0.9rem;
  width: min(64rem, calc(100vw - 2rem));
  padding: 0.7rem 0.85rem;
  border-radius: 1rem;
  background: rgba(15, 22, 35, 0.96);
  cursor: pointer;
}

.discord-voice-dock-actions {
  gap: 0.4rem;
}

.discord-voice-dock.hidden {
  display: none;
}

@media (max-width: 1360px) {
  .discord-shell {
    grid-template-columns: 4rem 14.5rem minmax(0, 1fr) 14rem;
  }
}

@media (max-width: 1180px) {
  .discord-shell {
    grid-template-columns: 4rem 14rem minmax(0, 1fr);
  }
}

@media (max-width: 820px) {
  .discord-shell {
    grid-template-columns: 3.85rem 13.6rem minmax(0, 1fr);
  }

  .discord-message-stream,
  .discord-main-toolbar,
  .discord-main-header {
    padding-left: 0.8rem;
    padding-right: 0.8rem;
  }

  .discord-message-input-wrap {
    margin-left: 0.8rem;
    margin-right: 0.8rem;
  }

  .discord-voice-overlay {
    padding: 0.75rem 0.75rem 5.75rem;
  }

  .discord-voice-stage-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .discord-shell {
    grid-template-columns: 3.7rem minmax(12rem, 41vw) minmax(0, 1fr);
  }

  .discord-message-input-shell {
    grid-template-columns: 1fr;
  }

  .discord-message-input-actions {
    justify-content: stretch;
  }

  .discord-send-btn {
    width: 100%;
  }

  .discord-voice-dock {
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;
    width: auto;
    transform: none;
    align-items: flex-start;
    flex-direction: column;
  }

    .discord-voice-dock-actions {
      width: 100%;
      justify-content: flex-start;
    }
  }

.discord-shell.is-sidebar-collapsed {
  grid-template-columns: 4.1rem 0 minmax(0, 1fr) 16rem;
}

.discord-shell.is-sidebar-collapsed .discord-channel-list {
  padding: 0;
  overflow: hidden;
  border-right-width: 0;
}

.discord-shell.is-members-hidden {
  grid-template-columns: 4.1rem 15.5rem minmax(0, 1fr) 0;
}

.discord-shell.is-members-hidden .discord-user-list {
  padding: 0;
  overflow: hidden;
  border-left-width: 0;
}

.discord-shell.is-compact .discord-message {
  gap: 0.6rem;
  padding: 0.08rem 0;
}

.discord-shell.is-compact .discord-message-stream {
  gap: 0.05rem;
}

.discord-shell.is-compact .discord-user-row,
.discord-shell.is-compact .discord-channel-row,
.discord-shell.is-compact .discord-voice-row-main {
  min-height: 2.35rem;
}

.discord-main-header {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(12rem, 0.9fr) auto;
  gap: 1rem;
  align-items: center;
}

.discord-main-header-zone {
  min-width: 0;
}

.discord-main-header-zone-center {
  display: flex;
  justify-content: center;
}

.discord-header-status {
  display: grid;
  justify-items: center;
  gap: 0.24rem;
  min-width: 0;
}

.discord-header-status-pill {
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(109, 177, 128, 0.22);
  background: rgba(109, 177, 128, 0.08);
  color: #ecf8ef;
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}

.discord-header-status-copy {
  color: rgba(193, 205, 218, 0.62);
  font-size: 0.72rem;
  line-height: 1.3;
  text-align: center;
}

.discord-header-actions {
  position: relative;
  justify-content: flex-end;
}

.discord-main-toolbar-meta {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
}

.discord-main-toolbar-meta span:first-child {
  color: #f3f8fb;
  font-size: 0.82rem;
  font-weight: 700;
}

.discord-message-stream {
  align-items: center;
}

.discord-message,
.discord-date-separator,
.discord-unread-divider,
.discord-load-older-btn {
  width: min(100%, 54rem);
}

.discord-date-separator,
.discord-unread-divider {
  position: relative;
  display: flex;
  justify-content: center;
  margin: 0.9rem 0 0.45rem;
}

.discord-date-separator::before,
.discord-unread-divider::before {
  content: "";
  position: absolute;
  inset: 50% 0 auto;
  height: 1px;
  background: rgba(160, 180, 198, 0.12);
}

.discord-date-separator span,
.discord-unread-divider span {
  position: relative;
  z-index: 1;
  padding: 0 0.75rem;
  background: #0b0f17;
  color: rgba(193, 205, 218, 0.62);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.discord-unread-divider span {
  color: #bfe4c7;
}

.discord-message-body {
  max-width: min(100%, 49rem);
}

.discord-message-actions {
  gap: 0.32rem;
}

.discord-message-action-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.discord-channel-row.has-mention .discord-channel-badge::after,
.discord-channel-row.has-mention .discord-channel-label::before {
  content: "@";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  margin-right: 0.35rem;
  border-radius: 999px;
  background: rgba(109, 177, 128, 0.18);
  color: #dff4e3;
  font-size: 0.62rem;
  font-weight: 700;
}

.discord-chat-reply-banner,
.discord-chat-upload-preview {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.7rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid rgba(160, 180, 198, 0.12);
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.04);
}

.discord-chat-reply-banner.hidden,
.discord-chat-upload-preview.hidden {
  display: none;
}

.discord-chat-reply-copy,
.discord-chat-upload-preview-copy {
  display: grid;
  min-width: 0;
  gap: 0.14rem;
}

.discord-chat-reply-kicker,
.discord-chat-upload-preview-title {
  color: rgba(193, 205, 218, 0.58);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.discord-chat-reply-label,
.discord-chat-upload-preview-meta {
  color: #edf4f7;
  font-size: 0.78rem;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.discord-chat-upload-preview-media {
  width: 3rem;
  height: 3rem;
  overflow: hidden;
  border-radius: 0.75rem;
  background: rgba(11, 15, 23, 0.6);
}

.discord-chat-upload-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.discord-message-input-wrap.is-dragging {
  border-color: rgba(109, 177, 128, 0.35);
  background: rgba(17, 29, 25, 0.95);
}

.discord-composer-counter.is-warning {
  color: #e9d78a;
}

.discord-composer-counter.is-danger {
  color: #f4a6a6;
}

.discord-composer-meta [data-tone="danger"],
#chatComposerStatus[data-tone="danger"] {
  color: #f3b3b3;
}

.discord-member-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
}

.discord-member-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: rgba(193, 205, 218, 0.68);
  font-size: 0.72rem;
  white-space: nowrap;
}

.discord-member-section {
  display: grid;
  gap: 0.45rem;
}

.discord-member-section + .discord-member-section {
  margin-top: 0.7rem;
}

.discord-member-section-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.3rem 0;
  background: rgba(15, 22, 35, 0.96);
  color: rgba(193, 205, 218, 0.64);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.discord-member-section-body {
  display: grid;
  gap: 0.45rem;
}

.discord-member-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: center;
}

.discord-member-row.is-offline {
  opacity: 0.78;
}

.discord-member-row.is-offline .discord-user-avatar-img {
  filter: grayscale(1);
}

.discord-member-row-copy {
  min-width: 0;
}

.discord-member-presence-dot {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(160, 180, 198, 0.28);
}

.discord-member-presence-dot.is-online {
  border-color: #6db180;
  background: #6db180;
  box-shadow: 0 0 0 3px rgba(109, 177, 128, 0.12);
}

.discord-member-presence-dot.is-offline {
  background: transparent;
}

.discord-member-voice-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.4rem;
  padding: 0.14rem 0.4rem;
  border-radius: 999px;
  background: rgba(109, 177, 128, 0.12);
  color: #d6efdc;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.discord-member-profile {
  display: grid;
  gap: 0.7rem;
  margin: 0 0.95rem 0.95rem;
  padding: 0.8rem;
  border: 1px solid rgba(160, 180, 198, 0.12);
  border-radius: 0.95rem;
  background: rgba(255, 255, 255, 0.04);
}

.discord-member-profile.hidden {
  display: none;
}

.discord-member-profile-head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.discord-member-profile-copy {
  min-width: 0;
}

.discord-member-profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  color: rgba(193, 205, 218, 0.68);
  font-size: 0.74rem;
}

@media (max-width: 1360px) {
  .discord-shell.is-sidebar-collapsed {
    grid-template-columns: 4rem 0 minmax(0, 1fr) 14rem;
  }

  .discord-shell.is-members-hidden {
    grid-template-columns: 4rem 14.5rem minmax(0, 1fr) 0;
  }
}

@media (max-width: 1180px) {
  .discord-shell.is-sidebar-collapsed,
  .discord-shell.is-members-hidden,
  .discord-shell.is-sidebar-collapsed.is-members-hidden {
    grid-template-columns: 4rem 0 minmax(0, 1fr);
  }
}

@media (max-width: 820px) {
  .discord-main-header {
    grid-template-columns: 1fr;
    gap: 0.7rem;
    align-items: stretch;
  }

  .discord-main-header-zone-center {
    justify-content: flex-start;
  }

  .discord-member-tools {
    grid-template-columns: 1fr;
  }
}

/* Stage 3 chat refinement */
.discord-shell {
  grid-template-columns: 4.1rem 17rem minmax(0, 1fr) 18rem;
}

.discord-channel-list {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  gap: 0;
  padding: 1rem 0.9rem 0.9rem;
}

.discord-channel-header {
  margin-bottom: 0.95rem;
  padding-bottom: 0.15rem;
}

.discord-channel-banner {
  margin-bottom: 1rem;
  padding: 0.95rem 0.95rem 0.9rem;
}

.discord-sidebar-tools {
  gap: 0.9rem;
  margin-bottom: 1rem;
  padding-bottom: 0.95rem;
  border-bottom: 1px solid rgba(160, 180, 198, 0.08);
}

.discord-sidebar-search {
  gap: 0.45rem;
}

.discord-filter-row {
  gap: 0.55rem;
}

.discord-sidebar-quick-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.discord-sidebar-helper {
  padding: 0.75rem 0.82rem;
  border-radius: 0.95rem;
}

.discord-channel-scroll {
  min-height: 0;
  padding-right: 0.35rem;
  margin-right: -0.15rem;
}

.discord-channel-scroll::-webkit-scrollbar,
.discord-user-scroll::-webkit-scrollbar {
  width: 10px;
}

.discord-channel-scroll::-webkit-scrollbar-thumb,
.discord-user-scroll::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background: rgba(160, 180, 198, 0.22);
  background-clip: padding-box;
}

.discord-voice-regiment-block {
  margin-bottom: 0.95rem;
  padding: 0.62rem 0.58rem 0.58rem;
  border-radius: 1rem;
}

.discord-category-title {
  min-height: 2.55rem;
  padding: 0.45rem 0.35rem;
  gap: 0.45rem;
}

.discord-category-title > span:first-of-type {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.discord-category-toggle,
.discord-plus-btn {
  width: 1.9rem;
  height: 1.9rem;
  min-width: 1.9rem;
}

.discord-category-block > .space-y-1 {
  display: grid;
  gap: 0.28rem;
  padding-top: 0.35rem;
}

.discord-channel-row,
.discord-voice-row-main {
  min-height: 2.9rem;
  padding: 0.68rem 0.78rem;
}

.discord-channel-details {
  gap: 0.18rem;
}

.discord-channel-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.discord-voice-row {
  gap: 0.5rem;
  margin-bottom: 0.15rem;
}

.discord-voice-row-main {
  grid-template-columns: auto minmax(0, 1fr) auto auto auto;
}

.discord-voice-delete {
  width: 2rem;
  height: 2rem;
  align-self: center;
}

.discord-sidebar-voice-widget {
  position: sticky;
  bottom: 0;
  z-index: 3;
  gap: 0;
  margin-top: 1rem;
  padding: 0;
  overflow: hidden;
  border-radius: 1.1rem;
  background: rgba(15, 22, 35, 0.96);
}

.discord-sidebar-voice-widget-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  width: 100%;
  padding: 0.9rem 0.95rem;
  text-align: left;
}

.discord-sidebar-voice-widget-summary {
  display: grid;
  justify-items: end;
  gap: 0.2rem;
  flex: none;
}

.discord-sidebar-voice-widget-chevron {
  color: rgba(193, 205, 218, 0.58);
  font-size: 0.8rem;
}

.discord-sidebar-voice-widget.is-expanded .discord-sidebar-voice-widget-head {
  border-bottom: 1px solid rgba(160, 180, 198, 0.1);
}

.discord-sidebar-voice-panel {
  display: grid;
  gap: 0.8rem;
  padding: 0.95rem;
}

.discord-sidebar-voice-panel.hidden {
  display: none;
}

.discord-sidebar-voice-status-grid {
  display: grid;
  gap: 0.55rem;
}

.discord-sidebar-voice-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.58rem 0.68rem;
  border-radius: 0.88rem;
  border: 1px solid rgba(160, 180, 198, 0.1);
  background: rgba(255, 255, 255, 0.03);
}

.discord-sidebar-voice-stat-label {
  color: rgba(193, 205, 218, 0.58);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.discord-sidebar-voice-stat-value {
  color: #edf4f7;
  font-size: 0.78rem;
  font-weight: 700;
  text-align: right;
}

.discord-sidebar-voice-control-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.discord-sidebar-voice-secondary-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}

.discord-sidebar-voice-control-grid .discord-control-btn,
.discord-sidebar-voice-secondary-actions .discord-control-btn {
  min-height: 2.35rem;
  padding-inline: 0.55rem;
}

.discord-sidebar-voice-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  color: rgba(193, 205, 218, 0.62);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.discord-sidebar-voice-participants-wrap {
  display: grid;
  gap: 0.55rem;
}

.discord-sidebar-voice-participants {
  display: grid;
  gap: 0.42rem;
  max-height: 12.5rem;
  overflow-y: auto;
  padding-right: 0.15rem;
}

.discord-sidebar-voice-participant {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.62rem;
  align-items: center;
  width: 100%;
  padding: 0.52rem 0.56rem;
  border: 1px solid rgba(160, 180, 198, 0.08);
  border-radius: 0.88rem;
  background: rgba(255, 255, 255, 0.03);
  text-align: left;
}

.discord-sidebar-voice-participant:hover {
  border-color: rgba(109, 177, 128, 0.18);
  background: rgba(255, 255, 255, 0.05);
}

.discord-sidebar-voice-participant.is-speaking {
  box-shadow: inset 0 0 0 1px rgba(109, 177, 128, 0.16);
}

.discord-sidebar-voice-participant-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: rgba(11, 15, 23, 0.66);
}

.discord-sidebar-voice-participant-avatar.is-stage {
  width: 2.45rem;
  height: 2.45rem;
}

.discord-sidebar-voice-participant-copy {
  min-width: 0;
  display: grid;
  gap: 0.12rem;
}

.discord-sidebar-voice-participant-name {
  color: #eff5f8;
  font-size: 0.8rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.discord-sidebar-voice-participant-meta {
  color: rgba(193, 205, 218, 0.62);
  font-size: 0.7rem;
}

.discord-voice-dock {
  width: min(48rem, calc(100vw - 2rem));
  padding: 0.62rem 0.78rem;
  opacity: 0.96;
}

.discord-voice-dock-actions {
  gap: 0.3rem;
}

.discord-voice-dock-actions .discord-control-btn:not(:first-child):not(:nth-child(2)) {
  display: none;
}

.discord-voice-overlay {
  padding: 1rem 1rem 5.2rem 18.5rem;
}

.discord-voice-overlay-panel {
  width: min(100%, 72rem);
  grid-template-columns: minmax(0, 1.15fr) minmax(15rem, 0.42fr);
  align-items: start;
  gap: 1rem;
}

.discord-voice-overlay-head,
.discord-voice-stage-grid,
.discord-voice-share-shell {
  grid-column: 1 / 2;
}

.discord-voice-controls,
.discord-voice-mic-test {
  grid-column: 2 / 3;
}

.discord-voice-controls {
  display: grid;
  gap: 0.55rem;
  align-content: start;
}

.discord-voice-controls .discord-control-btn,
.discord-voice-mic-test .discord-control-btn {
  width: 100%;
}

.discord-voice-share-shell {
  display: grid;
  gap: 0.8rem;
}

.discord-voice-share-grid {
  display: grid;
  gap: 0.85rem;
}

.discord-voice-share-grid.has-secondary {
  grid-template-columns: minmax(0, 1fr) 15rem;
  align-items: start;
}

.discord-voice-share-stage {
  display: grid;
  gap: 0.7rem;
}

.discord-voice-share-stage-frame {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid rgba(160, 180, 198, 0.11);
  background: rgba(7, 11, 17, 0.92);
  min-height: 22rem;
}

.discord-voice-share-stage.is-single .discord-voice-share-stage-frame {
  min-height: 28rem;
}

.discord-voice-share-video.is-stage {
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: inherit;
  object-fit: contain;
  background: #06090f;
}

.discord-voice-share-stage-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  background: linear-gradient(180deg, transparent, rgba(8, 12, 18, 0.88));
}

.discord-voice-share-stage-copy {
  display: flex;
  align-items: center;
  gap: 0.72rem;
}

.discord-voice-share-stage-title {
  color: #f1f7fa;
  font-size: 0.98rem;
  font-weight: 700;
}

.discord-voice-share-stage-meta,
.discord-voice-share-stage-resolution {
  color: rgba(208, 218, 228, 0.72);
  font-size: 0.76rem;
}

.discord-voice-share-stage-resolution {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  padding: 0.28rem 0.48rem;
  border-radius: 999px;
  background: rgba(8, 12, 18, 0.78);
}

.discord-voice-share-stage-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
}

.discord-voice-share-thumbs {
  display: grid;
  gap: 0.65rem;
}

.discord-voice-share-card.is-secondary {
  padding: 0.45rem;
  border-radius: 0.95rem;
}

.discord-voice-share-card.is-secondary .discord-voice-share-video {
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.discord-user-list {
  padding: 1rem 0.9rem;
}

.discord-context-pane {
  min-height: calc(100vh - 2rem);
  border-radius: 1.05rem;
  background: rgba(15, 22, 35, 0.88);
}

.discord-user-header {
  padding: 1.05rem 1rem 0.9rem;
}

.discord-channel-context-meta {
  display: grid;
  gap: 0.4rem;
  padding: 0.85rem 1rem 0;
  border-top: 1px solid rgba(160, 180, 198, 0.08);
}

.discord-user-header-wrap {
  margin-bottom: 0;
}

.discord-user-scroll {
  padding: 0.85rem 1rem 1rem;
}

.discord-member-section + .discord-member-section {
  margin-top: 1rem;
}

.discord-member-section-head {
  padding: 0.45rem 0;
}

.discord-member-row,
.discord-user-row {
  min-height: 3.1rem;
  padding: 0.78rem 0.84rem;
  border-radius: 0.95rem;
}

.discord-member-profile {
  margin: 0 1rem 1rem;
  padding: 0.95rem;
}

.discord-user-name {
  font-size: 0.84rem;
}

.discord-user-rank {
  line-height: 1.45;
}

@media (max-width: 1360px) {
  .discord-shell {
    grid-template-columns: 4rem 16rem minmax(0, 1fr) 16rem;
  }

  .discord-voice-overlay {
    padding-left: 17.3rem;
  }
}

@media (max-width: 1180px) {
  .discord-voice-overlay {
    padding-left: 1rem;
  }

  .discord-voice-overlay-panel {
    grid-template-columns: 1fr;
  }

  .discord-voice-overlay-head,
  .discord-voice-stage-grid,
  .discord-voice-share-shell,
  .discord-voice-controls,
  .discord-voice-mic-test {
    grid-column: auto;
  }

  .discord-voice-share-grid.has-secondary {
    grid-template-columns: 1fr;
  }

  .discord-voice-share-thumbs {
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  }
}

@media (max-width: 820px) {
  .discord-channel-list {
    padding: 0.85rem 0.75rem 0.75rem;
  }

  .discord-sidebar-quick-actions,
  .discord-sidebar-voice-secondary-actions {
    grid-template-columns: 1fr;
  }

  .discord-sidebar-voice-control-grid {
    grid-template-columns: 1fr 1fr;
  }

  .discord-user-list {
    padding: 0;
  }
}

/* Stage 4 adaptive layout refinement */
.discord-shell {
  --chat-shell-max: 122rem;
  --chat-rail-width: 4.15rem;
  --chat-left-width: clamp(16rem, 17vw, 19.25rem);
  --chat-right-width: clamp(17rem, 18vw, 20.5rem);
  --chat-feed-max: clamp(50rem, 62vw, 62rem);
  --chat-panel-pad: clamp(0.8rem, 0.7rem + 0.35vw, 1.1rem);
  --chat-meta-size: clamp(0.72rem, 0.69rem + 0.08vw, 0.8rem);
  width: min(100vw, var(--chat-shell-max));
  max-width: var(--chat-shell-max);
  margin-inline: auto;
  padding-inline: clamp(0.25rem, 0.6vw, 0.85rem);
  grid-template-columns:
    var(--chat-rail-width)
    minmax(15.5rem, var(--chat-left-width))
    minmax(0, 1fr)
    minmax(16.5rem, var(--chat-right-width));
  box-sizing: border-box;
}

.discord-regiment-bar,
.discord-channel-list,
.discord-main-area,
.discord-user-list {
  min-width: 0;
}

.discord-main-header,
.discord-main-toolbar,
.discord-message-input-wrap,
.discord-channel-list,
.discord-user-list {
  font-size: clamp(0.84rem, 0.81rem + 0.08vw, 0.92rem);
}

.discord-main-title {
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.2rem);
  line-height: 1.2;
}

.discord-channel-header-title,
.discord-sidebar-search-label,
.discord-room-hero-kicker,
.discord-sidebar-voice-stat-label,
.discord-member-section-head {
  font-size: clamp(0.65rem, 0.63rem + 0.05vw, 0.72rem);
}

.discord-main-subtitle,
.discord-channel-banner-copy,
.discord-sidebar-helper,
.discord-main-toolbar-meta,
.discord-channel-context-meta,
.discord-user-rank,
.discord-channel-row-meta,
.discord-message-time,
.discord-composer-meta,
.discord-composer-shortcuts,
.discord-voice-dock-meta,
.discord-sidebar-voice-widget-meta,
.discord-header-status-copy {
  font-size: var(--chat-meta-size);
}

.discord-main-toolbar {
  align-items: start;
}

.discord-main-toolbar-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(0.4rem, 0.35rem + 0.15vw, 0.6rem);
  min-width: 0;
}

.discord-main-toolbar-group .discord-control-btn {
  min-height: clamp(2.1rem, 2rem + 0.2vw, 2.45rem);
  padding-inline: clamp(0.58rem, 0.52rem + 0.18vw, 0.78rem);
  white-space: nowrap;
}

.discord-main-toolbar-meta {
  max-width: min(34rem, 100%);
  padding-top: 0.1rem;
}

.discord-main-header {
  grid-template-columns: minmax(0, 1.35fr) minmax(11rem, 0.8fr) auto;
  gap: clamp(0.75rem, 0.65rem + 0.25vw, 1rem);
  padding: calc(var(--chat-panel-pad) - 0.05rem) clamp(0.95rem, 0.8rem + 0.4vw, 1.35rem);
}

.discord-main-toolbar,
.discord-message-stream,
.discord-message-input-wrap,
.discord-application-summary,
.discord-workspace-empty {
  margin-inline: clamp(0.85rem, 0.75rem + 0.35vw, 1.25rem);
}

.discord-message-stream {
  padding-top: clamp(0.85rem, 0.8rem + 0.25vw, 1.1rem);
  padding-bottom: clamp(6rem, 5.7rem + 0.8vw, 6.8rem);
}

.discord-message,
.discord-date-separator,
.discord-unread-divider,
.discord-load-older-btn {
  width: min(100%, var(--chat-feed-max));
}

.discord-shell.is-wide-feed {
  --chat-feed-max: clamp(58rem, 72vw, 76rem);
}

.discord-message-body {
  max-width: min(100%, calc(var(--chat-feed-max) - 4.25rem));
}

.discord-chat-image-btn {
  max-width: min(100%, clamp(26rem, 62vw, 42rem));
}

.discord-message-content {
  font-size: clamp(0.86rem, 0.83rem + 0.08vw, 0.93rem);
}

.discord-message-input-wrap {
  padding: clamp(0.72rem, 0.68rem + 0.2vw, 0.92rem);
}

.discord-message-input-shell {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.discord-message-compose-main {
  min-width: 0;
}

.discord-message-textarea {
  min-height: clamp(3.4rem, 3.2rem + 0.45vw, 4rem);
  font-size: clamp(0.86rem, 0.83rem + 0.08vw, 0.94rem);
}

.discord-message-input-actions {
  display: flex;
  align-items: end;
  justify-content: flex-end;
}

.discord-composer-meta {
  flex-wrap: wrap;
  row-gap: 0.35rem;
}

.discord-composer-meta > :first-child {
  flex: 1 1 18rem;
  min-width: 0;
}

.discord-channel-list,
.discord-user-list {
  padding: var(--chat-panel-pad);
}

.discord-channel-header,
.discord-channel-banner,
.discord-sidebar-tools,
.discord-sidebar-voice-widget {
  margin-inline: 0;
}

.discord-channel-scroll,
.discord-user-scroll,
.discord-sidebar-voice-participants {
  scrollbar-gutter: stable;
}

.discord-channel-row,
.discord-voice-row-main,
.discord-user-row,
.discord-member-row {
  min-height: clamp(2.8rem, 2.7rem + 0.25vw, 3.15rem);
}

.discord-shell.is-compact .discord-channel-row,
.discord-shell.is-compact .discord-voice-row-main,
.discord-shell.is-compact .discord-user-row,
.discord-shell.is-compact .discord-member-row {
  min-height: clamp(2.45rem, 2.35rem + 0.18vw, 2.7rem);
}

.discord-shell.is-compact .discord-channel-list,
.discord-shell.is-compact .discord-user-list {
  --chat-panel-pad: clamp(0.72rem, 0.64rem + 0.22vw, 0.88rem);
}

.discord-user-list {
  align-self: stretch;
}

.discord-context-pane {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.discord-user-scroll {
  min-height: 0;
}

.discord-member-profile {
  align-self: end;
}

.discord-shell.is-sidebar-collapsed {
  grid-template-columns:
    var(--chat-rail-width)
    0
    minmax(0, 1fr)
    minmax(16.5rem, var(--chat-right-width));
}

.discord-shell.is-members-hidden {
  grid-template-columns:
    var(--chat-rail-width)
    minmax(15.5rem, var(--chat-left-width))
    minmax(0, 1fr)
    0;
}

.discord-shell.is-sidebar-collapsed.is-members-hidden {
  grid-template-columns: var(--chat-rail-width) 0 minmax(0, 1fr) 0;
}

@media (min-width: 1500px) {
  .discord-shell {
    --chat-shell-max: 126rem;
    --chat-left-width: clamp(17rem, 16vw, 20rem);
    --chat-right-width: clamp(18rem, 17vw, 21rem);
    --chat-feed-max: clamp(54rem, 60vw, 64rem);
  }

  .discord-shell.is-wide-feed {
    --chat-feed-max: clamp(62rem, 68vw, 78rem);
  }
}

@media (max-width: 1440px) {
  .discord-shell {
    --chat-left-width: clamp(15.25rem, 18vw, 17.2rem);
    --chat-right-width: clamp(16.2rem, 18vw, 18.25rem);
    --chat-feed-max: clamp(46rem, 60vw, 56rem);
    --chat-shell-max: 112rem;
  }

  .discord-shell.is-wide-feed {
    --chat-feed-max: clamp(52rem, 66vw, 62rem);
  }
}

@media (max-width: 1280px) {
  .discord-shell {
    --chat-left-width: clamp(14.2rem, 17vw, 15.8rem);
    --chat-right-width: clamp(15rem, 17vw, 16.75rem);
    --chat-feed-max: clamp(41rem, 58vw, 50rem);
    grid-template-columns:
      var(--chat-rail-width)
      minmax(14rem, var(--chat-left-width))
      minmax(0, 1fr)
      minmax(14.8rem, var(--chat-right-width));
  }

  .discord-main-toolbar {
    justify-content: space-between;
  }

  .discord-main-toolbar-meta {
    flex: 1 1 100%;
    max-width: 100%;
  }

  .discord-voice-overlay {
    padding-left: calc(var(--chat-rail-width) + min(15rem, var(--chat-left-width)) + 1.25rem);
  }
}

@media (max-width: 1180px) {
  .discord-shell {
    --chat-left-width: clamp(13.6rem, 22vw, 15rem);
    --chat-feed-max: clamp(38rem, 66vw, 48rem);
    grid-template-columns:
      var(--chat-rail-width)
      minmax(13.4rem, var(--chat-left-width))
      minmax(0, 1fr);
  }

  .discord-shell.is-members-hidden,
  .discord-shell.is-sidebar-collapsed,
  .discord-shell.is-sidebar-collapsed.is-members-hidden {
    grid-template-columns: var(--chat-rail-width) 0 minmax(0, 1fr);
  }

  .discord-user-list {
    display: none;
  }

  .discord-main-header {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "left actions"
      "center center";
  }

  .discord-main-header-zone-left {
    grid-area: left;
  }

  .discord-main-header-zone-center {
    grid-area: center;
    justify-content: flex-start;
  }

  .discord-header-actions {
    grid-area: actions;
  }

  .discord-voice-overlay {
    padding-left: clamp(0.75rem, 1.2vw, 1rem);
  }
}

@media (max-width: 980px) {
  .discord-shell {
    --chat-feed-max: min(100%, 46rem);
    grid-template-columns:
      var(--chat-rail-width)
      minmax(12.5rem, 15rem)
      minmax(0, 1fr);
  }

  .discord-main-toolbar-group .discord-control-btn {
    padding-inline: 0.6rem;
  }

  .discord-main-toolbar-meta span:last-child {
    display: none;
  }
}

@media (max-width: 820px) {
  .discord-shell {
    --chat-shell-max: 100vw;
    width: 100vw;
    padding-inline: 0.15rem;
    grid-template-columns: var(--chat-rail-width) minmax(11.8rem, 14rem) minmax(0, 1fr);
  }

  .discord-main-header,
  .discord-main-toolbar,
  .discord-message-stream,
  .discord-message-input-wrap,
  .discord-application-summary,
  .discord-workspace-empty {
    margin-inline: 0.7rem;
  }

  .discord-main-toolbar-group {
    width: 100%;
  }

  .discord-main-toolbar-group .discord-control-btn {
    flex: 1 1 calc(50% - 0.35rem);
  }

  .discord-main-toolbar-meta {
    padding-top: 0;
  }
}

@media (max-width: 640px) {
  .discord-shell {
    grid-template-columns: var(--chat-rail-width) minmax(10.5rem, 38vw) minmax(0, 1fr);
  }

  .discord-main-toolbar-group .discord-control-btn {
    flex: 1 1 100%;
  }

  .discord-message-input-shell {
    grid-template-columns: 1fr;
  }

  .discord-message-input-actions {
    justify-content: stretch;
  }

  .discord-send-btn {
    width: 100%;
  }
}

/* Stage 5 corrective desktop scale pass */
.discord-shell {
  --chat-shell-max: 118.5rem;
  --chat-left-width: clamp(18rem, 18.5vw, 21rem);
  --chat-right-width: clamp(18.5rem, 18.75vw, 21.5rem);
  --chat-feed-max: clamp(58rem, 68vw, 72rem);
  --chat-panel-pad: clamp(1rem, 0.92rem + 0.25vw, 1.28rem);
  --chat-meta-size: clamp(0.79rem, 0.76rem + 0.08vw, 0.89rem);
  padding-inline: clamp(0.45rem, 0.7vw, 1rem);
  grid-template-columns:
    var(--chat-rail-width)
    minmax(17.75rem, var(--chat-left-width))
    minmax(0, 1fr)
    minmax(18rem, var(--chat-right-width));
}

.discord-shell.is-wide-feed {
  --chat-feed-max: clamp(64rem, 76vw, 80rem);
}

.discord-shell.is-sidebar-collapsed {
  grid-template-columns:
    var(--chat-rail-width)
    0
    minmax(0, 1fr)
    minmax(18rem, var(--chat-right-width));
}

.discord-shell.is-members-hidden {
  grid-template-columns:
    var(--chat-rail-width)
    minmax(17.75rem, var(--chat-left-width))
    minmax(0, 1fr)
    0;
}

.discord-main-header,
.discord-main-toolbar,
.discord-message-input-wrap,
.discord-channel-list,
.discord-user-list {
  font-size: clamp(0.91rem, 0.88rem + 0.08vw, 1rem);
}

.discord-main-title {
  font-size: clamp(1.18rem, 1.08rem + 0.34vw, 1.42rem);
}

.discord-channel-header-title,
.discord-sidebar-search-label,
.discord-room-hero-kicker,
.discord-sidebar-voice-stat-label,
.discord-member-section-head {
  font-size: clamp(0.72rem, 0.69rem + 0.05vw, 0.8rem);
}

.discord-main-subtitle,
.discord-channel-banner-copy,
.discord-sidebar-helper,
.discord-main-toolbar-meta,
.discord-channel-context-meta,
.discord-user-rank,
.discord-channel-row-meta,
.discord-message-time,
.discord-composer-meta,
.discord-composer-shortcuts,
.discord-voice-dock-meta,
.discord-sidebar-voice-widget-meta,
.discord-header-status-copy {
  font-size: var(--chat-meta-size);
}

.discord-main-header {
  grid-template-columns: minmax(0, 1.55fr) minmax(14rem, 1fr) auto;
  align-items: center;
  min-height: clamp(5rem, 4.8rem + 0.5vw, 5.45rem);
  gap: clamp(0.9rem, 0.82rem + 0.18vw, 1.2rem);
  padding: clamp(1rem, 0.95rem + 0.2vw, 1.18rem) clamp(1.1rem, 1rem + 0.35vw, 1.55rem);
}

.discord-mode-header-rich {
  align-items: center;
  gap: 0.95rem;
}

.discord-header-copy {
  display: grid;
  gap: 0.26rem;
}

.discord-header-actions {
  align-items: center;
  gap: 0.55rem;
}

.discord-theme-lock {
  font-size: clamp(0.76rem, 0.73rem + 0.05vw, 0.84rem);
}

.discord-main-toolbar {
  align-items: center;
  gap: 0.85rem 1rem;
  padding-block: 0.2rem 0.1rem;
}

.discord-main-toolbar-group {
  gap: 0.55rem;
}

.discord-main-toolbar-group-primary {
  flex: 0 1 auto;
}

.discord-main-toolbar-group-secondary {
  margin-left: auto;
}

.discord-toolbar-view-group {
  position: relative;
  display: flex;
  align-items: center;
}

.discord-toolbar-view-menu {
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 13.5rem;
  padding: 0.38rem;
  display: grid;
  gap: 0.18rem;
}

.discord-toolbar-view-menu .discord-channel-settings-action {
  width: 100%;
  min-height: 2.45rem;
  justify-content: flex-start;
  text-align: left;
  font-size: 0.9rem;
}

.discord-main-toolbar-group .discord-control-btn,
.discord-header-actions .discord-control-btn {
  min-height: 2.45rem;
  padding-inline: 0.78rem;
  font-size: clamp(0.87rem, 0.84rem + 0.05vw, 0.94rem);
}

.discord-main-toolbar-meta {
  flex: 1 1 26rem;
  max-width: min(42rem, 100%);
  padding-top: 0;
}

.discord-main-toolbar-meta span:first-child {
  font-size: clamp(0.9rem, 0.88rem + 0.05vw, 0.97rem);
}

.discord-main-toolbar-meta span:last-child {
  opacity: 0.9;
}

.discord-main-toolbar,
.discord-message-stream,
.discord-message-input-wrap,
.discord-application-summary,
.discord-workspace-empty {
  margin-inline: clamp(1rem, 0.92rem + 0.25vw, 1.45rem);
}

.discord-message-stream {
  padding-top: clamp(1rem, 0.95rem + 0.16vw, 1.2rem);
  padding-bottom: clamp(6.75rem, 6.4rem + 0.7vw, 7.35rem);
}

.discord-message,
.discord-date-separator,
.discord-unread-divider,
.discord-load-older-btn {
  width: min(100%, var(--chat-feed-max));
}

.discord-message {
  padding-inline: clamp(0.28rem, 0.22rem + 0.15vw, 0.46rem);
}

.discord-message-body {
  max-width: min(100%, calc(var(--chat-feed-max) - 3.9rem));
}

.discord-message-author {
  font-size: clamp(0.92rem, 0.89rem + 0.05vw, 0.99rem);
}

.discord-message-content {
  font-size: clamp(0.94rem, 0.91rem + 0.06vw, 1rem);
  line-height: 1.58;
}

.discord-chat-image-btn {
  max-width: min(100%, clamp(32rem, 70vw, 48rem));
}

.discord-feed-empty {
  width: min(100%, clamp(34rem, 56vw, 45rem));
  margin: clamp(3rem, 14vh, 5.2rem) auto 0;
  padding: clamp(1.3rem, 1.22rem + 0.18vw, 1.55rem);
  border: 1px solid rgba(151, 175, 186, 0.18);
  border-radius: 1.1rem;
  background:
    linear-gradient(180deg, rgba(21, 31, 48, 0.94), rgba(12, 18, 29, 0.96)),
    rgba(13, 19, 31, 0.94);
  box-shadow: 0 16px 42px rgba(2, 6, 12, 0.28);
  display: grid;
  gap: 0.55rem;
}

.discord-feed-empty-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.95rem;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  font-weight: 700;
  color: rgba(223, 240, 231, 0.94);
  background: linear-gradient(135deg, rgba(88, 140, 114, 0.26), rgba(37, 58, 48, 0.92));
  border: 1px solid rgba(109, 155, 132, 0.28);
}

.discord-feed-empty-title {
  font-size: clamp(1.02rem, 0.99rem + 0.08vw, 1.12rem);
  font-weight: 700;
  color: rgba(243, 247, 250, 0.96);
}

.discord-feed-empty-copy {
  max-width: 34rem;
  font-size: clamp(0.84rem, 0.82rem + 0.05vw, 0.92rem);
  line-height: 1.6;
  color: rgba(178, 189, 201, 0.88);
}

.discord-message-input-wrap {
  padding: clamp(0.95rem, 0.89rem + 0.18vw, 1.15rem);
  border-radius: 1.1rem;
}

.discord-message-input-shell {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 0.95rem;
}

.discord-message-compose-field {
  min-height: 4.25rem;
}

.discord-message-textarea {
  min-height: clamp(4rem, 3.85rem + 0.35vw, 4.45rem);
  font-size: clamp(0.94rem, 0.91rem + 0.06vw, 1rem);
  line-height: 1.55;
}

.discord-message-inline-tools {
  gap: 0.42rem;
}

.discord-message-inline-btn,
.discord-send-btn {
  min-height: 2.7rem;
  min-width: 2.7rem;
}

.discord-message-inline-btn {
  width: 2.7rem;
  height: 2.7rem;
}

.discord-send-btn {
  padding-inline: 1rem 1.05rem;
  font-size: clamp(0.9rem, 0.87rem + 0.05vw, 0.97rem);
}

.discord-composer-shortcuts {
  gap: 0.45rem 0.7rem;
}

.discord-composer-meta {
  margin-top: 0.72rem;
  gap: 0.45rem 0.9rem;
}

.discord-channel-list,
.discord-user-list {
  padding: var(--chat-panel-pad);
}

.discord-channel-header,
.discord-channel-banner,
.discord-sidebar-tools,
.discord-sidebar-voice-widget,
.discord-channel-context,
.discord-member-profile {
  border-radius: 1rem;
}

.discord-channel-header,
.discord-channel-banner,
.discord-sidebar-tools,
.discord-sidebar-voice-widget {
  margin-bottom: 0.95rem;
}

.discord-sidebar-tools {
  gap: 0.78rem;
}

.discord-sidebar-quick-actions {
  gap: 0.6rem;
}

.discord-channel-scroll,
.discord-user-scroll,
.discord-sidebar-voice-participants {
  padding-right: 0.35rem;
}

.discord-voice-regiment-title,
.discord-category-title {
  gap: 0.42rem;
  min-height: 2.3rem;
}

.discord-channel-row,
.discord-voice-row-main,
.discord-user-row,
.discord-member-row {
  min-height: clamp(3.05rem, 2.96rem + 0.18vw, 3.35rem);
}

.discord-shell.is-compact .discord-channel-row,
.discord-shell.is-compact .discord-voice-row-main,
.discord-shell.is-compact .discord-user-row,
.discord-shell.is-compact .discord-member-row {
  min-height: clamp(2.72rem, 2.64rem + 0.12vw, 2.95rem);
}

.discord-channel-label,
.discord-user-name,
.discord-sidebar-voice-widget-title,
.discord-sidebar-voice-stat-value {
  font-size: clamp(0.92rem, 0.89rem + 0.05vw, 1rem);
}

.discord-user-rank,
.discord-channel-row-meta,
.discord-sidebar-voice-widget-meta,
.discord-sidebar-voice-stat-label {
  font-size: clamp(0.79rem, 0.76rem + 0.05vw, 0.86rem);
}

.discord-plus-btn,
.discord-category-toggle {
  min-width: 2rem;
  min-height: 2rem;
}

.discord-sidebar-voice-widget {
  margin-top: 1rem;
  padding: 1rem;
}

.discord-sidebar-voice-widget-head {
  min-height: 3rem;
}

.discord-sidebar-voice-control-grid {
  gap: 0.55rem;
}

.discord-sidebar-voice-control-grid .discord-control-btn,
.discord-sidebar-voice-secondary-actions .discord-control-btn {
  min-height: 2.5rem;
  font-size: 0.88rem;
}

.discord-user-list {
  gap: 0.95rem;
}

.discord-user-pane-head,
.discord-channel-context,
.discord-member-profile {
  padding: 1rem;
}

.discord-member-section-head {
  min-height: 2.3rem;
}

.discord-user-row,
.discord-member-row {
  padding-inline: 0.2rem;
}

.discord-channel-context-title,
.discord-user-pane-title {
  font-size: clamp(1rem, 0.97rem + 0.05vw, 1.06rem);
}

@media (min-width: 1500px) {
  .discord-shell {
    --chat-shell-max: 121rem;
    --chat-left-width: clamp(18.5rem, 17vw, 21rem);
    --chat-right-width: clamp(19rem, 17.5vw, 22rem);
    --chat-feed-max: clamp(60rem, 64vw, 74rem);
  }

  .discord-shell.is-wide-feed {
    --chat-feed-max: clamp(68rem, 74vw, 82rem);
  }
}

@media (max-width: 1480px) {
  .discord-shell {
    --chat-shell-max: 114rem;
    --chat-left-width: clamp(17rem, 18vw, 19rem);
    --chat-right-width: clamp(17.4rem, 18vw, 19.5rem);
    --chat-feed-max: clamp(52rem, 64vw, 62rem);
  }

  .discord-shell.is-wide-feed {
    --chat-feed-max: clamp(58rem, 72vw, 70rem);
  }
}

@media (max-width: 1280px) {
  .discord-shell {
    --chat-shell-max: 108rem;
    --chat-left-width: clamp(16.1rem, 19vw, 17.6rem);
    --chat-right-width: clamp(16.25rem, 19vw, 17.9rem);
    --chat-feed-max: clamp(47rem, 63vw, 56rem);
    grid-template-columns:
      var(--chat-rail-width)
      minmax(15.85rem, var(--chat-left-width))
      minmax(0, 1fr)
      minmax(15.95rem, var(--chat-right-width));
  }

  .discord-main-header {
    grid-template-columns: minmax(0, 1.35fr) minmax(12rem, 0.95fr) auto;
  }

  .discord-main-toolbar-meta {
    flex-basis: 100%;
    max-width: 100%;
  }
}

@media (max-width: 1180px) {
  .discord-shell {
    --chat-left-width: clamp(15.4rem, 22vw, 16.8rem);
    --chat-right-width: clamp(15.5rem, 22vw, 17.15rem);
    --chat-feed-max: clamp(44rem, 66vw, 52rem);
    grid-template-columns:
      var(--chat-rail-width)
      minmax(15rem, var(--chat-left-width))
      minmax(0, 1fr)
      minmax(15.25rem, var(--chat-right-width));
  }

  .discord-user-list {
    display: flex;
  }

  .discord-main-header {
    grid-template-columns: minmax(0, 1.12fr) minmax(10.5rem, 0.9fr) auto;
    grid-template-areas: none;
  }

  .discord-main-header-zone-left,
  .discord-main-header-zone-center,
  .discord-header-actions {
    grid-area: auto;
  }
}

@media (max-width: 1080px) {
  .discord-shell {
    --chat-feed-max: clamp(42rem, 72vw, 50rem);
    grid-template-columns:
      var(--chat-rail-width)
      minmax(14.6rem, 16.2rem)
      minmax(0, 1fr);
  }

  .discord-shell.is-members-hidden,
  .discord-shell.is-sidebar-collapsed,
  .discord-shell.is-sidebar-collapsed.is-members-hidden {
    grid-template-columns: var(--chat-rail-width) 0 minmax(0, 1fr);
  }

  .discord-user-list {
    display: none;
  }

  .discord-main-header {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "left actions"
      "center center";
  }

  .discord-main-header-zone-left {
    grid-area: left;
  }

  .discord-main-header-zone-center {
    grid-area: center;
    justify-content: flex-start;
  }

  .discord-header-actions {
    grid-area: actions;
  }
}

@media (max-width: 980px) {
  .discord-shell {
    --chat-feed-max: min(100%, 48rem);
    grid-template-columns:
      var(--chat-rail-width)
      minmax(13.4rem, 15rem)
      minmax(0, 1fr);
  }

  .discord-main-toolbar-group .discord-control-btn {
    min-height: 2.4rem;
    padding-inline: 0.72rem;
  }

  .discord-main-toolbar-meta span:last-child {
    display: none;
  }
}

@media (max-width: 820px) {
  .discord-shell {
    --chat-shell-max: 100vw;
    width: 100vw;
    padding-inline: 0.18rem;
    grid-template-columns: var(--chat-rail-width) minmax(12rem, 14.2rem) minmax(0, 1fr);
  }

  .discord-main-header,
  .discord-main-toolbar,
  .discord-message-stream,
  .discord-message-input-wrap,
  .discord-application-summary,
  .discord-workspace-empty {
    margin-inline: 0.8rem;
  }
}

/* Desktop voice density reduction */
.discord-context-pane-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
  margin-top: 0.55rem;
}

.discord-sidebar-voice-panel {
  gap: 0.65rem;
  padding: 0.78rem;
}

.discord-sidebar-voice-status-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}

.discord-sidebar-voice-stat {
  align-items: flex-start;
  gap: 0.18rem;
  padding: 0.45rem 0.55rem;
}

.discord-sidebar-voice-control-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.42rem;
}

.discord-sidebar-voice-secondary-actions {
  gap: 0.42rem;
}

.discord-sidebar-voice-control-grid .discord-control-btn,
.discord-sidebar-voice-secondary-actions .discord-control-btn {
  min-height: 2.05rem;
  padding-inline: 0.45rem;
  font-size: 0.8rem;
}

.discord-sidebar-voice-participants {
  max-height: 8rem;
}

#voiceContextPane > .discord-user-header {
  padding: 0.8rem 0.85rem 0.65rem;
}

#voiceContextPane.is-collapsed > .discord-user-header {
  padding-bottom: 0.8rem;
}

#voiceContextPane.is-collapsed #voiceUsersPane {
  display: none;
}

#voiceContextPane.is-compact .voice-volume-slider,
#voiceContextPane.is-compact .voice-local-mute-btn,
#voiceContextPane.is-compact .voice-mod-btn {
  display: none;
}

.voice-ui-compact .discord-sidebar-voice-status-grid,
.voice-ui-compact .discord-sidebar-voice-secondary-actions {
  display: none;
}

.voice-ui-compact .discord-sidebar-voice-panel {
  gap: 0.45rem;
}

.voice-ui-compact .discord-sidebar-voice-participants {
  max-height: 5.5rem;
}

.voice-ui-collapsed #voiceUserPanelMuteBtn,
.voice-ui-collapsed #voiceUserPanelDeafenBtn,
.voice-ui-collapsed #voiceUserPanelShareBtn,
.voice-ui-collapsed #voiceUserPanelLeaveBtn {
  display: none;
}

#voiceUsersPane {
  min-height: 0;
}

@media (max-width: 1200px) {
  .discord-sidebar-voice-status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Shared overlay surface pass */
#quickSwitcher,
#globalModerationModal,
.discord-voice-overlay,
.discord-image-lightbox,
.discord-media-prompt {
  backdrop-filter: blur(10px) saturate(130%);
  background:
    radial-gradient(circle at top, rgba(84, 182, 255, 0.08), transparent 38%),
    linear-gradient(180deg, rgba(3, 6, 12, 0.76), rgba(2, 4, 9, 0.74));
}

#quickSwitcher > div,
#globalModerationModal > div,
#notificationDropdown,
.discord-voice-overlay-panel,
.discord-floating-menu,
#chatImageLightbox .discord-lightbox-stage,
#voiceLiveModal .discord-lightbox-stage {
  border: 1px solid rgba(138, 170, 222, 0.16);
  background: linear-gradient(180deg, rgba(14, 19, 32, 0.94), rgba(8, 12, 21, 0.94));
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(255, 255, 255, 0.025);
}

#notificationDropdown,
.discord-floating-menu {
  backdrop-filter: blur(16px) saturate(130%);
}

.discord-voice-overlay-panel {
  border-radius: 28px;
}

#notificationDropdown .notification-item:hover,
#notificationDropdown .notification-item:focus-visible,
.discord-floating-menu .command-select-option:hover,
.discord-floating-menu .command-select-option:focus-visible {
  border-color: rgba(87, 188, 255, 0.24);
  background: rgba(255, 255, 255, 0.07);
}

/* Imperial System UI foundation pass 1: shared polish without changing workflows. */
:root {
  --panel-content-max: 136rem;
  --panel-readable-max: 76rem;
  --panel-mobile-pad: clamp(0.85rem, 3vw, 1.25rem);
}

.panel-skip-link {
  position: fixed;
  top: 0.75rem;
  left: 50%;
  z-index: 999;
  transform: translate(-50%, -180%);
  border: 1px solid hsl(var(--ring) / 0.58);
  border-radius: 999px;
  background: hsl(var(--card) / 0.96);
  color: hsl(var(--foreground));
  padding: 0.62rem 0.95rem;
  font-size: 0.82rem;
  font-weight: 800;
  box-shadow: 0 18px 42px -28px hsl(var(--shadow) / 0.94);
  transition: transform 160ms ease;
}

.panel-skip-link:focus,
.panel-skip-link:focus-visible {
  transform: translate(-50%, 0);
  outline: 2px solid hsl(var(--ring));
  outline-offset: 3px;
}

.panel-main {
  min-width: 0;
  scroll-padding-top: 1rem;
}

.panel-main:focus {
  outline: none;
}

.panel-main-inner {
  max-width: var(--panel-content-max);
}

.panel-topbar-grid,
.panel-topbar-primary,
.panel-topbar-actions {
  min-width: 0;
}

.panel-topbar-primary h1 {
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.panel-topbar-primary p {
  line-height: 1.35;
}

.panel-topbar-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.panel-topbar-actions > * {
  flex: 0 0 auto;
}

.panel-topbar-actions #globalPlayerResults,
#quickResults,
.command-select-menu {
  scrollbar-gutter: stable;
}

.panel-sidebar nav {
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
}

.panel-nav-item,
.panel-regiment-link,
.panel-regiment-summary,
.panel-quick-item {
  min-width: 0;
}

.panel-nav-item > span:first-of-type,
.panel-regiment-link,
.panel-regiment-summary {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.panel-hero,
.panel-section-shell,
.panel-surface,
.command-surface,
.liquid-panel,
.panel-stat,
.command-row,
.empty-state {
  min-width: 0;
}

:where(.panel-hero, .panel-section-shell, .panel-surface, .command-surface, .liquid-panel, .panel-stat, .command-row, .empty-state)
  :where(h1, h2, h3, h4, p, li, td, th, .command-row-title, .command-row-meta, .panel-stat-value) {
  overflow-wrap: anywhere;
}

:where(.panel-section-shell, .panel-surface, .command-surface, .liquid-panel)
  :where(input, select, textarea, button) {
  max-width: 100%;
}

textarea {
  resize: vertical;
}

.table-shell,
.liquid-table-shell {
  scrollbar-gutter: stable both-edges;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}

.table-shell th,
.liquid-table-shell th {
  white-space: nowrap;
}

.table-shell td,
.liquid-table-shell td {
  max-width: min(42rem, 78vw);
}

.command-row-header,
.command-surface-header,
.liquid-surface-header {
  min-width: 0;
}

.command-row-title {
  min-width: 0;
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid hsl(var(--ring) / 0.9);
  outline-offset: 2px;
}

#quickSwitcher > div,
#globalModerationModal > div {
  max-height: calc(100vh - 4rem);
  overflow: auto;
}

@media (min-width: 1280px) {
  .panel-main {
    padding-inline: clamp(2rem, 3vw, 3.35rem);
  }
}

@media (max-width: 960px) {
  .panel-topbar-grid {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .panel-topbar-primary {
    width: 100%;
  }

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

@media (max-width: 640px) {
  .panel-main {
    padding: var(--panel-mobile-pad) !important;
  }

  .panel-topbar-grid {
    padding-inline: var(--panel-mobile-pad) !important;
  }

  .panel-topbar-primary {
    align-items: flex-start;
  }

  .panel-topbar-actions {
    gap: 0.45rem;
  }

  .panel-hero,
  .panel-section-shell,
  .command-surface,
  .liquid-panel {
    border-radius: calc(var(--radius-sm) + 2px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}

/* Imperial System UI revamp phase 2: reusable command components. */
.command-page {
  --command-page-gap: clamp(1rem, 0.8rem + 0.6vw, 1.65rem);
  display: grid;
  gap: var(--command-page-gap);
}

.command-page-hero {
  display: grid;
  gap: 1rem;
}

.command-page-hero :where(h1, .applications-title, .ahc-hero-title) {
  letter-spacing: 0;
  line-height: 1.02;
}

.command-section {
  min-width: 0;
}

.command-section-toolbar,
.command-action-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.command-action-bar {
  position: sticky;
  top: 0.75rem;
  z-index: 18;
  border: 1px solid hsl(var(--border) / 0.76);
  border-radius: var(--radius-sm);
  background:
    linear-gradient(180deg, hsl(var(--card) / 0.94), hsl(var(--background) / 0.86)),
    radial-gradient(circle at top right, hsl(var(--accent) / 0.13), transparent 36%);
  box-shadow:
    0 18px 38px -32px hsl(var(--shadow) / 0.92),
    inset 0 1px 0 hsl(var(--foreground) / 0.08);
  padding: 0.75rem;
  backdrop-filter: blur(calc(var(--blur) * 0.65)) saturate(125%);
}

.command-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13.5rem), 1fr));
  gap: 0.75rem;
  align-items: end;
}

.command-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  gap: 0.9rem;
}

.command-stat-card {
  min-height: 7.5rem;
}

.command-review-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(19rem, 0.36fr);
  gap: 1rem;
  align-items: start;
}

.command-empty-state {
  min-height: 4.5rem;
  display: grid;
  align-content: center;
}

.command-status-chip,
.command-risk-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  width: fit-content;
  max-width: 100%;
  border: 1px solid hsl(var(--border) / 0.72);
  border-radius: 999px;
  background: hsl(var(--background) / 0.42);
  color: hsl(var(--foreground));
  padding: 0.34rem 0.62rem;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.command-status-chip::before,
.command-risk-chip::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  flex: 0 0 auto;
  border-radius: 999px;
  background: hsl(var(--accent));
  box-shadow: 0 0 14px hsl(var(--accent) / 0.35);
}

.command-status-chip[data-tone="success"],
.command-risk-chip[data-risk="low"] {
  border-color: rgb(74 222 128 / 0.34);
  background: rgb(22 101 52 / 0.16);
  color: rgb(187 247 208);
}

.command-status-chip[data-tone="warning"],
.command-risk-chip[data-risk="medium"] {
  border-color: rgb(250 204 21 / 0.38);
  background: rgb(113 63 18 / 0.18);
  color: rgb(254 240 138);
}

.command-status-chip[data-tone="danger"],
.command-risk-chip[data-risk="high"] {
  border-color: rgb(248 113 113 / 0.42);
  background: rgb(127 29 29 / 0.2);
  color: rgb(254 202 202);
}

.command-status-chip[data-tone="info"] {
  border-color: rgb(56 189 248 / 0.38);
  background: rgb(12 74 110 / 0.18);
  color: rgb(186 230 253);
}

.command-panel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 21rem), 1fr));
  gap: 1rem;
}

.command-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 0.85rem;
}

.command-field-stack {
  display: grid;
  gap: 0.45rem;
}

.command-field-stack > label,
.command-field-stack > .field-label {
  color: hsl(var(--muted2));
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.panel-ui-enhanced details[data-panel-persist] {
  scroll-margin-top: 1rem;
}

.panel-ui-enhanced details[data-panel-persist] > summary {
  cursor: pointer;
}

.table-shell.has-scroll-left,
.liquid-table-shell.has-scroll-left {
  box-shadow:
    inset 18px 0 18px -24px hsl(var(--foreground) / 0.22),
    var(--panel-shadow);
}

.table-shell.has-scroll-right,
.liquid-table-shell.has-scroll-right {
  box-shadow:
    inset -18px 0 18px -24px hsl(var(--foreground) / 0.22),
    var(--panel-shadow);
}

.table-shell.has-scroll-left.has-scroll-right,
.liquid-table-shell.has-scroll-left.has-scroll-right {
  box-shadow:
    inset 18px 0 18px -24px hsl(var(--foreground) / 0.22),
    inset -18px 0 18px -24px hsl(var(--foreground) / 0.22),
    var(--panel-shadow);
}

.command-btn-ghost,
.liquid-button-ghost {
  background: transparent !important;
  box-shadow: none !important;
}

.command-btn-ghost:hover,
.liquid-button-ghost:hover {
  background: hsl(var(--foreground) / 0.06) !important;
  border-color: hsl(var(--border) / 0.72) !important;
}

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

@media (max-width: 700px) {
  .command-action-bar {
    position: static;
  }
}

/* Priority page polish hooks */
.applications-workspace,
.iatc,
.ahc-hub-shell,
.regiment-roster-page {
  container-type: inline-size;
}

.applications-command-bar {
  position: sticky;
  top: 0.75rem;
  z-index: 16;
}

.applications-shell-card,
.applications-review-card,
.applications-template-card,
.applications-case-card {
  scroll-margin-top: 1rem;
}

.applications-review-card summary,
.applications-template-card summary {
  min-width: 0;
}

.applications-question-card,
.applications-answer-item,
.nco-training-card,
.personnel-action-card {
  min-width: 0;
  overflow-wrap: anywhere;
}

.iatc-shell {
  isolation: isolate;
}

.iatc-main,
.iatc-panel,
.iatc-row {
  min-width: 0;
}

.iatc-panel-body,
.iatc-row span,
.iatc-row small {
  overflow-wrap: anywhere;
}

.iatc-actions {
  min-width: 0;
}

.ahc-hub-shell .ahc-period-form,
.regiment-leaderboard-period-form {
  align-items: center;
}

.ahc-hub-shell .ahc-table {
  min-width: 58rem;
}

.regiment-roster-page .roster-row,
.regiment-roster-page .regiment-leaderboard-row {
  min-width: 0;
}

/* Imperial System UI revamp phase 3: visible fast command skin.
   Default this skin on because the old glass/blur stack was expensive on
   long admin pages and made dense workflows feel sluggish. */
.panel-performance-skin {
  --panel-fast-card: hsl(var(--card) / 0.96);
  --panel-fast-card-soft: hsl(var(--card) / 0.9);
  --panel-fast-line: hsl(var(--border) / 0.82);
  --panel-fast-shadow: 0 14px 30px -28px hsl(var(--shadow, 220 50% 3%) / 0.72);
  background:
    linear-gradient(180deg, hsl(var(--background)), hsl(var(--background) / 0.96)),
    radial-gradient(circle at 100% 0%, hsl(var(--accent) / 0.1), transparent 32%);
}

.panel-performance-skin .panel-ribbon-layer,
.panel-performance-skin .panel-grain-layer,
.panel-performance-skin::before,
.panel-performance-skin::after {
  display: none !important;
}

.panel-performance-skin *,
.panel-performance-skin *::before,
.panel-performance-skin *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 100ms !important;
}

.panel-performance-skin :where(.panel-sidebar, .panel-surface, .command-surface, .command-action-bar, .command-select-menu, .command-modal, .liquid-panel, .liquid-card, .applications-shell-card, .applications-template-card, .applications-review-card, .applications-case-card, .applications-review-bucket, .applications-review-sidecar, .applications-intake-rail, .command-center-card, .stats-surface, .discord-shell-card) {
  background:
    linear-gradient(180deg, var(--panel-fast-card), hsl(var(--background) / 0.88)) !important;
  border-color: var(--panel-fast-line) !important;
  box-shadow: var(--panel-fast-shadow) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.panel-performance-skin :where(.panel-sidebar, .panel-surface, .command-surface, .command-action-bar, .command-select-menu, .command-modal, .liquid-panel, .liquid-card, .applications-shell-card, .applications-template-card, .applications-review-card, .applications-case-card, .applications-review-bucket, .command-center-card, .stats-surface)::before,
.panel-performance-skin :where(.panel-sidebar, .panel-surface, .command-surface, .command-action-bar, .command-select-menu, .command-modal, .liquid-panel, .liquid-card, .applications-shell-card, .applications-template-card, .applications-review-card, .applications-case-card, .applications-review-bucket, .command-center-card, .stats-surface)::after {
  display: none !important;
}

.panel-performance-skin .panel-topbar {
  border-radius: 0.85rem !important;
  border-left: 4px solid hsl(var(--accent) / 0.78) !important;
  background:
    linear-gradient(90deg, hsl(var(--accent) / 0.12), transparent 34%),
    hsl(var(--card) / 0.98) !important;
}

.panel-performance-skin .panel-main {
  padding-top: clamp(0.9rem, 1vw, 1.25rem) !important;
}

.panel-performance-skin .panel-main-inner {
  max-width: min(100%, 104rem) !important;
}

.panel-fast-mode-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border: 1px solid hsl(var(--accent) / 0.5);
  border-radius: 999px;
  background: hsl(var(--accent) / 0.12);
  color: hsl(var(--foreground));
  padding: 0.18rem 0.5rem;
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-transform: uppercase;
}

.panel-performance-skin .panel-nav-item {
  min-height: 2.45rem;
  border-color: hsl(var(--border) / 0.34);
  background: hsl(var(--background) / 0.32);
}

.panel-performance-skin .panel-nav-item:hover,
.panel-performance-skin .panel-nav-item.is-active {
  transform: none !important;
  border-color: hsl(var(--accent) / 0.72) !important;
  background:
    linear-gradient(90deg, hsl(var(--accent) / 0.18), transparent 78%),
    hsl(var(--background) / 0.54) !important;
  box-shadow: inset 3px 0 0 hsl(var(--accent) / 0.78) !important;
}

.panel-performance-skin :where(.command-btn, .liquid-button, .applications-primary-action, .applications-secondary-action, .applications-filter-button, .applications-command-link, .applications-mini-action) {
  box-shadow: none !important;
}

.panel-performance-skin :where(.command-btn:hover, .liquid-button:hover, .applications-primary-action:hover, .applications-secondary-action:hover, .applications-filter-button:hover, .applications-command-link:hover, .applications-mini-action:hover) {
  transform: none !important;
}

.panel-performance-skin .command-page {
  gap: clamp(0.85rem, 0.7rem + 0.45vw, 1.35rem);
}

.panel-performance-skin .command-page > :where(section, article, form, div):not(.applications-radar-ring):not(.applications-progress-dial) {
  min-width: 0;
}

.panel-performance-skin :where(.applications-hero, .applications-command-bar, .applications-ops-grid, .applications-intake-layout, .applications-review-workspace) {
  gap: 0.9rem !important;
}

.panel-performance-skin .applications-title {
  font-size: clamp(2rem, 2.4vw, 2.85rem) !important;
  line-height: 1.04 !important;
}

.panel-performance-skin .applications-radar-ring,
.panel-performance-skin .applications-progress-dial {
  background:
    radial-gradient(circle, hsl(var(--card) / 0.98) 0 58%, transparent 59%),
    conic-gradient(hsl(var(--accent)) var(--progress, calc(var(--capacity, 0) * 1%)), hsl(var(--foreground) / 0.1) 0),
    hsl(var(--background) / 0.82) !important;
  box-shadow: inset 0 0 0 1px hsl(var(--border) / 0.78) !important;
}

.panel-performance-skin .applications-review-sidecar,
.panel-performance-skin .applications-intake-rail {
  position: static !important;
}

.panel-performance-skin :where(.applications-expanded-body, .applications-review-card, .applications-template-card) {
  overflow: visible !important;
}

.panel-performance-skin .table-shell,
.panel-performance-skin .liquid-table-shell {
  box-shadow: none !important;
}

.panel-performance-skin :where(.table-shell, .liquid-table-shell, .applications-expanded-body, .command-select-menu, .rcp-member-remove-results) {
  scrollbar-color: hsl(var(--accent) / 0.64) hsl(var(--background) / 0.72);
}

@media (max-width: 860px) {
  .panel-performance-skin .panel-topbar-grid,
  .panel-performance-skin .panel-topbar-primary,
  .panel-performance-skin .panel-topbar-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .panel-performance-skin .panel-topbar-actions > * {
    width: 100%;
  }

  .panel-performance-skin .panel-topbar-actions :where(a, button) {
    justify-content: center;
  }
}

/* =========================================================
   Imperial Command Center production skin
   Presentation-only layer. Routes, forms, data, and permissions
   remain owned by the existing EJS/backend workflow.
========================================================= */

.imperial-command-skin {
  --panel-shadow: 0 22px 46px -30px rgb(0 0 0 / 0.95), 0 0 0 1px hsl(var(--accent) / 0.1);
  --blur: 0px;
  --command-gold: hsl(var(--accent));
  --command-gold-bright: color-mix(in oklab, hsl(var(--accent)) 72%, hsl(var(--foreground)) 28%);
  --command-gold-soft: hsl(var(--accent) / 0.14);
  --command-panel: color-mix(in oklab, hsl(var(--card)) 88%, hsl(var(--background)) 12%);
  --command-panel-soft: color-mix(in oklab, hsl(var(--card)) 62%, hsl(var(--background)) 38%);
  --command-line: hsl(var(--accent) / 0.26);
  --command-line-strong: hsl(var(--accent) / 0.56);
  --command-text-main: hsl(var(--foreground));
  --command-text-soft: hsl(var(--muted-foreground));
  --command-green: #43d17a;
  --command-blue: #5fa8ff;
  --command-red: hsl(var(--destructive));
  background:
    radial-gradient(circle at 18% 24%, hsl(var(--theme-camo-a) / 0.28) 0, transparent 36%),
    radial-gradient(circle at 76% 68%, hsl(var(--theme-camo-b) / 0.28) 0, transparent 39%),
    radial-gradient(circle at 10% 5%, color-mix(in oklab, var(--cyan-5), transparent 80%) 0, transparent 38%),
    radial-gradient(circle at 90% 95%, color-mix(in oklab, var(--red-5), transparent 83%) 0, transparent 34%),
    linear-gradient(var(--theme-gradient-angle, 165deg), hsl(var(--theme-gradient-start, var(--background))), hsl(var(--theme-gradient-end, var(--background)))) !important;
  background-size: auto !important;
  color: var(--command-text-main);
}

.imperial-command-skin :where(.text-cyan-100, .text-cyan-50) {
  color: var(--command-text-main) !important;
}

.imperial-command-skin :where(.text-cyan-200, .text-cyan-300, .text-amber-100, .text-amber-200) {
  color: var(--command-gold-bright) !important;
}

.imperial-command-skin :where(.panel-muted-copy, .applications-detail-muted, .applications-subtitle, .applications-section-copy) {
  color: var(--command-text-soft) !important;
}

.imperial-command-skin .panel-loader {
  background:
    linear-gradient(rgba(232, 184, 74, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232, 184, 74, 0.035) 1px, transparent 1px),
    #020409 !important;
  background-size: 42px 42px, 42px 42px, auto !important;
}

.imperial-command-skin .loader-core {
  border-color: var(--command-line-strong) !important;
  background: linear-gradient(180deg, rgba(20, 17, 9, 0.96), rgba(6, 8, 13, 0.96)) !important;
  box-shadow: 0 26px 90px rgba(0, 0, 0, 0.72), 0 0 34px rgba(232, 184, 74, 0.16) !important;
}

.imperial-command-skin .loader-logo,
.imperial-command-skin .loader-text {
  color: var(--command-gold-bright) !important;
}

.imperial-command-skin :where(.panel-sidebar, .panel-surface, .panel-topbar, .liquid-panel, .liquid-surface, .liquid-table-shell, .panel-section-shell, .panel-stat, .command-surface, .command-row, .empty-state, .applications-shell-card, .applications-template-card, .applications-review-card, .applications-case-card, .applications-review-bucket, .applications-review-sidecar, .applications-intake-rail, .applications-glass-card, .applications-detail-card, .applications-stat-card, .applications-score-panel, .discord-shell-card, .command-center-card, .stats-surface, .panel-notification-dropdown, .notification-item) {
  border-color: var(--command-line) !important;
  background:
    linear-gradient(180deg, rgba(255, 227, 151, 0.055), transparent 18%),
    linear-gradient(145deg, var(--command-panel), var(--command-panel-soft)) !important;
  box-shadow:
    0 18px 42px -30px rgba(0, 0, 0, 0.9),
    inset 0 1px 0 rgba(255, 227, 151, 0.08),
    inset 0 0 0 1px rgba(255, 211, 110, 0.035) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.imperial-command-skin :where(.panel-sidebar, .panel-surface, .panel-topbar, .liquid-panel, .liquid-surface, .panel-section-shell, .panel-stat, .applications-shell-card, .applications-template-card, .applications-review-card, .applications-case-card, .applications-review-bucket, .applications-glass-card, .applications-detail-card, .applications-stat-card) {
  border-radius: 12px !important;
}

.imperial-command-skin .panel-sidebar {
  border: 1px solid var(--command-line-strong) !important;
  background:
    linear-gradient(180deg, rgba(255, 211, 110, 0.12), transparent 11%),
    linear-gradient(180deg, rgba(12, 14, 20, 0.99), rgba(5, 7, 12, 0.99)) !important;
}

.imperial-command-skin .panel-sidebar nav {
  padding-right: 0.15rem;
}

.imperial-command-skin .panel-sidebar nav::-webkit-scrollbar,
.imperial-command-skin .panel-main::-webkit-scrollbar,
.imperial-command-skin :where(.table-shell, .liquid-table-shell, .applications-expanded-body, .command-select-menu, .discord-channel-scroll)::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.imperial-command-skin .panel-sidebar nav::-webkit-scrollbar-thumb,
.imperial-command-skin .panel-main::-webkit-scrollbar-thumb,
.imperial-command-skin :where(.table-shell, .liquid-table-shell, .applications-expanded-body, .command-select-menu, .discord-channel-scroll)::-webkit-scrollbar-thumb {
  border: 2px solid rgba(5, 7, 12, 0.95);
  border-radius: 999px;
  background: rgba(232, 184, 74, 0.54);
}

.imperial-command-skin .panel-topbar {
  border: 1px solid var(--command-line-strong) !important;
  border-left: 1px solid var(--command-line-strong) !important;
  background:
    linear-gradient(90deg, rgba(232, 184, 74, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(19, 21, 28, 0.98), rgba(8, 10, 16, 0.98)) !important;
}

.imperial-command-skin .panel-topbar-grid {
  min-height: 4.8rem;
}

.imperial-command-skin .panel-main {
  padding-top: clamp(1rem, 1.3vw, 1.6rem) !important;
}

.imperial-command-skin .panel-main-inner {
  max-width: min(100%, 96rem) !important;
}

.imperial-command-skin .panel-fast-mode-chip,
.imperial-command-skin .applications-chip,
.imperial-command-skin .discord-channel-badge {
  border: 1px solid rgba(232, 184, 74, 0.42) !important;
  background: rgba(232, 184, 74, 0.1) !important;
  color: var(--command-gold-bright) !important;
  box-shadow: inset 0 1px 0 rgba(255, 235, 174, 0.08);
}

.imperial-command-skin .panel-nav-item,
.imperial-command-skin .panel-regiment-summary,
.imperial-command-skin .panel-regiment-link,
.imperial-command-skin .panel-quick-item {
  min-height: 2.35rem;
  border: 1px solid rgba(232, 184, 74, 0.12) !important;
  border-radius: 8px !important;
  background:
    linear-gradient(90deg, rgba(232, 184, 74, 0.055), transparent 78%),
    rgba(255, 255, 255, 0.025) !important;
  color: var(--command-text-soft) !important;
  box-shadow: none !important;
}

.imperial-command-skin .panel-nav-item svg,
.imperial-command-skin .panel-regiment-summary svg,
.imperial-command-skin .panel-regiment-link svg {
  color: var(--command-gold) !important;
  opacity: 0.9;
}

.imperial-command-skin .panel-nav-item:hover,
.imperial-command-skin .panel-nav-item.is-active,
.imperial-command-skin .panel-regiment-link:hover,
.imperial-command-skin .panel-regiment-link.is-active,
.imperial-command-skin .panel-quick-item:hover {
  border-color: rgba(255, 211, 110, 0.58) !important;
  background:
    linear-gradient(90deg, rgba(232, 184, 74, 0.2), rgba(232, 184, 74, 0.045) 72%, transparent),
    rgba(255, 255, 255, 0.04) !important;
  color: var(--command-text-main) !important;
  box-shadow: inset 3px 0 0 var(--command-gold), 0 12px 26px -22px rgba(232, 184, 74, 0.42) !important;
}

.imperial-command-skin .panel-theme-chip {
  border-radius: 8px !important;
  border-color: rgba(232, 184, 74, 0.18) !important;
  background: rgba(255, 255, 255, 0.035) !important;
}

.imperial-command-skin .panel-theme-chip.is-active {
  border-color: rgba(255, 211, 110, 0.65) !important;
  box-shadow: 0 0 0 1px rgba(232, 184, 74, 0.22), inset 0 0 18px rgba(232, 184, 74, 0.08) !important;
}

.imperial-command-skin :where(.command-btn, .liquid-button, .applications-primary-action, .applications-secondary-action, .applications-filter-button, .applications-command-link, .applications-mini-action, .discord-control-btn, .discord-plus-btn) {
  border-color: rgba(232, 184, 74, 0.34) !important;
  border-radius: 9px !important;
  background:
    linear-gradient(180deg, rgba(255, 233, 164, 0.12), transparent 42%),
    linear-gradient(135deg, rgba(37, 31, 16, 0.96), rgba(9, 11, 16, 0.96)) !important;
  color: var(--command-text-main) !important;
  box-shadow: inset 0 1px 0 rgba(255, 235, 174, 0.12), 0 14px 26px -24px rgba(0, 0, 0, 0.8) !important;
}

.imperial-command-skin :where(.command-btn-primary, .liquid-button-primary, .applications-primary-action) {
  border-color: rgba(255, 211, 110, 0.72) !important;
  background:
    linear-gradient(180deg, rgba(255, 241, 187, 0.28), transparent 44%),
    linear-gradient(135deg, #f2c35f, #a87619 68%, #2c1d08) !important;
  color: #090b10 !important;
  text-shadow: none !important;
}

.imperial-command-skin :where(.command-btn:hover, .liquid-button:hover, .applications-primary-action:hover, .applications-secondary-action:hover, .applications-filter-button:hover, .applications-command-link:hover, .applications-mini-action:hover, .discord-control-btn:hover, .discord-plus-btn:hover) {
  transform: translateY(-1px) !important;
  border-color: rgba(255, 220, 128, 0.72) !important;
  box-shadow: inset 0 1px 0 rgba(255, 235, 174, 0.16), 0 18px 34px -26px rgba(232, 184, 74, 0.38) !important;
}

.imperial-command-skin :where(.liquid-input, .command-select-trigger, .form-control, .form-select, textarea, input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select) {
  border-color: rgba(232, 184, 74, 0.24) !important;
  border-radius: 9px !important;
  background:
    linear-gradient(180deg, rgba(255, 230, 155, 0.06), transparent 42%),
    rgba(4, 6, 10, 0.88) !important;
  color: var(--command-text-main) !important;
  box-shadow: inset 0 1px 0 rgba(255, 235, 174, 0.08) !important;
}

.imperial-command-skin :where(.liquid-input:focus, .command-select-trigger:focus-visible, .form-control:focus, .form-select:focus, textarea:focus, input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):focus, select:focus) {
  border-color: rgba(255, 211, 110, 0.78) !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(232, 184, 74, 0.14), inset 0 1px 0 rgba(255, 235, 174, 0.1) !important;
}

.imperial-command-skin :where(input::placeholder, textarea::placeholder) {
  color: rgba(185, 170, 130, 0.72) !important;
}

.imperial-command-skin :where(.liquid-badge, [class*="badge"]) {
  border-color: rgba(232, 184, 74, 0.34) !important;
}

.imperial-command-skin .panel-hero,
.imperial-command-skin .applications-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 211, 110, 0.42) !important;
  background:
    linear-gradient(rgba(255, 211, 110, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 211, 110, 0.035) 1px, transparent 1px),
    radial-gradient(ellipse at 78% 16%, rgba(232, 184, 74, 0.22), transparent 38%),
    linear-gradient(135deg, rgba(17, 18, 24, 0.98), rgba(5, 7, 12, 0.98)) !important;
  background-size: 34px 34px, 34px 34px, auto, auto !important;
  box-shadow: 0 24px 54px -34px rgba(0, 0, 0, 0.92), inset 0 1px 0 rgba(255, 235, 174, 0.1) !important;
}

.imperial-command-skin .panel-hero::after,
.imperial-command-skin .applications-hero::after {
  content: "";
  position: absolute;
  inset: auto 1rem 0;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 211, 110, 0.72), transparent);
  opacity: 0.8;
}

.imperial-command-skin :where(.panel-kicker, .applications-kicker, .applications-section-kicker, .applications-card-kicker, .applications-detail-label, .panel-stat-label) {
  color: var(--command-gold-bright) !important;
  letter-spacing: 0.16em !important;
}

.imperial-command-skin :where(.applications-title, .applications-section-title, .applications-card-title, .panel-stat-value) {
  color: var(--command-text-main) !important;
}

.imperial-command-skin .panel-stat-grid,
.imperial-command-skin .applications-status-grid,
.imperial-command-skin .applications-ops-grid {
  gap: 0.85rem !important;
}

.imperial-command-skin .panel-stat {
  min-height: 8.25rem;
  border-top: 1px solid rgba(255, 211, 110, 0.5) !important;
}

.imperial-command-skin .panel-stat::before {
  background: linear-gradient(90deg, var(--command-gold), transparent) !important;
}

.dashboard-command-matrix {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1.2rem;
}

.dashboard-command-matrix article {
  min-width: 0;
  border: 1px solid rgba(232, 184, 74, 0.24);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 227, 151, 0.06), transparent 32%),
    rgba(2, 4, 9, 0.58);
  padding: 0.9rem;
  box-shadow: inset 0 1px 0 rgba(255, 235, 174, 0.08);
}

.dashboard-command-matrix span {
  display: block;
  color: var(--command-gold-bright);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.dashboard-command-matrix strong {
  display: block;
  margin-top: 0.28rem;
  color: var(--command-text-main);
  font-size: clamp(1.4rem, 2vw, 2.15rem);
  font-weight: 900;
  line-height: 1;
}

.dashboard-command-matrix small {
  display: block;
  margin-top: 0.45rem;
  color: var(--command-text-soft);
  font-size: 0.72rem;
  line-height: 1.35;
}

.panel-nav-section-title {
  margin: 0.85rem 0 0.35rem;
  padding: 0 0.35rem;
  color: rgba(255, 211, 110, 0.72);
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.panel-nav-section-title:first-child {
  margin-top: 0;
}

.dashboard-command-console-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(22rem, 0.95fr) minmax(19rem, 0.72fr);
  gap: 0.9rem;
}

.dashboard-command-console-grid-secondary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-command-panel {
  min-width: 0;
  border: 1px solid rgba(232, 184, 74, 0.27);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 227, 151, 0.055), transparent 18%),
    linear-gradient(145deg, rgba(11, 14, 22, 0.96), rgba(6, 8, 13, 0.96));
  padding: 1rem;
  box-shadow:
    0 18px 42px -30px rgba(0, 0, 0, 0.9),
    inset 0 1px 0 rgba(255, 227, 151, 0.08);
}

.dashboard-command-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
  margin-bottom: 0.9rem;
}

.dashboard-command-panel-head h2 {
  margin: 0.12rem 0 0;
  color: var(--command-text-main);
  font-size: 0.98rem;
  font-weight: 900;
}

.dashboard-command-panel-head > a,
.dashboard-command-panel-head > span {
  flex: 0 0 auto;
  border: 1px solid rgba(232, 184, 74, 0.24);
  border-radius: 999px;
  background: rgba(232, 184, 74, 0.07);
  padding: 0.24rem 0.48rem;
  color: var(--command-gold-bright);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-activity-chart {
  position: relative;
  display: flex;
  align-items: end;
  gap: 0.45rem;
  height: 11rem;
  border: 1px solid rgba(232, 184, 74, 0.16);
  border-radius: 10px;
  background:
    linear-gradient(rgba(232, 184, 74, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232, 184, 74, 0.035) 1px, transparent 1px),
    rgba(2, 4, 8, 0.56);
  background-size: 28px 28px, 28px 28px, auto;
  padding: 0.75rem;
}

.dashboard-activity-chart span {
  display: block;
  flex: 1;
  height: var(--h);
  min-height: 1.6rem;
  border-radius: 7px 7px 3px 3px;
  background: linear-gradient(180deg, #ffd36e, #b77915 68%, rgba(183, 121, 21, 0.2));
  box-shadow: 0 0 18px rgba(232, 184, 74, 0.18);
}

.dashboard-command-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin-top: 0.75rem;
}

.dashboard-command-metrics div,
.dashboard-status-list div,
.dashboard-progress-row,
.dashboard-ranked-row,
.dashboard-task-list a {
  border: 1px solid rgba(232, 184, 74, 0.16);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.026);
  padding: 0.65rem;
}

.dashboard-command-metrics span,
.dashboard-status-list span,
.dashboard-progress-row span,
.dashboard-task-list span {
  display: block;
  color: var(--command-text-soft);
  font-size: 0.68rem;
  font-weight: 800;
}

.dashboard-command-metrics strong,
.dashboard-status-list strong,
.dashboard-progress-row strong,
.dashboard-task-list strong {
  display: block;
  margin-top: 0.22rem;
  color: var(--command-text-main);
  font-size: 0.9rem;
  font-weight: 900;
}

.dashboard-feed-list,
.dashboard-status-list,
.dashboard-ranked-list,
.dashboard-progress-list,
.dashboard-task-list {
  display: grid;
  gap: 0.55rem;
}

.dashboard-feed-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
  border: 1px solid rgba(232, 184, 74, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.026);
  padding: 0.58rem;
}

.dashboard-feed-row:hover,
.dashboard-ranked-row:hover,
.dashboard-task-list a:hover,
.dashboard-quick-actions a:hover {
  border-color: rgba(255, 211, 110, 0.58);
  background: rgba(232, 184, 74, 0.08);
}

.dashboard-feed-avatar {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border: 1px solid rgba(232, 184, 74, 0.32);
  border-radius: 50%;
  background: rgba(232, 184, 74, 0.1);
  color: var(--command-gold-bright);
  font-size: 0.72rem;
  font-weight: 900;
}

.dashboard-feed-copy {
  min-width: 0;
}

.dashboard-feed-copy strong,
.dashboard-feed-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-feed-copy strong {
  color: var(--command-text-main);
  font-size: 0.82rem;
}

.dashboard-feed-copy small {
  color: var(--command-text-soft);
  font-size: 0.68rem;
}

.dashboard-feed-badge {
  max-width: 6.25rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-status-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-block: 0.55rem;
}

.dashboard-status-list span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.dashboard-status-list i {
  width: 0.54rem;
  height: 0.54rem;
  border-radius: 50%;
  background: var(--command-green);
  box-shadow: 0 0 12px rgba(67, 209, 122, 0.65);
}

.dashboard-status-list i.is-warn {
  background: var(--command-gold);
  box-shadow: 0 0 12px rgba(232, 184, 74, 0.65);
}

.dashboard-ranked-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
}

.dashboard-ranked-row > span {
  display: grid;
  width: 1.8rem;
  height: 1.8rem;
  place-items: center;
  border-radius: 7px;
  background: rgba(232, 184, 74, 0.12);
  color: var(--command-gold-bright);
  font-size: 0.7rem;
  font-weight: 900;
}

.dashboard-ranked-row strong {
  min-width: 0;
  overflow: hidden;
  color: var(--command-text-main);
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-ranked-row small {
  color: var(--command-text-soft);
  font-size: 0.66rem;
}

.dashboard-task-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.dashboard-empty-line {
  border: 1px dashed rgba(232, 184, 74, 0.22);
  border-radius: 10px;
  color: var(--command-text-soft);
  padding: 0.9rem;
  font-size: 0.8rem;
}

.dashboard-quick-actions {
  display: grid;
  grid-template-columns: auto repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  align-items: stretch;
  border: 1px solid rgba(232, 184, 74, 0.28);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(11, 14, 22, 0.96), rgba(5, 7, 12, 0.96));
  padding: 0.75rem;
}

.dashboard-quick-label {
  display: flex;
  align-items: center;
  color: var(--command-gold-bright);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.dashboard-quick-actions a {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.16rem 0.6rem;
  align-items: center;
  border: 1px solid rgba(232, 184, 74, 0.22);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.026);
  padding: 0.72rem;
}

.dashboard-quick-actions a svg {
  grid-row: span 2;
  color: var(--command-gold-bright);
}

.dashboard-quick-actions a span {
  color: var(--command-text-main);
  font-size: 0.78rem;
  font-weight: 900;
}

.dashboard-quick-actions a small {
  color: var(--command-text-soft);
  font-size: 0.66rem;
}

.dashboard-quick-actions a.is-system {
  border-color: rgba(67, 209, 122, 0.36);
  background: rgba(67, 209, 122, 0.07);
}

.imperial-command-skin :where(.table-shell, .liquid-table-shell) {
  border-color: rgba(232, 184, 74, 0.3) !important;
  background: rgba(8, 10, 15, 0.96) !important;
}

.imperial-command-skin :where(.table-shell thead, .liquid-table-head, .liquid-table-shell th) {
  background: rgba(232, 184, 74, 0.08) !important;
  color: var(--command-gold-bright) !important;
}

.imperial-command-skin :where(.table-shell tbody tr, .liquid-table-shell tbody tr) {
  border-color: rgba(232, 184, 74, 0.14) !important;
}

.imperial-command-skin :where(.table-shell tbody tr:hover, .liquid-table-shell tbody tr:hover) {
  background: rgba(232, 184, 74, 0.075) !important;
}

.imperial-command-skin .empty-state {
  color: var(--command-text-soft) !important;
}

.imperial-command-skin .profile-trigger {
  border: 1px solid rgba(255, 211, 110, 0.46) !important;
  background: rgba(232, 184, 74, 0.08) !important;
  box-shadow: 0 0 0 1px rgba(232, 184, 74, 0.08), 0 12px 24px -18px rgba(232, 184, 74, 0.3) !important;
}

.panel-command-status-card {
  border: 1px solid rgba(67, 209, 122, 0.38);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(67, 209, 122, 0.08), transparent 48%),
    rgba(4, 8, 9, 0.72);
  padding: 0.85rem;
  color: var(--command-text-soft);
  box-shadow: inset 0 1px 0 rgba(206, 255, 224, 0.08);
}

.panel-command-status-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--command-text-main);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.panel-command-status-head strong {
  color: var(--command-green);
  font-size: 0.66rem;
}

.panel-command-status-pulse {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.3rem;
  margin-top: 0.75rem;
}

.panel-command-status-pulse span {
  height: 1.65rem;
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(67, 209, 122, 0.62), rgba(67, 209, 122, 0.08));
}

.panel-command-status-pulse span:nth-child(2) { height: 1.1rem; margin-top: 0.55rem; }
.panel-command-status-pulse span:nth-child(3) { height: 1.9rem; }
.panel-command-status-pulse span:nth-child(4) { height: 0.8rem; margin-top: 0.85rem; }
.panel-command-status-pulse span:nth-child(5) { height: 1.35rem; margin-top: 0.3rem; }

.panel-command-status-card p {
  margin: 0.65rem 0 0;
  font-size: 0.68rem;
  line-height: 1.35;
}

.imperial-command-skin .command-page {
  --command-page-gap: 0.45rem;
  max-width: none !important;
}

.imperial-command-skin .command-page > :not([hidden]) ~ :not([hidden]) {
  margin-top: 0 !important;
}

.imperial-command-skin .panel-sidebar {
  padding: 0.7rem !important;
}

.imperial-command-skin .panel-sidebar-command-head {
  padding: 0.75rem !important;
}

.imperial-command-skin .panel-sidebar-command-head img {
  width: 2.65rem !important;
  height: 2.65rem !important;
}

.imperial-command-skin .panel-sidebar-command-head .text-base {
  font-size: 0.82rem !important;
  line-height: 1.05 !important;
}

.panel-theme-dock summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border: 1px solid hsl(var(--accent) / 0.22);
  border-radius: 8px;
  background: hsl(var(--accent) / 0.07);
  padding: 0.48rem 0.58rem;
  color: var(--command-text-soft, hsl(var(--muted-foreground)));
  cursor: pointer;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.panel-theme-dock summary::-webkit-details-marker {
  display: none;
}

.panel-theme-dock summary::after {
  content: "+";
  color: var(--command-gold-bright, hsl(var(--accent)));
  font-size: 0.85rem;
  line-height: 1;
}

.panel-theme-dock[open] summary::after {
  content: "-";
}

.panel-theme-dock summary strong {
  min-width: 0;
  overflow: hidden;
  color: var(--command-gold-bright, hsl(var(--accent)));
  font-size: 0.58rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.panel-theme-dock-body {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.55rem;
}

.imperial-command-skin .panel-theme-picker-grid {
  max-height: min(42vh, 18rem);
  overflow: auto;
  padding-right: 0.15rem;
}

.imperial-command-skin .panel-theme-chip {
  min-height: 2.45rem;
  gap: 0.55rem;
  padding: 0.48rem 0.55rem !important;
}

.imperial-command-skin .panel-theme-chip-swatch {
  width: 1.75rem;
  height: 1.75rem;
  flex-basis: 1.75rem;
  border-radius: 0.55rem;
}

.imperial-command-skin .panel-theme-chip-label {
  font-size: 0.7rem;
}

.imperial-command-skin .panel-theme-picker-note {
  font-size: 0.58rem;
}

.imperial-command-skin .panel-sidebar nav {
  display: grid;
  gap: 0.16rem;
}

.imperial-command-skin .panel-sidebar nav > :not([hidden]) ~ :not([hidden]) {
  margin-top: 0 !important;
}

.imperial-command-skin .panel-nav-section-title {
  margin: 0.42rem 0 0.18rem;
  padding-inline: 0.2rem;
  font-size: 0.52rem;
}

.imperial-command-skin .panel-nav-item,
.imperial-command-skin .panel-regiment-summary,
.imperial-command-skin .panel-regiment-link,
.imperial-command-skin .panel-quick-item {
  min-height: 2rem;
  gap: 0.45rem;
  padding: 0.45rem 0.52rem !important;
  font-size: 0.76rem;
  line-height: 1.1;
}

.imperial-command-skin .panel-regiment-tree > summary {
  min-height: 2rem;
}

.imperial-command-skin .panel-regiment-list {
  max-height: 15rem;
  overflow: auto;
}

.imperial-command-skin .panel-command-status-card {
  margin-top: 0.55rem !important;
  padding: 0.58rem;
}

.imperial-command-skin .panel-command-status-pulse,
.imperial-command-skin .panel-command-status-card p {
  display: none;
}

.imperial-command-skin .panel-topbar-grid {
  min-height: 3.65rem;
  padding-top: 0.65rem !important;
  padding-bottom: 0.65rem !important;
}

.imperial-command-skin .panel-main {
  padding: 0.45rem !important;
}

.imperial-command-skin .panel-hero {
  padding: 1rem !important;
}

.imperial-command-skin .panel-hero img {
  width: 3.75rem !important;
  height: 3.75rem !important;
}

.imperial-command-skin .panel-hero h1 {
  font-size: clamp(1.35rem, 1.65vw, 2rem) !important;
  line-height: 1.05 !important;
}

.imperial-command-skin .panel-hero p {
  font-size: 0.78rem !important;
}

.imperial-command-skin .dashboard-command-matrix {
  gap: 0.55rem;
  margin-top: 0.75rem;
}

.imperial-command-skin .dashboard-command-matrix article {
  padding: 0.62rem;
}

.imperial-command-skin .dashboard-command-matrix strong {
  font-size: clamp(1.05rem, 1.35vw, 1.55rem);
}

.imperial-command-skin .dashboard-command-matrix small {
  margin-top: 0.25rem;
  font-size: 0.62rem;
}

.imperial-command-skin .dashboard-quick-actions {
  gap: 0.52rem;
  padding: 0.55rem;
}

.imperial-command-skin .dashboard-quick-actions a {
  min-height: 3.1rem;
  padding: 0.55rem;
}

.imperial-command-skin .panel-stat-grid {
  gap: 0.6rem !important;
}

.imperial-command-skin .panel-stat {
  min-height: 5.65rem;
  padding: 0.72rem !important;
}

.imperial-command-skin .dashboard-command-console-grid {
  grid-template-columns: minmax(0, 1fr) minmax(20rem, 0.88fr) minmax(17rem, 0.68fr);
  gap: 0.65rem;
}

.imperial-command-skin .dashboard-command-console-grid-secondary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.imperial-command-skin .dashboard-command-panel {
  padding: 0.72rem;
}

.imperial-command-skin .dashboard-command-panel-head {
  margin-bottom: 0.55rem;
}

.imperial-command-skin .dashboard-activity-chart {
  height: 6.35rem;
  padding: 0.48rem;
}

.imperial-command-skin .dashboard-command-metrics,
.imperial-command-skin .dashboard-feed-list,
.imperial-command-skin .dashboard-status-list,
.imperial-command-skin .dashboard-ranked-list,
.imperial-command-skin .dashboard-progress-list,
.imperial-command-skin .dashboard-task-list {
  gap: 0.38rem;
}

.imperial-command-skin .dashboard-command-metrics div,
.imperial-command-skin .dashboard-status-list div,
.imperial-command-skin .dashboard-progress-row,
.imperial-command-skin .dashboard-ranked-row,
.imperial-command-skin .dashboard-task-list a,
.imperial-command-skin .dashboard-feed-row {
  padding: 0.44rem;
}

.dashboard-legacy-modules {
  border: 1px solid hsl(var(--accent) / 0.26);
  border-radius: 12px;
  background: linear-gradient(145deg, hsl(var(--card) / 0.82), hsl(var(--background) / 0.72));
  overflow: hidden;
}

.dashboard-legacy-modules > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.78rem 0.9rem;
  cursor: pointer;
  list-style: none;
  color: var(--command-text-main);
}

.dashboard-legacy-modules > summary::-webkit-details-marker {
  display: none;
}

.dashboard-legacy-modules > summary span {
  color: var(--command-gold-bright);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.dashboard-legacy-modules > summary strong {
  color: var(--command-text-soft);
  font-size: 0.72rem;
  font-weight: 800;
}

.dashboard-legacy-modules > summary::after {
  content: "Open";
  border: 1px solid hsl(var(--accent) / 0.34);
  border-radius: 999px;
  background: hsl(var(--accent) / 0.08);
  padding: 0.22rem 0.52rem;
  color: var(--command-gold-bright);
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.dashboard-legacy-modules[open] > summary::after {
  content: "Hide";
}

.dashboard-legacy-modules-body {
  display: grid;
  gap: 0.75rem;
  padding: 0 0.75rem 0.75rem;
}

.imperial-command-skin :where(.dashboard-command-panel, .dashboard-quick-actions, .dashboard-command-matrix article, .dashboard-activity-chart, .dashboard-legacy-modules) {
  border-color: hsl(var(--accent) / 0.28) !important;
}

.imperial-command-skin :where(.dashboard-command-panel, .dashboard-quick-actions, .dashboard-command-matrix article, .dashboard-activity-chart, .dashboard-legacy-modules) {
  background:
    linear-gradient(180deg, hsl(var(--accent) / 0.055), transparent 18%),
    linear-gradient(145deg, hsl(var(--card) / 0.92), hsl(var(--background) / 0.9)) !important;
}

.imperial-command-skin .dashboard-activity-chart {
  background:
    radial-gradient(circle at 18% 12%, hsl(var(--accent) / 0.08), transparent 34%),
    radial-gradient(circle at 82% 95%, hsl(var(--theme-camo-b) / 0.12), transparent 38%),
    hsl(var(--background) / 0.56) !important;
  background-size: auto !important;
}

.imperial-command-skin .dashboard-activity-chart span {
  background: linear-gradient(180deg, var(--command-gold-bright), color-mix(in oklab, hsl(var(--accent)) 58%, hsl(var(--background)) 42%) 68%, hsl(var(--accent) / 0.2)) !important;
  box-shadow: 0 0 18px hsl(var(--accent) / 0.18) !important;
}

.imperial-command-skin .dashboard-feed-row:hover,
.imperial-command-skin .dashboard-ranked-row:hover,
.imperial-command-skin .dashboard-task-list a:hover,
.imperial-command-skin .dashboard-quick-actions a:hover {
  border-color: hsl(var(--accent) / 0.58) !important;
  background: hsl(var(--accent) / 0.08) !important;
}

.imperial-command-skin .panel-nav-item,
.imperial-command-skin .panel-regiment-summary,
.imperial-command-skin .panel-regiment-link,
.imperial-command-skin .panel-quick-item {
  border-color: hsl(var(--accent) / 0.14) !important;
  background:
    linear-gradient(90deg, hsl(var(--accent) / 0.055), transparent 78%),
    hsl(var(--foreground) / 0.025) !important;
}

.imperial-command-skin .applications-radar-panel {
  align-self: stretch;
  min-width: min(100%, 22rem);
  border: 1px solid rgba(232, 184, 74, 0.22);
  border-radius: 12px;
  background: rgba(5, 7, 12, 0.48);
  padding: 1rem;
}

.imperial-command-skin .applications-radar-ring,
.imperial-command-skin .applications-progress-dial {
  width: 8.5rem !important;
  height: 8.5rem !important;
  min-width: 8.5rem !important;
  border: 1px solid rgba(255, 211, 110, 0.4) !important;
  background:
    radial-gradient(circle, #080a10 0 56%, transparent 57%),
    conic-gradient(var(--command-gold) var(--progress, calc(var(--capacity, 0) * 1%)), rgba(255, 255, 255, 0.08) 0),
    #05070d !important;
  box-shadow: inset 0 0 0 8px rgba(232, 184, 74, 0.035), 0 18px 28px -26px rgba(232, 184, 74, 0.45) !important;
  color: var(--command-text-main) !important;
}

.imperial-command-skin .applications-card-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr)) !important;
}

.imperial-command-skin .applications-review-workspace {
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 24rem) !important;
  align-items: start;
}

.imperial-command-skin .applications-review-sidecar {
  top: 1rem;
}

.imperial-command-skin .applications-fit-check-button {
  border-color: rgba(95, 168, 255, 0.45) !important;
  background: rgba(95, 168, 255, 0.09) !important;
  color: #b9d8ff !important;
}

.imperial-command-skin .discord-shell {
  background:
    linear-gradient(rgba(232, 184, 74, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232, 184, 74, 0.026) 1px, transparent 1px),
    #03050a !important;
  background-size: 42px 42px, 42px 42px, auto !important;
}

.imperial-command-skin :where(.discord-regiment-bar, .discord-channel-list, .discord-main-header, .discord-members-panel, .discord-sidebar-footer) {
  border-color: rgba(232, 184, 74, 0.24) !important;
  background: rgba(7, 9, 14, 0.96) !important;
}

.imperial-command-skin .discord-channel-row.is-active,
.imperial-command-skin .discord-channel-row:hover {
  background: rgba(232, 184, 74, 0.12) !important;
  color: var(--command-text-main) !important;
}

.imperial-command-skin :where(.panel-sidebar, .panel-surface, .panel-topbar, .panel-section-shell, .panel-stat, .dashboard-command-panel, .dashboard-quick-actions, .dashboard-command-matrix article, .dashboard-legacy-modules, .liquid-panel, .liquid-surface, .liquid-table-shell, .command-surface, .command-row, .empty-state, .applications-shell-card, .applications-template-card, .applications-review-card, .applications-case-card, .applications-review-bucket, .applications-review-sidecar, .applications-intake-rail, .applications-glass-card, .applications-detail-card, .applications-stat-card, .applications-score-panel, .discord-shell-card, .command-center-card, .stats-surface, .panel-notification-dropdown, .notification-item) {
  border-color: hsl(var(--accent) / 0.3) !important;
  background:
    linear-gradient(180deg, hsl(var(--accent) / 0.052), transparent 18%),
    linear-gradient(145deg, hsl(var(--card) / 0.94), hsl(var(--background) / 0.88)) !important;
  box-shadow:
    0 16px 34px -30px hsl(var(--background) / 0.92),
    inset 0 1px 0 hsl(var(--foreground) / 0.06),
    inset 0 0 0 1px hsl(var(--accent) / 0.035) !important;
}

.imperial-command-skin :where(.panel-fast-mode-chip, .applications-chip, .discord-channel-badge, .panel-theme-chip, .dashboard-command-panel-head > a, .dashboard-command-panel-head > span, .dashboard-command-metrics div, .dashboard-status-list div, .dashboard-progress-row, .dashboard-ranked-row, .dashboard-task-list a, .dashboard-feed-row, .dashboard-feed-avatar, .dashboard-empty-line, .dashboard-quick-actions a) {
  border-color: hsl(var(--accent) / 0.24) !important;
  background: hsl(var(--accent) / 0.07) !important;
}

.imperial-command-skin :where(.panel-nav-item:hover, .panel-nav-item.is-active, .panel-regiment-link:hover, .panel-regiment-link.is-active, .panel-quick-item:hover, .dashboard-feed-row:hover, .dashboard-ranked-row:hover, .dashboard-task-list a:hover, .dashboard-quick-actions a:hover, .discord-channel-row.is-active, .discord-channel-row:hover) {
  border-color: hsl(var(--accent) / 0.6) !important;
  background:
    linear-gradient(90deg, hsl(var(--accent) / 0.2), hsl(var(--accent) / 0.05) 72%, transparent),
    hsl(var(--foreground) / 0.035) !important;
  box-shadow: inset 3px 0 0 hsl(var(--accent)), 0 12px 26px -22px hsl(var(--accent) / 0.42) !important;
}

.imperial-command-skin :where(.panel-topbar, .panel-sidebar) {
  border-color: hsl(var(--accent) / 0.46) !important;
}

.imperial-command-skin .profile-trigger {
  border-color: hsl(var(--accent) / 0.48) !important;
  background: hsl(var(--accent) / 0.08) !important;
  box-shadow: 0 0 0 1px hsl(var(--accent) / 0.08), 0 12px 24px -18px hsl(var(--accent) / 0.3) !important;
}

.imperial-command-skin :where(.table-shell, .liquid-table-shell) {
  border-color: hsl(var(--accent) / 0.3) !important;
  background: hsl(var(--card) / 0.94) !important;
}

.imperial-command-skin :where(.table-shell thead, .liquid-table-head, .liquid-table-shell th) {
  background: hsl(var(--accent) / 0.08) !important;
  color: var(--command-gold-bright) !important;
}

.imperial-command-skin,
.imperial-command-skin * {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.imperial-command-skin::-webkit-scrollbar,
.imperial-command-skin *::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
}

@media (min-width: 1024px) {
  .imperial-command-skin .relative.flex.min-h-screen::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    border: 1px solid hsl(var(--accent) / 0.24);
    border-radius: 14px;
    background:
      radial-gradient(circle at 18% 10%, hsl(var(--accent) / 0.075), transparent 32%),
      linear-gradient(145deg, hsl(var(--card) / 0.48), hsl(var(--background) / 0.34));
    box-shadow: inset 0 0 0 1px hsl(var(--foreground) / 0.035);
    pointer-events: none;
  }

  .imperial-command-skin #hoverZone,
  .imperial-command-skin #sidebarBackdrop {
    display: none !important;
  }

  .imperial-command-skin #sidebar {
    inset: 0 auto 0 0 !important;
    width: 19rem !important;
    border-radius: 0 !important;
    border-left-width: 0 !important;
    border-top-width: 0 !important;
    border-bottom-width: 0 !important;
    transform: none !important;
  }

  .imperial-command-skin #sidebar > .flex {
    min-height: 0;
  }

  .imperial-command-skin .panel-sidebar nav {
    flex: 0 1 auto !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start;
    gap: 0.22rem;
    overflow: visible !important;
  }

  .imperial-command-skin .panel-sidebar nav::-webkit-scrollbar {
    display: none;
  }

  .imperial-command-skin .panel-nav-section-title,
  .imperial-command-skin .panel-regiment-tree {
    grid-column: 1 / -1;
  }

  .imperial-command-skin .panel-nav-section-title {
    margin-top: 0.22rem;
    margin-bottom: 0.08rem;
    font-size: 0.5rem;
    line-height: 1;
  }

  .imperial-command-skin .panel-nav-item,
  .imperial-command-skin .panel-regiment-tree > summary {
    min-height: 1.84rem;
    padding: 0.4rem 0.5rem !important;
    font-size: 0.72rem;
  }

  .imperial-command-skin .panel-nav-item span,
  .imperial-command-skin .panel-regiment-tree > summary span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .imperial-command-skin .panel-nav-item svg:last-child {
    display: none;
  }

  .imperial-command-skin .panel-regiment-tree[open] .panel-regiment-list {
    max-height: 10rem;
    overflow: auto;
  }

  .imperial-command-skin .panel-command-status-card {
    flex: 0 0 auto;
  }

  .imperial-command-skin .panel-topbar {
    margin: 0 0 0 19rem !important;
    border-radius: 0 !important;
    border-left-width: 0 !important;
    border-top-width: 0 !important;
    border-right-width: 0 !important;
  }

  .imperial-command-skin .panel-main {
    margin-left: 19rem !important;
    width: calc(100% - 19rem) !important;
    padding: 0 !important;
  }

  .imperial-command-skin .panel-topbar-grid {
    min-height: 3.05rem;
    padding-top: 0.45rem !important;
    padding-bottom: 0.45rem !important;
  }

  .imperial-command-skin .panel-topbar .px-4.pb-3 {
    padding-bottom: 0.45rem !important;
  }

  .imperial-command-skin .panel-main-inner {
    max-width: none !important;
  }

  .imperial-command-skin .command-page {
    --command-page-gap: 0.38rem;
    max-width: none !important;
    min-height: calc(100vh - 5.35rem);
    border: 1px solid hsl(var(--accent) / 0.24);
    border-top-width: 0;
    border-left-width: 0;
    border-right-width: 0;
    border-bottom-width: 0;
    border-radius: 0;
    background:
      linear-gradient(180deg, hsl(var(--accent) / 0.03), transparent 22%),
      linear-gradient(145deg, hsl(var(--card) / 0.52), hsl(var(--background) / 0.36));
    padding: 0.34rem;
  }

  .imperial-command-skin .panel-hero {
    padding: 0.58rem !important;
  }

  .imperial-command-skin .panel-hero > .flex {
    gap: 0.65rem !important;
  }

  .imperial-command-skin .panel-hero img {
    width: 3rem !important;
    height: 3rem !important;
  }

  .imperial-command-skin .panel-hero h1 {
    font-size: clamp(1.15rem, 1.3vw, 1.55rem) !important;
  }

  .imperial-command-skin .dashboard-command-matrix {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.28rem;
    margin-top: 0.42rem;
  }

  .imperial-command-skin .dashboard-command-matrix article {
    padding: 0.52rem;
  }

  .imperial-command-skin .dashboard-command-matrix span,
  .imperial-command-skin .dashboard-command-matrix small {
    font-size: 0.56rem;
  }

  .imperial-command-skin .dashboard-command-matrix strong {
    font-size: 1.08rem;
  }

  .imperial-command-skin .dashboard-quick-actions {
    grid-template-columns: auto repeat(4, minmax(0, 1fr));
    gap: 0.3rem;
    padding: 0.36rem;
  }

  .imperial-command-skin .dashboard-quick-actions a {
    min-height: 2.72rem;
    padding: 0.52rem;
  }

  .imperial-command-skin .dashboard-quick-actions a span {
    font-size: 0.68rem;
  }

  .imperial-command-skin .dashboard-quick-actions a small {
    font-size: 0.56rem;
  }

  .imperial-command-skin .dashboard-command-console-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(18rem, 0.88fr) minmax(15rem, 0.66fr);
    gap: 0.34rem;
  }

  .imperial-command-skin .dashboard-command-panel {
    padding: 0.58rem;
  }

  .imperial-command-skin .dashboard-command-panel-head h2 {
    font-size: 0.78rem;
  }

  .imperial-command-skin .dashboard-command-panel-head > a,
  .imperial-command-skin .dashboard-command-panel-head > span {
    padding: 0.16rem 0.34rem;
    font-size: 0.5rem;
  }

  .imperial-command-skin .dashboard-activity-chart {
    height: 4.75rem;
  }

  .imperial-command-skin .dashboard-command-metrics div,
  .imperial-command-skin .dashboard-status-list div,
  .imperial-command-skin .dashboard-progress-row,
  .imperial-command-skin .dashboard-ranked-row,
  .imperial-command-skin .dashboard-task-list a,
  .imperial-command-skin .dashboard-feed-row {
    padding: 0.34rem;
  }

  .imperial-command-skin .dashboard-feed-list,
  .imperial-command-skin .dashboard-ranked-list,
  .imperial-command-skin .dashboard-progress-list,
  .imperial-command-skin .dashboard-task-list,
  .imperial-command-skin .dashboard-status-list {
    gap: 0.28rem;
  }

  .imperial-command-skin .dashboard-ranked-list .dashboard-ranked-row:nth-of-type(n+4),
  .imperial-command-skin .dashboard-feed-list .dashboard-feed-row:nth-of-type(n+4) {
    display: none;
  }

  .imperial-command-skin .dashboard-legacy-modules > summary {
    padding: 0.46rem 0.6rem;
  }

  .imperial-command-skin .dashboard-legacy-modules > summary span {
    font-size: 0.62rem;
  }

  .imperial-command-skin .dashboard-legacy-modules > summary strong {
    font-size: 0.6rem;
  }
}

@media (max-width: 1023px) {
  .imperial-command-skin #sidebar {
    max-width: calc(100vw - 1.5rem);
  }

  .imperial-command-skin .panel-topbar {
    margin: 0.75rem !important;
  }
}

@media (max-width: 960px) {
  .imperial-command-skin .applications-hero,
  .imperial-command-skin .applications-radar-panel,
  .imperial-command-skin .applications-review-workspace {
    display: block !important;
  }

  .imperial-command-skin .applications-radar-panel,
  .imperial-command-skin .applications-review-sidecar {
    margin-top: 1rem;
  }

  .imperial-command-skin .applications-radar-ring {
    margin-inline: auto;
  }

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

  .dashboard-command-console-grid,
  .dashboard-command-console-grid-secondary,
  .dashboard-quick-actions {
    grid-template-columns: 1fr;
  }

  .dashboard-quick-label {
    min-height: 2rem;
  }
}

@media (max-width: 560px) {
  .dashboard-command-matrix {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .imperial-command-skin *,
  .imperial-command-skin *::before,
  .imperial-command-skin *::after {
    scroll-behavior: auto !important;
  }
}

html,
body.imperial-command-skin,
body.imperial-command-skin *,
body.imperial-command-skin .panel-main,
body.imperial-command-skin .panel-sidebar nav,
body.imperial-command-skin :where(.table-shell, .liquid-table-shell, .applications-expanded-body, .command-select-menu, .discord-channel-scroll, .discord-user-scroll, #quickResults, #globalPlayerResults) {
  -ms-overflow-style: none !important;
  scrollbar-width: none !important;
}

html::-webkit-scrollbar,
body.imperial-command-skin::-webkit-scrollbar,
body.imperial-command-skin *::-webkit-scrollbar,
body.imperial-command-skin .panel-main::-webkit-scrollbar,
body.imperial-command-skin .panel-sidebar nav::-webkit-scrollbar,
body.imperial-command-skin :where(.table-shell, .liquid-table-shell, .applications-expanded-body, .command-select-menu, .discord-channel-scroll, .discord-user-scroll, #quickResults, #globalPlayerResults)::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
  background: transparent !important;
}

body.imperial-command-skin::-webkit-scrollbar-thumb,
body.imperial-command-skin *::-webkit-scrollbar-thumb,
body.imperial-command-skin .panel-main::-webkit-scrollbar-thumb,
body.imperial-command-skin .panel-sidebar nav::-webkit-scrollbar-thumb,
body.imperial-command-skin :where(.table-shell, .liquid-table-shell, .applications-expanded-body, .command-select-menu, .discord-channel-scroll, .discord-user-scroll, #quickResults, #globalPlayerResults)::-webkit-scrollbar-thumb {
  background: transparent !important;
  border: 0 !important;
}

@media (min-width: 1024px) {
  body.imperial-command-skin {
    overflow: hidden !important;
  }

  body.imperial-command-skin .panel-app-shell {
    display: grid !important;
    grid-template-columns: 19rem minmax(0, 1fr);
    gap: 0 !important;
    align-items: stretch;
    width: 100%;
    min-height: 100vh;
    height: 100vh;
    overflow: hidden;
  }

  body.imperial-command-skin #hoverZone,
  body.imperial-command-skin #sidebarBackdrop {
    display: none !important;
  }

  body.imperial-command-skin #sidebar {
    position: relative !important;
    inset: auto !important;
    grid-column: 1;
    grid-row: 1;
    width: 19rem !important;
    height: 100vh !important;
    max-height: 100vh !important;
    min-height: 100vh !important;
    transform: none !important;
    border-radius: 0 !important;
    border-top-width: 0 !important;
    border-bottom-width: 0 !important;
    border-left-width: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
  }

  body.imperial-command-skin #sidebar > .flex {
    height: 100%;
    min-height: 0;
  }

  body.imperial-command-skin .panel-sidebar nav {
    flex: 1 1 auto !important;
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start;
    gap: 0.22rem;
    overflow: auto !important;
    padding-right: 0 !important;
  }

  body.imperial-command-skin .panel-nav-section-title,
  body.imperial-command-skin .panel-regiment-tree {
    grid-column: 1 / -1;
  }

  body.imperial-command-skin .panel-app-main {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    height: 100vh;
    min-height: 0;
    overflow: hidden;
    margin: 0 !important;
  }

  body.imperial-command-skin .panel-topbar {
    flex: 0 0 auto;
    width: 100%;
    margin: 0 !important;
    border-radius: 0 !important;
    border-top-width: 0 !important;
    border-right-width: 0 !important;
    border-left-width: 0 !important;
  }

  body.imperial-command-skin .panel-topbar-grid {
    min-height: 3.2rem;
    padding: 0.55rem 0.9rem !important;
  }

  body.imperial-command-skin .panel-topbar .px-4.pb-3 {
    padding-right: 0.9rem !important;
    padding-bottom: 0.45rem !important;
    padding-left: 0.9rem !important;
  }

  body.imperial-command-skin .panel-main {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    width: 100% !important;
    max-width: 100%;
    margin: 0 !important;
    padding: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }

  body.imperial-command-skin .panel-main-inner {
    width: 100%;
    max-width: none !important;
    margin: 0 !important;
  }

  body.imperial-command-skin .command-page {
    width: 100%;
    max-width: none !important;
    min-height: calc(100vh - 4.1rem);
    margin: 0 !important;
    border-radius: 0;
    border-top-width: 0;
    border-right-width: 0;
    border-bottom-width: 0;
    border-left-width: 0;
    padding: 0.5rem;
    --command-page-gap: 0.5rem;
  }

  body.imperial-command-skin :where(.panel-hero, .dashboard-quick-actions, .dashboard-command-panel, .dashboard-legacy-modules, .panel-section-shell, .panel-stat) {
    transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
  }

  body.imperial-command-skin :where(.dashboard-command-panel, .dashboard-quick-actions a, .dashboard-feed-row, .dashboard-ranked-row, .dashboard-task-list a):hover {
    transform: translateY(-1px);
  }
}

/* Imperial Tactical Glass Overhaul */
.imperial-command-skin {
  --itg-bg-0: #03070d;
  --itg-bg-1: #07111d;
  --itg-bg-2: #0b1724;
  --itg-glass-bg: rgba(8, 20, 34, 0.72);
  --itg-glass-soft: rgba(11, 28, 45, 0.58);
  --itg-glass-strong: rgba(11, 31, 49, 0.88);
  --itg-border: rgba(103, 232, 249, 0.28);
  --itg-border-strong: rgba(103, 232, 249, 0.52);
  --itg-border-soft: rgba(148, 163, 184, 0.16);
  --itg-cyan: #67e8f9;
  --itg-blue: #38bdf8;
  --itg-green: #34d399;
  --itg-amber: #fbbf24;
  --itg-danger: #fb7185;
  --itg-copy: #d7eef7;
  --itg-muted: #8ea7b7;
  --itg-radius: 8px;
  --itg-radius-sm: 6px;
  --itg-shadow: 0 22px 54px -38px rgba(6, 182, 212, 0.62), 0 16px 42px -28px rgba(0, 0, 0, 0.86);
  color: var(--itg-copy);
  background:
    linear-gradient(rgba(103, 232, 249, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(103, 232, 249, 0.028) 1px, transparent 1px),
    radial-gradient(circle at 12% 5%, rgba(56, 189, 248, 0.18), transparent 30rem),
    radial-gradient(circle at 85% 12%, rgba(20, 184, 166, 0.11), transparent 28rem),
    linear-gradient(145deg, var(--itg-bg-0), var(--itg-bg-1) 46%, var(--itg-bg-0)) !important;
  background-size: 46px 46px, 46px 46px, auto, auto, auto !important;
}

.imperial-command-skin::before {
  opacity: 0.08 !important;
  mix-blend-mode: screen !important;
}

.imperial-command-skin .panel-ribbon-layer {
  opacity: 0.55;
  background:
    linear-gradient(120deg, transparent 0 18%, rgba(103, 232, 249, 0.08) 18.4% 18.7%, transparent 19% 64%, rgba(56, 189, 248, 0.06) 64.4% 64.8%, transparent 65%),
    radial-gradient(circle at 72% 18%, rgba(103, 232, 249, 0.09), transparent 18rem);
}

.imperial-command-skin .panel-grain-layer {
  opacity: 0.22;
}

.imperial-command-skin .panel-sidebar {
  border-color: var(--itg-border) !important;
  background:
    linear-gradient(180deg, rgba(10, 25, 41, 0.96), rgba(5, 13, 24, 0.98)),
    radial-gradient(circle at 12% 4%, rgba(103, 232, 249, 0.16), transparent 18rem) !important;
  box-shadow: 18px 0 48px -38px rgba(103, 232, 249, 0.85), inset -1px 0 0 rgba(103, 232, 249, 0.16) !important;
  backdrop-filter: blur(18px) saturate(132%) !important;
}

.imperial-command-skin .panel-sidebar-command-head,
.imperial-command-skin .panel-theme-dock,
.imperial-command-skin .panel-command-status-card,
.imperial-command-skin .panel-regiment-item {
  border: 1px solid var(--itg-border-soft) !important;
  border-radius: var(--itg-radius) !important;
  background:
    linear-gradient(180deg, rgba(103, 232, 249, 0.075), transparent 34%),
    rgba(7, 18, 31, 0.66) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045) !important;
}

.imperial-command-skin .panel-sidebar-command-head img {
  border-color: var(--itg-border-strong) !important;
  background: rgba(2, 8, 16, 0.68) !important;
  box-shadow: 0 0 28px -14px rgba(103, 232, 249, 0.95);
}

.imperial-command-skin .panel-nav-section-title,
.imperial-command-skin .panel-kicker {
  color: var(--itg-cyan) !important;
  letter-spacing: 0.14em !important;
  text-shadow: 0 0 18px rgba(103, 232, 249, 0.24);
}

.imperial-command-skin .panel-nav-item,
.imperial-command-skin .panel-sub-item,
.imperial-command-skin .panel-regiment-tree > summary,
.imperial-command-skin .panel-quick-item {
  border: 1px solid transparent !important;
  border-radius: var(--itg-radius-sm) !important;
  background: rgba(10, 24, 40, 0.32) !important;
  color: rgba(215, 238, 247, 0.86) !important;
  transition: background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.imperial-command-skin .panel-nav-item svg,
.imperial-command-skin .panel-sub-item svg,
.imperial-command-skin .panel-regiment-tree > summary svg,
.imperial-command-skin .panel-quick-item svg {
  color: var(--itg-cyan) !important;
  filter: drop-shadow(0 0 8px rgba(103, 232, 249, 0.28));
}

.imperial-command-skin .panel-nav-item:hover,
.imperial-command-skin .panel-sub-item:hover,
.imperial-command-skin .panel-regiment-tree > summary:hover,
.imperial-command-skin .panel-quick-item:hover,
.imperial-command-skin .panel-regiment-link:hover {
  border-color: var(--itg-border) !important;
  background:
    linear-gradient(90deg, rgba(103, 232, 249, 0.16), rgba(56, 189, 248, 0.055) 70%, transparent),
    rgba(12, 30, 50, 0.62) !important;
  box-shadow: inset 3px 0 0 rgba(103, 232, 249, 0.76), 0 14px 28px -24px rgba(103, 232, 249, 0.68) !important;
  transform: translateX(1px);
}

.imperial-command-skin .panel-nav-item.is-active,
.imperial-command-skin .panel-sub-item.is-active,
.imperial-command-skin .panel-regiment-link.is-active {
  border-color: var(--itg-border-strong) !important;
  background:
    linear-gradient(90deg, rgba(103, 232, 249, 0.24), rgba(56, 189, 248, 0.09) 72%, rgba(7, 18, 31, 0.24)),
    rgba(13, 37, 58, 0.78) !important;
  color: #ecfeff !important;
  box-shadow: inset 3px 0 0 var(--itg-cyan), 0 0 0 1px rgba(103, 232, 249, 0.08), 0 18px 34px -28px rgba(103, 232, 249, 0.9) !important;
}

.imperial-command-skin .panel-topbar,
.imperial-command-skin .panel-surface,
.imperial-command-skin .panel-section-shell,
.imperial-command-skin .panel-hero,
.imperial-command-skin .panel-stat,
.imperial-command-skin .dashboard-command-panel,
.imperial-command-skin .dashboard-quick-actions,
.imperial-command-skin .dashboard-legacy-modules,
.imperial-command-skin .command-row,
.imperial-command-skin .empty-state,
.imperial-command-skin .table-shell,
.imperial-command-skin .liquid-panel,
.imperial-command-skin .liquid-surface,
.imperial-command-skin .liquid-table-shell,
.imperial-command-skin .applications-shell-card,
.imperial-command-skin .applications-template-card,
.imperial-command-skin .applications-review-card,
.imperial-command-skin .applications-case-card,
.imperial-command-skin .applications-detail-card,
.imperial-command-skin .applications-stat-card,
.imperial-command-skin .applications-score-panel,
.imperial-command-skin .discord-shell-card,
.imperial-command-skin .command-center-card,
.imperial-command-skin .stats-surface,
.imperial-command-skin .panel-notification-dropdown,
.imperial-command-skin .notification-item {
  border-color: var(--itg-border) !important;
  border-radius: var(--itg-radius) !important;
  background:
    linear-gradient(180deg, rgba(103, 232, 249, 0.075), transparent 32%),
    linear-gradient(145deg, rgba(12, 30, 50, 0.84), rgba(5, 14, 25, 0.74)) !important;
  box-shadow: var(--itg-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.052), inset 0 0 0 1px rgba(103, 232, 249, 0.035) !important;
  backdrop-filter: blur(14px) saturate(128%);
}

.imperial-command-skin .panel-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.imperial-command-skin .panel-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(103, 232, 249, 0.11) 1px, transparent 1px),
    linear-gradient(rgba(103, 232, 249, 0.085) 1px, transparent 1px),
    radial-gradient(circle at 82% 18%, rgba(56, 189, 248, 0.22), transparent 16rem);
  background-size: 32px 32px, 32px 32px, auto;
  opacity: 0.48;
}

.imperial-command-skin .panel-hero h1,
.imperial-command-skin .dashboard-command-panel-head h2,
.imperial-command-skin .panel-stat-value {
  color: #ecfeff !important;
  text-shadow: 0 0 22px rgba(103, 232, 249, 0.18);
}

.imperial-command-skin .panel-muted-copy,
.imperial-command-skin .dashboard-command-panel small,
.imperial-command-skin .dashboard-feed-copy small,
.imperial-command-skin .dashboard-status-list span,
.imperial-command-skin .dashboard-command-metrics span {
  color: var(--itg-muted) !important;
}

.imperial-command-skin .dashboard-command-matrix article,
.imperial-command-skin .dashboard-quick-actions a,
.imperial-command-skin .dashboard-command-metrics div,
.imperial-command-skin .dashboard-status-list div,
.imperial-command-skin .dashboard-progress-row,
.imperial-command-skin .dashboard-ranked-row,
.imperial-command-skin .dashboard-task-list a,
.imperial-command-skin .dashboard-feed-row,
.imperial-command-skin .dashboard-empty-line,
.imperial-command-skin .panel-theme-chip,
.imperial-command-skin .panel-fast-mode-chip,
.imperial-command-skin .applications-chip,
.imperial-command-skin .discord-channel-badge {
  border-color: var(--itg-border-soft) !important;
  border-radius: var(--itg-radius-sm) !important;
  background: rgba(9, 24, 39, 0.58) !important;
}

.imperial-command-skin .dashboard-command-matrix strong,
.imperial-command-skin .dashboard-command-metrics strong,
.imperial-command-skin .dashboard-status-list strong {
  color: var(--itg-cyan) !important;
}

.imperial-command-skin .dashboard-quick-actions a:hover,
.imperial-command-skin .dashboard-feed-row:hover,
.imperial-command-skin .dashboard-ranked-row:hover,
.imperial-command-skin .dashboard-task-list a:hover,
.imperial-command-skin .notification-item:hover {
  border-color: var(--itg-border-strong) !important;
  background: rgba(13, 39, 61, 0.82) !important;
  box-shadow: inset 0 0 0 1px rgba(103, 232, 249, 0.08), 0 18px 32px -28px rgba(103, 232, 249, 0.86) !important;
}

.imperial-command-skin :where(input, textarea, select, .form-control, .form-select, .command-input, .command-select, .liquid-input, .discord-sidebar-search-input),
.imperial-command-skin .panel-notification-dropdown input,
.imperial-command-skin #quickSearch {
  border-color: rgba(103, 232, 249, 0.24) !important;
  border-radius: var(--itg-radius-sm) !important;
  background: rgba(3, 10, 19, 0.72) !important;
  color: #e6fbff !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035) !important;
}

.imperial-command-skin :where(input, textarea, select, .form-control, .form-select, .command-input, .command-select, .liquid-input, .discord-sidebar-search-input):focus,
.imperial-command-skin #quickSearch:focus {
  border-color: var(--itg-border-strong) !important;
  outline: 2px solid rgba(103, 232, 249, 0.16) !important;
  outline-offset: 1px;
  box-shadow: 0 0 0 4px rgba(103, 232, 249, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.035) !important;
}

.imperial-command-skin :where(button, .btn, .command-button, .liquid-button, .applications-action-button),
.imperial-command-skin a[class*="button"],
.imperial-command-skin .dashboard-command-panel-head > a {
  border-radius: var(--itg-radius-sm) !important;
}

.imperial-command-skin :where(.table-shell, .liquid-table-shell) table,
.imperial-command-skin table {
  color: var(--itg-copy);
}

.imperial-command-skin :where(.table-shell thead, .liquid-table-head, .liquid-table-shell th),
.imperial-command-skin table thead {
  background: rgba(103, 232, 249, 0.09) !important;
  color: #b9f6ff !important;
}

.imperial-command-skin :where(.table-shell tbody tr, .liquid-table-shell tbody tr) {
  border-color: rgba(103, 232, 249, 0.09) !important;
}

.imperial-command-skin :where(.table-shell tbody tr:hover, .liquid-table-shell tbody tr:hover) {
  background: rgba(103, 232, 249, 0.055) !important;
}

.imperial-command-skin :where(.badge, [class*="badge"], .panel-theme-chip-badge) {
  border-radius: 999px !important;
}

.imperial-command-skin .panel-theme-chip.is-active {
  border-color: var(--itg-border-strong) !important;
  background: rgba(103, 232, 249, 0.13) !important;
  box-shadow: inset 0 0 0 1px rgba(103, 232, 249, 0.1), 0 0 22px -16px rgba(103, 232, 249, 0.95) !important;
}

.imperial-command-skin #quickSwitcher {
  background: rgba(1, 6, 12, 0.74) !important;
  backdrop-filter: blur(12px);
}

.imperial-command-skin #quickResults > * {
  border-radius: var(--itg-radius-sm) !important;
}

.imperial-command-skin .panel-notification-dropdown {
  background:
    linear-gradient(180deg, rgba(103, 232, 249, 0.09), transparent 28%),
    rgba(4, 13, 24, 0.96) !important;
}

.imperial-command-skin .discord-shell {
  background:
    linear-gradient(rgba(103, 232, 249, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(103, 232, 249, 0.026) 1px, transparent 1px),
    #03070d !important;
  background-size: 42px 42px, 42px 42px, auto !important;
}

.imperial-command-skin :where(.discord-regiment-bar, .discord-channel-list, .discord-main-header, .discord-members-panel, .discord-sidebar-footer) {
  border-color: var(--itg-border) !important;
  background: rgba(6, 18, 31, 0.92) !important;
}

.imperial-command-skin .discord-channel-row.is-active,
.imperial-command-skin .discord-channel-row:hover {
  border-color: var(--itg-border-strong) !important;
  background: rgba(103, 232, 249, 0.11) !important;
  color: #ecfeff !important;
}

.imperial-command-skin .dashboard-ranked-list .dashboard-ranked-row:nth-of-type(n+4),
.imperial-command-skin .dashboard-feed-list .dashboard-feed-row:nth-of-type(n+4) {
  display: flex !important;
}

body.imperial-command-skin :where(.panel-main, .panel-sidebar nav, .table-shell, .liquid-table-shell, .applications-expanded-body, .command-select-menu, .discord-channel-scroll, .discord-user-scroll, #quickResults, #globalPlayerResults) {
  scrollbar-width: thin !important;
  scrollbar-color: rgba(103, 232, 249, 0.34) rgba(3, 10, 19, 0.42) !important;
}

body.imperial-command-skin :where(.panel-main, .panel-sidebar nav, .table-shell, .liquid-table-shell, .applications-expanded-body, .command-select-menu, .discord-channel-scroll, .discord-user-scroll, #quickResults, #globalPlayerResults)::-webkit-scrollbar {
  display: block !important;
  width: 9px !important;
  height: 9px !important;
  background: rgba(3, 10, 19, 0.42) !important;
}

body.imperial-command-skin :where(.panel-main, .panel-sidebar nav, .table-shell, .liquid-table-shell, .applications-expanded-body, .command-select-menu, .discord-channel-scroll, .discord-user-scroll, #quickResults, #globalPlayerResults)::-webkit-scrollbar-thumb {
  border: 2px solid rgba(3, 10, 19, 0.42) !important;
  border-radius: 999px;
  background: rgba(103, 232, 249, 0.34) !important;
}

@media (min-width: 1024px) {
  body.imperial-command-skin .panel-app-shell {
    background:
      linear-gradient(90deg, rgba(103, 232, 249, 0.07), transparent 18rem),
      transparent !important;
  }

  body.imperial-command-skin .command-page {
    background:
      linear-gradient(180deg, rgba(103, 232, 249, 0.035), transparent 18rem),
      rgba(3, 10, 19, 0.18) !important;
  }
}

@media (max-width: 1023px) {
  .imperial-command-skin .panel-sidebar {
    border-radius: var(--itg-radius) !important;
  }

  .imperial-command-skin .panel-topbar {
    border-radius: var(--itg-radius) !important;
  }
}

/* Imperial Tactical Glass Layout Pass */
.imperial-command-skin .itg-command-board {
  width: 100%;
  max-width: none !important;
  margin: 0 !important;
  display: grid;
  gap: 0.75rem;
  color: var(--itg-copy);
}

.imperial-command-skin .itg-command-header {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 5.1rem;
  border: 1px solid var(--itg-border);
  border-radius: var(--itg-radius);
  background:
    linear-gradient(90deg, rgba(103, 232, 249, 0.12), transparent 44%),
    linear-gradient(180deg, rgba(12, 30, 50, 0.94), rgba(4, 13, 24, 0.84));
  box-shadow: var(--itg-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.055);
  padding: 0.85rem 1rem;
}

.imperial-command-skin .itg-command-header::before,
.imperial-command-skin .itg-glass-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(103, 232, 249, 0.16) 1px, transparent 1px),
    linear-gradient(rgba(103, 232, 249, 0.11) 1px, transparent 1px);
  background-size: 34px 34px;
  opacity: 0.16;
}

.imperial-command-skin .itg-command-title {
  position: relative;
  z-index: 1;
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.85rem;
}

.imperial-command-skin .itg-command-mark {
  width: 3.75rem;
  height: 3.75rem;
  flex: 0 0 auto;
  border-radius: 999px;
  border: 1px solid var(--itg-border-strong);
  background: rgba(1, 7, 14, 0.72);
  object-fit: contain;
  padding: 0.45rem;
  box-shadow: 0 0 30px -14px rgba(103, 232, 249, 0.9);
}

.imperial-command-skin .itg-command-title h1 {
  margin: 0;
  color: #ecfeff;
  font-size: clamp(1.25rem, 1.8vw, 2.1rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
}

.imperial-command-skin .itg-command-title p {
  margin: 0.3rem 0 0;
  max-width: 52rem;
  color: var(--itg-muted);
  font-size: 0.82rem;
}

.imperial-command-skin .itg-command-header-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

.imperial-command-skin .itg-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid rgba(52, 211, 153, 0.36);
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.08);
  color: #bbf7d0;
  padding: 0.38rem 0.62rem;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.imperial-command-skin .itg-status-pill i {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: var(--itg-green);
  box-shadow: 0 0 14px rgba(52, 211, 153, 0.9);
}

.imperial-command-skin .itg-metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.65rem;
}

.imperial-command-skin .itg-metric-grid article,
.imperial-command-skin .itg-glass-panel,
.imperial-command-skin .itg-quick-dock {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--itg-border);
  border-radius: var(--itg-radius);
  background:
    linear-gradient(180deg, rgba(103, 232, 249, 0.07), transparent 38%),
    linear-gradient(145deg, rgba(9, 27, 44, 0.9), rgba(3, 11, 21, 0.78));
  box-shadow: var(--itg-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(16px) saturate(132%);
}

.imperial-command-skin .itg-metric-grid article {
  min-height: 5.2rem;
  padding: 0.75rem;
}

.imperial-command-skin .itg-metric-grid article::after,
.imperial-command-skin .itg-glass-panel::after {
  content: "";
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  width: 2rem;
  height: 1rem;
  border-top: 1px solid rgba(103, 232, 249, 0.5);
  border-right: 1px solid rgba(103, 232, 249, 0.5);
  opacity: 0.7;
}

.imperial-command-skin .itg-metric-grid span,
.imperial-command-skin .itg-metric-grid small {
  display: block;
  position: relative;
  z-index: 1;
  color: var(--itg-muted);
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.imperial-command-skin .itg-metric-grid strong {
  display: block;
  position: relative;
  z-index: 1;
  margin: 0.25rem 0;
  color: #ecfeff;
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-size: clamp(1.35rem, 2vw, 1.9rem);
  line-height: 1;
}

.imperial-command-skin .itg-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(22rem, 1.25fr) minmax(18rem, 0.9fr) minmax(16rem, 0.75fr);
  grid-auto-flow: dense;
  gap: 0.75rem;
  align-items: stretch;
}

.imperial-command-skin .itg-glass-panel {
  min-height: 0;
  padding: 0.82rem;
}

.imperial-command-skin .itg-regiment-tree {
  grid-row: span 2;
}

.imperial-command-skin .itg-side-stack {
  display: grid;
  gap: 0.75rem;
}

.imperial-command-skin .itg-watchlist {
  min-height: 15rem;
}

.imperial-command-skin .itg-panel-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.imperial-command-skin .itg-panel-head h2 {
  margin: 0.14rem 0 0;
  color: #ecfeff;
  font-size: 0.98rem;
  font-weight: 900;
  letter-spacing: 0;
}

.imperial-command-skin .itg-panel-head a {
  flex: 0 0 auto;
  border: 1px solid rgba(103, 232, 249, 0.28);
  border-radius: 999px;
  background: rgba(103, 232, 249, 0.08);
  color: #a5f3fc;
  padding: 0.24rem 0.5rem;
  font-size: 0.62rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.imperial-command-skin .itg-tree-list,
.imperial-command-skin .itg-signal-list,
.imperial-command-skin .itg-data-list,
.imperial-command-skin .itg-server-readout,
.imperial-command-skin .itg-action-grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.42rem;
}

.imperial-command-skin .itg-tree-row,
.imperial-command-skin .itg-signal-list a,
.imperial-command-skin .itg-data-row,
.imperial-command-skin .itg-action-grid a,
.imperial-command-skin .itg-server-readout div,
.imperial-command-skin .itg-watch-grid div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  border: 1px solid rgba(103, 232, 249, 0.14);
  border-radius: var(--itg-radius-sm);
  background: rgba(3, 11, 21, 0.52);
  color: var(--itg-copy);
  padding: 0.52rem 0.6rem;
}

.imperial-command-skin .itg-tree-row {
  justify-content: flex-start;
  border-left-color: color-mix(in oklab, var(--regiment-color, var(--itg-cyan)) 70%, transparent);
  border-left-width: 3px;
}

.imperial-command-skin .itg-tree-row:hover,
.imperial-command-skin .itg-signal-list a:hover,
.imperial-command-skin .itg-data-row:hover,
.imperial-command-skin .itg-action-grid a:hover {
  border-color: var(--itg-border-strong);
  background: rgba(12, 37, 58, 0.86);
  box-shadow: inset 0 0 0 1px rgba(103, 232, 249, 0.08), 0 14px 26px -24px rgba(103, 232, 249, 0.85);
}

.imperial-command-skin .itg-tree-node {
  display: grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgba(103, 232, 249, 0.12);
  color: var(--itg-cyan);
  font-size: 0.68rem;
  font-weight: 900;
}

.imperial-command-skin :where(.itg-tree-row, .itg-data-row) span:not(.itg-tree-node) {
  min-width: 0;
  display: grid;
  gap: 0.1rem;
}

.imperial-command-skin :where(.itg-tree-row, .itg-data-row, .itg-signal-list a, .itg-action-grid a) strong {
  color: #ecfeff;
  font-size: 0.78rem;
  line-height: 1.15;
}

.imperial-command-skin :where(.itg-tree-row, .itg-data-row) small,
.imperial-command-skin .itg-signal-list span,
.imperial-command-skin .itg-action-grid span,
.imperial-command-skin .itg-server-readout span,
.imperial-command-skin .itg-watch-grid span,
.imperial-command-skin .itg-watch-grid small {
  color: var(--itg-muted);
  font-size: 0.66rem;
  line-height: 1.15;
}

.imperial-command-skin :where(.itg-tree-row, .itg-data-row) em,
.imperial-command-skin .itg-signal-list strong,
.imperial-command-skin .itg-action-grid strong,
.imperial-command-skin .itg-server-readout strong,
.imperial-command-skin .itg-watch-grid strong {
  flex: 0 0 auto;
  color: #a7f3d0;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.imperial-command-skin .itg-watch-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}

.imperial-command-skin .itg-watch-grid div {
  display: grid;
  align-content: start;
}

.imperial-command-skin .itg-watch-grid strong {
  display: block;
  color: var(--itg-cyan);
  font-size: 1.35rem;
  line-height: 1;
}

.imperial-command-skin .itg-radar-lines {
  position: absolute;
  inset: auto 0.8rem 0.8rem auto;
  width: 7rem;
  height: 7rem;
  border: 1px solid rgba(103, 232, 249, 0.18);
  border-radius: 999px;
  opacity: 0.5;
}

.imperial-command-skin .itg-radar-lines span {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 50%;
  height: 1px;
  transform-origin: 0 0;
  background: rgba(103, 232, 249, 0.32);
}

.imperial-command-skin .itg-radar-lines span:nth-child(1) { transform: rotate(0deg); }
.imperial-command-skin .itg-radar-lines span:nth-child(2) { transform: rotate(45deg); }
.imperial-command-skin .itg-radar-lines span:nth-child(3) { transform: rotate(90deg); }
.imperial-command-skin .itg-radar-lines span:nth-child(4) { transform: rotate(135deg); }

.imperial-command-skin .itg-quick-dock {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
  padding: 0.65rem;
}

.imperial-command-skin .itg-quick-dock a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.6rem;
  border: 1px solid rgba(103, 232, 249, 0.18);
  border-radius: var(--itg-radius-sm);
  background: rgba(3, 11, 21, 0.48);
  color: #dffbff;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.imperial-command-skin .itg-quick-dock a:hover {
  border-color: var(--itg-border-strong);
  background: rgba(12, 37, 58, 0.82);
}

@media (min-width: 1280px) {
  body.imperial-command-skin .command-page.itg-command-board {
    padding: 0.7rem;
  }
}

@media (max-width: 1380px) {
  .imperial-command-skin .itg-metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .imperial-command-skin .itg-dashboard-grid {
    grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.85fr);
  }

  .imperial-command-skin .itg-watchlist,
  .imperial-command-skin .itg-personnel-actions {
    grid-column: span 1;
  }
}

@media (max-width: 980px) {
  .imperial-command-skin .itg-command-header,
  .imperial-command-skin .itg-dashboard-grid,
  .imperial-command-skin .itg-quick-dock {
    grid-template-columns: 1fr;
  }

  .imperial-command-skin .itg-command-header {
    display: grid;
  }

  .imperial-command-skin .itg-metric-grid,
  .imperial-command-skin .itg-watch-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .imperial-command-skin .itg-command-title {
    align-items: flex-start;
  }

  .imperial-command-skin .itg-command-mark {
    width: 3rem;
    height: 3rem;
  }

  .imperial-command-skin .itg-metric-grid,
  .imperial-command-skin .itg-watch-grid {
    grid-template-columns: 1fr;
  }
}

/* Command OS Shell Massive Overhaul */
body.command-os-shell {
  --cos-bg: #02060b;
  --cos-bg-2: #06111d;
  --cos-panel: rgba(4, 15, 25, 0.88);
  --cos-panel-strong: rgba(6, 22, 35, 0.94);
  --cos-panel-soft: rgba(8, 30, 48, 0.62);
  --cos-line: rgba(103, 232, 249, 0.2);
  --cos-line-strong: rgba(103, 232, 249, 0.48);
  --cos-line-hot: rgba(34, 211, 238, 0.78);
  --cos-text: #e6fbff;
  --cos-muted: rgba(207, 244, 252, 0.64);
  --cos-dim: rgba(165, 214, 226, 0.46);
  --cos-cyan: #67e8f9;
  --cos-blue: #38bdf8;
  --cos-amber: #f8d982;
  --cos-danger: #fb7185;
  --cos-green: #86efac;
  --cos-shadow: 0 28px 95px rgba(0, 0, 0, 0.48);
  --cos-shadow-tight: 0 18px 54px rgba(0, 0, 0, 0.38);
  --cos-radius: 0.42rem;
  --cos-radius-sm: 0.24rem;
  background:
    linear-gradient(rgba(103, 232, 249, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(103, 232, 249, 0.045) 1px, transparent 1px),
    radial-gradient(circle at 80% 8%, rgba(34, 211, 238, 0.14), transparent 34rem),
    radial-gradient(circle at 6% 92%, rgba(248, 217, 130, 0.08), transparent 28rem),
    linear-gradient(135deg, #02060b 0%, #05111c 46%, #02060b 100%);
  background-size: 32px 32px, 32px 32px, auto, auto, auto;
  color: var(--cos-text);
}

body.command-os-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(103, 232, 249, 0.08), transparent 12%, transparent 88%, rgba(103, 232, 249, 0.08)),
    linear-gradient(180deg, rgba(2, 6, 11, 0.25), transparent 18%, rgba(2, 6, 11, 0.46));
}

body.command-os-shell::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 250;
  pointer-events: none;
  opacity: 0.09;
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.34) 0 1px, transparent 1px 4px);
  mix-blend-mode: screen;
}

body.command-os-shell .panel-ribbon-layer {
  opacity: 0.32;
  background:
    linear-gradient(120deg, transparent 0 44%, rgba(34, 211, 238, 0.12) 45%, transparent 47%),
    linear-gradient(60deg, transparent 0 58%, rgba(248, 217, 130, 0.08) 59%, transparent 61%);
}

body.command-os-shell .panel-grain-layer {
  opacity: 0.16;
}

body.command-os-shell .panel-app-shell {
  min-height: 100vh;
}

body.command-os-shell .cos-shell-sidebar {
  border: 1px solid var(--cos-line-strong);
  border-radius: var(--cos-radius);
  background:
    linear-gradient(180deg, rgba(3, 10, 18, 0.98), rgba(5, 18, 30, 0.94)),
    radial-gradient(circle at 50% 0%, rgba(34, 211, 238, 0.14), transparent 18rem);
  box-shadow: var(--cos-shadow), inset 1px 0 0 rgba(255, 255, 255, 0.06);
}

body.command-os-shell .cos-shell-sidebar::after {
  content: "";
  position: absolute;
  inset: 0.45rem;
  pointer-events: none;
  border: 1px solid rgba(103, 232, 249, 0.1);
  border-radius: calc(var(--cos-radius) - 0.08rem);
}

body.command-os-shell .panel-sidebar-command-head {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--cos-line);
  border-radius: var(--cos-radius-sm);
  background:
    linear-gradient(135deg, rgba(5, 18, 30, 0.94), rgba(9, 33, 51, 0.66)),
    linear-gradient(90deg, rgba(103, 232, 249, 0.08), transparent 34%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

body.command-os-shell .panel-sidebar-command-head::before {
  content: "COMMAND";
  position: absolute;
  top: 0.55rem;
  right: 0.6rem;
  color: rgba(103, 232, 249, 0.24);
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.18em;
}

body.command-os-shell .panel-sidebar-command-head img {
  border-radius: 0.32rem !important;
  border-color: rgba(103, 232, 249, 0.68) !important;
  box-shadow: 0 0 28px rgba(34, 211, 238, 0.22);
}

body.command-os-shell .panel-theme-dock {
  border: 1px solid rgba(103, 232, 249, 0.16);
  border-radius: var(--cos-radius-sm);
  background: rgba(1, 7, 13, 0.42);
}

body.command-os-shell .panel-theme-dock summary {
  min-height: 2.15rem;
}

body.command-os-shell .panel-nav-section-title {
  margin: 0.8rem 0 0.35rem;
  color: var(--cos-cyan);
  font-size: 0.58rem;
  font-weight: 950;
  letter-spacing: 0.2em;
  opacity: 0.85;
}

body.command-os-shell .panel-nav-item,
body.command-os-shell .panel-regiment-summary,
body.command-os-shell .panel-regiment-link,
body.command-os-shell .panel-quick-item {
  min-height: 2.2rem;
  border: 1px solid rgba(103, 232, 249, 0.12);
  border-radius: var(--cos-radius-sm);
  background: linear-gradient(90deg, rgba(8, 27, 43, 0.56), rgba(4, 13, 23, 0.34));
  color: var(--cos-muted);
  font-size: 0.79rem;
  font-weight: 800;
  letter-spacing: 0.015em;
}

body.command-os-shell .panel-nav-item svg,
body.command-os-shell .panel-regiment-summary svg,
body.command-os-shell .panel-regiment-link svg,
body.command-os-shell .panel-quick-item svg {
  color: var(--cos-cyan);
  filter: drop-shadow(0 0 8px rgba(34, 211, 238, 0.28));
}

body.command-os-shell .panel-nav-item:hover,
body.command-os-shell .panel-nav-item.is-active,
body.command-os-shell .panel-regiment-link:hover,
body.command-os-shell .panel-regiment-link.is-active,
body.command-os-shell .panel-quick-item:hover {
  border-color: var(--cos-line-hot);
  background:
    linear-gradient(90deg, rgba(8, 145, 178, 0.28), rgba(7, 20, 34, 0.78)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent);
  color: var(--cos-text);
  box-shadow: inset 3px 0 0 var(--cos-cyan), 0 0 26px rgba(34, 211, 238, 0.12);
}

body.command-os-shell .panel-regiment-item {
  border-color: rgba(103, 232, 249, 0.14) !important;
  border-radius: var(--cos-radius-sm) !important;
  background: rgba(3, 11, 20, 0.56) !important;
}

body.command-os-shell .panel-command-status-card {
  border: 1px solid rgba(134, 239, 172, 0.26);
  border-radius: var(--cos-radius-sm);
  background:
    linear-gradient(135deg, rgba(7, 24, 20, 0.86), rgba(4, 14, 22, 0.8)),
    linear-gradient(90deg, rgba(134, 239, 172, 0.12), transparent 44%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body.command-os-shell .cos-shell-topbar {
  margin: 0.75rem 0.75rem 0;
  border: 1px solid var(--cos-line-strong);
  border-radius: var(--cos-radius);
  background:
    linear-gradient(90deg, rgba(4, 13, 23, 0.96), rgba(7, 25, 39, 0.88)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent);
  box-shadow: var(--cos-shadow-tight);
}

body.command-os-shell .panel-topbar-grid {
  min-height: 4.15rem;
  padding-top: 0.72rem !important;
  padding-bottom: 0.72rem !important;
}

body.command-os-shell .panel-topbar-primary h1 {
  font-size: clamp(1rem, 1.4vw, 1.32rem);
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

body.command-os-shell .panel-fast-mode-chip,
body.command-os-shell .liquid-badge,
body.command-os-shell [class*="badge"] {
  border-radius: 999px;
  border-color: rgba(103, 232, 249, 0.28);
  background: rgba(5, 18, 30, 0.72);
  color: var(--cos-cyan);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

body.command-os-shell .profile-trigger img {
  border: 1px solid rgba(103, 232, 249, 0.42);
  border-radius: var(--cos-radius-sm) !important;
}

body.command-os-shell .cos-shell-main {
  padding: 1rem !important;
  scrollbar-color: rgba(103, 232, 249, 0.4) rgba(3, 9, 15, 0.82);
}

body.command-os-shell .panel-main-inner {
  max-width: min(100%, 118rem);
}

body.command-os-shell .cos-global-surface,
body.command-os-shell :where(.panel-surface, .panel-section-shell, .panel-stat, .liquid-panel, .liquid-surface, .liquid-table-shell, .command-surface, .command-row, .empty-state, .applications-shell-card, .applications-template-card, .applications-review-card, .applications-case-card, .applications-detail-card, .applications-stat-card, .applications-score-panel, .discord-shell-card, .command-center-card, .stats-surface, .panel-notification-dropdown, .notification-item, .dashboard-legacy-modules) {
  border-color: var(--cos-line) !important;
  border-radius: var(--cos-radius) !important;
  background:
    linear-gradient(180deg, var(--cos-panel), rgba(3, 11, 20, 0.78)),
    linear-gradient(90deg, rgba(103, 232, 249, 0.055), transparent 32%);
  box-shadow: var(--cos-shadow-tight), inset 0 1px 0 rgba(255, 255, 255, 0.055);
  backdrop-filter: blur(18px) saturate(145%);
}

body.command-os-shell :where(.panel-section-shell, .liquid-panel, .liquid-surface, .command-surface, .dashboard-legacy-modules, .applications-shell-card, .applications-template-card, .applications-review-card, .applications-case-card, .discord-shell-card)::before {
  opacity: 0.62;
}

body.command-os-shell :where(.panel-kicker, .applications-kicker, .applications-section-kicker, .applications-card-kicker, .applications-detail-label, .panel-stat-label) {
  color: var(--cos-cyan) !important;
  font-size: 0.66rem;
  font-weight: 950;
  letter-spacing: 0.18em;
}

body.command-os-shell :where(h1, h2, h3, .applications-title, .applications-section-title, .applications-card-title, .panel-stat-value) {
  color: var(--cos-text) !important;
  letter-spacing: 0;
}

body.command-os-shell :where(p, small, .panel-muted-copy, .text-\[hsl\(var\(--muted-foreground\)\)\], .applications-detail-muted, .applications-subtitle, .applications-section-copy) {
  color: var(--cos-muted);
}

body.command-os-shell .command-page {
  gap: 0.85rem;
}

body.command-os-shell .cos-command-stage {
  position: relative;
  display: grid;
  gap: 0.85rem;
  padding: 0.65rem;
  border: 1px solid rgba(103, 232, 249, 0.14);
  border-radius: var(--cos-radius);
  background:
    linear-gradient(rgba(103, 232, 249, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(103, 232, 249, 0.035) 1px, transparent 1px);
  background-size: 26px 26px;
}

body.command-os-shell .cos-command-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(90deg, rgba(103, 232, 249, 0.14), transparent 18%, transparent 82%, rgba(103, 232, 249, 0.14)),
    linear-gradient(180deg, rgba(103, 232, 249, 0.08), transparent 18%);
  opacity: 0.72;
}

body.command-os-shell .cos-command-stage > * {
  position: relative;
  z-index: 1;
}

body.command-os-shell .itg-command-header {
  min-height: 13rem;
  border-color: var(--cos-line-strong);
  background:
    linear-gradient(120deg, rgba(5, 18, 30, 0.95), rgba(8, 31, 49, 0.72)),
    radial-gradient(circle at 88% 20%, rgba(34, 211, 238, 0.18), transparent 22rem);
}

body.command-os-shell .itg-command-title h1 {
  max-width: 18ch;
  font-size: clamp(2.35rem, 4.8vw, 5.8rem);
  line-height: 0.92;
  text-transform: uppercase;
  text-shadow: 0 0 32px rgba(34, 211, 238, 0.18);
}

body.command-os-shell .itg-command-title p {
  max-width: 58rem;
  font-size: 0.98rem;
}

body.command-os-shell .itg-command-mark {
  width: clamp(4rem, 7vw, 7rem);
  height: clamp(4rem, 7vw, 7rem);
  border-radius: var(--cos-radius);
}

body.command-os-shell .cos-status-spine {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.72rem;
}

body.command-os-shell .cos-status-spine article {
  position: relative;
  min-height: 6.8rem;
  padding: 0.9rem;
  overflow: hidden;
  border: 1px solid rgba(103, 232, 249, 0.2);
  border-radius: var(--cos-radius-sm);
  background:
    linear-gradient(135deg, rgba(6, 22, 35, 0.9), rgba(3, 10, 18, 0.82)),
    linear-gradient(90deg, rgba(34, 211, 238, 0.08), transparent);
}

body.command-os-shell .cos-status-spine article::after {
  content: "";
  position: absolute;
  right: -1rem;
  bottom: -1.4rem;
  width: 5rem;
  height: 5rem;
  border: 1px solid rgba(103, 232, 249, 0.18);
  border-radius: 50%;
}

body.command-os-shell .cos-status-spine span,
body.command-os-shell .cos-status-spine small {
  display: block;
  color: var(--cos-muted);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

body.command-os-shell .cos-status-spine strong {
  display: block;
  margin: 0.3rem 0;
  color: var(--cos-text);
  font-size: clamp(1.1rem, 1.7vw, 1.7rem);
  font-weight: 950;
  line-height: 1.05;
}

body.command-os-shell .itg-metric-grid article,
body.command-os-shell .itg-glass-panel,
body.command-os-shell .itg-quick-dock {
  border-color: var(--cos-line);
  border-radius: var(--cos-radius-sm);
  background:
    linear-gradient(180deg, rgba(6, 22, 35, 0.9), rgba(3, 10, 18, 0.82)),
    linear-gradient(90deg, rgba(103, 232, 249, 0.065), transparent 46%);
  box-shadow: var(--cos-shadow-tight), inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

body.command-os-shell .itg-metric-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

body.command-os-shell .itg-metric-grid article {
  min-height: 7.4rem;
}

body.command-os-shell .itg-metric-grid strong {
  font-size: clamp(1.55rem, 2.1vw, 2.7rem);
  color: var(--cos-cyan);
}

body.command-os-shell .itg-dashboard-grid {
  grid-template-columns: minmax(20rem, 1.05fr) minmax(18rem, 0.72fr) minmax(19rem, 0.82fr);
  align-items: stretch;
}

body.command-os-shell .itg-regiment-tree {
  grid-row: span 2;
}

body.command-os-shell .itg-watchlist {
  grid-column: span 1;
}

body.command-os-shell .itg-personnel-actions {
  grid-column: span 1;
}

body.command-os-shell .itg-panel-head {
  min-height: 3.15rem;
  padding-bottom: 0.72rem;
  border-bottom: 1px solid rgba(103, 232, 249, 0.16);
}

body.command-os-shell .itg-panel-head a,
body.command-os-shell .dashboard-command-panel-head > a,
body.command-os-shell .command-action-bar a {
  border: 1px solid rgba(103, 232, 249, 0.22);
  border-radius: 999px;
  background: rgba(8, 27, 43, 0.7);
  padding: 0.38rem 0.68rem;
  color: var(--cos-cyan);
}

body.command-os-shell .itg-tree-row,
body.command-os-shell .itg-signal-list a,
body.command-os-shell .itg-data-row,
body.command-os-shell .itg-action-grid a,
body.command-os-shell .itg-server-readout div,
body.command-os-shell .itg-watch-grid div,
body.command-os-shell .dashboard-feed-row,
body.command-os-shell .dashboard-ranked-row,
body.command-os-shell .dashboard-task-list a,
body.command-os-shell .dashboard-status-list div,
body.command-os-shell .dashboard-command-metrics div,
body.command-os-shell .dashboard-progress-row {
  border-color: rgba(103, 232, 249, 0.16);
  border-radius: var(--cos-radius-sm);
  background:
    linear-gradient(90deg, rgba(10, 37, 58, 0.5), rgba(3, 11, 20, 0.48)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent);
}

body.command-os-shell .itg-tree-row:hover,
body.command-os-shell .itg-signal-list a:hover,
body.command-os-shell .itg-data-row:hover,
body.command-os-shell .itg-action-grid a:hover,
body.command-os-shell .dashboard-feed-row:hover,
body.command-os-shell .dashboard-ranked-row:hover,
body.command-os-shell .dashboard-task-list a:hover {
  border-color: var(--cos-line-hot);
  background:
    linear-gradient(90deg, rgba(8, 145, 178, 0.22), rgba(3, 11, 20, 0.64)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent);
}

body.command-os-shell .cos-command-rail {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 0.65rem;
}

body.command-os-shell .cos-command-rail a {
  min-height: 3.4rem;
  border-color: rgba(103, 232, 249, 0.22);
  background:
    linear-gradient(135deg, rgba(8, 145, 178, 0.2), rgba(3, 11, 20, 0.76)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent);
}

body.command-os-shell .cos-table-system,
body.command-os-shell :where(.table-shell, .liquid-table-shell) {
  overflow: hidden;
  border: 1px solid var(--cos-line) !important;
  border-radius: var(--cos-radius) !important;
  background: rgba(3, 11, 20, 0.78) !important;
}

body.command-os-shell :where(table, .liquid-table-shell table) {
  border-collapse: separate;
  border-spacing: 0;
}

body.command-os-shell :where(thead, .liquid-table-head, .table-shell thead, .liquid-table-shell th) {
  background: rgba(8, 27, 43, 0.92) !important;
  color: var(--cos-cyan) !important;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

body.command-os-shell :where(tbody tr, .liquid-table-shell tbody tr) {
  border-color: rgba(103, 232, 249, 0.12) !important;
}

body.command-os-shell :where(tbody tr:hover, .liquid-table-shell tbody tr:hover) {
  background: rgba(8, 145, 178, 0.12) !important;
}

body.command-os-shell .cos-form-system,
body.command-os-shell :where(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), textarea, select, .liquid-input, .form-control, .form-select, .command-select-trigger, .discord-sidebar-search-input) {
  min-height: 2.45rem;
  border: 1px solid rgba(103, 232, 249, 0.22) !important;
  border-radius: var(--cos-radius-sm) !important;
  background: rgba(2, 8, 14, 0.72) !important;
  color: var(--cos-text) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body.command-os-shell :where(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), textarea, select, .liquid-input, .form-control, .form-select, .command-select-trigger, .discord-sidebar-search-input):focus {
  border-color: var(--cos-line-hot) !important;
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}

body.command-os-shell :where(input::placeholder, textarea::placeholder) {
  color: rgba(207, 244, 252, 0.38);
}

body.command-os-shell :where(.command-btn, .liquid-button, button, .applications-primary-action, .applications-secondary-action, .applications-filter-button, .applications-command-link, .applications-mini-action, .discord-control-btn, .discord-plus-btn) {
  border-radius: var(--cos-radius-sm);
  letter-spacing: 0.02em;
}

body.command-os-shell :where(.command-btn-primary, .liquid-button-primary, .applications-primary-action) {
  border-color: rgba(34, 211, 238, 0.52) !important;
  background:
    linear-gradient(135deg, rgba(8, 145, 178, 0.95), rgba(14, 116, 144, 0.74)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent) !important;
  color: #eaffff !important;
  box-shadow: 0 18px 44px rgba(8, 145, 178, 0.26);
}

body.command-os-shell :where(.command-btn-outline, .liquid-button-outline, .command-btn-secondary, .liquid-button-secondary, .applications-secondary-action) {
  border-color: rgba(103, 232, 249, 0.25) !important;
  background: rgba(5, 18, 30, 0.78) !important;
}

body.command-os-shell .cos-modal-system,
body.command-os-shell :where(.command-modal, #quickSwitcher > div, .panel-notification-dropdown, .command-select-menu, #globalPlayerResults, #quickResults) {
  border: 1px solid var(--cos-line-strong) !important;
  border-radius: var(--cos-radius) !important;
  background:
    linear-gradient(180deg, rgba(4, 15, 25, 0.98), rgba(3, 10, 18, 0.94)),
    linear-gradient(90deg, rgba(103, 232, 249, 0.08), transparent 42%) !important;
  box-shadow: var(--cos-shadow) !important;
}

body.command-os-shell .panel-notification-backdrop,
body.command-os-shell #sidebarBackdrop {
  background: rgba(1, 5, 10, 0.64);
  backdrop-filter: blur(7px);
}

body.command-os-shell .dashboard-legacy-modules summary {
  border-color: rgba(103, 232, 249, 0.18);
  background: rgba(3, 11, 20, 0.68);
}

body.command-os-shell .dashboard-legacy-modules-body {
  padding-top: 1rem;
}

body.command-os-shell :where(.panel-main, .panel-sidebar nav, .table-shell, .liquid-table-shell, .applications-expanded-body, .command-select-menu, .discord-channel-scroll, .discord-user-scroll, #quickResults, #globalPlayerResults)::-webkit-scrollbar {
  width: 0.56rem;
  height: 0.56rem;
}

body.command-os-shell :where(.panel-main, .panel-sidebar nav, .table-shell, .liquid-table-shell, .applications-expanded-body, .command-select-menu, .discord-channel-scroll, .discord-user-scroll, #quickResults, #globalPlayerResults)::-webkit-scrollbar-track {
  background: rgba(2, 8, 14, 0.82);
}

body.command-os-shell :where(.panel-main, .panel-sidebar nav, .table-shell, .liquid-table-shell, .applications-expanded-body, .command-select-menu, .discord-channel-scroll, .discord-user-scroll, #quickResults, #globalPlayerResults)::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(103, 232, 249, 0.48), rgba(14, 116, 144, 0.54));
}

@media (min-width: 1280px) {
  body.command-os-shell .panel-app-main {
    padding-left: 21.25rem;
  }

  body.command-os-shell .cos-shell-sidebar {
    transform: translateX(0) !important;
  }

  body.command-os-shell #hoverZone,
  body.command-os-shell #sidebarBackdrop {
    display: none !important;
  }
}

@media (max-width: 1480px) {
  body.command-os-shell .itg-metric-grid,
  body.command-os-shell .cos-status-spine {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body.command-os-shell .itg-dashboard-grid {
    grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.82fr);
  }
}

@media (max-width: 1080px) {
  body.command-os-shell .itg-command-header,
  body.command-os-shell .itg-dashboard-grid,
  body.command-os-shell .cos-command-rail {
    grid-template-columns: 1fr;
  }

  body.command-os-shell .itg-metric-grid,
  body.command-os-shell .cos-status-spine,
  body.command-os-shell .itg-watch-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  body.command-os-shell .cos-shell-main {
    padding: 0.72rem !important;
  }

  body.command-os-shell .itg-command-title {
    grid-template-columns: 1fr;
  }

  body.command-os-shell .itg-command-title h1 {
    font-size: clamp(2rem, 14vw, 3.4rem);
  }

  body.command-os-shell .itg-metric-grid,
  body.command-os-shell .cos-status-spine,
  body.command-os-shell .itg-watch-grid {
    grid-template-columns: 1fr;
  }

  body.command-os-shell .panel-topbar-grid,
  body.command-os-shell .panel-topbar-actions {
    align-items: stretch;
  }
}

/* Command OS Shell Regression Fixes */
body.command-os-shell {
  --cos-bg: hsl(var(--background));
  --cos-bg-2: color-mix(in oklab, hsl(var(--background)) 78%, hsl(var(--card)) 22%);
  --cos-panel: hsl(var(--card) / 0.88);
  --cos-panel-strong: hsl(var(--card) / 0.95);
  --cos-panel-soft: hsl(var(--card) / 0.62);
  --cos-line: hsl(var(--accent) / 0.22);
  --cos-line-strong: hsl(var(--accent) / 0.5);
  --cos-line-hot: hsl(var(--primary) / 0.86);
  --cos-text: hsl(var(--foreground));
  --cos-muted: hsl(var(--muted-foreground) / 0.86);
  --cos-dim: hsl(var(--muted-foreground) / 0.58);
  --cos-cyan: hsl(var(--accent));
  --cos-blue: hsl(var(--primary));
  --cos-amber: hsl(var(--warning));
  --cos-danger: hsl(var(--destructive));
  --cos-green: hsl(var(--success));
  background:
    linear-gradient(hsl(var(--accent) / 0.045) 1px, transparent 1px),
    linear-gradient(90deg, hsl(var(--accent) / 0.045) 1px, transparent 1px),
    radial-gradient(circle at 80% 8%, hsl(var(--primary) / 0.14), transparent 34rem),
    radial-gradient(circle at 6% 92%, hsl(var(--warning) / 0.08), transparent 28rem),
    linear-gradient(135deg, hsl(var(--background)) 0%, color-mix(in oklab, hsl(var(--background)) 84%, hsl(var(--accent)) 16%) 46%, hsl(var(--background)) 100%);
  background-size: 32px 32px, 32px 32px, auto, auto, auto;
}

body.command-os-shell .panel-ribbon-layer {
  background:
    linear-gradient(120deg, transparent 0 44%, hsl(var(--accent) / 0.13) 45%, transparent 47%),
    linear-gradient(60deg, transparent 0 58%, hsl(var(--warning) / 0.08) 59%, transparent 61%);
}

body.command-os-shell .cos-shell-sidebar,
body.command-os-shell .cos-shell-topbar,
body.command-os-shell .itg-command-header,
body.command-os-shell .itg-metric-grid article,
body.command-os-shell .itg-glass-panel,
body.command-os-shell .itg-quick-dock,
body.command-os-shell .cos-status-spine article {
  border-color: var(--cos-line-strong);
}

body.command-os-shell .cos-shell-sidebar {
  background:
    linear-gradient(180deg, color-mix(in oklab, hsl(var(--background)) 92%, black 8%), color-mix(in oklab, hsl(var(--card)) 88%, hsl(var(--background)) 12%)),
    radial-gradient(circle at 50% 0%, hsl(var(--primary) / 0.15), transparent 18rem);
}

body.command-os-shell .cos-shell-topbar,
body.command-os-shell .itg-command-header {
  background:
    linear-gradient(90deg, hsl(var(--card) / 0.92), color-mix(in oklab, hsl(var(--card)) 76%, hsl(var(--accent)) 24%)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), transparent);
}

body.command-os-shell .itg-command-title h1,
body.command-os-shell .itg-metric-grid strong,
body.command-os-shell .cos-status-spine strong,
body.command-os-shell :where(.panel-nav-item svg, .panel-regiment-summary svg, .panel-regiment-link svg, .panel-quick-item svg) {
  color: var(--cos-cyan);
}

body.command-os-shell .cos-legal-footer {
  flex: 0 0 auto;
  margin: 0.85rem 0 0 !important;
  border: 1px solid hsl(var(--accent) / 0.16);
  border-radius: var(--cos-radius-sm);
  background: hsl(var(--background) / 0.42);
}

body.command-os-shell .panel-main-inner > .cos-legal-footer {
  display: block;
}

@media (min-width: 1280px) {
  body.command-os-shell .cos-shell-sidebar {
    left: 0.35rem !important;
    width: 19.8rem !important;
  }

  body.command-os-shell .panel-app-main {
    padding-left: 20.15rem;
  }

  body.command-os-shell .cos-shell-topbar {
    margin-left: 0 !important;
  }

  body.command-os-shell .cos-shell-main {
    padding: 0.5rem 0.65rem 0.65rem 0.45rem !important;
  }

  body.command-os-shell .panel-main-inner {
    width: 100%;
    max-width: none !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
  }
}

/* Command OS Shell Theme Saturation Pass */
body.command-os-shell {
  --itg-cyan: hsl(var(--accent));
  --itg-blue: hsl(var(--primary));
  --itg-purple: color-mix(in oklab, hsl(var(--primary)) 72%, hsl(var(--accent)) 28%);
  --itg-border: hsl(var(--accent) / 0.2);
  --itg-border-strong: hsl(var(--accent) / 0.48);
  --itg-glow: hsl(var(--primary) / 0.2);
  --command-cyan: hsl(var(--accent));
  --command-blue: hsl(var(--primary));
  --command-gold: hsl(var(--accent));
  --command-gold-bright: color-mix(in oklab, hsl(var(--accent)) 74%, hsl(var(--foreground)) 26%);
  --command-gold-soft: hsl(var(--accent) / 0.14);
  --command-line: hsl(var(--accent) / 0.24);
  --command-line-strong: hsl(var(--accent) / 0.52);
  --command-green: hsl(var(--success));
  --command-blue: hsl(var(--primary));
  --applications-cyan: hsl(var(--accent));
  --applications-blue: hsl(var(--primary));
  --cos-bg: hsl(var(--background));
  --cos-panel: hsl(var(--card) / 0.88);
  --cos-panel-strong: hsl(var(--card) / 0.96);
  --cos-panel-soft: hsl(var(--card) / 0.6);
  --cos-line: hsl(var(--accent) / 0.22);
  --cos-line-strong: hsl(var(--accent) / 0.5);
  --cos-line-hot: hsl(var(--primary) / 0.88);
  --cos-cyan: hsl(var(--accent));
  --cos-blue: hsl(var(--primary));
  --cos-amber: hsl(var(--warning));
  --cos-green: hsl(var(--success));
  scrollbar-color: hsl(var(--accent) / 0.48) hsl(var(--background) / 0.85);
}

body.command-os-shell :where(.text-cyan-50, .text-cyan-100, .text-cyan-200, .text-cyan-300, .text-cyan-400, [class*="text-cyan-"]),
html[data-theme] body.command-os-shell :where(.text-cyan-50, .text-cyan-100, .text-cyan-200, .text-cyan-300, .text-cyan-400, [class*="text-cyan-"]) {
  color: hsl(var(--accent)) !important;
}

body.command-os-shell :where(.text-blue-50, .text-blue-100, .text-blue-200, .text-blue-300, .text-blue-400, [class*="text-blue-"]),
html[data-theme] body.command-os-shell :where(.text-blue-50, .text-blue-100, .text-blue-200, .text-blue-300, .text-blue-400, [class*="text-blue-"]) {
  color: hsl(var(--primary)) !important;
}

body.command-os-shell :where(.text-amber-50, .text-amber-100, .text-amber-200, .text-amber-300, .text-amber-400, [class*="text-amber-"]),
html[data-theme] body.command-os-shell :where(.text-amber-50, .text-amber-100, .text-amber-200, .text-amber-300, .text-amber-400, [class*="text-amber-"]) {
  color: hsl(var(--warning)) !important;
}

body.command-os-shell [class*="border-cyan-"],
html[data-theme] body.command-os-shell [class*="border-cyan-"] {
  border-color: hsl(var(--accent) / 0.42) !important;
}

body.command-os-shell [class*="bg-cyan-"],
html[data-theme] body.command-os-shell [class*="bg-cyan-"] {
  background-color: hsl(var(--accent) / 0.14) !important;
}

body.command-os-shell [class*="ring-cyan-"],
html[data-theme] body.command-os-shell [class*="ring-cyan-"] {
  --tw-ring-color: hsl(var(--accent) / 0.42) !important;
}

body.command-os-shell [class*="from-cyan-"] {
  --tw-gradient-from: hsl(var(--accent)) var(--tw-gradient-from-position);
  --tw-gradient-to: hsl(var(--accent) / 0) var(--tw-gradient-to-position);
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}

body.command-os-shell [class*="via-cyan-"],
body.command-os-shell [class*="via-blue-"] {
  --tw-gradient-to: hsl(var(--primary) / 0) var(--tw-gradient-to-position);
  --tw-gradient-stops: var(--tw-gradient-from), color-mix(in oklab, hsl(var(--accent)) 50%, hsl(var(--primary)) 50%) var(--tw-gradient-via-position), var(--tw-gradient-to);
}

body.command-os-shell [class*="to-cyan-"],
body.command-os-shell [class*="to-blue-"] {
  --tw-gradient-to: hsl(var(--primary)) var(--tw-gradient-to-position);
}

body.command-os-shell .cos-shell-sidebar,
body.command-os-shell .cos-shell-topbar,
body.command-os-shell .cos-command-stage,
body.command-os-shell .itg-command-header,
body.command-os-shell .itg-metric-grid article,
body.command-os-shell .itg-glass-panel,
body.command-os-shell .itg-quick-dock,
body.command-os-shell .cos-status-spine article,
body.command-os-shell .panel-theme-dock,
body.command-os-shell .panel-sidebar-command-head,
body.command-os-shell :where(.panel-surface, .panel-section-shell, .panel-stat, .liquid-panel, .liquid-surface, .liquid-table-shell, .command-surface, .command-row, .empty-state, .applications-shell-card, .applications-template-card, .applications-review-card, .applications-case-card, .applications-detail-card, .applications-stat-card, .applications-score-panel, .discord-shell-card, .command-center-card, .stats-surface, .panel-notification-dropdown, .notification-item, .dashboard-legacy-modules) {
  border-color: hsl(var(--accent) / 0.34) !important;
  background:
    linear-gradient(180deg, hsl(var(--card) / 0.9), color-mix(in oklab, hsl(var(--background)) 80%, hsl(var(--card)) 20%)),
    linear-gradient(90deg, hsl(var(--accent) / 0.08), transparent 42%) !important;
  box-shadow:
    0 24px 70px -54px hsl(var(--primary) / 0.46),
    inset 0 1px 0 hsl(var(--foreground) / 0.06) !important;
}

body.command-os-shell .panel-ribbon-layer {
  background:
    linear-gradient(120deg, transparent 0 44%, hsl(var(--accent) / 0.14) 45%, transparent 47%),
    linear-gradient(60deg, transparent 0 58%, hsl(var(--primary) / 0.1) 59%, transparent 61%);
}

body.command-os-shell .cos-shell-sidebar {
  border-right: 1px solid hsl(var(--accent) / 0.34);
  background:
    radial-gradient(circle at 50% 0%, hsl(var(--primary) / 0.17), transparent 18rem),
    linear-gradient(180deg, color-mix(in oklab, hsl(var(--background)) 92%, black 8%), color-mix(in oklab, hsl(var(--card)) 86%, hsl(var(--background)) 14%)) !important;
}

body.command-os-shell .panel-nav-item,
body.command-os-shell .panel-regiment-summary,
body.command-os-shell .panel-regiment-link,
body.command-os-shell .panel-quick-item,
body.command-os-shell .itg-tree-row,
body.command-os-shell .itg-signal-list a,
body.command-os-shell .itg-data-row,
body.command-os-shell .itg-action-grid a,
body.command-os-shell .dashboard-feed-row,
body.command-os-shell .dashboard-ranked-row,
body.command-os-shell .dashboard-task-list a,
body.command-os-shell .dashboard-status-list div,
body.command-os-shell .dashboard-command-metrics div,
body.command-os-shell .dashboard-progress-row,
body.command-os-shell .cos-command-rail a {
  border-color: hsl(var(--accent) / 0.18) !important;
  background:
    linear-gradient(90deg, hsl(var(--accent) / 0.1), hsl(var(--background) / 0.48)),
    linear-gradient(180deg, hsl(var(--foreground) / 0.035), transparent) !important;
}

body.command-os-shell .panel-nav-item:hover,
body.command-os-shell .panel-nav-item.is-active,
body.command-os-shell .panel-regiment-link:hover,
body.command-os-shell .panel-regiment-link.is-active,
body.command-os-shell .panel-quick-item:hover,
body.command-os-shell .itg-tree-row:hover,
body.command-os-shell .itg-signal-list a:hover,
body.command-os-shell .itg-data-row:hover,
body.command-os-shell .itg-action-grid a:hover,
body.command-os-shell .dashboard-feed-row:hover,
body.command-os-shell .dashboard-ranked-row:hover,
body.command-os-shell .dashboard-task-list a:hover,
body.command-os-shell .cos-command-rail a:hover {
  border-color: hsl(var(--primary) / 0.62) !important;
  background:
    linear-gradient(90deg, hsl(var(--primary) / 0.2), hsl(var(--accent) / 0.1)),
    linear-gradient(180deg, hsl(var(--foreground) / 0.06), transparent) !important;
}

body.command-os-shell .itg-command-header {
  background:
    radial-gradient(circle at 88% 20%, hsl(var(--primary) / 0.18), transparent 22rem),
    linear-gradient(120deg, hsl(var(--card) / 0.94), color-mix(in oklab, hsl(var(--background)) 68%, hsl(var(--accent)) 32%)) !important;
}

body.command-os-shell .cos-command-stage {
  border-left: 1px solid hsl(var(--accent) / 0.26);
  background:
    linear-gradient(hsl(var(--accent) / 0.04) 1px, transparent 1px),
    linear-gradient(90deg, hsl(var(--accent) / 0.04) 1px, transparent 1px),
    linear-gradient(180deg, hsl(var(--background) / 0.78), hsl(var(--card) / 0.42)) !important;
  background-size: 26px 26px, 26px 26px, auto !important;
}

body.command-os-shell .cos-command-stage::before {
  background:
    linear-gradient(90deg, hsl(var(--accent) / 0.14), transparent 18%, transparent 82%, hsl(var(--accent) / 0.14)),
    linear-gradient(180deg, hsl(var(--primary) / 0.08), transparent 18%) !important;
}

body.command-os-shell .itg-command-title h1 {
  color: hsl(var(--foreground)) !important;
  text-shadow: 0 0 32px hsl(var(--primary) / 0.18);
}

body.command-os-shell :where(.panel-kicker, .applications-kicker, .applications-section-kicker, .applications-card-kicker, .applications-detail-label, .panel-stat-label, .itg-metric-grid strong, .cos-status-spine strong, .panel-nav-item svg, .panel-regiment-summary svg, .panel-regiment-link svg, .panel-quick-item svg) {
  color: hsl(var(--accent)) !important;
}

body.command-os-shell :where(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), textarea, select, .liquid-input, .form-control, .form-select, .command-select-trigger, .discord-sidebar-search-input) {
  border-color: hsl(var(--accent) / 0.28) !important;
  background: hsl(var(--background) / 0.76) !important;
  color: hsl(var(--foreground)) !important;
}

body.command-os-shell :where(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), textarea, select, .liquid-input, .form-control, .form-select, .command-select-trigger, .discord-sidebar-search-input):focus {
  border-color: hsl(var(--primary) / 0.76) !important;
  box-shadow: 0 0 0 3px hsl(var(--primary) / 0.14), inset 0 1px 0 hsl(var(--foreground) / 0.06) !important;
}

body.command-os-shell :where(.command-btn-primary, .liquid-button-primary, .applications-primary-action) {
  border-color: hsl(var(--primary) / 0.56) !important;
  background:
    linear-gradient(135deg, hsl(var(--primary) / 0.96), hsl(var(--accent) / 0.78)),
    linear-gradient(180deg, hsl(var(--foreground) / 0.16), transparent) !important;
  color: hsl(var(--primary-foreground)) !important;
  box-shadow: 0 18px 44px hsl(var(--primary) / 0.26) !important;
}

body.command-os-shell :where(.command-btn-outline, .liquid-button-outline, .command-btn-secondary, .liquid-button-secondary, .applications-secondary-action) {
  border-color: hsl(var(--accent) / 0.28) !important;
  background: hsl(var(--card) / 0.74) !important;
  color: hsl(var(--foreground)) !important;
}

body.command-os-shell .cos-modal-system,
body.command-os-shell :where(.command-modal, #quickSwitcher > div, .panel-notification-dropdown, .command-select-menu, #globalPlayerResults, #quickResults) {
  border-color: hsl(var(--accent) / 0.5) !important;
  background:
    linear-gradient(180deg, hsl(var(--card) / 0.98), hsl(var(--background) / 0.94)),
    linear-gradient(90deg, hsl(var(--accent) / 0.08), transparent 42%) !important;
  box-shadow: 0 26px 80px -40px hsl(var(--primary) / 0.48) !important;
}

body.command-os-shell :where(.panel-main, .panel-sidebar nav, .table-shell, .liquid-table-shell, .applications-expanded-body, .command-select-menu, .discord-channel-scroll, .discord-user-scroll, #quickResults, #globalPlayerResults)::-webkit-scrollbar-track {
  background: hsl(var(--background) / 0.82);
}

body.command-os-shell :where(.panel-main, .panel-sidebar nav, .table-shell, .liquid-table-shell, .applications-expanded-body, .command-select-menu, .discord-channel-scroll, .discord-user-scroll, #quickResults, #globalPlayerResults)::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, hsl(var(--accent) / 0.54), hsl(var(--primary) / 0.58));
}

@media (min-width: 1280px) {
  body.command-os-shell .cos-shell-sidebar {
    inset: 0 auto 0 0 !important;
    left: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    width: 20rem !important;
    border-width: 0 1px 0 0 !important;
    border-right: 1px solid hsl(var(--accent) / 0.34);
    border-radius: 0 !important;
    transform: translateX(0) !important;
  }

  body.command-os-shell .panel-app-main {
    padding-left: 20rem !important;
  }

  body.command-os-shell .cos-shell-topbar {
    margin: 0 !important;
    border-width: 0 0 1px 1px !important;
    border-left: 1px solid hsl(var(--accent) / 0.26) !important;
    border-radius: 0 !important;
  }

  body.command-os-shell .cos-shell-main {
    padding: 0 !important;
  }

  body.command-os-shell .panel-main-inner {
    width: 100%;
    max-width: none !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
  }

  body.command-os-shell .cos-command-stage {
    min-height: calc(100vh - 5.6rem);
    margin: 0 !important;
    border-width: 0 0 0 1px;
    border-left: 1px solid hsl(var(--accent) / 0.26);
    border-radius: 0 !important;
    padding: clamp(0.75rem, 0.55rem + 0.55vw, 1.25rem);
  }
}

/* Command OS Shell Tactical Glass Immersion */
body.command-os-shell {
  --cos-radar-line: hsl(var(--accent) / 0.2);
  --cos-radar-glow: hsl(var(--primary) / 0.18);
  --cos-glass-field: color-mix(in oklab, hsl(var(--background)) 82%, hsl(var(--accent)) 18%);
  --cos-glass-field-strong: color-mix(in oklab, hsl(var(--background)) 72%, hsl(var(--primary)) 28%);
  background:
    radial-gradient(ellipse at 12% 8%, hsl(var(--primary) / 0.22), transparent 34rem),
    radial-gradient(ellipse at 82% 16%, hsl(var(--accent) / 0.17), transparent 36rem),
    radial-gradient(ellipse at 52% 104%, hsl(var(--accent) / 0.12), transparent 48rem),
    linear-gradient(145deg, color-mix(in oklab, hsl(var(--background)) 90%, hsl(var(--primary)) 10%), hsl(var(--background)) 52%, color-mix(in oklab, hsl(var(--background)) 86%, hsl(var(--accent)) 14%)) !important;
  background-size: auto !important;
}

body.command-os-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 18%, transparent 0 10rem, var(--cos-radar-line) 10.05rem 10.12rem, transparent 10.2rem 16rem, hsl(var(--accent) / 0.1) 16.05rem 16.12rem, transparent 16.2rem),
    conic-gradient(from 225deg at 12% 18%, transparent 0deg 24deg, var(--cos-radar-glow) 25deg 38deg, transparent 42deg 360deg),
    radial-gradient(ellipse at 78% 22%, hsl(var(--primary) / 0.12), transparent 30rem),
    linear-gradient(90deg, hsl(var(--accent) / 0.08), transparent 10%, transparent 90%, hsl(var(--accent) / 0.08));
  opacity: 0.8;
  mix-blend-mode: screen;
}

body.command-os-shell::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 250;
  pointer-events: none;
  opacity: 0.12;
  background:
    repeating-linear-gradient(180deg, hsl(var(--foreground) / 0.2) 0 1px, transparent 1px 6px),
    linear-gradient(115deg, transparent 0 42%, hsl(var(--accent) / 0.12) 43%, transparent 45% 100%);
  mix-blend-mode: screen;
}

body.command-os-shell .panel-ribbon-layer {
  opacity: 0.44;
  background:
    radial-gradient(ellipse at 20% 12%, hsl(var(--primary) / 0.18), transparent 30rem),
    radial-gradient(ellipse at 76% 88%, hsl(var(--accent) / 0.13), transparent 28rem),
    linear-gradient(125deg, transparent 0 42%, hsl(var(--accent) / 0.1) 43%, transparent 46%),
    linear-gradient(58deg, transparent 0 62%, hsl(var(--primary) / 0.09) 63%, transparent 66%) !important;
}

body.command-os-shell .cos-command-stage {
  overflow: hidden;
  border-left: 0 !important;
  background:
    radial-gradient(ellipse at 8% 0%, hsl(var(--primary) / 0.14), transparent 34rem),
    radial-gradient(ellipse at 94% 12%, hsl(var(--accent) / 0.1), transparent 30rem),
    linear-gradient(180deg, hsl(var(--card) / 0.52), hsl(var(--background) / 0.68)) !important;
  background-size: auto !important;
}

body.command-os-shell .cos-command-stage::before {
  background:
    linear-gradient(90deg, hsl(var(--accent) / 0.1), transparent 16%, transparent 84%, hsl(var(--accent) / 0.1)),
    linear-gradient(180deg, hsl(var(--primary) / 0.07), transparent 20%) !important;
}

body.command-os-shell .cos-command-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 8% 12%, transparent 0 8rem, hsl(var(--accent) / 0.16) 8.05rem 8.12rem, transparent 8.2rem 14rem, hsl(var(--primary) / 0.1) 14.05rem 14.12rem, transparent 14.2rem),
    conic-gradient(from 225deg at 8% 12%, transparent 0deg 28deg, hsl(var(--primary) / 0.16) 29deg 42deg, transparent 46deg 360deg),
    linear-gradient(118deg, transparent 0 48%, hsl(var(--foreground) / 0.04) 49%, transparent 51%);
  opacity: 0.76;
  mix-blend-mode: screen;
}

body.command-os-shell .cos-shell-sidebar,
body.command-os-shell .cos-shell-topbar,
body.command-os-shell .cos-command-stage,
body.command-os-shell .itg-command-header,
body.command-os-shell .itg-glass-panel,
body.command-os-shell .itg-metric-grid article,
body.command-os-shell .cos-status-spine article {
  backdrop-filter: blur(20px) saturate(150%);
}

@media (min-width: 1280px) {
  body.command-os-shell .panel-app-shell {
    display: grid !important;
    grid-template-columns: 20rem minmax(0, 1fr);
    gap: 0 !important;
    align-items: stretch;
  }

  body.command-os-shell .cos-shell-sidebar {
    position: sticky !important;
    grid-column: 1;
    inset: auto !important;
    top: 0 !important;
    left: auto !important;
    bottom: auto !important;
    width: 20rem !important;
    height: 100vh !important;
    max-height: 100vh !important;
    border-width: 0 1px 0 0 !important;
    border-right: 1px solid hsl(var(--accent) / 0.34);
    border-radius: 0 !important;
    transform: none !important;
  }

  body.command-os-shell .panel-app-main {
    grid-column: 2;
    min-width: 0;
    padding-left: 0 !important;
  }

  body.command-os-shell .cos-shell-topbar {
    margin: 0 !important;
    border-width: 0 0 1px 0 !important;
    border-left: 0 !important;
    border-radius: 0 !important;
  }

  body.command-os-shell .cos-shell-main {
    padding: 0 !important;
  }

  body.command-os-shell .cos-command-stage {
    min-height: calc(100vh - 5.6rem);
    margin: 0 !important;
    border-width: 0 !important;
    border-left: 0 !important;
    border-radius: 0 !important;
    padding: clamp(0.85rem, 0.62rem + 0.6vw, 1.35rem);
  }
}

/* Command OS Shell QOL Polish Pass */
body.command-os-shell {
  --cos-focus-ring: 0 0 0 3px hsl(var(--primary) / 0.2);
  --cos-focus-border: hsl(var(--primary) / 0.74);
  --cos-surface-hover: hsl(var(--accent) / 0.1);
  --cos-control-height: 2.45rem;
  --cos-control-radius: 0.34rem;
  --cos-motion-fast: 150ms ease;
  scroll-padding-top: 5.5rem;
}

body.command-os-shell :where(a, button, input, textarea, select, summary, [tabindex]):focus-visible {
  outline: 0 !important;
  border-color: var(--cos-focus-border) !important;
  box-shadow: var(--cos-focus-ring), inset 0 1px 0 hsl(var(--foreground) / 0.06) !important;
}

body.command-os-shell :where(button, a, summary, .panel-nav-item, .panel-regiment-link, .panel-quick-item, .command-btn, .liquid-button, .applications-primary-action, .applications-secondary-action, .applications-filter-button, .applications-command-link, .applications-mini-action, .discord-control-btn, .discord-plus-btn, .notification-item) {
  transition:
    transform var(--cos-motion-fast),
    border-color var(--cos-motion-fast),
    background-color var(--cos-motion-fast),
    background var(--cos-motion-fast),
    color var(--cos-motion-fast),
    box-shadow var(--cos-motion-fast),
    opacity var(--cos-motion-fast);
}

body.command-os-shell :where(button, a, summary, .panel-nav-item, .panel-regiment-link, .panel-quick-item, .notification-item):active {
  transform: translateY(1px);
}

body.command-os-shell .panel-main-inner > :not(.cos-legal-footer) {
  min-width: 0;
}

body.command-os-shell .panel-main-scrolled .cos-shell-topbar,
body.command-os-shell.panel-main-scrolled .cos-shell-topbar {
  box-shadow:
    0 18px 48px -36px hsl(var(--primary) / 0.52),
    inset 0 -1px 0 hsl(var(--accent) / 0.2) !important;
}

body.command-os-shell :where(.cos-global-surface, .panel-surface, .panel-section-shell, .panel-stat, .liquid-panel, .liquid-surface, .command-surface, .command-row, .applications-shell-card, .applications-template-card, .applications-review-card, .applications-case-card, .applications-detail-card, .applications-stat-card, .applications-score-panel, .discord-shell-card, .command-center-card, .stats-surface, .notification-item) {
  background:
    radial-gradient(ellipse at 18% 0%, hsl(var(--primary) / 0.08), transparent 22rem),
    linear-gradient(180deg, hsl(var(--card) / 0.88), color-mix(in oklab, hsl(var(--background)) 82%, hsl(var(--card)) 18%)) !important;
}

body.command-os-shell :where(.cos-global-surface, .panel-section-shell, .panel-stat, .liquid-panel, .liquid-surface, .command-surface, .command-row, .applications-shell-card, .applications-template-card, .applications-review-card, .applications-case-card, .applications-detail-card, .applications-stat-card, .applications-score-panel, .discord-shell-card, .command-center-card, .stats-surface, .notification-item):hover {
  border-color: hsl(var(--primary) / 0.44) !important;
  box-shadow:
    0 28px 82px -58px hsl(var(--primary) / 0.56),
    inset 0 1px 0 hsl(var(--foreground) / 0.075) !important;
}

body.command-os-shell :where(.cos-table-system, .table-shell, .liquid-table-shell) {
  border-radius: var(--cos-radius-sm) !important;
  background:
    linear-gradient(180deg, hsl(var(--card) / 0.72), hsl(var(--background) / 0.72)),
    radial-gradient(ellipse at 15% 0%, hsl(var(--primary) / 0.09), transparent 24rem) !important;
}

body.command-os-shell :where(.cos-table-system, .table-shell, .liquid-table-shell) :where(thead, .liquid-table-head) {
  position: sticky;
  top: 0;
  z-index: 2;
  backdrop-filter: blur(16px) saturate(140%);
  box-shadow: inset 0 -1px 0 hsl(var(--accent) / 0.22);
}

body.command-os-shell :where(table, .liquid-table-shell table) :where(th, td) {
  padding-block: 0.72rem;
  vertical-align: middle;
}

body.command-os-shell :where(tbody tr, .liquid-table-shell tbody tr) {
  transition: background var(--cos-motion-fast), box-shadow var(--cos-motion-fast);
}

body.command-os-shell :where(tbody tr:hover, .liquid-table-shell tbody tr:hover) {
  background:
    linear-gradient(90deg, hsl(var(--primary) / 0.13), transparent 58%) !important;
  box-shadow: inset 3px 0 0 hsl(var(--accent) / 0.58);
}

body.command-os-shell :where(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), textarea, select, .liquid-input, .form-control, .form-select, .command-select-trigger, .discord-sidebar-search-input) {
  min-height: var(--cos-control-height);
  border-radius: var(--cos-control-radius) !important;
}

body.command-os-shell :where(textarea) {
  min-height: 7rem;
  resize: vertical;
}

body.command-os-shell :where(input[disabled], textarea[disabled], select[disabled], button[disabled], [aria-disabled="true"]) {
  cursor: not-allowed !important;
  opacity: 0.62;
}

body.command-os-shell :where(.command-btn, .liquid-button, .applications-primary-action, .applications-secondary-action, .applications-filter-button, .applications-command-link, .applications-mini-action, .discord-control-btn, .discord-plus-btn) {
  min-height: var(--cos-control-height);
  align-items: center;
  justify-content: center;
}

body.command-os-shell :where(.command-btn:hover, .liquid-button:hover, .applications-primary-action:hover, .applications-secondary-action:hover, .applications-filter-button:hover, .applications-command-link:hover, .applications-mini-action:hover, .discord-control-btn:hover, .discord-plus-btn:hover) {
  transform: translateY(-1px);
}

body.command-os-shell form.is-submitting {
  cursor: progress;
}

body.command-os-shell form.is-submitting :where(button[type="submit"], input[type="submit"]) {
  pointer-events: none;
}

body.command-os-shell :where(button.is-submitting, input.is-submitting) {
  position: relative;
  isolation: isolate;
}

body.command-os-shell :where(button.is-submitting, input.is-submitting)::after {
  content: "";
  width: 0.72rem;
  height: 0.72rem;
  margin-left: 0.45rem;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 999px;
  animation: panel-qol-spin 700ms linear infinite;
}

body.command-os-shell .panel-notification-drawer {
  width: min(28rem, calc(100vw - 1.5rem));
}

body.command-os-shell .panel-notification-drawer.is-open {
  transform: translateX(0);
  opacity: 1;
  visibility: visible;
}

body.command-os-shell .notification-item {
  display: grid !important;
  gap: 0.18rem;
  min-height: 3.35rem;
}

body.command-os-shell #quickResults {
  display: grid;
  gap: 0.35rem;
  padding-right: 0.1rem;
  scrollbar-gutter: stable;
}

body.command-os-shell #quickResults:empty::before {
  content: "No results";
  display: block;
  border: 1px solid hsl(var(--accent) / 0.16);
  border-radius: var(--cos-radius-sm);
  background: hsl(var(--background) / 0.38);
  padding: 0.75rem;
  color: hsl(var(--muted-foreground));
  font-size: 0.8rem;
}

body.command-os-shell :where(.empty-state, .dashboard-empty-line) {
  border-style: dashed !important;
  border-color: hsl(var(--accent) / 0.24) !important;
  background:
    radial-gradient(ellipse at 12% 0%, hsl(var(--primary) / 0.08), transparent 18rem),
    hsl(var(--background) / 0.42) !important;
}

body.command-os-shell .cos-legal-footer {
  opacity: 0.72;
  transition: opacity var(--cos-motion-fast), border-color var(--cos-motion-fast);
}

body.command-os-shell .cos-legal-footer:hover,
body.command-os-shell .cos-legal-footer:focus-within {
  opacity: 1;
  border-color: hsl(var(--accent) / 0.34);
}

@keyframes panel-qol-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 960px) {
  body.command-os-shell .panel-topbar-grid {
    align-items: stretch !important;
  }

  body.command-os-shell .panel-topbar-primary,
  body.command-os-shell .panel-topbar-actions {
    width: 100%;
  }

  body.command-os-shell .panel-topbar-actions {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(2.65rem, max-content));
    justify-content: start;
  }

  body.command-os-shell .panel-main-inner > :not(.cos-legal-footer) {
    border-radius: min(var(--cos-radius-sm), 0.35rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.command-os-shell :where(button.is-submitting, input.is-submitting)::after {
    animation: none;
  }
}

/* Command OS Shell Smooth Glass Background Pass */
body.panel-shell.command-os-shell {
  background:
    radial-gradient(ellipse at 18% 10%, hsl(var(--primary) / 0.2), transparent 38rem),
    radial-gradient(ellipse at 86% 18%, hsl(var(--accent) / 0.15), transparent 42rem),
    radial-gradient(ellipse at 50% 105%, hsl(var(--primary) / 0.12), transparent 54rem),
    linear-gradient(145deg, color-mix(in oklab, hsl(var(--background)) 92%, hsl(var(--primary)) 8%), hsl(var(--background)) 48%, color-mix(in oklab, hsl(var(--background)) 88%, hsl(var(--accent)) 12%)) !important;
  background-size: auto !important;
}

body.command-os-shell .panel-grain-layer {
  opacity: 0 !important;
  background: none !important;
  background-image: none !important;
  background-size: auto !important;
  mix-blend-mode: normal !important;
}

body.command-os-shell::after {
  opacity: 0.1;
  background:
    radial-gradient(ellipse at 28% 0%, hsl(var(--foreground) / 0.09), transparent 34rem),
    linear-gradient(112deg, transparent 0 38%, hsl(var(--accent) / 0.08) 44%, transparent 55% 100%),
    linear-gradient(180deg, hsl(var(--foreground) / 0.035), transparent 28%, hsl(var(--primary) / 0.035) 100%) !important;
  mix-blend-mode: screen;
}

body.command-os-shell .panel-ribbon-layer::before,
body.command-os-shell .panel-ribbon-layer::after {
  filter: blur(46px);
  opacity: 0.46;
  background:
    linear-gradient(90deg, transparent 0%, hsl(var(--primary) / 0.22) 22%, hsl(var(--accent) / 0.16) 58%, transparent 100%) !important;
}

body.command-os-shell .cos-command-stage,
body.command-os-shell .itg-command-header,
body.command-os-shell .itg-glass-panel,
body.command-os-shell .itg-metric-grid article,
body.command-os-shell .cos-status-spine article {
  background-image:
    radial-gradient(ellipse at 18% 0%, hsl(var(--primary) / 0.1), transparent 24rem),
    linear-gradient(180deg, hsl(var(--card) / 0.58), hsl(var(--background) / 0.62)) !important;
  background-size: auto !important;
}

body.command-os-shell .cos-command-stage::after {
  opacity: 0.42;
  background:
    radial-gradient(ellipse at 10% 12%, hsl(var(--accent) / 0.13), transparent 18rem),
    conic-gradient(from 225deg at 10% 12%, transparent 0deg 28deg, hsl(var(--primary) / 0.14) 32deg 42deg, transparent 48deg 360deg),
    linear-gradient(118deg, transparent 0 48%, hsl(var(--foreground) / 0.035) 53%, transparent 59% 100%) !important;
}

/* Command OS Shell No Grid Background Enforcement */
body.command-os-shell .applications-workspace::before {
  display: none !important;
  content: none !important;
  background: none !important;
  background-image: none !important;
  mask-image: none !important;
}

body.command-os-shell :where(.panel-hero, .applications-hero, .discord-shell, .dashboard-activity-chart, .panel-loader) {
  background:
    radial-gradient(ellipse at 18% 4%, hsl(var(--primary) / 0.14), transparent 30rem),
    radial-gradient(ellipse at 92% 12%, hsl(var(--accent) / 0.1), transparent 28rem),
    linear-gradient(145deg, hsl(var(--card) / 0.72), hsl(var(--background) / 0.74)) !important;
  background-size: auto !important;
}

body.command-os-shell .panel-hero::before,
body.command-os-shell .panel-hero::after,
body.command-os-shell .applications-hero::before,
body.command-os-shell .applications-hero::after,
body.command-os-shell .dashboard-activity-chart::before,
body.command-os-shell .dashboard-activity-chart::after {
  background:
    radial-gradient(ellipse at 22% 0%, hsl(var(--primary) / 0.12), transparent 22rem),
    linear-gradient(118deg, transparent 0 38%, hsl(var(--accent) / 0.08) 46%, transparent 60% 100%) !important;
  background-size: auto !important;
}

body.command-os-shell :where(.applications-command-bar, .applications-shell-card, .applications-stat-card, .applications-glass-card, .applications-case-card, .applications-template-card, .applications-review-card, .applications-detail-card, .applications-question-card, .applications-review-bucket, .applications-review-sidecar, .applications-intake-rail) {
  background:
    radial-gradient(ellipse at 16% 0%, hsl(var(--primary) / 0.08), transparent 22rem),
    linear-gradient(180deg, hsl(var(--card) / 0.82), hsl(var(--background) / 0.68)) !important;
  background-size: auto !important;
}

body.command-os-shell .panel-loader .loader-core {
  background:
    radial-gradient(ellipse at 50% 0%, hsl(var(--primary) / 0.16), transparent 18rem),
    linear-gradient(180deg, hsl(var(--card) / 0.9), hsl(var(--background) / 0.84)) !important;
  background-size: auto !important;
}

/* Command OS Shell Full Bleed Silky Page Canvas */
body.panel-shell.command-os-shell {
  background:
    radial-gradient(ellipse at 18% 8%, hsl(var(--primary) / 0.2), transparent 36rem),
    radial-gradient(ellipse at 82% 14%, hsl(var(--accent) / 0.16), transparent 40rem),
    radial-gradient(ellipse at 62% 108%, hsl(var(--primary) / 0.11), transparent 54rem),
    linear-gradient(145deg, color-mix(in oklab, hsl(var(--background)) 90%, hsl(var(--primary)) 10%), hsl(var(--background)) 46%, color-mix(in oklab, hsl(var(--background)) 88%, hsl(var(--accent)) 12%)) !important;
  background-attachment: fixed;
  background-size: auto !important;
}

body.command-os-shell .panel-ribbon-layer {
  opacity: 0.54 !important;
  background:
    radial-gradient(ellipse at 18% 10%, hsl(var(--primary) / 0.2), transparent 34rem),
    radial-gradient(ellipse at 88% 12%, hsl(var(--accent) / 0.14), transparent 38rem),
    radial-gradient(ellipse at 48% 96%, hsl(var(--accent) / 0.1), transparent 46rem),
    linear-gradient(120deg, transparent 0 34%, hsl(var(--primary) / 0.08) 46%, transparent 62% 100%) !important;
}

body.command-os-shell :where(.panel-app-shell, .panel-app-main, .cos-shell-main, .panel-main-inner, .command-page, .cos-command-stage, .applications-workspace) {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

body.command-os-shell :where(.cos-command-stage, .applications-workspace) {
  overflow: visible !important;
}

body.command-os-shell .cos-command-stage::before,
body.command-os-shell .cos-command-stage::after,
body.command-os-shell .applications-workspace::after {
  display: none !important;
  content: none !important;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
}

body.command-os-shell .panel-main-inner > :not(.cos-legal-footer) {
  border-radius: 0 !important;
}

/* Command OS Shell Dashboard Silk Surface Pass */
body.command-os-shell :where(.itg-command-header, .itg-metric-grid article, .cos-status-spine article, .itg-glass-panel, .itg-quick-dock, .dashboard-legacy-modules) {
  border-color: hsl(var(--theme-identity-glow, var(--accent)) / 0.34) !important;
  background:
    radial-gradient(ellipse at 16% 0%, hsl(var(--theme-identity-glow, var(--primary)) / 0.14), transparent 24rem),
    radial-gradient(ellipse at 92% 16%, hsl(var(--theme-identity-haze, var(--accent)) / 0.1), transparent 28rem),
    linear-gradient(180deg, hsl(var(--card) / 0.72), hsl(var(--background) / 0.58)) !important;
  background-size: auto !important;
  box-shadow:
    0 28px 86px -62px hsl(var(--theme-identity-glow, var(--primary)) / 0.62),
    inset 0 1px 0 hsl(var(--foreground) / 0.07) !important;
  backdrop-filter: blur(20px) saturate(150%) !important;
}

body.command-os-shell :where(.itg-command-header, .itg-glass-panel)::before,
body.command-os-shell :where(.itg-metric-grid article, .itg-glass-panel, .cos-status-spine article)::after {
  display: none !important;
  content: none !important;
  background: transparent !important;
  background-image: none !important;
  background-size: auto !important;
  box-shadow: none !important;
}

body.command-os-shell :where(.itg-tree-row, .itg-signal-list a, .itg-data-row, .itg-action-grid a, .itg-server-readout div, .itg-watch-grid div) {
  border-color: hsl(var(--theme-identity-glow, var(--accent)) / 0.18) !important;
  background:
    radial-gradient(ellipse at 10% 0%, hsl(var(--theme-identity-glow, var(--primary)) / 0.08), transparent 16rem),
    linear-gradient(90deg, hsl(var(--background) / 0.36), hsl(var(--card) / 0.46)) !important;
  background-size: auto !important;
}

body.command-os-shell .itg-radar-lines {
  border-color: hsl(var(--theme-identity-glow, var(--accent)) / 0.2) !important;
  background:
    radial-gradient(circle at center, hsl(var(--theme-identity-glow, var(--accent)) / 0.12), transparent 58%),
    radial-gradient(circle at center, transparent 0 46%, hsl(var(--theme-identity-glow, var(--accent)) / 0.16) 54%, transparent 68%) !important;
  background-size: auto !important;
  box-shadow: 0 0 38px hsl(var(--theme-identity-glow, var(--accent)) / 0.12);
  opacity: 0.3;
}

body.command-os-shell .itg-radar-lines span {
  background: linear-gradient(90deg, hsl(var(--theme-identity-glow, var(--accent)) / 0.34), transparent) !important;
}

/* Command OS Shell Immersive Theme Identity Pass */
html[data-theme="senate"] body.command-os-shell {
  --theme-identity-glow: 192 96% 58%;
  --theme-identity-haze: 203 76% 55%;
  --theme-identity-ink: 223 34% 10%;
  --theme-identity-sheen: 210 35% 96%;
}

html[data-theme="senate-deluxe"] body.command-os-shell {
  --theme-identity-glow: 43 92% 70%;
  --theme-identity-haze: 35 88% 45%;
  --theme-identity-ink: 34 42% 4%;
  --theme-identity-sheen: 42 88% 83%;
}

html[data-theme="501st"] body.command-os-shell {
  --theme-identity-glow: 226 100% 53%;
  --theme-identity-haze: 220 100% 98%;
  --theme-identity-ink: 226 90% 4%;
  --theme-identity-sheen: 220 100% 98%;
}

html[data-theme="sith"] body.command-os-shell {
  --theme-identity-glow: 349 100% 59%;
  --theme-identity-haze: 352 100% 65%;
  --theme-identity-ink: 348 82% 5%;
  --theme-identity-sheen: 352 100% 95%;
}

html[data-theme="purge"] body.command-os-shell {
  --theme-identity-glow: 276 100% 68%;
  --theme-identity-haze: 296 100% 64%;
  --theme-identity-ink: 280 100% 4%;
  --theme-identity-sheen: 281 100% 96%;
}

html[data-theme="41st"] body.command-os-shell {
  --theme-identity-glow: 142 71% 47%;
  --theme-identity-haze: 130 55% 43%;
  --theme-identity-ink: 142 50% 8%;
  --theme-identity-sheen: 138 42% 94%;
}

html[data-theme="stormtrooper"] body.command-os-shell {
  --theme-identity-glow: 218 44% 22%;
  --theme-identity-haze: 211 45% 30%;
  --theme-identity-ink: 215 27% 96%;
  --theme-identity-sheen: 221 31% 9%;
}

html[data-theme="212th"] body.command-os-shell {
  --theme-identity-glow: 22 90% 52%;
  --theme-identity-haze: 36 100% 94%;
  --theme-identity-ink: 20 64% 5%;
  --theme-identity-sheen: 36 100% 94%;
}

html[data-theme="naval"] body.command-os-shell {
  --theme-identity-glow: 220 28% 88%;
  --theme-identity-haze: 39 46% 52%;
  --theme-identity-ink: 224 71% 4%;
  --theme-identity-sheen: 225 17% 88%;
}

html[data-theme="dt"] body.command-os-shell {
  --theme-identity-glow: 135 100% 64%;
  --theme-identity-haze: 129 100% 57%;
  --theme-identity-ink: 126 43% 4%;
  --theme-identity-sheen: 132 100% 92%;
}

html[data-theme="commandos"] body.command-os-shell {
  --theme-identity-glow: 212 18% 87%;
  --theme-identity-haze: 4 65% 51%;
  --theme-identity-ink: 220 22% 3%;
  --theme-identity-sheen: 210 18% 94%;
}

body.command-os-shell {
  --theme-identity-glow: var(--primary);
  --theme-identity-haze: var(--accent);
  --theme-identity-ink: var(--background);
  --theme-identity-sheen: var(--foreground);
  background:
    radial-gradient(ellipse at 14% 8%, hsl(var(--theme-identity-glow) / 0.24), transparent 34rem),
    radial-gradient(ellipse at 86% 14%, hsl(var(--theme-identity-haze) / 0.18), transparent 38rem),
    radial-gradient(ellipse at 48% 108%, hsl(var(--theme-identity-glow) / 0.12), transparent 52rem),
    linear-gradient(145deg, hsl(var(--theme-identity-ink) / 0.94), hsl(var(--background)) 48%, color-mix(in oklab, hsl(var(--background)) 82%, hsl(var(--theme-identity-haze)) 18%)) !important;
  background-size: auto !important;
}

body.command-os-shell::before {
  background:
    radial-gradient(ellipse at 18% 18%, hsl(var(--theme-identity-glow) / 0.14), transparent 24rem),
    radial-gradient(ellipse at 86% 28%, hsl(var(--theme-identity-haze) / 0.12), transparent 30rem),
    linear-gradient(90deg, hsl(var(--theme-identity-glow) / 0.08), transparent 18%, transparent 82%, hsl(var(--theme-identity-haze) / 0.08)) !important;
  opacity: 0.74 !important;
}

body.command-os-shell .panel-ribbon-layer {
  background:
    radial-gradient(ellipse at 18% 8%, hsl(var(--theme-identity-glow) / 0.28), transparent 34rem),
    radial-gradient(ellipse at 86% 18%, hsl(var(--theme-identity-haze) / 0.22), transparent 38rem),
    radial-gradient(ellipse at 50% 98%, hsl(var(--theme-identity-glow) / 0.14), transparent 44rem),
    linear-gradient(120deg, transparent 0 34%, hsl(var(--theme-identity-glow) / 0.1) 46%, transparent 62% 100%) !important;
  opacity: 0.68 !important;
}

body.command-os-shell :where(.cos-shell-sidebar, .cos-shell-topbar, .panel-theme-dock, .panel-sidebar-command-head, .panel-nav-item.is-active) {
  border-color: hsl(var(--theme-identity-glow) / 0.42) !important;
  background:
    radial-gradient(ellipse at 18% 0%, hsl(var(--theme-identity-glow) / 0.15), transparent 20rem),
    linear-gradient(180deg, hsl(var(--card) / 0.84), hsl(var(--background) / 0.66)) !important;
  background-size: auto !important;
  box-shadow:
    0 24px 76px -58px hsl(var(--theme-identity-glow) / 0.7),
    inset 0 1px 0 hsl(var(--theme-identity-sheen) / 0.08) !important;
}

body.command-os-shell :where(.panel-nav-item:hover, .panel-regiment-link:hover, .panel-quick-item:hover, .command-btn:hover, .liquid-button:hover, .applications-primary-action:hover, .applications-secondary-action:hover) {
  border-color: hsl(var(--theme-identity-glow) / 0.58) !important;
  background:
    radial-gradient(ellipse at 14% 0%, hsl(var(--theme-identity-glow) / 0.18), transparent 18rem),
    linear-gradient(90deg, hsl(var(--theme-identity-glow) / 0.16), hsl(var(--theme-identity-haze) / 0.08)) !important;
  background-size: auto !important;
}

body.command-os-shell :where(.panel-surface, .panel-section-shell, .panel-stat, .liquid-panel, .liquid-surface, .command-surface, .command-row, .applications-shell-card, .applications-template-card, .applications-review-card, .applications-case-card, .applications-detail-card, .applications-stat-card, .applications-score-panel, .discord-shell-card, .command-center-card, .stats-surface, .notification-item) {
  border-color: hsl(var(--theme-identity-glow) / 0.28) !important;
  background:
    radial-gradient(ellipse at 16% 0%, hsl(var(--theme-identity-glow) / 0.09), transparent 22rem),
    linear-gradient(180deg, hsl(var(--card) / 0.8), hsl(var(--background) / 0.64)) !important;
  background-size: auto !important;
}

/* Command OS Shell Mega Faction Theme Overhaul */
body.command-os-shell {
  --faction-atmosphere-a: var(--theme-identity-glow);
  --faction-atmosphere-b: var(--theme-identity-haze);
  --faction-atmosphere-c: var(--accent);
  --faction-surface-a: var(--card);
  --faction-surface-b: var(--background);
  --faction-edge: var(--theme-identity-glow);
  --faction-shadow: var(--theme-identity-glow);
  --faction-contrast: var(--foreground);
  --faction-quiet: var(--muted-foreground);
}

html[data-theme="senate"] body.command-os-shell {
  --faction-atmosphere-a: 192 96% 58%;
  --faction-atmosphere-b: 214 94% 62%;
  --faction-atmosphere-c: 264 70% 58%;
  --faction-surface-a: 221 35% 15%;
  --faction-surface-b: 223 34% 8%;
  --faction-edge: 192 96% 58%;
  --faction-shadow: 192 96% 58%;
  --faction-contrast: 210 35% 96%;
  --faction-quiet: 214 22% 70%;
}

html[data-theme="senate-deluxe"] body.command-os-shell {
  --faction-atmosphere-a: 43 92% 70%;
  --faction-atmosphere-b: 32 94% 48%;
  --faction-atmosphere-c: 0 0% 4%;
  --faction-surface-a: 38 25% 7%;
  --faction-surface-b: 34 18% 2%;
  --faction-edge: 43 92% 70%;
  --faction-shadow: 36 94% 50%;
  --faction-contrast: 42 88% 83%;
  --faction-quiet: 41 34% 62%;
}

html[data-theme="501st"] body.command-os-shell {
  --faction-atmosphere-a: 226 100% 53%;
  --faction-atmosphere-b: 220 100% 98%;
  --faction-atmosphere-c: 229 100% 44%;
  --faction-surface-a: 226 81% 12%;
  --faction-surface-b: 226 90% 3%;
  --faction-edge: 226 100% 53%;
  --faction-shadow: 226 100% 53%;
  --faction-contrast: 220 100% 98%;
  --faction-quiet: 223 80% 80%;
}

html[data-theme="sith"] body.command-os-shell {
  --faction-atmosphere-a: 349 100% 59%;
  --faction-atmosphere-b: 0 92% 42%;
  --faction-atmosphere-c: 326 78% 34%;
  --faction-surface-a: 345 74% 8%;
  --faction-surface-b: 348 82% 4%;
  --faction-edge: 349 100% 59%;
  --faction-shadow: 349 100% 59%;
  --faction-contrast: 352 100% 95%;
  --faction-quiet: 347 38% 72%;
}

html[data-theme="purge"] body.command-os-shell {
  --faction-atmosphere-a: 276 100% 68%;
  --faction-atmosphere-b: 296 100% 64%;
  --faction-atmosphere-c: 259 100% 62%;
  --faction-surface-a: 281 84% 7%;
  --faction-surface-b: 280 100% 3%;
  --faction-edge: 276 100% 68%;
  --faction-shadow: 296 100% 64%;
  --faction-contrast: 281 100% 96%;
  --faction-quiet: 282 42% 74%;
}

html[data-theme="41st"] body.command-os-shell {
  --faction-atmosphere-a: 142 71% 47%;
  --faction-atmosphere-b: 106 58% 42%;
  --faction-atmosphere-c: 166 70% 38%;
  --faction-surface-a: 143 44% 12%;
  --faction-surface-b: 142 50% 6%;
  --faction-edge: 142 71% 47%;
  --faction-shadow: 142 71% 47%;
  --faction-contrast: 138 42% 94%;
  --faction-quiet: 137 24% 70%;
}

html[data-theme="stormtrooper"] body.command-os-shell {
  --faction-atmosphere-a: 218 44% 22%;
  --faction-atmosphere-b: 210 28% 72%;
  --faction-atmosphere-c: 0 0% 100%;
  --faction-surface-a: 0 0% 100%;
  --faction-surface-b: 215 27% 92%;
  --faction-edge: 218 44% 22%;
  --faction-shadow: 218 30% 18%;
  --faction-contrast: 221 31% 9%;
  --faction-quiet: 218 18% 34%;
}

html[data-theme="212th"] body.command-os-shell {
  --faction-atmosphere-a: 22 90% 52%;
  --faction-atmosphere-b: 36 100% 94%;
  --faction-atmosphere-c: 18 86% 40%;
  --faction-surface-a: 21 71% 10%;
  --faction-surface-b: 20 64% 4%;
  --faction-edge: 22 90% 52%;
  --faction-shadow: 22 90% 52%;
  --faction-contrast: 36 100% 94%;
  --faction-quiet: 27 56% 72%;
}

html[data-theme="naval"] body.command-os-shell {
  --faction-atmosphere-a: 220 28% 88%;
  --faction-atmosphere-b: 39 46% 52%;
  --faction-atmosphere-c: 225 36% 18%;
  --faction-surface-a: 220 63% 7%;
  --faction-surface-b: 224 71% 3%;
  --faction-edge: 39 46% 52%;
  --faction-shadow: 39 46% 52%;
  --faction-contrast: 225 17% 88%;
  --faction-quiet: 221 11% 54%;
}

html[data-theme="dt"] body.command-os-shell {
  --faction-atmosphere-a: 135 100% 64%;
  --faction-atmosphere-b: 126 100% 42%;
  --faction-atmosphere-c: 162 100% 45%;
  --faction-surface-a: 128 47% 7%;
  --faction-surface-b: 126 43% 3%;
  --faction-edge: 135 100% 64%;
  --faction-shadow: 135 100% 64%;
  --faction-contrast: 132 100% 92%;
  --faction-quiet: 132 44% 70%;
}

html[data-theme="commandos"] body.command-os-shell {
  --faction-atmosphere-a: 212 18% 87%;
  --faction-atmosphere-b: 4 65% 51%;
  --faction-atmosphere-c: 215 16% 34%;
  --faction-surface-a: 220 21% 7%;
  --faction-surface-b: 220 22% 2%;
  --faction-edge: 4 65% 51%;
  --faction-shadow: 4 65% 51%;
  --faction-contrast: 210 18% 94%;
  --faction-quiet: 214 12% 67%;
}

/* React Theme Compatibility Bridge */
body.command-os-shell {
  --react-theme-bg: hsl(var(--faction-surface-b, var(--theme-identity-ink, var(--background))));
  --react-theme-surface: hsl(var(--faction-surface-a, var(--card)) / 0.82);
  --react-theme-surface-strong: hsl(var(--faction-surface-a, var(--card)) / 0.94);
  --react-theme-surface-soft: hsl(var(--faction-surface-a, var(--card)) / 0.54);
  --react-theme-text: hsl(var(--faction-contrast, var(--theme-identity-sheen, var(--foreground))));
  --react-theme-muted: hsl(var(--faction-quiet, var(--muted-foreground)) / 0.78);
  --react-theme-primary: hsl(var(--faction-atmosphere-a, var(--theme-identity-glow, var(--primary))));
  --react-theme-accent: hsl(var(--faction-atmosphere-b, var(--theme-identity-haze, var(--accent))));
  --react-theme-highlight: hsl(var(--faction-atmosphere-c, var(--accent)));
  --react-theme-border: hsl(var(--faction-edge, var(--theme-identity-glow, var(--accent))) / 0.34);
  --react-theme-border-hot: hsl(var(--faction-edge, var(--theme-identity-glow, var(--accent))) / 0.56);
  --react-theme-glow: hsl(var(--faction-shadow, var(--theme-identity-glow, var(--primary))));
  --react-theme-danger: hsl(var(--destructive, 352 81% 58%));
  --react-theme-warning: hsl(var(--warning, 39 94% 62%));
  --react-theme-success: hsl(var(--success, 151 76% 55%));
}

body.command-os-shell {
  color: hsl(var(--faction-contrast)) !important;
  background:
    radial-gradient(ellipse at 10% 6%, hsl(var(--faction-atmosphere-a) / 0.34), transparent 32rem),
    radial-gradient(ellipse at 88% 10%, hsl(var(--faction-atmosphere-b) / 0.26), transparent 40rem),
    radial-gradient(ellipse at 50% 106%, hsl(var(--faction-atmosphere-c) / 0.18), transparent 56rem),
    linear-gradient(142deg, hsl(var(--faction-surface-b)), hsl(var(--background)) 42%, color-mix(in oklab, hsl(var(--faction-surface-b)) 74%, hsl(var(--faction-atmosphere-b)) 26%)) !important;
  background-size: auto !important;
}

body.command-os-shell::before {
  background:
    radial-gradient(ellipse at 18% 20%, hsl(var(--faction-atmosphere-a) / 0.18), transparent 24rem),
    radial-gradient(ellipse at 82% 22%, hsl(var(--faction-atmosphere-b) / 0.16), transparent 28rem),
    radial-gradient(ellipse at 50% 80%, hsl(var(--faction-atmosphere-c) / 0.1), transparent 36rem) !important;
  opacity: 0.82 !important;
}

body.command-os-shell::after {
  background:
    radial-gradient(ellipse at 25% 0%, hsl(var(--faction-contrast) / 0.08), transparent 34rem),
    linear-gradient(116deg, transparent 0 36%, hsl(var(--faction-atmosphere-a) / 0.1) 44%, transparent 58% 100%),
    linear-gradient(180deg, hsl(var(--faction-contrast) / 0.035), transparent 30%, hsl(var(--faction-atmosphere-b) / 0.04) 100%) !important;
  opacity: 0.16 !important;
}

body.command-os-shell .panel-ribbon-layer {
  background:
    radial-gradient(ellipse at 16% 8%, hsl(var(--faction-atmosphere-a) / 0.34), transparent 34rem),
    radial-gradient(ellipse at 86% 18%, hsl(var(--faction-atmosphere-b) / 0.28), transparent 38rem),
    radial-gradient(ellipse at 50% 100%, hsl(var(--faction-atmosphere-c) / 0.2), transparent 44rem),
    linear-gradient(120deg, transparent 0 32%, hsl(var(--faction-atmosphere-a) / 0.14) 46%, transparent 64% 100%) !important;
  opacity: 0.82 !important;
}

body.command-os-shell :where(.cos-shell-sidebar, .cos-shell-topbar, .panel-sidebar-command-head, .panel-theme-dock) {
  border-color: hsl(var(--faction-edge) / 0.44) !important;
  background:
    radial-gradient(ellipse at 15% 0%, hsl(var(--faction-atmosphere-a) / 0.22), transparent 22rem),
    radial-gradient(ellipse at 92% 18%, hsl(var(--faction-atmosphere-b) / 0.13), transparent 24rem),
    linear-gradient(180deg, hsl(var(--faction-surface-a) / 0.92), hsl(var(--faction-surface-b) / 0.78)) !important;
  background-size: auto !important;
  box-shadow:
    0 34px 92px -68px hsl(var(--faction-shadow) / 0.86),
    inset 0 1px 0 hsl(var(--faction-contrast) / 0.1) !important;
}

body.command-os-shell :where(.panel-nav-item, .panel-regiment-link, .panel-quick-item) {
  border-color: hsl(var(--faction-edge) / 0.16) !important;
  background:
    radial-gradient(ellipse at 12% 0%, hsl(var(--faction-atmosphere-a) / 0.08), transparent 15rem),
    linear-gradient(90deg, hsl(var(--faction-surface-a) / 0.42), hsl(var(--faction-surface-b) / 0.34)) !important;
  color: hsl(var(--faction-contrast) / 0.86) !important;
  background-size: auto !important;
}

body.command-os-shell :where(.panel-nav-item:hover, .panel-nav-item.is-active, .panel-regiment-link:hover, .panel-regiment-link.is-active, .panel-quick-item:hover) {
  border-color: hsl(var(--faction-edge) / 0.58) !important;
  background:
    radial-gradient(ellipse at 16% 0%, hsl(var(--faction-atmosphere-a) / 0.24), transparent 16rem),
    linear-gradient(90deg, hsl(var(--faction-atmosphere-a) / 0.18), hsl(var(--faction-atmosphere-b) / 0.12)) !important;
  color: hsl(var(--faction-contrast)) !important;
  box-shadow:
    inset 3px 0 0 hsl(var(--faction-edge) / 0.86),
    0 18px 42px -34px hsl(var(--faction-shadow) / 0.82) !important;
}

body.command-os-shell :where(.panel-surface, .panel-section-shell, .panel-stat, .liquid-panel, .liquid-surface, .command-surface, .command-row, .applications-shell-card, .applications-template-card, .applications-review-card, .applications-case-card, .applications-detail-card, .applications-stat-card, .applications-score-panel, .discord-shell-card, .command-center-card, .stats-surface, .notification-item) {
  border-color: hsl(var(--faction-edge) / 0.3) !important;
  background:
    radial-gradient(ellipse at 15% 0%, hsl(var(--faction-atmosphere-a) / 0.13), transparent 22rem),
    radial-gradient(ellipse at 92% 18%, hsl(var(--faction-atmosphere-b) / 0.08), transparent 24rem),
    linear-gradient(180deg, hsl(var(--faction-surface-a) / 0.82), hsl(var(--faction-surface-b) / 0.66)) !important;
  background-size: auto !important;
  box-shadow:
    0 26px 86px -64px hsl(var(--faction-shadow) / 0.72),
    inset 0 1px 0 hsl(var(--faction-contrast) / 0.08) !important;
}

body.command-os-shell :where(.itg-command-header, .itg-metric-grid article, .cos-status-spine article, .itg-glass-panel, .itg-quick-dock, .dashboard-legacy-modules) {
  border-color: hsl(var(--faction-edge) / 0.36) !important;
  background:
    radial-gradient(ellipse at 12% 0%, hsl(var(--faction-atmosphere-a) / 0.18), transparent 26rem),
    radial-gradient(ellipse at 94% 14%, hsl(var(--faction-atmosphere-b) / 0.12), transparent 30rem),
    linear-gradient(180deg, hsl(var(--faction-surface-a) / 0.76), hsl(var(--faction-surface-b) / 0.58)) !important;
  background-size: auto !important;
  box-shadow:
    0 32px 96px -68px hsl(var(--faction-shadow) / 0.78),
    inset 0 1px 0 hsl(var(--faction-contrast) / 0.08) !important;
}

body.command-os-shell :where(.cos-table-system, .table-shell, .liquid-table-shell) {
  border-color: hsl(var(--faction-edge) / 0.34) !important;
  background:
    radial-gradient(ellipse at 12% 0%, hsl(var(--faction-atmosphere-a) / 0.1), transparent 24rem),
    linear-gradient(180deg, hsl(var(--faction-surface-a) / 0.72), hsl(var(--faction-surface-b) / 0.7)) !important;
  background-size: auto !important;
}

body.command-os-shell :where(.cos-table-system, .table-shell, .liquid-table-shell) :where(thead, .liquid-table-head, th) {
  background:
    linear-gradient(90deg, hsl(var(--faction-atmosphere-a) / 0.18), hsl(var(--faction-atmosphere-b) / 0.1)) !important;
  color: hsl(var(--faction-contrast)) !important;
}

body.command-os-shell :where(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), textarea, select, .liquid-input, .form-control, .form-select, .command-select-trigger, .discord-sidebar-search-input) {
  border-color: hsl(var(--faction-edge) / 0.32) !important;
  background:
    radial-gradient(ellipse at 10% 0%, hsl(var(--faction-atmosphere-a) / 0.08), transparent 16rem),
    linear-gradient(180deg, hsl(var(--faction-surface-b) / 0.72), hsl(var(--faction-surface-a) / 0.5)) !important;
  background-size: auto !important;
  color: hsl(var(--faction-contrast)) !important;
}

body.command-os-shell :where(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), textarea, select, .liquid-input, .form-control, .form-select, .command-select-trigger, .discord-sidebar-search-input):focus {
  border-color: hsl(var(--faction-edge) / 0.72) !important;
  box-shadow:
    0 0 0 3px hsl(var(--faction-edge) / 0.16),
    inset 0 1px 0 hsl(var(--faction-contrast) / 0.08) !important;
}

body.command-os-shell :where(.command-btn, .liquid-button, .applications-primary-action, .applications-secondary-action, .discord-control-btn, .discord-plus-btn) {
  border-color: hsl(var(--faction-edge) / 0.38) !important;
  background:
    radial-gradient(ellipse at 18% 0%, hsl(var(--faction-atmosphere-a) / 0.18), transparent 16rem),
    linear-gradient(135deg, hsl(var(--faction-atmosphere-a) / 0.22), hsl(var(--faction-atmosphere-b) / 0.12)) !important;
  background-size: auto !important;
  color: hsl(var(--faction-contrast)) !important;
  box-shadow: 0 20px 48px -40px hsl(var(--faction-shadow) / 0.84) !important;
}

body.command-os-shell :where(.command-btn-primary, .liquid-button-primary, .applications-primary-action) {
  background:
    linear-gradient(135deg, hsl(var(--faction-atmosphere-a) / 0.88), hsl(var(--faction-atmosphere-b) / 0.64)),
    linear-gradient(180deg, hsl(var(--faction-contrast) / 0.14), transparent) !important;
  color: hsl(var(--primary-foreground)) !important;
  box-shadow:
    0 24px 62px -38px hsl(var(--faction-shadow) / 0.9),
    inset 0 1px 0 hsl(var(--faction-contrast) / 0.18) !important;
}

body.command-os-shell .panel-theme-chip {
  border-color: hsl(var(--faction-edge) / 0.22) !important;
  background:
    radial-gradient(ellipse at 12% 0%, hsl(var(--faction-atmosphere-a) / 0.09), transparent 12rem),
    linear-gradient(90deg, hsl(var(--faction-surface-a) / 0.58), hsl(var(--faction-surface-b) / 0.44)) !important;
}

body.command-os-shell .panel-theme-chip.is-active {
  border-color: hsl(var(--faction-edge) / 0.7) !important;
  background:
    radial-gradient(ellipse at 18% 0%, hsl(var(--faction-atmosphere-a) / 0.22), transparent 14rem),
    linear-gradient(90deg, hsl(var(--faction-atmosphere-a) / 0.2), hsl(var(--faction-atmosphere-b) / 0.12)) !important;
  box-shadow:
    0 20px 52px -36px hsl(var(--faction-shadow) / 0.88),
    inset 0 1px 0 hsl(var(--faction-contrast) / 0.12) !important;
}

body.command-os-shell .panel-theme-chip-swatch {
  border-color: hsl(var(--faction-edge) / 0.48) !important;
  box-shadow:
    0 0 0 1px hsl(var(--faction-contrast) / 0.08),
    0 0 22px hsl(var(--faction-shadow) / 0.22) !important;
}

.panel-theme-chip-swatch[data-theme-swatch="senate"] { --swatch-a: #081626; --swatch-b: #27d7ff; --swatch-c: #6d5cff; }
.panel-theme-chip-swatch[data-theme-swatch="senate-deluxe"] { --swatch-a: #050403; --swatch-b: #ffd76a; --swatch-c: #a26418; }
.panel-theme-chip-swatch[data-theme-swatch="501st"] { --swatch-a: #01040f; --swatch-b: #0f4cff; --swatch-c: #f6f8ff; }
.panel-theme-chip-swatch[data-theme-swatch="sith"] { --swatch-a: #130207; --swatch-b: #ff274b; --swatch-c: #7c031c; }
.panel-theme-chip-swatch[data-theme-swatch="purge"] { --swatch-a: #07000c; --swatch-b: #b85cff; --swatch-c: #f34cff; }
.panel-theme-chip-swatch[data-theme-swatch="41st"] { --swatch-a: #071409; --swatch-b: #26d866; --swatch-c: #8fbf35; }
.panel-theme-chip-swatch[data-theme-swatch="stormtrooper"] { --swatch-a: #f8fafc; --swatch-b: #111827; --swatch-c: #8ea0b8; }
.panel-theme-chip-swatch[data-theme-swatch="212th"] { --swatch-a: #170b05; --swatch-b: #f36b16; --swatch-c: #fff3df; }
.panel-theme-chip-swatch[data-theme-swatch="naval"] { --swatch-a: #020611; --swatch-b: #d8dce7; --swatch-c: #b68a3a; }
.panel-theme-chip-swatch[data-theme-swatch="dt"] { --swatch-a: #010701; --swatch-b: #39ff7a; --swatch-c: #00d084; }
.panel-theme-chip-swatch[data-theme-swatch="commandos"] { --swatch-a: #050609; --swatch-b: #d6dde6; --swatch-c: #d43f31; }

body.command-os-shell .panel-theme-chip-swatch::before {
  background:
    radial-gradient(circle at 20% 20%, var(--swatch-c, var(--swatch-b)), transparent 44%),
    linear-gradient(135deg, var(--swatch-a), var(--swatch-b)) !important;
}
.roster-row-active-absence {
  border-color: color-mix(in srgb, hsl(var(--warning, 38 92% 50%)) 42%, hsl(var(--border))) !important;
  box-shadow: inset 3px 0 0 rgba(34, 211, 238, 0.72), 0 18px 44px rgba(8, 15, 28, 0.22);
}

.commando-terminal-boot {
  background:
    linear-gradient(112deg, transparent 0 34%, rgba(226, 232, 240, 0.035) 46%, transparent 62% 100%),
    linear-gradient(180deg, rgba(226, 232, 240, 0.045), transparent 28%, rgba(212, 63, 49, 0.05) 100%),
    linear-gradient(135deg, rgba(11, 13, 18, 0.998), rgba(2, 4, 8, 0.998) 55%, rgba(17, 18, 22, 0.998)) !important;
  background-size: auto !important;
}

.commando-terminal-boot .ic-boot-emblem {
  display: grid;
  width: 6.8rem;
  height: 6.8rem;
  place-items: center;
  border: 1px solid rgba(226, 232, 240, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(226, 232, 240, 0.13), rgba(148, 163, 184, 0.04)),
    linear-gradient(180deg, rgba(8, 10, 15, 0.98), rgba(3, 5, 8, 0.98));
  color: #f8fafc;
  font-size: 2.35rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.035), 0 0 34px rgba(212, 63, 49, 0.18);
}

.ic-hub-shell {
  --ic-bg: #05070b;
  --ic-panel: rgba(12, 15, 21, 0.92);
  --ic-panel-2: rgba(18, 22, 30, 0.88);
  --ic-line: rgba(148, 163, 184, 0.22);
  --ic-line-strong: rgba(226, 232, 240, 0.36);
  --ic-text: #f8fafc;
  --ic-muted: #9ca3af;
  --ic-red: #d43f31;
  --ic-green: #4ade80;
  --ic-cyan: #67e8f9;
  color: var(--ic-text);
  display: grid;
  gap: 1.25rem;
}

.ic-hero-panel,
.ic-detail-hero,
.ic-panel,
.ic-metric-grid article,
.ic-report-card {
  border: 1px solid var(--ic-line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.045), transparent 38%),
    linear-gradient(135deg, var(--ic-panel), rgba(4, 7, 12, 0.94));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

.ic-hero-panel,
.ic-detail-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  min-height: 15rem;
}

.ic-hero-panel::before,
.ic-detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(112deg, transparent 0 32%, rgba(226, 232, 240, 0.045) 45%, transparent 58% 100%),
    linear-gradient(180deg, rgba(226, 232, 240, 0.035), transparent 42%),
    linear-gradient(135deg, rgba(212, 63, 49, 0.16), transparent 38%),
    linear-gradient(315deg, rgba(103, 232, 249, 0.10), transparent 34%);
  background-size: auto;
  opacity: 0.92;
}

.ic-hero-panel > *,
.ic-detail-hero > * {
  position: relative;
  z-index: 1;
}

.ic-kicker {
  margin: 0;
  color: var(--ic-muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.ic-hero-panel h2,
.ic-detail-hero h2 {
  margin: 0.45rem 0 0;
  max-width: 52rem;
  color: var(--ic-text);
  font-size: clamp(2rem, 5vw, 4.2rem);
  font-weight: 950;
  line-height: 0.98;
  text-transform: uppercase;
  letter-spacing: 0;
}

.ic-subcopy,
.ic-detail-hero p {
  max-width: 48rem;
  margin: 0.8rem 0 0;
  color: #cbd5e1;
  line-height: 1.65;
}

.ic-hero-actions,
.ic-status-stack {
  display: grid;
  gap: 0.45rem;
  min-width: min(18rem, 100%);
  border: 1px solid var(--ic-line);
  border-radius: 8px;
  background: rgba(3, 6, 11, 0.72);
  padding: 1rem;
}

.ic-hero-actions span,
.ic-status-stack span,
.ic-status-stack small {
  color: var(--ic-muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.ic-hero-actions strong,
.ic-status-stack strong {
  color: var(--ic-text);
  font-size: 1rem;
}

.ic-metric-grid,
.ic-command-grid,
.ic-detail-grid,
.ic-form-grid,
.ic-filter-grid,
.ic-report-grid {
  display: grid;
  gap: 1rem;
}

.ic-metric-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.ic-metric-grid article {
  padding: 1rem;
}

.ic-metric-grid span,
.ic-metric-grid small,
.ic-card-top span,
.ic-card-meta span,
.ic-band-strip span,
.ic-data-grid span,
.ic-band-board span {
  color: var(--ic-muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.ic-metric-grid strong {
  display: block;
  margin-top: 0.35rem;
  color: var(--ic-text);
  font-size: 2.1rem;
  line-height: 1;
}

.ic-command-grid,
.ic-detail-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(20rem, 0.65fr);
}

.ic-panel {
  padding: 1.15rem;
}

.ic-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.ic-panel h3 {
  margin: 0.25rem 0 0;
  color: var(--ic-text);
  font-size: 1.2rem;
  font-weight: 850;
  text-transform: uppercase;
}

.ic-chip,
.ic-secondary-link {
  border: 1px solid rgba(74, 222, 128, 0.26);
  border-radius: 999px;
  background: rgba(74, 222, 128, 0.08);
  color: #bbf7d0;
  padding: 0.4rem 0.7rem;
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
}

.ic-form,
.ic-form label,
.ic-side-stack {
  display: grid;
  gap: 0.9rem;
}

.ic-form-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ic-rating-grid,
.ic-band-board,
.ic-data-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ic-form label span {
  color: var(--ic-muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ic-form input,
.ic-form select,
.ic-form textarea,
.ic-filter-grid input,
.ic-filter-grid select {
  width: 100%;
  border: 1px solid var(--ic-line);
  border-radius: 8px;
  background: rgba(3, 6, 12, 0.88);
  color: var(--ic-text);
  padding: 0.82rem 0.92rem;
  outline: none;
}

.ic-form textarea {
  resize: vertical;
}

.ic-form input:focus,
.ic-form select:focus,
.ic-form textarea:focus,
.ic-filter-grid input:focus,
.ic-filter-grid select:focus {
  border-color: rgba(103, 232, 249, 0.55);
  box-shadow: 0 0 0 3px rgba(103, 232, 249, 0.08);
}

.ic-rating-grid label,
.ic-data-grid div,
.ic-band-board div,
.ic-lane-list article,
.ic-compact-list div,
.ic-timeline article {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 8px;
  background: rgba(3, 6, 12, 0.55);
  padding: 0.85rem;
}

.ic-rating-grid input {
  margin-top: 0.35rem;
}

.ic-primary-button,
.ic-secondary-button,
.ic-filter-grid button {
  border: 1px solid rgba(212, 63, 49, 0.45);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(212, 63, 49, 0.88), rgba(127, 29, 29, 0.82));
  color: #fff;
  cursor: pointer;
  font-weight: 900;
  letter-spacing: 0.16em;
  padding: 0.9rem 1rem;
  text-transform: uppercase;
}

.ic-secondary-button,
.ic-filter-grid button {
  border-color: rgba(103, 232, 249, 0.38);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(8, 47, 73, 0.68));
}

.ic-lane-list,
.ic-compact-list,
.ic-timeline {
  display: grid;
  gap: 0.75rem;
}

.ic-lane-list strong,
.ic-compact-list strong,
.ic-data-grid strong,
.ic-band-board strong {
  color: var(--ic-text);
}

.ic-lane-list span,
.ic-empty,
.ic-empty-state {
  color: var(--ic-muted);
  line-height: 1.55;
}

.ic-compact-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.ic-filter-grid {
  grid-template-columns: minmax(16rem, 1.4fr) repeat(5, minmax(9rem, 1fr));
  margin-bottom: 1rem;
}

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

.ic-report-card {
  color: inherit;
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
  text-decoration: none;
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.ic-report-card:hover {
  border-color: rgba(103, 232, 249, 0.48);
  transform: translateY(-2px);
}

.ic-card-top,
.ic-card-meta,
.ic-band-strip,
.ic-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.ic-card-top {
  justify-content: space-between;
}

.ic-card-top strong,
.ic-card-meta span,
.ic-band-strip span,
.ic-tag-row span {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  padding: 0.32rem 0.55rem;
}

.ic-report-card h4 {
  margin: 0;
  color: var(--ic-text);
  font-size: 1.05rem;
}

.ic-report-card p,
.ic-narrative p {
  color: #cbd5e1;
  line-height: 1.65;
}

.ic-empty-state {
  grid-column: 1 / -1;
  border: 1px dashed var(--ic-line);
  border-radius: 8px;
  background: rgba(3, 6, 12, 0.54);
  padding: 2rem;
  text-align: center;
}

.ic-narrative h3 {
  margin-top: 1.1rem;
  color: #e5e7eb;
  font-size: 0.95rem;
}

.ic-timeline article {
  display: grid;
  grid-template-columns: 8rem minmax(0, 1fr);
  gap: 1rem;
}

.ic-timeline article > span {
  color: var(--ic-cyan);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.ic-timeline small {
  display: block;
  color: var(--ic-muted);
  margin-top: 0.15rem;
}

@media (max-width: 1180px) {
  .ic-metric-grid,
  .ic-report-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ic-command-grid,
  .ic-detail-grid,
  .ic-filter-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .ic-hero-panel,
  .ic-detail-hero,
  .ic-panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .ic-metric-grid,
  .ic-form-grid,
  .ic-rating-grid,
  .ic-band-board,
  .ic-data-grid,
  .ic-report-grid,
  .ic-timeline article {
    grid-template-columns: 1fr;
  }
}

.ic-boot {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 28%, rgba(226, 232, 240, 0.12), transparent 28rem),
    radial-gradient(ellipse at 78% 18%, rgba(212, 63, 49, 0.12), transparent 26rem),
    linear-gradient(145deg, #020305, #070a10 48%, #111318);
  color: #f8fafc;
  transition: opacity 640ms ease, visibility 640ms ease, filter 640ms ease;
}

.ic-boot.is-complete {
  opacity: 0;
  visibility: hidden;
  filter: blur(10px);
}

.ic-boot-noise,
.ic-boot-visor,
.ic-boot-visor-left,
.ic-boot-visor-right,
.ic-boot-reticle {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.ic-boot-noise {
  opacity: 0.2;
  background:
    linear-gradient(112deg, transparent 0 34%, rgba(248, 250, 252, 0.05) 48%, transparent 64% 100%),
    linear-gradient(180deg, rgba(248, 250, 252, 0.035), transparent 42%, rgba(212, 63, 49, 0.04));
}

.ic-boot-visor-left,
.ic-boot-visor-right {
  top: 0;
  bottom: 0;
  width: 50%;
  background: linear-gradient(180deg, rgba(2, 4, 8, 0.96), rgba(8, 11, 16, 0.9));
  transition: transform 760ms cubic-bezier(.2,.9,.2,1);
}

.ic-boot-visor-left { left: 0; clip-path: polygon(0 0, 100% 0, 76% 100%, 0 100%); }
.ic-boot-visor-right { right: 0; clip-path: polygon(24% 0, 100% 0, 100% 100%, 0 100%); }
.ic-boot.is-complete .ic-boot-visor-left { transform: translateX(-102%); }
.ic-boot.is-complete .ic-boot-visor-right { transform: translateX(102%); }

.ic-boot-reticle {
  display: grid;
  place-items: center;
  opacity: 0.55;
}

.ic-boot-reticle span {
  position: absolute;
  border: 1px solid rgba(103, 232, 249, 0.18);
  border-radius: 999px;
  animation: ic-reticle-pulse 2.8s ease-in-out infinite;
}

.ic-boot-reticle span:nth-child(1) { width: 18rem; height: 18rem; }
.ic-boot-reticle span:nth-child(2) { width: 28rem; height: 28rem; animation-delay: 160ms; }
.ic-boot-reticle span:nth-child(3) { width: 40rem; height: 40rem; animation-delay: 320ms; }
.ic-boot-reticle span:nth-child(4) { width: 52rem; height: 52rem; animation-delay: 480ms; }

.ic-boot-console {
  position: relative;
  z-index: 2;
  width: min(58rem, calc(100vw - 2rem));
  border: 1px solid rgba(226, 232, 240, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.06), transparent 28%),
    linear-gradient(135deg, rgba(12, 16, 24, 0.92), rgba(3, 6, 11, 0.94));
  padding: clamp(1.25rem, 4vw, 2rem);
  box-shadow: 0 38px 140px rgba(0, 0, 0, 0.58);
}

.ic-boot-identity p,
.ic-boot-identity span,
.ic-boot-status span,
.ic-boot-percent {
  color: #9ca3af;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.ic-boot-identity h2 {
  margin: 0.4rem 0;
  font-size: clamp(2rem, 7vw, 5rem);
  font-weight: 950;
  line-height: 0.9;
  letter-spacing: 0;
  text-transform: uppercase;
}

.ic-boot-core {
  position: relative;
  display: grid;
  min-height: 17rem;
  place-items: center;
}

.ic-helmet-mark {
  position: relative;
  z-index: 2;
  display: grid;
  width: 9rem;
  height: 9rem;
  place-items: center;
  border: 1px solid rgba(226, 232, 240, 0.26);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.16), rgba(15, 23, 42, 0.72));
  box-shadow: 0 0 60px rgba(212, 63, 49, 0.18), inset 0 0 0 1px rgba(255,255,255,0.06);
}

.ic-helmet-logo {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 999px;
  object-fit: cover;
  object-position: center;
}

.ic-helmet-mark .ic-helmet-logo {
  width: 7.8rem;
  filter: drop-shadow(0 0 22px rgba(103, 232, 249, 0.22));
}

.ic-helmet-mark span {
  font-size: 3rem;
  font-weight: 950;
  letter-spacing: 0.12em;
}

.ic-boot-ring {
  position: absolute;
  border: 1px solid rgba(103, 232, 249, 0.24);
  border-radius: 999px;
  animation: ic-ring-spin 8s linear infinite;
}

.ic-boot-ring-a { width: 13rem; height: 13rem; }
.ic-boot-ring-b { width: 18rem; height: 18rem; animation-duration: 11s; animation-direction: reverse; }
.ic-boot-ring-c { width: 23rem; height: 23rem; border-color: rgba(212, 63, 49, 0.24); animation-duration: 15s; }

.ic-boot-status {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

.ic-boot-status strong {
  display: block;
  margin-top: 0.3rem;
  font-size: 1rem;
  text-transform: uppercase;
}

.ic-boot-bar {
  height: 0.75rem;
  margin-top: 1rem;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 999px;
  background: rgba(2, 6, 12, 0.88);
}

.ic-boot-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #67e8f9, #f8fafc, #d43f31);
  transition: width 180ms ease;
}

.ic-boot-checks {
  display: grid;
  gap: 0.5rem;
  margin-top: 1rem;
}

.ic-boot-checks div {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 8px;
  background: rgba(2, 6, 12, 0.54);
  padding: 0.65rem 0.75rem;
  color: #6b7280;
  transition: border-color 180ms ease, color 180ms ease, background 180ms ease;
}

.ic-boot-checks div span {
  width: 0.55rem;
  height: 0.55rem;
  border: 1px solid rgba(148, 163, 184, 0.42);
  border-radius: 999px;
}

.ic-boot-checks div.is-complete {
  border-color: rgba(103, 232, 249, 0.3);
  background: rgba(8, 47, 73, 0.18);
  color: #e5e7eb;
}

.ic-boot-checks div.is-complete span {
  border-color: rgba(103, 232, 249, 0.78);
  background: #67e8f9;
  box-shadow: 0 0 18px rgba(103, 232, 249, 0.5);
}

.js-ic-surface {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 420ms ease, transform 520ms ease;
}

.js-ic-surface.is-visible {
  opacity: 1;
  transform: translateY(0);
}

[data-ic-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 360ms ease, transform 440ms ease;
}

[data-ic-reveal].is-visible,
.js-ic-surface.is-visible [data-ic-reveal] {
  opacity: 1;
  transform: translateY(0);
}

.ic-os-shell {
  display: grid;
  gap: 1rem;
  color: #f8fafc;
}

.ic-home-shell {
  position: relative;
  isolation: isolate;
}

.ic-home-shell::before {
  content: "";
  position: absolute;
  inset: -1rem;
  z-index: -1;
  border-radius: 18px;
  background:
    radial-gradient(ellipse at 4% 4%, rgba(103, 232, 249, 0.16), rgba(103, 232, 249, 0) 20rem),
    radial-gradient(ellipse at 94% 14%, rgba(226, 232, 240, 0.11), rgba(226, 232, 240, 0) 24rem),
    radial-gradient(ellipse at 50% 100%, rgba(212, 63, 49, 0.16), rgba(212, 63, 49, 0) 28rem);
  pointer-events: none;
}

.ic-os-nav {
  display: grid;
  grid-template-columns: minmax(12rem, 1.25fr) repeat(8, minmax(0, 1fr));
  gap: 0.6rem;
}

.ic-os-nav a,
.ic-lane-card,
.ic-mission-card,
.ic-readiness-row,
.ic-alert-list a,
.ic-compact-mission-list a,
.ic-archive-table a {
  color: inherit;
  text-decoration: none;
}

.ic-os-brand,
.ic-os-nav a {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.75), rgba(3, 7, 13, 0.72));
  padding: 0.75rem;
}

.ic-os-brand {
  display: flex;
  gap: 0.7rem;
  align-items: center;
}

.ic-os-brand .ic-helmet-logo {
  width: 2.7rem;
  flex: 0 0 auto;
  filter: drop-shadow(0 0 14px rgba(103, 232, 249, 0.18));
}

.ic-os-nav a span,
.ic-os-brand span {
  display: block;
  color: #9ca3af;
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.ic-os-nav a strong,
.ic-os-brand strong {
  display: block;
  margin-top: 0.22rem;
  color: #f8fafc;
  font-size: 0.88rem;
}

.ic-os-nav a.is-active,
.ic-os-nav-action {
  border-color: rgba(103, 232, 249, 0.42);
  background: linear-gradient(135deg, rgba(8, 47, 73, 0.72), rgba(15, 23, 42, 0.78));
}

.ic-home-hero {
  min-height: 24rem;
  background:
    radial-gradient(ellipse at 75% 35%, rgba(248, 250, 252, 0.18), rgba(248, 250, 252, 0) 16rem),
    radial-gradient(ellipse at 16% 10%, rgba(103, 232, 249, 0.17), rgba(103, 232, 249, 0) 24rem),
    linear-gradient(135deg, rgba(9, 12, 18, 0.96), rgba(2, 5, 10, 0.98) 58%, rgba(21, 7, 8, 0.94));
  box-shadow: 0 34px 130px rgba(0, 0, 0, 0.48);
}

.ic-home-hero::before,
.ic-home-hero::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.ic-home-hero::before {
  inset: 1rem;
  border: 1px solid rgba(226, 232, 240, 0.08);
  border-radius: 8px;
  clip-path: polygon(0 0, 82% 0, 100% 32%, 100% 100%, 18% 100%, 0 68%);
}

.ic-home-hero::after {
  right: 8%;
  bottom: 2rem;
  width: 18rem;
  height: 0.18rem;
  background: linear-gradient(90deg, rgba(103, 232, 249, 0), rgba(103, 232, 249, 0.78), rgba(212, 63, 49, 0.62));
  box-shadow: 0 0 34px rgba(103, 232, 249, 0.32);
}

.ic-home-hero-grid {
  position: relative;
  z-index: 1;
  align-items: end;
}

.ic-home-hero-copy h2 {
  margin: 0.35rem 0 0;
  color: #f8fafc;
  font-size: clamp(3.5rem, 10vw, 9rem);
  font-weight: 950;
  letter-spacing: 0;
  line-height: 0.82;
  text-transform: uppercase;
}

.ic-home-id-card {
  display: grid;
  justify-items: center;
  gap: 1rem;
  border: 1px solid rgba(226, 232, 240, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0)),
    rgba(3, 6, 12, 0.58);
  padding: 1.2rem;
  text-align: center;
}

.ic-home-logo-ring {
  display: grid;
  width: min(14rem, 52vw);
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(103, 232, 249, 0.28);
  border-radius: 999px;
  background:
    radial-gradient(circle, rgba(248, 250, 252, 0.11), rgba(3, 6, 12, 0.78) 64%),
    conic-gradient(from 45deg, rgba(103, 232, 249, 0.48), rgba(248, 250, 252, 0.18), rgba(212, 63, 49, 0.48), rgba(103, 232, 249, 0.48));
  box-shadow: inset 0 0 0 0.5rem rgba(2, 6, 12, 0.86), 0 0 54px rgba(103, 232, 249, 0.18);
}

.ic-home-logo-ring .ic-helmet-logo {
  width: 78%;
  border: 1px solid rgba(248, 250, 252, 0.18);
  box-shadow: 0 0 32px rgba(0, 0, 0, 0.5);
}

.ic-home-id-card span,
.ic-performance-card span,
.ic-hud-metrics span,
.ic-action-card span,
.ic-flow-list span {
  color: #9ca3af;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ic-home-id-card strong {
  display: block;
  color: #f8fafc;
  font-size: 1.25rem;
}

.ic-home-id-card small {
  color: #cbd5e1;
}

.ic-personal-command-grid {
  align-items: stretch;
}

.ic-section-minihead {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 0.75rem;
}

.ic-section-minihead h3 {
  margin: 0;
  color: #f8fafc;
  font-size: 1.15rem;
}

.ic-performance-card,
.ic-home-panel,
.ic-action-card,
.ic-flow-list a {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0)),
    rgba(3, 6, 12, 0.66);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
}

.ic-performance-card {
  display: grid;
  gap: 0.35rem;
  min-height: 8rem;
  padding: 1rem;
}

.ic-performance-card strong {
  color: #f8fafc;
  font-size: 2rem;
  font-weight: 950;
  line-height: 1;
}

.ic-performance-card small {
  color: #cbd5e1;
}

.ic-home-panel {
  overflow: hidden;
  padding: 1rem;
}

.ic-weekly-quota {
  border-color: rgba(103, 232, 249, 0.28);
  background:
    radial-gradient(ellipse at 18% 0%, rgba(103, 232, 249, 0.15), transparent 24rem),
    radial-gradient(ellipse at 88% 8%, rgba(74, 222, 128, 0.1), transparent 18rem),
    linear-gradient(135deg, rgba(2, 6, 12, 0.9), rgba(3, 10, 20, 0.82));
}

.ic-quota-week {
  border: 1px solid rgba(103, 232, 249, 0.34);
  border-radius: 999px;
  background: rgba(8, 47, 73, 0.28);
  color: #a5f3fc;
  padding: 0.42rem 0.72rem;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.ic-quota-requirements {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.ic-quota-requirements article {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.48);
  padding: 0.85rem;
}

.ic-quota-requirements span,
.ic-quota-bars span,
.ic-quota-splits span {
  color: #9ca3af;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ic-quota-requirements strong {
  display: block;
  margin-top: 0.28rem;
  color: #f8fafc;
  font-size: 1.2rem;
  font-weight: 950;
}

.ic-quota-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: 0.75rem;
}

.ic-quota-operator {
  display: grid;
  gap: 0.85rem;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0)),
    rgba(2, 6, 12, 0.7);
  padding: 0.9rem;
}

.ic-quota-operator.is-current {
  border-color: rgba(103, 232, 249, 0.46);
  box-shadow: 0 0 36px rgba(103, 232, 249, 0.08);
}

.ic-quota-operator.is-complete {
  border-color: rgba(74, 222, 128, 0.32);
}

.ic-quota-operator-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.7rem;
}

.ic-quota-avatar {
  display: grid;
  width: 2.8rem;
  aspect-ratio: 1;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(103, 232, 249, 0.35);
  border-radius: 999px;
  background: rgba(8, 47, 73, 0.4);
  color: #67e8f9;
  font-weight: 950;
}

.ic-quota-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ic-quota-operator-head strong {
  display: block;
  overflow: hidden;
  color: #f8fafc;
  font-size: 0.98rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ic-quota-operator-head small {
  display: block;
  color: #cbd5e1;
  font-size: 0.76rem;
}

.ic-quota-status {
  border: 1px solid rgba(103, 232, 249, 0.28);
  border-radius: 999px;
  color: #a5f3fc;
  padding: 0.28rem 0.52rem;
  font-size: 0.66rem;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.ic-quota-operator.is-complete .ic-quota-status {
  border-color: rgba(74, 222, 128, 0.36);
  color: #bbf7d0;
}

.ic-quota-bars {
  display: grid;
  gap: 0.62rem;
}

.ic-quota-track {
  position: relative;
  height: 0.48rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.84);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.12);
}

.ic-quota-track i {
  display: block;
  width: var(--ic-quota-progress, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0891b2, #67e8f9);
  box-shadow: 0 0 18px rgba(103, 232, 249, 0.3);
}

.ic-quota-track.is-arc i {
  background: linear-gradient(90deg, #15803d, #86efac);
}

.ic-quota-splits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}

.ic-quota-splits span {
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.38);
  padding: 0.55rem;
}

.ic-quota-splits strong {
  display: block;
  margin-top: 0.2rem;
  color: #f8fafc;
  font-size: 0.95rem;
}

.ic-performance-shell {
  position: relative;
  isolation: isolate;
}

.ic-performance-shell::before {
  content: "";
  position: absolute;
  inset: -1rem;
  z-index: -1;
  border-radius: 18px;
  background:
    linear-gradient(rgba(103, 232, 249, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(103, 232, 249, 0.035) 1px, transparent 1px),
    radial-gradient(ellipse at 12% 4%, rgba(103, 232, 249, 0.14), transparent 24rem),
    radial-gradient(ellipse at 92% 16%, rgba(74, 222, 128, 0.1), transparent 22rem),
    radial-gradient(ellipse at 50% 100%, rgba(248, 113, 113, 0.12), transparent 26rem);
  background-size: 34px 34px, 34px 34px, auto, auto, auto;
  pointer-events: none;
}

.ic-performance-hero,
.ic-performance-panel,
.ic-performance-metrics article,
.ic-operator-signal {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0)),
    rgba(2, 6, 12, 0.72);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.28);
}

.ic-performance-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(16rem, 0.34fr);
  gap: 1rem;
  align-items: center;
  min-height: 24rem;
  overflow: hidden;
  padding: clamp(1.2rem, 3vw, 2rem);
  background:
    radial-gradient(ellipse at 74% 42%, rgba(103, 232, 249, 0.18), transparent 18rem),
    radial-gradient(ellipse at 22% 2%, rgba(248, 250, 252, 0.12), transparent 24rem),
    linear-gradient(135deg, rgba(2, 6, 12, 0.96), rgba(3, 13, 24, 0.92) 56%, rgba(12, 5, 8, 0.94));
}

.ic-performance-hero h2 {
  margin: 0.35rem 0 0;
  color: #f8fafc;
  font-size: clamp(3rem, 8vw, 7.4rem);
  font-weight: 950;
  letter-spacing: 0;
  line-height: 0.84;
  text-transform: uppercase;
}

.ic-performance-hero p:not(.ic-kicker) {
  max-width: 48rem;
  color: #cbd5e1;
  line-height: 1.65;
}

.ic-performance-hero-actions,
.ic-performance-tabs,
.ic-performance-period {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}

.ic-performance-orb,
.ic-personal-radar-core {
  display: grid;
  place-items: center;
}

.ic-performance-orb-core,
.ic-personal-radar-core {
  display: grid;
  width: min(18rem, 72vw);
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(103, 232, 249, 0.32);
  border-radius: 999px;
  background:
    radial-gradient(circle, rgba(2, 6, 12, 0.94) 0 48%, transparent 49%),
    conic-gradient(#67e8f9 var(--ic-performance-pct, 0%), rgba(15, 23, 42, 0.8) 0),
    radial-gradient(circle, rgba(103, 232, 249, 0.16), transparent 70%);
  box-shadow: inset 0 0 0 1rem rgba(2, 6, 12, 0.7), 0 0 56px rgba(103, 232, 249, 0.16);
  text-align: center;
}

.ic-performance-orb-core span,
.ic-personal-radar-core span,
.ic-performance-metrics span,
.ic-war-room-grid span,
.ic-operator-signal span,
.ic-personal-stats span {
  color: #9ca3af;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ic-performance-orb-core strong,
.ic-personal-radar-core strong {
  display: block;
  color: #f8fafc;
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 950;
  line-height: 1;
}

.ic-performance-orb-core small,
.ic-personal-radar-core small,
.ic-war-room-grid small,
.ic-operator-signal small {
  color: #cbd5e1;
}

.ic-performance-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
}

.ic-performance-metrics article {
  min-height: 8rem;
  padding: 1rem;
}

.ic-performance-metrics strong {
  display: block;
  margin-top: 0.45rem;
  color: #f8fafc;
  font-size: 2.15rem;
  font-weight: 950;
  line-height: 1;
}

.ic-performance-metrics small {
  display: block;
  margin-top: 0.45rem;
  color: #cbd5e1;
}

.ic-performance-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.34fr) minmax(20rem, 0.66fr);
  gap: 1rem;
}

.ic-performance-panel {
  overflow: hidden;
  padding: 1rem;
}

.ic-chart-console {
  min-height: 32rem;
  border-color: rgba(103, 232, 249, 0.26);
  background:
    radial-gradient(ellipse at 16% 0%, rgba(103, 232, 249, 0.13), transparent 26rem),
    linear-gradient(135deg, rgba(2, 6, 12, 0.88), rgba(3, 10, 20, 0.78));
}

.ic-performance-tabs button,
.ic-performance-period {
  border: 1px solid rgba(103, 232, 249, 0.24);
  border-radius: 999px;
  background: rgba(8, 47, 73, 0.28);
  color: #a5f3fc;
  padding: 0.44rem 0.66rem;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.ic-performance-tabs button {
  cursor: pointer;
}

.ic-performance-tabs button.is-active,
.ic-performance-tabs button:hover {
  border-color: rgba(103, 232, 249, 0.52);
  background: rgba(14, 116, 144, 0.28);
  color: #f8fafc;
}

.ic-performance-chart-stage {
  min-height: 24rem;
  margin-top: 1rem;
}

.ic-performance-chart-stage svg {
  display: block;
  width: 100%;
  height: auto;
}

.ic-performance-chart-caption {
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  color: #cbd5e1;
  padding-top: 0.7rem;
  font-size: 0.86rem;
}

.ic-war-room {
  border-color: rgba(250, 204, 21, 0.22);
  background:
    radial-gradient(ellipse at 100% 0%, rgba(250, 204, 21, 0.11), transparent 18rem),
    rgba(2, 6, 12, 0.72);
}

.ic-war-room-grid {
  display: grid;
  gap: 0.7rem;
}

.ic-war-room-grid article {
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.42);
  padding: 0.85rem;
}

.ic-war-room-grid strong {
  display: block;
  margin-top: 0.3rem;
  overflow-wrap: anywhere;
  color: #f8fafc;
  font-size: 1.08rem;
  font-weight: 950;
}

.ic-operator-signal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  gap: 0.75rem;
}

.ic-operator-signal {
  display: grid;
  gap: 0.85rem;
  padding: 0.9rem;
}

.ic-operator-signal.is-current {
  border-color: rgba(103, 232, 249, 0.44);
  box-shadow: 0 0 42px rgba(103, 232, 249, 0.09);
}

.ic-operator-signal.is-clear {
  border-color: rgba(74, 222, 128, 0.32);
}

.ic-operator-signal.is-danger {
  border-color: rgba(248, 113, 113, 0.36);
}

.ic-operator-signal-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.7rem;
}

.ic-operator-signal-head strong {
  display: block;
  overflow: hidden;
  color: #f8fafc;
  font-size: 1rem;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ic-operator-signal-head em {
  border: 1px solid rgba(103, 232, 249, 0.24);
  border-radius: 999px;
  color: #a5f3fc;
  padding: 0.28rem 0.48rem;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.ic-operator-bars {
  display: grid;
  gap: 0.52rem;
}

.ic-operator-bars span {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.ic-operator-bars b {
  color: #f8fafc;
}

.ic-operator-mini-stats,
.ic-personal-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.ic-operator-mini-stats span,
.ic-personal-stats article {
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.38);
  padding: 0.58rem;
}

.ic-operator-mini-stats b,
.ic-personal-stats strong {
  display: block;
  color: #f8fafc;
  font-size: 1.1rem;
  font-weight: 950;
}

.ic-personal-uplink {
  border-color: rgba(74, 222, 128, 0.22);
  background:
    radial-gradient(ellipse at 0% 0%, rgba(74, 222, 128, 0.12), transparent 18rem),
    rgba(2, 6, 12, 0.72);
}

.ic-personal-radar {
  display: grid;
  grid-template-columns: minmax(12rem, 0.42fr) minmax(0, 0.58fr);
  gap: 1rem;
  align-items: center;
}

.ic-personal-radar-core {
  width: min(13rem, 68vw);
}

.ic-personal-stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ic-regiment-telemetry-shell {
  position: relative;
  isolation: isolate;
}

.ic-regiment-telemetry-shell::before {
  content: "";
  position: absolute;
  inset: -1rem;
  z-index: -1;
  border-radius: 18px;
  background:
    linear-gradient(rgba(103, 232, 249, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(103, 232, 249, 0.032) 1px, transparent 1px),
    radial-gradient(ellipse at 6% 12%, rgba(74, 222, 128, 0.12), transparent 22rem),
    radial-gradient(ellipse at 92% 4%, rgba(103, 232, 249, 0.14), transparent 26rem),
    radial-gradient(ellipse at 70% 100%, rgba(250, 204, 21, 0.1), transparent 24rem);
  background-size: 38px 38px, 38px 38px, auto, auto, auto;
  pointer-events: none;
}

.ic-regiment-telemetry-hero,
.ic-regiment-rail,
.ic-regiment-selected-panel,
.ic-regiment-chart-panel,
.ic-readiness-scanner,
.ic-top-troopers,
.ic-trooper-deep-dive {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0)),
    rgba(2, 6, 12, 0.72);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.28);
}

.ic-regiment-telemetry-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(22rem, 0.72fr);
  gap: 1rem;
  align-items: end;
  min-height: 21rem;
  overflow: hidden;
  padding: clamp(1.2rem, 3vw, 2rem);
  background:
    radial-gradient(ellipse at 74% 38%, rgba(74, 222, 128, 0.15), transparent 20rem),
    radial-gradient(ellipse at 14% 0%, rgba(103, 232, 249, 0.16), transparent 24rem),
    linear-gradient(135deg, rgba(2, 6, 12, 0.96), rgba(3, 13, 24, 0.92) 58%, rgba(4, 20, 17, 0.94));
}

.ic-regiment-telemetry-hero h2 {
  margin: 0.35rem 0 0;
  color: #f8fafc;
  font-size: clamp(2.8rem, 7vw, 6.6rem);
  font-weight: 950;
  letter-spacing: 0;
  line-height: 0.86;
  text-transform: uppercase;
}

.ic-regiment-telemetry-hero p:not(.ic-kicker) {
  max-width: 46rem;
  color: #cbd5e1;
  line-height: 1.65;
}

.ic-regiment-telemetry-overview,
.ic-regiment-kpi-grid,
.ic-trooper-profile-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.ic-regiment-telemetry-overview article,
.ic-regiment-kpi-grid article,
.ic-trooper-profile-stats article {
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.42);
  padding: 0.85rem;
}

.ic-regiment-telemetry-overview span,
.ic-regiment-kpi-grid span,
.ic-regiment-list span,
.ic-readiness-signal-list span,
.ic-trooper-table span,
.ic-trooper-profile span,
.ic-trooper-search-results span,
.ic-trooper-profile-stats span {
  color: #9ca3af;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.ic-regiment-telemetry-overview strong,
.ic-regiment-kpi-grid strong,
.ic-regiment-list strong,
.ic-readiness-signal-list strong,
.ic-trooper-table strong,
.ic-trooper-profile strong,
.ic-trooper-search-results strong,
.ic-trooper-profile-stats strong {
  display: block;
  margin-top: 0.26rem;
  overflow-wrap: anywhere;
  color: #f8fafc;
  font-weight: 950;
}

.ic-regiment-telemetry-overview strong,
.ic-regiment-kpi-grid strong {
  font-size: 1.35rem;
}

.ic-regiment-telemetry-overview small,
.ic-regiment-list small,
.ic-trooper-table small,
.ic-trooper-profile small,
.ic-trooper-search-results small {
  color: #cbd5e1;
}

.ic-regiment-telemetry-layout,
.ic-regiment-telemetry-grid {
  display: grid;
  gap: 1rem;
}

.ic-regiment-telemetry-layout {
  grid-template-columns: minmax(18rem, 0.34fr) minmax(0, 1fr);
  align-items: start;
}

.ic-regiment-main {
  display: grid;
  gap: 1rem;
}

.ic-regiment-rail,
.ic-regiment-selected-panel,
.ic-regiment-chart-panel,
.ic-readiness-scanner,
.ic-top-troopers,
.ic-trooper-deep-dive {
  padding: 1rem;
}

.ic-regiment-search,
.ic-trooper-search-box input {
  width: 100%;
  border: 1px solid rgba(103, 232, 249, 0.22);
  border-radius: 8px;
  background: rgba(2, 6, 12, 0.68);
  color: #f8fafc;
  padding: 0.78rem 0.85rem;
}

.ic-regiment-list,
.ic-readiness-signal-list,
.ic-trooper-table,
.ic-trooper-search-results,
.ic-trooper-file-list,
.ic-trooper-regiments {
  display: grid;
  gap: 0.62rem;
  margin-top: 0.85rem;
}

.ic-regiment-list a,
.ic-trooper-table button,
.ic-trooper-search-results button,
.ic-trooper-file-list a,
.ic-trooper-profile-links a,
.ic-trooper-regiments span,
.ic-readiness-signal-list article {
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.42);
  color: inherit;
  padding: 0.85rem;
  text-align: left;
  text-decoration: none;
}

.ic-trooper-table button,
.ic-trooper-search-results button {
  cursor: pointer;
}

.ic-regiment-list a:hover,
.ic-regiment-list a.is-active,
.ic-trooper-table button:hover,
.ic-trooper-search-results button:hover,
.ic-trooper-file-list a:hover {
  border-color: rgba(103, 232, 249, 0.46);
  background: rgba(8, 47, 73, 0.22);
}

.ic-regiment-pulse,
.ic-regiment-chart-tabs button,
.ic-trooper-profile-links a {
  border: 1px solid rgba(103, 232, 249, 0.24);
  border-radius: 999px;
  background: rgba(8, 47, 73, 0.28);
  color: #a5f3fc;
  padding: 0.44rem 0.66rem;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.ic-regiment-telemetry-grid {
  grid-template-columns: minmax(0, 1.12fr) minmax(20rem, 0.88fr);
}

.ic-regiment-chart-panel {
  border-color: rgba(103, 232, 249, 0.24);
}

.ic-regiment-chart-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ic-regiment-chart-tabs button {
  cursor: pointer;
}

.ic-regiment-chart-tabs button.is-active,
.ic-regiment-chart-tabs button:hover {
  border-color: rgba(103, 232, 249, 0.52);
  background: rgba(14, 116, 144, 0.28);
  color: #f8fafc;
}

.ic-regiment-chart-stage {
  min-height: 22rem;
  margin-top: 1rem;
}

.ic-regiment-chart-stage svg {
  display: block;
  width: 100%;
  height: auto;
}

.ic-regiment-chart-caption {
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  color: #cbd5e1;
  padding-top: 0.7rem;
  font-size: 0.86rem;
}

.ic-readiness-signal-list article.is-danger {
  border-color: rgba(248, 113, 113, 0.35);
}

.ic-readiness-signal-list article.is-watch {
  border-color: rgba(250, 204, 21, 0.35);
}

.ic-readiness-signal-list article.is-clear {
  border-color: rgba(74, 222, 128, 0.35);
}

.ic-trooper-profile {
  display: grid;
  gap: 0.85rem;
  margin-top: 0.85rem;
  border: 1px solid rgba(103, 232, 249, 0.22);
  border-radius: 8px;
  background:
    radial-gradient(ellipse at 0% 0%, rgba(103, 232, 249, 0.1), transparent 16rem),
    rgba(2, 6, 12, 0.62);
  padding: 1rem;
}

.ic-trooper-profile-head {
  display: flex;
  justify-content: space-between;
  gap: 0.85rem;
  align-items: start;
}

.ic-trooper-profile-head em {
  border: 1px solid rgba(74, 222, 128, 0.28);
  border-radius: 999px;
  color: #bbf7d0;
  padding: 0.38rem 0.62rem;
  font-style: normal;
  font-weight: 950;
  white-space: nowrap;
}

.ic-trooper-profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ic-launchpad {
  background:
    radial-gradient(ellipse at 0% 0%, rgba(103, 232, 249, 0.13), rgba(103, 232, 249, 0) 22rem),
    linear-gradient(135deg, rgba(4, 8, 14, 0.88), rgba(2, 5, 10, 0.8));
}

.ic-action-card {
  display: grid;
  gap: 0.45rem;
  min-height: 9rem;
  color: inherit;
  padding: 1rem;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.ic-action-card:hover,
.ic-flow-list a:hover {
  border-color: rgba(103, 232, 249, 0.46);
  transform: translateY(-2px);
}

.ic-action-card strong,
.ic-flow-list strong {
  color: #f8fafc;
}

.ic-action-card small,
.ic-flow-list small {
  color: #cbd5e1;
  line-height: 1.5;
}

.ic-action-card.is-red {
  border-color: rgba(212, 63, 49, 0.26);
}

.ic-action-card.is-green {
  border-color: rgba(74, 222, 128, 0.24);
}

.ic-action-card.is-amber {
  border-color: rgba(245, 158, 11, 0.28);
}

.ic-flow-list {
  display: grid;
  gap: 0.65rem;
}

.ic-flow-list a {
  display: grid;
  gap: 0.35rem;
  color: inherit;
  padding: 0.9rem;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease;
}

.ic-hud-strip {
  border-color: rgba(103, 232, 249, 0.22);
}

.ic-hud-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 0.8rem;
}

.ic-hud-metrics article {
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.46);
  padding: 0.8rem;
}

.ic-hud-metrics strong {
  display: block;
  margin-top: 0.2rem;
  color: #f8fafc;
  font-size: 1.5rem;
  font-weight: 950;
}

.ic-identity-panel {
  border-color: rgba(212, 63, 49, 0.22);
  background:
    radial-gradient(ellipse at 100% 0%, rgba(212, 63, 49, 0.16), transparent 22rem),
    radial-gradient(ellipse at 0% 20%, rgba(103, 232, 249, 0.12), transparent 22rem),
    rgba(3, 6, 12, 0.7);
}

.ic-identity-onboarding,
.ic-identity-card,
.ic-identity-revoke-form,
.ic-active-identity-mini {
  display: grid;
  gap: 0.85rem;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 8px;
  background: rgba(2, 6, 12, 0.58);
  padding: 1rem;
}

.ic-identity-onboarding {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.ic-identity-onboarding h3,
.ic-identity-card h3 {
  margin: 0.25rem 0;
  color: #f8fafc;
  font-size: clamp(1.4rem, 4vw, 2.4rem);
  font-weight: 950;
  letter-spacing: 0.02em;
}

.ic-identity-onboarding p,
.ic-identity-card p,
.ic-active-identity-mini small {
  color: #cbd5e1;
  line-height: 1.6;
}

.ic-identity-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border-color: rgba(103, 232, 249, 0.24);
}

.ic-identity-status {
  border: 1px solid rgba(103, 232, 249, 0.32);
  border-radius: 999px;
  background: rgba(8, 47, 73, 0.34);
  color: #67e8f9;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  padding: 0.45rem 0.7rem;
  text-transform: uppercase;
}

.ic-identity-revoke-form {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  margin-top: 0.85rem;
  border-color: rgba(248, 113, 113, 0.24);
}

.ic-identity-history,
.ic-seal-grid {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.85rem;
}

.ic-identity-history {
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
}

.ic-identity-history article,
.ic-seal-card {
  display: grid;
  gap: 0.35rem;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.48);
  padding: 0.85rem;
}

.ic-identity-history span,
.ic-seal-card span,
.ic-active-identity-mini span {
  color: #9ca3af;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ic-identity-history strong,
.ic-seal-card strong,
.ic-active-identity-mini strong {
  color: #f8fafc;
  font-size: 1.05rem;
}

.ic-identity-history small,
.ic-seal-card small {
  color: #cbd5e1;
  line-height: 1.45;
}

.ic-active-identity-mini.is-sealed {
  border-color: rgba(103, 232, 249, 0.34);
  background:
    linear-gradient(135deg, rgba(103, 232, 249, 0.12), transparent 52%),
    rgba(3, 12, 21, 0.72);
  box-shadow: inset 0 0 0 1px rgba(103, 232, 249, 0.06);
}

.ic-active-identity-mini.is-sealed span {
  color: #67e8f9;
}

.ic-identifier-seal-panel {
  border-color: rgba(103, 232, 249, 0.22);
}

.ic-pdf-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: flex-end;
}

.ic-pdf-actions.is-stacked {
  display: grid;
  justify-content: stretch;
  margin-top: 0.85rem;
}

.ic-pdf-actions.is-stacked a {
  justify-content: center;
}

.ic-seal-card {
  border-color: rgba(212, 63, 49, 0.22);
  background:
    linear-gradient(135deg, rgba(248, 250, 252, 0.06), transparent),
    rgba(3, 6, 12, 0.68);
}

.ic-seal-card em {
  color: #67e8f9;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ic-os-hero,
.ic-section-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: end;
  min-height: 22rem;
  border: 1px solid rgba(226, 232, 240, 0.18);
  border-radius: 8px;
  background:
    radial-gradient(ellipse at 78% 28%, rgba(212, 63, 49, 0.2), transparent 28rem),
    radial-gradient(ellipse at 18% 10%, rgba(103, 232, 249, 0.12), transparent 30rem),
    linear-gradient(135deg, rgba(10, 14, 22, 0.94), rgba(2, 5, 10, 0.96));
  padding: clamp(1.2rem, 4vw, 2rem);
  box-shadow: 0 34px 110px rgba(0, 0, 0, 0.42);
}

.ic-os-hero::after,
.ic-section-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(112deg, transparent 0 32%, rgba(248, 250, 252, 0.045) 48%, transparent 68% 100%),
    linear-gradient(180deg, rgba(248, 250, 252, 0.035), transparent 36%, rgba(212, 63, 49, 0.04));
  pointer-events: none;
}

.ic-os-hero > *,
.ic-section-hero > * {
  position: relative;
  z-index: 1;
}

.ic-section-hero {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.ic-os-hero h2,
.ic-section-hero h2 {
  margin: 0.4rem 0 0;
  max-width: 54rem;
  color: #f8fafc;
  font-size: clamp(2.5rem, 8vw, 6.8rem);
  font-weight: 950;
  line-height: 0.86;
  letter-spacing: 0;
  text-transform: uppercase;
}

.ic-os-hero p,
.ic-section-hero p {
  max-width: 48rem;
  color: #cbd5e1;
  line-height: 1.65;
}

.ic-hero-command-row,
.ic-wizard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.ic-helmet-feed {
  position: relative;
  display: grid;
  width: min(22rem, 32vw);
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(226, 232, 240, 0.18);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.12), rgba(15, 23, 42, 0.56));
}

.ic-helmet-feed .ic-helmet-logo {
  position: absolute;
  z-index: 1;
  width: 82%;
  filter: drop-shadow(0 0 28px rgba(103, 232, 249, 0.18));
}

.ic-helmet-feed::before,
.ic-helmet-feed::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(103, 232, 249, 0.22);
  border-radius: 999px;
}

.ic-helmet-feed::before { inset: 12%; }
.ic-helmet-feed::after { inset: 26%; border-color: rgba(212, 63, 49, 0.22); }

.ic-helmet-eye {
  position: absolute;
  z-index: 2;
  width: 72%;
  height: 20%;
  clip-path: polygon(0 0, 100% 18%, 82% 100%, 12% 84%);
  background: linear-gradient(90deg, rgba(103, 232, 249, 0.24), rgba(248, 250, 252, 0.88), rgba(212, 63, 49, 0.24));
  filter: drop-shadow(0 0 28px rgba(103, 232, 249, 0.24));
}

.ic-helmet-grid {
  position: relative;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 0.2rem;
  transform: translateY(37%);
}

.ic-helmet-grid span {
  font-size: 3.2rem;
  font-weight: 950;
  letter-spacing: 0.12em;
}

.ic-helmet-grid strong {
  color: #9ca3af;
  font-size: 0.72rem;
  letter-spacing: 0.3em;
}

.ic-os-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(20rem, 0.65fr);
  gap: 1rem;
}

.ic-operator-guide {
  display: grid;
  grid-template-columns: minmax(16rem, 0.78fr) minmax(0, 1.22fr);
  gap: 1rem;
  border: 1px solid rgba(103, 232, 249, 0.2);
  border-radius: 8px;
  background:
    radial-gradient(ellipse at 10% 0%, rgba(103, 232, 249, 0.12), transparent 24rem),
    linear-gradient(135deg, rgba(3, 7, 13, 0.86), rgba(15, 23, 42, 0.72));
  padding: 1rem;
}

.ic-guide-intro {
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 8px;
  background: rgba(2, 6, 12, 0.52);
  padding: 1rem;
}

.ic-guide-intro h3 {
  margin: 0.3rem 0;
  color: #f8fafc;
  font-size: 1.35rem;
}

.ic-guide-intro p {
  color: #cbd5e1;
  line-height: 1.6;
}

.ic-guide-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.ic-guide-steps a {
  display: grid;
  gap: 0.35rem;
  min-height: 8.5rem;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 8px;
  background: rgba(3, 6, 12, 0.56);
  color: inherit;
  padding: 0.9rem;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.ic-guide-steps a:hover {
  border-color: rgba(103, 232, 249, 0.45);
  background: rgba(8, 47, 73, 0.24);
  transform: translateY(-2px);
}

.ic-guide-steps span {
  color: #67e8f9;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.ic-guide-steps strong {
  color: #f8fafc;
}

.ic-guide-steps small {
  color: #cbd5e1;
  line-height: 1.5;
}

.ic-os-main-stack,
.ic-side-stack {
  display: grid;
  gap: 1rem;
}

.ic-lane-board,
.ic-mission-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.ic-lane-card,
.ic-mission-card {
  display: grid;
  gap: 0.55rem;
  min-height: 11rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.8), rgba(2, 6, 12, 0.78));
  padding: 1rem;
  transition: transform 160ms ease, border-color 160ms ease;
}

.ic-lane-card:hover,
.ic-mission-card:hover,
.ic-readiness-row:hover,
.ic-alert-list a:hover,
.ic-compact-mission-list a:hover,
.ic-archive-table a:hover {
  border-color: rgba(103, 232, 249, 0.48);
  transform: translateY(-2px);
}

.ic-lane-card span,
.ic-mission-card-top span,
.ic-mission-meta span,
.ic-alert-list span,
.ic-compact-mission-list span,
.ic-archive-table span,
.ic-archive-table em {
  color: #9ca3af;
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.ic-lane-card strong,
.ic-mission-card h4,
.ic-alert-list strong,
.ic-compact-mission-list strong,
.ic-archive-table strong {
  color: #f8fafc;
}

.ic-lane-card p,
.ic-mission-card p,
.ic-alert-list small,
.ic-compact-mission-list small,
.ic-archive-table small {
  color: #cbd5e1;
  line-height: 1.55;
}

.ic-lane-card small {
  align-self: end;
  color: #67e8f9;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ic-mission-card-top,
.ic-mission-meta,
.ic-band-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: space-between;
}

.ic-mission-meta {
  justify-content: flex-start;
}

.ic-readiness-board,
.ic-alert-list,
.ic-compact-mission-list,
.ic-archive-table {
  display: grid;
  gap: 0.65rem;
}

.ic-readiness-row,
.ic-alert-list a,
.ic-compact-mission-list a,
.ic-archive-table a {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 8px;
  background: rgba(3, 6, 12, 0.58);
  padding: 0.9rem;
  transition: transform 160ms ease, border-color 160ms ease;
}

.ic-readiness-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.ic-readiness-row span {
  display: block;
  margin-top: 0.25rem;
  color: #9ca3af;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ic-readiness-row p {
  margin: 0;
  color: #67e8f9;
  font-size: 1.4rem;
  font-weight: 900;
}

.ic-section-hero.is-red {
  background:
    radial-gradient(ellipse at 76% 22%, rgba(212, 63, 49, 0.26), transparent 28rem),
    linear-gradient(135deg, rgba(18, 8, 10, 0.94), rgba(2, 5, 10, 0.96));
}

.ic-section-hero.is-green {
  background:
    radial-gradient(ellipse at 76% 22%, rgba(74, 222, 128, 0.18), transparent 28rem),
    linear-gradient(135deg, rgba(7, 18, 12, 0.94), rgba(2, 5, 10, 0.96));
}

.ic-section-hero.is-amber {
  background:
    radial-gradient(ellipse at 76% 22%, rgba(245, 158, 11, 0.2), transparent 28rem),
    linear-gradient(135deg, rgba(21, 14, 5, 0.94), rgba(2, 5, 10, 0.96));
}

.ic-section-badge {
  display: grid;
  width: 8rem;
  justify-items: center;
  gap: 0.35rem;
  border: 1px solid rgba(226, 232, 240, 0.18);
  border-radius: 8px;
  background: rgba(2, 6, 12, 0.42);
  padding: 0.75rem;
}

.ic-section-badge .ic-helmet-logo {
  width: 5.5rem;
  filter: drop-shadow(0 0 18px rgba(103, 232, 249, 0.16));
}

.ic-section-badge span,
.ic-wizard-status {
  color: #9ca3af;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-align: center;
  text-transform: uppercase;
}

.ic-filter-grid.ic-archive-filter,
.ic-filter-grid {
  align-items: end;
}

.ic-wizard {
  display: grid;
  grid-template-columns: minmax(11rem, 0.22fr) minmax(0, 1fr);
  gap: 1rem;
}

.ic-wizard-rail {
  display: grid;
  align-content: start;
  gap: 0.6rem;
}

.ic-wizard-status,
.ic-wizard-guide-card {
  border: 1px solid rgba(103, 232, 249, 0.2);
  border-radius: 8px;
  background: rgba(8, 47, 73, 0.18);
  padding: 0.85rem;
  text-align: left;
}

.ic-wizard-rail button {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 8px;
  background: rgba(3, 6, 12, 0.7);
  color: #9ca3af;
  cursor: pointer;
  padding: 0.9rem;
  text-align: left;
}

.ic-wizard-rail button.is-active {
  border-color: rgba(103, 232, 249, 0.42);
  color: #f8fafc;
}

.ic-wizard-rail span {
  display: block;
  margin-top: 0.2rem;
  font-weight: 850;
}

.ic-wizard-guide-card {
  display: grid;
  gap: 0.45rem;
  background: rgba(3, 6, 12, 0.62);
}

.ic-wizard-guide-card strong {
  color: #f8fafc;
}

.ic-wizard-guide-card span,
.ic-field-help {
  color: #cbd5e1;
  line-height: 1.55;
}

.ic-field-help {
  max-width: 58rem;
  margin: 0.35rem 0 0;
}

.ic-wizard-step {
  display: none;
}

.ic-wizard-step.is-active {
  display: block;
}

.ic-wizard-type-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 1rem;
}

.ic-wizard-type {
  display: grid;
  gap: 0.45rem;
  min-height: 11rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  background: rgba(3, 6, 12, 0.62);
  cursor: pointer;
  padding: 1rem;
}

.ic-wizard-type input {
  width: auto;
}

.ic-wizard-type:has(input:checked) {
  border-color: rgba(103, 232, 249, 0.54);
  box-shadow: 0 0 0 3px rgba(103, 232, 249, 0.08);
}

.ic-wizard-type span,
.ic-wizard-type small {
  color: #9ca3af;
}

.ic-wizard-type strong {
  color: #f8fafc;
}

.ic-target-mode-grid,
.ic-target-builder {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 1rem;
}

.ic-target-builder {
  grid-template-columns: minmax(0, 1.15fr) minmax(16rem, 0.85fr);
}

.ic-target-mode-card,
.ic-target-search-panel,
.ic-target-regiment-panel,
.ic-target-none-panel,
.ic-selected-user,
.ic-creator-review {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  background: rgba(3, 6, 12, 0.62);
  padding: 1rem;
}

.ic-target-mode-card {
  display: grid;
  gap: 0.4rem;
  cursor: pointer;
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.ic-target-mode-card:hover,
.ic-target-mode-card.is-active {
  border-color: rgba(103, 232, 249, 0.5);
  background: rgba(8, 47, 73, 0.24);
  transform: translateY(-2px);
}

.ic-target-mode-card input {
  width: auto;
}

.ic-target-mode-card span,
.ic-selected-user span,
.ic-target-none-panel span,
.ic-user-result span,
.ic-search-state {
  color: #9ca3af;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ic-target-mode-card strong,
.ic-target-none-panel strong,
.ic-selected-user strong,
.ic-user-result strong,
.ic-creator-review strong {
  color: #f8fafc;
}

.ic-target-mode-card small,
.ic-selected-user small,
.ic-user-result small,
.ic-creator-review small {
  color: #cbd5e1;
  line-height: 1.5;
}

.ic-target-search-panel,
.ic-target-regiment-panel,
.ic-target-none-panel {
  display: grid;
  align-content: start;
  gap: 0.75rem;
}

.ic-user-search-results {
  display: grid;
  gap: 0.5rem;
}

.ic-user-result {
  display: grid;
  gap: 0.3rem;
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.62);
  color: inherit;
  cursor: pointer;
  padding: 0.85rem;
  text-align: left;
}

.ic-user-result:hover {
  border-color: rgba(103, 232, 249, 0.48);
}

.ic-search-state {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.42);
  padding: 0.8rem;
}

.ic-search-state.is-error {
  border-color: rgba(248, 113, 113, 0.45);
  color: #fecaca;
}

.ic-selected-user {
  display: grid;
  gap: 0.25rem;
  border-color: rgba(103, 232, 249, 0.22);
  background: rgba(8, 47, 73, 0.18);
}

.ic-creator-review {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
  border-color: rgba(103, 232, 249, 0.24);
  background:
    radial-gradient(ellipse at 12% 0%, rgba(103, 232, 249, 0.1), transparent 18rem),
    rgba(3, 6, 12, 0.68);
}

.ic-review-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.ic-review-grid span {
  display: grid;
  gap: 0.2rem;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.5);
  color: #cbd5e1;
  padding: 0.75rem;
}

.ic-review-grid b {
  color: #67e8f9;
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ic-wizard .ic-panel label {
  display: grid;
  gap: 0.45rem;
}

.ic-wizard .is-invalid {
  border-color: rgba(248, 113, 113, 0.85);
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.13);
}

.ic-creator-briefing .ic-wizard-rail {
  grid-row: 1 / span 8;
}

.ic-creator-briefing .ic-wizard-step,
.ic-creator-hud {
  grid-column: 2;
}

.ic-creator-hud {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: stretch;
}

.ic-creator-hud-card,
.ic-draft-button,
.ic-template-card,
.ic-participant-rack,
.ic-participant-chip,
.ic-rating-band-card,
.ic-rating-empty,
.ic-action-pack-grid label {
  border: 1px solid rgba(103, 232, 249, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(3, 12, 22, 0.92), rgba(2, 6, 12, 0.78)),
    rgba(3, 6, 12, 0.72);
  box-shadow: inset 0 1px 0 rgba(226, 232, 240, 0.04);
}

.ic-creator-hud-card {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
  padding: 0.85rem;
}

.ic-creator-hud-card span,
.ic-template-card span,
.ic-rating-band-card span {
  color: #67e8f9;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ic-creator-hud-card strong,
.ic-template-card strong,
.ic-participant-rack strong,
.ic-participant-chip strong,
.ic-rating-empty strong {
  min-width: 0;
  color: #f8fafc;
  font-weight: 900;
}

.ic-creator-hud-card small,
.ic-template-card small,
.ic-template-card em,
.ic-participant-rack span,
.ic-participant-chip span,
.ic-participant-chip small,
.ic-rating-band-card small,
.ic-rating-empty span {
  color: #cbd5e1;
  font-size: 0.78rem;
  line-height: 1.45;
}

.ic-quality-meter {
  position: relative;
  overflow: hidden;
  height: 0.45rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.8);
}

.ic-quality-meter i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0891b2, #67e8f9, #22c55e);
  box-shadow: 0 0 16px rgba(103, 232, 249, 0.38);
  transition: width 180ms ease;
}

.ic-template-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 1rem;
}

.ic-template-card {
  position: relative;
  display: grid;
  gap: 0.45rem;
  min-height: 12.5rem;
  cursor: pointer;
  padding: 1rem;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.ic-template-card input {
  width: auto;
}

.ic-template-card em {
  align-self: end;
  color: #93c5fd;
  font-style: normal;
}

.ic-template-card:hover,
.ic-template-card.is-active,
.ic-template-card:has(input:checked) {
  border-color: rgba(103, 232, 249, 0.58);
  box-shadow: 0 0 0 3px rgba(103, 232, 249, 0.08), inset 0 0 18px rgba(8, 145, 178, 0.08);
  transform: translateY(-2px);
}

.ic-template-card.is-green:hover,
.ic-template-card.is-green.is-active,
.ic-template-card.is-green:has(input:checked) {
  border-color: rgba(74, 222, 128, 0.48);
}

.ic-template-card.is-amber:hover,
.ic-template-card.is-amber.is-active,
.ic-template-card.is-amber:has(input:checked) {
  border-color: rgba(245, 158, 11, 0.5);
}

.ic-template-card.is-red:hover,
.ic-template-card.is-red.is-active,
.ic-template-card.is-red:has(input:checked) {
  border-color: rgba(248, 113, 113, 0.52);
}

.ic-search-actions {
  display: flex;
  justify-content: flex-end;
}

.ic-participant-rack {
  display: grid;
  gap: 0.55rem;
  padding: 0.85rem;
}

.ic-participant-chip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.2rem 0.7rem;
  align-items: center;
  padding: 0.8rem;
}

.ic-participant-chip span,
.ic-participant-chip small {
  grid-column: 1;
}

.ic-participant-chip button {
  grid-column: 2;
  grid-row: 1 / span 3;
  align-self: center;
  border: 1px solid rgba(248, 113, 113, 0.28);
  border-radius: 8px;
  background: rgba(127, 29, 29, 0.18);
  color: #fecaca;
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  padding: 0.45rem 0.6rem;
  text-transform: uppercase;
}

.ic-rating-band-card {
  display: grid;
  gap: 0.45rem;
  min-height: 7.4rem;
  padding: 0.9rem;
}

.ic-rating-band-card input {
  max-width: 6rem;
  font-size: 1.25rem;
  font-weight: 900;
  text-align: center;
}

.ic-rating-empty {
  grid-column: 1 / -1;
  display: grid;
  gap: 0.3rem;
  padding: 1rem;
}

.ic-action-pack-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 1rem 0;
}

.ic-action-pack-grid label {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 3.1rem;
  color: #e2e8f0;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 850;
  padding: 0.75rem;
}

.ic-action-pack-grid input {
  width: auto;
}

.ic-participant-detail-list {
  display: grid;
  gap: 0.65rem;
}

.ic-participant-detail-list article {
  display: grid;
  gap: 0.25rem;
  border: 1px solid rgba(103, 232, 249, 0.16);
  border-radius: 8px;
  background: rgba(3, 12, 22, 0.72);
  padding: 0.85rem;
}

.ic-participant-detail-list span,
.ic-participant-detail-list em {
  color: #67e8f9;
  font-size: 0.64rem;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ic-participant-detail-list strong {
  color: #f8fafc;
}

.ic-participant-detail-list small {
  color: #cbd5e1;
}

@keyframes ic-ring-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes ic-reticle-pulse {
  0%, 100% { opacity: 0.2; transform: scale(0.98); }
  50% { opacity: 0.58; transform: scale(1.02); }
}

@media (max-width: 1180px) {
  .ic-os-nav,
  .ic-os-grid,
  .ic-operator-guide,
  .ic-guide-steps,
  .ic-wizard,
  .ic-target-mode-grid,
  .ic-target-builder,
  .ic-quota-requirements,
  .ic-review-grid,
  .ic-performance-hero,
  .ic-performance-grid,
  .ic-performance-metrics,
  .ic-personal-radar,
  .ic-regiment-telemetry-hero,
  .ic-regiment-telemetry-layout,
  .ic-regiment-telemetry-grid,
  .ic-wizard-type-grid {
    grid-template-columns: 1fr;
  }

  .ic-creator-briefing .ic-wizard-rail,
  .ic-creator-briefing .ic-wizard-step,
  .ic-creator-hud {
    grid-column: 1;
    grid-row: auto;
  }

  .ic-creator-hud,
  .ic-template-grid,
  .ic-action-pack-grid {
    grid-template-columns: 1fr;
  }

  .ic-os-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ic-helmet-feed {
    display: none;
  }

  .ic-section-badge {
    justify-self: start;
  }
}

@media (max-width: 760px) {
  .ic-os-nav,
  .ic-os-hero,
  .ic-section-hero,
  .ic-lane-board,
  .ic-quota-splits,
  .ic-operator-mini-stats,
  .ic-personal-stats,
  .ic-regiment-telemetry-overview,
  .ic-regiment-kpi-grid,
  .ic-trooper-profile-stats,
  .ic-mission-grid {
    grid-template-columns: 1fr;
  }

  .ic-performance-hero h2 {
    font-size: clamp(2.4rem, 17vw, 4.2rem);
  }

  .ic-performance-tabs {
    display: grid;
    grid-template-columns: 1fr;
  }

  .ic-performance-tabs button {
    width: 100%;
  }

  .ic-performance-chart-stage {
    min-height: 16rem;
  }

  .ic-regiment-telemetry-hero h2 {
    font-size: clamp(2.2rem, 15vw, 4rem);
  }

  .ic-regiment-chart-tabs {
    display: grid;
    grid-template-columns: 1fr;
  }

  .ic-regiment-chart-tabs button {
    width: 100%;
  }

  .ic-trooper-profile-head {
    display: grid;
  }

  .ic-quota-week {
    width: 100%;
    text-align: center;
    white-space: normal;
  }

  .ic-quota-operator-head {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .ic-quota-status {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

.ic-progression-board-shell {
  --ic-progression-cyan: #22d3ee;
  --ic-progression-blue: #38bdf8;
  --ic-progression-green: #34d399;
  --ic-progression-amber: #fbbf24;
  --ic-progression-red: #fb7185;
  display: grid;
  gap: 1rem;
}

.ic-progression-hero,
.ic-progression-layout,
.ic-progression-rail,
.ic-progression-inspector,
.ic-progression-stage {
  border: 1px solid rgba(34, 211, 238, 0.16);
  background: linear-gradient(145deg, rgba(2, 8, 18, 0.96), rgba(1, 12, 24, 0.92));
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35), inset 0 0 36px rgba(34, 211, 238, 0.035);
}

.ic-progression-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(14rem, 0.24fr);
  gap: 1rem;
  padding: 1.4rem;
  border-radius: 0.75rem;
}

.ic-progression-hero h2 {
  margin: 0.25rem 0;
  color: #ecfeff;
  font-size: clamp(2rem, 5vw, 4.4rem);
  line-height: 0.9;
  text-transform: uppercase;
}

.ic-progression-readiness {
  display: grid;
  align-content: center;
  gap: 0.3rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(34, 211, 238, 0.18);
  background: radial-gradient(circle at 50% 0%, rgba(34, 211, 238, 0.16), transparent 70%);
  padding: 1rem;
}

.ic-progression-readiness span,
.ic-progression-selected span,
.ic-progression-card span,
.ic-progression-inspector-body span {
  color: rgba(165, 243, 252, 0.72);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ic-progression-readiness strong {
  color: #ecfeff;
  font-size: 1.25rem;
}

.ic-progression-layout {
  display: grid;
  grid-template-columns: minmax(17rem, 0.24fr) minmax(32rem, 1fr) minmax(18rem, 0.28fr);
  gap: 1rem;
  min-height: 720px;
  padding: 1rem;
  border-radius: 0.75rem;
}

.ic-progression-rail,
.ic-progression-inspector {
  display: grid;
  align-content: start;
  gap: 0.85rem;
  padding: 1rem;
  border-radius: 0.7rem;
}

.ic-progression-search,
.ic-progression-card-form input,
.ic-progression-card-form select,
.ic-progression-card-form textarea,
.ic-progression-link-form select,
.ic-progression-link-form textarea {
  width: 100%;
  border: 1px solid rgba(34, 211, 238, 0.16);
  border-radius: 0.55rem;
  background: rgba(0, 0, 0, 0.34);
  color: #ecfeff;
  padding: 0.7rem 0.8rem;
}

.ic-progression-search-results {
  display: grid;
  gap: 0.5rem;
}

.ic-progression-search-results a,
.ic-progression-selected {
  display: grid;
  gap: 0.25rem;
  border: 1px solid rgba(34, 211, 238, 0.12);
  border-radius: 0.6rem;
  background: rgba(8, 20, 34, 0.74);
  padding: 0.75rem;
  color: #ecfeff;
  text-decoration: none;
}

.ic-progression-mode-toggle,
.ic-progression-filter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.ic-progression-mode-toggle button,
.ic-progression-filter-list button {
  border: 1px solid rgba(34, 211, 238, 0.16);
  border-radius: 0.5rem;
  background: rgba(15, 23, 42, 0.78);
  color: rgba(236, 254, 255, 0.78);
  padding: 0.5rem 0.65rem;
  font-weight: 800;
}

.ic-progression-mode-toggle button.is-active,
.ic-progression-filter-list button.is-active {
  border-color: rgba(34, 211, 238, 0.48);
  background: rgba(34, 211, 238, 0.16);
  color: #ecfeff;
}

.ic-progression-stage-wrap {
  min-width: 0;
}

.ic-progression-stage {
  position: relative;
  overflow: hidden;
  min-height: 700px;
  border-radius: 0.7rem;
  background:
    linear-gradient(rgba(34, 211, 238, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, 0.06) 1px, transparent 1px),
    radial-gradient(circle at 50% 50%, rgba(34, 211, 238, 0.08), transparent 55%),
    #020817;
  background-size: 34px 34px, 34px 34px, auto, auto;
}

.ic-progression-links,
.ic-progression-cards {
  position: absolute;
  inset: 0;
}

.ic-progression-links {
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.ic-progression-link-line {
  fill: none;
  stroke: rgba(34, 211, 238, 0.42);
  stroke-width: 2;
  stroke-dasharray: 8 8;
  filter: drop-shadow(0 0 8px rgba(34, 211, 238, 0.35));
}

.ic-progression-link-line.is-arc-pipeline {
  stroke: rgba(251, 191, 36, 0.72);
}

.ic-progression-link-line.is-concern {
  stroke: rgba(251, 113, 133, 0.72);
}

.ic-progression-card {
  position: absolute;
  width: 230px;
  min-height: 116px;
  display: grid;
  gap: 0.35rem;
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 0.65rem;
  background: linear-gradient(160deg, rgba(8, 18, 32, 0.96), rgba(2, 8, 18, 0.96));
  color: #ecfeff;
  padding: 0.8rem;
  text-align: left;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.36), inset 0 0 24px rgba(34, 211, 238, 0.035);
  cursor: grab;
  user-select: none;
}

.ic-progression-card.is-dragging {
  cursor: grabbing;
  z-index: 12;
  border-color: rgba(34, 211, 238, 0.72);
}

.ic-progression-card.is-success {
  border-color: rgba(52, 211, 153, 0.4);
}

.ic-progression-card.is-warning {
  border-color: rgba(251, 191, 36, 0.45);
}

.ic-progression-card.is-arc {
  border-color: rgba(251, 191, 36, 0.58);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.36), inset 0 0 28px rgba(251, 191, 36, 0.05);
}

.ic-progression-card.is-profile {
  border-color: rgba(34, 211, 238, 0.62);
  transform: scale(1.03);
}

.ic-progression-card strong {
  font-size: 1rem;
  line-height: 1.15;
}

.ic-progression-card small,
.ic-progression-inspector-body small,
.ic-progression-search-results small,
.ic-progression-selected small {
  color: rgba(203, 213, 225, 0.72);
  font-size: 0.78rem;
}

.ic-progression-card em {
  justify-self: start;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.13);
  color: #a5f3fc;
  padding: 0.18rem 0.5rem;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 900;
}

.ic-progression-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 0.4rem;
  max-width: 36rem;
  margin: auto;
  color: #ecfeff;
  text-align: center;
}

.ic-progression-empty strong {
  font-size: 1.4rem;
}

.ic-progression-card-form,
.ic-progression-link-form,
.ic-progression-inspector-body {
  display: grid;
  gap: 0.7rem;
}

.ic-progression-inspector-body p {
  margin: 0;
  color: rgba(226, 232, 240, 0.8);
  line-height: 1.5;
}

.ic-progression-inspector-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

@media (max-width: 1280px) {
  .ic-progression-layout {
    grid-template-columns: 1fr;
  }

  .ic-progression-stage {
    min-height: 620px;
  }
}

@media (max-width: 760px) {
  .ic-progression-hero {
    grid-template-columns: 1fr;
  }

  .ic-progression-card {
    width: 210px;
  }
}

/* Ticket Support Portal */
.ticket-portal {
  --ticket-cyan: 34, 211, 238;
  --ticket-blue: 56, 189, 248;
  --ticket-amber: 251, 191, 36;
  --ticket-red: 251, 113, 133;
  --ticket-green: 52, 211, 153;
}

.ticket-portal-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.ticket-portal-back-link {
  color: rgb(96 165 250);
  font-size: 0.82rem;
  font-weight: 900;
}

.ticket-portal-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.4rem;
  color: hsl(var(--muted-foreground));
  font-size: 0.72rem;
}

.ticket-portal-breadcrumbs span::after {
  content: ">";
  margin-left: 0.45rem;
  color: rgba(var(--ticket-cyan), 0.4);
}

.ticket-portal-breadcrumbs strong {
  color: rgb(226 232 240);
}

.ticket-portal-mode-switch {
  display: inline-flex;
  gap: 0.35rem;
  border: 1px solid rgba(var(--ticket-cyan), 0.16);
  border-radius: var(--radius-sm);
  background: rgba(2, 8, 18, 0.52);
  padding: 0.3rem;
}

.ticket-portal-mode-switch a {
  border-radius: calc(var(--radius-sm) - 2px);
  color: hsl(var(--muted-foreground));
  font-size: 0.78rem;
  font-weight: 900;
  padding: 0.5rem 0.75rem;
}

.ticket-portal-mode-switch a:hover,
.ticket-portal-mode-switch a.is-active {
  background: rgba(var(--ticket-blue), 0.18);
  color: rgb(219 234 254);
}

.ticket-portal-hero,
.ticket-portal-command-panel,
.ticket-portal-creator,
.ticket-portal-filter-bar,
.ticket-portal-inbox,
.ticket-portal-conversation,
.ticket-portal-case-panel,
.ticket-portal-admin,
.ticket-portal-staff-ops {
  border: 1px solid rgba(var(--ticket-cyan), 0.18);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at top left, rgba(var(--ticket-cyan), 0.12), transparent 28rem),
    linear-gradient(145deg, rgba(2, 8, 18, 0.94), rgba(4, 12, 24, 0.88));
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.ticket-portal-command-panel,
.ticket-portal-creator,
.ticket-portal-filter-bar,
.ticket-portal-inbox,
.ticket-portal-conversation,
.ticket-portal-case-panel,
.ticket-portal-admin,
.ticket-portal-staff-ops {
  padding: 1rem;
}

.ticket-portal-hero--compact {
  padding: 1.15rem;
}

.ticket-portal-ticket-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.75rem;
}

.ticket-portal-ticket-meta span {
  border: 1px solid rgba(var(--ticket-cyan), 0.18);
  border-radius: 999px;
  background: rgba(2, 8, 18, 0.36);
  color: rgb(207 250 254);
  font-size: 0.72rem;
  font-weight: 900;
  padding: 0.25rem 0.6rem;
}

.ticket-portal-stat {
  display: grid;
  gap: 0.25rem;
  border: 1px solid rgba(var(--ticket-cyan), 0.2);
  border-radius: var(--radius-sm);
  background: rgba(2, 8, 18, 0.46);
  padding: 0.85rem;
  transition: border-color 180ms ease, transform 180ms ease, background 180ms ease;
}

.ticket-portal-stat:hover {
  border-color: rgba(var(--ticket-cyan), 0.58);
  background: rgba(var(--ticket-cyan), 0.09);
  transform: translateY(-1px);
}

.ticket-portal-stat span {
  color: rgb(165 243 252);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ticket-portal-stat strong {
  color: rgb(236 254 255);
  font-size: 1.65rem;
  line-height: 1;
}

.ticket-portal-stat--warning {
  border-color: rgba(var(--ticket-amber), 0.24);
}

.ticket-portal-stat--info {
  border-color: rgba(var(--ticket-blue), 0.24);
}

.ticket-portal-stat--danger {
  border-color: rgba(var(--ticket-red), 0.24);
}

.ticket-portal-stat--success {
  border-color: rgba(var(--ticket-green), 0.24);
}

.ticket-portal-status-band,
.ticket-portal-notify-strip,
.ticket-portal-panel-block,
.ticket-portal-template,
.ticket-portal-brief,
.ticket-portal-reply-box,
.ticket-portal-closed,
.ticket-portal-type-card,
.ticket-portal-staff-card,
.ticket-portal-empty {
  border: 1px solid rgba(var(--ticket-cyan), 0.16);
  border-radius: var(--radius-sm);
  background: rgba(2, 8, 18, 0.42);
}

.ticket-portal-status-band,
.ticket-portal-notify-strip {
  display: grid;
  gap: 0.25rem;
  padding: 0.85rem;
}

.ticket-portal-status-band strong,
.ticket-portal-notify-strip strong {
  color: rgb(236 254 255);
}

.ticket-portal-status-band span,
.ticket-portal-notify-strip span {
  color: hsl(var(--muted-foreground));
  font-size: 0.85rem;
}

.ticket-portal-notify-strip {
  border-color: rgba(var(--ticket-blue), 0.28);
  background: linear-gradient(135deg, rgba(var(--ticket-blue), 0.13), rgba(var(--ticket-cyan), 0.06));
}

.ticket-portal-live-pill {
  border: 1px solid rgba(var(--ticket-green), 0.28);
  border-radius: 999px;
  background: rgba(var(--ticket-green), 0.1);
  color: rgb(167 243 208);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  padding: 0.45rem 0.75rem;
  text-transform: uppercase;
}

.ticket-portal-staff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 0.75rem;
}

.ticket-portal-staff-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.8rem;
}

.ticket-portal-staff-card.is-online {
  border-color: rgba(var(--ticket-green), 0.34);
  background: rgba(var(--ticket-green), 0.08);
}

.ticket-portal-staff-avatar {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  overflow: hidden;
  border: 1px solid rgba(var(--ticket-cyan), 0.24);
  border-radius: 999px;
  background: rgba(var(--ticket-cyan), 0.1);
  color: rgb(207 250 254);
  font-weight: 900;
}

.ticket-portal-staff-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ticket-portal-presence {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  color: hsl(var(--muted-foreground));
  font-size: 0.72rem;
  font-weight: 800;
}

.ticket-portal-presence span {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: rgb(100 116 139);
  box-shadow: 0 0 0 3px rgba(100, 116, 139, 0.12);
}

.ticket-portal-presence span.is-online {
  background: rgb(52 211 153);
  box-shadow: 0 0 0 3px rgba(var(--ticket-green), 0.16), 0 0 16px rgba(var(--ticket-green), 0.38);
}

.ticket-portal-workload {
  display: grid;
  justify-items: end;
  line-height: 1.1;
}

.ticket-portal-workload strong {
  color: rgb(236 254 255);
  font-size: 1.25rem;
}

.ticket-portal-workload span {
  color: hsl(var(--muted-foreground));
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.ticket-portal-staff-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  grid-column: 1 / -1;
}

.ticket-portal-staff-links a {
  border: 1px solid rgba(var(--ticket-cyan), 0.18);
  border-radius: 999px;
  color: rgb(165 243 252);
  font-size: 0.68rem;
  font-weight: 900;
  padding: 0.15rem 0.45rem;
}

.ticket-portal-presence-control {
  display: grid;
  gap: 0.55rem;
  min-width: min(100%, 20rem);
  border: 1px solid rgba(var(--ticket-cyan), 0.18);
  border-radius: var(--radius-sm);
  background: rgba(2, 8, 18, 0.46);
  padding: 0.75rem;
}

.ticket-portal-presence-control > span {
  color: hsl(var(--muted-foreground));
  font-size: 0.78rem;
}

.ticket-portal-presence-control strong {
  color: rgb(236 254 255);
}

.ticket-portal-presence-control form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.ticket-portal-presence-control button,
.ticket-portal-quick-filters a {
  border: 1px solid rgba(var(--ticket-cyan), 0.2);
  border-radius: 999px;
  background: rgba(8, 20, 34, 0.82);
  color: rgb(207 250 254);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 900;
  padding: 0.5rem 0.75rem;
  text-align: center;
}

.ticket-portal-presence-control button:hover,
.ticket-portal-presence-control button.is-active,
.ticket-portal-quick-filters a:hover {
  border-color: rgba(var(--ticket-green), 0.42);
  background: rgba(var(--ticket-green), 0.12);
  color: rgb(209 250 229);
}

.ticket-portal-presence-control.is-saving {
  opacity: 0.72;
}

.ticket-portal-staff-drawer,
.ticket-portal-filter-drawer {
  border: 1px solid rgba(var(--ticket-cyan), 0.14);
  border-radius: var(--radius-sm);
  background: rgba(2, 8, 18, 0.34);
  padding: 0.8rem;
}

.ticket-portal-staff-drawer summary,
.ticket-portal-filter-drawer summary,
.ticket-portal-collapsible summary,
.ticket-portal-brief summary {
  color: rgb(207 250 254);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ticket-portal-quick-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ticket-portal-status-band--warning {
  border-color: rgba(var(--ticket-amber), 0.32);
  background: rgba(var(--ticket-amber), 0.1);
}

.ticket-portal-status-band--danger {
  border-color: rgba(var(--ticket-red), 0.32);
  background: rgba(var(--ticket-red), 0.1);
}

.ticket-portal-stepper {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ticket-portal-stepper button,
.ticket-portal-chip {
  border: 1px solid rgba(var(--ticket-cyan), 0.22);
  border-radius: var(--radius-sm);
  background: rgba(8, 20, 34, 0.8);
  color: rgb(207 250 254);
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  padding: 0.55rem 0.75rem;
  text-transform: uppercase;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.ticket-portal-stepper button:hover,
.ticket-portal-stepper button.is-active,
.ticket-portal-chip:hover {
  border-color: rgba(var(--ticket-cyan), 0.62);
  background: rgba(var(--ticket-cyan), 0.14);
  transform: translateY(-1px);
}

.ticket-portal-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11.5rem, 1fr));
  gap: 0.75rem;
}

.ticket-portal-type-card {
  display: grid;
  gap: 0.45rem;
  min-height: 8.5rem;
  cursor: pointer;
  padding: 0.9rem;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.ticket-portal-type-card:hover,
.ticket-portal-type-card:has(input:checked) {
  border-color: rgba(var(--ticket-cyan), 0.58);
  background: rgba(var(--ticket-cyan), 0.1);
  transform: translateY(-1px);
}

.ticket-portal-type-card.is-disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.ticket-portal-type-card input {
  width: auto;
}

.ticket-portal-type-card em {
  align-self: start;
  color: rgb(125 211 252);
  font-size: 0.63rem;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ticket-portal-type-card span {
  color: rgb(236 254 255);
  font-weight: 900;
}

.ticket-portal-type-card small {
  color: hsl(var(--muted-foreground));
  line-height: 1.45;
}

.ticket-portal-suggestions {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.ticket-portal-target-selected {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.75rem;
  border: 1px solid rgba(var(--ticket-green), 0.28);
  border-radius: var(--radius-sm);
  background:
    linear-gradient(135deg, rgba(var(--ticket-green), 0.13), rgba(2, 8, 18, 0.72)),
    rgba(2, 8, 18, 0.62);
  padding: 0.8rem;
}

.ticket-portal-target-selected.hidden {
  display: none;
}

.ticket-portal-target-selected div {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.ticket-portal-target-selected strong {
  color: rgb(236 254 255);
  font-size: 0.9rem;
}

.ticket-portal-target-selected span {
  color: rgb(167 243 208);
  font-size: 0.76rem;
  overflow-wrap: anywhere;
}

.ticket-portal-target-selected button {
  border: 1px solid rgba(var(--ticket-green), 0.32);
  border-radius: 999px;
  background: rgba(var(--ticket-green), 0.12);
  color: rgb(209 250 229);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 900;
  padding: 0.42rem 0.7rem;
  text-transform: uppercase;
}

.ticket-portal-suggestion {
  display: grid;
  gap: 0.25rem;
  border: 1px solid rgba(var(--ticket-cyan), 0.18);
  border-radius: var(--radius-sm);
  background: rgba(2, 8, 18, 0.46);
  color: rgb(226 232 240);
  cursor: pointer;
  padding: 0.75rem;
  text-align: left;
}

.ticket-portal-suggestion strong {
  color: rgb(236 254 255);
  font-size: 0.86rem;
}

.ticket-portal-suggestion span {
  color: hsl(var(--muted-foreground));
  font-size: 0.75rem;
  overflow-wrap: anywhere;
}

.ticket-portal-suggestion:hover {
  border-color: rgba(var(--ticket-cyan), 0.52);
}

.ticket-portal-suggestion.is-empty {
  cursor: default;
  color: hsl(var(--muted-foreground));
}

.ticket-portal-suggestion.is-empty:hover {
  border-color: rgba(var(--ticket-cyan), 0.18);
}

.ticket-portal-grid {
  display: grid;
  grid-template-columns: minmax(17rem, 0.22fr) minmax(0, 1fr) minmax(18rem, 0.25fr);
  gap: 1rem;
  align-items: start;
}

.ticket-portal.is-client-view .ticket-portal-grid {
  grid-template-columns: minmax(16rem, 0.24fr) minmax(0, 1fr);
}

.ticket-portal.is-client-view .ticket-portal-inbox {
  max-height: calc(100vh - 5rem);
}

.ticket-portal.is-client-view .ticket-portal-conversation {
  background:
    radial-gradient(circle at top left, rgba(var(--ticket-blue), 0.08), transparent 24rem),
    rgba(2, 8, 18, 0.72);
}

.ticket-portal-inbox,
.ticket-portal-case-panel {
  position: sticky;
  top: 1rem;
  max-height: calc(100vh - 2rem);
  overflow: auto;
}

.ticket-portal-card-list {
  display: grid;
  gap: 0.65rem;
}

.ticket-portal-card {
  display: block;
  border: 1px solid rgba(var(--ticket-cyan), 0.14);
  border-radius: var(--radius-sm);
  background:
    linear-gradient(135deg, rgba(8, 20, 34, 0.82), rgba(2, 8, 18, 0.72)),
    rgba(2, 8, 18, 0.46);
  padding: 0.85rem;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.ticket-portal-card:hover,
.ticket-portal-card.is-active {
  border-color: rgba(var(--ticket-cyan), 0.56);
  background: rgba(var(--ticket-cyan), 0.1);
  transform: translateY(-1px);
}

.ticket-portal-card__wait {
  flex: none;
  border: 1px solid rgba(var(--ticket-amber), 0.28);
  border-radius: 999px;
  background: rgba(var(--ticket-amber), 0.1);
  color: rgb(254 240 138);
  font-size: 0.63rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.5rem;
  text-transform: uppercase;
}

.ticket-portal-closed {
  margin-top: 1rem;
  padding: 0.85rem;
}

.ticket-portal-closed summary {
  color: rgb(207 250 254);
  cursor: pointer;
  font-weight: 800;
}

.ticket-portal-ticket-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: start;
  border-bottom: 1px solid rgba(var(--ticket-cyan), 0.14);
  margin: -0.15rem -0.15rem 1rem;
  padding: 0.15rem 0.15rem 1rem;
}

.ticket-portal-current-state {
  display: grid;
  gap: 0.25rem;
  min-width: 12rem;
  border: 1px solid rgba(var(--ticket-cyan), 0.22);
  border-radius: var(--radius-sm);
  background: rgba(var(--ticket-cyan), 0.08);
  padding: 0.75rem;
}

.ticket-portal-current-state span {
  color: rgb(236 254 255);
  font-weight: 900;
}

.ticket-portal-current-state small {
  color: hsl(var(--muted-foreground));
}

.ticket-portal-current-state button {
  border: 1px solid rgba(var(--ticket-cyan), 0.24);
  border-radius: var(--radius-sm);
  background: rgba(2, 8, 18, 0.56);
  color: rgb(207 250 254);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  padding: 0.45rem 0.65rem;
  text-transform: uppercase;
}

.ticket-portal-brief,
.ticket-portal-reply-box {
  padding: 1rem;
}

.ticket-portal-brief--compact {
  padding: 0.85rem 1rem;
}

.ticket-portal-thread {
  display: grid;
  gap: 0.85rem;
  margin: 1rem 0;
  max-height: min(62vh, 46rem);
  overflow: auto;
  border: 1px solid rgba(var(--ticket-cyan), 0.12);
  border-radius: var(--radius-sm);
  background:
    linear-gradient(180deg, rgba(2, 8, 18, 0.32), rgba(2, 8, 18, 0.12)),
    rgba(2, 8, 18, 0.22);
  padding: 0.85rem;
}

.ticket-portal-thread-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border-bottom: 1px solid rgba(var(--ticket-cyan), 0.12);
  padding-bottom: 0.65rem;
}

.ticket-portal-thread-head strong {
  color: rgb(236 254 255);
  font-size: 0.86rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ticket-portal-thread-head span {
  color: hsl(var(--muted-foreground));
  font-size: 0.78rem;
}

.ticket-portal-message {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.75rem;
  width: min(100%, 46rem);
  border: 1px solid rgba(var(--ticket-cyan), 0.14);
  border-radius: var(--radius-sm);
  background: rgba(15, 23, 42, 0.58);
  padding: 0.85rem;
}

.ticket-portal-message.is-self {
  margin-left: auto;
  border-color: rgba(var(--ticket-blue), 0.34);
  background: rgba(var(--ticket-blue), 0.1);
}

.ticket-portal-message.is-staff {
  border-color: rgba(var(--ticket-blue), 0.42);
  background: linear-gradient(135deg, rgba(14, 116, 144, 0.2), rgba(15, 23, 42, 0.62));
}

.ticket-portal-message__avatar {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  overflow: hidden;
  border: 1px solid rgba(var(--ticket-cyan), 0.28);
  border-radius: 999px;
  background: rgba(var(--ticket-cyan), 0.1);
  color: rgb(207 250 254);
  font-weight: 900;
}

.ticket-portal-message__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ticket-portal-message__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
}

.ticket-portal-message__meta strong {
  color: rgb(236 254 255);
}

.ticket-portal-message__meta span {
  border: 1px solid rgba(var(--ticket-cyan), 0.22);
  border-radius: 999px;
  color: rgb(165 243 252);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  padding: 0.12rem 0.45rem;
  text-transform: uppercase;
}

.ticket-portal-message__meta small {
  color: hsl(var(--muted-foreground));
}

.ticket-portal-message__body {
  margin-top: 0.35rem;
  white-space: pre-wrap;
  color: hsl(var(--foreground));
  line-height: 1.55;
}

.ticket-portal-evidence-message {
  border-style: solid;
}

.ticket-portal-evidence-preview {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.55rem;
  width: min(100%, 30rem);
  border: 1px solid rgba(var(--ticket-cyan), 0.16);
  border-radius: var(--radius-sm);
  background: rgba(2, 8, 18, 0.48);
  overflow: hidden;
  transition: border-color 160ms ease, transform 160ms ease;
}

.ticket-portal-evidence-preview:hover {
  border-color: rgba(var(--ticket-cyan), 0.52);
  transform: translateY(-1px);
}

.ticket-portal-evidence-preview img {
  display: block;
  width: 100%;
  max-height: 22rem;
  background: rgba(0, 0, 0, 0.28);
  object-fit: contain;
}

.ticket-portal-evidence-preview span {
  color: rgb(203 213 225);
  font-size: 0.78rem;
  font-weight: 800;
  overflow-wrap: anywhere;
  padding: 0 0.75rem 0.75rem;
}

.ticket-portal-reply-box {
  display: grid;
  gap: 0.85rem;
  position: sticky;
  bottom: 0.75rem;
  z-index: 2;
  border-color: rgba(var(--ticket-cyan), 0.24);
  background:
    linear-gradient(135deg, rgba(8, 20, 34, 0.94), rgba(2, 8, 18, 0.9)),
    rgba(2, 8, 18, 0.92);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.38);
}

.ticket-portal-reply-box.is-sending {
  opacity: 0.82;
}

.ticket-portal-reply-box button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.ticket-portal-composer-head,
.ticket-portal-composer-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.ticket-portal-composer-head strong {
  display: block;
  color: rgb(236 254 255);
  font-weight: 900;
}

.ticket-portal-composer-head span,
.ticket-portal-composer-actions p {
  color: hsl(var(--muted-foreground));
  font-size: 0.78rem;
}

.ticket-portal-reply-evidence {
  display: grid;
  gap: 0.4rem;
  color: hsl(var(--muted-foreground));
  font-size: 0.82rem;
}

.ticket-portal-composer-status {
  min-height: 1rem;
  color: hsl(var(--muted-foreground));
  font-size: 0.78rem;
  font-weight: 800;
}

.ticket-portal-composer-status[data-tone="success"] {
  color: rgb(167 243 208);
}

.ticket-portal-composer-status[data-tone="warning"] {
  color: rgb(254 240 138);
}

.ticket-portal-composer-status[data-tone="danger"] {
  color: rgb(254 202 202);
}

.ticket-portal-composer-status[data-tone="info"] {
  color: rgb(147 197 253);
}

.ticket-portal-panel-block {
  display: grid;
  gap: 0.5rem;
  padding: 0.9rem;
}

.ticket-portal-collapsible {
  display: block;
}

.ticket-portal-collapsible[open] summary {
  margin-bottom: 0.65rem;
}

.ticket-portal-panel-block--danger {
  border-color: rgba(var(--ticket-red), 0.32);
  background: rgba(var(--ticket-red), 0.08);
}

.ticket-portal-panel-block--staff {
  border-color: rgba(var(--ticket-amber), 0.28);
  background: rgba(var(--ticket-amber), 0.08);
}

.ticket-portal-panel-block--relay {
  border-color: rgba(var(--ticket-blue), 0.28);
  background: rgba(var(--ticket-blue), 0.08);
}

.ticket-portal-route-hint {
  display: grid;
  gap: 0.25rem;
  border: 1px solid rgba(var(--ticket-cyan), 0.2);
  border-radius: var(--radius-sm);
  background: rgba(var(--ticket-cyan), 0.08);
  padding: 0.75rem;
}

.ticket-portal-route-hint strong {
  color: rgb(207 250 254);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ticket-portal-route-hint span {
  color: hsl(var(--muted-foreground));
  font-size: 0.84rem;
}

.ticket-portal-evidence-grid {
  display: grid;
  gap: 0.65rem;
}

.ticket-portal-evidence {
  display: grid;
  gap: 0.35rem;
  border: 1px solid rgba(var(--ticket-cyan), 0.14);
  border-radius: var(--radius-sm);
  background: rgba(2, 8, 18, 0.42);
  padding: 0.5rem;
}

.ticket-portal-evidence img {
  width: 100%;
  height: 9rem;
  border-radius: calc(var(--radius-sm) - 2px);
  object-fit: cover;
}

.ticket-portal-evidence span {
  color: rgb(226 232 240);
  font-size: 0.82rem;
  font-weight: 800;
}

.ticket-portal-evidence small,
.ticket-portal-staff-note div,
.ticket-portal-timeline span {
  color: hsl(var(--muted-foreground));
  font-size: 0.72rem;
}

.ticket-portal-staff-note {
  border: 1px solid rgba(var(--ticket-amber), 0.22);
  border-radius: var(--radius-sm);
  background: rgba(var(--ticket-amber), 0.08);
  padding: 0.65rem;
}

.ticket-portal-staff-note p {
  margin: 0.25rem 0 0;
  color: rgb(254 243 199);
  font-size: 0.85rem;
}

.ticket-portal-timeline {
  display: grid;
  gap: 0.55rem;
}

.ticket-portal-timeline > div {
  border-left: 2px solid rgba(var(--ticket-cyan), 0.34);
  padding-left: 0.7rem;
}

.ticket-portal-timeline strong {
  display: block;
  color: rgb(207 250 254);
  font-size: 0.82rem;
}

.ticket-portal-admin {
  display: grid;
  gap: 0.85rem;
}

.ticket-portal-template {
  padding: 0.85rem;
}

.ticket-portal-empty {
  display: grid;
  place-items: center;
  min-height: 5rem;
  color: hsl(var(--muted-foreground));
  padding: 1rem;
  text-align: center;
}

.ticket-portal-empty--large {
  min-height: 32rem;
}

.ticket-portal.is-staff-management {
  max-width: 1480px;
}

.ticket-portal.is-staff-management .ticket-portal-topbar {
  border: 1px solid rgba(var(--ticket-cyan), 0.14);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(2, 8, 18, 0.78), rgba(8, 20, 34, 0.58)),
    rgba(2, 8, 18, 0.58);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
  padding: 0.85rem 1rem;
}

.ticket-portal.is-staff-management .ticket-portal-mode-switch {
  background: rgba(2, 8, 18, 0.78);
}

.ticket-portal.is-staff-management .ticket-portal-mode-switch a.is-active {
  border-color: rgba(var(--ticket-amber), 0.32);
  background: rgba(var(--ticket-amber), 0.12);
  color: rgb(254 243 199);
}

.ticket-portal.is-staff-management .ticket-portal-hero--staff {
  position: relative;
  overflow: hidden;
}

.ticket-portal.is-staff-management .ticket-portal-hero--staff::after {
  content: "";
  position: absolute;
  inset: auto 1.25rem 0 1.25rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--ticket-cyan), 0.62), transparent);
  pointer-events: none;
}

.ticket-portal.is-staff-management .ticket-portal-grid {
  grid-template-columns: minmax(18rem, 0.24fr) minmax(0, 1fr) minmax(19rem, 0.26fr);
}

.ticket-portal.is-staff-management .ticket-portal-conversation {
  min-height: 38rem;
}

.ticket-portal.is-client-view {
  max-width: 1120px;
}

.ticket-portal.is-client-view .ticket-portal-topbar {
  align-items: flex-start;
}

.ticket-portal.is-client-view .ticket-portal-mode-switch {
  background: rgba(10, 13, 20, 0.74);
}

.ticket-portal.is-client-view .ticket-portal-mode-switch a.is-active {
  background: rgb(37 99 235);
  color: rgb(255 255 255);
}

.ticket-portal-hero--client {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0.25rem 0 0;
}

.ticket-portal-client-titlebar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: start;
}

.ticket-portal-back-link--client {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: rgb(59 130 246);
}

.ticket-portal-back-link--client::before {
  content: "<";
  font-size: 0.72rem;
}

.ticket-portal-client-meta,
.ticket-portal-client-submeta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin-top: 0.45rem;
  color: rgb(107 114 128);
  font-size: 0.72rem;
  font-weight: 800;
}

.ticket-portal-client-meta strong {
  color: rgb(226 232 240);
}

.ticket-portal-client-submeta strong {
  color: rgb(209 213 219);
}

.ticket-portal-client-meta span,
.ticket-portal-client-submeta span {
  display: inline-flex;
  gap: 0.25rem;
  align-items: center;
}

.ticket-portal-client-meta span:not(:last-child)::after,
.ticket-portal-client-submeta span:not(:last-child)::after {
  content: "";
  width: 0.22rem;
  height: 0.22rem;
  margin-left: 0.1rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.5);
}

.ticket-portal-client-titlebar h1 {
  margin: 0.25rem 0 0;
  color: rgb(248 250 252);
  font-size: clamp(1.4rem, 2.2vw, 2.15rem);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.1;
}

.ticket-portal-client-intro {
  max-width: 46rem;
  margin-top: 0.55rem;
  color: rgb(148 163 184);
  font-size: 0.88rem;
}

.ticket-portal-client-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.55rem;
}

.ticket-portal-client-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.35rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 0.45rem;
  background: rgb(24 24 27);
  color: rgb(226 232 240);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 900;
  padding: 0.55rem 0.9rem;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.ticket-portal-client-action:hover {
  border-color: rgba(148, 163, 184, 0.42);
  background: rgb(31 41 55);
  transform: translateY(-1px);
}

.ticket-portal-client-action--primary {
  border-color: rgba(59, 130, 246, 0.8);
  background: rgb(37 99 235);
  color: rgb(255 255 255);
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.22);
}

.ticket-portal-client-action--staff {
  border-color: rgba(var(--ticket-amber), 0.35);
  background: rgba(var(--ticket-amber), 0.1);
  color: rgb(254 243 199);
}

.ticket-portal-client-alert {
  display: grid;
  gap: 0.25rem;
  margin-top: 1rem;
  border: 1px solid rgba(var(--ticket-amber), 0.28);
  border-radius: 0.5rem;
  background: rgba(var(--ticket-amber), 0.08);
  padding: 0.85rem;
}

.ticket-portal-client-alert.is-eligible {
  border-color: rgba(var(--ticket-green), 0.28);
  background: rgba(var(--ticket-green), 0.08);
}

.ticket-portal-client-alert strong {
  color: rgb(236 254 255);
}

.ticket-portal-client-alert span {
  color: rgb(148 163 184);
  font-size: 0.78rem;
}

.ticket-portal-client-create {
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 0.6rem;
  background:
    linear-gradient(180deg, rgba(17, 24, 39, 0.78), rgba(10, 13, 20, 0.92)),
    rgb(10 13 20);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.26);
  overflow: hidden;
}

.ticket-portal-client-create > summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  cursor: pointer;
  list-style: none;
  padding: 0.9rem 1rem;
}

.ticket-portal-client-create > summary::-webkit-details-marker {
  display: none;
}

.ticket-portal-client-create > summary span {
  color: rgb(248 250 252);
  font-size: 0.95rem;
  font-weight: 900;
}

.ticket-portal-client-create > summary small {
  color: rgb(148 163 184);
  font-size: 0.78rem;
}

.ticket-portal-client-create .ticket-portal-creator {
  border: 0;
  border-top: 1px solid rgba(59, 130, 246, 0.16);
  border-radius: 0;
  background: rgba(7, 10, 16, 0.54);
  box-shadow: none;
}

.ticket-portal.is-client-view .ticket-portal-grid {
  grid-template-columns: minmax(0, 58rem);
  justify-content: center;
  gap: 1rem;
}

.ticket-portal.is-client-view .ticket-portal-conversation {
  order: 1;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.ticket-portal.is-client-view .ticket-portal-inbox {
  order: 2;
  position: static;
  max-height: none;
  border-color: rgba(148, 163, 184, 0.12);
  border-radius: 0.6rem;
  background:
    linear-gradient(180deg, rgba(17, 24, 39, 0.72), rgba(10, 13, 20, 0.88)),
    rgb(10 13 20);
}

.ticket-portal.is-client-view .ticket-portal-inbox .ticket-portal-card-list,
.ticket-portal.is-client-view .ticket-portal-closed .space-y-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 0.65rem;
}

.ticket-portal.is-client-view .ticket-portal-card {
  border-color: rgba(148, 163, 184, 0.12);
  border-radius: 0.45rem;
  background: rgba(15, 23, 42, 0.64);
}

.ticket-portal.is-client-view .ticket-portal-card:hover,
.ticket-portal.is-client-view .ticket-portal-card.is-active {
  border-color: rgba(59, 130, 246, 0.56);
  background: rgba(37, 99, 235, 0.12);
}

.ticket-portal.is-client-view .ticket-portal-brief {
  border-color: rgba(148, 163, 184, 0.12);
  border-radius: 0.5rem;
  background: rgba(17, 24, 39, 0.52);
}

.ticket-portal.is-client-view .ticket-portal-thread {
  max-height: none;
  overflow: visible;
  gap: 1rem;
  margin: 0.95rem 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
}

.ticket-portal.is-client-view .ticket-portal-thread-head {
  border: 0;
  padding: 0 0 0.1rem;
}

.ticket-portal.is-client-view .ticket-portal-thread-head strong {
  color: rgb(203 213 225);
  font-size: 0.78rem;
}

.ticket-portal.is-client-view .ticket-portal-message {
  width: 100%;
  border-color: rgba(148, 163, 184, 0.12);
  border-radius: 0.55rem;
  background: rgba(24, 28, 37, 0.82);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.26);
  padding: 0.95rem;
}

.ticket-portal.is-client-view .ticket-portal-message.is-self {
  margin-left: 0;
  border-color: rgba(250, 204, 21, 0.22);
  background: rgba(24, 28, 37, 0.9);
}

.ticket-portal.is-client-view .ticket-portal-message.is-staff {
  border-color: rgba(59, 130, 246, 0.36);
  border-left: 3px solid rgb(37 99 235);
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.16), rgba(12, 20, 34, 0.9)),
    rgb(12 20 34);
}

.ticket-portal.is-client-view .ticket-portal-message__avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 0.4rem;
  background: rgba(51, 65, 85, 0.88);
}

.ticket-portal.is-client-view .ticket-portal-message__meta {
  gap: 0.5rem;
}

.ticket-portal.is-client-view .ticket-portal-message__meta span {
  border-color: rgba(59, 130, 246, 0.34);
  background: rgba(59, 130, 246, 0.14);
  color: rgb(147 197 253);
}

.ticket-portal.is-client-view .ticket-portal-message.is-self .ticket-portal-message__meta span {
  border-color: rgba(250, 204, 21, 0.34);
  background: rgba(250, 204, 21, 0.12);
  color: rgb(253 224 71);
}

.ticket-portal.is-client-view .ticket-portal-message__body {
  color: rgb(241 245 249);
  font-size: 0.91rem;
}

.ticket-portal.is-client-view .ticket-portal-reply-box {
  position: static;
  border-color: rgba(148, 163, 184, 0.16);
  border-radius: 0.55rem;
  background:
    linear-gradient(180deg, rgba(24, 28, 37, 0.92), rgba(15, 17, 23, 0.96)),
    rgb(15 17 23);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.32);
}

.ticket-portal.is-client-view .ticket-portal-reply-box textarea {
  min-height: 11rem;
}

.ticket-portal.is-client-view .ticket-portal-composer-head {
  align-items: flex-end;
}

.ticket-portal.is-client-view .ticket-portal-reply-evidence {
  min-width: min(100%, 32rem);
}

.ticket-portal-client-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  border: 1px solid rgba(59, 130, 246, 0.14);
  border-radius: 0.75rem;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.84), rgba(7, 10, 16, 0.96)),
    rgb(7 10 16);
  box-shadow: 0 18px 56px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  padding: 0.55rem;
}

.ticket-portal-client-nav a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem;
  align-items: center;
  min-height: 3.2rem;
  border: 1px solid transparent;
  border-radius: 0.55rem;
  background: rgba(15, 23, 42, 0.44);
  color: rgb(148 163 184);
  padding: 0.8rem 0.9rem;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.ticket-portal-client-nav a:hover {
  border-color: rgba(59, 130, 246, 0.32);
  background: rgba(37, 99, 235, 0.1);
  transform: translateY(-1px);
}

.ticket-portal-client-nav a.is-active {
  border-color: rgba(59, 130, 246, 0.64);
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.24), transparent 12rem),
    rgba(37, 99, 235, 0.14);
  color: rgb(239 246 255);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 14px 34px rgba(37, 99, 235, 0.14);
}

.ticket-portal-client-nav span {
  min-width: 0;
  font-size: 0.82rem;
  font-weight: 900;
}

.ticket-portal-client-nav strong {
  display: grid;
  place-items: center;
  min-width: 2.1rem;
  height: 2.1rem;
  border: 1px solid rgba(147, 197, 253, 0.24);
  border-radius: 0.5rem;
  background: rgba(15, 23, 42, 0.78);
  color: rgb(191 219 254);
  font-size: 0.86rem;
}

.ticket-portal-creator--standalone {
  position: relative;
  overflow: hidden;
  border-color: rgba(59, 130, 246, 0.28);
  border-radius: 0.85rem;
  background:
    radial-gradient(circle at 12% 0%, rgba(59, 130, 246, 0.2), transparent 28rem),
    radial-gradient(circle at 92% 24%, rgba(34, 211, 238, 0.12), transparent 22rem),
    linear-gradient(145deg, rgba(10, 13, 20, 0.98), rgba(15, 23, 42, 0.92));
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.ticket-portal-creator--standalone::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, black, transparent 76%);
  pointer-events: none;
}

.ticket-portal-creator--standalone > form {
  position: relative;
  z-index: 1;
}

.ticket-portal-creator--standalone .ticket-portal-type-grid {
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
}

.ticket-portal-creator--standalone .ticket-portal-type-card {
  min-height: 9.5rem;
  border-color: rgba(59, 130, 246, 0.16);
  background:
    linear-gradient(145deg, rgba(15, 23, 42, 0.86), rgba(7, 10, 16, 0.82)),
    rgba(15, 23, 42, 0.7);
}

.ticket-portal-creator--standalone .ticket-portal-type-card:hover,
.ticket-portal-creator--standalone .ticket-portal-type-card:has(input:checked) {
  border-color: rgba(59, 130, 246, 0.68);
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.2), transparent 12rem),
    rgba(15, 23, 42, 0.9);
}

.ticket-portal.is-client-create-screen .ticket-portal-grid {
  grid-template-columns: minmax(0, 1fr);
}

.ticket-portal.is-client-create-screen .ticket-portal-inbox {
  border-style: dashed;
}

.ticket-portal.is-client-view .ticket-portal-empty--large {
  min-height: 18rem;
  border-radius: 0.7rem;
  background:
    radial-gradient(circle at top, rgba(59, 130, 246, 0.12), transparent 18rem),
    rgba(15, 23, 42, 0.56);
}

.ticket-portal-staff-command-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.ticket-portal-staff-command-strip a {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 0.35rem;
  min-height: 7.3rem;
  border: 1px solid rgba(var(--ticket-cyan), 0.18);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 10% 0%, rgba(var(--ticket-cyan), 0.16), transparent 14rem),
    linear-gradient(145deg, rgba(2, 8, 18, 0.94), rgba(8, 20, 34, 0.82));
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  padding: 1rem;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.ticket-portal-staff-command-strip a::after {
  content: "";
  position: absolute;
  inset: auto 1rem 0 1rem;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(var(--ticket-cyan), 0.68), transparent);
}

.ticket-portal-staff-command-strip a:hover {
  border-color: rgba(var(--ticket-cyan), 0.5);
  background:
    radial-gradient(circle at 10% 0%, rgba(var(--ticket-cyan), 0.22), transparent 14rem),
    linear-gradient(145deg, rgba(8, 20, 34, 0.96), rgba(2, 8, 18, 0.9));
  transform: translateY(-2px);
}

.ticket-portal-staff-command-strip span {
  color: rgb(125 211 252);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ticket-portal-staff-command-strip strong {
  color: rgb(236 254 255);
  font-size: 1.25rem;
  line-height: 1.1;
}

.ticket-portal-staff-command-strip small {
  color: hsl(var(--muted-foreground));
  font-size: 0.78rem;
  line-height: 1.35;
}

.ticket-portal.is-staff-management .ticket-portal-card {
  position: relative;
  overflow: hidden;
}

.ticket-portal.is-staff-management .ticket-portal-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: rgba(var(--ticket-cyan), 0.52);
  opacity: 0.45;
}

.ticket-portal.is-staff-management .ticket-portal-card.is-active::before,
.ticket-portal.is-staff-management .ticket-portal-card:hover::before {
  opacity: 1;
}

.ticket-portal.is-staff-management .ticket-portal-case-panel {
  background:
    radial-gradient(circle at top right, rgba(var(--ticket-amber), 0.08), transparent 18rem),
    linear-gradient(145deg, rgba(2, 8, 18, 0.96), rgba(8, 20, 34, 0.88));
}

@media (max-width: 1320px) {
  .ticket-portal-grid {
    grid-template-columns: minmax(18rem, 0.34fr) minmax(0, 1fr);
  }

  .ticket-portal-case-panel {
    grid-column: 1 / -1;
    position: static;
    max-height: none;
  }
}

@media (max-width: 980px) {
  .ticket-portal-grid,
  .ticket-portal-ticket-header,
  .ticket-portal-type-grid,
  .ticket-portal-client-titlebar {
    grid-template-columns: 1fr;
  }

  .ticket-portal-client-actions {
    justify-content: flex-start;
  }

  .ticket-portal-client-nav,
  .ticket-portal-staff-command-strip {
    grid-template-columns: 1fr;
  }

  .ticket-portal-inbox {
    position: static;
    max-height: none;
  }
}

@media (max-width: 640px) {
  .ticket-portal-message {
    grid-template-columns: 1fr;
  }

  .ticket-portal-message__avatar {
    display: none;
  }

  .ticket-portal-stepper {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .ticket-portal-client-action {
    flex: 1 1 9rem;
  }

  .ticket-portal-client-create > summary {
    align-items: flex-start;
    flex-direction: column;
  }
}
