﻿/**
 * PREMIUM HIGH-CONTRAST GLASSMORPHIC DESIGN SYSTEM
 * Developed by Antigravity AI for Pyrros's COD ERP Platform.
 * Incorporating IBM Plex Sans Arabic, Plus Jakarta Sans, Glass Silk elements, and razor-sharp glass borders.
 */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  /* â”€â”€ Core Brand Colors - Deep vivid high-contrast â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
  --brand-navy: #0f62fe; /* Electric Cobalt */
  --brand-teal: #00b4d8;
  
  /* â”€â”€ Central Design Token Setup â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
  --accent:     #0f62fe;
  --accent-rgb: 15, 98, 254;
  --accent-gradient: linear-gradient(135deg, #0f62fe 0%, #8a3ffc 100%);
  
  /* â”€â”€ High-Contrast Premium Light Glassmorphism â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
  --bg:         radial-gradient(circle at 15% 15%, rgba(15, 98, 254, 0.12) 0%, transparent 50%),
                radial-gradient(circle at 85% 85%, rgba(0, 180, 216, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 50% 50%, rgba(138, 63, 252, 0.08) 0%, transparent 60%),
                #f4f7fc;
  --surface:    rgba(255, 255, 255, 0.74);
  --surface-1:  rgba(255, 255, 255, 0.76);
  --surface-2:  rgba(15, 98, 254, 0.04);
  --surface-3:  rgba(255, 255, 255, 0.92);
  
  /* â”€â”€ High-Contrast Typography (Maximum Readability) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
  --text:       #111827; /* Deep rich charcoal-black */
  --text-1:     #111827; 
  --text-2:     #2d3748; /* Strong contrast secondary text */
  --text-3:     #4a5568;
  --text-4:     #718096;
  
  /* â”€â”€ Glass Borders â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
  --border:     rgba(255, 255, 255, 0.8);
  --border-1:   rgba(255, 255, 255, 0.8);
  --border-2:   rgba(15, 98, 254, 0.08);
  --border-3:   rgba(0, 0, 0, 0.08);
  
  /* â”€â”€ Deep Layered Depth Shadows â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
  --resting-depth: 0 4px 20px -4px rgba(0, 0, 0, 0.06), 0 1px 3px -1px rgba(0, 0, 0, 0.04);
  --lifted-focus:  0 24px 48px -8px rgba(0, 0, 0, 0.14), 0 1px 6px -2px rgba(0, 0, 0, 0.04);
  --card-shadow:       var(--resting-depth);
  --card-shadow-hover: var(--lifted-focus);
  
  /* â”€â”€ Structural Tokens â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 32px;
  
  /* â”€â”€ Kinetic Motion Curves â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
  --ease-out-quart: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-expo:  cubic-bezier(0.19, 1, 0.22, 1);
  --transition-smooth: 0.35s var(--ease-out-quart);
  --transition-fast:   0.2s var(--ease-out-quart);
  
  /* â”€â”€ Skeletons â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
  --skeleton-bg: linear-gradient(90deg, var(--surface-2) 25%, var(--border-2) 50%, var(--surface-2) 75%);
  
  /* â”€â”€ Semantic KPI Tokens (OKLCH Vivid Palette) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
  --kpi-blue:       oklch(58% 0.22 250); --kpi-blue-rgb: 15, 98, 254;
  --kpi-green:      oklch(60% 0.20 145); --kpi-green-rgb: 16, 185, 129;
  --kpi-orange:     oklch(68% 0.21 65);  --kpi-orange-rgb: 245, 158, 11;
  --kpi-red:        oklch(60% 0.23 25);  --kpi-red-rgb: 239, 68, 68;
  --kpi-purple:     oklch(58% 0.23 290);
  --kpi-teal:       oklch(60% 0.16 195);
  --kpi-gold:       oklch(78% 0.16 85);
  
  --mc-cyan:        var(--kpi-blue);
  --mc-emerald:     var(--kpi-green);
  --mc-amber:       var(--kpi-orange);
  --mc-rose:        var(--kpi-red);
  --mc-indigo:      oklch(58% 0.2 265);
  --mc-violet:      var(--kpi-purple);
}

/* â”€â”€ Core Styling Reset â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
body {
  background: var(--bg) !important;
  background-attachment: fixed !important;
  color: var(--text-1);
  font-family: 'IBM Plex Sans Arabic', 'Plus Jakarta Sans', 'Tajawal', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background var(--transition-smooth);
  line-height: 1.65;
}

h1, h2, h3, h4, h5, h6, .page-title {
  font-weight: 700;
  letter-spacing: -0.015em;
}

/* â”€â”€ Premium Glass Card Engine â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.ds-card {
  background: var(--surface);
  backdrop-filter: blur(26px) saturate(210%);
  -webkit-backdrop-filter: blur(26px) saturate(210%);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: var(--radius-lg);
  box-shadow: var(--resting-depth);
  overflow: hidden;
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth), border-color var(--transition-smooth);
  position: relative;
}

/* Inner sharp glass edge */
.ds-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.08));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 1;
}

