/*
  ┌──────────────────────────────────────────────────────────────────┐
  │   INSPECTAI — Premium Design System v3.0                         │
  │   Fonts: Sora (display) + Inter (body)                           │
  │   Primary: #16a34a | Accent: #22c55e                             │
  └──────────────────────────────────────────────────────────────────┘
*/

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ═══════════════════════════════════════════
   DESIGN TOKENS
═══════════════════════════════════════════ */
:root {
  /* Brand Colors */
  --green-50:   #f0fdf4;
  --green-100:  #dcfce7;
  --green-200:  #bbf7d0;
  --green-300:  #86efac;
  --green-400:  #4ade80;
  --green-500:  #22c55e;
  --green-600:  #16a34a;
  --green-700:  #15803d;
  --green-800:  #166534;
  --green-900:  #14532d;

  /* Semantic aliases */
  --primary:        var(--green-600);
  --primary-light:  var(--green-100);
  --primary-xlight: var(--green-50);
  --primary-dark:   var(--green-700);
  --primary-bright: var(--green-500);
  --primary-glow:   rgba(22,163,74,0.15);
  --primary-ring:   rgba(22,163,74,0.22);

  /* Neutral palette */
  --white:       #ffffff;
  --canvas:      #f8fafc;
  --surface:     #ffffff;
  --surface-alt: #f1f5f9;
  --surface-2:   #e2e8f0;
  --border:      #e2e8f0;
  --border-2:    #cbd5e1;
  --border-3:    #94a3b8;

  /* Text */
  --text-950: #0a0f1e;
  --text-900: #0f172a;
  --text-800: #1e293b;
  --text-700: #334155;
  --text-600: #475569;
  --text-400: #94a3b8;
  --text-300: #cbd5e1;
  --text-main:  var(--text-900);
  --text-muted: var(--text-600);
  --text-faint: var(--text-400);

  /* Status Colors */
  --danger:        #ef4444;
  --danger-dark:   #dc2626;
  --danger-light:  #fef2f2;
  --warning:       #f59e0b;
  --warning-light: #fffbeb;
  --success:       #16a34a;
  --success-light: #f0fdf4;
  --info:          #3b82f6;
  --info-dark:     #2563eb;
  --info-light:    #eff6ff;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(15,23,42,0.06);
  --shadow-sm: 0 1px 4px rgba(15,23,42,0.08), 0 1px 2px rgba(15,23,42,0.04);
  --shadow-md: 0 4px 12px rgba(15,23,42,0.08), 0 2px 4px rgba(15,23,42,0.04);
  --shadow-lg: 0 12px 32px rgba(15,23,42,0.10), 0 4px 12px rgba(15,23,42,0.05);
  --shadow-xl: 0 24px 64px rgba(15,23,42,0.12), 0 8px 24px rgba(15,23,42,0.06);
  --shadow-2xl: 0 48px 80px rgba(15,23,42,0.15), 0 16px 32px rgba(15,23,42,0.08);
  --shadow-green: 0 4px 20px rgba(22,163,74,0.30), 0 2px 8px rgba(22,163,74,0.15);
  --shadow-green-lg: 0 8px 32px rgba(22,163,74,0.35), 0 4px 16px rgba(22,163,74,0.20);

  /* Radius */
  --r-xs:   3px;
  --r-sm:   6px;
  --r-md:   10px;
  --r-lg:   14px;
  --r-xl:   20px;
  --r-2xl:  28px;
  --r-3xl:  40px;
  --r-full: 9999px;
  /* legacy aliases */
  --radius-sm:   var(--r-sm);
  --radius-md:   var(--r-md);
  --radius-lg:   var(--r-lg);
  --radius-full: var(--r-full);

  /* Typography scale */
  --text-xs:   0.6875rem;  /* 11px */
  --text-sm:   0.8125rem;  /* 13px */
  --text-base: 0.9375rem;  /* 15px */
  --text-lg:   1.0625rem;  /* 17px */
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  2rem;
  --text-4xl:  2.75rem;
  --text-5xl:  3.75rem;

  /* Spacing */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.25rem;
  --sp-6: 1.5rem;
  --sp-8: 2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;
  --sp-16: 4rem;

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition: all 0.2s var(--ease);
  --transition-slow: all 0.35s var(--ease);

  /* Layout */
  --sidebar-width: 260px;
  --header-h: 68px;
}

