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

/* ═══════════════════════════════════════════════════════════════════
   NEXLEGAL — PREMIUM DARK DESIGN SYSTEM v2
   High-tech legal ERP · Final Push
═══════════════════════════════════════════════════════════════════ */

:root {
  /* ── Core surfaces ───────────────────────────────────────────── */
  --bg-app:        #060608;
  --bg-panel:      #09090d;
  --bg-surface:    #0f0f15;
  --bg-surface-2:  #141420;
  --bg-hover:      rgba(255,255,255,0.025);
  --bg-active:     rgba(255,255,255,0.045);

  /* ── Borders ─────────────────────────────────────────────────── */
  --border-subtle: rgba(255,255,255,0.04);
  --border-default:rgba(255,255,255,0.07);
  --border-strong: rgba(255,255,255,0.11);
  --border-brand:  rgba(99,102,241,0.3);

  /* ── Text ────────────────────────────────────────────────────── */
  --text-primary:   #eeeef2;
  --text-secondary: #8889a0;
  --text-tertiary:  #4e4f63;
  --text-brand:     #818cf8;

  /* ── Brand ───────────────────────────────────────────────────── */
  --brand:        #6366f1;
  --brand-hover:  #7577f5;
  --brand-muted:  rgba(99,102,241,0.1);
  --brand-glow:   rgba(99,102,241,0.2);

  /* ── Status tokens ───────────────────────────────────────────── */
  --status-active-text:   #34d399;
  --status-active-bg:     rgba(52,211,153,0.07);
  --status-warning-text:  #fbbf24;
  --status-warning-bg:    rgba(251,191,36,0.07);
  --status-urgent-text:   #f472b6;
  --status-urgent-bg:     rgba(244,114,182,0.07);
  --status-info-text:     #60a5fa;
  --status-info-bg:       rgba(96,165,250,0.07);
  --status-neutral-text:  #94a3b8;
  --status-neutral-bg:    rgba(148,163,184,0.07);

  /* ── Radius ──────────────────────────────────────────────────── */
  --radius-xs: 3px;
  --radius-sm: 5px;
  --radius-md: 7px;
  --radius-lg: 10px;
  --radius-xl: 14px;
  --radius-2xl:20px;

  /* ── Shadows ─────────────────────────────────────────────────── */
  --shadow-sm:    0 1px 3px rgba(0,0,0,0.5);
  --shadow-md:    0 4px 16px -4px rgba(0,0,0,0.7);
  --shadow-panel: 0 12px 40px -8px rgba(0,0,0,0.8);
  --shadow-brand: 0 0 20px rgba(99,102,241,0.2);

  /* ── Typography ──────────────────────────────────────────────── */
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* ── Motion ──────────────────────────────────────────────────── */
  --ease-out:  cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in:   cubic-bezier(0.55, 0, 1, 0.45);
  --t-fast:    100ms;
  --t-base:    160ms;
  --t-slow:    280ms;
}

/* ── Reset ───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.06); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.12); }

html { font-size: 14px; }

body {
  font-family: var(--font-sans);
  background: var(--bg-app);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  text-wrap: pretty;
}

/* ── Typographic utilities ───────────────────────────────────────── */
.tabular-nums {
  font-family: var(--font-mono) !important;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}
.label-dim {
  font-size: 11px;
  color: var(--text-tertiary);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.text-gradient {
  background: linear-gradient(135deg, #a5b4fc 0%, #818cf8 50%, #6366f1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}


/* ═══════════════════════════════════════════════════════════════════
   LOGIN SCREEN
═══════════════════════════════════════════════════════════════════ */
#login-screen {
  position: relative;
  overflow: hidden;
}

/* Ambient noise texture via pseudo-element */
#login-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

.login-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
}
.login-glow-1 {
  width: 500px; height: 500px;
  background: rgba(99,102,241,0.12);
  top: -100px; left: -100px;
  animation: floatGlow 8s ease-in-out infinite;
}
.login-glow-2 {
  width: 400px; height: 400px;
  background: rgba(168,85,247,0.07);
  bottom: -80px; right: 40%;
  animation: floatGlow 10s ease-in-out infinite reverse;
}

@keyframes floatGlow {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(20px, -15px) scale(1.04); }
  66% { transform: translate(-10px, 20px) scale(0.97); }
}

