/* ============================================================
   SissokResto — Complete POC Stylesheet
   Static HTML proof-of-concept — pure CSS, no frameworks
   ============================================================ */

/* ==========================================================
   0. GOOGLE FONTS IMPORT
   ========================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400&family=JetBrains+Mono:wght@400;500&display=swap');

/* ==========================================================
   1. DESIGN TOKENS
   ========================================================== */
:root {
  /* Colors — Brand */
  --primary: #1B2A4A;
  --primary-hover: #243656;
  --primary-light: #E8EDF5;
  --accent: #C9A96E;
  --accent-hover: #B8985D;
  --accent-light: #F5EFE3;

  /* Colors — Surfaces */
  --bg: #FAF8F5;
  --bg-dark: #1A1A1A;
  --surface: #FFFFFF;
  --surface-hover: #F7F5F2;
  --border: #E8E4DF;
  --border-focus: #C9A96E;

  /* Colors — Text */
  --text: #1A1A1A;
  --text-secondary: #6B6560;
  --text-muted: #9B9590;
  --text-inverse: #FFFFFF;

  /* Colors — Semantic */
  --success: #16A34A;
  --success-light: #DCFCE7;
  --warning: #F59E0B;
  --warning-light: #FEF3C7;
  --error: #DC2626;
  --error-light: #FEE2E2;
  --info: #2563EB;
  --info-light: #DBEAFE;

  /* Typography */
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-pill: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(26, 26, 26, 0.05);
  --shadow-md: 0 4px 12px rgba(26, 26, 26, 0.08);
  --shadow-lg: 0 8px 24px rgba(26, 26, 26, 0.12);
  --shadow-xl: 0 16px 48px rgba(26, 26, 26, 0.16);

  /* Spacing scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;

  /* Z-index layers */
  --z-base: 1;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-modal: 500;
  --z-toast: 600;
  --z-tooltip: 700;

  /* Sidebar */
  --sidebar-width: 240px;
  --sidebar-collapsed: 64px;
  --topnav-height: 72px;
}

/* ==========================================================
   2. RESET & BASE
   ========================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

img,
video,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
  border: none;
  background: none;
  outline: none;
}

button {
  cursor: pointer;
}

ul, ol {
  list-style: none;
}

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

::selection {
  background: var(--accent-light);
  color: var(--primary);
}

/* ==========================================================
   3. TYPOGRAPHY
   ========================================================== */
.display {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text);
}

h1, .h1 {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--text);
}

h2, .h2 {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--text);
}

h3, .h3 {
  font-family: var(--font-heading);
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
}

h4, .h4 {
  font-family: var(--font-body);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
}

.body-lg {
  font-size: 1.0625rem;
  line-height: 1.65;
}

.body-sm {
  font-size: 0.8125rem;
  line-height: 1.5;
}

.caption {
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--text-secondary);
}

.tiny {
  font-size: 0.6875rem;
  line-height: 1.3;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.font-heading {
  font-family: var(--font-heading);
}

.font-mono {
  font-family: var(--font-mono);
}

.text-secondary {
  color: var(--text-secondary);
}

.text-muted {
  color: var(--text-muted);
}

.text-accent {
  color: var(--accent);
}

.text-success {
  color: var(--success);
}

.text-error {
  color: var(--error);
}

.text-inverse {
  color: var(--text-inverse);
}

/* ==========================================================
   4. LAYOUT — DASHBOARD (Sidebar + Main)
   ========================================================== */
.app-layout {
  display: flex;
  min-height: 100vh;
}

.app-layout .main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: var(--space-8);
  min-width: 0;
  transition: margin-left var(--transition-base);
}

.app-layout.sidebar-collapsed .main-content {
  margin-left: var(--sidebar-collapsed);
}

/* Content area */
.content-area {
  max-width: 1200px;
  margin: 0 auto;
}

.content-area-wide {
  max-width: 1440px;
  margin: 0 auto;
}

/* Page header */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-8);
  flex-wrap: wrap;
  gap: var(--space-4);
}

.page-header h1 {
  margin: 0;
}

.page-header-subtitle {
  color: var(--text-secondary);
  margin-top: var(--space-1);
  font-size: 0.9375rem;
}

.page-header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* ==========================================================
   5. LAYOUT — PUBLIC (Top Nav)
   ========================================================== */
.public-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.public-layout .main-content {
  flex: 1;
}

/* ==========================================================
   6. SIDEBAR (Dashboard)
   ========================================================== */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--primary);
  color: var(--text-inverse);
  display: flex;
  flex-direction: column;
  z-index: var(--z-sticky);
  transition: width var(--transition-base);
  overflow: hidden;
}

.sidebar-collapsed .sidebar {
  width: var(--sidebar-collapsed);
}

/* Sidebar logo */
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-6) var(--space-5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.sidebar-logo-icon {
  width: 32px;
  height: 32px;
  background: var(--accent);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.sidebar-logo-text {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: 1;
  transition: opacity var(--transition-fast);
}

.sidebar-collapsed .sidebar-logo-text {
  opacity: 0;
  pointer-events: none;
}

/* Sidebar toggle */
.sidebar-toggle {
  position: absolute;
  top: 26px;
  right: -12px;
  width: 24px;
  height: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  box-shadow: var(--shadow-sm);
  color: var(--text-secondary);
  font-size: 0.75rem;
  transition: background var(--transition-fast);
}

.sidebar-toggle:hover {
  background: var(--surface-hover);
}

/* Sidebar navigation */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-4) 0;
}

.sidebar-section-label {
  padding: var(--space-4) var(--space-5) var(--space-2);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.4);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
}

.sidebar-collapsed .sidebar-section-label {
  text-align: center;
  font-size: 0;
  padding: var(--space-3) var(--space-2);
}

.sidebar-collapsed .sidebar-section-label::before {
  content: '—';
  font-size: 0.625rem;
  color: rgba(255, 255, 255, 0.2);
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.875rem;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: all var(--transition-fast);
  white-space: nowrap;
  cursor: pointer;
}

.sidebar-nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.9);
}

.sidebar-nav-item.active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-inverse);
  border-left-color: var(--accent);
}

.sidebar-nav-item .nav-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
}

