/* ===========================
   Berlin Travel — Admin Dashboard
   Aligned with BerlinTravelAgnecy public site
   =========================== */

@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap");

/* ===========================
   CSS Variables (public site tokens)
   =========================== */
:root {
  /* Core palette — BerlinTravelAgnecy/style.css */
  --ink:         #0A0F1E;
  --ink-light:   #1A2033;
  --ink-700:     #1A2033;
  --ink-500:     #374151;
  --ink-400:     #6B7280;
  --ink-200:     #D1D5DB;
  --ink-100:     #F3F4F6;
  --ink-50:      #F9FAFB;
  --white:       #FFFFFF;

  --blue:        #2563EB;
  --blue-dark:   #1D4ED8;
  --blue-light:  #3B82F6;
  --blue-50:     #EFF6FF;
  --blue-100:    #DBEAFE;
  --blue-muted:  rgba(37, 99, 235, 0.12);

  --amber:       #D97706;
  --amber-light: #F59E0B;

  --gold:        #D4AF37;
  --gold-light:  #E8C557;
  --gold-dark:   #B8941F;
  --gold-muted:  rgba(212, 175, 55, 0.12);
  --gold-border: rgba(212, 175, 55, 0.22);
  --gold-glow:   rgba(212, 175, 55, 0.22);
  --shadow-gold: 0 4px 20px rgba(212, 175, 55, 0.28);
  --shadow-blue: 0 6px 18px rgba(37, 99, 235, 0.28);

  /* Primary actions = site blue */
  --primary:       var(--blue);
  --primary-dark:  var(--blue-dark);
  --primary-light: var(--blue-light);
  --primary-muted: var(--blue-muted);

  /* Sidebar — site ink */
  --sidebar-bg-start: #0A0F1E;
  --sidebar-bg-end:   #1A2033;

  /* Stat / status accents */
  --teal:         #0D9488;
  --teal-light:   #14B8A6;
  --teal-muted:   rgba(13, 148, 136, 0.12);
  --purple:       #8B5CF6;
  --purple-muted: rgba(139, 92, 246, 0.12);
  --orange:       var(--amber-light);
  --orange-muted: rgba(245, 158, 11, 0.12);
  --red:          #EF4444;
  --red-muted:    rgba(239, 68, 68, 0.1);
  --green:        #10B981;
  --green-muted:  rgba(16, 185, 129, 0.1);

  /* Slate aliases (existing dashboard rules) */
  --slate-700:  var(--ink-700);
  --slate-600:  var(--ink-500);
  --slate-500:  var(--ink-400);
  --slate-400:  #9CA3AF;
  --slate-300:  var(--ink-200);
  --slate-200:  var(--ink-200);
  --slate-100:  var(--ink-100);
  --slate-50:   var(--ink-50);

  --bg-primary:   var(--ink-50);
  --bg-secondary: var(--ink-100);
  --bg-card:      var(--white);

  --shadow-xs:   0 1px 2px rgba(10, 15, 30, 0.06);
  --shadow-sm:   0 1px 3px rgba(10, 15, 30, 0.08), 0 1px 2px rgba(10, 15, 30, 0.05);
  --shadow-md:   0 4px 16px rgba(10, 15, 30, 0.10), 0 2px 6px rgba(10, 15, 30, 0.06);
  --shadow-lg:   0 12px 40px rgba(10, 15, 30, 0.12), 0 4px 12px rgba(10, 15, 30, 0.08);
  --shadow-xl:   0 24px 60px rgba(10, 15, 30, 0.15);
  --shadow-2xl:  0 30px 70px rgba(10, 15, 30, 0.18);
  --shadow-card: var(--shadow-sm);

  --radius-sm:   6px;
  --radius-md:   12px;
  --radius-lg:   16px;
  --radius-xl:   20px;
  --radius-2xl:  24px;
  --radius-full: 9999px;

  --t-fast:   200ms cubic-bezier(0.22, 1, 0.36, 1);
  --t-base:   350ms cubic-bezier(0.22, 1, 0.36, 1);
  --t-slow:   600ms cubic-bezier(0.22, 1, 0.36, 1);
  --t-spring: 500ms cubic-bezier(0.23, 1, 0.32, 1);

  --font-display: 'Plus Jakarta Sans', sans-serif;
  --font-body:    'Plus Jakarta Sans', sans-serif;

  --transition-fast: var(--t-fast);
  --transition-base: var(--t-base);
  --transition-slow: var(--t-slow);
}

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

body {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink);
  background: var(--bg-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

/* Subtle mesh — matches public site blue wash */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 8% 12%, rgba(37, 99, 235, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 92% 88%, rgba(10, 15, 30, 0.04) 0%, transparent 45%);
  pointer-events: none;
  z-index: 0;
}

/* ===========================
   Layout Shell
   =========================== */
.shell {
  display: flex;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  width: 100%;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

/* ===========================
   App frame & sidebar
   =========================== */
.app-frame {
  flex: 1;
  min-width: 0;
  min-height: 0;
  width: calc(100% - var(--sidebar-width, 260px));
  margin-left: var(--sidebar-width, 260px);
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 15, 30, 0.45);
  z-index: 1999;
  opacity: 0;
  transition: opacity var(--t-base);
}

.sidebar-backdrop.visible {
  display: block;
  opacity: 1;
}

.mobile-bar {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--white);
  border-bottom: 1px solid var(--ink-200);
  position: sticky;
  top: 0;
  z-index: 100;
}

.mobile-bar-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink);
}

.sidebar-toggle {
  width: 40px;
  height: 40px;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-md);
  background: var(--white);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  cursor: pointer;
}

.sidebar {
  background: var(--sidebar-bg-start);
  color: var(--white);
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-width, 260px);
  z-index: 2000;
  overflow-y: auto;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 4px 0 24px rgba(10, 15, 30, 0.08);
}

.sidebar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 160px;
  background: radial-gradient(ellipse at 50% 0%, rgba(37, 99, 235, 0.14) 0%, transparent 70%);
  pointer-events: none;
}

/* Brand */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: background var(--t-fast);
}

.brand:hover {
  background: rgba(255, 255, 255, 0.06);
}

.brand-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 10px;
  background: var(--white);
  padding: 4px;
}

.brand-icon {
  width: 40px;
  height: 40px;
  background: var(--white);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--ink);
  flex-shrink: 0;
}

.brand-text { display: flex; flex-direction: column; }

.brand-name {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--white);
  line-height: 1.25;
}