.ds-card:hover {
  box-shadow: var(--lifted-focus);
  border-color: rgba(15, 98, 254, 0.2);
}

/* â”€â”€ Vivid High-End Button Engine â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.ds-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 36px;
  border-radius: 50px;
  cursor: pointer;
  border: 1px solid rgba(0, 0, 0, 0.05);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  font-family: inherit;
  font-weight: 700;
  font-size: 15px;
  color: var(--text-1);
  transition: all var(--transition-smooth);
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ds-btn:hover {
  background: var(--accent);
  color: #ffffff !important;
  border-color: var(--accent);
  box-shadow: 0 12px 24px -6px rgba(var(--accent-rgb), 0.35);
  transform: translateY(-3px);
}

.ds-btn:active {
  transform: translateY(1px) scale(0.97);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
  transition: 100ms;
}

.ds-btn-primary {
  background: var(--accent-gradient);
  color: #ffffff !important;
  border: none;
  box-shadow: 0 8px 24px -6px rgba(var(--accent-rgb), 0.45);
}

.ds-btn-primary:hover {
  box-shadow: 0 16px 32px -8px rgba(var(--accent-rgb), 0.6);
  filter: brightness(1.1);
  transform: translateY(-3px);
}

/* Strict Compatibility Button Overrides for Standalone View scripts */
.ds-btn, 
.ds-btn-primary {
    border-radius: 50px !important;
    transition: all 0.4s var(--ease-out-quart) !important;
    text-transform: uppercase !important;
    font-weight: 750 !important;
    letter-spacing: 0.8px !important;
}
.ds-btn:hover, 
.ds-btn-primary:hover {
    letter-spacing: 1.8px !important;
}
.ds-btn:active, 
.ds-btn-primary:active {
    letter-spacing: 1.8px !important;
    transform: translateY(4px) scale(0.97) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
    transition: 80ms !important;
}

