/* =========================================================================
   Sri Murugan Travel Agency CRM — Premium Theme
   Light, warm, gold/amber brand palette matching the company logo.
   Pure CSS redesign — no HTML structure, routes, or logic changed.
   ========================================================================= */

:root {
  /* Brand (logo gold / amber / rust) */
  --c-primary: #b45309;
  --c-primary-dark: #92400e;
  --c-primary-light: #f59e0b;
  --c-primary-soft: #fdf1e2;
  --c-primary-soft-strong: #fce3c3;

  /* Surfaces */
  --c-bg: #f8f5ef;
  --c-surface: #ffffff;
  --c-surface-alt: #fbf8f2;

  /* Borders */
  --c-border: #ece1d1;
  --c-border-soft: #e6dac6;

  /* Text */
  --c-text: #2c2416;
  --c-text-muted: #8d7c62;
  --c-text-faint: #b7a98d;

  /* Status */
  --c-success: #15803d;
  --c-success-soft: #eaf7ee;
  --c-danger: #dc2626;
  --c-danger-soft: #fdecec;
  --c-warning: #b45309;
  --c-warning-soft: #fdf1e2;
  --c-info: #2563eb;
  --c-info-soft: #eaf1fd;
  --c-gray-soft: #f1ede4;

  /* Elevation */
  --shadow-xs: 0 1px 2px rgba(44, 36, 22, 0.05);
  --shadow-sm: 0 2px 6px rgba(44, 36, 22, 0.06), 0 1px 2px rgba(44, 36, 22, 0.04);
  --shadow-md: 0 8px 24px rgba(44, 36, 22, 0.08), 0 2px 6px rgba(44, 36, 22, 0.05);
  --shadow-lg: 0 16px 40px rgba(44, 36, 22, 0.12);

  /* Radius */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-pill: 999px;

  --sidebar-w: 264px;
  --topbar-h: 64px;
}

/* ---------- Reset & base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--c-bg);
  color: var(--c-text);
  font-size: 14.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 700; letter-spacing: -0.01em; color: var(--c-text); }
a { color: inherit; text-decoration: none; }
ul { margin: 0; }
img { max-width: 100%; display: block; }
::selection { background: var(--c-primary-soft-strong); }

/* scrollbars — subtle, premium */
* { scrollbar-width: thin; scrollbar-color: var(--c-border-soft) transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: var(--c-border-soft); border-radius: 8px; }
*::-webkit-scrollbar-track { background: transparent; }

/* ---------- Top bar ---------- */
.app-topbar {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-xs);
}
.app-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--c-text);
}
.app-brand img { border-radius: 8px; box-shadow: var(--shadow-xs); }
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, var(--c-primary-light), var(--c-primary));
  color: #fff;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}
.nav-toggle {
  display: none;
  width: 38px; height: 38px;
  border-radius: var(--r-sm);
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  cursor: pointer;
  position: relative;
}
.nav-toggle span, .nav-toggle::before, .nav-toggle::after {
  content: ''; position: absolute; left: 9px; right: 9px; height: 2px;
  background: var(--c-text); border-radius: 2px; transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle span { top: 50%; margin-top: -1px; }
.nav-toggle::before { top: 12px; }
.nav-toggle::after { bottom: 12px; }
.nav-toggle.is-active::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle.is-active::after { transform: translateY(-6px) rotate(-45deg); }
.nav-toggle.is-active span { opacity: 0; }

.topbar-right { display: flex; align-items: center; gap: 14px; }
.user-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 14px 6px 6px;
  border-radius: var(--r-pill);
  background: var(--c-surface-alt);
  border: 1px solid var(--c-border);
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--c-text);
}
.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, var(--c-primary-light), var(--c-primary));
  color: #fff; font-weight: 700; font-size: 0.82rem;
  box-shadow: var(--shadow-xs);
}

/* ---------- Shell / Sidebar ---------- */
.app-shell { display: flex; align-items: flex-start; min-height: calc(100vh - var(--topbar-h)); }

.app-sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--c-surface);
  border-right: 1px solid var(--c-border);
  padding: 18px 12px 40px;
  position: sticky;
  top: var(--topbar-h);
  height: calc(100vh - var(--topbar-h));
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-section-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-text-faint);
  padding: 18px 12px 6px;
}