.brand-sub {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Navigation */
.nav-links {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  position: relative;
  z-index: 1;
}

.nav-links a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  color: rgba(255, 255, 255, 0.58);
  text-decoration: none;
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 0.875rem;
  transition: background var(--t-fast), color var(--t-fast);
}

.nav-links a i {
  font-size: 1.1rem;
  width: 22px;
  text-align: center;
  transition: color var(--t-base);
  flex-shrink: 0;
}

.nav-links a:hover {
  color: var(--white);
  background: rgba(37, 99, 235, 0.14);
}

.nav-links a.active {
  color: var(--white);
  background: var(--blue);
  font-weight: 600;
}

.nav-links a.active i { color: var(--white); }

/* Sidebar Footer */
.sidebar-footer {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.07);
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.admin-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.04);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255,255,255,0.05);
}

.admin-avatar {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--blue), var(--blue-light));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.admin-details { display: flex; flex-direction: column; min-width: 0; }
.admin-name {
  font-weight: 700;
  font-size: .875rem;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-role { font-size: .7rem; color: rgba(255,255,255,.45); }

.logout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px;
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.18);
  border-radius: var(--radius-lg);
  color: #fca5a5;
  font-weight: 600;
  font-size: .875rem;
  cursor: pointer;
  transition: all var(--t-base);
  font-family: inherit;
}
.logout-btn:hover {
  background: rgba(239,68,68,0.18);
  border-color: rgba(239,68,68,0.38);
  transform: translateY(-2px);
}

/* ===========================
   Main Content
   =========================== */
.main {
  flex: 1;
  width: 100%;
  max-width: none;
  padding: 20px 32px 24px;
  margin-left: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 0;
  height: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.main > .page-header,
.main > .page-top,
.main > .metrics {
  flex-shrink: 0;
}

.main--overview {
  width: 100%;
}

.main--overview {
  gap: 1.25rem;
}

.main--overview > .page-top {
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--slate-200);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.main--settings .settings-layout {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.main--settings .settings-card {
  flex: 1;
  min-height: 0;
}

.main--settings .settings-card-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* ===========================
   Page Header
   =========================== */
.page-header {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 18px 24px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--slate-200);
  position: relative;
  overflow: hidden;
}
.page-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--blue);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.header-text h1 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 2px;
  letter-spacing: -.5px;
}
.header-text p { color: var(--slate-500); font-size: .8125rem; margin: 0; }

.header-actions { display: flex; align-items: center; gap: 12px; }

/* ===========================
   Overview page
   =========================== */
.page-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
  width: 100%;
}

.page-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 6px;
}

.page-top h1 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin: 0 0 6px;
  line-height: 1.15;
}

.page-lead {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--ink-400);
  max-width: 42ch;
}

.page-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-icon-soft {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-md);
  background: var(--white);
  color: var(--ink-400);
  cursor: pointer;
  transition: all var(--t-fast);
  font-size: 1.05rem;
}

.btn-icon-soft:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: var(--blue-50);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  width: 100%;
}

.metrics--catalog {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.overview-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem 2rem;
  width: 100%;
  padding: 1.35rem 1.5rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--blue-100);
  background: linear-gradient(135deg, var(--blue-50) 0%, var(--white) 55%, var(--white) 100%);
  box-shadow: var(--shadow-card);
}

.overview-summary__eyebrow {
  margin: 0 0 0.25rem;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue-dark);
}

.overview-summary__total {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 0.75rem;
}

.overview-summary__number {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--ink);
  line-height: 1;
}

.overview-summary__unit {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--slate-500);
}

.overview-summary__breakdown {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.overview-summary__breakdown li {
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-full);
  background: var(--white);
  border: 1px solid var(--slate-200);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--slate-600);
}

.overview-summary__breakdown li span {
  font-weight: 800;
  color: var(--ink);
}

.overview-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: 100%;
  padding: 1.35rem 1.5rem 1.5rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--slate-200);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.overview-panel__head {
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--slate-100);
}

.overview-panel__head h2 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--ink);
}

.overview-panel__head p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--slate-500);
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  width: 100%;
  flex: 1;
  align-content: start;
}

.catalog-tile {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.85rem;
  min-height: 88px;
  padding: 1rem 1.1rem 1rem 0;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  background: var(--slate-50);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: border-color var(--t-fast), background var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
}

.catalog-tile:hover {
  background: var(--white);
  border-color: var(--blue-100);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.catalog-tile--wide {
  grid-column: 1 / -1;
  min-height: 72px;
}

.catalog-tile__stripe {
  width: 4px;
  align-self: stretch;
  flex-shrink: 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-right: 0.35rem;
}

.catalog-tile--hotels .catalog-tile__stripe { background: var(--amber); }
.catalog-tile--flights .catalog-tile__stripe { background: var(--blue); }
.catalog-tile--groups .catalog-tile__stripe { background: #6366f1; }
.catalog-tile--transfers .catalog-tile__stripe { background: var(--green); }
.catalog-tile--packages .catalog-tile__stripe { background: #ec4899; }
.catalog-tile--settings .catalog-tile__stripe { background: var(--slate-400); }

.catalog-tile__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  background: var(--white);
  border: 1px solid var(--slate-200);
}

.catalog-tile--hotels .catalog-tile__icon { color: var(--amber); }
.catalog-tile--flights .catalog-tile__icon { color: var(--blue-dark); }
.catalog-tile--groups .catalog-tile__icon { color: #4f46e5; }
.catalog-tile--transfers .catalog-tile__icon { color: var(--green); }
.catalog-tile--packages .catalog-tile__icon { color: #db2777; }
.catalog-tile--settings .catalog-tile__icon { color: var(--slate-600); }

.catalog-tile__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.catalog-tile__name {
  font-size: 0.9375rem;
  font-weight: 800;
  color: var(--ink);
}

.catalog-tile__meta {
  font-size: 0.8125rem;
  color: var(--slate-500);
}

.catalog-tile__meta strong {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--ink);
  margin-right: 0.2rem;
}

.catalog-tile__go {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--blue);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity var(--t-fast), transform var(--t-fast);
}

.catalog-tile:hover .catalog-tile__go {
  opacity: 1;
  transform: translateX(0);
}

@media (min-width: 1100px) {
  .catalog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .catalog-tile--wide {
    grid-column: span 3;
  }
}

@media (max-width: 640px) {
  .overview-summary {
    flex-direction: column;
    align-items: flex-start;
  }

  .catalog-grid {
    grid-template-columns: 1fr;
  }

  .catalog-tile--wide {
    grid-column: auto;
  }

  .catalog-tile__go {
    opacity: 1;
    transform: none;
  }
}

.metric {
  background: var(--white);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

.metric:hover {
  border-color: var(--blue-100);
  box-shadow: var(--shadow-md);
}

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

.metric--inbox .metric-icon { background: var(--blue-muted); color: var(--blue); }
.metric--total .metric-icon { background: var(--green-muted); color: var(--green); }
.metric--hotels .metric-icon { background: rgba(217, 119, 6, 0.12); color: var(--amber); }
.metric--flights .metric-icon { background: var(--blue-50); color: var(--blue-dark); }

.metric-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-400);
  margin-bottom: 4px;
}

.metric-value {
  display: block;
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1.1;
}

.metric-hint {
  display: block;
  margin-top: 6px;
  font-size: 0.75rem;
  color: var(--ink-400);
}

.overview-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
  gap: 20px;
  align-items: stretch;
  width: 100%;
  min-height: 0;
}

