/* ═══════════════════════════════════════════════════════════════
   ParselSorgu Admin – Premium Dark UI
   ═══════════════════════════════════════════════════════════════ */

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

/* ── Design Tokens ────────────────────────────────────────── */
:root {
  --bg-base:     #0b0f19;
  --bg-surface:  #111827;
  --bg-elevated: #1a2332;
  --bg-glass:    rgba(17, 24, 39, 0.65);
  --bg-glass-hover: rgba(30, 41, 59, 0.7);

  --border:      rgba(148, 163, 184, 0.08);
  --border-focus: rgba(99, 102, 241, 0.5);
  --border-glow: rgba(99, 102, 241, 0.25);

  --text:        #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted:  #64748b;

  --accent:      #6366f1;
  --accent-soft: rgba(99, 102, 241, 0.12);
  --accent-glow: rgba(99, 102, 241, 0.35);

  --success:     #10b981;
  --success-bg:  rgba(16, 185, 129, 0.12);
  --warning:     #f59e0b;
  --warning-bg:  rgba(245, 158, 11, 0.12);
  --danger:      #ef4444;
  --danger-bg:   rgba(239, 68, 68, 0.12);
  --info:        #3b82f6;
  --info-bg:     rgba(59, 130, 246, 0.12);

  --sidebar-w:   272px;
  --radius-sm:   10px;
  --radius-md:   16px;
  --radius-lg:   22px;
  --radius-xl:   28px;

  --shadow-sm:   0 2px 8px rgba(0,0,0,0.15);
  --shadow-md:   0 8px 32px rgba(0,0,0,0.25);
  --shadow-lg:   0 20px 60px rgba(0,0,0,0.35);
  --shadow-glow: 0 0 30px var(--accent-glow);

  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.6;
  background: var(--bg-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Animated mesh gradient background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 50% at 15% 10%, rgba(99, 102, 241, 0.12), transparent),
    radial-gradient(ellipse 60% 40% at 85% 80%, rgba(139, 92, 246, 0.08), transparent),
    radial-gradient(ellipse 50% 50% at 50% 50%, rgba(59, 130, 246, 0.05), transparent);
  animation: meshShift 20s ease infinite alternate;
}

@keyframes meshShift {
  0%   { opacity: 1; }
  50%  { opacity: 0.7; }
  100% { opacity: 1; }
}

button, input, textarea, select, a { font: inherit; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; }
.hidden { display: none !important; }

/* ── Typography Utilities ─────────────────────────────────── */
.eyebrow {
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  background: linear-gradient(135deg, var(--accent), #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.muted { color: var(--text-secondary); }
.small { font-size: 13px; }

h1 { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
h3 { font-size: 17px; font-weight: 600; }

/* ── Login Page ───────────────────────────────────────────── */
.login-body {
  display: grid;
  place-items: center;
  background: var(--bg-base);
  position: relative;
}

.login-body::after {
  content: '';
  position: fixed;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--accent-glow), transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 0;
  filter: blur(80px);
  animation: loginPulse 4s ease-in-out infinite alternate;
}

@keyframes loginPulse {
  0%   { opacity: 0.3; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0.6; transform: translate(-50%, -50%) scale(1.15); }
}

.login-shell {
  width: min(480px, calc(100% - 32px));
  padding: 40px 0;
  position: relative;
  z-index: 1;
  animation: slideUp 0.6s var(--ease-spring) both;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: translateY(0); }
}

.login-card {
  padding: 36px;
  display: grid;
  gap: 24px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
}

.login-card h1 {
  font-size: 28px;
  background: linear-gradient(135deg, #fff, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Admin Layout ─────────────────────────────────────────── */
.admin-layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100vh;
}

/* ── Sidebar ──────────────────────────────────────────────── */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 28px 20px;
  background: linear-gradient(180deg, #0f172a 0%, #1e1b4b 100%);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 24px;
  z-index: 50;
}

/* Sidebar decorative glow */
.sidebar::before {
  content: '';
  position: absolute;
  top: -40px;
  left: -40px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.2), transparent 70%);
  filter: blur(60px);
  pointer-events: none;
}

.brand-block {
  position: relative;
}

.brand-block h1 {
  font-size: 22px;
  margin-bottom: 6px;
  background: linear-gradient(135deg, #fff, #c7d2fe);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar .eyebrow {
  background: linear-gradient(135deg, #818cf8, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar .muted { color: rgba(148, 163, 184, 0.7); }

.sidebar-nav {
  display: grid;
  gap: 4px;
}

.nav-link {
  position: relative;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: rgba(226, 232, 240, 0.8);
  border: 1px solid transparent;
  background: transparent;
  transition: all 0.25s var(--ease-smooth);
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 500;
  font-size: 14px;
  overflow: hidden;
}

.nav-link .nav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  opacity: 0.65;
  transition: opacity 0.25s;
}

.nav-link:hover {
  background: rgba(99, 102, 241, 0.08);
  color: #e2e8f0;
  border-color: rgba(99, 102, 241, 0.12);
  transform: translateX(4px);
}

.nav-link:hover .nav-icon { opacity: 1; }

.nav-link.active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.18), rgba(139, 92, 246, 0.12));
  color: #fff;
  border-color: rgba(99, 102, 241, 0.2);
  font-weight: 600;
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.1);
}

