:root {
  /* Solid Matte Surfaces (Zero Glassmorphism, Zero Gradients) */
  --bg-root: #09090b;
  --bg-shell: #0c0c0e;
  --bg-panel: #111114;
  --bg-panel-solid: #111114;
  --bg-card: #141418;
  --bg-card-hover: #1a1a1f;
  --bg-elevated: #18181c;
  --bg-track: #1f1f24;

  /* Hairline Borders */
  --border-subtle: #1e1e23;
  --border-default: #26262c;
  --border-strong: #36363e;
  --border-glow: #3f3f46;

  /* Elnusa Logo Brand Palette (Strict 3-Color Accent System) */
  --elnusa-blue: #0274ba;
  --elnusa-blue-hover: #0d86d0;
  --elnusa-blue-active: #005c96;
  --elnusa-blue-soft: rgba(2, 116, 186, 0.14);
  --elnusa-blue-border: rgba(2, 116, 186, 0.45);

  --elnusa-green: #22c55e;
  --elnusa-green-bright: #4ade80;
  --elnusa-green-soft: rgba(34, 197, 94, 0.1);
  --elnusa-green-border: rgba(34, 197, 94, 0.28);

  --elnusa-red: #da3940;
  --elnusa-red-bright: #ec676d;
  --elnusa-red-soft: rgba(218, 57, 64, 0.12);
  --elnusa-red-border: rgba(218, 57, 64, 0.36);

  /* Semantic Aliases Derived Strictly From Elnusa Logo */
  --accent-primary: var(--elnusa-blue);
  --accent-cyan: #a1a1aa;
  --accent-blue: var(--elnusa-blue);
  --accent-green: var(--elnusa-green);
  --accent-amber: var(--elnusa-red);
  --accent-red: var(--elnusa-red);

  /* Text Hierarchy */
  --text-primary: #f4f4f5;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;

  /* Radii & Spacing */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --radius-pill: 999px;

  /* Engineering Motion Tokens (Minimalist, Crisp, Non-Bouncy) */
  --ease-eng: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 120ms;
  --dur-med: 170ms;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body,
#root {
  width: 100%;
  height: 100%;
  background: var(--bg-root);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 13px;
  line-height: 1.45;
  letter-spacing: -0.005em;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

.tabular {
  font-family: 'IBM Plex Mono', monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #27272a;
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #3f3f46;
}

/* App Shell */
.app-shell {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  grid-template-rows: 52px minmax(0, 1fr);
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: var(--bg-root);
}

/* Topbar */
.topbar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: var(--bg-shell);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 20;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.brand-divider {
  width: 1px;
  height: 20px;
  background: var(--border-default);
}

.brand-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.brand-sub {
  font-size: 11px;
  color: var(--text-muted);
}

.topbar-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-select-group {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.top-select,
.input-field {
  background: var(--bg-panel);
  border: 1px solid var(--border-default);
  color: var(--text-primary);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 12px;
  outline: none;
  transition: border-color var(--dur-fast) ease, background var(--dur-fast) ease, box-shadow var(--dur-fast) ease, color var(--dur-fast) ease;
}

.top-select {
  cursor: pointer;
}

.top-select:hover:not(:disabled),
.input-field:hover:not(:disabled) {
  border-color: #36414d;
}

.top-select:focus:not(:disabled),
.input-field:focus:not(:disabled) {
  border-color: var(--elnusa-blue);
  background: var(--bg-elevated);
  box-shadow: 0 0 0 2px rgba(2, 116, 186, 0.18);
}

.top-select:disabled,
.input-field:disabled {
  background: #0c0c0e;
  border-color: #1a1a1f;
  color: #52525b;
  cursor: not-allowed;
  opacity: 0.72;
}

input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--elnusa-blue);
  cursor: pointer;
  transition: opacity var(--dur-fast) ease;
}