.overview-layout .panel {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.overview-layout .panel-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.overview-layout .panel--table .panel-body {
  min-height: 0;
}

.panel {
  background: var(--white);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--ink-100);
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel-title i {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--blue-50);
  color: var(--blue);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
}

.panel-title h2 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}

.panel-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--blue);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  transition: background var(--t-fast);
}

.panel-link:hover {
  background: var(--blue-50);
}

.panel-body {
  padding: 0;
}

.panel--catalog .panel-body {
  padding: 16px 18px 18px;
}

.panel-desc {
  margin: 0 0 14px;
  font-size: 0.8125rem;
  color: var(--ink-400);
  line-height: 1.5;
}

.table-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.panel--table.is-empty .table-scroll {
  display: none;
}

.table-scroll .table thead th,
.table-wrapper .table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--slate-50);
  box-shadow: 0 1px 0 var(--slate-200);
}

.table-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 48px 24px;
  color: var(--ink-400);
}

.table-empty[hidden] {
  display: none !important;
}

.table-empty i {
  font-size: 2rem;
  color: var(--ink-200);
  margin-bottom: 12px;
}

.table-empty p {
  margin: 0 0 6px;
  font-size: 0.9375rem;
  color: var(--ink);
}

.table-empty span {
  font-size: 0.8125rem;
  max-width: 28ch;
}

.table--overview .cell-message {
  max-width: min(420px, 35vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shortcut-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.shortcut {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--ink-100);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  transition: border-color var(--t-fast), background var(--t-fast);
}

.shortcut:hover {
  border-color: var(--blue-100);
  background: var(--blue-50);
}

.shortcut-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--ink-50);
  color: var(--ink-500);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.shortcut:hover .shortcut-icon {
  background: var(--white);
  color: var(--blue);
}

.shortcut-text {
  flex: 1;
  min-width: 0;
}

.shortcut-label {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--ink);
}

.shortcut-meta {
  display: block;
  font-size: 0.75rem;
  color: var(--ink-400);
  margin-top: 2px;
}

.shortcut-arrow {
  color: var(--ink-200);
  font-size: 0.9rem;
  transition: transform var(--t-fast), color var(--t-fast);
}

.shortcut:hover .shortcut-arrow {
  color: var(--blue);
  transform: translateX(2px);
}

@media (max-width: 1100px) {
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-layout { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .metrics { grid-template-columns: 1fr; }
  .page-top h1 { font-size: 1.45rem; }
}

.date-display {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-full);
  color: var(--slate-600);
  font-weight: 600;
  font-size: .8125rem;
}
.date-display i { color: var(--blue); }

.btn-refresh {
  width: 42px; height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  color: var(--slate-500);
  cursor: pointer;
  transition: all var(--t-base);
  font-size: 1.05rem;
}
.btn-refresh:hover {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
  transform: rotate(180deg);
}