/* ═══════════════════════════════════════════
   BASE RESET
═══════════════════════════════════════════ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  text-size-adjust: 100%;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: var(--text-base);
  background:
    radial-gradient(circle at top left, rgba(22,163,74,0.08), transparent 30%),
    radial-gradient(circle at top right, rgba(34,197,94,0.06), transparent 26%),
    linear-gradient(180deg, #fbfdff 0%, var(--canvas) 100%);
  color: var(--text-main);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Sora', sans-serif;
  color: var(--text-900);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

img { max-width: 100%; display: block; }

/* ═══════════════════════════════════════════
   LAYOUT — APP SHELL
═══════════════════════════════════════════ */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* ───────────────────────────────────────────
   SIDEBAR
─────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-width);
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(16px);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: var(--sp-5);
  position: sticky;
  top: 0;
  height: 100vh;
  flex-shrink: 0;
  z-index: 50;
  transition: transform 0.3s var(--ease);
  overflow-y: auto;
  overflow-x: hidden;
}

/* Brand */
.nav-brand {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-6);
  padding: var(--sp-3) var(--sp-2);
  border-radius: var(--r-lg);
  transition: var(--transition);
}

.brand-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--green-600), var(--green-500));
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1rem;
  flex-shrink: 0;
  box-shadow: var(--shadow-green);
  transition: var(--transition);
}
.brand-icon:hover {
  background: linear-gradient(135deg, var(--green-700), var(--green-600));
  box-shadow: var(--shadow-green-lg);
  transform: scale(1.05);
}

.brand-name {
  font-family: 'Sora', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-900);
  letter-spacing: -0.03em;
}
.brand-tagline {
  font-size: 0.625rem;
  color: var(--text-faint);
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-top: 1px;
  text-transform: uppercase;
}

/* Nav section label */
.nav-section-label {
  font-size: 0.625rem;
  font-weight: 800;
  color: var(--text-300);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: var(--sp-2) var(--sp-3);
  margin-bottom: var(--sp-1);
}

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

.nav-item { margin: 0; }

.nav-link {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 0.6rem var(--sp-3);
  border-radius: var(--r-md);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-600);
  transition: var(--transition);
  position: relative;
}

.nav-link .nav-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
  background: transparent;
  transition: var(--transition);
  color: var(--text-400);
}

.nav-link:hover .nav-icon,
.nav-link.active .nav-icon {
  transform: translateY(-1px);
}

.nav-link:hover {
  background: var(--green-50);
  color: var(--green-700);
}
.nav-link:hover .nav-icon {
  background: var(--green-100);
  color: var(--green-600);
}

.nav-link.active {
  background: var(--green-50);
  color: var(--green-700);
  font-weight: 600;
}
.nav-link.active .nav-icon {
  background: linear-gradient(135deg, var(--green-600), var(--green-500));
  color: white;
  box-shadow: 0 2px 8px rgba(22,163,74,0.30);
}
.nav-link.active::before {
  content: '';
  position: absolute;
  left: -var(--sp-5);
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 55%;
  background: linear-gradient(to bottom, var(--green-500), var(--green-700));
  border-radius: 0 var(--r-xs) var(--r-xs) 0;
}

/* Sidebar footer */
.sidebar-footer {
  border-top: 1px solid var(--border);
  padding-top: var(--sp-4);
  margin-top: var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--border);
}

.user-card {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3);
  background: var(--canvas);
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  transition: var(--transition);
}
.user-card:hover {
  border-color: var(--green-200);
  background: var(--green-50);
}

