/* assets/css/app.css - AYEYE Design System */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;500;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&display=swap');

/* ─── DESIGN TOKENS ─── */
:root {
  --font-display: 'Sora', sans-serif;
  --font-body: 'DM Sans', sans-serif;

  /* Light Mode */
  --bg-base:       #fafafa;
  --bg-surface:    #ffffff;
  --bg-elevated:   #f4f4f5;
  --bg-sunken:     #f0f0f1;
  --bg-overlay:    rgba(0,0,0,0.04);
  --bg-hover:      rgba(0,0,0,0.04);

  --border:        #e4e4e7;
  --border-strong: #d4d4d8;
  --border-focus:  #f59e0b;

  --text-primary:  #09090b;
  --text-secondary:#52525b;
  --text-muted:    #a1a1aa;
  --text-inverse:  #fafafa;

  --accent:        #f59e0b;
  --accent-light:  #fef3c7;
  --accent-dark:   #d97706;
  --accent-hover:  #fbbf24;

  --success:       #10b981;
  --success-bg:    #d1fae5;
  --error:         #ef4444;
  --error-bg:      #fee2e2;
  --warning:       #f59e0b;
  --warning-bg:    #fef3c7;
  --info:          #3b82f6;
  --info-bg:       #dbeafe;

  --shadow-sm:  0 1px 2px rgba(0,0,0,0.05);
  --shadow-md:  0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.04);
  --shadow-lg:  0 10px 15px -3px rgba(0,0,0,0.07), 0 4px 6px -2px rgba(0,0,0,0.04);
  --shadow-xl:  0 20px 25px -5px rgba(0,0,0,0.08), 0 10px 10px -5px rgba(0,0,0,0.02);

  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  14px;
  --radius-xl:  20px;
  --radius-full:9999px;

  --sidebar-w:  256px;
  --header-h:   60px;
  --transition: 150ms cubic-bezier(0.4,0,0.2,1);
}

/* Dark Mode — supports both class="dark" and data-theme="dark" */
[data-theme="dark"], .dark {
  --bg-base:       #0a0a0b;
  --bg-surface:    #111113;
  --bg-elevated:   #18181b;
  --bg-sunken:     #09090b;
  --bg-overlay:    rgba(255,255,255,0.04);
  --bg-hover:      rgba(255,255,255,0.05);

  --border:        #1e1e21;
  --border-strong: #2a2a2e;
  --border-focus:  #f59e0b;

  --text-primary:  #fafafa;
  --text-secondary:#a1a1aa;
  --text-muted:    #52525b;
  --text-inverse:  #09090b;

  --accent:        #f59e0b;
  --accent-light:  rgba(245,158,11,0.12);
  --accent-dark:   #d97706;

  --success-bg:    rgba(16,185,129,0.12);
  --error-bg:      rgba(239,68,68,0.12);
  --warning-bg:    rgba(245,158,11,0.12);
  --info-bg:       rgba(59,130,246,0.12);

  --shadow-sm:  0 1px 2px rgba(0,0,0,0.3);
  --shadow-md:  0 4px 6px -1px rgba(0,0,0,0.4);
  --shadow-lg:  0 10px 15px -3px rgba(0,0,0,0.5);
  --shadow-xl:  0 20px 25px -5px rgba(0,0,0,0.6);
}

/* ─── RESET & BASE ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-base);
  transition: background var(--transition), color var(--transition);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ─── LAYOUT ─── */
.app-layout {
  display: flex;
  min-height: 100vh;
  background: var(--bg-base);
}