.sidebar-nav-item .nav-label {
  opacity: 1;
  transition: opacity var(--transition-fast);
}

.sidebar-nav-item .nav-label-short {
  display: none;
}

.sidebar-collapsed .sidebar-nav-item {
  justify-content: center;
  padding: var(--space-3);
  border-left-width: 0;
}

.sidebar-collapsed .sidebar-nav-item.active {
  border-left-width: 0;
  background: rgba(201, 169, 110, 0.15);
}

.sidebar-collapsed .sidebar-nav-item .nav-label {
  opacity: 0;
  width: 0;
  pointer-events: none;
}

.sidebar-nav-item .nav-badge {
  margin-left: auto;
  background: var(--error);
  color: var(--text-inverse);
  font-size: 0.6875rem;
  font-weight: 600;
  min-width: 18px;
  height: 18px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

.sidebar-collapsed .sidebar-nav-item .nav-badge {
  display: none;
}

/* Sidebar footer */
/* Sidebar footer */
.sidebar-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: var(--space-4) var(--space-5);
  flex-shrink: 0;
  transition: padding var(--transition-base);
}

/* Sidebar user profile — expanded state */
.sidebar-user {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.04);
  transition: all var(--transition-base);
}

.sidebar-user:hover {
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-user .avatar-sm {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(201, 169, 110, 0.25), rgba(201, 169, 110, 0.1));
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.8125rem;
  flex-shrink: 0;
  border: 1.5px solid rgba(201, 169, 110, 0.35);
  transition: all var(--transition-base);
}

.sidebar-user-name {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.3;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px var(--space-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.role-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 9999px;
  font-size: 0.5625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.role-badge.admin {
  background: rgba(201, 169, 110, 0.15);
  color: var(--accent);
  border: 1px solid rgba(201, 169, 110, 0.25);
}

.sidebar-footer .btn-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.6875rem;
  padding: 0;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.sidebar-footer .btn-link:hover {
  color: rgba(255, 255, 255, 0.8);
}

/* Logout icon — only visible when collapsed */
.sidebar-logout-icon {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

/* ── Collapsed sidebar footer ── */
.sidebar-collapsed .sidebar-footer {
  padding: var(--space-3) var(--space-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
}

.sidebar-collapsed .sidebar-user {
  flex-direction: column;
  padding: var(--space-2);
  background: transparent;
  gap: 0;
}

.sidebar-collapsed .sidebar-user:hover {
  background: transparent;
}

.sidebar-collapsed .sidebar-user .avatar-sm {
  width: 32px;
  height: 32px;
  font-size: 0.75rem;
}

.sidebar-collapsed .sidebar-user .sidebar-label {
  display: none;
}

.sidebar-collapsed .sidebar-logout-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.04);
}

.sidebar-collapsed .sidebar-logout-icon:hover {
  color: var(--accent);
  background: rgba(201, 169, 110, 0.1);
}

.sidebar-collapsed .sidebar-logout-icon i {
  width: 16px;
  height: 16px;
}

/* ==========================================================
   7. TOP NAV (Public)
   ========================================================== */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--topnav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-8);
  z-index: var(--z-sticky);
  transition: background var(--transition-base), box-shadow var(--transition-base);
}

.top-nav.transparent {
  background: transparent;
  color: var(--text-inverse);
}

.top-nav.scrolled {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.top-nav-brand {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
}

.top-nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.top-nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  opacity: 0.85;
  transition: opacity var(--transition-fast);
}

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

.top-nav-link.active {
  opacity: 1;
  font-weight: 600;
}

.top-nav-cta {
  background: var(--accent);
  color: var(--text-inverse);
  padding: var(--space-2) var(--space-6);
  border-radius: var(--radius-pill);
  font-size: 0.875rem;
  font-weight: 600;
  transition: background var(--transition-fast);
}

.top-nav-cta:hover {
  background: var(--accent-hover);
}

.top-nav-right {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.top-nav-mobile-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
}

/* ==========================================================
   8. BUTTONS
   ========================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-pill);
  transition: all var(--transition-fast);
  white-space: nowrap;
  cursor: pointer;
  line-height: 1.4;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Primary — Gold */
.btn-primary {
  background: var(--accent);
  color: var(--text-inverse);
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
  box-shadow: 0 4px 12px rgba(201, 169, 110, 0.35);
}

/* Primary Dark — Navy */
.btn-primary-dark {
  background: var(--primary);
  color: var(--text-inverse);
}

.btn-primary-dark:hover:not(:disabled) {
  background: var(--primary-hover);
  box-shadow: 0 4px 12px rgba(27, 42, 74, 0.3);
}

/* Secondary — Outlined */
.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}

.btn-secondary:hover:not(:disabled) {
  border-color: var(--text-secondary);
  background: var(--surface-hover);
}

/* Ghost */
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--surface-hover);
  color: var(--text);
}

/* Danger */
.btn-danger {
  background: var(--error);
  color: var(--text-inverse);
}

.btn-danger:hover:not(:disabled) {
  background: #B91C1C;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

/* Small */
.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: 0.8125rem;
}

/* Icon button */
.btn-icon {
  padding: var(--space-2);
  border-radius: var(--radius-md);
  width: 36px;
  height: 36px;
}

.btn-icon.btn-sm {
  width: 28px;
  height: 28px;
  font-size: 0.8125rem;
}

/* ==========================================================
   9. CARDS
   ========================================================== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-clickable:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  cursor: pointer;
}

.card-header {
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-header h3,
.card-header h4 {
  margin: 0;
}

.card-body {
  padding: var(--space-6);
}

.card-footer {
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-3);
}

.card-body + .card-body {
  border-top: 1px solid var(--border);
}

/* ==========================================================
   10. KPI CARDS
   ========================================================== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-6);
}

.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.kpi-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kpi-card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
}

.kpi-card-icon.primary {
  background: var(--primary-light);
  color: var(--primary);
}

.kpi-card-icon.accent {
  background: var(--accent-light);
  color: var(--accent);
}

.kpi-card-icon.success {
  background: var(--success-light);
  color: var(--success);
}

.kpi-card-icon.warning {
  background: var(--warning-light);
  color: var(--warning);
}

.kpi-card-icon.error {
  background: var(--error-light);
  color: var(--error);
}

.kpi-card-value {
  font-size: 1.875rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--text);
}

.kpi-card-label {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.kpi-card-trend {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: 0.8125rem;
  font-weight: 600;
}

.kpi-card-trend.up {
  color: var(--success);
}

.kpi-card-trend.down {
  color: var(--error);
}

.kpi-card-trend.neutral {
  color: var(--text-muted);
}

/* ==========================================================
   11. DATA TABLES
   ========================================================== */