/* Hamburger toggle (mobile) */
.sidebar-toggle {
  display: none;
  position: fixed;
  top: var(--sp-4);
  left: var(--sp-4);
  z-index: 200;
  width: 42px;
  height: 42px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}
.sidebar-toggle:hover {
  border-color: var(--green-300);
  background: var(--green-50);
}

/* ═══════════════════════════════════════════
   NO SIDEBAR LAYOUT (Auth Pages)
═══════════════════════════════════════════ */
.no-sidebar .sidebar { display: none !important; }
.no-sidebar .main-content {
  padding: var(--sp-12) var(--sp-6);
  max-width: 1000px;
  margin: 0 auto;
}

@media (max-width: 1023px) {
  .no-sidebar .main-content {
    padding-top: var(--sp-8);
  }
}

/* ───────────────────────────────────────────
   MAIN CONTENT AREA
─────────────────────────────────────────── */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.main-content {
  flex: 1;
  padding: var(--sp-8) var(--sp-10);
  max-width: 1480px;
  width: 100%;
}

footer.app-footer {
  padding: var(--sp-5) var(--sp-10);
  border-top: 1px solid var(--border);
  color: var(--text-faint);
  font-size: var(--text-xs);
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(12px);
}

/* ═══════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 0.6rem var(--sp-5);
  border-radius: var(--r-md);
  font-family: 'Inter', sans-serif;
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: 1.5px solid transparent;
  white-space: nowrap;
  line-height: 1;
  position: relative;
  overflow: hidden;
  letter-spacing: -0.01em;
}

.btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.btn:active { transform: translateY(1px) scale(0.99) !important; }

.btn-primary {
  background: linear-gradient(135deg, var(--green-700) 0%, var(--green-600) 55%, var(--green-500) 100%);
  color: white;
  border-color: var(--green-600);
  box-shadow: var(--shadow-green), inset 0 1px 0 rgba(255,255,255,0.15);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--green-700) 0%, var(--green-600) 100%);
  border-color: var(--green-700);
  box-shadow: var(--shadow-green-lg);
  transform: translateY(-1px);
  color: white;
}

.btn-secondary {
  background: var(--white);
  color: var(--text-800);
  border-color: var(--border);
  box-shadow: var(--shadow-xs);
}
.btn-secondary:hover {
  background: var(--surface-alt);
  border-color: var(--border-2);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn-ghost {
  background: transparent;
  color: var(--text-600);
  border-color: transparent;
}
.btn-ghost:hover {
  background: var(--surface-alt);
  color: var(--text-main);
}

.btn-danger {
  background: var(--danger-light);
  color: var(--danger);
  border-color: rgba(239,68,68,0.2);
}
.btn-danger:hover {
  background: var(--danger);
  color: white;
  border-color: var(--danger);
  box-shadow: 0 4px 12px rgba(239,68,68,0.3);
}

.btn-sm {
  padding: 0.375rem var(--sp-3);
  font-size: var(--text-xs);
  border-radius: var(--r-sm);
}

.btn-lg {
  padding: 0.8rem var(--sp-8);
  font-size: var(--text-base);
  border-radius: var(--r-lg);
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--r-sm);
}

/* ═══════════════════════════════════════════
   CARDS
═══════════════════════════════════════════ */
.card {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--sp-6);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-slow);
}

.card-hover:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--border-2);
  transform: translateY(-3px);
}

.card-flat {
  border-radius: var(--r-lg);
  box-shadow: none;
}

/* ═══════════════════════════════════════════
   FORM ELEMENTS
═══════════════════════════════════════════ */
.form-group {
  margin-bottom: var(--sp-5);
}

.label {
  display: block;
  margin-bottom: var(--sp-2);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-800);
  font-family: 'Inter', sans-serif;
}

.label-hint {
  font-size: var(--text-xs);
  font-weight: 400;
  color: var(--text-faint);
  margin-left: var(--sp-2);
}