/* ===========================
   Stats Grid
   =========================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 16px;
  width: 100%;
}

@media (max-width: 1400px) { .stats-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 640px)  { .stats-grid { grid-template-columns: 1fr; } }

.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 20px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--slate-200);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  position: relative;
  overflow: hidden;
  transition: all var(--t-spring);
  min-height: 100px;
  cursor: default;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

/* Gradient top bars by type */
.stat-card.stat-primary::before   { background: linear-gradient(90deg, var(--blue), var(--blue-light)); }
.stat-card.stat-warning::before   { background: linear-gradient(90deg, #F59E0B, #FCD34D); }
.stat-card.stat-success::before   { background: linear-gradient(90deg, var(--green), #34D399); }
.stat-card.stat-info::before      { background: linear-gradient(90deg, var(--blue), #60A5FA); }
.stat-card.stat-purple::before    { background: linear-gradient(90deg, var(--purple), #A78BFA); }
.stat-card.stat-gold::before      { background: linear-gradient(90deg, var(--gold), var(--gold-light)); }

/* Background tint */
.stat-card::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 90px; height: 90px;
  border-radius: 50%;
  opacity: .06;
  transform: translate(30px,-30px);
  transition: all var(--t-slow);
}
.stat-card.stat-primary::after   { background: var(--blue); }
.stat-card.stat-warning::after   { background: var(--orange); }
.stat-card.stat-success::after   { background: var(--green); }
.stat-card.stat-info::after      { background: var(--blue); }
.stat-card.stat-purple::after    { background: var(--purple); }
.stat-card.stat-gold::after      { background: var(--gold); }

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.stat-card:hover::after { opacity: .08; }

/* Stat Icon */
.stat-icon {
  width: 46px; height: 46px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  transition: transform var(--t-spring);
}
.stat-card:hover .stat-icon { transform: scale(1.1) rotate(-5deg); }

.stat-primary .stat-icon { background: var(--blue-muted);   color: var(--blue); }
.stat-warning .stat-icon { background: var(--orange-muted); color: var(--orange); }
.stat-success .stat-icon { background: var(--green-muted);  color: var(--green); }
.stat-info    .stat-icon { background: var(--blue-muted);   color: var(--blue); }
.stat-purple  .stat-icon { background: var(--purple-muted); color: var(--purple); }
.stat-gold    .stat-icon { background: var(--gold-muted);   color: var(--gold-dark); }

.stat-content { display: flex; flex-direction: column; min-width: 0; }

.stat-label {
  font-size: .7rem;
  font-weight: 700;
  color: var(--slate-500);
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-bottom: 3px;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -.5px;
  line-height: 1.2;
  margin-bottom: 3px;
}

.stat-change {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: .7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}
.stat-change.positive { color: #059669; background: var(--green-muted); }
.stat-change.negative { color: #DC2626; background: var(--red-muted); }
.stat-change.neutral  { color: var(--slate-500); background: var(--slate-100); }

.stat-graph { width: 80px; height: 40px; flex-shrink: 0; }

/* ===========================
   Charts Row
   =========================== */
.charts-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  width: 100%;
}

@media (max-width: 1200px) { .charts-row { grid-template-columns: 1fr 1fr; } }
@media (max-width: 900px)  { .charts-row { grid-template-columns: 1fr; } }

.chart-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--slate-200);
  overflow: hidden;
  transition: box-shadow var(--t-base);
}
.chart-card:hover { box-shadow: var(--shadow-md); }

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 20px 22px 14px;
  border-bottom: 1px solid var(--slate-100);
}

.chart-title h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 2px;
}
.chart-title p { font-size: .78rem; color: var(--slate-500); margin: 0; }

.chart-actions {
  display: flex;
  gap: 3px;
  background: var(--slate-100);
  padding: 3px;
  border-radius: var(--radius-sm);
}

.chart-btn {
  padding: 6px 12px;
  border: none;
  background: transparent;
  color: var(--slate-500);
  font-weight: 600;
  font-size: .78rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--t-fast);
  font-family: inherit;
}
.chart-btn:hover { color: var(--ink); }
.chart-btn.active {
  background: var(--bg-card);
  color: var(--ink);
  box-shadow: var(--shadow-xs);
}

.chart-body { padding: 18px 20px 22px; height: 280px; }
.chart-large .chart-body { height: 300px; }

.chart-donut-wrapper {
  position: relative;
  height: 200px !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

.donut-center {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.donut-value {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -.5px;
}
.donut-label { font-size: .72rem; color: var(--slate-500); font-weight: 600; }

.chart-legend { padding: 0 22px 20px; display: grid; gap: 10px; }
.legend-item { display: flex; align-items: center; gap: 10px; }
.legend-color { width: 10px; height: 10px; border-radius: 3px; background: var(--color); }
.legend-label { flex: 1; font-size: .8125rem; color: var(--slate-600); }
.legend-value { font-weight: 700; color: var(--ink); font-size: .8125rem; }

/* ===========================
   Bottom Row
   =========================== */
.bottom-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  width: 100%;
}
@media (max-width: 1200px) { .bottom-row { grid-template-columns: 1fr 1fr; } }
@media (max-width: 900px)  { .bottom-row { grid-template-columns: 1fr; } }

/* ===========================
   Table Section
   =========================== */
.table-section {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--slate-200);
  overflow: hidden;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* Catalog / list pages: table card fills viewport below header */
.main:not(.main--overview):not(.main--settings) > .section.table-section,
.main:not(.main--overview):not(.main--settings) > .table-section {
  flex: 1;
  min-height: 0;
}

.section {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--slate-200);
  padding: 22px;
}

.section.table-section {
  padding: 0;
}

.table-section > .section-header {
  flex-shrink: 0;
}

.table-section > .empty {
  flex: 1;
  min-height: 160px;
}

.table-section > .table-wrapper {
  flex: 1;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.section > h2 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 18px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid var(--slate-100);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title i {
  width: 34px; height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--blue-muted);
  color: var(--blue);
  border-radius: var(--radius-md);
  font-size: .95rem;
}
.section-title h2 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}

.view-all-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--blue);
  text-decoration: none;
  font-weight: 600;
  font-size: .8125rem;
  padding: 7px 14px;
  border: 1px solid var(--blue-100);
  border-radius: var(--radius-full);
  background: var(--blue-50);
  transition: all var(--t-fast);
}
.view-all-btn:hover {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
  gap: 8px;
}

.table-wrapper {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

/* Standalone tables inside .section (e.g. group-programs) */
.section:not(.table-section) > .table-wrapper {
  max-height: calc(100vh - 220px);
  overflow: auto;
}

.section:not(.table-section) > .table {
  margin-top: 0;
}

.section:not(.table-section) > .table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--slate-50);
  box-shadow: 0 1px 0 var(--slate-200);
}

.table { width: 100%; border-collapse: collapse; }

.table th, .table td {
  padding: 13px 20px;
  text-align: left;
  white-space: nowrap;
}

.table th {
  background: var(--slate-50);
  font-size: .7rem;
  font-weight: 700;
  color: var(--slate-500);
  text-transform: uppercase;
  letter-spacing: .6px;
  border-bottom: 1px solid var(--slate-200);
}

.table td {
  font-size: .8125rem;
  color: var(--slate-700);
  border-bottom: 1px solid var(--slate-100);
}

.table tbody tr {
  transition: all var(--t-fast);
}
.table tbody tr:hover {
  background: var(--slate-50);
}
.table tbody tr:hover td { color: var(--ink); }
.table tbody tr:last-child td { border-bottom: none; }

/* Cell helpers */
.cell-hotel {
  display: flex;
  align-items: center;
  gap: 10px;
}
.cell-hotel-thumb {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--slate-100);
}
.cell-hotel-name { font-weight: 600; color: var(--ink); }
.cell-hotel-city { font-size: .72rem; color: var(--slate-500); }

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  color: var(--slate-400);
  text-align: center;
}
.empty i { font-size: 2.5rem; margin-bottom: 10px; }
.empty p { font-size: .875rem; margin: 0; }

/* ===========================
   Badges
   =========================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .3px;
}

.badge.paid,   .badge.success  { background: rgba(16,185,129,.1);  color: #059669; }
.badge.pending                 { background: rgba(245,158,11,.1);  color: #D97706; }
.badge.failed                  { background: rgba(239,68,68,.1);   color: #DC2626; }
.badge.active                  { background: rgba(59,130,246,.1);  color: #2563EB; }
.badge.inactive                { background: var(--slate-100);     color: var(--slate-500); }
.badge.gold                    { background: var(--gold-muted);    color: var(--gold-dark); }

/* ===========================
   Activity Feed
   =========================== */
.activity-feed {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--slate-200);
  overflow: hidden;
}

.activity-list { padding: 8px 0; }

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--slate-100);
  transition: background var(--t-fast);
}
.activity-item:last-child { border-bottom: none; }
.activity-item:hover { background: var(--slate-50); }