/* â”€â”€ Premium Motion Keyframes â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
@keyframes ds-slide-up-enter {
  from { opacity: 0; transform: translateY(24px) scale(0.99); filter: blur(6px); }
  to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}
@keyframes ds-scale-pulse-in {
  0% { transform: scale(0.97); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.ds-animate-slide-up {
  animation: ds-slide-up-enter 0.55s var(--ease-out-quart) both;
}
.ds-animate-pulse-in {
  animation: ds-scale-pulse-in 0.45s var(--ease-out-quart) both;
}

/* â”€â”€ Shared Bento Spatial System â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.ds-layout-bento {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

@media (min-width: 992px) {
  .ds-layout-bento-4 {
    grid-template-columns: repeat(4, 1fr);
  }
  .ds-bento-span-2 {
    grid-column: span 2;
  }
}

/* â”€â”€ Enhanced Flatpickr Calendar Overlays â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.flatpickr-calendar {
  background: rgba(255, 255, 255, 0.88) !important;
  backdrop-filter: blur(24px) saturate(200%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(200%) !important;
  border: 1px solid rgba(255, 255, 255, 0.9) !important;
  box-shadow: var(--lifted-focus) !important;
  border-radius: var(--radius-lg) !important;
  font-family: 'IBM Plex Sans Arabic', sans-serif !important;
  animation: ds-slide-up-enter 0.35s var(--ease-out-quart) !important;
  direction: rtl;
}
.flatpickr-calendar .flatpickr-months {
  direction: rtl !important;
}
.flatpickr-months .flatpickr-prev-month, 
.flatpickr-months .flatpickr-next-month {
  color: var(--text-1) !important;
  fill: var(--text-1) !important;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}
.flatpickr-months .flatpickr-prev-month:hover, 
.flatpickr-months .flatpickr-next-month:hover {
  background: rgba(0, 0, 0, 0.06) !important;
}
.flatpickr-current-month .flatpickr-monthDropdown-months {
  font-weight: 700 !important;
  color: var(--text-1) !important;
}
.flatpickr-day {
  border-radius: 8px !important;
  color: var(--text-2) !important;
  font-weight: 500;
  transition: all var(--transition-fast);
}
.flatpickr-day:hover {
  background: rgba(0, 0, 0, 0.06) !important;
}
.flatpickr-day.selected, .flatpickr-day.startRange, .flatpickr-day.endRange, 
.flatpickr-day.selected.inRange, .flatpickr-day.startRange.inRange, .flatpickr-day.endRange.inRange, 
.flatpickr-day.selected:focus, .flatpickr-day.startRange:focus, .flatpickr-day.endRange:focus, 
.flatpickr-day.selected:hover, .flatpickr-day.startRange:hover, .flatpickr-day.endRange:hover {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  color: #fff !important;
  box-shadow: 0 6px 16px rgba(var(--accent-rgb), 0.35) !important;
  font-weight: 700;
}
.flatpickr-day.inRange {
  background: rgba(var(--accent-rgb), 0.06) !important;
  box-shadow: -5px 0 0 rgba(var(--accent-rgb), 0.06), 5px 0 0 rgba(var(--accent-rgb), 0.06) !important;
}
.flatpickr-day.today {
  border-color: var(--brand-teal) !important;
  font-weight: 750;
}
.flatpickr-weekday {
  color: var(--text-2) !important;
  font-weight: 700 !important;
}
.flatpickr-input-styled {
  background: rgba(0, 0, 0, 0.03) !important;
  border: 1px solid rgba(0, 0, 0, 0.04) !important;
  border-radius: var(--radius-md) !important;
  padding: .8rem 1.2rem !important;
  font-size: 0.88rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  color: var(--text-1) !important;
  transition: all var(--transition-fast) !important;
}
.flatpickr-input-styled:focus,
.fancy-date-group:focus-within {
  background: #ffffff !important;
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.16) !important;
}

/* â”€â”€ BASE DESIGN SYSTEM DARK MODE OVERRIDES (EXCEPTIONAL CONTRAST) â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
[data-theme="dark"] {
  --bg:         radial-gradient(circle at 15% 15%, rgba(15, 98, 254, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 85% 85%, rgba(0, 180, 216, 0.12) 0%, transparent 50%),
                radial-gradient(circle at 50% 50%, rgba(138, 63, 252, 0.08) 0%, transparent 60%),
                #080a12;
  --surface:    rgba(20, 20, 25, 0.62);
  --surface-1:  rgba(22, 22, 26, 0.74);
  --surface-2:  rgba(255, 255, 255, 0.03);
  --surface-3:  rgba(34, 34, 39, 0.92);
  
  --text:       #f8fafc; /* Brilliant Contrast Text */
  --text-1:     #f8fafc;
  --text-2:     #cbd5e1;
  --text-3:     #94a3b8;
  --text-4:     #64748b;
  
  --border:     rgba(255, 255, 255, 0.12);
  --border-1:   rgba(255, 255, 255, 0.12);
  --border-2:   rgba(255, 255, 255, 0.04);
  --border-3:   rgba(255, 255, 255, 0.22);
  
  --resting-depth: 0 4px 24px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.02);
  --lifted-focus:  0 24px 48px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] .ds-card {
  border: 1px solid rgba(255, 255, 255, 0.1);
}
[data-theme="dark"] .ds-card::before {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.01));
}
[data-theme="dark"] .ds-btn {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--text-1);
}