.glass-input-wrapper {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-default);
  background: rgba(255,255,255,0.022);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color var(--t-base) var(--ease-out),
              background var(--t-base) var(--ease-out),
              box-shadow var(--t-base) var(--ease-out);
}
.glass-input-wrapper:focus-within {
  border-color: var(--border-brand);
  background: rgba(99,102,241,0.04);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.08), inset 0 1px 0 rgba(255,255,255,0.04);
}

.custom-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 15px; height: 15px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xs);
  background: transparent;
  cursor: pointer;
  transition: all var(--t-base) var(--ease-out);
  position: relative;
  flex-shrink: 0;
}
.custom-checkbox:checked {
  background: var(--brand);
  border-color: var(--brand);
}
.custom-checkbox:checked::after {
  content: '';
  position: absolute;
  left: 4px; top: 1px;
  width: 5px; height: 9px;
  border: solid white;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}

/* Login animations */
@keyframes fadeSlideIn {
  from { opacity: 0; filter: blur(4px); transform: translateY(10px); }
  to   { opacity: 1; filter: blur(0);   transform: translateY(0); }
}
.animate-element { opacity: 0; animation: fadeSlideIn 0.55s var(--ease-out) forwards; }
.animate-delay-100 { animation-delay: .08s; }
.animate-delay-200 { animation-delay: .15s; }
.animate-delay-300 { animation-delay: .22s; }
.animate-delay-400 { animation-delay: .30s; }
.animate-delay-500 { animation-delay: .38s; }
.animate-delay-600 { animation-delay: .46s; }
.animate-delay-700 { animation-delay: .54s; }

@keyframes slideRightIn {
  from { opacity: 0; filter: blur(8px); transform: translateX(32px); }
  to   { opacity: 1; filter: blur(0);   transform: translateX(0); }
}
.animate-slide-right {
  opacity: 0;
  animation: slideRightIn .75s var(--ease-out) forwards;
}

@keyframes testimonialIn {
  from { opacity: 0; transform: translateY(14px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.animate-testimonial { opacity: 0; animation: testimonialIn .55s var(--ease-out) forwards; }
.animate-delay-1000  { animation-delay: .9s; }
.animate-delay-1200  { animation-delay: 1.1s; }
.animate-delay-1400  { animation-delay: 1.3s; }

/* Login button */
#login-btn {
  background: linear-gradient(135deg, var(--brand) 0%, #7c3aed 100%);
  box-shadow: 0 1px 0 rgba(255,255,255,0.08) inset, var(--shadow-brand);
  transition: opacity var(--t-base), transform var(--t-fast), box-shadow var(--t-base);
}
#login-btn:hover  { opacity: 0.9; transform: translateY(-1px); box-shadow: 0 1px 0 rgba(255,255,255,0.08) inset, 0 0 28px rgba(99,102,241,0.35); }
#login-btn:active { transform: translateY(0); opacity: 1; }


/* ═══════════════════════════════════════════════════════════════════
   APP SHELL
═══════════════════════════════════════════════════════════════════ */
#app-shell {
  display: none;
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 10;
  background: var(--bg-app);
}
#app-shell[style*="flex"] {
  flex-direction: row !important;
  align-items: stretch !important;
  overflow: hidden !important;
}


/* ═══════════════════════════════════════════════════════════════════
   SIDEBAR
═══════════════════════════════════════════════════════════════════ */
.sidebar {
  width: 224px;
  min-height: 100vh;
  background: var(--bg-panel);
  border-right: 1px solid var(--border-subtle);
  position: fixed;
  top: 0; left: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  transition: width var(--t-slow) var(--ease-out);
  overflow: hidden;
}
.sidebar::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(to bottom, transparent, rgba(99,102,241,0.15) 30%, rgba(99,102,241,0.08) 70%, transparent);
  pointer-events: none;
}
.sidebar.collapsed { width: 52px; }
.sidebar.collapsed .sidebar-text { opacity: 0; width: 0; overflow: hidden; pointer-events: none; }

/* Logo area */
.sidebar-logo-area {
  padding: 16px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 6px;
  min-height: 56px;
}
.sidebar-logo-icon {
  width: 30px; height: 30px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--brand) 0%, #7c3aed 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(99,102,241,0.3);
}

.sidebar-link {
  display: flex;
  align-items: center;
  margin: 1px 8px;
  padding: 7px 9px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  transition: color var(--t-fast), background var(--t-fast);
  cursor: pointer;
  font-size: 13px;
  font-weight: 450;
  text-decoration: none;
  border: none;
  position: relative;
  white-space: nowrap;
}
.sidebar-link:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}
.sidebar-link.active {
  color: var(--text-primary);
  background: rgba(99,102,241,0.08);
}
.sidebar-link.active::before {
  content: '';
  position: absolute;
  left: -8px; top: 50%;
  transform: translateY(-50%);
  width: 2px; height: 14px;
  border-radius: 2px;
  background: var(--brand);
  box-shadow: 0 0 8px rgba(99,102,241,0.6);
}