.activity-icon {
  width: 36px; height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .95rem;
  flex-shrink: 0;
}
.activity-icon.gold   { background: var(--gold-muted);   color: var(--gold-dark); }
.activity-icon.teal   { background: var(--teal-muted);   color: var(--teal); }
.activity-icon.blue   { background: var(--blue-muted);   color: var(--blue); }
.activity-icon.green  { background: var(--green-muted);  color: var(--green); }
.activity-icon.red    { background: var(--red-muted);    color: var(--red); }
.activity-icon.purple { background: var(--purple-muted); color: var(--purple); }

.activity-content { flex: 1; min-width: 0; }
.activity-title   { font-weight: 600; font-size: .875rem; color: var(--ink); margin-bottom: 2px; }
.activity-desc    { font-size: .78rem; color: var(--slate-500); }
.activity-time    { font-size: .72rem; color: var(--slate-400); white-space: nowrap; }

/* ===========================
   Filter / Toolbar
   =========================== */
.filter-section {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 18px 22px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--slate-200);
}

.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 0 14px;
  flex: 1;
  min-width: 260px;
  height: 42px;
  transition: all var(--t-fast);
}
.search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-muted);
  background: var(--white);
}
.search-box i { color: var(--slate-400); font-size: .95rem; }
.search-box .input {
  border: none;
  background: transparent;
  outline: none;
  font-family: inherit;
  font-size: .875rem;
  color: var(--ink);
  width: 100%;
}
.search-box .input::placeholder { color: var(--slate-400); }

.filter-select {
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--ink);
  font-family: inherit;
  font-size: .875rem;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  transition: all var(--t-fast);
}
.filter-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-muted); }

/* ===========================
   Primary Buttons
   =========================== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--blue);
  color: var(--white);
  border: none;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: .875rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--t-spring);
  box-shadow: var(--shadow-blue);
  position: relative;
  overflow: hidden;
}
.btn-primary::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.2), transparent);
  transition: left .5s ease;
}
.btn-primary:hover::before { left: 100%; }
.btn-primary:hover {
  background: var(--blue-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.38);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  background: var(--bg-card);
  color: var(--slate-700);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t-base);
}
.btn-secondary:hover {
  background: var(--slate-50);
  border-color: var(--slate-300);
  transform: translateY(-1px);
}

.btn-danger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  background: var(--red-muted);
  color: var(--red);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t-base);
}
.btn-danger:hover {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
  transform: translateY(-1px);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: .8125rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--t-base);
  white-space: nowrap;
}

.btn.primary {
  background: var(--blue);
  color: var(--white);
  box-shadow: var(--shadow-blue);
}

.btn.primary:hover {
  background: var(--blue-dark);
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.34);
}

.btn.ghost {
  background: var(--white);
  border-color: var(--slate-200);
  color: var(--slate-600);
}

.btn.ghost:hover {
  background: var(--slate-50);
  border-color: var(--slate-300);
  color: var(--ink);
}

.btn.secondary {
  background: var(--red-muted);
  border-color: rgba(239,68,68,.16);
  color: var(--red);
}

.btn.secondary:hover {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
}

/* Icon action buttons */
.btn-icon {
  width: 34px; height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--slate-200);
  background: var(--bg-card);
  color: var(--slate-500);
  cursor: pointer;
  transition: all var(--t-fast);
  font-size: .95rem;
}
.btn-icon:hover             { background: var(--slate-50); color: var(--ink); }
.btn-icon.edit:hover        { background: var(--blue-muted); color: var(--blue); border-color: rgba(59,130,246,.2); }
.btn-icon.delete:hover      { background: var(--red-muted); color: var(--red); border-color: rgba(239,68,68,.2); }
.btn-icon.view:hover        { background: var(--teal-muted); color: var(--teal); border-color: rgba(13,148,136,.2); }

/* ===========================
   Forms & Inputs
   =========================== */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label {
  font-size: .78rem;
  font-weight: 700;
  color: var(--slate-600);
  text-transform: uppercase;
  letter-spacing: .5px;
}
.form-input, .form-textarea, .form-select {
  padding: 10px 14px;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--ink);
  font-family: inherit;
  font-size: .875rem;
  outline: none;
  transition: all var(--t-base);
  width: 100%;
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-muted);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--slate-400); }
.form-textarea { resize: vertical; min-height: 110px; }

.form-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--slate-200);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.full-width {
  grid-column: 1 / -1;
}

.form-group label {
  font-size: .76rem;
  font-weight: 700;
  color: var(--slate-600);
  text-transform: uppercase;
  letter-spacing: .45px;
}

.form-group label:has(input[type="checkbox"]) {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  color: var(--slate-700);
  font-size: .8125rem;
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
}

.input,
.item-card input,
.item-card textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 13px;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  background: var(--white);
  color: var(--ink);
  font-family: inherit;
  font-size: .875rem;
  outline: none;
  transition: all var(--t-base);
}

.input:focus,
.item-card input:focus,
.item-card textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-muted);
}

.textarea,
.item-card textarea {
  min-height: 96px;
  resize: vertical;
  line-height: 1.5;
}

.input::placeholder {
  color: var(--slate-400);
}

input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--blue);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--slate-100);
}

