/* ============================================================
   ZenithStock Enterprise – Master Stylesheet v2.0
   Design System: Industrial Navy + Cyan, Plus Jakarta Sans
   ============================================================ */

/* ── Google Fonts Import ── */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ── Design Tokens ── */
:root {
  /* Brand Colors – Pastel & Bright Spectrum */
  --zs-navy-950: #0f172a;
  --zs-navy-900: #1e293b;
  --zs-navy-800: #334155;
  --zs-navy-700: #475569;
  --zs-navy-600: #64748b;
  --zs-navy-500: #94a3b8;
  
  --zs-cyan-400:  #06b6d4;
  --zs-cyan-500:  #0891b2;
  --zs-cyan-600:  #0e7490;
  --zs-cyan-700:  #155e75;
  
  --zs-blue-400:  #3b82f6;
  --zs-blue-500:  #2563eb;

  /* Semantic Tokens (Light mode bright backgrounds) */
  --color-bg:       #f0f4ff;
  --color-surface:  rgba(255, 255, 255, 0.88);
  --color-surface-2: rgba(255, 255, 255, 0.96);
  --color-surface-3: #ffffff;
  --color-border:   rgba(99, 102, 241, 0.1);
  --color-border-hover: rgba(99, 102, 241, 0.25);
  --color-border-active: rgba(99, 102, 241, 0.5);

  /* Text Colors (Dark slate for maximum contrast) */
  --color-text-primary:  #0f172a;
  --color-text-secondary: #374151;
  --color-text-muted:    #6b7280;
  --color-text-accent:   #4f46e5;

  /* Status (Bright Pastels) */
  --color-success:  #10b981;
  --color-warning:  #f59e0b;
  --color-danger:   #ef4444;
  --color-info:     #3b82f6;

  /* Accent (Indigo glow) */
  --color-accent:    #6366f1;
  --color-accent-glow: rgba(99, 102, 241, 0.2);
  --color-accent-dim:  rgba(99, 102, 241, 0.06);

  /* Typography */
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

  /* Spacing & Radii (Chunky & Rounded for Claymorphism) */
  --radius-sm:  10px;
  --radius-md:  14px;
  --radius-lg:  20px;
  --radius-xl:  28px;
  --radius-2xl: 36px;

  /* Sidebar width */
  --sidebar-w: 272px;

  /* ═══ CLAYMORPHISM SHADOW SYSTEM ═══
     Thick dual-bevel inset + soft outer drop shadow
     Creates realistic raised molded 3D plastic look  */
  --clay-shadow-panel: 
    0 24px 48px rgba(99, 102, 241, 0.1),
    0 8px 20px rgba(0, 0, 0, 0.06),
    inset 4px 4px 0px rgba(255, 255, 255, 0.98),
    inset -4px -4px 0px rgba(165, 180, 252, 0.2),
    inset 8px 8px 16px rgba(255, 255, 255, 0.98),
    inset -12px -12px 20px rgba(165, 180, 252, 0.28);

  --clay-shadow-card:
    0 16px 32px rgba(99, 102, 241, 0.08),
    0 4px 10px rgba(0, 0, 0, 0.04),
    inset 3px 3px 0px rgba(255, 255, 255, 0.98),
    inset -3px -3px 0px rgba(165, 180, 252, 0.16),
    inset 6px 6px 12px rgba(255, 255, 255, 0.98),
    inset -8px -8px 14px rgba(165, 180, 252, 0.22);

  --clay-shadow-card-hover:
    0 28px 45px rgba(99, 102, 241, 0.22),
    0 8px 16px rgba(99, 102, 241, 0.1),
    inset 3px 3px 0px rgba(255, 255, 255, 0.98),
    inset -3px -3px 0px rgba(99, 102, 241, 0.2),
    inset 8px 8px 14px rgba(255, 255, 255, 0.98),
    inset -10px -10px 18px rgba(99, 102, 241, 0.3);
  
  --clay-shadow-btn-primary:
    0 10px 20px rgba(99, 102, 241, 0.4),
    0 4px 8px rgba(99, 102, 241, 0.2),
    inset 3px 3px 0px rgba(255, 255, 255, 0.5),
    inset -3px -3px 0px rgba(0, 0, 0, 0.25),
    inset 6px 6px 12px rgba(255, 255, 255, 0.55),
    inset -8px -8px 14px rgba(0, 0, 0, 0.28);
  --clay-shadow-btn-primary-hover:
    0 16px 30px rgba(99, 102, 241, 0.55),
    0 6px 12px rgba(99, 102, 241, 0.25),
    inset 3px 3px 0px rgba(255, 255, 255, 0.65),
    inset -3px -3px 0px rgba(0, 0, 0, 0.18),
    inset 8px 8px 14px rgba(255, 255, 255, 0.7),
    inset -10px -10px 14px rgba(0, 0, 0, 0.18);
  
  --clay-shadow-btn-secondary:
    0 8px 16px rgba(0, 0, 0, 0.06),
    inset 3px 3px 0px rgba(255, 255, 255, 0.98),
    inset -3px -3px 0px rgba(165, 180, 252, 0.15),
    inset 5px 5px 10px rgba(255, 255, 255, 0.98),
    inset -7px -7px 12px rgba(165, 180, 252, 0.22);
  --clay-shadow-btn-secondary-hover:
    0 12px 24px rgba(99, 102, 241, 0.14),
    inset 3px 3px 0px rgba(255, 255, 255, 0.98),
    inset -3px -3px 0px rgba(99, 102, 241, 0.15),
    inset 6px 6px 12px rgba(255, 255, 255, 0.98),
    inset -8px -8px 14px rgba(99, 102, 241, 0.2);
  
  --clay-shadow-input:
    inset 3px 3px 0px rgba(0, 0, 0, 0.06),
    inset -3px -3px 0px rgba(255, 255, 255, 0.98),
    inset 5px 5px 10px rgba(148, 163, 184, 0.22),
    inset -5px -5px 10px rgba(255, 255, 255, 0.92);
  --clay-shadow-input-focus:
    inset 2px 2px 4px rgba(148, 163, 184, 0.1),
    0 0 0 3px rgba(99, 102, 241, 0.3);

  --shadow-glow-cyan: 0 0 20px rgba(99, 102, 241, 0.18), 0 0 60px rgba(99, 102, 241, 0.06);
  --shadow-card: var(--clay-shadow-card);
  --shadow-elevated: var(--clay-shadow-card-hover);

  /* Transitions - Elastic timing for organic clay feedback */
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ── Reset & Base ── */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  /* Vibrant pastel aurora mesh background */
  background-image:
    radial-gradient(ellipse at 15% 20%, rgba(165, 180, 252, 0.35) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 10%, rgba(244, 114, 182, 0.22) 0%, transparent 50%),
    radial-gradient(ellipse at 75% 80%, rgba(52, 211, 153, 0.18) 0%, transparent 50%),
    radial-gradient(ellipse at 10% 85%, rgba(251, 191, 36, 0.15) 0%, transparent 45%),
    radial-gradient(ellipse at 50% 50%, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
  color: var(--color-text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100dvh;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--color-surface); }
::-webkit-scrollbar-thumb { background: var(--color-surface-3); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-text-muted); }