.data-table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.data-table thead {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.data-table th {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  white-space: nowrap;
  cursor: default;
}

.data-table th.sortable {
  cursor: pointer;
  user-select: none;
}

.data-table th.sortable:hover {
  color: var(--text);
}

.data-table th.sortable::after {
  content: '⇅';
  margin-left: var(--space-1);
  opacity: 0.3;
  font-size: 0.7rem;
}

.data-table th.sort-asc::after {
  content: '↑';
  opacity: 1;
  color: var(--accent);
}

.data-table th.sort-desc::after {
  content: '↓';
  opacity: 1;
  color: var(--accent);
}

.data-table td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr:hover {
  background: var(--surface-hover);
}

.data-table .cell-primary {
  font-weight: 600;
  color: var(--text);
}

.data-table .cell-secondary {
  color: var(--text-secondary);
  font-size: 0.8125rem;
}

.table-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.table-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.table-pagination-buttons {
  display: flex;
  gap: var(--space-2);
}

/* ==========================================================
   12. FORMS
   ========================================================== */
.form-group {
  margin-bottom: var(--space-5);
}

.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--space-2);
}

.form-label .required {
  color: var(--error);
  margin-left: 2px;
}

.form-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: var(--space-1);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-size: 0.9375rem;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.15);
}

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

.form-input.error,
.form-select.error,
.form-textarea.error {
  border-color: var(--error);
}

.form-input.error:focus,
.form-select.error:focus,
.form-textarea.error:focus {
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B6560' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-4) center;
  padding-right: var(--space-10);
}

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

.form-error {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: 0.75rem;
  color: var(--error);
  margin-top: var(--space-1);
}

/* Checkbox & Radio */
.form-checkbox,
.form-radio {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  cursor: pointer;
  font-size: 0.875rem;
}

.form-checkbox input,
.form-radio input {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.form-checkbox input {
  border-radius: var(--radius-sm);
}

.form-radio input {
  border-radius: 50%;
}

.form-checkbox input:checked {
  background: var(--accent);
  border-color: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='white' d='M10 3L4.5 8.5 2 6'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
}

.form-radio input:checked {
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: inset 0 0 0 3px var(--accent);
}

.form-checkbox input:focus,
.form-radio input:focus {
  box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.15);
}

/* Form row — multi-column */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
}

.form-row-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

/* Toggle switch */
.form-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  cursor: pointer;
}

.form-toggle input {
  appearance: none;
  width: 44px;
  height: 24px;
  background: var(--border);
  border-radius: var(--radius-pill);
  transition: background var(--transition-fast);
  cursor: pointer;
}

.form-toggle input::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  background: var(--surface);
  border-radius: 50%;
  top: 3px;
  left: 3px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast);
}

.form-toggle input:checked {
  background: var(--accent);
}

.form-toggle input:checked::after {
  transform: translateX(20px);
}

/* ==========================================================
   13. MODALS
   ========================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 26, 26, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-base), visibility var(--transition-base);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  width: 90%;
  max-width: 520px;
  max-height: 85vh;
  overflow-y: auto;
  transform: scale(0.95) translateY(10px);
  transition: transform var(--transition-base);
}

.modal-overlay.active .modal {
  transform: scale(1) translateY(0);
}

.modal-sm {
  max-width: 400px;
}

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

.modal-header {
  padding: var(--space-6) var(--space-6) var(--space-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  margin: 0;
}

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.modal-close:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.modal-body {
  padding: 0 var(--space-6) var(--space-6);
}

.modal-footer {
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-3);
}

/* ==========================================================
   14. STATUS BADGES
   ========================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 2px var(--space-3);
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  line-height: 1.6;
}

.badge-confirmed,
.badge-completed {
  background: var(--success-light);
  color: var(--success);
}

.badge-pending {
  background: var(--warning-light);
  color: #92400E;
}

.badge-cancelled {
  background: var(--error-light);
  color: var(--error);
}

.badge-seated,
.badge-active {
  background: var(--info-light);
  color: var(--info);
}

.badge-no-show {
  background: #FEE2E2;
  color: #991B1B;
}

.badge-neutral {
  background: var(--bg);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

/* Reservation type badges */
.badge-type-restaurant {
  background: rgba(27, 42, 74, 0.08);
  color: var(--primary);
  border: 1px solid rgba(27, 42, 74, 0.15);
}
.badge-type-drinks {
  background: rgba(147, 51, 234, 0.08);
  color: #7c3aed;
  border: 1px solid rgba(147, 51, 234, 0.15);
}
.badge-type-both {
  background: rgba(201, 169, 110, 0.1);
  color: var(--accent-dark);
  border: 1px solid rgba(201, 169, 110, 0.2);
}
.badge-type-restaurant i,
.badge-type-drinks i,
.badge-type-both i {
  display: inline;
  vertical-align: middle;
}

/* Dot indicator inside badge */
.badge .badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* ==========================================================
   15. TABS
   ========================================================== */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-6);
  overflow-x: auto;
}

.tab-item {
  padding: var(--space-3) var(--space-5);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  transition: color var(--transition-fast), border-color var(--transition-fast);
  white-space: nowrap;
  cursor: pointer;
}

.tab-item:hover {
  color: var(--text);
}

.tab-item.tab-active {
  color: var(--text);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.2s ease;
}

/* ==========================================================
   16. TOAST NOTIFICATIONS
   ========================================================== */
.toast-container {
  position: fixed;
  top: var(--space-6);
  right: var(--space-6);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  box-shadow: var(--shadow-lg);
  min-width: 320px;
  max-width: 420px;
  pointer-events: auto;
  animation: toastSlideIn 0.3s ease forwards;
}