.input {
  width: 100%;
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-md);
  border: 1.5px solid var(--border);
  font-family: 'Inter', sans-serif;
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--text-main);
  background: var(--white);
  transition: var(--transition);
  line-height: 1.5;
}

.input::placeholder {
  color: var(--text-400);
  font-weight: 400;
}

.input:hover { border-color: var(--border-2); }

.input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-ring);
}

textarea.input { resize: vertical; min-height: 100px; }

/* ═══════════════════════════════════════════
   BADGES
═══════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: 0.2rem 0.65rem;
  border-radius: var(--r-full);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.badge-green  { background: var(--green-100); color: var(--green-700); border: 1px solid var(--green-200); }
.badge-orange { background: var(--warning-light); color: #92400e; border: 1px solid #fde68a; }
.badge-red    { background: var(--danger-light); color: #b91c1c; border: 1px solid #fecaca; }
.badge-blue   { background: var(--info-light); color: #1d4ed8; border: 1px solid #bfdbfe; }
.badge-gray   { background: var(--surface-alt); color: var(--text-600); border: 1px solid var(--border); }

/* ═══════════════════════════════════════════
   GRID UTILITIES
═══════════════════════════════════════════ */
.grid { display: grid; gap: var(--sp-5); }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; }

@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 768px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ═══════════════════════════════════════════
   STAT CARDS
═══════════════════════════════════════════ */
.stat-card {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-5) var(--sp-6);
}

.stat-icon-wrap {
  width: 50px;
  height: 50px;
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.stat-label {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  margin-bottom: var(--sp-1);
}

.stat-value {
  font-family: 'Sora', sans-serif;
  font-size: 1.875rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1;
  letter-spacing: -0.04em;
}

/* Mini stat variant for details page */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-4);
}
@media (max-width: 1199px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 639px) {
  .stats-row { grid-template-columns: 1fr; }
}

.stat-mini {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
}

.stat-mini-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.stat-mini-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 2px;
}

.stat-mini-val {
  font-family: 'Sora', sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1;
}

/* ═══════════════════════════════════════════
   DATA TABLE
═══════════════════════════════════════════ */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--r-xl);
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

thead tr {
  background: var(--canvas);
}

th {
  text-align: left;
  padding: var(--sp-4) var(--sp-5);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

td {
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--border);
  color: var(--text-800);
  vertical-align: middle;
}

tr:last-child td { border-bottom: none; }

tbody tr {
  transition: background 0.12s;
}
tbody tr:hover td {
  background: var(--green-50);
}

/* ═══════════════════════════════════════════
   ANIMATIONS
═══════════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

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

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.6; transform: scale(0.94); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

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

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-8px); }
}

@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.animate-fade {
  animation: fadeUp 0.5s var(--ease-out) both;
}

/* ═══════════════════════════════════════════
   UTILITY CLASSES
═══════════════════════════════════════════ */
.mb-2  { margin-bottom: 0.5rem; }
.mb-4  { margin-bottom: 1rem; }
.mb-6  { margin-bottom: 1.5rem; }
.mb-8  { margin-bottom: 2rem; }
.mb-10 { margin-bottom: 2.5rem; }
.mt-4  { margin-top: 1rem; }
.mt-8  { margin-top: 2rem; }

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.text-muted { color: var(--text-muted); font-size: var(--text-sm); }
.text-sm    { font-size: var(--text-sm); }
.text-xs    { font-size: var(--text-xs); }

.hidden { display: none !important; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Divider */
.divider {
  height: 1px;
  background: var(--border);
  margin: var(--sp-6) 0;
}

/* ═══════════════════════════════════════════
   PAGE HEADER
═══════════════════════════════════════════ */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-6);
  margin-bottom: var(--sp-8);
  flex-wrap: wrap;
  padding-bottom: var(--sp-5);
  border-bottom: 1px solid var(--border);
}