.sidebar-link svg,
.sidebar-link i {
  width: 16px; height: 16px;
  color: var(--text-tertiary);
  stroke-width: 1.6;
  flex-shrink: 0;
  transition: color var(--t-fast);
}
.sidebar-link.active svg,
.sidebar-link.active i,
.sidebar-link:hover svg,
.sidebar-link:hover i { color: var(--text-primary); }

/* Nav section label */
.nav-section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  padding: 8px 17px 4px;
}

/* Sidebar bottom user */
.sidebar-user-area {
  padding: 8px;
  border-top: 1px solid var(--border-subtle);
  background: rgba(255,255,255,0.01);
}


/* ═══════════════════════════════════════════════════════════════════
   MAIN CONTENT
═══════════════════════════════════════════════════════════════════ */
.main-content {
  flex: 1;
  margin-left: 224px;
  height: 100vh;
  overflow-y: auto;
  background: var(--bg-app);
  transition: margin-left var(--t-slow) var(--ease-out);
  display: flex;
  flex-direction: column;
}
.main-content.expanded { margin-left: 52px; }


/* ═══════════════════════════════════════════════════════════════════
   TOP HEADER
═══════════════════════════════════════════════════════════════════ */
.top-header {
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(6,6,8,0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  min-height: 48px;
  position: sticky;
  top: 0;
  z-index: 20;
}


/* ═══════════════════════════════════════════════════════════════════
   CARDS
═══════════════════════════════════════════════════════════════════ */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: border-color var(--t-base), box-shadow var(--t-base);
}
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 10%, rgba(255,255,255,0.06) 50%, transparent 90%);
  pointer-events: none;
}
.card:hover {
  border-color: var(--border-default);
  box-shadow: 0 6px 24px -6px rgba(0,0,0,0.5);
}

/* Stat cards */
.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
  transition: border-color var(--t-base), box-shadow var(--t-base);
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 10%, rgba(255,255,255,0.05) 50%, transparent 90%);
  pointer-events: none;
}
.stat-card:hover {
  border-color: var(--border-default);
  box-shadow: 0 4px 20px -4px rgba(0,0,0,0.4);
}
.stat-card-accent {
  position: absolute;
  top: 0; right: 0;
  width: 72px; height: 72px;
  border-radius: 0 var(--radius-lg) 0 72px;
  opacity: 0.06;
  pointer-events: none;
}
.stat-card.blue   .stat-card-accent { background: #6366f1; }
.stat-card.emerald .stat-card-accent { background: #34d399; }
.stat-card.amber  .stat-card-accent { background: #fbbf24; }
.stat-card.red    .stat-card-accent { background: #f472b6; }


/* ═══════════════════════════════════════════════════════════════════
   TABLE
═══════════════════════════════════════════════════════════════════ */
table { width: 100%; border-collapse: collapse; }

thead th {
  text-align: left;
  padding: 9px 14px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  border-bottom: 1px solid var(--border-default);
  white-space: nowrap;
  background: var(--bg-surface);
  position: sticky;
  top: 0;
  z-index: 1;
}

tbody tr {
  border-bottom: 1px solid rgba(255,255,255,0.025);
  cursor: pointer;
  transition: background var(--t-fast);
}
tbody tr:hover { background: rgba(255,255,255,0.018); }
tbody tr:active { background: rgba(255,255,255,0.035); }

tbody td {
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text-secondary);
  vertical-align: middle;
}

.td-mono {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}

table th[onclick] {
  cursor: pointer;
  user-select: none;
  transition: color var(--t-fast);
}
table th[onclick]:hover { color: var(--text-secondary); }

.sort-arrow {
  display: inline-block;
  margin-left: 4px;
  font-size: 9px;
  color: var(--brand);
  font-weight: 700;
}

/* Skeleton */
.skeleton {
  background: linear-gradient(90deg,
    var(--bg-surface) 25%,
    rgba(255,255,255,0.035) 50%,
    var(--bg-surface) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.6s ease-in-out infinite;
  border-radius: var(--radius-sm);
}
@keyframes skeleton-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skeleton-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.025);
}
.skeleton-row .skeleton-cell { height: 13px; border-radius: var(--radius-xs); }
.skeleton-row .skeleton-cell:nth-child(1) { width: 18%; }
.skeleton-row .skeleton-cell:nth-child(2) { width: 22%; }
.skeleton-row .skeleton-cell:nth-child(3) { width: 12%; }
.skeleton-row .skeleton-cell:nth-child(4) { width: 14%; }
.skeleton-row .skeleton-cell:nth-child(5) { width: 10%; }
.skeleton-row .skeleton-cell:nth-child(6) { width: 14%; }

/* Empty state */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 56px 24px;
  text-align: center;
}
.empty-state-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-lg);
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.empty-state-icon svg { width: 20px; height: 20px; color: var(--text-tertiary); stroke-width: 1.5; }
.empty-state-title { font-size: 13px; font-weight: 500; color: var(--text-secondary); margin-bottom: 4px; }
.empty-state-desc { font-size: 12px; color: var(--text-tertiary); max-width: 280px; line-height: 1.6; }