.toast.removing {
  animation: toastSlideOut 0.3s ease forwards;
}

.toast-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 1px;
}

.toast-content {
  flex: 1;
  min-width: 0;
}

.toast-title {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.toast-message {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.toast-close {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  flex-shrink: 0;
}

.toast-close:hover {
  color: var(--text);
}

.toast-success {
  border-left: 3px solid var(--success);
}

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

.toast-error {
  border-left: 3px solid var(--error);
}

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

.toast-warning {
  border-left: 3px solid var(--warning);
}

.toast-warning .toast-icon {
  color: var(--warning);
}

.toast-info {
  border-left: 3px solid var(--info);
}

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

/* ==========================================================
   17. FLOOR PLAN
   ========================================================== */
.floor-plan-container {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: var(--space-6);
  min-height: 600px;
}

.floor-plan-canvas {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  min-height: 500px;
}

.floor-plan-canvas-inner {
  position: relative;
  width: 100%;
  height: 100%;
  padding: var(--space-6);
}

.floor-plan-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

/* Table elements on the floor plan */
.table-element {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border: 2px solid;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  user-select: none;
}

.table-element:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-md);
  z-index: 2;
}

.table-element.round {
  border-radius: 50%;
  width: 64px;
  height: 64px;
}

.table-element.square {
  border-radius: var(--radius-md);
  width: 64px;
  height: 64px;
}

.table-element.rectangle {
  border-radius: var(--radius-md);
  width: 96px;
  height: 56px;
}

.table-element .table-number {
  font-weight: 700;
  font-size: 0.875rem;
}

.table-element .table-seats {
  font-size: 0.625rem;
  opacity: 0.7;
}

/* Status colors */
.table-available {
  background: var(--success-light);
  border-color: var(--success);
  color: var(--success);
}

.table-reserved {
  background: var(--warning-light);
  border-color: var(--warning);
  color: #92400E;
}

.table-occupied {
  background: var(--info-light);
  border-color: var(--info);
  color: var(--info);
}

.table-service {
  background: var(--bg);
  border-color: var(--border);
  color: var(--text-muted);
  opacity: 0.6;
}

/* Floor plan legend */
.floor-plan-legend {
  display: flex;
  gap: var(--space-5);
  padding: var(--space-4);
  background: var(--bg);
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
}

.floor-plan-legend-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.floor-plan-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid;
}

.legend-available {
  background: var(--success-light);
  border-color: var(--success);
}

.legend-reserved {
  background: var(--warning-light);
  border-color: var(--warning);
}

.legend-occupied {
  background: var(--info-light);
  border-color: var(--info);
}

.legend-service {
  background: var(--bg);
  border-color: var(--border);
}

/* ==========================================================
   18. TIMELINE
   ========================================================== */
.timeline-container {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.timeline-ruler {
  display: flex;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 2;
}

.timeline-ruler-hour {
  flex: 0 0 120px;
  padding: var(--space-3) var(--space-4);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-right: 1px solid var(--border);
  text-align: center;
}

.timeline-row {
  display: flex;
  position: relative;
  min-height: 48px;
  border-bottom: 1px solid var(--border);
  align-items: center;
}

.timeline-row-label {
  width: 80px;
  padding: var(--space-2) var(--space-3);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
  flex-shrink: 0;
  border-right: 1px solid var(--border);
}

.timeline-row-track {
  flex: 1;
  position: relative;
  height: 100%;
}

.timeline-block {
  position: absolute;
  top: 6px;
  bottom: 6px;
  border-radius: var(--radius-sm);
  padding: var(--space-1) var(--space-2);
  font-size: 0.6875rem;
  font-weight: 600;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: opacity var(--transition-fast);
}

.timeline-block:hover {
  opacity: 0.85;
}

.timeline-block.confirmed {
  background: var(--success-light);
  color: var(--success);
  border-left: 3px solid var(--success);
}

.timeline-block.pending {
  background: var(--warning-light);
  color: #92400E;
  border-left: 3px solid var(--warning);
}

.timeline-block.seated {
  background: var(--info-light);
  color: var(--info);
  border-left: 3px solid var(--info);
}

/* ==========================================================
   19. CALENDAR
   ========================================================== */
.calendar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border);
}

.calendar-header h4 {
  margin: 0;
}

.calendar-nav {
  display: flex;
  gap: var(--space-2);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.calendar-day-header {
  padding: var(--space-2);
  text-align: center;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background var(--transition-fast);
  position: relative;
}

.calendar-day:hover {
  background: var(--surface-hover);
}

.calendar-day.other-month {
  color: var(--text-muted);
  opacity: 0.4;
}

.calendar-day.calendar-today {
  font-weight: 700;
  color: var(--accent);
}

.calendar-day.calendar-today::after {
  content: '';
  position: absolute;
  bottom: 4px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
}

.calendar-day.calendar-selected {
  background: var(--accent);
  color: var(--text-inverse);
  border-radius: var(--radius-md);
}

.calendar-day.calendar-selected::after {
  display: none;
}

.calendar-day .day-dot {
  position: absolute;
  bottom: 3px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--info);
}

/* ==========================================================
   20. SEARCH & FILTERS
   ========================================================== */
.search-bar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-pill);
  padding: var(--space-2) var(--space-4);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.search-bar:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.15);
}

.search-bar-icon {
  color: var(--text-muted);
  flex-shrink: 0;
  font-size: 1rem;
}

.search-bar input {
  flex: 1;
  border: none;
  background: none;
  font-size: 0.875rem;
  min-width: 0;
}

.search-bar input::placeholder {
  color: var(--text-muted);
}

.filter-group {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  font-size: 0.8125rem;
  font-weight: 500;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.filter-chip:hover {
  border-color: var(--text-secondary);
}

.filter-chip.filter-chip-active {
  background: var(--primary);
  color: var(--text-inverse);
  border-color: var(--primary);
}

.filter-chip .filter-chip-remove {
  width: 14px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  opacity: 0.6;
}

.filter-chip .filter-chip-remove:hover {
  opacity: 1;
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-6);
}

/* ==========================================================
   21. RESTAURANT CARDS (Public Listing)
   ========================================================== */