/* ── Typography Scale ── */
.text-display { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; line-height: 1.1; letter-spacing: -0.03em; }
.text-headline { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; }
.text-title { font-size: 1.125rem; font-weight: 600; }
.text-body { font-size: 0.9375rem; font-weight: 400; line-height: 1.65; }
.text-label { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.font-mono { font-family: var(--font-mono) !important; }

/* ── App Layout ── */
.app-wrapper {
  display: flex;
  height: 100dvh;
  overflow: hidden;
  position: relative;
}

/* ────────────────────────────────────────────
   SIDEBAR
   ──────────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: 16px;
  bottom: 16px;
  left: 16px;
  z-index: 50;
  width: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 2px solid rgba(255, 255, 255, 0.75);
  border-radius: var(--radius-2xl);
  box-shadow: var(--clay-shadow-panel);
  transition: transform 0.3s var(--ease-spring), left 0.3s var(--ease-spring);
  will-change: transform;
  overflow: hidden;
}

/* Decorative top rainbow accent line */
.sidebar::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #6366f1, #f472b6, #34d399, #fbbf24, #6366f1);
  background-size: 200% 100%;
  animation: rainbowSlide 4s linear infinite;
  opacity: 0.85;
  border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
}

/* Decorative side accent glow */
.sidebar::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
  background: linear-gradient(180deg, transparent, rgba(99, 102, 241, 0.5), transparent);
  opacity: 0.6;
}

/* Sidebar logo area */
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px;
  height: 64px;
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
  text-decoration: none;
}

.sidebar-logo-img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.3));
}

.sidebar-brand-text {
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--color-text-primary);
  white-space: nowrap;
}

.sidebar-brand-text span, .brand-text-nav span {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

.sidebar-version {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--color-text-muted);
  letter-spacing: 0.05em;
}

/* Sidebar nav */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-nav::-webkit-scrollbar { width: 3px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: transparent; }
.sidebar-nav:hover::-webkit-scrollbar-thumb { background: var(--color-surface-3); }

.nav-group-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  padding: 0 8px;
  margin-bottom: 4px;
}

.nav-group { display: flex; flex-direction: column; gap: 4px; }

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: var(--radius-lg);
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.28s var(--ease-spring);
  position: relative;
  cursor: pointer;
  border: 1px solid transparent;
  user-select: none;
}

.nav-link:hover {
  color: var(--color-text-accent);
  background: rgba(99, 102, 241, 0.07);
  border-color: rgba(99, 102, 241, 0.2);
  transform: scale(1.04) translateX(3px) translateY(-1px);
  box-shadow: 
    0 6px 14px rgba(99, 102, 241, 0.1),
    inset 3px 3px 0px rgba(255, 255, 255, 0.98),
    inset -2px -2px 0px rgba(165, 180, 252, 0.18);
}

.nav-link:active {
  transform: scale(0.96) translateX(1px);
  box-shadow: 
    inset 3px 3px 6px rgba(165, 180, 252, 0.2),
    inset -2px -2px 4px rgba(255, 255, 255, 0.98);
}

.nav-link.active {
  color: #ffffff;
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  border: 1px solid rgba(255, 255, 255, 0.4);
  font-weight: 700;
  box-shadow: 
    0 10px 20px rgba(99, 102, 241, 0.38),
    0 4px 8px rgba(99, 102, 241, 0.2),
    inset 4px 4px 0px rgba(255, 255, 255, 0.5),
    inset -3px -3px 0px rgba(0, 0, 0, 0.22),
    inset 8px 8px 12px rgba(255, 255, 255, 0.55),
    inset -8px -8px 12px rgba(0, 0, 0, 0.2);
  transform: scale(1.04) translateX(2px) translateY(-1px);
}

.nav-link.active .nav-icon {
  stroke-width: 2.25;
}

.nav-icon {
  width: 18px; height: 18px;
  flex-shrink: 0;
  stroke-width: 1.75;
}

.nav-badge {
  margin-left: auto;
  font-size: 0.65rem;
  font-weight: 700;
  background: var(--color-danger);
  color: white;
  padding: 1px 6px;
  border-radius: 99px;
  line-height: 1.5;
}

/* User card in sidebar */
.sidebar-user {
  margin: 8px 12px 0;
  padding: 12px;
  border-radius: var(--radius-lg);
  background: rgba(99, 102, 241, 0.05);
  border: 1px solid rgba(99, 102, 241, 0.1);
  box-shadow: var(--clay-shadow-card);
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 34px; height: 34px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #818cf8, #4f46e5);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.875rem;
  color: #ffffff;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: 
    inset 1px 1px 2px rgba(255, 255, 255, 0.4),
    inset -1px -1px 2px rgba(0, 0, 0, 0.2);
}

