/*
 * REA TollDesk visual system.
 * Tokens follow ~/vault/shared/projects/artifice-tolldesk/style-guide-2026-07-31/STYLEGUIDE.md §1 and §5 verbatim.
 */
:root {
  --ink: #14161a;
  --ink-2: #3c4046;
  --muted: #6b7076;
  --muted-2: #8a8f95;
  --line: rgba(20,22,26,.09);
  --line-soft: rgba(20,22,26,.06);
  --line-strong: rgba(20,22,26,.14);
  --bg: #f7f8f9;
  --bg-shell: #eeeeec;
  --panel: rgba(255,255,255,.94);
  --panel-header: linear-gradient(180deg,#fcfcfa,#f7f8f9);
  --chip-bg: #f2f2ee;
  --orange: #e07b02;
  --orange-ink: #a55600;
  --orange-tint: #fdf3e6;
  --green: #3fa45b;
  --video-bg: #101215;
  --video-stripe-1: #2b2e33;
  --video-stripe-2: #242730;
  --status-blue-bg: #eef3fb;
  --status-blue-ink: #31527f;
  --status-done-bg: #eaf6ee;
  --status-done-ink: #26663c;
  --status-red-bg: #fdecec;
  --status-red-ink: #94322f;
  --status-neutral-ink: #5c6167;
  --confidence-low: #c8c8c4;
  --surface: #fff;
  --surface-elevated: #fbfbf8;
  --surface-darker: #f7f8f9;
  --header-bg: #fff;
  --header-powered: #31527f;
  --page-background: radial-gradient(1200px 600px at 78% -10%, #fff 0%, rgba(255,255,255,0) 60%), linear-gradient(180deg,#f3f3f1 0%,#e9e9e6 100%);
  --hero-background: repeating-linear-gradient(90deg, rgba(20,22,26,.028) 0 1px, transparent 1px 8px), linear-gradient(135deg,#fff 0%,#f8f8f5 55%,#f1f1ed 100%);
  --panel-border: rgba(20,22,26,.1);
  --panel-shadow: 0 2px 10px rgba(20,22,26,.04);
  --hero-shadow: 0 8px 30px rgba(20,22,26,.06);
  --input-bg: #fff;
  --secondary-bg: #fff;
  --secondary-ink: #14161a;
  --secondary-edge: #cfd3d8;
  --ghost-edge: #d8dbe0;
  --row-hover: #fbf6ef;
  --subtle-hover: rgba(0,0,0,.03);
  --link: #c96a00;
  --link-hover: #8f4c00;
}

[data-theme="dark"] {
  --ink: #f2f2ef;
  --ink-2: #c2c7cd;
  --muted: #9aa0a7;
  /* #7f858c from the mock falls below 4.5:1 on elevated panels; keep body text AA. */
  --muted-2: #9aa0a7;
  --muted-decorative: #7f858c;
  --line: rgba(255,255,255,.09);
  --line-soft: rgba(255,255,255,.07);
  --line-strong: rgba(255,255,255,.16);
  --bg: #0d0f12;
  --bg-shell: #15181c;
  --panel: rgba(26,30,35,.92);
  --panel-header: linear-gradient(180deg,#22262c,#1c2025);
  --chip-bg: #2a2f36;
  --orange-ink: #f0a02e;
  --orange-tint: rgba(224,123,2,.16);
  --green: #5cc47c;
  --status-blue-bg: rgba(49,82,127,.28);
  --status-blue-ink: #b6c9e4;
  --status-done-bg: rgba(63,164,91,.16);
  --status-done-ink: #5cc47c;
  --status-red-bg: rgba(148,50,47,.2);
  --status-red-ink: #e08a86;
  --status-neutral-ink: #b0b5bb;
  --confidence-low: #7f858c;
  --surface: #1c2025;
  --surface-elevated: #171a1e;
  --surface-darker: #15181c;
  --header-bg: rgba(20,23,27,.92);
  --header-powered: #9aa0a7;
  --page-background: radial-gradient(1200px 600px at 78% -10%, rgba(255,255,255,.06) 0%, rgba(255,255,255,0) 60%), linear-gradient(180deg,#15181c 0%,#0d0f12 100%);
  --hero-background: repeating-linear-gradient(90deg, rgba(255,255,255,.025) 0 1px, transparent 1px 8px), linear-gradient(135deg,#22262c 0%,#1c2025 55%,#171a1e 100%);
  --panel-border: rgba(255,255,255,.1);
  --panel-shadow: 0 2px 10px rgba(0,0,0,.45);
  --hero-shadow: 0 8px 30px rgba(0,0,0,.5);
  --input-bg: #171a1e;
  --secondary-bg: #2a2f36;
  --secondary-ink: #f2f2ef;
  --secondary-edge: #0a0c0e;
  --ghost-edge: #0a0c0e;
  --row-hover: rgba(224,123,2,.10);
  --subtle-hover: rgba(255,255,255,.05);
  --link: #f0a02e;
  --link-hover: #ffbe63;
}

html {
  font-size: 19.2px;
  background: var(--bg);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body.rea-shell {
  min-height: 100vh;
  margin: 0;
  background: var(--page-background);
  color: var(--ink);
  font-family: "Archivo", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-wrap: pretty;
}

.rea-shell-header {
  width: 100%;
  background: var(--header-bg);
  border: 0;
}

.rea-shell-header__inner {
  min-height: 72px;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px 64px 13px;
}

.rea-shell-logo {
  height: 44px;
  width: auto;
  display: block;
}

.rea-shell-powered {
  color: var(--header-powered);
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13.2px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  white-space: nowrap;
}

.rea-shell-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}

.theme-toggle {
  position: relative;
  width: 48px;
  min-width: 48px;
  min-height: 44px;
  padding: 0 !important;
  border: 1px solid var(--line-strong) !important;
  border-radius: 10px !important;
  background: var(--secondary-bg) !important;
  color: var(--secondary-ink) !important;
  box-shadow: 0 4px 0 var(--secondary-edge), 0 5px 10px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.18) !important;
}

.theme-toggle__icon {
  width: 17px;
  height: 17px;
  border: 2px solid currentColor;
  border-radius: 50%;
  background: linear-gradient(90deg, currentColor 50%, transparent 50%);
  transform: rotate(0deg);
  transition: transform 180ms ease;
}

[data-theme="dark"] .theme-toggle__icon { transform: rotate(180deg); }

.rea-shell-rule {
  width: 100%;
  height: 3px;
  background: var(--orange);
}

.rea-page {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 38px 64px 52px;
}

body:not(.rea-shell) .rea-page,
.rea-auth-page {
  min-height: 100vh;
}

.font-sans {
  font-family: "Archivo", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

.rea-page-head {
  margin-bottom: 26px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.rea-org-title {
  color: var(--ink);
  font-size: 36px;
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -.02em;
}

.rea-meta,
.rea-body-copy {
  color: var(--muted);
  font-size: 16.8px;
  line-height: 1.55;
}

.rea-meta strong {
  color: var(--ink);
  font-weight: 700;
}

.rea-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.rea-section-title {
  color: var(--ink);
  font-size: 31.2px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -.02em;
}

.page-title,
.rea-page-title {
  color: var(--ink);
  font-family: "Archivo", ui-sans-serif, system-ui, sans-serif;
  font-size: 48px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: -.028em;
}

.rea-section-subtitle {
  margin-top: 6px;
  color: var(--muted);
  font-size: 16.8px;
}

.rea-panel,
.rea-card,
.rea-list-panel,
.rea-form-panel,
.rea-auth-card,
[data-ticket-show-section] {
  border-radius: 14px !important;
  background: var(--panel) !important;
  border: 1px solid var(--panel-border) !important;
  box-shadow: var(--panel-shadow) !important;
  overflow: hidden;
}

.rea-hero-panel {
  border-radius: 16px !important;
  background: var(--hero-background) !important;
  border: 1px solid var(--panel-border) !important;
  box-shadow: var(--hero-shadow) !important;
}

.rea-panel-header,
.rea-list-panel > div:first-child,
.rea-form-panel > div:first-child,
[data-ticket-detail-header] {
  padding: 14px 20px !important;
  border-bottom: 1px solid var(--line-soft) !important;
  background: var(--panel-header) !important;
}

.rea-panel-header h2,
.rea-panel-header h3,
.rea-list-panel h3,
.rea-form-panel h2,
[data-ticket-show-section] > h2,
[data-ticket-detail-header] h2,
.rea-eyebrow {
  color: var(--muted-2) !important;
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important;
  font-size: 12.6px !important;
  line-height: 1.2 !important;
  font-weight: 600 !important;
  letter-spacing: .16em !important;
  text-transform: uppercase !important;
}

.rea-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
}

.rea-metric-card {
  min-height: 132px;
  padding: 26px 28px !important;
  border-radius: 12px !important;
  background: var(--surface) !important;
  border: 1px solid var(--line) !important;
  box-shadow: var(--panel-shadow) !important;
}

.rea-metric-label {
  color: var(--muted) !important;
  font-size: 18px !important;
  line-height: 1.3;
}

.rea-metric-value {
  margin-top: 10px !important;
  color: var(--ink) !important;
  font-size: 48px !important;
  line-height: 1;
  font-weight: 700 !important;
  letter-spacing: -.03em;
}

.rea-list-panel {
  border-radius: 12px !important;
}

.rea-list-panel > div:first-child {
  padding: 22px 26px !important;
  background: var(--surface) !important;
}

.rea-list-row {
  padding: 18px 26px !important;
  border-bottom: 1px solid var(--line-soft);
}

.rea-list-row:last-child {
  border-bottom: 0;
}

.rea-list-title,
.rea-list-title a {
  color: var(--ink) !important;
  font-size: 19.2px !important;
  font-weight: 600 !important;
  letter-spacing: -.01em;
  text-decoration: none;
}

.rea-list-title a:hover {
  text-decoration: underline;
}

.rea-list-meta,
.rea-list-time {
  color: var(--muted) !important;
  font-size: 16.8px !important;
}

.rea-list-time,
.rea-mono,
.rea-ticket-number,
.rea-status-badge,
.rea-param-chip,
.rea-shell-powered {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important;
}

.rea-ticket-number {
  color: var(--muted-2) !important;
  font-size: 13.2px !important;
  font-weight: 600 !important;
  letter-spacing: .13em !important;
  text-transform: uppercase;
}

.rea-button,
a.rea-button,
button.rea-button,
input.rea-button,
.rea-shell input[type="submit"],
.rea-shell button,
.rea-shell a.inline-flex {
  min-height: 44px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 11px !important;
  padding: 13px 24px !important;
  font-family: "Archivo", ui-sans-serif, system-ui, sans-serif !important;
  font-size: 17.4px !important;
  line-height: 1;
  font-weight: 700 !important;
  text-decoration: none !important;
  transform: translateY(0);
  transition: transform 150ms cubic-bezier(.34,1.56,.64,1), box-shadow 150ms cubic-bezier(.34,1.56,.64,1), border-color 150ms cubic-bezier(.34,1.56,.64,1), background-color 150ms cubic-bezier(.34,1.56,.64,1);
  will-change: transform;
}

.rea-button--primary,
a.rea-button--primary,
input.rea-button--primary,
.rea-shell input[type="submit"] {
  background: #e1820e !important;
  border: 0 !important;
  box-shadow: 0 5px 0 #a85700, 0 6px 12px rgba(168,87,0,.22), inset 0 1px 0 rgba(255,255,255,.4) !important;
  padding: 13px 24px !important;
  border-radius: 11px !important;
  color: #fff !important;
  font: 700 17.4px/1 "Archivo", ui-sans-serif, system-ui, sans-serif !important;
}

.rea-button--secondary,
a.rea-button--secondary,
button.rea-button--secondary,
.rea-shell button,
.rea-shell a.inline-flex:not(.rea-button--primary),
.rea-shell input[type="submit"]:not(.rea-button--primary) {
  border: 1px solid var(--line-strong) !important;
  background: var(--secondary-bg) !important;
  color: var(--secondary-ink) !important;
  box-shadow: 0 5px 0 var(--secondary-edge), 0 6px 12px rgba(0,0,0,.12), inset 0 1px 0 rgba(255,255,255,.2) !important;
}

.rea-button--ghost,
a.rea-button--ghost {
  min-height: auto;
  padding: 9px 15px !important;
  border-radius: 8px !important;
  border: 1px solid var(--line-strong) !important;
  background: var(--secondary-bg) !important;
  color: var(--ink-2) !important;
  box-shadow: 0 4px 0 var(--ghost-edge), 0 5px 10px rgba(0,0,0,.12), inset 0 1px 0 rgba(255,255,255,.18) !important;
  font-family: "IBM Plex Mono", monospace !important;
  font-size: 13.2px !important;
  font-weight: 600 !important;
  letter-spacing: .08em !important;
  text-transform: uppercase;
}

.rea-button--primary:hover,
a.rea-button--primary:hover,
input.rea-button--primary:hover,
.rea-shell input[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 0 #a85700, 0 10px 18px rgba(168,87,0,.28), inset 0 1px 0 rgba(255,255,255,.4) !important;
}

.rea-button--secondary:hover,
a.rea-button--secondary:hover,
button.rea-button--secondary:hover,
.rea-shell button:hover,
.rea-shell a.inline-flex:not(.rea-button--primary):hover,
.rea-shell input[type="submit"]:not(.rea-button--primary):hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 0 var(--secondary-edge), 0 10px 18px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.2) !important;
}

.rea-button--ghost:hover,
a.rea-button--ghost:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 var(--ghost-edge), 0 9px 16px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.18) !important;
}

.rea-button:active,
a.rea-button:active,
button.rea-button:active,
input.rea-button:active,
.rea-shell input[type="submit"]:active,
.rea-shell button:active,
.rea-shell a.inline-flex:active {
  transform: translateY(4px);
  transition: transform 70ms ease-out, box-shadow 70ms ease-out;
}

.rea-button--primary:active,
a.rea-button--primary:active,
input.rea-button--primary:active,
.rea-shell input[type="submit"]:active {
  box-shadow: 0 1px 0 #a85700, 0 3px 8px rgba(168,87,0,.2), inset 0 1px 0 rgba(255,255,255,.4) !important;
}

.rea-button--secondary:active,
a.rea-button--secondary:active,
button.rea-button--secondary:active,
.rea-shell button:active,
.rea-shell a.inline-flex:not(.rea-button--primary):active,
.rea-shell input[type="submit"]:not(.rea-button--primary):active {
  box-shadow: 0 1px 0 var(--secondary-edge), 0 3px 8px rgba(0,0,0,.16), inset 0 1px 0 rgba(255,255,255,.2) !important;
}

.rea-button--ghost:active,
a.rea-button--ghost:active {
  transform: translateY(3px);
  transition: transform 70ms ease-out, box-shadow 70ms ease-out;
  box-shadow: 0 1px 0 var(--ghost-edge), 0 2px 4px rgba(0,0,0,.14), inset 0 1px 0 rgba(255,255,255,.18) !important;
}

.password-visibility-toggle,
button.rea-button.password-visibility-toggle {
  width: 44px;
  min-height: 44px;
  padding: 0 !important;
  transform: translateY(-50%);
}

.password-visibility-toggle:hover,
button.rea-button.password-visibility-toggle:hover {
  transform: translateY(calc(-50% - 2px));
}

.password-visibility-toggle:active,
button.rea-button.password-visibility-toggle:active {
  transform: translateY(calc(-50% + 4px));
}

.rea-button:disabled,
button.rea-button:disabled,
input.rea-button:disabled,
.rea-shell input[type="submit"]:disabled,
.rea-shell button:disabled,
.rea-button[aria-disabled="true"],
a.rea-button[aria-disabled="true"] {
  cursor: not-allowed !important;
  opacity: .85;
  transform: translateY(0) !important;
}

.rea-button--primary:disabled,
input.rea-button--primary:disabled,
.rea-shell input[type="submit"]:disabled,
.rea-button--primary[aria-disabled="true"] {
  box-shadow: 0 3px 0 #a85700, 0 4px 10px rgba(168,87,0,.18), inset 0 1px 0 rgba(255,255,255,.4) !important;
}

.rea-button--secondary:disabled,
button.rea-button--secondary:disabled,
.rea-shell button:disabled,
.rea-shell input[type="submit"]:not(.rea-button--primary):disabled,
.rea-button--secondary[aria-disabled="true"],
.rea-button--ghost[aria-disabled="true"] {
  box-shadow: 0 3px 0 var(--secondary-edge), 0 4px 10px rgba(0,0,0,.14), inset 0 1px 0 rgba(255,255,255,.2) !important;
}

@media (prefers-reduced-motion: reduce) {
  .rea-button,
  a.rea-button,
  button.rea-button,
  input.rea-button,
  .rea-shell input[type="submit"],
  .rea-shell button,
  .rea-shell a.inline-flex {
    transition: transform 70ms ease-out, box-shadow 70ms ease-out;
  }

  .rea-button:hover,
  a.rea-button:hover,
  button.rea-button:hover,
  input.rea-button:hover,
  .rea-shell input[type="submit"]:hover,
  .rea-shell button:hover,
  .rea-shell a.inline-flex:hover {
    transform: translateY(-1px) !important;
  }

  .rea-button:active,
  a.rea-button:active,
  button.rea-button:active,
  input.rea-button:active,
  .rea-shell input[type="submit"]:active,
  .rea-shell button:active,
  .rea-shell a.inline-flex:active {
    transform: translateY(1px) !important;
  }

  .password-visibility-toggle,
  .password-visibility-toggle:hover,
  .password-visibility-toggle:active {
    transform: translateY(-50%) !important;
  }
}

.rea-status-badge,
.rea-shell .rounded-full {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px !important;
  padding: 5px 9px !important;
  background: var(--chip-bg) !important;
  border: 1px solid var(--line) !important;
  color: var(--status-neutral-ink) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  letter-spacing: .08em !important;
  text-transform: uppercase !important;
}

.rea-status-badge--attention { background: var(--orange-tint) !important; color: var(--orange-ink) !important; border-color: rgba(224,123,2,.25) !important; }
.rea-status-badge--progress { background: var(--status-blue-bg) !important; color: var(--status-blue-ink) !important; border-color: rgba(49,82,127,.25) !important; }
.rea-status-badge--done { background: var(--status-done-bg) !important; color: var(--status-done-ink) !important; border-color: rgba(63,164,91,.25) !important; }
.rea-status-badge--escalated { background: var(--status-red-bg) !important; color: var(--status-red-ink) !important; border-color: rgba(148,50,47,.25) !important; }

.rea-param-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 5px;
  padding: 4px 8px;
  background: var(--chip-bg);
  border: 1px solid var(--line-soft);
  color: var(--ink-2);
  font-size: 12.6px;
}

.rea-shell select,
.rea-shell input[type="text"],
.rea-shell input[type="email"],
.rea-shell input[type="password"],
.rea-shell input[type="number"],
.rea-shell textarea {
  border-radius: 9px !important;
  border: 1px solid var(--line-strong) !important;
  background: var(--input-bg) !important;
  color: var(--ink) !important;
  font-family: "Archivo", ui-sans-serif, system-ui, sans-serif !important;
  font-size: 16.2px !important;
  box-shadow: inset 0 1px 2px rgba(20,22,26,.04) !important;
}

.rea-shell select:focus,
.rea-shell input:focus,
.rea-shell textarea:focus {
  outline: none !important;
  border-color: var(--orange) !important;
  box-shadow: 0 0 0 3px rgba(224,123,2,.18), inset 0 1px 2px rgba(20,22,26,.04) !important;
}

.rea-shell dl dt,
.rea-detail-label {
  color: var(--muted-2) !important;
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important;
  font-size: 12.6px !important;
  font-weight: 600 !important;
  letter-spacing: .13em !important;
  text-transform: uppercase !important;
}

.rea-shell dl dd {
  margin-top: 4px;
  color: var(--ink-2);
}

.rea-shell blockquote,
.rea-shell .bg-slate-50 {
  background: var(--surface-darker) !important;
}

.rea-media-surface {
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  border: 1px solid var(--line-soft);
  background: repeating-linear-gradient(135deg,#dedcd6 0 6px,#d4d2cb 6px 12px);
  overflow: hidden;
}

.rea-shell img.object-cover,
.rea-shell a.block.overflow-hidden {
  border-radius: 12px !important;
}

@media (max-width: 900px) {
  .rea-shell-header__inner,
  .rea-page {
    padding-left: 24px;
    padding-right: 24px;
  }

  .rea-shell-header__inner {
    flex-wrap: wrap;
    gap: 12px;
  }

  .rea-shell-nav {
    order: 3;
    width: 100%;
    margin-left: 0;
    overflow-x: auto;
  }

  .rea-metrics {
    grid-template-columns: 1fr;
  }

  .rea-page-head,
  .rea-section-head {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 640px) {
  .rea-shell-header__inner {
    min-height: 66px;
    padding-left: 18px;
    padding-right: 18px;
  }

  .rea-shell-logo {
    height: 36px;
  }

  .rea-shell-powered {
    font-size: 11.4px;
    letter-spacing: .12em;
  }

  .rea-page {
    padding: 28px 18px 42px;
  }
}

.rea-page > .max-w-6xl,
.rea-page > .max-w-4xl,
.rea-page > .max-w-3xl {
  max-width: none !important;
}

.rea-page > .max-w-md {
  max-width: 28rem !important;
}

.rea-shell-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 18px;
}

.rea-shell-nav__link {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 9px 14px;
  border-radius: 9px;
  color: var(--muted);
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.6px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
}

.rea-shell-nav__link:hover,
.rea-shell-nav__link--active {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(0,0,0,.18);
}

.elu-page {
  width: 100%;
  font-family: "Archivo", ui-sans-serif, system-ui, sans-serif;
}

.elu-eyebrow--orange { color: var(--orange) !important; margin-bottom: 10px; }
.elu-mono { font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--muted-2); }
.elu-link-strong { color: var(--orange-ink); font-weight: 600; }

.elu-filter-panel,
.elu-table-panel {
  margin-bottom: 18px;
  border-radius: 15px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  box-shadow: var(--panel-shadow);
  overflow: hidden;
}

.elu-filter-panel { padding: 18px 22px; }
.elu-filter-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.elu-filter-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }
.elu-field-label { display: block; margin-bottom: 6px; color: var(--muted-2); font-family: "IBM Plex Mono", monospace; font-size: 12px; font-weight: 600; letter-spacing: .13em; text-transform: uppercase; }
.elu-input,
.elu-select { width: 100%; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--input-bg); color: var(--ink); padding: 11px 12px; font-size: 16.2px; }