.restaurant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-6);
}

.restaurant-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow var(--transition-base), transform var(--transition-base);
  cursor: pointer;
}

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

.restaurant-card-image {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  background: var(--bg);
  overflow: hidden;
}

.restaurant-card-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.restaurant-card:hover .restaurant-card-image img {
  transform: scale(1.05);
}

.restaurant-card-tags {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  display: flex;
  gap: var(--space-2);
}

.restaurant-card-tag {
  background: rgba(26, 26, 26, 0.7);
  color: var(--text-inverse);
  padding: 2px var(--space-2);
  border-radius: var(--radius-sm);
  font-size: 0.6875rem;
  font-weight: 600;
  backdrop-filter: blur(4px);
}

.restaurant-card-favorite {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition-fast);
  font-size: 0.875rem;
}

.restaurant-card-favorite:hover {
  background: var(--surface);
}

.restaurant-card-favorite.active {
  color: var(--error);
}

.restaurant-card-body {
  padding: var(--space-4) var(--space-5);
}

.restaurant-card-title {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: var(--space-1);
}

.restaurant-card-subtitle {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-3);
}

.restaurant-card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.restaurant-card-rating {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-weight: 600;
  color: var(--text);
}

.restaurant-card-rating .stars {
  color: var(--accent);
}

.restaurant-card-price {
  color: var(--text-muted);
}

.restaurant-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-5);
  border-top: 1px solid var(--border);
}

.restaurant-card-availability {
  font-size: 0.8125rem;
  color: var(--success);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.restaurant-card-availability .dot {
  width: 6px;
  height: 6px;
  background: var(--success);
  border-radius: 50%;
}

/* ==========================================================
   22. BOOKING FLOW
   ========================================================== */

/* Reservation Type Selector */
.reservation-type-selector {
  display: flex;
  gap: var(--space-3);
}
.type-option {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-3);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
}
.type-option:hover {
  border-color: var(--accent);
  color: var(--text);
  background: var(--accent-light);
}
.type-option.active {
  border-color: var(--accent);
  background: var(--accent-light);
  color: var(--accent-dark);
  box-shadow: 0 0 0 1px var(--accent);
}
.type-option.active i { color: var(--accent); }
.type-option i { color: var(--text-muted); transition: color 0.2s; }
.type-option:hover i { color: var(--accent); }

.booking-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: var(--space-10);
}

.step-indicator {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.step-number {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 700;
  background: var(--bg);
  color: var(--text-muted);
  border: 2px solid var(--border);
  transition: all var(--transition-base);
}

.step-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition-base);
}

.step-indicator.step-active .step-number {
  background: var(--accent);
  color: var(--text-inverse);
  border-color: var(--accent);
}

.step-indicator.step-active .step-label {
  color: var(--text);
  font-weight: 600;
}

.step-indicator.step-completed .step-number {
  background: var(--success);
  color: var(--text-inverse);
  border-color: var(--success);
}

.step-indicator.step-completed .step-label {
  color: var(--text-secondary);
}

.step-connector {
  width: 48px;
  height: 2px;
  background: var(--border);
  margin: 0 var(--space-2);
  transition: background var(--transition-base);
}

.step-connector.completed {
  background: var(--success);
}

/* Booking content card */
.booking-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  max-width: 640px;
  margin: 0 auto;
  overflow: hidden;
}

.booking-card-header {
  background: var(--primary);
  color: var(--text-inverse);
  padding: var(--space-6);
}

.booking-card-body {
  padding: var(--space-8);
}

.booking-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  padding: var(--space-5);
  background: var(--bg);
  border-radius: var(--radius-lg);
}

.booking-summary-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.booking-summary-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.booking-summary-value {
  font-size: 0.9375rem;
  font-weight: 600;
}

/* ==========================================================
   23. HERO SECTION
   ========================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  color: var(--text-inverse);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(27, 42, 74, 0.55) 0%,
    rgba(26, 26, 26, 0.7) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 720px;
  padding: var(--space-8);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-pill);
  font-size: 0.8125rem;
  font-weight: 500;
  margin-bottom: var(--space-6);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--text-inverse);
  margin-bottom: var(--space-5);
  letter-spacing: -0.02em;
}

.hero p {
  font-size: 1.125rem;
  opacity: 0.9;
  max-width: 560px;
  margin: 0 auto var(--space-8);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
}

/* ==========================================================
   24. STATS BAR
   ========================================================== */
.stats-bar {
  background: var(--primary);
  padding: var(--space-12) 0;
}

.stats-bar-inner {
  display: flex;
  justify-content: center;
  gap: var(--space-16);
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-8);
}

.stats-bar-item {
  text-align: center;
  color: var(--text-inverse);
}

.stats-bar-value {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.1;
  margin-bottom: var(--space-2);
}

.stats-bar-label {
  font-size: 0.9375rem;
  opacity: 0.7;
}

/* ==========================================================
   25. TESTIMONIALS
   ========================================================== */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-6);
}

.testimonial-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.testimonial-stars {
  display: flex;
  gap: 2px;
  color: var(--accent);
  font-size: 0.875rem;
}

.testimonial-quote {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--text);
  font-style: italic;
  flex: 1;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.testimonial-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--accent);
  font-size: 1rem;
  flex-shrink: 0;
  overflow: hidden;
}

.testimonial-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.testimonial-name {
  font-weight: 600;
  font-size: 0.875rem;
}

.testimonial-role {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ==========================================================
   26. FOOTER
   ========================================================== */
.footer {
  background: var(--bg-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: var(--space-16) var(--space-8) var(--space-8);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-10);
  margin-bottom: var(--space-12);
}

.footer-brand {
  font-family: var(--font-heading);
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text-inverse);
  margin-bottom: var(--space-4);
}

.footer-description {
  font-size: 0.875rem;
  line-height: 1.65;
  max-width: 300px;
}

.footer-column h4 {
  color: var(--text-inverse);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: var(--space-4);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.footer-link {
  display: block;
  padding: var(--space-1) 0;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.55);
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: var(--accent);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.35);
}

.footer-social {
  display: flex;
  gap: var(--space-4);
}