/* Pagination */
.table-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px 2px;
  border-top: 1px solid rgba(255,255,255,0.025);
}
.table-pagination .page-info {
  font-size: 11px;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
}
.table-pagination .page-btns { display: flex; align-items: center; gap: 2px; }
.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--t-fast);
}
.page-btn:hover:not(:disabled) { background: var(--bg-hover); color: var(--text-primary); }
.page-btn:disabled { opacity: 0.28; cursor: default; }
.page-btn.active {
  background: var(--brand-muted);
  color: var(--brand);
  border-color: rgba(99,102,241,0.18);
}
.page-btn svg { width: 13px; height: 13px; stroke-width: 2; }


/* ═══════════════════════════════════════════════════════════════════
   BADGES
═══════════════════════════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.badge-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}


/* ═══════════════════════════════════════════════════════════════════
   TIMELINE
═══════════════════════════════════════════════════════════════════ */
.timeline-item {
  position: relative;
  padding-left: 22px;
  padding-bottom: 16px;
  border-left: 1px solid var(--border-subtle);
  margin-left: 8px;
}
.timeline-item:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline-dot {
  position: absolute;
  left: -5px; top: 3px;
  width: 9px; height: 9px;
  border-radius: 50%;
  border: 2px solid var(--bg-panel);
}


/* ═══════════════════════════════════════════════════════════════════
   ANIMATIONS
═══════════════════════════════════════════════════════════════════ */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn var(--t-slow) var(--ease-out) forwards; }


/* ═══════════════════════════════════════════════════════════════════
   FORMS & BUTTONS
═══════════════════════════════════════════════════════════════════ */
.form-input {
  width: 100%;
  padding: 7px 11px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 13px;
  font-family: var(--font-sans);
  outline: none;
  transition: border-color var(--t-base), box-shadow var(--t-base);
}
.form-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 2.5px rgba(99,102,241,0.12);
}
.form-input::placeholder { color: var(--text-tertiary); }
.form-input option { background: var(--bg-surface); }

/* Auto-populated fields from expediente (A5) — subtle blue glow */
.form-input.autopopulated,
textarea.autopopulated,
select.autopopulated {
  background: rgba(59, 130, 246, 0.06);
  border-color: rgba(59, 130, 246, 0.35);
}
.form-input.autopopulated:focus,
textarea.autopopulated:focus,
select.autopopulated:focus {
  background: var(--bg-surface);
}

.form-label {
  display: block;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 5px;
  letter-spacing: 0.01em;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand) 0%, #7c3aed 100%);
  color: #fff;
  padding: 7px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: opacity var(--t-base), transform var(--t-fast), box-shadow var(--t-base);
  box-shadow: 0 1px 0 rgba(255,255,255,0.06) inset;
  white-space: nowrap;
}
.btn-primary:hover { opacity: 0.88; transform: translateY(-0.5px); box-shadow: 0 1px 0 rgba(255,255,255,0.06) inset, 0 4px 12px rgba(99,102,241,0.25); }
.btn-primary:active { transform: translateY(0); opacity: 1; }

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-secondary);
  padding: 7px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--border-default);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
  white-space: nowrap;
}
.btn-secondary:hover { background: var(--bg-hover); color: var(--text-primary); border-color: var(--border-strong); }