input[type="checkbox"]:disabled,
input[type="radio"]:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.top-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--bg-panel);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  padding: 6px 11px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: border-color var(--dur-fast) ease, color var(--dur-fast) ease, background var(--dur-fast) ease, transform var(--dur-fast) ease;
}
.top-pill-btn:hover:not(:disabled) {
  border-color: var(--elnusa-blue-border);
  background: #141922;
  color: var(--text-primary);
}
.top-pill-btn:active:not(:disabled) {
  background: #0f1620;
  border-color: var(--elnusa-blue);
}
.top-pill-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.icon-btn {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--bg-panel);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color var(--dur-fast) ease, color var(--dur-fast) ease, background var(--dur-fast) ease, transform var(--dur-fast) ease;
}
.icon-btn:hover:not(:disabled) {
  color: var(--text-primary);
  border-color: var(--elnusa-blue-border);
  background: #141922;
}
.icon-btn:active:not(:disabled) {
  background: #0f1620;
  border-color: var(--elnusa-blue);
}
.icon-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--elnusa-red);
  color: #fff;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9.5px;
  font-weight: 600;
  min-width: 15px;
  height: 15px;
  padding: 0 3px;
  border-radius: 999px;
  border: 1.5px solid var(--bg-shell);
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  border-radius: var(--radius-sm);
  background: var(--bg-panel);
  border: 1px solid var(--border-default);
  cursor: pointer;
  transition: border-color var(--dur-fast) ease, background var(--dur-fast) ease, transform var(--dur-fast) ease;
}
.user-pill:hover {
  border-color: var(--elnusa-blue-border);
  background: #141922;
}
.user-pill:active {
  background: #0f1620;
  border-color: var(--elnusa-blue);
}

.user-avatar {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-xs);
  background: #27272a;
  border: 1px solid #3f3f46;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 600;
  font-size: 10.5px;
  color: var(--text-primary);
}

/* Sidebar */
.sidebar {
  background: var(--bg-shell);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px 12px;
  overflow-y: auto;
}

.sidebar-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 12px;
  margin-bottom: 14px;
  transition: border-color var(--dur-fast) ease, background var(--dur-fast) ease;
}

.sidebar-search:focus-within {
  border-color: var(--elnusa-blue);
  background: var(--bg-elevated);
  box-shadow: 0 0 0 2px rgba(2, 116, 186, 0.16);
}

.sidebar-search input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 12px;
  width: 100%;
  min-width: 0;
}

.sidebar-search input::placeholder {
  color: var(--text-muted);
}

.kbd-hint {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  color: var(--text-muted);
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: 4px;
  padding: 1px 5px;
  flex-shrink: 0;
}

.nav-section-label {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text-muted);
  padding: 8px 10px 4px;
  letter-spacing: 0.02em;
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  background: transparent;
  width: 100%;
  text-align: left;
  transition: background var(--dur-fast) ease, color var(--dur-fast) ease, border-color var(--dur-fast) ease, transform var(--dur-fast) ease;
}

.nav-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  bottom: 7px;
  width: 2px;
  border-radius: 2px;
  background: var(--accent-primary);
  opacity: 0;
  transform: scaleY(0.4);
  transition: opacity var(--dur-med) var(--ease-eng), transform var(--dur-med) var(--ease-eng);
}

.nav-item:hover:not(:disabled) {
  background: #141922;
  border-color: rgba(2, 116, 186, 0.22);
  color: var(--text-primary);
}

.nav-item:active:not(:disabled) {
  background: #0f1620;
}

.nav-item.active {
  background: rgba(2, 116, 186, 0.12);
  border-color: var(--elnusa-blue-border);
  color: #ffffff;
}

.nav-item.active::before {
  opacity: 1;
  transform: scaleY(1);
}

.nav-item:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.nav-item.expanded {
  background: transparent;
  border-color: transparent;
  color: var(--text-primary);
  font-weight: 600;
}

.nav-item.expanded::before {
  opacity: 0;
}

.nav-sub-list {
  margin-left: 16px;
  padding-left: 12px;
  border-left: 1px solid var(--border-default);
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 2px;
  margin-bottom: 8px;
  animation: subListReveal 150ms var(--ease-eng);
}