.footer-social a {
  color: rgba(255, 255, 255, 0.4);
  font-size: 1.125rem;
  transition: color var(--transition-fast);
}

.footer-social a:hover {
  color: var(--accent);
}

/* ==========================================================
   27. CHARTS (CSS-only)
   ========================================================== */
.chart-container {
  padding: var(--space-5);
}

.chart-title {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: var(--space-4);
}

/* Bar chart */
.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: var(--space-3);
  height: 200px;
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--border);
  position: relative;
}

.bar-chart-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  height: 100%;
  justify-content: flex-end;
}

.bar-chart-bar {
  width: 100%;
  max-width: 40px;
  background: var(--accent);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  transition: background var(--transition-fast);
  min-height: 4px;
}

.bar-chart-bar:hover {
  background: var(--accent-hover);
}

.bar-chart-bar.secondary {
  background: var(--primary-light);
}

.bar-chart-bar.secondary:hover {
  background: var(--primary);
}

.bar-chart-label {
  font-size: 0.6875rem;
  color: var(--text-muted);
  text-align: center;
  position: absolute;
  bottom: 0;
  transform: translateY(100%);
  padding-top: var(--space-2);
}

.bar-chart-value {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* Line chart placeholder */
.line-chart {
  height: 200px;
  position: relative;
  border-bottom: 1px solid var(--border);
  border-left: 1px solid var(--border);
}

.line-chart svg {
  width: 100%;
  height: 100%;
}

.line-chart-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
}