.user-info { flex: 1; overflow: hidden; }
.user-name { font-size: 0.8125rem; font-weight: 600; color: var(--color-text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 0.6875rem; color: var(--color-text-accent); font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; }

/* Sidebar footer actions */
.sidebar-footer {
  padding: 12px;
  border-top: 1px solid var(--color-border);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-footer-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(148, 163, 184, 0.15);
  background: rgba(255, 255, 255, 0.5);
  box-shadow: var(--clay-shadow-btn-secondary);
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s var(--ease-spring);
  width: 100%;
  color: var(--color-text-secondary);
}

.sidebar-footer-btn:hover {
  transform: scale(1.03) translateY(-1px);
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(99, 102, 241, 0.2);
  box-shadow: var(--clay-shadow-btn-secondary-hover);
  color: var(--color-text-accent);
}

.sidebar-footer-btn.danger {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.15);
}

.sidebar-footer-btn.danger:hover {
  background: rgba(239, 68, 68, 0.06);
  border-color: rgba(239, 68, 68, 0.3);
  color: #dc2626;
  box-shadow: 0 6px 12px rgba(239, 68, 68, 0.1);
}

/* ────────────────────────────────────────────
   MAIN CONTENT AREA
   ──────────────────────────────────────────── */
.content-area {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
  background-color: var(--color-bg);
  /* leave room for fixed sidebar on desktop */
  margin-left: calc(var(--sidebar-w) + 32px);
  padding: 16px 16px 16px 0;
  height: 100vh;
}

/* ── Top Header ── */
.topbar {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius-xl);
  box-shadow: var(--clay-shadow-panel);
  flex-shrink: 0;
  gap: 16px;
  margin-bottom: 16px;
  z-index: 30;
}

.topbar-left { display: flex; align-items: center; gap: 16px; }
.topbar-right { display: flex; align-items: center; gap: 12px; }

.page-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--color-text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-breadcrumb {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Hamburger menu button */
.menu-btn {
  width: 36px; height: 36px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(148, 163, 184, 0.15);
  background: rgba(255, 255, 255, 0.6);
  box-shadow: var(--clay-shadow-btn-secondary);
  color: var(--color-text-secondary);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.2s var(--ease-spring);
  display: none; /* hidden on desktop */
}

.menu-btn:hover {
  color: var(--color-text-accent);
  border-color: rgba(99, 102, 241, 0.35);
  background: rgba(99, 102, 241, 0.08);
  box-shadow: var(--clay-shadow-btn-secondary-hover);
  transform: scale(1.05);
}

/* Topbar action buttons */
.topbar-btn {
  position: relative;
  width: 36px; height: 36px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(148, 163, 184, 0.15);
  background: rgba(255, 255, 255, 0.6);
  box-shadow: var(--clay-shadow-btn-secondary);
  color: var(--color-text-secondary);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.2s var(--ease-spring);
  text-decoration: none;
}

.topbar-btn:hover {
  color: var(--color-text-accent);
  border-color: rgba(99, 102, 241, 0.35);
  background: rgba(99, 102, 241, 0.08);
  box-shadow: var(--clay-shadow-btn-secondary-hover);
  transform: scale(1.05);
}

.topbar-btn .badge {
  position: absolute;
  top: -4px; right: -4px;
  width: 16px; height: 16px;
  background: var(--color-danger);
  border-radius: 99px;
  font-size: 0.6rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  color: white;
  border: 2px solid var(--color-bg);
}

/* ── Main Content ── */
.main-content {
  flex: 1;
  overflow-y: auto;
  padding: 8px 16px 24px 0;
}

/* ────────────────────────────────────────────
   GLASS COMPONENTS
   ──────────────────────────────────────────── */

/* Panel / card container */
.zs-panel {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: var(--radius-2xl);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--clay-shadow-panel);
  position: relative;
  overflow: hidden;
}

/* KPI stat card */
.stat-card {
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-xl);
  padding: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: all 0.3s var(--ease-spring);
  position: relative;
  overflow: hidden;
  cursor: default;
  box-shadow: var(--clay-shadow-card);
  animation: cardEntrance 0.5s var(--ease-spring) both;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--stat-accent, #6366f1), transparent);
  opacity: 0.6;
}

.stat-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.5), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
}

.stat-card:hover {
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateY(-6px) scale(1.04);
  box-shadow: var(--clay-shadow-card-hover);
}

.stat-card:active {
  transform: translateY(1px) scale(0.96);
}

.stat-card:hover::after { opacity: 1; }

.stat-icon {
  width: 52px; height: 52px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: transform 0.35s var(--ease-spring);
}

.stat-card:hover .stat-icon {
  transform: scale(1.18) rotate(12deg);
}

