/* ==========================================================================
 * BLHN / SIAL × LVL SOLUTIONS — VIREO AURORA + FASTO WIDGETS OVERRIDE
 * Authentic Brand Tokens:
 *   Primary Crimson Accent / CTAs: #B90000
 *   Dark Charcoal Structural:      #232323
 *   Clean White Backgrounds:       #FFFFFF
 *   Secondary Highlight Gold:      #FFAC00
 * ========================================================================== */

:root,
[data-ax-accent="blhn-crimson"] {
  --ax-accent-50:  #FDF2F2;
  --ax-accent-100: #FBD5D5;
  --ax-accent-200: #F8B4B4;
  --ax-accent-300: #F08080;
  --ax-accent-400: #E02424;
  --ax-accent-500: #B90000;
  --ax-accent-600: #9B0000;
  --ax-accent-700: #7D0000;
  --ax-accent-800: #5E0000;
  --ax-accent-900: #3F0000;

  --ax-accent:       #B90000;
  --ax-accent-hover: #9B0000;
  --ax-accent-wash:  rgba(185, 0, 0, 0.09);
  --ax-on-accent:    #FFFFFF;
  --ax-focus-ring:   #B90000;
  --ax-link:         #B90000;
  --ax-accent-rgb:   185, 0, 0;
  --ax-gold:         #FFAC00;
  --ax-gold-wash:    rgba(255, 172, 0, 0.14);
  --ax-charcoal:     #232323;

  /* Visualization tokens for Vireo ApexCharts */
  --ax-viz-amber:    #FFAC00;
  --ax-viz-cyan:     #FFAC00;
  --ax-viz-violet:   #D97706;
  --ax-viz-emerald:  #10B981;
  --ax-viz-pink:     #E11D48;

  /* Gradient plate for Financial Voucher Vault card */
  --ax-gradient-plate: linear-gradient(135deg, #B90000 0%, #6E0000 58%, #232323 100%);
}

[data-ax-theme="dark"],
[data-ax-theme="dark"][data-ax-accent="blhn-crimson"] {
  --ax-canvas:          #141414;
  --ax-surface:         rgba(35, 35, 35, 0.82);
  --ax-surface-solid:   #232323;
  --ax-surface-subtle:  rgba(44, 44, 44, 0.86);
  --ax-surface-raised:  rgba(26, 26, 26, 0.85);
  --ax-surface-overlay: rgba(30, 30, 30, 0.96);

  --ax-accent:          #E02424;
  --ax-accent-hover:    #FF4D4D;
  --ax-accent-wash:     rgba(185, 0, 0, 0.22);
  --ax-on-accent:       #FFFFFF;
  --ax-link:            #FFAC00;
  --ax-focus-ring:      #FFAC00;
  --ax-accent-rgb:      185, 0, 0;

  --ax-glow-1:          rgba(185, 0, 0, 0.18);
  --ax-glow-2:          rgba(255, 172, 0, 0.14);
  --ax-glow-3:          rgba(185, 0, 0, 0.10);
}

/* --------------------------------------------------------------------------
 * Fasto High-Contrast Stat Metric Card (.lvl-stat-widget)
 * Ported directly from /mnt/extra-addons/lvl_chauffeur_dispatch/static/src/scss/fasto_widgets.scss
 * -------------------------------------------------------------------------- */
.lvl-stat-widget {
  background: var(--ax-surface-solid);
  border: 1px solid var(--ax-border);
  border-radius: 14px;
  padding: 1.15rem 1.35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.lvl-stat-widget:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  border-color: rgba(185, 0, 0, 0.45);
}

.lvl-stat-widget .lvl-stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--ax-accent-wash);
  color: #B90000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
  border: 1px solid rgba(185, 0, 0, 0.28);
}

[data-ax-theme="dark"] .lvl-stat-widget .lvl-stat-icon {
  color: #FFAC00;
  border-color: rgba(255, 172, 0, 0.3);
}