/* ─── SIDEBAR ─── */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0; top: 0;
  z-index: 100;
  transition: transform var(--transition);
}
.sidebar-logo {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-logo .logo-mark {
  width: 32px; height: 32px;
  background: var(--accent);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 13px;
  color: #000;
  letter-spacing: -0.5px;
  flex-shrink: 0;
}
.sidebar-logo .logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}
.sidebar-logo .logo-version {
  font-size: 10px;
  color: var(--text-muted);
  background: var(--bg-elevated);
  padding: 1px 6px;
  border-radius: var(--radius-full);
  margin-left: auto;
}
.sidebar-nav {
  flex: 1;
  padding: 12px 10px;
  overflow-y: auto;
}
.nav-section-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 8px 10px 4px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 500;
  transition: all var(--transition);
  position: relative;
  margin-bottom: 1px;
}
.nav-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.nav-item.active {
  background: var(--accent-light);
  color: var(--accent);
}
.nav-item .nav-icon {
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}
.nav-item .nav-badge {
  margin-left: auto;
  background: var(--accent);
  color: #000;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  min-width: 18px;
  text-align: center;
}
.sidebar-footer {
  padding: 12px 10px;
  border-top: 1px solid var(--border);
}
.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition);
}
.user-card:hover { background: var(--bg-hover); }
.user-avatar {
  width: 32px; height: 32px;
  border-radius: var(--radius-full);
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  color: #000; flex-shrink: 0;
  overflow: hidden;
}
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-info { flex: 1; min-width: 0; }
.user-name { font-size: 13px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-plan { font-size: 11px; color: var(--text-muted); }

/* ─── MAIN CONTENT ─── */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.page-header {
  height: var(--header-h);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 16px;
  position: sticky;
  top: 0; z-index: 50;
}
.page-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}
.page-subtitle { font-size: 13px; color: var(--text-muted); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.page-content { padding: 28px; flex: 1; }

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 13.5px; font-weight: 500;
  border: 1px solid transparent;
  transition: all var(--transition);
  white-space: nowrap; cursor: pointer;
  font-family: var(--font-body);
  line-height: 1;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
  font-weight: 600;
}
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-color: var(--border);
}
.btn-secondary:hover:not(:disabled) { background: var(--bg-hover); border-color: var(--border-strong); }
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}
.btn-ghost:hover:not(:disabled) { background: var(--bg-hover); color: var(--text-primary); }
.btn-danger {
  background: var(--error-bg);
  color: var(--error);
  border-color: transparent;
}
.btn-danger:hover:not(:disabled) { background: var(--error); color: #fff; }
.btn-sm { padding: 5px 10px; font-size: 12.5px; border-radius: var(--radius-sm); }
.btn-lg { padding: 11px 22px; font-size: 15px; }
.btn-icon { padding: 8px; aspect-ratio: 1; }
.btn-icon.btn-sm { padding: 6px; }

/* ─── CARDS ─── */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: border-color var(--transition);
}
.card:hover { border-color: var(--border-strong); }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.card-title { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.card-subtitle { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }

/* ─── STATS ─── */
.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex; flex-direction: column; gap: 10px;
  transition: all var(--transition);
  position: relative; overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent);
  opacity: 0;
  transition: opacity var(--transition);
}
.stat-card:hover::before { opacity: 1; }
.stat-icon {
  width: 36px; height: 36px;
  border-radius: var(--radius-md);
  background: var(--accent-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.stat-value { font-family: var(--font-display); font-size: 28px; font-weight: 700; color: var(--text-primary); line-height: 1; }
.stat-label { font-size: 13px; color: var(--text-muted); }
.stat-change { font-size: 12px; display: flex; align-items: center; gap: 4px; }
.stat-change.up { color: var(--success); }
.stat-change.down { color: var(--error); }

/* ─── FORMS ─── */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 13px; font-weight: 500; color: var(--text-secondary); margin-bottom: 6px; }
.form-label span.required { color: var(--error); margin-left: 2px; }
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 9px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 13.5px;
  font-family: var(--font-body);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-muted); }
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(245,158,11,0.12);
}
.form-textarea { resize: vertical; min-height: 96px; }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 5px; }
.form-error { font-size: 12px; color: var(--error); margin-top: 5px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ─── TABLES ─── */
.table-wrapper { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
thead tr { background: var(--bg-elevated); border-bottom: 1px solid var(--border); }
th { padding: 10px 16px; text-align: left; font-size: 11.5px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; white-space: nowrap; }
td { padding: 12px 16px; border-bottom: 1px solid var(--border); color: var(--text-primary); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: background var(--transition); }
tbody tr:hover { background: var(--bg-hover); }

/* ─── BADGES ─── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 11.5px; font-weight: 500;
}
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-error   { background: var(--error-bg);   color: var(--error); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-info    { background: var(--info-bg);    color: var(--info); }
.badge-neutral { background: var(--bg-elevated); color: var(--text-secondary); }
.badge-amber   { background: rgba(245,158,11,0.12); color: var(--accent); }

/* ─── MODAL ─── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity var(--transition);
}
.modal-overlay.active { opacity: 1; pointer-events: all; }
.modal {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  width: 100%; max-width: 540px;
  max-height: 90vh; overflow-y: auto;
  transform: translateY(20px) scale(0.97);
  transition: transform var(--transition);
}
.modal-overlay.active .modal { transform: translateY(0) scale(1); }
.modal-header { padding: 20px 24px 0; display: flex; align-items: flex-start; justify-content: space-between; }
.modal-title { font-family: var(--font-display); font-size: 17px; font-weight: 700; color: var(--text-primary); }
.modal-close { color: var(--text-muted); cursor: pointer; padding: 4px; border-radius: var(--radius-sm); border: none; background: none; font-size: 18px; line-height: 1; transition: color var(--transition); }
.modal-close:hover { color: var(--text-primary); }
.modal-body { padding: 20px 24px; }
.modal-footer { padding: 0 24px 20px; display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.modal-lg { max-width: 720px; }
.modal-xl { max-width: 960px; }

/* ─── TABS ─── */
.tabs { display: flex; gap: 2px; background: var(--bg-elevated); padding: 3px; border-radius: var(--radius-lg); width: fit-content; }
.tab-btn {
  padding: 7px 16px;
  border-radius: calc(var(--radius-lg) - 3px);
  font-size: 13px; font-weight: 500;
  color: var(--text-muted);
  background: none; border: none;
  transition: all var(--transition);
  cursor: pointer;
}
.tab-btn.active { background: var(--bg-surface); color: var(--text-primary); box-shadow: var(--shadow-sm); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ─── AVATAR GROUP ─── */
.avatar-group { display: flex; }
.avatar-group .avatar { margin-left: -8px; border: 2px solid var(--bg-surface); border-radius: 50%; width: 28px; height: 28px; background: var(--bg-elevated); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; }
.avatar-group .avatar:first-child { margin-left: 0; }

/* ─── EVENT CARD ─── */
.event-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
  cursor: pointer;
}
.event-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.event-card-banner {
  height: 140px;
  background: var(--bg-elevated);
  position: relative;
  overflow: hidden;
}
.event-card-banner img { width: 100%; height: 100%; object-fit: cover; }
.event-card-banner .event-type-badge {
  position: absolute; top: 10px; left: 10px;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(8px);
  color: #fff; padding: 3px 10px; border-radius: var(--radius-full);
  font-size: 11.5px; font-weight: 500;
}
.event-card-body { padding: 16px; }
.event-card-title { font-weight: 600; font-size: 15px; color: var(--text-primary); margin-bottom: 6px; }
.event-card-meta { display: flex; flex-direction: column; gap: 3px; }
.event-meta-item { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-muted); }
.event-card-footer { padding: 12px 16px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.event-status { display: flex; align-items: center; gap: 5px; font-size: 12.5px; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; }
.status-dot.active { background: var(--success); }
.status-dot.draft { background: var(--text-muted); }
.status-dot.completed { background: var(--info); }
.status-dot.cancelled { background: var(--error); }

/* ─── QR DISPLAY ─── */
.qr-container {
  background: #fff;
  padding: 16px;
  border-radius: var(--radius-lg);
  display: inline-flex;
  align-items: center; justify-content: center;
  box-shadow: var(--shadow-md);
}
.qr-container img { width: 160px; height: 160px; }

/* ─── SCANNER ─── */
#scanner-video { width: 100%; border-radius: var(--radius-lg); background: #000; aspect-ratio: 4/3; object-fit: cover; }
.scan-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
}
.scan-frame {
  width: 200px; height: 200px;
  border: 2px solid var(--accent);
  border-radius: var(--radius-lg);
  position: relative;
  box-shadow: 0 0 0 4000px rgba(0,0,0,0.4);
}
.scan-frame::before, .scan-frame::after {
  content: '';
  position: absolute;
  width: 20px; height: 20px;
  border-color: var(--accent);
  border-style: solid;
}
.scan-frame::before { top: -2px; left: -2px; border-width: 3px 0 0 3px; }
.scan-frame::after  { bottom: -2px; right: -2px; border-width: 0 3px 3px 0; }
.scan-line {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent);
  animation: scanAnim 2s ease-in-out infinite;
  box-shadow: 0 0 8px var(--accent);
}
@keyframes scanAnim {
  0%, 100% { top: 0; }
  50% { top: calc(100% - 2px); }
}