.stat-icon.cyan   { 
  background: #22d3ee; 
  color: #001a24; 
  border: 1px solid rgba(255, 255, 255, 0.35); 
  box-shadow: 
    0 6px 12px rgba(34, 211, 238, 0.3),
    inset 1px 1px 2px rgba(255, 255, 255, 0.5),
    inset -2px -2px 4px rgba(0, 0, 0, 0.3);
}
.stat-icon.green  { 
  background: #10b981; 
  color: #002411; 
  border: 1px solid rgba(255, 255, 255, 0.35); 
  box-shadow: 
    0 6px 12px rgba(16, 185, 129, 0.3),
    inset 1px 1px 2px rgba(255, 255, 255, 0.5),
    inset -2px -2px 4px rgba(0, 0, 0, 0.3);
}
.stat-icon.amber  { 
  background: #f59e0b; 
  color: #241400; 
  border: 1px solid rgba(255, 255, 255, 0.35); 
  box-shadow: 
    0 6px 12px rgba(245, 158, 11, 0.3),
    inset 1px 1px 2px rgba(255, 255, 255, 0.5),
    inset -2px -2px 4px rgba(0, 0, 0, 0.3);
}
.stat-icon.red    { 
  background: #ef4444;  
  color: #ffffff; 
  border: 1px solid rgba(255, 255, 255, 0.35); 
  box-shadow: 
    0 6px 12px rgba(239, 68, 68, 0.3),
    inset 1px 1px 2px rgba(255, 255, 255, 0.5),
    inset -2px -2px 4px rgba(0, 0, 0, 0.3);
}
.stat-icon.blue   { 
  background: #3b82f6; 
  color: #ffffff; 
  border: 1px solid rgba(255, 255, 255, 0.35); 
  box-shadow: 
    0 6px 12px rgba(59, 130, 246, 0.3),
    inset 1px 1px 2px rgba(255, 255, 255, 0.5),
    inset -2px -2px 4px rgba(0, 0, 0, 0.3);
}
.stat-icon.slate  { 
  background: #64748b; 
  color: #ffffff; 
  border: 1px solid rgba(255, 255, 255, 0.2); 
  box-shadow: 
    0 6px 12px rgba(100, 116, 139, 0.2),
    inset 1px 1px 2px rgba(255, 255, 255, 0.3),
    inset -2px -2px 4px rgba(0, 0, 0, 0.3);
}

.stat-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}

.stat-value {
  font-size: 1.875rem;
  font-weight: 800;
  color: var(--color-text-primary);
  line-height: 1;
  font-family: var(--font-sans);
  letter-spacing: -0.03em;
}

.stat-value.cyan  { color: var(--zs-cyan-400); }
.stat-value.green { color: #34d399; }
.stat-value.amber { color: #fbbf24; }
.stat-value.red   { color: #f87171; }

.stat-sub {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 4px;
}

/* ────────────────────────────────────────────
   TABLE
   ──────────────────────────────────────────── */
.zs-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 6px; /* Row spacing for clay layer effect */
  font-size: 0.875rem;
}

.zs-table thead tr {
  border-bottom: none;
}

.zs-table thead th {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  background: transparent;
  white-space: nowrap;
}

.zs-table tbody tr {
  background: rgba(255, 255, 255, 0.72);
  border: none;
  transition: all 0.25s var(--ease-spring);
}

.zs-table tbody tr:last-child { border-bottom: none; }

.zs-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.96);
  transform: scale(1.008) translateY(-2px);
  box-shadow: 
    0 10px 20px rgba(99, 102, 241, 0.08),
    inset 2px 2px 0px rgba(255, 255, 255, 0.98),
    inset -1px -1px 0px rgba(165, 180, 252, 0.15);
}

.zs-table td {
  padding: 14px 16px;
  vertical-align: middle;
  color: var(--color-text-secondary);
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.45);
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.zs-table tbody tr td:first-child {
  border-top-left-radius: var(--radius-md);
  border-bottom-left-radius: var(--radius-md);
  border-left: 1px solid rgba(255, 255, 255, 0.45);
}

.zs-table tbody tr td:last-child {
  border-top-right-radius: var(--radius-md);
  border-bottom-right-radius: var(--radius-md);
  border-right: 1px solid rgba(255, 255, 255, 0.45);
}

.zs-table td.td-primary { color: var(--color-text-primary); font-weight: 600; }
.zs-table td.td-mono    { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--color-text-accent); font-weight: 700; }
.zs-table td.td-right   { text-align: right; }
.zs-table td.td-center  { text-align: center; }