.lvl-stat-widget .lvl-stat-data {
  margin-left: 1.1rem;
  flex-grow: 1;
}

.lvl-stat-widget .lvl-stat-label {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--ax-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.2rem;
}

.lvl-stat-widget .lvl-stat-value {
  font-family: var(--ax-font-display, 'Space Grotesk', sans-serif);
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--ax-text-strong);
  line-height: 1.15;
}

.lvl-stat-widget .lvl-stat-subtext {
  font-family: var(--ax-font-mono, monospace);
  font-size: 0.72rem;
  color: #FFAC00;
  margin-top: 0.25rem;
}

[data-ax-theme="light"] .lvl-stat-widget .lvl-stat-subtext {
  color: #B90000;
}

/* --------------------------------------------------------------------------
 * Fasto Touch Action Card (.lvl-touch-action-card)
 * Ported directly from fasto_widgets.scss for Constituent / Attorney / Heir Dockets
 * -------------------------------------------------------------------------- */
.lvl-touch-action-card {
  display: flex;
  align-items: center;
  padding: 1rem 1.2rem;
  background: var(--ax-surface);
  border: 1px solid var(--ax-border);
  border-radius: 14px;
  min-height: 78px;
  margin-bottom: 0.75rem;
  touch-action: manipulation;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}

.lvl-touch-action-card:hover {
  border-color: #B90000;
  background: var(--ax-fill-hover);
}

.lvl-touch-action-card.is-selected {
  border-color: #FFAC00;
  background: var(--ax-accent-wash);
  box-shadow: 0 0 0 1px rgba(255, 172, 0, 0.35);
}

.lvl-touch-action-card .lvl-touch-avatar {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: linear-gradient(135deg, #B90000, #7D0000);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  flex-shrink: 0;
}

.lvl-touch-action-card .lvl-touch-details {
  flex-grow: 1;
  min-width: 0;
}

.lvl-touch-action-card .lvl-passenger-name {
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--ax-text-strong);
  margin-bottom: 0.15rem;
}

.lvl-touch-action-card .lvl-route-route {
  font-size: 0.82rem;
  color: var(--ax-text-muted);
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.lvl-touch-action-card .lvl-meta-tags {
  display: flex;
  gap: 0.45rem;
  margin-top: 0.4rem;
  flex-wrap: wrap;
}

.lvl-touch-action-card .lvl-badge {
  font-family: var(--ax-font-mono, monospace);
  font-size: 0.68rem;
  padding: 0.18rem 0.5rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--ax-text-muted);
  border: 1px solid var(--ax-border);
}

.lvl-touch-action-card .lvl-badge.vip {
  background: rgba(255, 172, 0, 0.16);
  color: #FFAC00;
  border-color: rgba(255, 172, 0, 0.4);
  font-weight: 600;
}

[data-ax-theme="light"] .lvl-touch-action-card .lvl-badge.vip {
  color: #92400E;
  background: rgba(255, 172, 0, 0.22);
}

.lvl-touch-action-card .lvl-badge.crimson {
  background: rgba(185, 0, 0, 0.18);
  color: #F8B4B4;
  border-color: rgba(185, 0, 0, 0.45);
  font-weight: 600;
}

[data-ax-theme="light"] .lvl-touch-action-card .lvl-badge.crimson {
  color: #B90000;
  background: rgba(185, 0, 0, 0.1);
}

.lvl-touch-action-card .lvl-action-btn-pill {
  padding: 0.5rem 1rem;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 999px;
  background: #B90000;
  color: #FFFFFF;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  margin-left: 0.75rem;
  transition: background 0.15s ease, transform 0.15s ease;
}

.lvl-touch-action-card .lvl-action-btn-pill:hover {
  background: #9B0000;
  transform: translateY(-1px);
}

/* Custom Tab Visibility utility for multi-workspace switching inside Vireo shell */
[data-kindeed-view] {
  display: none;
}
[data-kindeed-view].is-active-view {
  display: block;
  animation: axFadeIn 0.22s ease-out;
}
@keyframes axFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