.nav-sub-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  padding: 5px 9px;
  border-radius: var(--radius-xs);
  font-family: inherit;
  font-size: 11.5px;
  color: var(--text-muted);
  cursor: pointer;
  background: transparent;
  border: 1px solid transparent;
  text-align: left;
  transition: color var(--dur-fast) ease, background var(--dur-fast) ease, border-color var(--dur-fast) ease, transform var(--dur-fast) ease;
}
.nav-sub-item::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 50%;
  width: 8px;
  height: 1px;
  background: var(--border-default);
  transition: background var(--dur-fast) ease;
}
.nav-sub-item:hover:not(:disabled) {
  color: var(--text-primary);
  background: #141922;
}
.nav-sub-item:active:not(:disabled) {
  background: #0f1620;
}
.nav-sub-item.active {
  color: #ffffff;
  background: rgba(2, 116, 186, 0.14);
  border-color: rgba(2, 116, 186, 0.35);
  font-weight: 500;
}
.nav-sub-item.active::before {
  background: var(--elnusa-blue);
}
.nav-sub-dot {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--elnusa-blue);
  flex-shrink: 0;
}

.sidebar-footer-art {
  margin-top: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-panel);
  padding: 12px;
  text-align: left;
}

/* Main Content */
.main-content {
  height: 100%;
  min-height: 0;
  padding: 12px 20px 22px;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg-root);
}

/* Matte Panels & Cards */
.panel {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
}

.panel-glow {
  border-color: var(--border-default);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.panel-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

/* Asset Header Strip */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--text-muted);
}

.asset-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 14px;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
}

.asset-id-block {
  display: flex;
  align-items: center;
  gap: 12px;
}

.asset-thumb {
  width: 52px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg-root);
  border: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: center;
}

.asset-meta-row {
  display: flex;
  align-items: center;
  gap: 24px;
}

.asset-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.meta-label {
  font-size: 10.5px;
  color: var(--text-muted);
}

.meta-value {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
}

/* Status Badges (Derived Strictly From Elnusa Logo Palette) */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  transition: border-color var(--dur-fast) ease, background var(--dur-fast) ease, color var(--dur-fast) ease, transform var(--dur-fast) ease;
}

.badge-green {
  background: var(--elnusa-green-soft);
  color: var(--elnusa-green-bright);
  border-color: var(--elnusa-green-border);
}

.badge-blue {
  background: var(--elnusa-blue-soft);
  color: #4db3f0;
  border-color: var(--elnusa-blue-border);
}

.badge-amber {
  background: var(--elnusa-blue-soft);
  color: #5ab9f2;
  border-color: rgba(2, 116, 186, 0.36);
}

.badge-red {
  background: var(--elnusa-red-soft);
  color: var(--elnusa-red-bright);
  border-color: var(--elnusa-red-border);
}

.badge-slate {
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border-color: var(--border-default);
}

.interactive-badge:hover:not(:disabled) {
  filter: brightness(1.12);
}

/* Sub Tabs (Flat Minimalist Segmented) */
.sub-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}

.sub-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: var(--radius-xs);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: color var(--dur-fast) ease, background var(--dur-fast) ease, border-color var(--dur-fast) ease, transform var(--dur-fast) ease;
}

.sub-tab:hover:not(:disabled) {
  color: var(--text-primary);
  background: #151922;
}

.sub-tab:active:not(:disabled) {
  background: #101720;
}

.sub-tab.active {
  background: rgba(2, 116, 186, 0.18);
  border-color: var(--elnusa-blue-border);
  color: #ffffff;
}

.sub-tab:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Underline Tabs */
.underline-tabs {
  display: flex;
  align-items: center;
  gap: 18px;
  border-bottom: 1px solid var(--border-subtle);
}