/* â”€â”€ Global Cinema Top-Bar Progress Loader â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
@keyframes global-loader-sweep {
  0% { width: 0%; opacity: 1; box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.6); }
  65% { width: 78%; opacity: 1; }
  100% { width: 100%; opacity: 0; box-shadow: 0 0 0px rgba(var(--accent-rgb), 0); }
}

body::before {
  content: "";
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-navy) 0%, var(--brand-teal) 50%, var(--brand-navy) 100%);
  background-size: 200% 100%;
  z-index: 999999;
  pointer-events: none;
  animation: global-loader-sweep 0.85s var(--ease-out-quart) forwards;
}

/* â”€â”€ Dynamic Container Reveal Animations â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
@keyframes unified-page-reveal {
  0% { opacity: 0; transform: translateY(20px) scale(0.992); filter: blur(6px); }
  100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

.page-content, 
.ma-container, 
.main-container,
.login-card,
.layout-card-grid,
.ds-layout-bento {
  animation: unified-page-reveal 0.6s var(--ease-out-quart) both;
}

/* Enhance existing platform cards with premium hovering physics */
.kpi-card, 
.ds-card, 
.dt-card, 
.card, 
.section-card,
.audit-item {
  transition: transform 0.35s var(--ease-out-quart), 
              box-shadow 0.35s var(--ease-out-quart), 
              border-color 0.3s ease !important;
}

.kpi-card:hover, 
.ds-card:hover, 
.dt-card:hover, 
.card:hover,
.audit-item:hover {
  transform: translateY(-6px);
  box-shadow: var(--lifted-focus) !important;
  border-color: var(--accent) !important;
}

/* Deep glow shadows on active elements */
input:focus, 
textarea:focus, 
select:focus {
  transition: all 0.25s var(--ease-out-quart) !important;
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.15), 0 4px 12px rgba(0, 0, 0, 0.02) !important;
  outline: none;
}

/* â”€â”€ Staggered Cinematic Stream Reveals â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
@keyframes stream-item-reveal {
  0% { opacity: 0; transform: translateY(14px); filter: blur(3px); }
  100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}

.kpi-grid > *, 
.nav-pills > *, 
.tab-btns > *, 
.check-list > *, 
.audit-item, 
.section-card,
.dt-card,
.fg-p,
tbody tr {
  animation: stream-item-reveal 0.55s var(--ease-out-quart) both;
}

/* Incremental Delays for flowing loading streams */
.kpi-grid > *:nth-child(1), .ds-layout-bento > *:nth-child(1) { animation-delay: 0.05s; }
.kpi-grid > *:nth-child(2), .ds-layout-bento > *:nth-child(2) { animation-delay: 0.10s; }
.kpi-grid > *:nth-child(3), .ds-layout-bento > *:nth-child(3) { animation-delay: 0.15s; }
.kpi-grid > *:nth-child(4), .ds-layout-bento > *:nth-child(4) { animation-delay: 0.20s; }
.kpi-grid > *:nth-child(n+5), .ds-layout-bento > *:nth-child(n+5) { animation-delay: 0.25s; }

.check-list > *:nth-child(1) { animation-delay: 0.04s; }
.check-list > *:nth-child(2) { animation-delay: 0.08s; }
.check-list > *:nth-child(3) { animation-delay: 0.12s; }
.check-list > *:nth-child(n+4) { animation-delay: 0.16s; }