.nav-link.active .nav-icon { opacity: 1; }

.nav-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: linear-gradient(180deg, var(--accent), #a78bfa);
  border-radius: 0 3px 3px 0;
}

.sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
}

.sidebar-footer strong {
  font-weight: 600;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-footer strong::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
  animation: onlinePulse 2s ease infinite;
}

@keyframes onlinePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ── Content Area ─────────────────────────────────────────── */
.content {
  padding: 28px;
  display: grid;
  gap: 22px;
  align-content: start;
  animation: fadeIn 0.4s var(--ease-smooth) both;
}

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

/* ── Page Head ────────────────────────────────────────────── */
.page-head {
  padding: 24px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.page-head h2 {
  background: linear-gradient(135deg, #f1f5f9, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Actions, Toolbars ────────────────────────────────────── */
.hero-actions, .toolbar, .row-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

/* ── Panel (Glass Card) ───────────────────────────────────── */
.panel {
  padding: 24px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.panel:hover {
  border-color: rgba(99, 102, 241, 0.12);
  box-shadow: var(--shadow-md);
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 14px;
  margin-bottom: 18px;
}

/* ── Stat Cards ───────────────────────────────────────────── */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.stat-card {
  position: relative;
  padding: 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  overflow: hidden;
  transition: all 0.35s var(--ease-smooth);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #a78bfa, #818cf8);
  opacity: 0;
  transition: opacity 0.35s;
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.2);
  box-shadow: var(--shadow-glow);
}

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

.stat-card .muted {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stat-card strong {
  display: block;
  margin-top: 10px;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #fff, #c7d2fe);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Distinct colors for each stat */
.stat-card:nth-child(1) { --card-accent: #6366f1; }
.stat-card:nth-child(2) { --card-accent: #10b981; }
.stat-card:nth-child(3) { --card-accent: #f59e0b; }
.stat-card:nth-child(4) { --card-accent: #ef4444; }
.stat-card:nth-child(5) { --card-accent: #3b82f6; }

.stat-card:nth-child(1)::before { background: linear-gradient(90deg, #6366f1, #818cf8); }
.stat-card:nth-child(2)::before { background: linear-gradient(90deg, #10b981, #34d399); }
.stat-card:nth-child(3)::before { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.stat-card:nth-child(4)::before { background: linear-gradient(90deg, #ef4444, #f87171); }
.stat-card:nth-child(5)::before { background: linear-gradient(90deg, #3b82f6, #60a5fa); }

.stat-card:nth-child(1):hover { box-shadow: 0 0 30px rgba(99, 102, 241, 0.25); }
.stat-card:nth-child(2):hover { box-shadow: 0 0 30px rgba(16, 185, 129, 0.25); }
.stat-card:nth-child(3):hover { box-shadow: 0 0 30px rgba(245, 158, 11, 0.25); }
.stat-card:nth-child(4):hover { box-shadow: 0 0 30px rgba(239, 68, 68, 0.25); }
.stat-card:nth-child(5):hover { box-shadow: 0 0 30px rgba(59, 130, 246, 0.25); }

/* ── Grid Layouts ─────────────────────────────────────────── */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

/* ── Forms ─────────────────────────────────────────────────── */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.single-col { grid-template-columns: 1fr; }

.form-grid label {
  display: grid;
  gap: 8px;
}

.form-grid label span, th {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.full { grid-column: 1 / -1; }
.top-gap { margin-top: 22px; }

input, textarea, select {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.6);
  color: var(--text);
  font-size: 14px;
  transition: all 0.25s var(--ease-smooth);
  outline: none;
}

input::placeholder, textarea::placeholder {
  color: var(--text-muted);
}

input:focus, textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--border-glow);
  background: rgba(15, 23, 42, 0.8);
}

input[type="search"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85zm-5.242.656a5 5 0 1 1 0-10 5 5 0 0 1 0 10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 14px center;
  padding-left: 40px;
}

/* ── Buttons ──────────────────────────────────────────────── */
button, .button-like {
  border: 0;
  border-radius: var(--radius-sm);
  padding: 11px 20px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #7c3aed);
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
  transition: all 0.3s var(--ease-smooth);
  text-decoration: none;
  white-space: nowrap;
}

button:hover, .button-like:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
  background: linear-gradient(135deg, #7c3aed, var(--accent));
}

button:active, .button-like:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

/* Ripple effect */
button::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(255,255,255,0.25), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
}

button:active::after {
  opacity: 1;
}

button.ghost, .sidebar button.ghost {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  box-shadow: none;
}

button.ghost:hover {
  background: rgba(99, 102, 241, 0.1);
  color: var(--text);
  border-color: rgba(99, 102, 241, 0.2);
  box-shadow: none;
  transform: translateY(-1px);
}

.sidebar button.ghost {
  color: rgba(226, 232, 240, 0.7);
  border-color: rgba(255, 255, 255, 0.08);
}

.sidebar button.ghost:hover {
  color: #fff;
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.25);
}

/* ── Danger Button ────────────────────────────────────────── */
button.btn-danger, .btn-danger {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  box-shadow: 0 4px 16px rgba(220, 38, 38, 0.25);
}

button.btn-danger:hover, .btn-danger:hover {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.4);
  transform: translateY(-2px);
}

button.btn-danger:active, .btn-danger:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

/* ── Toggle ───────────────────────────────────────────────── */
.toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.4);
  transition: border-color 0.25s;
}

.toggle:has(input:checked) {
  border-color: rgba(99, 102, 241, 0.3);
}

.toggle input {
  width: auto;
  accent-color: var(--accent);
}

/* ── Tables ───────────────────────────────────────────────── */
.table-wrap {
  overflow: auto;
  border-radius: var(--radius-sm);
}

.table-wrap.short { max-height: 420px; }

.table-wrap::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

.table-wrap::-webkit-scrollbar-track {
  background: transparent;
}

.table-wrap::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.15);
  border-radius: 10px;
}

table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

th {
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

th, td {
  text-align: left;
  padding: 14px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  font-size: 13px;
}

thead th {
  position: sticky;
  top: 0;
  background: var(--bg-elevated);
  z-index: 2;
}

tbody tr {
  transition: background 0.2s;
}

tbody tr:hover {
  background: rgba(99, 102, 241, 0.04);
}

/* ── Pills / Badges ───────────────────────────────────────── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--accent-soft);
  color: var(--accent);
}

.pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.pill.active {
  background: var(--success-bg);
  color: var(--success);
}

.pill.expired {
  background: var(--danger-bg);
  color: var(--danger);
}

.pill.expiring {
  background: var(--warning-bg);
  color: var(--warning);
}

.pill.inactive {
  background: rgba(100, 116, 139, 0.12);
  color: var(--text-muted);
}

/* ── Messages ─────────────────────────────────────────────── */
.message {
  min-height: 20px;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--success);
  padding: 0;
  transition: all 0.3s;
}

.message:not(:empty) {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--success-bg);
  border: 1px solid rgba(16, 185, 129, 0.15);
  animation: msgSlide 0.3s var(--ease-spring);
}

.message.error {
  color: var(--danger);
  background: var(--danger-bg);
  border-color: rgba(239, 68, 68, 0.15);
}

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

/* ── Result List ──────────────────────────────────────────── */
.result-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.result-item {
  padding: 16px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  background: rgba(15, 23, 42, 0.5);
  transition: all 0.25s var(--ease-smooth);
}

.result-item:hover {
  border-color: rgba(99, 102, 241, 0.15);
  background: rgba(99, 102, 241, 0.04);
  transform: translateX(4px);
}

/* ── Detail Grid ──────────────────────────────────────────── */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.detail-card {
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.4);
  transition: all 0.25s var(--ease-smooth);
}

.detail-card:hover {
  border-color: rgba(99, 102, 241, 0.12);
  background: rgba(99, 102, 241, 0.04);
}

.detail-card .muted {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.detail-card strong {
  display: block;
  margin-top: 8px;
  font-size: 16px;
  color: #e2e8f0;
  word-break: break-word;
}

/* ── Custom Scrollbar (global) ────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.12);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.25);
}

/* ── Mobile-first hamburger (hidden on desktop) ───────────── */
.mobile-toggle {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 100;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #7c3aed);
  color: #fff;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
  padding: 0;
  align-items: center;
  justify-content: center;
}

.mobile-toggle svg {
  width: 22px;
  height: 22px;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1080px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    left: -300px;
    top: 0;
    width: 280px;
    height: 100vh;
    transition: left 0.35s var(--ease-smooth);
    box-shadow: var(--shadow-lg);
  }

  .sidebar.open {
    left: 0;
  }

  .mobile-toggle {
    display: inline-flex;
  }
}

@media (max-width: 860px) {
  .grid-2, .form-grid, .detail-grid {
    grid-template-columns: 1fr;
  }

  .page-head, .panel-head, .result-item {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ── Entrance animations for staggered items ──────────────── */
.stat-card,
.result-item,
.detail-card {
  animation: cardIn 0.4s var(--ease-spring) both;
}

.stat-card:nth-child(1) { animation-delay: 0.05s; }
.stat-card:nth-child(2) { animation-delay: 0.1s; }
.stat-card:nth-child(3) { animation-delay: 0.15s; }
.stat-card:nth-child(4) { animation-delay: 0.2s; }
.stat-card:nth-child(5) { animation-delay: 0.25s; }

@keyframes cardIn {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Loading skeleton placeholder ─────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--bg-elevated), rgba(99, 102, 241, 0.06), var(--bg-elevated));
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

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