.underline-tab {
  padding: 8px 2px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  margin-bottom: -1px;
  transition: color var(--dur-fast) ease, border-color var(--dur-fast) ease;
}
.underline-tab:hover:not(:disabled) {
  color: var(--text-primary);
  border-bottom-color: rgba(2, 116, 186, 0.45);
}
.underline-tab.active {
  color: #ffffff;
  border-bottom-color: var(--elnusa-blue);
}
.underline-tab:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Buttons (Solid Matte + Elnusa Color States) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border-default);
  background: var(--bg-elevated);
  color: var(--text-primary);
  transition: border-color var(--dur-fast) ease, background var(--dur-fast) ease, color var(--dur-fast) ease, transform var(--dur-fast) ease, opacity var(--dur-fast) ease;
}
.btn:hover:not(:disabled) {
  border-color: var(--elnusa-blue-border);
  background: #161b24;
  color: #ffffff;
}
.btn:active:not(:disabled) {
  background: #101722;
  border-color: var(--elnusa-blue);
}
.btn:disabled {
  background: #111114;
  border-color: #1e1e23;
  color: #52525b;
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--elnusa-blue);
  border-color: var(--elnusa-blue);
  color: #ffffff;
  font-weight: 600;
}
.btn-primary:hover:not(:disabled) {
  background: var(--elnusa-blue-hover);
  border-color: #2096de;
  color: #ffffff;
}
.btn-primary:active:not(:disabled) {
  background: var(--elnusa-blue-active);
  border-color: var(--elnusa-blue-active);
}
.btn-primary:disabled {
  background: #15222c;
  border-color: #1e303e;
  color: #526473;
  opacity: 0.8;
  cursor: not-allowed;
}

.btn-danger {
  background: transparent;
  border-color: var(--elnusa-red-border);
  color: var(--elnusa-red-bright);
}
.btn-danger:hover:not(:disabled) {
  background: var(--elnusa-red-soft);
  border-color: var(--elnusa-red);
  color: #ff8e93;
}
.btn-danger:active:not(:disabled) {
  background: rgba(218, 57, 64, 0.24);
  border-color: var(--elnusa-red);
}
.btn-danger:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-cyan {
  background: var(--bg-elevated);
  border-color: var(--elnusa-blue-border);
  color: var(--text-primary);
}

/* 3D Stage & Hotspots (Engineering CAD Viewport) */
.stage-3d {
  position: relative;
  border-radius: var(--radius-lg);
  background: #0c0c0e;
  border: 1px solid var(--border-subtle);
  overflow: hidden;
}

.stage-grid-bg {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 22px 22px;
  pointer-events: none;
}

.stage-toolbar {
  position: absolute;
  left: 12px;
  top: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 5;
}

.stage-tool-btn {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: var(--bg-panel);
  border: 1px solid var(--border-default);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color var(--dur-fast) ease, border-color var(--dur-fast) ease, background var(--dur-fast) ease, transform var(--dur-fast) ease;
}
.stage-tool-btn:hover:not(:disabled) {
  color: var(--text-primary);
  border-color: var(--elnusa-blue-border);
  background: #141922;
}
.stage-tool-btn:active:not(:disabled) {
  background: #0f1620;
  border-color: var(--elnusa-blue);
}
.stage-tool-btn.active {
  color: #ffffff;
  background: var(--elnusa-blue);
  border-color: var(--elnusa-blue);
}
.stage-tool-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.hotspot-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--bg-panel);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
  z-index: 6;
}
.hotspot-pin:hover {
  transform: translate(-50%, -50%) scale(1.08);
  border-color: var(--elnusa-blue);
  background: #141b24;
}
.hotspot-pin:active {
  transform: translate(-50%, -50%) scale(0.98);
}
.hotspot-pin.active {
  transform: translate(-50%, -50%) scale(1.1);
  background: var(--elnusa-blue);
  border-color: var(--elnusa-blue);
  color: #ffffff;
}

.hotspot-pin.active::after {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 999px;
  border: 1px solid rgba(2, 116, 186, 0.55);
  pointer-events: none;
  animation: pinRingIn 180ms var(--ease-eng);
}

.hotspot-pin.warn:not(.active)::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 999px;
  border: 1px solid rgba(218, 57, 64, 0.65);
  pointer-events: none;
  animation: warnRing 2.6s ease-out infinite;
}

.hotspot-callout {
  position: absolute;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 9px;
  border-radius: var(--radius-sm);
  background: var(--bg-panel);
  border: 1px solid var(--border-default);
  color: var(--text-primary);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  z-index: 6;
  transition: border-color var(--dur-fast) ease, background var(--dur-fast) ease, color var(--dur-fast) ease, transform var(--dur-fast) ease;
}
.hotspot-callout:hover {
  border-color: var(--elnusa-blue-border);
  background: #141922;
}
.hotspot-callout.active {
  background: var(--elnusa-blue);
  border-color: var(--elnusa-blue);
  color: #ffffff;
  font-weight: 600;
}