.nav-link-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  color: var(--c-text-muted);
  font-weight: 500;
  font-size: 0.885rem;
  transition: background .15s ease, color .15s ease, transform .1s ease;
  white-space: nowrap;
}
.nav-link-item:hover { background: var(--c-surface-alt); color: var(--c-text); }
.nav-link-item:active { transform: scale(0.99); }
.nav-link-item.active {
  background: var(--c-primary-soft);
  color: var(--c-primary-dark);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--c-primary);
}
.nav-link-item .nav-icon {
  flex-shrink: 0;
  width: 18px; height: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--c-text-faint);
}
.nav-link-item:hover .nav-icon { color: var(--c-primary); }
.nav-link-item.active .nav-icon { color: var(--c-primary); }
.nav-link-item .nav-icon svg { width: 17px; height: 17px; }

/* sub-items (rendered with a leading '↳' in the label text) */
.nav-link-item.nav-sub {
  padding-left: 30px;
  font-size: 0.83rem;
  color: var(--c-text-faint);
  gap: 8px;
}
.nav-link-item.nav-sub::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--c-text-faint);
  flex-shrink: 0;
}
.nav-link-item.nav-sub:hover::before { background: var(--c-primary); }
.nav-link-item.nav-sub.active { box-shadow: none; background: transparent; color: var(--c-primary-dark); font-weight: 600; }
.nav-link-item.nav-sub.active::before { background: var(--c-primary); }

/* ---------- Main content ---------- */
.app-main {
  flex: 1;
  min-width: 0;
  padding: 28px 32px 60px;
}

/* ---------- Alerts ---------- */
.alert {
  padding: 13px 16px;
  border-radius: var(--r-md);
  font-size: 0.88rem;
  margin-bottom: 18px;
  border: 1px solid transparent;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.alert-success { background: var(--c-success-soft); color: var(--c-success); border-color: #cdecd7; }
.alert-danger { background: var(--c-danger-soft); color: var(--c-danger); border-color: #f7cfcf; }

/* ---------- Page header ---------- */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.page-title { font-size: 1.5rem; font-weight: 700; color: var(--c-text); }
.page-subtitle { color: var(--c-text-muted); font-size: 0.88rem; margin-top: 4px; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------- Cards ---------- */
.card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s ease;
}
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-header h6 { font-size: 0.92rem; font-weight: 700; margin: 0; }
.card-body { padding: 20px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--r-sm);
  font-weight: 600;
  font-size: 0.86rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .1s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease, opacity .15s ease;
  line-height: 1.3;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-primary {
  background: linear-gradient(135deg, var(--c-primary-light), var(--c-primary));
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover:not(:disabled) { box-shadow: var(--shadow-md); filter: brightness(1.03); }

.btn-secondary {
  background: var(--c-surface);
  color: var(--c-text);
  border-color: var(--c-border-soft);
}
.btn-secondary:hover:not(:disabled) { background: var(--c-surface-alt); border-color: var(--c-primary-light); }

.btn-ghost {
  background: transparent;
  color: var(--c-text-muted);
  border-color: transparent;
}
.btn-ghost:hover:not(:disabled) { background: var(--c-surface-alt); color: var(--c-text); }

.btn-danger-outline {
  background: transparent;
  color: var(--c-danger);
  border-color: #f3c8c8;
}
.btn-danger-outline:hover:not(:disabled) { background: var(--c-danger-soft); }

.btn-sm { padding: 6px 12px; font-size: 0.78rem; border-radius: 7px; }
.btn-block { width: 100%; }

/* ---------- Forms ---------- */
.form-field { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--c-text);
  margin-bottom: 6px;
}
.form-control, .form-select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--c-border-soft);
  border-radius: var(--r-sm);
  background: var(--c-surface);
  color: var(--c-text);
  font-size: 0.89rem;
  font-family: inherit;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.form-control:focus, .form-select:focus {
  outline: none;
  border-color: var(--c-primary-light);
  box-shadow: 0 0 0 3px var(--c-primary-soft);
}
.form-control::placeholder { color: var(--c-text-faint); }
.form-text { font-size: 0.78rem; color: var(--c-text-muted); margin-top: 5px; }
.form-check-input { width: 16px; height: 16px; accent-color: var(--c-primary); cursor: pointer; }

.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.form-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.col-span-2 { grid-column: span 2; }

/* ---------- Tables / DataTable wrapper ---------- */
.table-scroll { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.87rem; }
.data-table thead th {
  text-align: left;
  padding: 12px 16px;
  background: var(--c-surface-alt);
  color: var(--c-text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--c-border);
  white-space: nowrap;
}
.data-table tbody td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--c-border);
  color: var(--c-text);
  vertical-align: middle;
}
.data-table tbody tr { transition: background .12s ease; }
.data-table tbody tr:hover { background: var(--c-surface-alt); }
.data-table tbody tr:last-child td { border-bottom: none; }
.dt-empty-row td { text-align: center; padding: 36px 16px; color: var(--c-text-muted); font-style: normal; }