.line-chart-area {
  fill: url(#goldGradient);
  opacity: 0.15;
}

.line-chart-dot {
  fill: var(--accent);
  stroke: var(--surface);
  stroke-width: 2;
}

/* Y-axis labels */
.chart-y-labels {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 200px;
  margin-right: var(--space-3);
  font-size: 0.6875rem;
  color: var(--text-muted);
  text-align: right;
}

/* X-axis labels */
.chart-x-labels {
  display: flex;
  justify-content: space-between;
  margin-top: var(--space-2);
  font-size: 0.6875rem;
  color: var(--text-muted);
}

/* Donut chart */
.donut-chart {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.donut-chart-inner {
  width: 100px;
  height: 100px;
  background: var(--surface);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 1;
}

.donut-chart-value {
  font-size: 1.5rem;
  font-weight: 700;
}

.donut-chart-label {
  font-size: 0.6875rem;
  color: var(--text-muted);
}

/* ── New bar chart classes (renderBarChart) ── */

.bar-chart.vertical {
  display: flex;
  align-items: stretch;
  gap: var(--space-3);
  justify-content: center;
}

.bar-chart.horizontal {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
}

.bar-col .bar-value {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.bar-col .bar-label {
  font-size: 0.6875rem;
  color: var(--text-muted);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60px;
}

.bar-track-v {
  width: 100%;
  max-width: 40px;
  position: relative;
  display: flex;
  align-items: flex-end;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  background: var(--bg);
}

.bar-fill-v {
  width: 100%;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  transition: height var(--transition-base);
  min-height: 4px;
}

.bar-fill-v:hover {
  filter: brightness(1.1);
}

.bar-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
}

.bar-row .bar-label {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  min-width: 120px;
  max-width: 160px;
  width: 160px;
  flex-shrink: 0;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bar-track {
  flex: 1;
  height: 24px;
  background: var(--bg);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  transition: width var(--transition-base);
  min-width: 4px;
}

.bar-fill:hover {
  filter: brightness(1.1);
}

.bar-row .bar-value {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
  min-width: 50px;
  flex-shrink: 0;
  text-align: right;
}

/* ── New donut chart classes (renderDonutChart) ── */

.donut-ring {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.donut-hole {
  position: absolute;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
}

.donut-center {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  line-height: 1.2;
}

.donut-legend {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.donut-legend-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.8125rem;
}

.donut-legend-color {
  width: 12px;
  height: 12px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.donut-legend-label {
  color: var(--text-secondary);
  flex: 1;
}

.donut-legend-value {
  font-weight: 600;
  color: var(--text);
}

/* ==========================================================
   28. LOADING STATES
   ========================================================== */

/* Skeleton shimmer */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg) 25%,
    var(--surface-hover) 50%,
    var(--bg) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

.skeleton-text {
  height: 14px;
  margin-bottom: var(--space-2);
}

.skeleton-text:last-child {
  width: 60%;
}

.skeleton-heading {
  height: 24px;
  width: 40%;
  margin-bottom: var(--space-4);
}

.skeleton-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.skeleton-card {
  height: 200px;
}

.skeleton-image {
  height: 180px;
}

/* Spinner */
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.spinner-sm {
  width: 18px;
  height: 18px;
  border-width: 2px;
}

.spinner-lg {
  width: 48px;
  height: 48px;
  border-width: 4px;
}

.loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  border-radius: inherit;
}

/* ==========================================================
   29. EMPTY STATES
   ========================================================== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-16) var(--space-8);
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: var(--space-5);
  opacity: 0.4;
}

.empty-state-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--space-2);
}

.empty-state-message {
  font-size: 0.9375rem;
  max-width: 360px;
  margin-bottom: var(--space-6);
  line-height: 1.6;
}

/* ==========================================================
   30. ANIMATIONS
   ========================================================== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(24px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

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

@keyframes modalScale {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes toastSlideOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

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

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

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

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

/* Animation utility classes */
.animate-fade-in {
  animation: fadeIn 0.3s ease;
}

.animate-fade-in-up {
  animation: fadeInUp 0.4s ease;
}

.animate-slide-in-right {
  animation: slideInRight 0.3s ease;
}

.animate-slide-in-left {
  animation: slideInLeft 0.3s ease;
}

.animate-slide-in-down {
  animation: slideInDown 0.3s ease;
}

.animate-pulse {
  animation: pulse 2s infinite;
}

.animate-bounce {
  animation: bounce 1s infinite;
}

/* Page load staggered animation */
.stagger > * {
  opacity: 0;
  animation: fadeInUp 0.4s ease forwards;
}

.stagger > *:nth-child(1) { animation-delay: 0.05s; }
.stagger > *:nth-child(2) { animation-delay: 0.1s; }
.stagger > *:nth-child(3) { animation-delay: 0.15s; }
.stagger > *:nth-child(4) { animation-delay: 0.2s; }
.stagger > *:nth-child(5) { animation-delay: 0.25s; }
.stagger > *:nth-child(6) { animation-delay: 0.3s; }
.stagger > *:nth-child(7) { animation-delay: 0.35s; }
.stagger > *:nth-child(8) { animation-delay: 0.4s; }

/* ==========================================================
   31. RESPONSIVE — Mobile (< 768px)
   ========================================================== */
@media (max-width: 767px) {
  /* Typography scale down */
  .display { font-size: 2.25rem; }
  h1, .h1 { font-size: 1.75rem; }
  h2, .h2 { font-size: 1.375rem; }
  h3, .h3 { font-size: 1.125rem; }

  /* Sidebar → bottom tabs */
  .sidebar {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 64px;
    flex-direction: row;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .sidebar-logo,
  .sidebar-section-label,
  .sidebar-footer,
  .sidebar-toggle {
    display: none;
  }

  .sidebar-nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-around;
    padding: 0;
    overflow-x: auto;
    width: 100%;
  }

  .sidebar-nav-item {
    flex-direction: column;
    gap: 1px;
    padding: 6px 2px;
    border-left: none;
    border-top: 2px solid transparent;
    font-size: 0.5625rem;
    min-width: 0;
    flex: 1 1 0;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .sidebar-nav-item.active {
    border-left: none;
    border-top-color: var(--accent);
  }

  .sidebar-nav-item .nav-icon {
    font-size: 1.125rem;
  }

  .sidebar-nav-item .nav-label {
    display: none;
  }

  .sidebar-nav-item .nav-label-short {
    display: block;
    font-size: 0.5625rem;
    line-height: 1.2;
  }

  .sidebar-nav-item .nav-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    margin: 0;
    width: 8px;
    height: 8px;
    min-width: 8px;
    padding: 0;
    font-size: 0;
  }

  /* Main content adjusts */
  .app-layout .main-content {
    margin-left: 0;
    margin-bottom: 64px;
    padding: var(--space-5);
  }

  .app-layout.sidebar-collapsed .main-content {
    margin-left: 0;
  }

  /* Page header stacks */
  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }

  /* Top nav mobile */
  .top-nav {
    padding: 0 var(--space-4);
  }

  .top-nav-links {
    display: none;
  }

  .top-nav-mobile-toggle {
    display: flex;
  }

  /* Mobile menu overlay */
  .top-nav-links.mobile-open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--topnav-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--surface);
    padding: var(--space-8);
    gap: var(--space-6);
    z-index: var(--z-modal);
    animation: fadeIn 0.2s ease;
  }

  .top-nav-links.mobile-open .top-nav-link {
    font-size: 1.125rem;
    color: var(--text);
    opacity: 1;
  }

  /* Cards full width */
  .kpi-grid {
    grid-template-columns: 1fr;
  }

  /* Tables → card layout */
  .data-table-wrapper {
    border: none;
    border-radius: 0;
    background: transparent;
  }

  .data-table thead {
    display: none;
  }

  .data-table tbody tr {
    display: block;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    margin-bottom: var(--space-3);
  }

  .data-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-2) 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.8125rem;
  }

  .data-table td:last-child {
    border-bottom: none;
  }

  .data-table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-right: var(--space-4);
  }

  /* Restaurant grid */
  .restaurant-grid {
    grid-template-columns: 1fr;
  }

  /* Floor plan stacks */
  .floor-plan-container {
    grid-template-columns: 1fr;
  }

  .floor-plan-legend {
    flex-wrap: wrap;
    gap: var(--space-3);
  }

  /* Booking steps compact */
  .booking-steps {
    gap: 0;
  }

  .step-label {
    display: none;
  }

  .step-connector {
    width: 24px;
  }

  /* Booking summary single column */
  .booking-summary {
    grid-template-columns: 1fr;
  }

  /* Hero smaller */
  .hero h1 {
    font-size: 2.25rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .hero-actions {
    flex-direction: column;
    gap: var(--space-3);
  }

  /* Stats bar → 2x2 grid on mobile */
  .stats-bar-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
    justify-items: center;
  }

  /* Testimonials single column */
  .testimonial-grid {
    grid-template-columns: 1fr;
  }

  /* Footer stacks */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--space-4);
    text-align: center;
  }

  /* Form rows single column */
  .form-row,
  .form-row-3 {
    grid-template-columns: 1fr;
  }

  /* Modal full width */
  .modal {
    width: 95%;
    max-height: 90vh;
  }

  /* Toast full width */
  .toast-container {
    left: var(--space-4);
    right: var(--space-4);
    top: var(--space-4);
  }

  .toast {
    min-width: 0;
    width: 100%;
  }

  /* Filter chips scroll */
  .filter-group {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: var(--space-2);
    -webkit-overflow-scrolling: touch;
  }

  /* Tabs scroll */
  .tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .tabs::-webkit-scrollbar {
    display: none;
  }

  /* Timeline compact */
  .timeline-ruler-hour {
    flex: 0 0 80px;
  }

  /* Filter bar → wrap nicely on mobile */
  .filter-bar {
    justify-content: stretch !important;
  }

  .filter-bar .form-select,
  .filter-bar .form-input {
    min-width: 0 !important;
    width: 100% !important;
    flex: 1 1 calc(50% - var(--space-2));
  }

  /* Results count padding */
  #results-count {
    padding-left: var(--space-4);
  }
}

/* Tablet adjustments */
@media (min-width: 768px) and (max-width: 1023px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .restaurant-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ==========================================================
   32. UTILITY CLASSES
   ========================================================== */

/* Display */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-start { display: flex; align-items: center; justify-content: flex-start; }
.flex-end { display: flex; align-items: center; justify-content: flex-end; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); gap: var(--space-5); }
.grid-3 { grid-template-columns: repeat(3, 1fr); gap: var(--space-5); }
.grid-4 { grid-template-columns: repeat(4, 1fr); gap: var(--space-5); }
.grid-5 { grid-template-columns: repeat(5, 1fr); gap: var(--space-5); }