/* Progress Bar (Subtle) */
.progress-track {
  width: 100%;
  height: 3px;
  border-radius: 999px;
  background: var(--bg-track);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.35s ease;
}

/* KPI Strip */
.kpi-grid-6 {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}
.kpi-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.15s ease;
}
.kpi-card:hover {
  border-color: var(--border-default);
}

/* Tables */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.data-table th {
  text-align: left;
  padding: 8px 10px;
  color: var(--text-muted);
  font-weight: 500;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 11px;
}
.data-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
}
.data-table tr {
  cursor: pointer;
  transition: background var(--dur-fast) ease;
}
.data-table tbody tr:hover {
  background: #141922;
}
.data-table tbody tr:active {
  background: #101620;
}
.data-table tbody tr.selected {
  background: rgba(2, 116, 186, 0.12);
  outline: 1px solid var(--elnusa-blue-border);
}

/* Subtle Engineering Micro-Interactions */
@keyframes pageEnter {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes modalBackdropIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes modalPanelIn {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes dropdownReveal {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes subListReveal {
  from {
    opacity: 0;
    transform: translateY(-3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes statusFadeIn {
  from {
    opacity: 0;
    transform: translateX(-4px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pinRingIn {
  from {
    opacity: 0;
    transform: scale(0.75);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes liveDotPulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

@keyframes warnRing {
  0% {
    opacity: 0.75;
    transform: scale(0.95);
  }
  70% {
    opacity: 0;
    transform: scale(1.32);
  }
  100% {
    opacity: 0;
    transform: scale(1.32);
  }
}

.page-transition {
  flex: 1 0 auto;
  min-height: 0;
  overflow: visible;
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: pageEnter 180ms var(--ease-eng);
}

.modal-backdrop {
  animation: modalBackdropIn 150ms ease-out;
}

.modal-panel {
  animation: modalPanelIn 170ms var(--ease-eng);
  will-change: transform, opacity;
}

.tab-fade {
  animation: tabContentIn 150ms var(--ease-eng);
}

.comp-panel-enter {
  animation: tabContentIn 160ms var(--ease-eng);
}

.status-feedback {
  animation: statusFadeIn 160ms var(--ease-eng);
}

.live-dot {
  display: inline-block;
  animation: liveDotPulse 2.4s ease-in-out infinite;
}

.interactive-card {
  transition: border-color var(--dur-fast) ease, background var(--dur-fast) ease;
}

.interactive-card:hover {
  border-color: var(--elnusa-blue-border) !important;
  background: #151921 !important;
}

.thumb-zoom {
  transition: transform 220ms var(--ease-eng);
}

.interactive-card:hover .thumb-zoom {
  transform: scale(1.025);
}

.interactive-row {
  transition: background var(--dur-fast) ease, border-color var(--dur-fast) ease;
}

.interactive-row:hover {
  background: #141922 !important;
  border-color: rgba(2, 116, 186, 0.32) !important;
}

.interactive-row:active {
  background: #101620 !important;
}

.interactive-row.active {
  background: rgba(2, 116, 186, 0.14) !important;
  border-color: var(--elnusa-blue-border) !important;
}

.interactive-row .row-chevron {
  transition: transform var(--dur-fast) var(--ease-eng), color var(--dur-fast) ease;
}

.interactive-row:hover .row-chevron {
  transform: translateX(2px);
  color: #4db3f0 !important;
}

.chart-tooltip {
  animation: statusFadeIn 110ms var(--ease-eng);
}

.chart-dot {
  transition: r 120ms var(--ease-eng), opacity 120ms ease;
}

.map-marker-btn {
  transition: transform 150ms var(--ease-eng), border-color 150ms ease, width 150ms var(--ease-eng), height 150ms var(--ease-eng);
}

.map-marker-btn:hover {
  transform: scale(1.14);
}

/* Custom Matte Dropdowns */
.matte-select-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-default);
  background: var(--bg-panel);
  color: var(--text-primary);
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.14s ease, background 0.14s ease, transform var(--dur-fast) ease;
}
.matte-select-trigger:hover:not(:disabled) {
  border-color: var(--elnusa-blue-border);
  background: #141922;
}
.matte-select-trigger:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.custom-dropdown-menu {
  position: absolute;
  z-index: 80;
  background: var(--bg-panel);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.68);
  overflow: hidden;
  transform-origin: top center;
  animation: dropdownReveal 130ms var(--ease-eng);
}

.custom-dropdown-item {
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.custom-dropdown-item:hover:not(:disabled) {
  background: #141922;
  border-color: rgba(2, 116, 186, 0.32);
  color: var(--text-primary);
}
.custom-dropdown-item:active:not(:disabled) {
  background: #0f1620;
}
.custom-dropdown-item.active {
  background: rgba(2, 116, 186, 0.16);
  border-color: var(--elnusa-blue-border);
  color: #ffffff;
}
.custom-dropdown-item:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Tactile Press & Engineering Focus Rings */
.btn:active:not(:disabled),
.sub-tab:active:not(:disabled),
.nav-item:active:not(:disabled),
.nav-sub-item:active:not(:disabled),
.top-pill-btn:active:not(:disabled),
.user-pill:active,
.matte-select-trigger:active:not(:disabled),
.hotspot-callout:active,
.interactive-badge:active:not(:disabled) {
  transform: scale(0.985);
}

.icon-btn:active:not(:disabled),
.stage-tool-btn:active:not(:disabled) {
  transform: scale(0.95);
}

.btn:focus-visible,
.icon-btn:focus-visible,
.stage-tool-btn:focus-visible,
.top-pill-btn:focus-visible,
.user-pill:focus-visible,
.sub-tab:focus-visible,
.underline-tab:focus-visible,
.nav-item:focus-visible,
.nav-sub-item:focus-visible,
.matte-select-trigger:focus-visible,
.hotspot-pin:focus-visible,
.hotspot-callout:focus-visible,
.interactive-badge:focus-visible {
  outline: 1.5px solid var(--elnusa-blue);
  outline-offset: 2px;
}

.donut-arc {
  transition: stroke-dashoffset 0.55s cubic-bezier(0.22, 1, 0.36, 1), stroke-dasharray 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-reduced-motion: reduce) {
  .page-transition,
  .modal-backdrop,
  .modal-panel,
  .custom-dropdown-menu,
  .nav-sub-list,
  .tab-fade,
  .comp-panel-enter,
  .status-feedback,
  .live-dot,
  .chart-tooltip,
  .hotspot-pin.active::after,
  .hotspot-pin.warn:not(.active)::after {
    animation: none !important;
  }
  .donut-arc,
  .progress-fill,
  .thumb-zoom,
  .interactive-card,
  .interactive-row,
  .interactive-row .row-chevron,
  .map-marker-btn,
  .nav-item::before {
    transition: none !important;
  }
}

/* MapLibre Dark Matte Popup */
.river-map-popup .maplibregl-popup-content {
  background: var(--bg-panel);
  border: 1px solid var(--border-default);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text-primary);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.65);
  font-family: 'Inter', sans-serif;
  min-width: 290px;
  animation: dropdownReveal 120ms var(--ease-eng);
}

.river-map-popup .maplibregl-popup-tip {
  border-top-color: var(--border-default);
  border-bottom-color: var(--border-default);
}

/* MapLibre Dark Matte Scale Bar */
.maplibregl-ctrl-bottom-left {
  left: 12px !important;
  bottom: 12px !important;
}

.maplibregl-ctrl-scale {
  background: var(--bg-panel) !important;
  border: 1px solid var(--border-default) !important;
  border-top: none !important;
  border-bottom: 2px solid #a1a1aa !important;
  border-radius: 0 0 4px 4px;
  color: var(--text-primary) !important;
  font-family: 'IBM Plex Mono', monospace !important;
  font-size: 10px !important;
  font-variant-numeric: tabular-nums;
  padding: 2px 7px !important;
  box-shadow: none !important;
  margin: 0 !important;
}

/* ==========================================================================
   Unified Solid-Matte Modal System (Stable Geometry & Typography)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 8, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}

.modal-shell {
  width: 560px;
  max-width: 94vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  background: var(--bg-panel);
  border: 1px solid #2b2b33;
  border-radius: 12px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.72);
}

.modal-shell--md {
  width: 560px;
}

.modal-shell--lg {
  width: 720px;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px 14px;
  background: #131317;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.modal-header-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.modal-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.modal-title {
  font-size: 15px;
  font-weight: 600;
  color: #fafafa;
  letter-spacing: -0.015em;
  line-height: 1.3;
}

.modal-subtitle {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.45;
}

.modal-close-btn {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color var(--dur-fast) ease, background var(--dur-fast) ease, color var(--dur-fast) ease, transform var(--dur-fast) ease;
}

.modal-close-btn:hover {
  border-color: var(--elnusa-blue-border);
  background: #161b24;
  color: #ffffff;
}

.modal-close-btn:active {
  transform: scale(0.95);
}

.modal-close-btn:focus-visible {
  outline: 1.5px solid var(--elnusa-blue);
  outline-offset: 2px;
}

.modal-tabs {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 20px;
  background: #101014;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
  overflow-x: auto;
}

.modal-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 2px;
  margin-bottom: -1px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--dur-fast) ease, border-color var(--dur-fast) ease;
}

.modal-tab:hover {
  color: var(--text-primary);
  border-bottom-color: rgba(2, 116, 186, 0.45);
}

.modal-tab.active {
  color: #ffffff;
  font-weight: 600;
  border-bottom-color: var(--elnusa-blue);
}

.modal-tab:focus-visible {
  outline: 1.5px solid var(--elnusa-blue);
  outline-offset: -2px;
}

.modal-tab-pill {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
}

.modal-tab.active .modal-tab-pill {
  background: var(--elnusa-blue-soft);
  border-color: var(--elnusa-blue-border);
  color: #7cc7f7;
}

.modal-form {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-body--fixed {
  height: min(470px, calc(88vh - 156px));
}

.modal-body--medium {
  height: min(390px, calc(88vh - 156px));
}

.modal-section {
  padding: 14px;
  border-radius: var(--radius-md);
  background: #0c0c0f;
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #19191f;
}

.modal-section-title {
  font-size: 11px;
  font-weight: 600;
  color: #e4e4e7;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.modal-section-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

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

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

.modal-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.modal-field-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 500;
  color: #b4b4bc;
  line-height: 1.25;
}

.modal-field-hint {
  font-size: 10.5px;
  color: var(--text-muted);
  line-height: 1.35;
}

.modal-required {
  color: var(--elnusa-red-bright);
  font-weight: 600;
}

.modal-shell .input-field {
  width: 100%;
  min-height: 34px;
  padding: 6px 10px;
  font-size: 12.5px;
  background: #09090b;
}

.modal-shell textarea.input-field {
  min-height: 76px;
  padding: 8px 10px;
  line-height: 1.5;
  resize: vertical;
}

.modal-shell .matte-select-trigger {
  min-height: 34px;
  font-size: 12.5px;
  background: #09090b;
}

.modal-shell .matte-select-trigger.is-compact {
  min-height: 30px;
  font-size: 11.5px;
}

.modal-summary-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: #141419;
  border: 1px solid var(--border-default);
}

.modal-error {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  background: var(--elnusa-red-soft);
  border: 1px solid var(--elnusa-red-border);
  color: #fca5a5;
  font-size: 12px;
  line-height: 1.4;
}

.modal-empty {
  padding: 18px 14px;
  border-radius: var(--radius-sm);
  border: 1px dashed #26262e;
  background: #09090b;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 20px;
  background: #131317;
  border-top: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.modal-footer-left,
.modal-footer-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.modal-footer .btn {
  min-height: 32px;
  padding: 6px 13px;
}

@media (max-width: 680px) {
  .modal-backdrop {
    padding: 10px;
  }
  .modal-header,
  .modal-tabs,
  .modal-body,
  .modal-footer {
    padding-left: 14px;
    padding-right: 14px;
  }
  .modal-body--fixed,
  .modal-body--medium {
    height: auto;
    max-height: calc(88vh - 150px);
  }
  .modal-grid-2,
  .modal-grid-3 {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Unified Solid-Matte Modal System (Stable Geometry & Typography)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 8, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}

.modal-shell {
  width: 560px;
  max-width: 94vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  background: var(--bg-panel);
  border: 1px solid #2b2b33;
  border-radius: 12px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.72);
}

.modal-shell--md {
  width: 560px;
}

.modal-shell--lg {
  width: 720px;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px 14px;
  background: #131317;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.modal-header-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.modal-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.modal-title {
  font-size: 15px;
  font-weight: 600;
  color: #fafafa;
  letter-spacing: -0.015em;
  line-height: 1.3;
}

.modal-subtitle {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.45;
}

.modal-close-btn {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color var(--dur-fast) ease, background var(--dur-fast) ease, color var(--dur-fast) ease, transform var(--dur-fast) ease;
}

.modal-close-btn:hover {
  border-color: var(--elnusa-blue-border);
  background: #161b24;
  color: #ffffff;
}

.modal-close-btn:active {
  transform: scale(0.95);
}

.modal-close-btn:focus-visible {
  outline: 1.5px solid var(--elnusa-blue);
  outline-offset: 2px;
}

.modal-tabs {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 20px;
  background: #101014;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
  overflow-x: auto;
}

.modal-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 2px;
  margin-bottom: -1px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--dur-fast) ease, border-color var(--dur-fast) ease;
}

.modal-tab:hover {
  color: var(--text-primary);
  border-bottom-color: rgba(2, 116, 186, 0.45);
}

.modal-tab.active {
  color: #ffffff;
  font-weight: 600;
  border-bottom-color: var(--elnusa-blue);
}

.modal-tab:focus-visible {
  outline: 1.5px solid var(--elnusa-blue);
  outline-offset: -2px;
}

.modal-tab-pill {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
}

.modal-tab.active .modal-tab-pill {
  background: var(--elnusa-blue-soft);
  border-color: var(--elnusa-blue-border);
  color: #7cc7f7;
}

.modal-form {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-body--fixed {
  height: min(470px, calc(88vh - 156px));
}

.modal-body--medium {
  height: min(390px, calc(88vh - 156px));
}

.modal-section {
  padding: 14px;
  border-radius: var(--radius-md);
  background: #0c0c0f;
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #19191f;
}

.modal-section-title {
  font-size: 11px;
  font-weight: 600;
  color: #e4e4e7;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.modal-section-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

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

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

.modal-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.modal-field-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 500;
  color: #b4b4bc;
  line-height: 1.25;
}

.modal-field-hint {
  font-size: 10.5px;
  color: var(--text-muted);
  line-height: 1.35;
}

.modal-required {
  color: var(--elnusa-red-bright);
  font-weight: 600;
}

.modal-shell .input-field {
  width: 100%;
  min-height: 34px;
  padding: 6px 10px;
  font-size: 12.5px;
  background: #09090b;
}

.modal-shell textarea.input-field {
  min-height: 76px;
  padding: 8px 10px;
  line-height: 1.5;
  resize: vertical;
}

.modal-shell .matte-select-trigger {
  min-height: 34px;
  font-size: 12.5px;
  background: #09090b;
}

.modal-shell .matte-select-trigger.is-compact {
  min-height: 30px;
  font-size: 11.5px;
}

.modal-summary-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: #141419;
  border: 1px solid var(--border-default);
}

.modal-error {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  background: var(--elnusa-red-soft);
  border: 1px solid var(--elnusa-red-border);
  color: #fca5a5;
  font-size: 12px;
  line-height: 1.4;
}

.modal-empty {
  padding: 18px 14px;
  border-radius: var(--radius-sm);
  border: 1px dashed #26262e;
  background: #09090b;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 20px;
  background: #131317;
  border-top: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.modal-footer-left,
.modal-footer-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.modal-footer .btn {
  min-height: 32px;
  padding: 6px 13px;
}

@media (max-width: 680px) {
  .modal-backdrop {
    padding: 10px;
  }
  .modal-header,
  .modal-tabs,
  .modal-body,
  .modal-footer {
    padding-left: 14px;
    padding-right: 14px;
  }
  .modal-body--fixed,
  .modal-body--medium {
    height: auto;
    max-height: calc(88vh - 150px);
  }
  .modal-grid-2,
  .modal-grid-3 {
    grid-template-columns: 1fr;
  }
}