/* ────────────────────────────────────────────
   BADGES / STATUS PILLS
   ──────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: all 0.2s var(--ease-spring);
}

.badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.badge.green  { 
  background: #10b981; 
  color: #002411; 
  box-shadow: 
    0 4px 8px rgba(16, 185, 129, 0.2),
    inset 1px 1px 2px rgba(255, 255, 255, 0.4),
    inset -2px -2px 4px rgba(0, 0, 0, 0.2); 
}
.badge.green .badge-dot { background: #002411; }

.badge.amber  { 
  background: #f59e0b; 
  color: #241400; 
  box-shadow: 
    0 4px 8px rgba(245, 158, 11, 0.2),
    inset 1px 1px 2px rgba(255, 255, 255, 0.4),
    inset -2px -2px 4px rgba(0, 0, 0, 0.2); 
}
.badge.amber .badge-dot { background: #241400; }

.badge.red    { 
  background: #ef4444;  
  color: #ffffff; 
  box-shadow: 
    0 4px 8px rgba(239, 68, 68, 0.2),
    inset 1px 1px 2px rgba(255, 255, 255, 0.4),
    inset -2px -2px 4px rgba(0, 0, 0, 0.2); 
}
.badge.red .badge-dot { background: #ffffff; }

.badge.blue   { 
  background: #3b82f6; 
  color: #ffffff; 
  box-shadow: 
    0 4px 8px rgba(59, 130, 246, 0.2),
    inset 1px 1px 2px rgba(255, 255, 255, 0.4),
    inset -2px -2px 4px rgba(0, 0, 0, 0.2); 
}
.badge.cyan   { 
  background: #22d3ee; 
  color: #001a24; 
  box-shadow: 
    0 4px 8px rgba(34, 211, 238, 0.2),
    inset 1px 1px 2px rgba(255, 255, 255, 0.4),
    inset -2px -2px 4px rgba(0, 0, 0, 0.2); 
}
.badge.slate  { 
  background: #64748b; 
  color: #ffffff; 
  box-shadow: 
    0 4px 8px rgba(100, 116, 139, 0.15),
    inset 1px 1px 2px rgba(255, 255, 255, 0.3),
    inset -2px -2px 4px rgba(0, 0, 0, 0.2); 
}
.badge.indigo { 
  background: #6366f1; 
  color: #ffffff; 
  box-shadow: 
    0 4px 8px rgba(99, 102, 241, 0.2),
    inset 1px 1px 2px rgba(255, 255, 255, 0.4),
    inset -2px -2px 4px rgba(0, 0, 0, 0.2); 
}

/* ────────────────────────────────────────────
   BUTTONS
   ──────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.25s var(--ease-spring);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
  font-family: var(--font-sans);
}

.btn:disabled { opacity: 0.45; cursor: not-allowed; pointer-events: none; }

.btn:hover {
  transform: scale(1.06) translateY(-4px);
}

.btn:active {
  transform: scale(0.92) translateY(2px);
}

.btn-primary {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: var(--clay-shadow-btn-primary);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #818cf8 0%, #6366f1 100%);
  box-shadow: var(--clay-shadow-btn-primary-hover);
}
.btn-primary:active {
  box-shadow: 
    0 4px 8px rgba(99, 102, 241, 0.15),
    inset 1px 1px 2px rgba(255, 255, 255, 0.2),
    inset -2px -2px 4px rgba(0, 0, 0, 0.3);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.7);
  color: var(--color-text-secondary);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: var(--clay-shadow-btn-secondary);
}
.btn-secondary:hover {
  background: #ffffff;
  border-color: rgba(99, 102, 241, 0.25);
  box-shadow: var(--clay-shadow-btn-secondary-hover);
  color: var(--color-text-accent);
}
.btn-secondary:active {
  box-shadow: 
    0 4px 8px rgba(0, 0, 0, 0.05),
    inset 1px 1px 2px rgba(255, 255, 255, 0.05),
    inset -2px -2px 4px rgba(0, 0, 0, 0.15);
}

.btn-danger {
  background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 16px rgba(244, 63, 94, 0.2), inset 2px 2px 4px rgba(255, 255, 255, 0.4), inset -3px -3px 6px rgba(0, 0, 0, 0.2);
}
.btn-danger:hover {
  background: linear-gradient(135deg, #fb7185 0%, #f43f5e 100%);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 12px 24px rgba(244, 63, 94, 0.3), inset 3px 3px 6px rgba(255, 255, 255, 0.5), inset -3px -3px 6px rgba(0, 0, 0, 0.15);
}
.btn-danger:active {
  box-shadow: 
    0 4px 8px rgba(244, 63, 94, 0.15),
    inset 1px 1px 2px rgba(255, 255, 255, 0.2),
    inset -2px -2px 4px rgba(0, 0, 0, 0.3);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-secondary);
  border-color: transparent;
  padding: 8px;
}
.btn-ghost:hover {
  color: var(--color-text-accent);
  background: rgba(99, 102, 241, 0.05);
}

.btn-icon { width: 36px; height: 36px; padding: 0; }
.btn-sm   { padding: 6px 12px; font-size: 0.8125rem; }
.btn-lg   { padding: 12px 24px; font-size: 1rem; border-radius: var(--radius-lg); }

/* ────────────────────────────────────────────
   FORM CONTROLS
   ──────────────────────────────────────────── */
.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}

.form-control {
  width: 100%;
  padding: 11px 16px;
  background: #f1f5f9;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: var(--radius-lg);
  color: var(--color-text-primary);
  font-size: 0.875rem;
  font-family: var(--font-sans);
  transition: all 0.2s var(--ease-spring);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: var(--clay-shadow-input);
}

.form-control::placeholder { color: var(--color-text-muted); font-size: 0.8125rem; }

.form-control:focus {
  border-color: rgba(99, 102, 241, 0.4);
  background: #ffffff;
  box-shadow: var(--clay-shadow-input-focus);
}

.form-control.is-invalid {
  border-color: rgba(239, 68, 68, 0.5);
}
.form-control.is-invalid:focus {
  box-shadow: 
    inset 2px 2px 4px rgba(239, 68, 68, 0.15),
    0 0 0 3px rgba(239, 68, 68, 0.15);
}

.form-error { font-size: 0.75rem; color: #ef4444; margin-top: 5px; display: flex; align-items: center; gap: 4px; }
.form-helper { font-size: 0.75rem; color: var(--color-text-muted); margin-top: 5px; }

.form-control.mono { font-family: var(--font-mono); letter-spacing: 0.04em; }

/* Input with prefix/suffix */
.input-group {
  position: relative;
}
.input-prefix, .input-suffix {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  pointer-events: none;
  font-size: 0.8125rem;
}
.input-prefix { left: 12px; }
.input-suffix { right: 12px; }
.input-group .form-control { padding-left: 38px; }
.input-group.has-suffix .form-control { padding-right: 38px; }

/* Select with chevron */
.select-wrapper {
  position: relative;
}
.select-wrapper select.form-control {
  padding-right: 36px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
}
.select-wrapper select.form-control:focus {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236366f1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

/* Select option styling */
select.form-control option {
  background: #ffffff;
  color: var(--color-text-primary);
  padding: 8px;
}

/* ────────────────────────────────────────────
   CONTROLS BAR (Search + Filter + Actions row)
   ──────────────────────────────────────────── */
.controls-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.45);
  border-bottom: 1px solid var(--color-border);
  flex-wrap: wrap;
}

.controls-bar .left   { display: flex; align-items: center; gap: 10px; flex: 1; flex-wrap: wrap; }
.controls-bar .right  { display: flex; align-items: center; gap: 8px; }

.search-input-wrap {
  position: relative;
  min-width: 220px;
}
.search-input-wrap .search-icon {
  position: absolute;
  left: 11px; top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  width: 15px; height: 15px;
  pointer-events: none;
}
.search-input-wrap input {
  padding-left: 34px;
  width: 100%;
}