@media (max-width: 1023px) {
  .grid-4, .grid-5 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
  .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: 1fr; }
}
.block { display: block; }
.inline-block { display: inline-block; }

/* Gap */
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-5 { gap: var(--space-5); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

/* Text alignment */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

/* Margin top */
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mt-10 { margin-top: var(--space-10); }
.mt-12 { margin-top: var(--space-12); }

/* Margin bottom */
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-5 { margin-bottom: var(--space-5); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.mb-10 { margin-bottom: var(--space-10); }
.mb-12 { margin-bottom: var(--space-12); }

/* Padding */
.p-0 { padding: 0; }
.p-4 { padding: var(--space-4); }
.p-5 { padding: var(--space-5); }
.p-6 { padding: var(--space-6); }
.p-8 { padding: var(--space-8); }
.px-4 { padding-left: var(--space-4); padding-right: var(--space-4); }
.px-6 { padding-left: var(--space-6); padding-right: var(--space-6); }
.px-8 { padding-left: var(--space-8); padding-right: var(--space-8); }
.py-4 { padding-top: var(--space-4); padding-bottom: var(--space-4); }
.py-6 { padding-top: var(--space-6); padding-bottom: var(--space-6); }
.py-8 { padding-top: var(--space-8); padding-bottom: var(--space-8); }
.py-12 { padding-top: var(--space-12); padding-bottom: var(--space-12); }
.py-16 { padding-top: var(--space-16); padding-bottom: var(--space-16); }

/* Width */
.w-full { width: 100%; }
.max-w-sm { max-width: 480px; }
.max-w-md { max-width: 640px; }
.max-w-lg { max-width: 960px; }
.max-w-xl { max-width: 1200px; }

/* Overflow */
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }

/* Position */
.relative { position: relative; }
.absolute { position: absolute; }
.sticky { position: sticky; top: 0; z-index: var(--z-sticky); }

/* Visibility */
.hidden { display: none !important; }
.visible-mobile { display: none !important; }
.hidden-mobile { display: block; }

@media (max-width: 767px) {
  .visible-mobile { display: block !important; }
  .hidden-mobile { display: none !important; }
  .visible-mobile.flex { display: flex !important; }
  .visible-mobile.inline-flex { display: inline-flex !important; }
}

/* Opacity */
.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }

/* Cursor */
.cursor-pointer { cursor: pointer; }

/* Border */
.border { border: 1px solid var(--border); }
.border-t { border-top: 1px solid var(--border); }
.border-b { border-bottom: 1px solid var(--border); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-full { border-radius: var(--radius-pill); }

/* Background */
.bg-surface { background: var(--surface); }
.bg-muted { background: var(--bg); }
.bg-primary { background: var(--primary); }
.bg-accent-light { background: var(--accent-light); }

/* Truncate */
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

/* Avatar */
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-light);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
  flex-shrink: 0;
  overflow: hidden;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-sm { width: 28px; height: 28px; font-size: 0.75rem; }
.avatar-lg { width: 48px; height: 48px; font-size: 1.125rem; }
.avatar-xl { width: 64px; height: 64px; font-size: 1.5rem; }

/* ==========================================================
   33. SECTION WRAPPERS (Public pages)
   ========================================================== */
.section {
  padding: var(--space-16) var(--space-8);
}

.section-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-12);
}

.section-header h2 {
  margin-bottom: var(--space-3);
}

.section-header p {
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
  font-size: 1.0625rem;
  line-height: 1.65;
}

.section-alt {
  background: var(--surface);
}

/* ==========================================================
   34. MISC COMPONENTS
   ========================================================== */

/* Dropdown */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 180px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-2);
  z-index: var(--z-dropdown);
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: all var(--transition-fast);
}

.dropdown.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  font-size: 0.875rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.dropdown-item:hover {
  background: var(--surface-hover);
}

.dropdown-item.danger {
  color: var(--error);
}

.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: var(--space-2) 0;
}

/* Tooltip */
.tooltip {
  position: relative;
}

.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-dark);
  color: var(--text-inverse);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-fast);
  pointer-events: none;
  z-index: var(--z-tooltip);
}

.tooltip:hover::after {
  opacity: 1;
  visibility: visible;
}

/* Progress bar */
.progress-bar {
  height: 8px;
  background: var(--bg);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: var(--radius-pill);
  transition: width var(--transition-slow);
}

.progress-bar-fill.success { background: var(--success); }
.progress-bar-fill.warning { background: var(--warning); }
.progress-bar-fill.error { background: var(--error); }

/* Alert / Notice */
.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  line-height: 1.5;
}

.alert-info {
  background: var(--info-light);
  color: var(--info);
}

.alert-success {
  background: var(--success-light);
  color: var(--success);
}

.alert-warning {
  background: var(--warning-light);
  color: #92400E;
}

.alert-error {
  background: var(--error-light);
  color: var(--error);
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}

.breadcrumb-separator {
  color: var(--border);
}

.breadcrumb a:hover {
  color: var(--text);
}

.breadcrumb-current {
  color: var(--text);
  font-weight: 500;
}

/* Tag / Chip */
.tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 2px var(--space-3);
  font-size: 0.75rem;
  font-weight: 500;
  background: var(--bg);
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
}

/* Notification dot */
.notification-dot {
  position: relative;
}

.notification-dot::after {
  content: '';
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  background: var(--error);
  border-radius: 50%;
  border: 2px solid var(--surface);
}

/* ==========================================================
   35. PRINT STYLES
   ========================================================== */
@media print {
  .sidebar,
  .top-nav,
  .toast-container,
  .btn,
  .modal-overlay {
    display: none !important;
  }

  .app-layout .main-content {
    margin-left: 0;
    padding: 0;
  }

  body {
    background: white;
    color: black;
    font-size: 12pt;
  }

  .card {
    box-shadow: none;
    border: 1px solid #ddd;
    break-inside: avoid;
  }
}

/* ─── Detail Page Grid ──────────────────────────────────────────────────── */

.detail-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: var(--space-8);
  padding: 0 var(--space-4);
}

@media (max-width: 767px) {
  .detail-grid {
    grid-template-columns: 1fr;
    gap: var(--space-5);
  }
}