.nav-pills > *:nth-child(1), .tab-btns > *:nth-child(1) { animation-delay: 0.03s; }
.nav-pills > *:nth-child(2), .tab-btns > *:nth-child(2) { animation-delay: 0.06s; }
.nav-pills > *:nth-child(3), .tab-btns > *:nth-child(3) { animation-delay: 0.09s; }

tbody tr:nth-child(1) { animation-delay: 0.03s; }
tbody tr:nth-child(2) { animation-delay: 0.06s; }
tbody tr:nth-child(3) { animation-delay: 0.09s; }
tbody tr:nth-child(4) { animation-delay: 0.12s; }
tbody tr:nth-child(5) { animation-delay: 0.15s; }

/* â”€â”€ Tactile Interactive Mechanics â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
a, 
button, 
.tn-nav-item, 
.btn, 
.nav-pill, 
.tab-btn, 
.section-header,
.check-item {
  transition: transform 0.25s var(--ease-out-quart), 
              background-color 0.2s ease, 
              box-shadow 0.25s ease, 
              border-color 0.2s ease,
              opacity 0.2s ease;
}

a:active, 
button:active, 
.tn-nav-item:active, 
.btn:active, 
.nav-pill:active, 
.tab-btn:active,
.section-header:active,
.check-item:active {
  transform: scale(0.96) !important;
  opacity: 0.94;
  transition: transform 0.1s var(--ease-out-quart) !important;
}

/* â”€â”€ Shimmering Core Layout Gradients â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
@keyframes fluid-shimmer {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.header::before, 
.tn-nav-bar::after, 
.progress-bar-fill {
  background-size: 200% auto !important;
  animation: fluid-shimmer 6s linear infinite !important;
}

html {
  scroll-behavior: smooth;
}

/* â”€â”€â”€ ULTRA-PREMIUM VOICE ANNOUNCEMENT SYSTEM â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.vrm-overlay {
  position: fixed; inset: 0; z-index: 10005;
  backdrop-filter: blur(24px) saturate(180%); -webkit-backdrop-filter: blur(24px) saturate(180%);
  background: rgba(9, 9, 11, 0.72);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.vrm-overlay.active { opacity: 1; visibility: visible; }

.vrm-box {
  width: min(460px, 92%); 
  background: rgba(24, 24, 27, 0.88);
  backdrop-filter: blur(30px) saturate(150%); -webkit-backdrop-filter: blur(30px) saturate(150%);
  border: 1px solid rgba(255,255,255,0.12); border-radius: 28px;
  box-shadow: 0 32px 64px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.1);
  padding: 2.5rem 2rem; text-align: center; color: #fff;
  transform: scale(0.94) translateY(20px); filter: blur(6px);
  transition: all 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative; overflow: hidden;
}
.vrm-overlay.active .vrm-box { transform: scale(1) translateY(0); filter: blur(0); }

.vrm-box::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, #ef4444, #f59e0b, #ef4444);
  background-size: 200% auto; animation: fluid-shimmer 3s linear infinite; opacity: 0.85;
}

.vrm-title { font-size: 1.4rem; font-weight: 700; margin-bottom: 0.5rem; color: #fff; letter-spacing: -0.3px; }
.vrm-subtitle { font-size: 0.92rem; color: rgba(255,255,255,0.7); margin-bottom: 2rem; }

.vrm-visualizer {
  position: relative; width: 130px; height: 130px; margin: 0 auto 2rem;
  display: flex; align-items: center; justify-content: center;
}
.vrm-pulse {
  position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle, rgba(239, 68, 68, 0.28) 0%, rgba(239, 68, 68, 0) 70%);
  transform: scale(1); opacity: 0;
}
.recording .vrm-pulse-1 { animation: vrm-ring-pulse 2s infinite; }
.recording .vrm-pulse-2 { animation: vrm-ring-pulse 2s infinite 0.6s; }
.recording .vrm-pulse-3 { animation: vrm-ring-pulse 2s infinite 1.2s; }

@keyframes vrm-ring-pulse {
  0% { transform: scale(1); opacity: 0.9; }
  100% { transform: scale(2.6); opacity: 0; }
}

.vrm-mic-btn {
  width: 84px; height: 84px; border-radius: 50%; border: none;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #fff; font-size: 2.2rem; display: grid; place-items: center;
  cursor: pointer; z-index: 2; position: relative;
  box-shadow: 0 12px 28px rgba(239, 68, 68, 0.38);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.vrm-mic-btn:hover { transform: scale(1.08); box-shadow: 0 16px 32px rgba(239, 68, 68, 0.48); }

.recording .vrm-mic-btn {
  background: #fff; color: #ef4444; 
  border-radius: 24px; width: 74px; height: 74px;
  box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.2);
  animation: recording-pulse-btn 1.5s infinite;
}
@keyframes recording-pulse-btn {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(0.92); }
}

.vrm-timer { font-size: 1.8rem; font-family: monospace; font-weight: 700; color: #fff; margin-bottom: 1.5rem; display: none; }
.recording .vrm-timer { display: block; }

.vrm-preview-box { display: none; flex-direction: column; align-items: center; gap: 1rem; margin-top: 1rem; width: 100%; }
.has-preview .vrm-preview-box { display: flex; }
.has-preview .vrm-visualizer { display: none; }

.vrm-audio-skin {
  width: 100%; background: rgba(255,255,255,0.08); border-radius: 18px;
  padding: 14px; display: flex; align-items: center; gap: 12px;
  border: 1px solid rgba(255,255,255,0.06);
}

.vrm-actions { display: flex; gap: 1rem; width: 100%; margin-top: 1.5rem; justify-content: center; }
.btn-vrm-cancel { background: rgba(255,255,255,0.12); color: #fff; border: 1px solid rgba(255,255,255,0.08); padding: 12px 24px; border-radius: 14px; font-weight: 600; cursor: pointer; transition: background 0.2s; }
.btn-vrm-cancel:hover { background: rgba(255,255,255,0.18); }

.btn-vrm-publish {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%); color: #fff; border: none;
  padding: 12px 32px; border-radius: 14px; font-weight: 700; cursor: pointer; display: flex; align-items: center; gap: 6px;
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.35);
  transition: all 0.3s;
}
.btn-vrm-publish:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(16, 185, 129, 0.45); }

.vrm-close-btn {
  position: absolute; top: 20px; left: 20px; width: 36px; height: 36px; border-radius: 50%;
  border: none; background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.7);
  cursor: pointer; display: grid; place-items: center; font-size: 1.1rem;
  transition: all 0.2s;
}
.vrm-close-btn:hover { background: rgba(255,255,255,0.2); color: #fff; transform: rotate(90deg); }

/* Sticky Banner View - Enhanced High-Contrast Glass */
.voice-banner {
  margin: 12px 20px 0;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(24px) saturate(200%); -webkit-backdrop-filter: blur(24px) saturate(200%);
  border: 1px solid rgba(15, 98, 254, 0.22);
  border-radius: 20px;
  padding: 16px 24px;
  display: flex; align-items: center; gap: 16px;
  box-shadow: 0 12px 36px rgba(15, 98, 254, 0.08), inset 0 1px 0 rgba(255,255,255,0.6);
  position: relative; overflow: hidden;
  animation: voice-banner-reveal 0.65s var(--ease-out-quart) both;
  z-index: 10;
}