/* Filter pill / select */
.filter-select {
  min-width: 160px;
  max-width: 200px;
}

/* ────────────────────────────────────────────
   FLASH / TOAST ALERTS
   ──────────────────────────────────────────── */
.toast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 12px;
  animation: slideDownIn 0.4s var(--ease-spring);
  box-shadow: 
    0 10px 20px rgba(0, 0, 0, 0.3),
    inset 2px 2px 4px rgba(255, 255, 255, 0.2),
    inset -3px -3px 6px rgba(0, 0, 0, 0.2);
}

.toast.success { 
  background: #10b981; 
  color: #002411; 
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 
    0 8px 20px rgba(16, 185, 129, 0.25),
    inset 2px 2px 4px rgba(255, 255, 255, 0.4),
    inset -3px -3px 6px rgba(0, 0, 0, 0.2);
}
.toast.danger  { 
  background: #ef4444;  
  color: #ffffff; 
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 
    0 8px 20px rgba(239, 68, 68, 0.25),
    inset 2px 2px 4px rgba(255, 255, 255, 0.4),
    inset -3px -3px 6px rgba(0, 0, 0, 0.2);
}
.toast.warning { 
  background: #f59e0b; 
  color: #241400; 
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 
    0 8px 20px rgba(245, 158, 11, 0.25),
    inset 2px 2px 4px rgba(255, 255, 255, 0.4),
    inset -3px -3px 6px rgba(0, 0, 0, 0.2);
}
.toast.info    { 
  background: #3b82f6; 
  color: #ffffff; 
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 
    0 8px 20px rgba(59, 130, 246, 0.25),
    inset 2px 2px 4px rgba(255, 255, 255, 0.4),
    inset -3px -3px 6px rgba(0, 0, 0, 0.2);
}

/* ────────────────────────────────────────────
   ACTION BUTTONS IN TABLE (icon only)
   ──────────────────────────────────────────── */
.action-btn {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all 0.15s var(--ease-smooth);
  color: var(--color-text-muted);
  text-decoration: none;
}