/* ===========================
   Modal / Dialog
   =========================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7,9,15,.6);
  backdrop-filter: blur(6px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--t-base), visibility var(--t-base);
}

.modal-overlay.active,
.modal-overlay[style*="display: flex"] {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal-box,
.modal-container {
  background: var(--bg-card);
  border-radius: var(--radius-2xl);
  width: 100%;
  max-width: 760px;
  max-height: calc(100vh - 40px);
  box-shadow: var(--shadow-2xl);
  border: 1px solid var(--slate-200);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateY(14px) scale(.98);
  transition: transform var(--t-spring);
}

.modal-overlay.active .modal-box,
.modal-overlay.active .modal-container,
.modal-overlay[style*="display: flex"] .modal-box,
.modal-overlay[style*="display: flex"] .modal-container {
  transform: translateY(0) scale(1);
}

.modal-box::before,
.modal-container::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--blue-light));
}

.modal-head,
.modal-header {
  padding: 22px 24px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--slate-100);
}
.modal-head h3,
.modal-header h2 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--ink);
}

.modal-close {
  width: 34px;
  height: 34px;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--slate-500);
  font-family: inherit;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  transition: all var(--t-fast);
}

.modal-close:hover {
  background: var(--red-muted);
  border-color: rgba(239,68,68,.18);
  color: var(--red);
}

.catalog-modal {
  max-width: 720px;
}

.catalog-modal .modal-body {
  padding: 0 24px 20px;
  overflow-y: auto;
}

.catalog-modal .modal-form .form-grid {
  padding-top: 20px;
}

.modal-footer--inline {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--ink-100);
}

body.modal-open {
  overflow: hidden;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  white-space: nowrap;
}

.btn-sm {
  min-height: 32px;
  padding: 6px 12px;
  font-size: 0.75rem;
}

.section-header .btn.primary {
  flex-shrink: 0;
}

.modal-header,
.modal-head,
.modal-tabs,
.modal-footer,
.modal-foot {
  flex-shrink: 0;
}

.modal-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--slate-100);
  background: var(--slate-50);
  overflow-x: auto;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.25rem;
  padding: 0.35rem;
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
}

.admin-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 40px;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--slate-600);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast);
}

.admin-tab:hover {
  background: var(--white);
  color: var(--slate-800);
}

.admin-tab.active {
  background: var(--white);
  color: var(--blue);
  box-shadow: var(--shadow-sm);
}

.admin-tab .tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.35rem;
  margin-left: 0.15rem;
  border-radius: 999px;
  background: var(--slate-200);
  color: var(--slate-700);
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1;
}

.admin-tab.active .tab-badge {
  background: rgba(37, 99, 235, 0.12);
  color: var(--blue);
}

.group-tours-admin {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  gap: 0;
}

.group-tours-admin > .admin-tabs {
  flex-shrink: 0;
  margin-bottom: 0;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  border-bottom: none;
}

.admin-panel {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.admin-panel[hidden],
.admin-panel.is-hidden {
  display: none !important;
}

.admin-panel .panel-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem 0.75rem;
  border-bottom: 1px solid var(--slate-100);
}

.admin-panel .panel-toolbar .section-hint {
  flex: 1;
  min-width: 200px;
  margin: 0;
}

.admin-panel .panel-toolbar .btn.primary {
  flex-shrink: 0;
}

.main--group-tours > .page-header {
  margin-bottom: 1rem;
}

.main--group-tours > .group-tours-admin {
  flex: 1;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

.main--group-tours .admin-panel.section.table-section {
  border: none;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  box-shadow: none;
}

.section-hint,
.form-hint {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  color: var(--slate-500);
  line-height: 1.5;
}

.section-hint--below-header {
  margin: -0.5rem 1.25rem 1rem;
  padding: 0;
}

.modal-container--wide {
  max-width: min(920px, calc(100vw - 2rem));
  width: 100%;
}

.inline-list-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  align-items: end;
}

.inclusions-intro {
  margin: 0 0 1.25rem;
}

.inclusions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  align-items: start;
}

.inclusion-panel {
  display: flex;
  flex-direction: column;
  min-height: 220px;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  background: var(--slate-50);
  overflow: hidden;
}

.inclusion-panel--included {
  border-top: 3px solid #16a34a;
}

.inclusion-panel--excluded {
  border-top: 3px solid #dc2626;
}

.inclusion-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: var(--white);
  border-bottom: 1px solid var(--slate-100);
}

.inclusion-panel__title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.inclusion-panel__title h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 800;
  color: var(--ink);
}

.inclusion-panel--included .inclusion-panel__title i {
  color: #16a34a;
}

.inclusion-panel--excluded .inclusion-panel__title i {
  color: #dc2626;
}

.inclusion-panel__header .btn.small {
  flex-shrink: 0;
}

.inclusion-rows {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.75rem;
  flex: 1;
}

.inclusion-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  padding: 1rem 1.25rem;
  margin: 0.75rem;
  border: 1px dashed var(--slate-300);
  border-radius: var(--radius-md);
  background: var(--white);
  color: var(--slate-500);
  font-size: 0.8125rem;
  line-height: 1.5;
  text-align: center;
}

.inclusion-row {
  display: grid;
  grid-template-columns: 1.75rem 1fr 2.25rem;
  gap: 0.5rem;
  align-items: center;
  padding: 0.35rem 0.5rem 0.35rem 0.35rem;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  background: var(--white);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

.inclusion-row:focus-within {
  border-color: var(--blue-100);
  box-shadow: 0 0 0 3px var(--primary-muted);
}

.inclusion-row__index {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: var(--radius-sm);
  background: var(--slate-100);
  color: var(--slate-600);
  font-size: 0.6875rem;
  font-weight: 800;
}

.inclusion-row--included .inclusion-row__index {
  background: rgba(22, 163, 74, 0.1);
  color: #15803d;
}

.inclusion-row--excluded .inclusion-row__index {
  background: rgba(220, 38, 38, 0.08);
  color: #b91c1c;
}

.inclusion-row__input {
  width: 100%;
  min-height: 38px;
  padding: 0.4rem 0.55rem;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.875rem;
  line-height: 1.4;
}

.inclusion-row__input::placeholder {
  color: var(--slate-400);
}

.inclusion-row__input:focus {
  outline: none;
}

.inclusion-row__remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--slate-400);
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast);
}

.inclusion-row__remove:hover {
  background: var(--red-muted);
  color: var(--red);
}

.inclusion-row__remove:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

@media (max-width: 768px) {
  .inclusions-grid {
    grid-template-columns: 1fr;
  }
}

.tab-btn {
  min-height: 36px;
  padding: 8px 13px;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--slate-600);
  font-family: inherit;
  font-size: .8125rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--t-fast);
}

.tab-btn:hover {
  border-color: var(--blue-100);
  background: var(--blue-50);
  color: var(--blue);
}

.tab-btn.active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--white);
  box-shadow: var(--shadow-xs);
}

.modal-body {
  flex: 1;
  min-height: 0;
  padding: 22px 24px;
  overflow-y: auto;
  overflow-x: hidden;
}

.modal-form {
  display: block;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.tab-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.tab-header h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  color: var(--ink);
}

.btn.small {
  min-height: 34px;
  padding: 8px 14px;
}

.items-list {
  display: grid;
  gap: 14px;
}

.item-card,
.translation-card,
.empty-state {
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-xs);
}

.empty-state {
  padding: 28px;
  color: var(--slate-500);
  text-align: center;
}

.item-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--slate-100);
  background: var(--slate-50);
}

.item-card-title,
.item-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.day-badge,
.lang-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: var(--radius-full);
  background: var(--blue-50);
  color: var(--blue);
  font-size: .75rem;
  font-weight: 800;
}

.delete-btn {
  min-height: 30px;
  padding: 7px 11px;
  border: 1px solid rgba(239,68,68,.18);
  border-radius: var(--radius-sm);
  background: var(--red-muted);
  color: var(--red);
  font-family: inherit;
  font-size: .75rem;
  font-weight: 800;
  cursor: pointer;
  transition: all var(--t-fast);
}

.delete-btn:hover {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
}

.item-card-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 16px;
}

.item-card-footer {
  padding: 12px 16px 16px;
  border-top: 1px solid var(--slate-100);
}

.translations-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.translation-card {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.translation-header {
  padding-bottom: 4px;
}

.modal-foot,
.modal-footer {
  padding: 16px 24px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--slate-100);
  background: var(--white);
  box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.06);
  z-index: 2;
}

/* Confirm dialog */
.confirm-dialog {
  max-width: 400px;
  text-align: center;
}
.confirm-icon {
  width: 64px; height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
}
.confirm-icon.danger { background: var(--red-muted); color: var(--red); }
.confirm-icon.warn   { background: var(--orange-muted); color: var(--orange); }
.confirm-title { font-family: var(--font-display); font-size: 1.2rem; font-weight: 800; color: var(--ink); margin-bottom: 8px; }
.confirm-text  { font-size: .875rem; color: var(--slate-500); line-height: 1.6; }