/* ─── TOAST ─── */
#toast-container {
  position: fixed; top: 20px; right: 20px;
  z-index: 9999;
  display: flex; flex-direction: column; gap: 8px;
}
.toast {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  max-width: 340px;
  animation: toastIn 0.2s ease;
  font-size: 13.5px;
}
.toast.success { border-left: 3px solid var(--success); }
.toast.error   { border-left: 3px solid var(--error); }
.toast.warning { border-left: 3px solid var(--warning); }
.toast.info    { border-left: 3px solid var(--info); }
@keyframes toastIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ─── EMPTY STATE ─── */
.empty-state {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 60px 20px;
  gap: 16px;
}
.empty-icon { font-size: 40px; opacity: 0.4; }
.empty-title { font-size: 16px; font-weight: 600; color: var(--text-secondary); }
.empty-desc { font-size: 13.5px; color: var(--text-muted); max-width: 320px; line-height: 1.6; }

/* ─── PROGRESS ─── */
.progress-bar { height: 4px; background: var(--bg-elevated); border-radius: var(--radius-full); overflow: hidden; }
.progress-fill { height: 100%; background: var(--accent); border-radius: var(--radius-full); transition: width 0.4s ease; }

/* ─── CHECKBOX / TOGGLE ─── */
.toggle { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.toggle input[type="checkbox"] { display: none; }
.toggle-track {
  width: 36px; height: 20px;
  background: var(--border);
  border-radius: var(--radius-full);
  position: relative;
  transition: background var(--transition);
}
.toggle input:checked + .toggle-track { background: var(--accent); }
.toggle-thumb {
  position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform var(--transition);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle input:checked ~ .toggle-track .toggle-thumb { transform: translateX(16px); }

/* ─── DIVIDER ─── */
.divider { height: 1px; background: var(--border); margin: 20px 0; }

/* ─── LOADING ─── */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── AUTH PAGES ─── */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; background: var(--bg-base); }
.auth-card { width: 100%; max-width: 420px; background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 36px; box-shadow: var(--shadow-xl); }
.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-logo .mark { width: 48px; height: 48px; background: var(--accent); border-radius: var(--radius-lg); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 800; font-size: 18px; color: #000; margin: 0 auto 10px; }
.auth-logo .name { font-family: var(--font-display); font-size: 22px; font-weight: 700; letter-spacing: -0.5px; }
.auth-logo .tagline { font-size: 13px; color: var(--text-muted); }
.auth-title { font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.auth-subtitle { font-size: 13.5px; color: var(--text-muted); margin-bottom: 24px; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--text-muted); font-size: 12px; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.auth-footer { text-align: center; margin-top: 20px; font-size: 13px; color: var(--text-muted); }
.auth-footer a { color: var(--accent); font-weight: 500; }

/* ─── TEMPLATE CARDS ─── */
.template-card {
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}
.template-card:hover { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-light); }
.template-card.selected { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-light); }
.template-card .check {
  position: absolute; top: 8px; right: 8px;
  width: 22px; height: 22px;
  background: var(--accent);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity var(--transition);
}
.template-card.selected .check { opacity: 1; }
.template-preview { height: 150px; background: var(--bg-elevated); overflow: hidden; }
.template-preview img { width: 100%; height: 100%; object-fit: cover; }
.template-info { padding: 12px; }
.template-name { font-size: 13.5px; font-weight: 600; }
.template-type { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ─── SEAT MAP ─── */
.seat-map { display: flex; flex-direction: column; gap: 8px; }
.seat-row { display: flex; gap: 6px; align-items: center; }
.seat-label { width: 24px; font-size: 11px; color: var(--text-muted); text-align: center; flex-shrink: 0; }
.seat {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 500;
  cursor: pointer; transition: all var(--transition);
  background: var(--bg-surface);
  color: var(--text-muted);
}
.seat:hover { border-color: var(--accent); color: var(--accent); }
.seat.occupied { background: var(--accent-light); border-color: var(--accent); color: var(--accent-dark); }
.seat.checked-in { background: var(--success-bg); border-color: var(--success); color: var(--success); }
.seat.selected { background: var(--accent); border-color: var(--accent-dark); color: #000; }

/* ─── GUEST LIST ITEM ─── */
.guest-item {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  transition: background var(--transition);
}
.guest-item:hover { background: var(--bg-hover); }
.guest-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--bg-elevated); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 13px; color: var(--text-secondary); flex-shrink: 0; }
.guest-info { flex: 1; min-width: 0; }
.guest-name { font-size: 14px; font-weight: 500; color: var(--text-primary); }
.guest-meta { font-size: 12.5px; color: var(--text-muted); }
.guest-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* ─── BREADCRUMB ─── */
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-muted); }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--text-primary); }
.breadcrumb .sep { color: var(--border-strong); }
.breadcrumb .current { color: var(--text-primary); font-weight: 500; }