.action-btn:hover.edit   { color: #60a5fa; background: rgba(59, 130, 246, 0.1); border-color: rgba(59, 130, 246, 0.2); }
.action-btn:hover.move   { color: var(--zs-cyan-400); background: var(--color-accent-dim); border-color: rgba(34, 211, 238, 0.2); }
.action-btn:hover.delete { color: #fca5a5; background: rgba(239, 68, 68, 0.1); border-color: rgba(239, 68, 68, 0.2); }
.action-btn:hover.view   { color: #a5b4fc; background: rgba(99, 102, 241, 0.1); border-color: rgba(99, 102, 241, 0.2); }

/* ────────────────────────────────────────────
   EMPTY STATE
   ──────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--color-text-muted);
}
.empty-state-icon {
  width: 56px; height: 56px;
  margin: 0 auto 16px;
  opacity: 0.3;
}
.empty-state-title { font-size: 0.9375rem; font-weight: 600; color: var(--color-text-secondary); margin-bottom: 6px; }
.empty-state-desc  { font-size: 0.8125rem; }

/* ────────────────────────────────────────────
   MOBILE SIDEBAR OVERLAY
   ──────────────────────────────────────────── */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 8, 20, 0.75);
  backdrop-filter: blur(4px);
  z-index: 40;
  display: none;
}

/* ────────────────────────────────────────────
   ANIMATIONS
   ──────────────────────────────────────────── */
@keyframes slideDownIn {
  from { opacity: 0; transform: translateY(-16px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

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

@keyframes pulseGlow {
  0%, 100% { opacity: 0.6; box-shadow: 0 0 14px rgba(99, 102, 241, 0.2); }
  50%       { opacity: 1;   box-shadow: 0 0 30px rgba(99, 102, 241, 0.5); }
}

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}

/* Clay card entrance - pop up from slightly below */
@keyframes cardEntrance {
  from { opacity: 0; transform: translateY(20px) scale(0.94); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Gentle floating bob animation */
@keyframes floatBob {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-6px); }
}

/* Icon wobble on hover */
@keyframes iconWobble {
  0%, 100% { transform: rotate(0deg) scale(1); }
  25%       { transform: rotate(-8deg) scale(1.1); }
  75%       { transform: rotate(8deg) scale(1.1); }
}

/* Rainbow gradient slide */
@keyframes rainbowSlide {
  0%   { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* Subtle clay press depth */
@keyframes clayPress {
  0%   { transform: scale(1) translateY(0); }
  50%  { transform: scale(0.96) translateY(2px); }
  100% { transform: scale(1) translateY(0); }
}

.animate-fade-in    { animation: fadeIn 0.35s var(--ease-smooth); }
.animate-slide-in   { animation: slideDownIn 0.4s var(--ease-spring); }
.glow-pulse         { animation: pulseGlow 2.5s infinite ease-in-out; }
.animate-float      { animation: floatBob 3s ease-in-out infinite; }
.animate-wobble     { animation: iconWobble 0.5s var(--ease-spring); }

/* Skeleton shimmer */
.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.07) 50%, rgba(255,255,255,0.03) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* ────────────────────────────────────────────
   AURORA GLOW BACKGROUNDS (decorative)
   ──────────────────────────────────────────── */
.aurora-bg {
  position: fixed;
  pointer-events: none;
  z-index: 0;
  inset: 0;
  overflow: hidden;
}

.aurora-bg::before {
  content: '';
  position: absolute;
  top: -20%; left: -10%;
  width: 60%; height: 60%;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.06) 0%, transparent 70%);
  filter: blur(60px);
}

.aurora-bg::after {
  content: '';
  position: absolute;
  bottom: -10%; right: -15%;
  width: 55%; height: 55%;
  background: radial-gradient(circle, rgba(23, 77, 122, 0.12) 0%, transparent 70%);
  filter: blur(80px);
}

/* ────────────────────────────────────────────
   SEPARATOR / DIVIDER
   ──────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--color-border);
  width: 100%;
}

/* ────────────────────────────────────────────
   UTILITY CLASSES
   ──────────────────────────────────────────── */
.text-primary   { color: var(--color-text-primary) !important; }
.text-secondary { color: var(--color-text-secondary) !important; }
.text-muted     { color: var(--color-text-muted) !important; }
.text-accent    { color: var(--color-text-accent) !important; }
.text-success   { color: #34d399 !important; }
.text-warning   { color: #fbbf24 !important; }
.text-danger    { color: #f87171 !important; }

.bg-surface   { background: var(--color-surface); }
.bg-surface-2 { background: var(--color-surface-2); }

/* ────────────────────────────────────────────
   RESPONSIVE – MOBILE ADJUSTMENTS
   ──────────────────────────────────────────── */
@media (max-width: 1023px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: 0 0 60px rgba(0, 8, 20, 0.8);
  }

  .sidebar-overlay.open {
    display: block;
  }

  .content-area {
    margin-left: 0;
  }

  .menu-btn {
    display: flex;
  }

  .controls-bar {
    padding: 12px 16px;
  }

  .main-content {
    padding: 16px;
  }

  .stat-value { font-size: 1.5rem; }
}

@media (max-width: 640px) {
  .topbar { padding: 0 16px; }
  .controls-bar .right { flex-wrap: wrap; }
  .zs-table { font-size: 0.8125rem; }
  .zs-table td, .zs-table th { padding: 12px 10px; }
}

/* ────────────────────────────────────────────
   AUTH PAGES
   ──────────────────────────────────────────── */
.auth-page {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
  background-color: var(--color-bg);
  background-image: 
    radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(244, 63, 94, 0.1) 0px, transparent 50%),
    linear-gradient(rgba(99, 102, 241, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 102, 241, 0.02) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 32px 32px, 32px 32px;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: var(--radius-2xl);
  padding: 32px 36px;
  position: relative;
  z-index: 1;
  box-shadow: 
    0 30px 60px rgba(100, 116, 139, 0.12),
    inset 3px 3px 0px rgba(255, 255, 255, 0.95), /* Bevel light */
    inset -3px -3px 0px rgba(165, 180, 252, 0.15), /* Bevel dark */
    inset 6px 6px 12px rgba(255, 255, 255, 0.95),
    inset -8px -8px 16px rgba(165, 180, 252, 0.22);
}

.auth-card .form-label {
  color: var(--color-text-primary) !important;
  font-weight: 700;
}

.auth-card .form-control {
  background: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.15);
  color: var(--color-text-primary) !important;
  box-shadow: 
    inset 2px 2px 0px rgba(0, 0, 0, 0.05),
    inset -2px -2px 0px rgba(255, 255, 255, 0.95),
    inset 4px 4px 8px rgba(148, 163, 184, 0.2), 
    inset -4px -4px 8px rgba(255, 255, 255, 0.9);
}

.auth-card .form-control::placeholder {
  color: #94a3b8 !important;
}

.auth-card .form-control:focus {
  background: #ffffff;
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 
    inset 2px 2px 4px rgba(148, 163, 184, 0.1),
    0 0 0 3px rgba(99, 102, 241, 0.25);
}

.auth-card .input-prefix {
  color: #94a3b8 !important;
}

.auth-card .form-helper, 
.auth-card div[style*="color:var(--color-text-muted)"],
.auth-card span[style*="color:var(--color-text-muted)"] {
  color: #64748b !important;
}

.auth-card a {
  color: var(--color-accent) !important;
  text-decoration: underline !important;
}

.auth-card a:hover {
  color: #4f46e5 !important;
}

.auth-card code {
  color: var(--color-accent) !important;
  background: rgba(99, 102, 241, 0.05) !important;
  border: 1px solid rgba(99, 102, 241, 0.12);
  border-radius: 4px;
  padding: 1px 4px;
}

.auth-card div[style*="background:rgba(99,102,241,0.05)"] {
  background: rgba(99, 102, 241, 0.04) !important;
  border-color: rgba(99, 102, 241, 0.12) !important;
}

@media (max-width: 480px) {
  .auth-card {
    padding: 28px 20px;
    border-radius: var(--radius-xl);
  }
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--color-accent), var(--color-text-accent), transparent);
  border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
  opacity: 0.8;
}

/* ────────────────────────────────────────────
   REDUCED MOTION
   ──────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ────────────────────────────────────────────
   LAYOUT GRID UTILITIES
   ──────────────────────────────────────────── */
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }

.space-y-4 > * + * { margin-top: 16px; }
.space-y-6 > * + * { margin-top: 24px; }

@media (min-width: 1024px) {
  .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 640px) {
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ────────────────────────────────────────────
   EXTRA BUTTON VARIANTS
   ──────────────────────────────────────────── */
.btn-danger {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.25);
}
.btn-danger:hover {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.4);
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.15);
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--color-text-muted);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.05);
  border-color: var(--color-border);
  color: var(--color-text-secondary);
}

/* ────────────────────────────────────────────
   CONTENT AREA – UNAUTHENTICATED FIX
   ──────────────────────────────────────────── */
.content-area.no-sidebar {
  margin-left: 0 !important;
}

/* ────────────────────────────────────────────
   ANIMATE UTILITIES
   ──────────────────────────────────────────── */