.btn-ghost {
  background: transparent;
  color: var(--text-tertiary);
  padding: 6px 10px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background var(--t-fast), color var(--t-fast);
}
.btn-ghost:hover { background: var(--bg-hover); color: var(--text-secondary); }

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  border-radius: var(--radius-md);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all var(--t-fast);
  flex-shrink: 0;
}
.btn-icon:hover { background: var(--bg-hover); color: var(--text-secondary); border-color: var(--border-subtle); }
.btn-icon svg, .btn-icon i { width: 15px; height: 15px; stroke-width: 1.6; }

/* Template cards (Redacción) */
.template-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 16px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: border-color var(--t-base), background var(--t-base), box-shadow var(--t-base), transform var(--t-base);
}
.template-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
  opacity: 0;
  transition: opacity var(--t-base);
}
.template-card:hover {
  border-color: var(--border-brand);
  background: rgba(99,102,241,0.035);
  box-shadow: 0 4px 16px -4px rgba(99,102,241,0.12);
  transform: translateY(-1px);
}
.template-card:hover::before { opacity: 1; }
.template-card:active { transform: translateY(0); }

/* Rama selector */
.rama-selector-card {
  cursor: pointer;
  border-radius: var(--radius-xl);
  padding: 18px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  position: relative;
  overflow: hidden;
  transition: border-color var(--t-base), background var(--t-base), box-shadow var(--t-base), transform var(--t-base);
}
.rama-selector-card:hover {
  border-color: var(--border-brand);
  background: rgba(99,102,241,0.035);
  box-shadow: 0 6px 24px -6px rgba(99,102,241,0.15);
  transform: translateY(-1px);
}
.rama-selector-card:active { transform: translateY(0); }


/* ═══════════════════════════════════════════════════════════════════
   AVATAR
═══════════════════════════════════════════════════════════════════ */
.avatar-initials {
  width: 30px; height: 30px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════════
   STEP PILLS
═══════════════════════════════════════════════════════════════════ */
.step-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px; height: 20px;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  transition: background var(--t-base), color var(--t-base);
}
.step-pill.active { background: var(--brand); color: #fff; box-shadow: 0 0 8px rgba(99,102,241,0.5); }
.step-pill.done   { background: rgba(52,211,153,0.12); color: var(--status-active-text); }
.step-pill.pending{ background: var(--bg-surface); color: var(--text-tertiary); border: 1px solid var(--border-subtle); }

/* Progress bar */
.brand-progress { height: 2px; background: var(--bg-surface-2); border-radius: 2px; overflow: hidden; }
.brand-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand), #a78bfa);
  border-radius: 2px;
  transition: width 0.45s var(--ease-out);
}

/* Input with icon */
.input-with-icon { position: relative; }
.input-with-icon .input-icon {
  position: absolute; left: 10px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  pointer-events: none;
  width: 13px; height: 13px;
}
.input-with-icon .form-input { padding-left: 30px; }


/* ═══════════════════════════════════════════════════════════════════
   SWEETALERT2 — NexLegal Theme
═══════════════════════════════════════════════════════════════════ */
.swal2-popup {
  background: var(--bg-panel) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border-default) !important;
  border-radius: var(--radius-xl) !important;
}
.swal2-title { color: var(--text-primary) !important; }
.swal2-html-container { color: var(--text-secondary) !important; }
.swal2-input, .swal2-select, .swal2-textarea {
  background: var(--bg-surface) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border-default) !important;
  border-radius: var(--radius-md) !important;
  font-family: var(--font-sans) !important;
}
.swal2-input:focus, .swal2-select:focus, .swal2-textarea:focus {
  border-color: var(--brand) !important;
  box-shadow: 0 0 0 2.5px rgba(99,102,241,0.12) !important;
}
.swal2-confirm { background: var(--brand) !important; border-radius: var(--radius-md) !important; }
.swal2-cancel { background: var(--bg-surface) !important; border: 1px solid var(--border-default) !important; border-radius: var(--radius-md) !important; }