.dt-wrap { border-radius: var(--r-lg); overflow: hidden; }
.dt-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--c-border);
  flex-wrap: wrap;
}
.dt-search input {
  padding: 9px 14px;
  border: 1px solid var(--c-border-soft);
  border-radius: var(--r-pill);
  font-size: 0.85rem;
  min-width: 220px;
  background: var(--c-surface-alt);
}
.dt-search input:focus { outline: none; border-color: var(--c-primary-light); background: var(--c-surface); }
.dt-meta { color: var(--c-text-muted); font-size: 0.8rem; font-weight: 600; }
.dt-pagination { display: flex; justify-content: center; padding: 14px; border-top: 1px solid var(--c-border); }
.dt-pages { display: flex; gap: 4px; }
.dt-pages button, .dt-pages span, .dt-pages a {
  min-width: 30px; height: 30px; padding: 0 8px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 7px; font-size: 0.8rem; color: var(--c-text-muted); cursor: pointer;
}
.dt-pages .active, .dt-pages button.active { background: var(--c-primary); color: #fff; font-weight: 700; }

/* Laravel paginator links (outside x-table-wrap) */
nav[role="navigation"] { margin-top: 18px; }
.pagination { display: flex; list-style: none; padding: 0; gap: 4px; flex-wrap: wrap; }
.pagination li { display: inline-flex; }
.pagination a, .pagination span {
  min-width: 34px; height: 34px; padding: 0 10px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px; border: 1px solid var(--c-border-soft);
  color: var(--c-text-muted); font-size: 0.82rem; background: var(--c-surface);
}
.pagination a:hover { background: var(--c-surface-alt); border-color: var(--c-primary-light); }
.pagination .active span { background: var(--c-primary); border-color: var(--c-primary); color: #fff; font-weight: 700; }
.pagination .disabled span { opacity: 0.4; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 11px;
  border-radius: var(--r-pill);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.badge-gray { background: var(--c-gray-soft); color: var(--c-text-muted); }
.badge-green { background: var(--c-success-soft); color: var(--c-success); }
.badge-yellow { background: var(--c-warning-soft); color: var(--c-warning); }
.badge-red { background: var(--c-danger-soft); color: var(--c-danger); }
.badge-blue { background: var(--c-info-soft); color: var(--c-info); }

/* ---------- Import panel ---------- */
.import-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.import-field { display: flex; flex-direction: column; gap: 8px; }
.import-file-hint {
  display: inline-flex;
  align-self: flex-start;
  padding: 4px 12px;
  border-radius: var(--r-pill);
  background: var(--c-primary-soft);
  color: var(--c-primary-dark);
  font-size: 0.76rem;
  font-weight: 700;
}

/* ---------- Stat cards (dashboard) ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 26px;
}
.stat-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease;
}
.stat-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--c-primary-light), var(--c-primary));
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-label {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--c-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}
.stat-value { font-size: 1.65rem; font-weight: 800; color: var(--c-text); letter-spacing: -0.02em; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--c-border); margin-bottom: 18px; flex-wrap: wrap; }
.tab-btn {
  padding: 10px 16px;
  border: none;
  background: transparent;
  color: var(--c-text-muted);
  font-weight: 600;
  font-size: 0.86rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color .15s ease, border-color .15s ease;
}
.tab-btn:hover { color: var(--c-text); }
.tab-btn.active { color: var(--c-primary); border-bottom-color: var(--c-primary); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ---------- Empty state ---------- */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--c-text-muted);
  font-size: 0.9rem;
  background: var(--c-surface-alt);
  border-radius: var(--r-md);
  border: 1px dashed var(--c-border-soft);
}

/* ---------- Utilities ---------- */
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; }
.mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; }
.mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; }
.small { font-size: 0.82rem; }
.text-muted { color: var(--c-text-muted); }
.max-w-lg { max-width: 640px; }
.max-w-md { max-width: 480px; }

/* ---------- Dashboard: entrance animation ---------- */
@keyframes dashFadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.dash-fade {
  animation: dashFadeUp .5s ease both;
  animation-delay: var(--d, 0s);
}
@media (prefers-reduced-motion: reduce) {
  .dash-fade { animation: none; }
}