@keyframes voice-banner-reveal {
  0% { opacity: 0; transform: translateY(-15px) scale(0.98); filter: blur(6px); }
  100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

[data-theme="dark"] .voice-banner {
  background: rgba(24, 24, 27, 0.78);
  border-color: rgba(15, 98, 254, 0.35);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255,255,255,0.08);
}

.voice-banner::before {
  content: ''; position: absolute; right: 0; top: 0; bottom: 0; width: 6px;
  background: linear-gradient(to bottom, #0f62fe, #10b981);
}

.vb-speaker-icon {
  width: 46px; height: 46px; border-radius: 14px;
  background: rgba(15, 98, 254, 0.12);
  display: grid; place-items: center; font-size: 1.45rem; color: #0f62fe; flex-shrink: 0;
}
[data-theme="dark"] .vb-speaker-icon { color: #38bdf8; background: rgba(56, 189, 248, 0.12); }

.vb-speaker-icon i { animation: speaker-wiggle 2.5s ease infinite; }
@keyframes speaker-wiggle {
  0%, 90%, 100% { transform: rotate(0); }
  92% { transform: rotate(-12deg); }
  94% { transform: rotate(14deg); }
  96% { transform: rotate(-14deg); }
  98% { transform: rotate(8deg); }
}

.vb-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; text-align: right; }
.vb-title { font-size: 0.95rem; font-weight: 700; color: var(--text-1); display: flex; align-items: center; gap: 8px; }
.vb-subtitle { font-size: 0.8rem; color: var(--text-2); font-weight: 500; }
.vb-tag {
  font-size: 0.65rem; font-weight: 800; color: #fff; background: #ef4444;
  padding: 3px 9px; border-radius: 20px; text-transform: uppercase;
  animation: vb-pulse-tag 1.5s infinite;
}
@keyframes vb-pulse-tag {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.94); opacity: 0.85; }
}