.swal-linear.swal2-popup {
  background: var(--bg-panel) !important;
  border: 1px solid var(--border-default) !important;
  border-radius: var(--radius-xl) !important;
  box-shadow: var(--shadow-panel) !important;
  font-family: var(--font-sans) !important;
  padding: 1.75rem !important;
}
.swal-linear-title.swal2-title {
  color: var(--text-primary) !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  letter-spacing: -0.015em !important;
  padding: 0 0 0.5rem 0 !important;
}
.swal-linear-html.swal2-html-container {
  color: var(--text-secondary) !important;
  font-size: 0.8125rem !important;
  margin: 0 !important;
}
.swal-linear-html input,
.swal-linear-html select,
.swal-linear-html textarea {
  background: var(--bg-surface) !important;
  border: 1px solid var(--border-default) !important;
  color: var(--text-primary) !important;
  border-radius: var(--radius-md) !important;
  padding: 7px 11px !important;
  font-size: 0.8125rem !important;
  width: 100% !important;
  outline: none !important;
  font-family: var(--font-sans) !important;
  transition: border-color var(--t-base) !important;
}
.swal-linear-html input:focus,
.swal-linear-html select:focus,
.swal-linear-html textarea:focus {
  border-color: var(--brand) !important;
  box-shadow: 0 0 0 2.5px rgba(99,102,241,0.12) !important;
}
.swal-linear-html label {
  display: block !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  color: var(--text-secondary) !important;
  margin-bottom: 4px !important;
}
.swal-linear-confirm.swal2-confirm {
  background: linear-gradient(135deg, var(--brand) 0%, #7c3aed 100%) !important;
  color: #fff !important;
  border: none !important;
  border-radius: var(--radius-md) !important;
  padding: 7px 18px !important;
  font-size: 0.8125rem !important;
  font-weight: 500 !important;
  font-family: var(--font-sans) !important;
  transition: opacity var(--t-base) !important;
}
.swal-linear-confirm.swal2-confirm:hover { opacity: 0.88 !important; }
.swal-linear-cancel.swal2-cancel {
  background: var(--bg-surface) !important;
  color: var(--text-secondary) !important;
  border: 1px solid var(--border-default) !important;
  border-radius: var(--radius-md) !important;
  padding: 7px 18px !important;
  font-size: 0.8125rem !important;
  font-weight: 500 !important;
  font-family: var(--font-sans) !important;
}
.swal-linear-cancel.swal2-cancel:hover {
  background: var(--bg-hover) !important;
  color: var(--text-primary) !important;
}

@keyframes swalIn {
  from { opacity: 0; transform: scale(.96) translateY(6px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes swalOut {
  from { opacity: 1; transform: scale(1) translateY(0); }
  to   { opacity: 0; transform: scale(.96) translateY(6px); }
}
.animate-swal-in  { animation: swalIn  .2s var(--ease-out) forwards !important; }
.animate-swal-out { animation: swalOut .15s var(--ease-in) forwards !important; }


/* ═══════════════════════════════════════════════════════════════════
   CHAT / WORKSPACE IA
═══════════════════════════════════════════════════════════════════ */
@keyframes glow-pulse {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50%       { opacity: 0.8; transform: scale(1.06); }
}
.chat-ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  animation: glow-pulse 7s ease-in-out infinite;
}

.chat-glass {
  background: rgba(255,255,255,0.018);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: border-color var(--t-base);
}
.chat-glass:focus-within { border-color: var(--border-brand); }

.chat-textarea {
  width: 100%;
  resize: none;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.6;
  font-family: var(--font-sans);
  outline: none;
  min-height: 52px;
  max-height: 200px;
  overflow-y: auto;
}
.chat-textarea::placeholder { color: var(--text-tertiary); }

.chat-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  background: rgba(255,255,255,0.018);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  color: var(--text-tertiary);
  font-size: 12px;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all var(--t-fast);
}
.chat-action-btn:hover { background: rgba(255,255,255,0.035); border-color: var(--border-default); color: var(--text-secondary); }
.chat-action-btn svg { width: 14px; height: 14px; stroke-width: 1.6; }

.chat-send-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: var(--radius-lg);
  font-size: 13px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: all var(--t-base);
}
.chat-send-btn.active {
  background: var(--text-primary);
  color: var(--bg-app);
  box-shadow: 0 0 16px rgba(255,255,255,0.06);
}
.chat-send-btn.inactive { background: rgba(255,255,255,0.035); color: var(--text-tertiary); }
.chat-send-btn.active:hover { opacity: 0.9; }
.chat-send-btn svg { width: 14px; height: 14px; }

.chat-bubble-user {
  background: var(--brand);
  color: #fff;
  border-radius: 14px 14px 3px 14px;
  padding: 9px 14px;
  font-size: 13px;
  line-height: 1.6;
  max-width: 74%;
  box-shadow: 0 2px 12px rgba(99,102,241,0.2);
}
.chat-bubble-ai {
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  border-radius: 14px 14px 14px 3px;
  padding: 9px 14px;
  font-size: 13px;
  line-height: 1.6;
  max-width: 74%;
}

@keyframes typing-dot {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50%       { opacity: 0.9; transform: scale(1.1); }
}
.typing-dot {
  width: 5px; height: 5px;
  background: var(--text-secondary);
  border-radius: 50%;
  display: inline-block;
  margin: 0 2px;
}
.typing-dot:nth-child(1) { animation: typing-dot 1.1s ease-in-out infinite 0s; }
.typing-dot:nth-child(2) { animation: typing-dot 1.1s ease-in-out infinite 0.14s; }
.typing-dot:nth-child(3) { animation: typing-dot 1.1s ease-in-out infinite 0.28s; }


/* ═══════════════════════════════════════════════════════════════════
   NOTIFICATIONS PANEL
═══════════════════════════════════════════════════════════════════ */
#notif-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-panel);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}


/* ═══════════════════════════════════════════════════════════════════
   MOBILE
═══════════════════════════════════════════════════════════════════ */
.mobile-header {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 48px;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 30;
  align-items: center;
  padding: 0 16px;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 35;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); z-index: 50; }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.open { display: block; }
  .main-content { margin-left: 0; padding-top: 56px; }
  .main-content.expanded { margin-left: 0; }
  .mobile-header { display: flex; }

  .main-content > .p-8 { padding: 16px 16px 72px 16px !important; }
  .top-header { padding-left: 12px !important; padding-right: 12px !important; }
  .table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius-lg); }
  .table-responsive table { min-width: 580px; }
  .main-content { overflow-x: hidden; }
  .col-hide-mobile { display: none !important; }
  #notif-panel { right: 8px !important; left: 8px !important; width: auto !important; max-width: none !important; }
  .swal2-popup { width: 95vw !important; max-width: 95vw !important; padding: 20px !important; }
  .swal2-title { font-size: 17px !important; }
  .swal2-html-container { font-size: 13px !important; }
  .stat-card { padding: 12px !important; }
  #current-page-title { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-stack { grid-template-columns: 1fr !important; }
  .btn-primary, .btn-secondary { padding: 8px 14px !important; min-height: 36px; }
  #correo-3col { flex-direction: column !important; height: auto !important; }
  #correo-folder-col {
    width: 100% !important;
    border-right: none !important;
    border-bottom: 1px solid var(--border-subtle) !important;
    flex-direction: row !important;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 6px 8px;
    gap: 4px;
    min-height: 0;
    flex-shrink: 0;
    height: auto !important;
  }
  #correo-folder-col .p-3 { padding: 0 !important; }
  #correo-folder-col h3,
  #correo-folder-col .text-xs.font-semibold { display: none; }
  #correo-folder-col .space-y-0\.5,
  #correo-folder-col .flex-col { flex-direction: row !important; gap: 4px; flex-wrap: nowrap; }
  #correo-folder-col button { white-space: nowrap; padding: 5px 10px !important; border-radius: 20px; font-size: 11px; width: auto !important; flex-shrink: 0; }
  #correo-folder-col .mt-auto { display: none; }
  .correo-panel-list { width: 100% !important; border-right: none !important; border-bottom: 1px solid var(--border-subtle) !important; max-height: 340px; overflow-y: auto; flex-shrink: 0; }
  .correo-panel-reading { flex: 1; min-height: 400px; }
  #correo-3col.reading-active .correo-panel-list { display: none !important; }
  #correo-3col.reading-active .correo-panel-reading { min-height: 60vh; }
  #correo-3col.reading-active #correo-folder-col { display: none !important; }
  .correo-mobile-back { display: flex !important; }
  .px-8.py-6 { padding-left: 16px !important; padding-right: 16px !important; padding-top: 16px !important; padding-bottom: 16px !important; }
  .swal2-popup .grid-cols-2 { grid-template-columns: 1fr !important; }
}