/* ---------- Dashboard: stat card icon ---------- */
.stat-card { padding-top: 20px; }
.stat-card-icon {
  width: 38px; height: 38px;
  border-radius: var(--r-md);
  background: var(--c-primary-soft);
  color: var(--c-primary);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.stat-card-icon svg { width: 19px; height: 19px; }

/* ---------- Dashboard: two-column layout ---------- */
.dash-columns {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 20px;
  margin-bottom: 26px;
  align-items: stretch;
}
@media (max-width: 1024px) {
  .dash-columns { grid-template-columns: 1fr; }
}

/* ---------- Dashboard: pipeline donut ---------- */
.pipeline-wrap { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.donut {
  --p1: 0; --p2: 0; --p3: 0;
  width: 148px; height: 148px;
  border-radius: 50%;
  flex-shrink: 0;
  background: conic-gradient(
    var(--c-text-faint) 0 calc(var(--p1) * 1%),
    var(--c-info) calc(var(--p1) * 1%) calc(var(--p2) * 1%),
    var(--c-success) calc(var(--p2) * 1%) calc(var(--p3) * 1%),
    var(--c-primary-light) calc(var(--p3) * 1%) 100%
  );
  display: flex; align-items: center; justify-content: center;
  position: relative;
  box-shadow: var(--shadow-xs);
}
.donut::before {
  content: '';
  position: absolute;
  width: 96px; height: 96px;
  border-radius: 50%;
  background: var(--c-surface);
  box-shadow: inset 0 0 0 1px var(--c-border);
}
.donut-center { position: relative; text-align: center; }
.donut-center-value { font-size: 1.3rem; font-weight: 800; color: var(--c-text); }
.donut-center-label { font-size: 0.68rem; color: var(--c-text-muted); text-transform: uppercase; letter-spacing: .04em; }

.pipeline-legend { display: flex; flex-direction: column; gap: 10px; flex: 1; min-width: 180px; }
.legend-row { display: flex; align-items: center; gap: 8px; font-size: 0.86rem; color: var(--c-text); }
.legend-row strong { margin-left: auto; font-weight: 700; }
.legend-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }

/* ---------- Dashboard: mini progress bar ---------- */
.mini-bar {
  height: 9px;
  border-radius: var(--r-pill);
  background: var(--c-danger-soft);
  overflow: hidden;
}
.mini-bar-fill {
  height: 100%;
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--c-info), var(--c-primary-light));
  transition: width .6s ease;
}

/* ---------- Dashboard: quick actions ---------- */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
}
.quick-action {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--c-border);
  background: var(--c-surface-alt);
  color: var(--c-text);
  font-weight: 600;
  font-size: 0.83rem;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease;
}
.quick-action:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--c-primary-light);
  background: var(--c-surface);
}
.quick-action-icon {
  width: 34px; height: 34px;
  border-radius: var(--r-sm);
  background: var(--c-primary-soft);
  color: var(--c-primary);
  display: inline-flex; align-items: center; justify-content: center;
}
.quick-action-icon svg { width: 17px; height: 17px; }

/* ---------- Responsive additions ---------- */
@media (max-width: 640px) {
  .pipeline-wrap { flex-direction: column; align-items: stretch; }
  .donut { margin: 0 auto; }
}
@media (max-width: 1024px) {
  .app-main { padding: 22px 20px 48px; }
  .form-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .form-grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-block; }
  .app-sidebar {
    position: fixed;
    left: 0;
    top: var(--topbar-h);
    height: calc(100vh - var(--topbar-h));
    transform: translateX(-100%);
    transition: transform .22s ease;
    z-index: 60;
    box-shadow: var(--shadow-lg);
  }
  .app-sidebar.is-open { transform: translateX(0); }
  .app-shell::after {
    content: '';
    position: fixed; inset: var(--topbar-h) 0 0 0;
    background: rgba(20, 15, 5, 0.35);
    z-index: 55;
    opacity: 0; pointer-events: none;
    transition: opacity .2s ease;
  }
  .app-shell.sidebar-open::after { opacity: 1; pointer-events: auto; }
  .app-main { width: 100%; }
  .stat-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  .user-chip span:not(.avatar) { display: none; }
}

@media (max-width: 640px) {
  .app-topbar { padding: 0 14px; }
  .app-brand span { display: none; }
  .app-main { padding: 16px 14px 40px; }
  .page-header { flex-direction: column; align-items: stretch; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1; }
  .form-grid, .form-grid-3, .form-grid-4 { grid-template-columns: 1fr; }
  .col-span-2 { grid-column: span 1; }
  .card-body { padding: 16px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .import-panel { flex-direction: column; align-items: stretch; }
  .import-panel > div:last-child { display: flex; flex-direction: column; }
}