.animate-fade-in {
  animation: fadeIn 0.4s var(--ease-smooth) both;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ────────────────────────────────────────────
   HIDDEN RESPONSIVE
   ──────────────────────────────────────────── */
.hidden { display: none !important; }
@media (min-width: 640px) {
  .sm\:flex { display: flex !important; }
  .sm\:block { display: block !important; }
  .sm\:hidden { display: none !important; }
}
@media (min-width: 1024px) {
  .lg\:hidden { display: none !important; }
  .lg\:block  { display: block !important; }
  .lg\:flex   { display: flex !important; }
}

/* ────────────────────────────────────────────
   MISC FIXES
   ──────────────────────────────────────────── */
/* Fix mono class in input groups */
.form-control.mono { font-family: var(--font-mono); }

/* Welcome page aurora-bg compatibility */
.aurora-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 60% 50% at 20% 20%, rgba(6,182,212,0.05) 0%, transparent 100%),
    radial-gradient(ellipse 50% 40% at 80% 80%, rgba(14,116,144,0.08) 0%, transparent 100%);
}

/* Flex helpers */
.flex-wrap { flex-wrap: wrap; }
.flex-col  { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }

/* Leading/Line height */
.leading-relaxed { line-height: 1.625; }
.leading-tight   { line-height: 1.25; }

/* Font helpers */
.font-bold    { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.font-semibold { font-weight: 600; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }

/* Relative/absolute */
.relative { position: relative; }
.absolute { position: absolute; }
.z-10 { z-index: 10; }
.overflow-hidden { overflow: hidden; }
.w-full { width: 100%; }
.h-full { height: 100%; }
.min-h-screen { min-height: 100vh; }
.max-w-4xl { max-width: 56rem; }
.mx-auto { margin-inline: auto; }
.mt-10 { margin-top: 40px; }
.mt-24 { margin-top: 96px; }
.mb-2 { margin-bottom: 8px; }
.mb-6 { margin-bottom: 24px; }
.pt-4 { padding-top: 16px; }
.px-4 { padding-inline: 16px; }
.px-8 { padding-inline: 32px; }
.py-4 { padding-block: 16px; }
.p-6 { padding: 24px; }
.text-center { text-align: center; }
.text-white { color: #f0f9ff; }
.text-gray-400 { color: #94a3b8; }
.rounded-full { border-radius: 9999px; }
.rounded-xl { border-radius: 12px; }
.rounded-2xl { border-radius: 16px; }
.uppercase { text-transform: uppercase; }
.tracking-wider { letter-spacing: 0.05em; }
.tracking-tight  { letter-spacing: -0.025em; }
.inline-flex { display: inline-flex; }
.flex { display: flex; }

/* Max-width grid items span */
.lg\:col-span-2 { grid-column: span 2 / span 2; }

/* ────────────────────────────────────────────
   NOTIFICATION DROPDOWN & INTERACTION
   ──────────────────────────────────────────── */
.notification-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #ef4444;
  border: 1px solid var(--zs-navy-900);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.7);
}

.notification-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 320px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-xl);
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.15),
    inset 3px 3px 0px rgba(255, 255, 255, 0.95),
    inset -3px -3px 0px rgba(165, 180, 252, 0.15),
    inset 6px 6px 12px rgba(255, 255, 255, 0.95),
    inset -6px -6px 12px rgba(165, 180, 252, 0.2);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 110;
  overflow: hidden;
  animation: dropdownFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(99, 102, 241, 0.1);
  background: rgba(255, 255, 255, 0.3);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--color-text-primary);
}

.dropdown-body {
  max-height: 280px;
  overflow-y: auto;
}

.dropdown-body::-webkit-scrollbar {
  width: 4px;
}

.dropdown-body::-webkit-scrollbar-track {
  background: transparent;
}

.dropdown-body::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.2);
  border-radius: 2px;
}

.dropdown-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(99, 102, 241, 0.08);
  transition: background-color var(--transition-fast) ease;
}

.dropdown-item:last-child {
  border-bottom: none;
}

.dropdown-item:hover {
  background-color: rgba(99, 102, 241, 0.05);
}

/* Micro animations */
.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: .3;
  }
}

/* Clickable KPI cards interaction */
.stat-card.clickable {
  cursor: pointer;
  transition: transform var(--transition-fast) ease, border-color var(--transition-fast) ease, box-shadow var(--transition-fast) ease;
}

.stat-card.clickable:hover {
  transform: translateY(-2px) scale(1.015);
  border-color: rgba(34, 211, 238, 0.25);
  box-shadow: var(--shadow-elevated), 0 8px 30px rgba(34, 211, 238, 0.05);
}

.stat-card.clickable:active {
  transform: translateY(0) scale(0.99);
}

/* ── HTMX Indicator ── */
.htmx-indicator {
  display: none !important;
  opacity: 0;
  transition: opacity 150ms ease-in-out;
}
.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
  display: inline-flex !important;
  opacity: 1 !important;
}

/* ────────────────────────────────────────────
   PRINT LAYOUT STYLES
   ──────────────────────────────────────────── */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 10pt !important;
  }
  
  .sidebar, .topbar, .controls-bar, .btn, .action-btn, th:last-child, td:last-child, select, button, .select-wrapper::after, #flash-container {
    display: none !important;
  }
  
  .main-content {
    margin-left: 0 !important;
    padding: 0 !important;
    width: 100% !important;
  }
  
  .print-only-header {
    display: block !important;
  }
  
  .zs-panel {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
  }
  
  .zs-table {
    border: 1px solid #000000 !important;
    color: #000000 !important;
    width: 100% !important;
    border-collapse: collapse !important;
  }
  
  .zs-table th {
    background: #f1f5f9 !important;
    color: #000000 !important;
    border-bottom: 2px solid #000000 !important;
    border-right: 1px solid #e2e8f0 !important;
    padding: 8px 6px !important;
  }
  
  .zs-table td {
    border-bottom: 1px solid #e2e8f0 !important;
    border-right: 1px solid #e2e8f0 !important;
    color: #000000 !important;
    padding: 8px 6px !important;
  }
  
  .badge {
    background: transparent !important;
    border: 1px solid #000000 !important;
    color: #000000 !important;
    padding: 2px 4px !important;
  }
  
  .badge-dot {
    display: none !important;
  }
}