.vb-controls {
  display: flex; align-items: center; gap: 14px; flex-shrink: 0;
  background: rgba(0, 0, 0, 0.05); border-radius: 30px; padding: 6px 16px 6px 8px;
  border: 1px solid rgba(0, 0, 0, 0.02);
}
[data-theme="dark"] .vb-controls {
  background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.03);
}

.vb-play-btn {
  width: 38px; height: 38px; border-radius: 50%; border: none;
  background: var(--accent); color: #fff; display: grid; place-items: center;
  font-size: 1.2rem; cursor: pointer; transition: all 0.25s;
  box-shadow: 0 4px 10px rgba(var(--accent-rgb), 0.25);
}
.vb-play-btn:hover { transform: scale(1.1); box-shadow: 0 6px 14px rgba(var(--accent-rgb), 0.35); }
.vb-play-btn:active { transform: scale(0.94); }

.vb-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 150px; height: 4px; border-radius: 2px;
  background: rgba(0,0,0,0.12); outline: none; cursor: pointer;
}
[data-theme="dark"] .vb-slider { background: rgba(255,255,255,0.18); }
.vb-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent); border: 2px solid #fff; cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.vb-time { font-size: 0.8rem; font-weight: 700; font-family: monospace; min-width: 36px; text-align: center; color: var(--text-2); }

.vb-close-btn {
  width: 30px; height: 30px; border-radius: 50%; border: none;
  background: rgba(0,0,0,0.05); color: var(--text-3); cursor: pointer;
  display: grid; place-items: center; font-size: 0.95rem; flex-shrink: 0;
  transition: all 0.2s;
}
[data-theme="dark"] .vb-close-btn { background: rgba(255,255,255,0.08); }
.vb-close-btn:hover { background: rgba(239, 68, 68, 0.18); color: #ef4444; transform: scale(1.1); }

@media (max-width: 640px) {
  .voice-banner { flex-wrap: wrap; margin: 10px 12px 0; padding: 14px; gap: 12px; }
  .vb-controls { width: 100%; order: 3; justify-content: space-between; padding: 6px 12px; }
  .vb-slider { flex: 1; }
  .vb-close-btn { position: absolute; top: 12px; left: 12px; }
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   â•â•â• APPLE-STYLE LIQUID GLASS & MICRO-INTERACTIONS ENGINE â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

/* Dynamic Floating Background Orbs */
html::before,
html::after {
  content: "";
  position: fixed;
  width: 55vw;
  height: 55vw;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.06) 0%, rgba(59, 130, 246, 0.03) 55%, transparent 75%);
  filter: blur(80px);
  z-index: -2;
  pointer-events: none;
  animation: liquid-orb-flow 32s ease-in-out infinite alternate;
}
html::before {
  top: -12vw;
  left: -12vw;
}
html::after {
  bottom: -12vw;
  right: -12vw;
  background: radial-gradient(circle, rgba(244, 114, 182, 0.04) 0%, rgba(99, 102, 241, 0.02) 55%, transparent 75%);
  animation-duration: 40s;
  animation-delay: -12s;
}