@media (min-width: 769px) {
  .correo-panel-list { width: 300px; }
  .correo-mobile-back { display: none !important; }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .main-content > .p-8 { padding: 24px 24px 64px 24px !important; }
  .top-header { padding-left: 24px !important; padding-right: 24px !important; }
}


/* ═══════════════════════════════════════════════════════════════════
   UTILITY
═══════════════════════════════════════════════════════════════════ */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

a, button { transition: all var(--t-fast); }

/* Segmented control (view switcher) */
.segmented-control {
  display: flex;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 2px;
  gap: 2px;
}
.segmented-btn {
  flex: 1;
  padding: 4px 10px;
  border-radius: calc(var(--radius-md) - 2px);
  border: none;
  background: transparent;
  color: var(--text-tertiary);
  font-size: 12px;
  font-weight: 500;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all var(--t-fast);
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.segmented-btn.active {
  background: var(--bg-surface-2);
  color: var(--text-primary);
  border: 1px solid var(--border-default);
}

/* Dashboard chart area */
.chart-container {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  overflow: hidden;
}
.chart-container::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99,102,241,0.2), transparent);
  pointer-events: none;
}

/* Kbd shortcut */
kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px 5px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xs);
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-tertiary);
  line-height: 1.6;
}

/* Priority dot */
.priority-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Activity feed dot */
@keyframes ping {
  0%    { transform: scale(1);   opacity: 0.8; }
  75%,100% { transform: scale(1.8); opacity: 0; }
}
.live-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--status-active-text);
  position: relative;
}
.live-dot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--status-active-text);
  animation: ping 1.6s cubic-bezier(0, 0, 0.2, 1) infinite;
}