.elu-panel-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 20px; border-bottom: 1px solid var(--line-soft); background: var(--panel-header); }
.elu-panel-header h2 { margin: 0; color: var(--ink-2); font-family: "IBM Plex Mono", monospace; font-size: 12.6px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.elu-panel-header span { color: var(--muted-2); font-family: "IBM Plex Mono", monospace; font-size: 12.6px; }

.elu-table-header,
.elu-table-row { display: grid; grid-template-columns: 1.05fr 1.2fr 1fr 1.15fr 1fr 1fr; gap: 16px; align-items: center; }
.elu-table-header { padding: 11px 22px; border-bottom: 1px solid var(--line-soft); color: var(--muted-2); font-family: "IBM Plex Mono", monospace; font-size: 12px; font-weight: 600; letter-spacing: .13em; text-transform: uppercase; }
.elu-table-row { padding: 15px 22px; border-bottom: 1px solid var(--line-soft); color: var(--ink-2); font-size: 16.2px; text-decoration: none; }
.elu-table-row:hover { background: var(--row-hover); color: var(--ink); }
.elu-empty-state { padding: 24px 22px; color: var(--muted); font-size: 16.8px; }

.elu-back-row { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.elu-case-hero { position: relative; padding: 30px 34px; margin-bottom: 18px; }
.elu-ridge-stack { position: absolute; top: 22px; right: 34px; display: flex; flex-direction: column; gap: 3px; opacity: .35; }
.elu-ridge-stack span { display: block; height: 2px; background: var(--ink); }
.elu-ridge-stack span:nth-child(1), .elu-ridge-stack span:nth-child(3) { width: 56px; }
.elu-ridge-stack span:nth-child(2) { width: 38px; }
.elu-ridge-stack span:nth-child(3) { background: var(--orange); }
.elu-case-hero__content { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; }
.elu-case-kicker { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; color: var(--orange); font-family: "IBM Plex Mono", monospace; font-size: 12.6px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.elu-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--orange); }
.elu-case-hero h1 { margin: 0; color: var(--ink); font-family: "IBM Plex Mono", monospace; font-size: 55.2px; font-weight: 600; letter-spacing: -.035em; line-height: 1; }
.elu-case-hero p { margin: 8px 0 0; color: var(--ink-2); }
.elu-detail-grid { display: grid; grid-template-columns: 1.25fr .95fr; gap: 18px; align-items: start; }
.elu-data-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.elu-readonly-field { min-height: 116px; padding: 16px 20px; border-bottom: 1px solid var(--line-soft); border-right: 1px solid var(--line-soft); }
.elu-readonly-field label { display: block; color: var(--muted-2); font-family: "IBM Plex Mono", monospace; font-size: 12px; font-weight: 600; letter-spacing: .13em; text-transform: uppercase; }
.elu-readonly-field output { display: block; white-space: pre-wrap; margin-top: 6px; color: var(--ink); font-size: 19.2px; font-weight: 500; letter-spacing: -.01em; }
.elu-confidence { display: inline-flex; margin-top: 8px; color: var(--muted-2); font-family: "IBM Plex Mono", monospace; font-size: 12px; }
.elu-summary-list { padding: 18px 20px; display: grid; gap: 14px; }
.elu-summary-list div { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.elu-summary-list dt, .elu-warnings h3 { color: var(--muted-2); font-family: "IBM Plex Mono", monospace; font-size: 12px; font-weight: 600; letter-spacing: .13em; text-transform: uppercase; }
.elu-summary-list dd { margin: 0; color: var(--ink); font-weight: 600; }
.elu-warnings { padding: 0 20px 20px; }
.elu-warnings ul { margin: 10px 0 0; padding-left: 18px; color: var(--muted); font-size: 15.6px; }
.elu-warnings p { margin: 10px 0 0; color: var(--muted); font-size: 15.6px; }

@media (max-width: 980px) {
  .elu-filter-grid,
  .elu-detail-grid,
  .elu-data-grid { grid-template-columns: 1fr; }
  .elu-table-header { display: none; }
  .elu-table-row { grid-template-columns: 1fr; gap: 8px; }
}

/* Eludidos inspector */
.elu-flash { margin-bottom: 16px; padding: 12px 16px; border-radius: 10px; border: 1px solid var(--line); font-family: "IBM Plex Mono", monospace; font-size: 13.2px; letter-spacing: .08em; text-transform: uppercase; }
.elu-flash--notice { background: var(--status-done-bg); color: var(--status-done-ink); }
.elu-flash--alert { background: var(--status-red-bg); color: var(--status-red-ink); }
.elu-inspector-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 18px; align-items: start; }
.elu-review-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: auto; }
.elu-review-field { padding: 16px 18px; border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.elu-review-field__top { display: flex; justify-content: space-between; gap: 10px; align-items: start; }
.elu-badge-row { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.elu-alt-toggle { margin-top: 8px; min-height: 32px; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--secondary-bg); color: var(--ink-2); font-family: "IBM Plex Mono", monospace; font-size: 12.6px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.elu-alt-list { display: grid; gap: 7px; margin-top: 8px; }
.elu-alt-card { display: flex !important; align-items: center; justify-content: space-between !important; gap: 12px; text-align: left; border: 1px solid var(--line); border-radius: 8px; background: var(--chip-bg); padding: 8px 10px !important; cursor: pointer; transition: .14s ease; }
.elu-alt-card:hover { border-color: var(--orange); transform: translateY(-1px); }
.elu-alt-card__text { display: block; flex: 1 1 auto; min-width: 0; color: var(--ink); font-weight: 600; }
.elu-alt-card__meta { display: block; flex: 0 0 auto; max-width: 45%; margin-top: 0; color: var(--muted-2); font-family: "IBM Plex Mono", monospace; font-size: 11px; line-height: 1.25; text-align: right; }
.elu-review-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; padding: 16px 18px; border-top: 1px solid var(--line-soft); background: var(--surface-elevated); }
.elu-status-select { max-width: 180px; }
.elu-viewer-stage { position: relative; margin: 16px; border-radius: 12px; overflow: hidden; background: repeating-linear-gradient(135deg,var(--video-stripe-1) 0 9px,var(--video-stripe-2) 9px 18px); aspect-ratio: 16 / 9; }
.elu-video { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; object-fit: contain; color: rgba(255,255,255,.78); font-family: "IBM Plex Mono", monospace; font-size: 13.2px; letter-spacing: .12em; text-transform: uppercase; background: radial-gradient(120% 90% at 50% 40%, rgba(255,255,255,.06), rgba(0,0,0,.45)); }
.elu-crop-overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.elu-crop-overlay[hidden] { display: none !important; }
.elu-crop-line { stroke: rgba(224,123,2,.92); stroke-width: .35; vector-effect: non-scaling-stroke; }
.elu-crop-line--dim { stroke: rgba(255,255,255,.35); }
.elu-viewer-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 24px 16px 16px; }
.elu-scrub { flex: 1 1 180px; accent-color: var(--orange); }
.elu-sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
.elu-filmstrip { display: flex; gap: 12px; overflow-x: auto; padding: 4px 16px 16px; scroll-snap-type: x proximity; }
.elu-frame-chip {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  padding: 8px;
  text-align: left;
  cursor: pointer;
  transition: .14s ease;
  scroll-snap-align: start;
}
.elu-frame-chip:hover, .elu-frame-chip.is-selected { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(224,123,2,.22), 0 3px 10px rgba(180,95,0,.18); transform: translateY(-2px); }
.elu-frame-chip img {
  display: block;
  width: 100%;
  height: 124px;
  object-fit: cover;
  object-position: right center;
  border-radius: 7px;
  background: #101215;
}
.elu-frame-chip span, .elu-frame-chip small {
  display: block;
  color: var(--muted-2);
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.elu-frame-chip > span:first-of-type { color: var(--ink); font-weight: 600; }
.elu-frame-badges { color: var(--orange-ink) !important; }
.elu-modal { width: min(1120px, 94vw); border: 1px solid var(--line); border-radius: 14px; background: #101215; padding: 46px 18px 18px; }
.elu-modal::backdrop { background: rgba(20,22,26,.62); }
.elu-modal img { width: 100%; max-height: 80vh; object-fit: contain; }
.elu-modal-close { position: absolute; top: 12px; right: 12px; min-height: 34px; border: 1px solid rgba(255,255,255,.24); border-radius: 7px; background: rgba(255,255,255,.08); color: #fff; font-family: "IBM Plex Mono", monospace; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
/* When the modal image is in browser fullscreen (Fullscreen API on the
   IMG element), let it fill the viewport with a black backdrop. */
img:fullscreen,
img:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  object-fit: contain;
  background: #000;
}

@media (max-width: 1080px) {
  .elu-inspector-grid, .elu-review-fields { grid-template-columns: 1fr; }
}
.elu-crop-cell--excluded { fill: rgba(20,22,26,.28); }

/* Crossings */
.crossing-table-header,
.crossing-table-row { grid-template-columns: 1.1fr 1fr .8fr 1fr .55fr .9fr; }
.crossings-hero-actions,
.elu-case-hero__actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; }
.crossings-run-button { min-height: 48px; padding-inline: 22px; font-size: 14.4px; }
.crossings-video-stage { margin: 16px; }
.crossings-form-panel { max-width: 980px; margin: 0 auto; }
.crossings-form { padding: 18px; }
.crossings-pagination { justify-content: center; border-top: 1px solid var(--line-soft); }

@media (max-width: 980px) {
  .crossing-table-header { display: none; }
  .crossing-table-row { grid-template-columns: 1fr; gap: 8px; }
}

/* Inspector sketch redesign */
.elu-inspector-grid { grid-template-columns: minmax(520px, 1.15fr) minmax(360px, .85fr); align-items: stretch; }
.elu-viewer-panel,
.elu-review-panel { height: 100%; min-height: 0; }
.elu-review-panel { display: flex; flex-direction: column; max-height: clamp(520px, 46vw, 640px); overflow: hidden; }
.elu-review-fields { grid-template-columns: 1fr; }
.elu-review-panel .elu-review-fields { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.elu-review-field { border-right: 0; }
.elu-review-actions { flex: 0 0 auto; }
.elu-viewer-stage { margin-bottom: 10px; }
.elu-viewer-title { min-width: 0; }
.elu-viewer-title [data-inspector-target="frameLabel"] { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.elu-viewer-actions { display: flex; align-items: center; gap: 7px; }
.elu-icon-button { width: 36px; height: 36px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--secondary-bg); color: var(--ink); font-size: 18px; line-height: 1; cursor: pointer; }
.elu-icon-button:hover { border-color: var(--orange); color: var(--orange); }
.elu-panel-header--viewer { justify-content: space-between; }
.elu-frame-stepper { flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: 20px; padding-top: 24px; }
.elu-frame-step-row { display: flex; align-items: center; flex-wrap: nowrap; gap: 6px; width: 100%; }
.elu-frame-step { flex: 1 1 0; min-width: 0; min-height: 32px; padding: 0 6px !important; font-family: "IBM Plex Mono", monospace !important; font-size: 11px !important; white-space: nowrap; }
.elu-step-gap { flex: 0 0 8px; width: 8px; }
.elu-frame-stepper .elu-scrub { flex: 0 0 auto; width: 100%; }
.elu-filmstrip-panel { grid-column: 1 / -1; }
.elu-filmstrip-header { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 12px 16px 0; color: var(--muted-2); font-family: "IBM Plex Mono", monospace; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.elu-filmstrip-arrow { width: 38px; height: 34px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--secondary-bg); color: var(--ink); cursor: pointer; }
.elu-filmstrip-arrow:disabled { opacity: .42; cursor: not-allowed; }
.elu-filmstrip { display: flex; justify-content: center; overflow: visible; }
.elu-frame-chip { flex: 1 1 0; min-width: 0; width: auto; }
.elu-frame-chip[hidden] { display: none; }
.elu-frame-chip img { height: auto; aspect-ratio: 16 / 9; }

@media (max-width: 1080px) {
  .elu-inspector-grid { grid-template-columns: 1fr; }
  .elu-review-panel { max-height: none; }
  .elu-filmstrip { flex-wrap: wrap; }
  .elu-frame-chip { flex-basis: calc(50% - 6px); }
}

@media (max-width: 620px) {
  .elu-filmstrip { flex-direction: column; flex-wrap: nowrap; }
  .elu-frame-chip { flex-basis: auto; width: 100%; }
}
.elu-frame-chip--hidden { display: none !important; }

/* Fullscreen video controls auto-hide after 2s mouse inactivity.
   inspector_controller.js toggles data-fs-idle="true" on the video
   element after the FULLSCREEN_IDLE_MS timeout. CSS fades Chrome/Safari's
   internal ::-webkit-media-controls-panel and hides the cursor so the
   ops-leader demo looks clean when the presenter's hand is off the mouse. */
video[data-fs-idle="true"] { cursor: none; }
video[data-fs-idle="true"]::-webkit-media-controls-panel { opacity: 0; transition: opacity 240ms; }
video::-webkit-media-controls-panel { transition: opacity 240ms; }

/* Session picker rows — sit inside the dropdown from show.html.erb.
   Uses rea tokens (--muted, --line-soft, --orange-tint). Two-line
   layout: title full-width line 1, small monospace meta line 2. */
/* .rea-shell button rules use !important for display/padding/border/etc,
   so the picker rows need !important overrides to win specificity.
   Codex P2 on #143. */
.rea-shell button.tino-session-row,
.tino-session-row {
  display: block !important;
  width: 100% !important;
  min-height: 0 !important;
  padding: 10px 14px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--line-soft) !important;
  background: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  text-align: left !important;
  cursor: pointer;
  transition: background 120ms;
  font: inherit !important;
  transform: none !important;
}
.rea-shell button.tino-session-row:last-child,
.tino-session-row:last-child { border-bottom: 0 !important; }
.rea-shell button.tino-session-row:hover,
.tino-session-row:hover { background: var(--subtle-hover) !important; transform: none !important; }
.rea-shell button.tino-session-row.is-current,
.tino-session-row.is-current { background: var(--orange-tint) !important; }
.tino-session-row__title {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tino-session-row__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}
.tino-session-row__id { font-family: "IBM Plex Mono", ui-monospace, monospace; color: var(--muted-2); }
.tino-session-row__dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted-2); flex-shrink: 0; }