/* ─── DARK MODE TOGGLE ─── */
.theme-toggle {
  width: 32px; height: 32px;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-secondary);
  transition: all var(--transition);
  font-size: 15px;
}
.theme-toggle:hover { background: var(--bg-hover); color: var(--text-primary); }

/* ─── STEP INDICATOR ─── */
.steps { display: flex; align-items: center; gap: 0; margin-bottom: 28px; }
.step { display: flex; align-items: center; gap: 0; flex: 1; }
.step-circle { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--border); background: var(--bg-surface); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; color: var(--text-muted); transition: all var(--transition); flex-shrink: 0; }
.step.active .step-circle { border-color: var(--accent); color: var(--accent); }
.step.done .step-circle { border-color: var(--success); background: var(--success); color: #fff; }
.step-label { font-size: 12px; font-weight: 500; color: var(--text-muted); margin-left: 8px; white-space: nowrap; }
.step.active .step-label { color: var(--text-primary); }
.step.done .step-label { color: var(--success); }
.step-line { flex: 1; height: 1px; background: var(--border); margin: 0 8px; }
.step.done .step-line { background: var(--success); }

/* ─── RESPONSIVE ─── */
.mobile-menu-btn { display: none; }

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .mobile-menu-btn { display: flex; }
  .sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 99; }
  .sidebar-backdrop.show { display: block; }
  .page-content { padding: 16px; }
  .form-row { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr !important; }
}