/* ===========================
   Login Page (light theme)
   =========================== */
.login-page {
  background: var(--bg-primary);
  color: var(--ink);
}

.login-page::before {
  display: none;
}

.login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 75% 55% at 12% 18%, rgba(37, 99, 235, 0.08) 0%, transparent 55%),
    radial-gradient(ellipse 55% 50% at 90% 82%, rgba(10, 15, 30, 0.04) 0%, transparent 50%),
    linear-gradient(165deg, var(--white) 0%, var(--bg-primary) 45%, var(--ink-100) 100%);
}

.login-shell::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.045) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, black 15%, transparent 78%);
  pointer-events: none;
}

.login-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  padding: 40px 40px 32px;
  border-radius: var(--radius-2xl);
  background: var(--white);
  border: 1px solid var(--slate-200);
  box-shadow:
    var(--shadow-lg),
    0 0 0 1px rgba(255, 255, 255, 0.8) inset,
    0 24px 48px rgba(15, 23, 42, 0.06);
  animation: login-card-in 0.55s var(--t-spring) both;
}

@keyframes login-card-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 2px;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, transparent, var(--blue), var(--blue-light), transparent);
}

.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
  text-align: center;
}

.login-logo {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.85rem;
  color: var(--white);
  background: linear-gradient(145deg, var(--blue-light) 0%, var(--blue) 55%, var(--blue-dark) 100%);
  box-shadow:
    0 10px 28px rgba(37, 99, 235, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.35) inset;
}

.login-brand-name {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1.2;
}

.login-sub {
  margin-top: 4px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--slate-500);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.login-intro {
  margin-bottom: 28px;
  text-align: center;
}

.login-heading {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.login-desc {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--slate-500);
  max-width: 32ch;
  margin-inline: auto;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.login-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate-600);
}

.login-label i {
  font-size: 0.85rem;
  color: var(--blue);
}

.login-password-wrap {
  position: relative;
}

.login-input {
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  padding-right: 44px;
  border-radius: var(--radius-md);
  border: 1px solid var(--slate-200);
  background: var(--white);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.9375rem;
  outline: none;
  transition: border-color var(--t-base), box-shadow var(--t-base), background var(--t-base);
}

.login-field:not(:has(.login-password-wrap)) .login-input {
  padding-right: 16px;
}

.login-input::placeholder {
  color: var(--slate-400);
}

.login-input:hover {
  border-color: var(--slate-300);
  background: var(--slate-50);
}

.login-input:focus {
  border-color: var(--blue);
  background: var(--white);
  box-shadow: 0 0 0 3px var(--blue-muted);
}

.login-toggle-pw {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--slate-400);
  cursor: pointer;
  transition: color var(--t-fast), background var(--t-fast);
}

.login-toggle-pw:hover {
  color: var(--blue);
  background: var(--blue-muted);
}

.login-error {
  margin: -4px 0 0;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.45;
  color: #b91c1c;
  background: var(--red-muted);
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.login-error:empty,
.login-error[hidden] {
  display: none;
}

.login-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 50px;
  margin-top: 4px;
  padding: 14px 20px;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--white);
  cursor: pointer;
  background: var(--blue);
  box-shadow: var(--shadow-blue);
  transition: transform var(--t-spring), box-shadow var(--t-spring), background var(--t-base);
}

.login-btn span {
  flex: 0 0 auto;
}

.login-btn i {
  font-size: 1.1rem;
  transition: transform var(--t-base);
}

.login-btn:hover {
  background: var(--blue-dark);
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(37, 99, 235, 0.38);
}

.login-btn:hover i {
  transform: translateX(3px);
}

.login-btn:active {
  transform: translateY(0);
}

.login-footer {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--slate-100);
  text-align: center;
}

.login-footer p {
  font-size: 0.75rem;
  color: var(--slate-400);
}

@media (max-width: 480px) {
  .login-card {
    padding: 32px 24px 24px;
  }

  .login-brand-name {
    font-size: 1.45rem;
  }
}

/* ===========================
   Settings Page
   =========================== */
.main--settings {
  width: 100%;
  max-width: none;
}

.settings-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  width: 100%;
}

.settings-card {
  background: var(--white);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.settings-card--wide {
  grid-column: 1 / -1;
}

.settings-card-head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--ink-100);
  background: linear-gradient(180deg, var(--ink-50) 0%, var(--white) 100%);
}

.settings-card-title {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.settings-card-title > i {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--blue-muted);
  color: var(--blue);
  font-size: 1.1rem;
}

.settings-card-title h2 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 4px;
  line-height: 1.3;
}

.settings-card-title p {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--ink-400);
  line-height: 1.45;
  max-width: 40ch;
}

.settings-card-body {
  padding: 20px 22px 22px;
  flex: 1;
}

.settings-limit-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.settings-limit-form .form-group {
  margin: 0;
}

.settings-limit-form .input {
  max-width: 100%;
}

.settings-limit-form .btn {
  align-self: flex-start;
}

.section-description {
  margin: -8px 0 16px;
  font-size: 0.8125rem;
  color: var(--ink-400);
  line-height: 1.5;
}