/* Command bar / search focus ring */
.search-field {
  display: flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0 10px;
  gap: 8px;
  transition: border-color var(--t-base), box-shadow var(--t-base);
}
.search-field:focus-within {
  border-color: var(--border-brand);
  box-shadow: 0 0 0 2.5px rgba(99,102,241,0.08);
}
.search-field input {
  background: transparent;
  border: none;
  outline: none;
  font-size: 13px;
  color: var(--text-primary);
  font-family: var(--font-sans);
  flex: 1;
  padding: 6px 0;
}
.search-field input::placeholder { color: var(--text-tertiary); }


/* ═══════════════════════════════════════════════════════════════════
   NEW DESIGN SYSTEM COMPONENTS — NexLegal Design Upgrade
═══════════════════════════════════════════════════════════════════ */

/* ── Section header ──────────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.section-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.015em;
  line-height: 1.2;
}
.section-subtitle {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

/* ── Pill tabs ───────────────────────────────────────────────── */
.pill-tabs {
  display: inline-flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 3px;
  gap: 2px;
}
.pill-tab {
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-tertiary);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all var(--t-fast);
  font-family: var(--font-sans);
  white-space: nowrap;
}
.pill-tab:hover { color: var(--text-secondary); }
.pill-tab.active {
  background: var(--bg-surface-2);
  color: var(--text-primary);
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* ── Table card ──────────────────────────────────────────────── */
.table-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.table-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

/* ── List row ────────────────────────────────────────────────── */
.list-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--t-fast);
}
.list-row:last-child { border-bottom: none; }

/* ── Icon chip ───────────────────────────────────────────────── */
.icon-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

/* ── KPI delta ───────────────────────────────────────────────── */
.kpi-value {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-mono);
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 6px;
}
.kpi-delta {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-tertiary);
}
.kpi-delta.up   { color: var(--status-active-text); }
.kpi-delta.down { color: var(--status-urgent-text); }

/* ── Task item ───────────────────────────────────────────────── */
.task-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  transition: background var(--t-fast);
}
.task-item:hover { background: var(--bg-hover); }
.task-checkbox {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1.5px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--t-fast);
}
.task-checkbox.done {
  background: var(--brand);
  border-color: var(--brand);
}

/* ── Member card ─────────────────────────────────────────────── */
.member-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.member-card:hover {
  border-color: var(--border-default);
  box-shadow: 0 4px 16px -4px rgba(0,0,0,0.3);
}
.member-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
}

/* ── Priority dot ────────────────────────────────────────────── */
.priority-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── Live dot ────────────────────────────────────────────────── */
.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--status-active-text);
  box-shadow: 0 0 0 2px rgba(52,211,153,0.2);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 2px rgba(52,211,153,0.2); }
  50% { box-shadow: 0 0 0 4px rgba(52,211,153,0.1); }
}

/* ── Biblio card ─────────────────────────────────────────────── */
.biblio-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  transition: border-color var(--t-fast);
}
.biblio-card:hover { border-color: var(--border-default); }

/* ── Table responsive wrapper ────────────────────────────────── */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.table-responsive table { min-width: 480px; }

/* ── Row stagger animation ───────────────────────────────────── */
@keyframes rowStagger {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate-row {
  animation: rowStagger 0.18s ease forwards;
  opacity: 0;
}

/* ── col-hide-mobile (handled in @media above) ───────────────── */

/* ── chart-container gradient top border ─────────────────────── */
.chart-container {
  position: relative;
}
.chart-container::before {
  content: '';
  position: absolute;
  top: 0; left: 16px; right: 16px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--brand-glow), transparent);
  border-radius: 1px;
  pointer-events: none;
}