/* ─── UTILITY ─── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.text-sm { font-size: 12.5px; }
.text-xs { font-size: 11px; }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent); }
.font-display { font-family: var(--font-display); }
.font-bold { font-weight: 700; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ─── LANDING PAGE ─── */
.landing-hero {
  min-height: 100vh;
  background: var(--bg-base);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.hero-glow {
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245,158,11,0.12) 0%, transparent 70%);
  top: -200px; left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}
.landing-nav {
  display: flex; align-items: center;
  padding: 20px 60px;
  border-bottom: 1px solid var(--border);
  background: rgba(var(--bg-base), 0.8);
  backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 50;
}
.hero-content { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 80px 20px; }
.hero-badge { display: inline-flex; align-items: center; gap: 6px; background: var(--accent-light); color: var(--accent); border: 1px solid rgba(245,158,11,0.3); padding: 4px 14px; border-radius: var(--radius-full); font-size: 12.5px; font-weight: 500; margin-bottom: 24px; }
.hero-title { font-family: var(--font-display); font-size: clamp(36px, 6vw, 72px); font-weight: 800; line-height: 1.08; letter-spacing: -2px; color: var(--text-primary); max-width: 820px; margin-bottom: 20px; }
.hero-title .accent { color: var(--accent); }
.hero-subtitle { font-size: 18px; color: var(--text-secondary); max-width: 520px; line-height: 1.7; margin-bottom: 36px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.hero-features { display: flex; gap: 24px; margin-top: 52px; flex-wrap: wrap; justify-content: center; }
.hero-feature { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text-muted); }
.hero-feature .dot { width: 6px; height: 6px; background: var(--success); border-radius: 50%; }

/* ═══════════════════════════════════════════════════════════════
   EXTENDED COMPONENTS (added in build pass 2)
═══════════════════════════════════════════════════════════════ */

/* ── Admin Two-col ──────────────────────────────────────────── */
.admin-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
@media (max-width: 1024px) { .admin-two-col { grid-template-columns: 1fr; } }

/* ── Plan Breakdown ─────────────────────────────────────────── */
.plan-breakdown-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; padding: 4px 0; }
@media (max-width: 900px) { .plan-breakdown-grid { grid-template-columns: repeat(2,1fr); } }
.plan-breakdown-item {}
.plan-breakdown-header { display: flex; align-items: center; gap: 8px; }
.plan-breakdown-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