@keyframes liquid-orb-flow {
  0% { transform: translate(0, 0) scale(1) rotate(0deg); }
  50% { transform: translate(6vw, 4vw) scale(1.08) rotate(180deg); }
  100% { transform: translate(-4vw, -6vw) scale(0.92) rotate(360deg); }
}

/* Custom Text Highlight Selection */
::selection {
  background: rgba(15, 98, 254, 0.22) !important;
  color: inherit !important;
}

/* Global Premium Liquid Glass Card Overrides */
.ds-card, 
.kpi-card, 
.dt-card, 
.card,
.section-card,
.audit-item,
.vrm-box,
.voice-banner {
  background: rgba(255, 255, 255, 0.74) !important;
  backdrop-filter: blur(28px) saturate(220%) !important;
  -webkit-backdrop-filter: blur(28px) saturate(220%) !important;
  border: 1px solid rgba(255, 255, 255, 0.6) !important;
  box-shadow: 0 16px 40px -10px rgba(15, 98, 254, 0.04),
              0 1px 1px 0 rgba(255, 255, 255, 0.85) inset,
              0 0 0 1px rgba(255, 255, 255, 0.4) inset !important;
}

[data-theme="dark"] .ds-card,
[data-theme="dark"] .kpi-card,
[data-theme="dark"] .dt-card,
[data-theme="dark"] .card,
[data-theme="dark"] .section-card,
[data-theme="dark"] .audit-item,
[data-theme="dark"] .vrm-box,
[data-theme="dark"] .voice-banner {
  background: rgba(20, 20, 25, 0.62) !important;
  backdrop-filter: blur(28px) saturate(220%) !important;
  -webkit-backdrop-filter: blur(28px) saturate(220%) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.55),
              0 1px 1px 0 rgba(255, 255, 255, 0.08) inset,
              0 0 0 1px rgba(255, 255, 255, 0.04) inset !important;
}

/* Glassmorphic Smooth Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.02) !important;
  border-radius: 10px;
}
[data-theme="dark"] ::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.01) !important;
}
::-webkit-scrollbar-thumb {
  background: rgba(15, 98, 254, 0.22) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  border-radius: 10px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(15, 98, 254, 0.4) !important;
}

/* Pulsing Active Status Indicator Dot */
.live-status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--kpi-green) !important;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4) !important;
  animation: live-status-pulse 2s infinite !important;
  margin: 0 8px;
  vertical-align: middle;
}
.live-status-dot.danger {
  background-color: var(--kpi-red) !important;
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4) !important;
}
.live-status-dot.warning {
  background-color: var(--kpi-orange) !important;
  box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4) !important;
}
@keyframes live-status-pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Tactile Gradient Shine on Buttons */
.ds-btn, .ds-btn-primary, .btn, button.btn-submit, button.action-btn {
  position: relative;
  overflow: hidden;
}
.ds-btn::after, .ds-btn-primary::after, .btn::after, button.btn-submit::after, button.action-btn::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 20%;
  height: 200%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.25) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(30deg);
  transition: all 0.75s cubic-bezier(0.19, 1, 0.22, 1);
  pointer-events: none;
  z-index: 1;
}
.ds-btn:hover::after, .ds-btn-primary:hover::after, .btn:hover::after, button.btn-submit:hover::after, button.action-btn:hover::after {
  left: 130%;
  transition: all 0.75s cubic-bezier(0.19, 1, 0.22, 1);
}

/* Hover scales on grid and bento items */
.kpi-card:hover, 
.ds-card:hover, 
.dt-card:hover, 
.card:hover,
.audit-item:hover {
  transform: translateY(-5px) scale(1.008) !important;
  border-color: rgba(15, 98, 254, 0.35) !important;
}