/* Toggle list & rows */
.toggle-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toggle-list--grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  background: var(--ink-50);
  border: 1px solid var(--ink-100);
  border-radius: var(--radius-md);
  transition: border-color var(--t-fast), background var(--t-fast);
}

.toggle-row:hover {
  border-color: var(--blue-100);
  background: var(--white);
}

.toggle-row span {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
}

/* iOS-style switch */
.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 28px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.switch .slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--ink-200);
  border-radius: var(--radius-full);
  transition: background var(--t-fast);
}

.switch .slider::before {
  content: "";
  position: absolute;
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background: var(--white);
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(10, 15, 30, 0.2);
  transition: transform var(--t-fast);
}

.switch input:checked + .slider {
  background: var(--blue);
}

.switch input:focus-visible + .slider {
  box-shadow: 0 0 0 3px var(--blue-muted);
}

.switch input:checked + .slider::before {
  transform: translateX(20px);
}

.switch input:disabled + .slider {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (max-width: 900px) {
  .settings-layout {
    grid-template-columns: 1fr;
  }

  .settings-card--wide {
    grid-column: auto;
  }

  .toggle-list--grid {
    grid-template-columns: 1fr;
  }
}

/* Legacy settings nav (if used elsewhere) */
.settings-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
}

.settings-nav {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 16px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--slate-200);
  height: fit-content;
  position: sticky;
  top: 20px;
}

.settings-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  color: var(--slate-600);
  font-weight: 500;
  font-size: .875rem;
  cursor: pointer;
  transition: all var(--t-fast);
  text-decoration: none;
}
.settings-nav-item:hover { background: var(--slate-50); color: var(--ink); }
.settings-nav-item.active {
  background: var(--blue-muted);
  color: var(--blue);
  font-weight: 700;
}
.settings-nav-item i { width: 20px; text-align: center; font-size: 1.05rem; }

/* ===========================
   Catalog / Preview cards
   =========================== */
.catalog-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--slate-200);
  transition: all var(--t-spring);
  display: flex;
  flex-direction: column;
  height: 100%;
}
.catalog-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--blue-100);
}

.catalog-card-img {
  height: 180px;
  position: relative;
  overflow: hidden;
}
.catalog-card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--t-spring);
}
.catalog-card:hover .catalog-card-img img { transform: scale(1.08); }
.catalog-card-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.5) 100%);
}

.catalog-card-body {
  padding: 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.catalog-card-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}
.catalog-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: .78rem;
  color: var(--slate-500);
}
.catalog-card-price {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--gold-dark);
  margin-top: auto;
}

/* ===========================
   Scrollbar
   =========================== */
::-webkit-scrollbar       { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--slate-100); }
::-webkit-scrollbar-thumb { background: var(--slate-300); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--blue); }

/* ===========================
   Responsive
   =========================== */
@media (max-width: 900px) {
  .mobile-bar { display: flex; flex-shrink: 0; }

  .sidebar {
    transform: translateX(-100%);
    transition: transform var(--t-base);
  }

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

  .app-frame {
    margin-left: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
  }

  .shell {
    height: 100vh;
    height: 100dvh;
  }

  .main {
    margin-left: 0;
    width: 100%;
    max-width: none;
    padding: 16px 16px 20px;
    min-height: 0;
    height: auto;
    flex: 1;
    overflow: hidden;
  }

  .catalog-grid {
    grid-template-columns: 1fr;
  }

  body.nav-open { overflow: hidden; }

  .form-grid, .form-row, .item-card-body, .translations-grid { grid-template-columns: 1fr; }
  .form-actions, .modal-footer { flex-direction: column-reverse; }
  .form-actions .btn, .modal-footer .btn { width: 100%; }
  .modal-container { max-height: calc(100vh - 24px); }
}

/* ===========================
   Toast notifications
   =========================== */
#toast-root {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: min(400px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 44px 16px 16px;
  border-radius: var(--radius-lg);
  background: var(--white);
  border: 1px solid var(--ink-200);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  pointer-events: auto;
  opacity: 0;
  transform: translateX(24px) scale(0.96);
  transition:
    opacity var(--t-base),
    transform var(--t-spring);
}

.toast--visible {
  opacity: 1;
  transform: translateX(0) scale(1);
}

.toast--leaving {
  opacity: 0;
  transform: translateX(16px) scale(0.98);
}

.toast--success {
  border-color: rgba(16, 185, 129, 0.35);
  background: linear-gradient(135deg, #f0fdf4 0%, var(--white) 55%);
}

.toast--error {
  border-color: rgba(239, 68, 68, 0.35);
  background: linear-gradient(135deg, #fef2f2 0%, var(--white) 55%);
}

.toast--info {
  border-color: rgba(37, 99, 235, 0.3);
  background: linear-gradient(135deg, var(--blue-50) 0%, var(--white) 55%);
}

.toast-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.toast--success .toast-icon {
  background: var(--green-muted);
  color: var(--green);
}

.toast--error .toast-icon {
  background: var(--red-muted);
  color: var(--red);
}

.toast--info .toast-icon {
  background: var(--blue-muted);
  color: var(--blue);
}

.toast-body {
  flex: 1;
  min-width: 0;
  padding-top: 2px;
}

.toast-title {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
}

.toast-message {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--ink-500);
  line-height: 1.45;
}

.toast-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink-400);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  transition: background var(--t-fast), color var(--t-fast);
}

.toast-close:hover {
  background: rgba(10, 15, 30, 0.06);
  color: var(--ink);
}

.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 100%;
  background: currentColor;
  opacity: 0.35;
  transform-origin: left;
  animation: toast-progress 4.2s linear forwards;
}

.toast--success .toast-progress { color: var(--green); }
.toast--error .toast-progress { color: var(--red); animation-duration: 5s; }
.toast--info .toast-progress { color: var(--blue); }

@keyframes toast-progress {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

@media (max-width: 480px) {
  #toast-root {
    top: auto;
    bottom: 16px;
    right: 16px;
    left: 16px;
    max-width: none;
  }

  .toast {
    transform: translateY(16px) scale(0.96);
  }

  .toast--visible {
    transform: translateY(0) scale(1);
  }
}

/* ===========================
   Utility
   =========================== */
.text-gold { color: var(--gold-dark); }
.bg-gold-muted { background: var(--gold-muted); }
.border-gold { border-color: var(--gold-border) !important; }
.gap-grid { display: grid; gap: 16px; }

/* Prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