/* ── Profile Layout ─────────────────────────────────────────── */
.profile-layout { display: grid; grid-template-columns: 300px 1fr; gap: 20px; }
@media (max-width: 900px) { .profile-layout { grid-template-columns: 1fr; } }
.profile-sidebar-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px 20px; height: fit-content; }
.profile-main-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; }
.profile-avatar-wrap { text-align: center; padding-bottom: 20px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.profile-avatar { position: relative; width: 88px; height: 88px; border-radius: 50%; overflow: hidden; margin: 0 auto 12px; background: var(--amber); display: flex; align-items: center; justify-content: center; }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-initials { font-size: 28px; font-weight: 700; color: #000; font-family: var(--font-display); }
.avatar-upload-btn { position: absolute; bottom: 0; right: 0; background: var(--surface); border: 2px solid var(--border); border-radius: 50%; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text-secondary); transition: all .15s; }
.avatar-upload-btn:hover { background: var(--amber); color: #000; border-color: var(--amber); }
.profile-name { font-weight: 700; font-size: 16px; color: var(--text-primary); margin-bottom: 2px; }
.profile-email { font-size: 13px; color: var(--text-muted); }
.profile-stats { display: flex; gap: 0; border-top: 1px solid var(--border); padding-top: 16px; }
.profile-stat { flex: 1; text-align: center; padding: 0 8px; border-right: 1px solid var(--border); }
.profile-stat:last-child { border-right: none; }
.profile-stat-val { display: block; font-size: 20px; font-weight: 700; color: var(--text-primary); font-family: var(--font-display); }
.profile-stat-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; }
.plan-limits { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; }
.plan-limit-row { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-muted); }
.plan-limit-row span:last-child { font-weight: 600; color: var(--text-primary); }
.notif-list { display: flex; flex-direction: column; gap: 0; }
.notif-item { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; border-bottom: 1px solid var(--border-subtle); }
.notif-item:last-child { border-bottom: none; }
.notif-label { font-size: 14px; font-weight: 500; color: var(--text-primary); }
.notif-desc { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.form-actions { display: flex; gap: 12px; justify-content: flex-end; padding-top: 8px; }
.danger-zone { }
.danger-zone-title { font-size: 14px; font-weight: 600; color: #ef4444; margin-bottom: 12px; }
.danger-zone-body { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px; background: rgba(239,68,68,.05); border: 1px solid rgba(239,68,68,.2); border-radius: var(--radius); }

/* ── Plans Grid ─────────────────────────────────────────────── */
.plans-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
@media (max-width: 1100px) { .plans-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 600px) { .plans-grid { grid-template-columns: 1fr; } }
.plan-pricing-card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px 20px; display: flex; flex-direction: column; gap: 0; }
.plan-pricing-card.popular { border-color: var(--amber); box-shadow: 0 0 0 1px var(--amber)20; }
.plan-pricing-card.current { border-color: var(--border); opacity: .8; }
.plan-popular-badge { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); background: var(--amber); color: #000; font-size: 10px; font-weight: 700; padding: 3px 12px; border-radius: 100px; white-space: nowrap; letter-spacing: .05em; }
.plan-current-badge { position: absolute; top: -10px; right: 16px; background: var(--surface-2); color: var(--text-muted); font-size: 10px; font-weight: 600; padding: 3px 12px; border-radius: 100px; border: 1px solid var(--border); }
.plan-pricing-header { margin-bottom: 20px; }
.plan-pricing-name { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); margin-bottom: 8px; }
.plan-pricing-price { display: flex; align-items: baseline; gap: 2px; }
.plan-price-currency { font-size: 18px; font-weight: 600; color: var(--text-secondary); }
.plan-price-amount { font-size: 32px; font-weight: 800; color: var(--text-primary); font-family: var(--font-display); }
.plan-price-period { font-size: 13px; color: var(--text-muted); margin-left: 2px; }
.plan-features { list-style: none; padding: 0; margin: 0 0 24px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.plan-feature { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; }
.plan-feature.has { color: var(--text-primary); }
.plan-feature.has svg { color: #22c55e; flex-shrink: 0; margin-top: 1px; }
.plan-feature.missing { color: var(--text-muted); }
.plan-feature.missing svg { color: var(--border); flex-shrink: 0; margin-top: 1px; }
.billing-toggle { display: flex; align-items: center; gap: 8px; }
.usage-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; margin-top: 20px; }
.usage-row { }
.usage-info { display: flex; justify-content: space-between; margin-bottom: 6px; }
.usage-label { font-size: 13px; color: var(--text-secondary); }
.usage-value { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.billing-section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; margin-top: 16px; }
.billing-section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.empty-state-sm { display: flex; align-items: center; gap: 16px; padding: 16px; background: var(--surface-2); border-radius: var(--radius); }
.empty-icon-sm { font-size: 24px; }
.pay-summary { background: var(--surface-2); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.pay-line { display: flex; justify-content: space-between; font-size: 14px; color: var(--text-secondary); }
.pay-line.total { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); font-size: 16px; font-weight: 700; color: var(--text-primary); }
.pay-divider { display: none; }
.pay-notice { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; color: var(--text-muted); background: var(--surface-2); padding: 12px; border-radius: var(--radius); }

/* ── Template Filters ───────────────────────────────────────── */
.template-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.template-filter-btn { padding: 7px 16px; border-radius: 100px; border: 1px solid var(--border); background: transparent; color: var(--text-secondary); font-size: 13px; font-weight: 500; cursor: pointer; transition: all .15s; font-family: var(--font-body); }
.template-filter-btn:hover { border-color: var(--amber); color: var(--amber); }
.template-filter-btn.active { background: var(--amber); color: #000; border-color: var(--amber); font-weight: 600; }
.templates-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
@media (max-width: 1024px) { .templates-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 600px) { .templates-grid { grid-template-columns: 1fr; } }
.template-card-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; transition: all .2s; }
.template-card-item:hover { border-color: var(--amber); transform: translateY(-2px); }
.template-preview { position: relative; height: 180px; overflow: hidden; }
.template-preview img { width: 100%; height: 100%; object-fit: cover; }
.template-preview-placeholder { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.template-preview-icon { font-size: 32px; }
.template-preview-name { font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.template-premium-badge { position: absolute; top: 10px; right: 10px; background: var(--amber); color: #000; font-size: 10px; font-weight: 700; padding: 3px 10px; border-radius: 100px; letter-spacing: .05em; }
.template-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; gap: 10px; opacity: 0; transition: opacity .2s; }
.template-card-item:hover .template-overlay { opacity: 1; }
.template-card-info { padding: 16px; }
.template-card-name { font-size: 14px; font-weight: 600; color: var(--text-primary); margin-bottom: 6px; }
.template-card-meta { display: flex; gap: 6px; margin-bottom: 6px; }
.template-card-desc { font-size: 12px; color: var(--text-muted); line-height: 1.5; }

/* ── Admin Template Thumb ───────────────────────────────────── */
.template-thumb-sm { width: 40px; height: 40px; border-radius: 8px; overflow: hidden; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.template-thumb-sm img { width: 100%; height: 100%; object-fit: cover; }

/* ── Filters Bar ────────────────────────────────────────────── */
.filters-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.filters-bar .form-control-sm { height: 36px; padding: 0 12px; font-size: 13px; min-width: 120px; }

/* ── Pagination ─────────────────────────────────────────────── */
.pagination { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 16px; border-top: 1px solid var(--border); }
.page-btn { padding: 6px 16px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface-2); color: var(--text-secondary); font-size: 13px; text-decoration: none; transition: all .15s; }
.page-btn:hover { border-color: var(--amber); color: var(--amber); }
.page-info { font-size: 13px; color: var(--text-muted); }

/* ── User cell / Table extras ───────────────────────────────── */
.user-cell { display: flex; align-items: center; gap: 10px; }
.user-avatar-sm { width: 32px; height: 32px; border-radius: 50%; background: var(--amber); color: #000; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex-shrink: 0; }
.table-actions { display: flex; gap: 6px; white-space: nowrap; }
.empty-row { text-align: center; color: var(--text-muted); padding: 40px; font-size: 14px; }
.event-type-icon-sm { width: 34px; height: 34px; background: var(--surface-2); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.badge-select { background: var(--surface-2); border: 1px solid var(--border); color: var(--text-secondary); padding: 4px 8px; border-radius: var(--radius); font-size: 12px; cursor: pointer; }

/* ── Color picker ───────────────────────────────────────────── */
.color-input-wrap { display: flex; align-items: center; gap: 8px; }
.color-picker { width: 40px; height: 36px; padding: 2px; border-radius: 6px; border: 1px solid var(--border); cursor: pointer; background: transparent; }
.code-textarea { font-family: 'SF Mono', 'Consolas', monospace; font-size: 12px; }

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

/* ── Modal XL ───────────────────────────────────────────────── */
.modal-xl { max-width: 900px; }
.modal-lg { max-width: 680px; }