/* Theme bridge for existing Tailwind-authored screens. The semantic custom
   properties keep tickets, dashboard, chat, crossings and Eludidos on the
   same stylesheet while legacy utility classes migrate incrementally. */
.rea-shell button.theme-toggle {
  width: 48px;
  min-width: 48px;
  min-height: 44px;
  padding: 0 !important;
  border: 1px solid var(--line-strong) !important;
  border-radius: 10px !important;
  background: var(--secondary-bg) !important;
  color: var(--secondary-ink) !important;
  box-shadow: 0 4px 0 var(--secondary-edge), 0 5px 10px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.18) !important;
}

.rea-shell button.theme-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 0 var(--secondary-edge), 0 7px 14px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.18) !important;
}

.rea-shell button.theme-toggle:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--secondary-edge), 0 2px 5px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.18) !important;
}

[data-theme="dark"] ::selection { background: rgba(224,123,2,.35); color: #fff; }
[data-theme="dark"] ::-webkit-scrollbar-thumb { background: #3a3f46; border-radius: 8px; }
[data-theme="dark"] ::-webkit-scrollbar-track { background: transparent; }

[data-theme="dark"] .rea-shell .bg-white,
[data-theme="dark"] .rea-shell [class~="bg-white/80"] {
  background-color: var(--surface) !important;
}

[data-theme="dark"] .rea-shell .bg-slate-50,
[data-theme="dark"] .rea-shell .bg-slate-100 {
  background-color: var(--surface-darker) !important;
}

[data-theme="dark"] .rea-shell .text-slate-900,
[data-theme="dark"] .rea-shell .text-slate-800,
[data-theme="dark"] .rea-shell .text-slate-700 {
  color: var(--ink) !important;
}

[data-theme="dark"] .rea-shell .text-slate-600,
[data-theme="dark"] .rea-shell .text-slate-500 {
  color: var(--muted) !important;
}

[data-theme="dark"] .rea-shell .text-slate-400 {
  color: var(--muted-2) !important;
}

[data-theme="dark"] .rea-shell .border-slate-200,
[data-theme="dark"] .rea-shell .border-slate-300,
[data-theme="dark"] .rea-shell .divide-slate-200 > :not(:last-child) {
  border-color: var(--line) !important;
}

[data-theme="dark"] .rea-shell .hover\:bg-slate-50:hover,
[data-theme="dark"] .rea-shell .hover\:bg-white:hover {
  background-color: var(--subtle-hover) !important;
}

[data-theme="dark"] .rea-shell .bg-amber-50,
[data-theme="dark"] .rea-shell .bg-orange-100,
[data-theme="dark"] .rea-shell [class~="bg-orange-50/60"] {
  background-color: var(--orange-tint) !important;
}

[data-theme="dark"] .rea-shell .border-amber-200,
[data-theme="dark"] .rea-shell .border-orange-200 {
  border-color: rgba(224,123,2,.3) !important;
}

[data-theme="dark"] .rea-shell .text-amber-800,
[data-theme="dark"] .rea-shell .text-amber-900,
[data-theme="dark"] .rea-shell .text-orange-600,
[data-theme="dark"] .rea-shell .text-orange-700 {
  color: var(--orange-ink) !important;
}

[data-theme="dark"] .rea-shell .bg-red-50,
[data-theme="dark"] .rea-shell .bg-rose-50 {
  background-color: var(--status-red-bg) !important;
}

[data-theme="dark"] .rea-shell .border-red-100,
[data-theme="dark"] .rea-shell .border-rose-200 {
  border-color: rgba(224,138,134,.25) !important;
}

[data-theme="dark"] .rea-shell .text-red-700,
[data-theme="dark"] .rea-shell .text-rose-800 {
  color: var(--status-red-ink) !important;
}

[data-theme="dark"] .rea-shell table,
[data-theme="dark"] .rea-shell thead,
[data-theme="dark"] .rea-shell tbody,
[data-theme="dark"] .rea-shell tr,
[data-theme="dark"] .rea-shell th,
[data-theme="dark"] .rea-shell td {
  border-color: var(--line-soft) !important;
}

[data-theme="dark"] .rea-shell select option { background: #171a1e; color: #f2f2ef; }
[data-theme="dark"] .rea-media-surface {
  background: repeating-linear-gradient(135deg,var(--video-stripe-1) 0 9px,var(--video-stripe-2) 9px 18px);
}
[data-theme="dark"] .elu-crop-cell--excluded { fill: rgba(0,0,0,.5); }

@media (max-width: 640px) {
  .rea-shell-actions { gap: 8px; }
  .rea-shell-powered { display: none; }
}