.page-header-title {
  font-size: clamp(1.5rem, 3vw, var(--text-3xl));
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: var(--sp-1);
  color: var(--text-950);
}

.page-shell {
  display: flex;
  flex-direction: column;
  gap: var(--sp-6);
}

.section-card {
  background: rgba(255,255,255,0.92);
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  box-shadow: var(--shadow-sm);
}

.surface-panel {
  background: rgba(248,250,252,0.85);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
}

.page-header-sub {
  font-size: var(--text-sm);
  color: var(--text-faint);
  font-weight: 400;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-faint);
  margin-bottom: var(--sp-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.breadcrumb a {
  color: var(--primary);
}
.breadcrumb a:hover {
  color: var(--primary-dark);
}
.breadcrumb-sep { color: var(--border-2); }

/* ═══════════════════════════════════════════
   RESPONSIVE — MOBILE SIDEBAR
═══════════════════════════════════════════ */
@media (max-width: 1023px) {
  :root { --sidebar-width: 260px; }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    transform: translateX(-100%);
    z-index: 100;
    box-shadow: var(--shadow-2xl);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.45);
    z-index: 99;
    backdrop-filter: blur(3px);
  }
  .sidebar-overlay.visible { display: block; animation: fadeIn 0.25s var(--ease); }

  .sidebar-toggle {
    display: flex;
  }

  .main-content {
    padding: var(--sp-6) var(--sp-5);
    padding-top: calc(var(--sp-6) + 58px);
  }

  footer.app-footer {
    padding: var(--sp-4) var(--sp-5);
  }
}

@media (max-width: 767px) {
  .main-content {
    padding: var(--sp-4) var(--sp-4);
    padding-top: 76px;
  }
  .page-header-title { font-size: var(--text-2xl); }
  .page-header { gap: var(--sp-3); }
  footer.app-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--sp-2);
  }
}

@media (max-width: 479px) {
  .btn-lg { padding: 0.7rem var(--sp-5); font-size: var(--text-sm); }
  .main-content { padding: var(--sp-3) var(--sp-3); padding-top: 72px; }
}

/* ═══════════════════════════════════════════
   NOTIFICATION TOAST GLOBAL
═══════════════════════════════════════════ */
.toast-container {
  position: fixed;
  bottom: var(--sp-6);
  right: var(--sp-6);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  background: var(--text-900);
  color: white;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xl);
  font-size: var(--text-sm);
  font-weight: 500;
  min-width: 260px;
  max-width: 380px;
  animation: fadeUp 0.3s var(--ease);
  border-left: 3px solid var(--primary);
}
.toast.success { border-left-color: var(--success); }
.toast.error   { border-left-color: var(--danger); }
.toast.info    { border-left-color: var(--info); }
.toast.warning { border-left-color: var(--warning); }

/* ═══════════════════════════════════════════
   SKELETON LOADING
═══════════════════════════════════════════ */
.skeleton {
  background: linear-gradient(90deg, var(--surface-alt) 25%, var(--surface-2) 50%, var(--surface-alt) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.6s infinite;
  border-radius: var(--r-sm);
}

/* ═══════════════════════════════════════════
   FLASH MESSAGES (in sidebar)
═══════════════════════════════════════════ */
.flash-msg {
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-md);
  font-size: var(--text-xs);
  font-weight: 600;
  display: flex;
  align-items: flex-start;
  gap: var(--sp-2);
  line-height: 1.5;
}
.flash-msg.success {
  background: var(--success-light);
  color: var(--green-700);
  border: 1px solid var(--green-200);
}
.flash-msg.error {
  background: var(--danger-light);
  color: var(--danger-dark);
  border: 1px solid #fecaca;
}

.content-grid {
  display: grid;
  gap: var(--sp-5);
}

.content-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.content-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 960px) {
  .content-grid.two,
  .content-grid.three {
    grid-template-columns: 1fr;
  }
}
