/* ========================================
   Party Planner – Spring 2026 Theme
   Palette: violet · coral · teal · amber
   ======================================== */

:root {
  --primary:       #7C3AED;
  --primary-light: #A78BFA;
  --primary-dark:  #5B21B6;
  --secondary:     #EC4899;
  --accent:        #06B6D4;
  --success:       #10B981;
  --warning:       #F59E0B;
  --danger:        #EF4444;

  --bg:            #F5F3FF;
  --card-bg:       #FFFFFF;
  --text:          #1F2937;
  --text-muted:    #6B7280;
  --border:        #E5E7EB;

  --radius:        12px;
  --radius-sm:     8px;
  --shadow:        0 4px 6px -1px rgba(124,58,237,.12), 0 2px 4px -1px rgba(0,0,0,.06);
  --shadow-lg:     0 10px 25px -5px rgba(124,58,237,.18);
  --transition:    .2s ease;

  --header-h:      64px;
  --footer-h:      56px;
}

/* ── Color schemes ──────────────────────────── */
/* Violet = default (:root). Others override primary colors + bg tint. */

/* Midnight — electric blue, premium SaaS feel */
[data-scheme="midnight"] {
  --primary:       #2563EB;
  --primary-light: #93C5FD;
  --primary-dark:  #1D4ED8;
  --bg:            #EFF6FF;
  --shadow:        0 4px 6px -1px rgba(37,99,235,.12), 0 2px 4px -1px rgba(0,0,0,.06);
  --shadow-lg:     0 10px 25px -5px rgba(37,99,235,.2);
}
[data-scheme="midnight"][data-theme="dark"] {
  --bg:        #060D1F;
  --card-bg:   #0D1A35;
  --border:    #1E3058;
  --text:      #DBEAFE;
  --text-muted:#6B8EC4;
}

/* Sunset — warm coral/orange, trendy & energetic */
[data-scheme="sunset"] {
  --primary:       #F97316;
  --primary-light: #FDBA74;
  --primary-dark:  #EA580C;
  --bg:            #FFF7ED;
  --shadow:        0 4px 6px -1px rgba(249,115,22,.12), 0 2px 4px -1px rgba(0,0,0,.06);
  --shadow-lg:     0 10px 25px -5px rgba(249,115,22,.2);
}
[data-scheme="sunset"][data-theme="dark"] {
  --bg:        #1A0C00;
  --card-bg:   #2A1500;
  --border:    #52280A;
  --text:      #FEF0E0;
  --text-muted:#B07A50;
}

/* Berry — vivid fuchsia/magenta, playful & bold */
[data-scheme="berry"] {
  --primary:       #C026D3;
  --primary-light: #F0ABFC;
  --primary-dark:  #A21CAF;
  --bg:            #FDF4FF;
  --shadow:        0 4px 6px -1px rgba(192,38,211,.12), 0 2px 4px -1px rgba(0,0,0,.06);
  --shadow-lg:     0 10px 25px -5px rgba(192,38,211,.2);
}
[data-scheme="berry"][data-theme="dark"] {
  --bg:        #160919;
  --card-bg:   #240D2A;
  --border:    #481A52;
  --text:      #FAE8FF;
  --text-muted:#A060B0;
}

/* Teal — clean & modern, calm confidence */
[data-scheme="teal"] {
  --primary:       #0D9488;
  --primary-light: #5EEAD4;
  --primary-dark:  #0F766E;
  --bg:            #F0FDFA;
  --shadow:        0 4px 6px -1px rgba(13,148,136,.12), 0 2px 4px -1px rgba(0,0,0,.06);
  --shadow-lg:     0 10px 25px -5px rgba(13,148,136,.2);
}
[data-scheme="teal"][data-theme="dark"] {
  --bg:        #031714;
  --card-bg:   #082824;
  --border:    #134E4A;
  --text:      #CCFBF1;
  --text-muted:#5BA89E;
}

/* Graphite — charcoal & slate, ultra-minimal */
[data-scheme="graphite"] {
  --primary:       #374151;
  --primary-light: #9CA3AF;
  --primary-dark:  #1F2937;
  --bg:            #F9FAFB;
  --shadow:        0 4px 6px -1px rgba(55,65,81,.12), 0 2px 4px -1px rgba(0,0,0,.06);
  --shadow-lg:     0 10px 25px -5px rgba(55,65,81,.2);
}
[data-scheme="graphite"][data-theme="dark"] {
  --bg:        #0A0C0E;
  --card-bg:   #141618;
  --border:    #2A2D32;
  --text:      #F3F4F6;
  --text-muted:#6B7280;
}

/* ── Dark mode ─────────────────────────────── */
[data-theme="dark"] {
  --bg:            #0F0D1A;
  --card-bg:       #1A1730;
  --text:          #EDE9FF;
  --text-muted:    #9B91CC;
  --border:        #2D2850;
  --shadow:        0 4px 6px -1px rgba(0,0,0,.45), 0 2px 4px -1px rgba(0,0,0,.3);
  --shadow-lg:     0 10px 25px -5px rgba(0,0,0,.6);
}

[data-theme="dark"] body { color-scheme: dark; }

/* Inputs in dark mode */
[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
  background: #1A1730;
  color: var(--text);
  border-color: var(--border);
  color-scheme: dark;
}

/* Floor canvas */
[data-theme="dark"] .floor-canvas {
  background: #0C0B16;
  background-image:
    linear-gradient(rgba(167,139,250,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(167,139,250,.08) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* Seat chip hover */
[data-theme="dark"] .seat-chip:hover     { background: #2D2850; }
[data-theme="dark"] .seat-chip           { background: var(--bg); }

/* VIP chip in dark */
[data-theme="dark"] .vip-chip { background: #2D2200 !important; border-color: #D97706 !important; }

/* Bulk action bar */
[data-theme="dark"] .bulk-action-bar { background: #1E1B3A; border-color: #4C3D8A; }
[data-theme="dark"] .bulk-count-label { color: var(--primary-light); }

/* CSV upload hover */
[data-theme="dark"] .csv-upload-area:hover,
[data-theme="dark"] .csv-upload-area.dragover { background: #1A1730; }

/* Published banner */
[data-theme="dark"] .published-banner {
  background: #0C2A20; border-color: #065F46; color: #6EE7B7;
}

/* Search result hover */
[data-theme="dark"] .search-result:hover { background: #2D2850; }

/* Public seat row match */
[data-theme="dark"] .public-seat-row.match { background: #1E1B3A; }

/* Flash animation in dark */
[data-theme="dark"] .public-table-rect.flash { animation: flash-table-dark .6s ease 2; }
@keyframes flash-table-dark {
  0%,100% { background: var(--card-bg); }
  40%      { background: #2D2850; }
}

/* Alerts */
[data-theme="dark"] .alert-error   { background: #2D0F0F; color: #FCA5A5; border-color: #7F1D1D; }
[data-theme="dark"] .alert-success { background: #0C2A20; color: #6EE7B7; border-color: #065F46; }
[data-theme="dark"] .alert-info    { background: #0F1E40; color: #93C5FD; border-color: #1E3A8A; }

/* Badges */
[data-theme="dark"] .badge-admin { background: #3D2E00; color: #FCD34D; }
[data-theme="dark"] .badge-user  { background: #2D2850; color: var(--text-muted); }

/* Table badge */
[data-theme="dark"] .table-badge          { background: #2D2850; color: var(--primary-light); }
[data-theme="dark"] .table-badge.unassigned { background: #1A1730; color: var(--text-muted); }

/* Manual add form */
[data-theme="dark"] .manual-add-form { background: #1A1730; }

/* Editable cells */
[data-theme="dark"] .editable-cell:hover,
[data-theme="dark"] .editable-name:hover { background: rgba(167,139,250,.12); }

/* Floor table in dark */
[data-theme="dark"] .floor-table          { background: #1A1730; border-color: #2D2850; }
[data-theme="dark"] .floor-table:hover    { border-color: var(--primary-light); }
[data-theme="dark"] .floor-table.vip      { background: #2D2200; border-color: #D97706; }
[data-theme="dark"] .floor-table-num      { color: var(--text); }

/* Modal backdrop darker */
[data-theme="dark"] .modal-overlay        { background: rgba(0,0,0,.65); }
[data-theme="dark"] .modal-close:hover    { background: #2D2850; }

/* Publish URL box */
[data-theme="dark"] .publish-url-box input { background: #0F0D1A; }

/* Login page */
[data-theme="dark"] .login-page           { background: var(--bg); }
[data-theme="dark"] .login-card           { background: var(--card-bg); }

/* Alloc options panel */
[data-theme="dark"] .alloc-option-row     { border-color: var(--border); }

/* Admin table */
[data-theme="dark"] .admin-table th       { background: #1A1730; }

/* Stats card */
[data-theme="dark"] .stat-card            { background: var(--card-bg); }

/* Tier */
[data-theme="dark"] .tier-limit-card { background: var(--card-bg); }
[data-theme="dark"] .tier-select     { background: #1A1730; border-color: var(--border); }

/* Tabs */
[data-theme="dark"] .tab-btn             { color: var(--text-muted); }
[data-theme="dark"] .tab-btn.active      { color: var(--primary-light); border-bottom-color: var(--primary-light); }
[data-theme="dark"] .tab-btn:hover:not(.active) { color: var(--text); }

/* Drop hint */
[data-theme="dark"] .drop-hint { border-color: var(--border); }

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* --- Header --- */
.site-header {
  height: var(--header-h);
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  box-shadow: 0 2px 12px rgba(91,33,182,.3);
  position: sticky; top: 0; z-index: 100;
}

.header-inner {
  max-width: 1100px; margin: 0 auto;
  height: 100%; padding: 0 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
}

.logo {
  color: #fff;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -.5px;
  text-decoration: none;
}

.header-nav {
  display: flex; align-items: center; gap: 1rem;
  color: rgba(255,255,255,.9);
}

#nav-user-name { font-size: .9rem; }

.nav-link { color: rgba(255,255,255,.9); font-size: .9rem; }
.nav-link:hover { color: #fff; }

/* --- Footer --- */
.site-footer {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 99;
  height: var(--footer-h);
  background: var(--primary-dark);
}

.footer-inner {
  max-width: 1100px; margin: 0 auto;
  height: 100%; padding: 0 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
  color: rgba(255,255,255,.7);
  font-size: .85rem;
}

/* --- Main container --- */
.container {
  max-width: 1100px; margin: 0 auto;
  padding: 2rem 1.5rem;
  flex: 1;
}

#app { padding-bottom: var(--footer-h); }

/* --- Utility --- */
.hidden { display: none !important; }
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-1 { gap: .5rem; }
.gap-2 { gap: 1rem; }
.justify-between { justify-content: space-between; }
.w-full { width: 100%; }
.text-center { text-align: center; }

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .55rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: .9rem; font-weight: 600;
  border: none; cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), opacity var(--transition);
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.btn-primary   { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); box-shadow: 0 4px 12px rgba(124,58,237,.35); }

.btn-secondary { background: var(--secondary); color: #fff; }
.btn-secondary:hover { background: #db2777; }

.btn-accent    { background: var(--accent); color: #fff; }
.btn-accent:hover { background: #0891b2; }

.btn-success   { background: var(--success); color: #fff; }
.btn-success:hover { background: #059669; }

.btn-danger    { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; }

.btn-warning   { background: var(--warning); color: #fff; border: none; }
.btn-warning:hover { background: #d97706; }

.btn-outline   { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }

.btn-outline-sm {
  background: transparent; color: #fff;
  border: 1.5px solid rgba(255,255,255,.6);
  padding: .35rem 1rem; font-size: .85rem; font-weight: 500; border-radius: 6px;
}
.btn-outline-sm:hover { background: rgba(255,255,255,.15); }

.btn-sm { padding: .35rem .85rem; font-size: .82rem; }
.btn-icon { padding: .4rem .6rem; }

/* ── Scheme picker ───────────────────────────── */
.scheme-picker {
  position: relative; display: inline-flex; align-items: center;
}
.scheme-picker-btn {
  background: transparent; border: 1.5px solid rgba(255,255,255,.6);
  border-radius: 6px; padding: .35rem .55rem; cursor: pointer;
  display: flex; align-items: center; gap: 5px;
  color: #fff; font-size: .82rem; white-space: nowrap;
  transition: background var(--transition);
}
.scheme-picker-btn:hover { background: rgba(255,255,255,.15); }
.scheme-swatch {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.5); flex-shrink: 0;
}
.scheme-dropdown {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 200;
  background: var(--card-bg); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
  padding: .4rem; min-width: 160px;
  display: none; flex-direction: column; gap: 2px;
}
.scheme-dropdown.open { display: flex; }
.scheme-option {
  display: flex; align-items: center; gap: .6rem;
  padding: .45rem .7rem; border-radius: 6px; cursor: pointer;
  font-size: .875rem; color: var(--text); border: none;
  background: transparent; width: 100%; text-align: left;
  transition: background var(--transition);
}
.scheme-option:hover { background: rgba(124,58,237,.08); }
.scheme-option.active { background: rgba(124,58,237,.14); font-weight: 600; }
.scheme-dot {
  width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid rgba(0,0,0,.12);
}

/* --- Cards --- */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  transition: box-shadow var(--transition);
}
.card:hover { box-shadow: var(--shadow-lg); }

/* --- Forms --- */
.form-group { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1.1rem; }
.form-group label { font-size: .85rem; font-weight: 600; color: var(--text); }

input[type="text"], input[type="email"], input[type="date"], input[type="number"],
select, textarea {
  padding: .55rem .85rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .9rem;
  color: var(--text);
  background: #fff;
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(124,58,237,.12);
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

/* --- Login Page --- */
.login-page {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  min-height: calc(100vh - var(--header-h) - var(--footer-h));
  text-align: center;
}

.login-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 3rem 2.5rem;
  max-width: 400px; width: 100%;
}

.login-card h1 { font-size: 2rem; color: var(--primary); margin-bottom: .5rem; }
.login-card p  { color: var(--text-muted); margin-bottom: 2rem; }

.btn-google {
  display: inline-flex; align-items: center; gap: .75rem;
  padding: .75rem 1.75rem;
  background: #fff; color: #3c4043;
  border: 1.5px solid #dadce0;
  border-radius: 8px; font-size: 1rem; font-weight: 500;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,.1);
  transition: box-shadow var(--transition), background var(--transition);
  text-decoration: none;
}
.btn-google:hover { box-shadow: 0 2px 8px rgba(0,0,0,.15); background: #f8f9fa; text-decoration: none; }
.btn-google svg  { width: 20px; height: 20px; flex-shrink: 0; }

/* --- Dashboard --- */
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.75rem;
  flex-wrap: wrap; gap: 1rem;
}
.page-header h1 { font-size: 1.6rem; color: var(--primary); }

.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

.event-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
  cursor: pointer;
}
.event-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }

.event-card-accent {
  height: 5px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
}
.event-card-body { padding: 1.25rem; }
.event-card-title { font-size: 1.1rem; font-weight: 700; margin-bottom: .4rem; }
.event-card-date  { font-size: .85rem; color: var(--text-muted); margin-bottom: .75rem; }

.event-card-stats {
  display: flex; gap: 1rem; margin-bottom: 1rem;
  font-size: .82rem; color: var(--text-muted);
}

.event-card-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

.empty-state {
  text-align: center; padding: 4rem 2rem; color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-state h2 { color: var(--text); margin-bottom: .5rem; }

/* --- Event Detail --- */
.event-detail-header {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius);
  padding: 2rem;
  color: #fff;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-lg);
}

.event-detail-header h1 { font-size: 1.8rem; margin-bottom: .5rem; }
.event-detail-header .meta { opacity: .85; font-size: .9rem; display: flex; gap: 1.5rem; flex-wrap: wrap; }

.back-link { color: var(--primary); display: inline-flex; align-items: center; gap: .35rem; margin-bottom: 1rem; font-weight: 500; }

/* --- Tabs --- */
.tabs { display: flex; gap: 0; border-bottom: 2px solid var(--border); margin-bottom: 1.5rem; }
.tab-btn {
  padding: .65rem 1.25rem; border: none; background: none;
  color: var(--text-muted); font-size: .9rem; font-weight: 600;
  cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px;
  transition: color var(--transition), border-color var(--transition);
}
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* --- Participants list --- */
.participants-toolbar {
  display: flex; gap: .75rem; flex-wrap: wrap; align-items: center;
  margin-bottom: 1.25rem;
}

.participant-table {
  width: 100%; border-collapse: collapse;
  font-size: .9rem;
}
.participant-table th {
  text-align: left; padding: .6rem 1rem;
  background: var(--bg); color: var(--text-muted);
  font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em;
  border-bottom: 1.5px solid var(--border);
}
.participant-table td {
  padding: .65rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.participant-table tr:last-child td { border-bottom: none; }
.participant-table tr:hover td { background: #faf5ff; }
.participant-table th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
.participant-table th.sortable:hover { color: var(--primary); }
.participant-table th.sort-asc::after  { content: ' ▲'; font-size: .65rem; }
.participant-table th.sort-desc::after { content: ' ▼'; font-size: .65rem; }
[data-theme="dark"] .participant-table tr:hover td { background: rgba(167,139,250,.06); }

.table-badge {
  display: inline-block;
  padding: .15rem .55rem;
  border-radius: 20px;
  font-size: .78rem; font-weight: 600;
  background: var(--primary-light); color: #fff;
}
.table-badge.unassigned { background: var(--border); color: var(--text-muted); }

/* --- Background image upload (event form) --- */
.file-upload-label {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .55rem .85rem;
  border: 1.5px dashed var(--primary-light);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: .85rem;
  color: var(--primary);
  transition: background var(--transition), border-color var(--transition);
}
.file-upload-label:hover { background: rgba(124,58,237,.06); border-color: var(--primary); }
.file-upload-label::before { content: '🖼'; font-size: 1.1rem; }

.bg-img-current {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .5rem;
}
.bg-img-current img {
  width: 80px;
  height: 50px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
}

/* --- CSV upload area --- */
.csv-upload-area {
  border: 2px dashed var(--primary-light);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}
.csv-upload-area:hover, .csv-upload-area.dragover {
  background: #f5f3ff; border-color: var(--primary);
}
.csv-upload-area .upload-icon { font-size: 2rem; margin-bottom: .5rem; }

/* --- Table allocation grid (drag & drop) --- */
.alloc-zoom-wrapper {
  overflow: auto;
  width: 100%;
}
.table-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.1rem;
  align-items: start;
  transition: zoom .15s ease;
}

.table-rect {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 2px solid transparent;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.table-rect.drag-over {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(6,182,212,.18), var(--shadow-lg);
  transform: scale(1.02);
}

.table-rect-header {
  padding: .6rem 1rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  display: flex; justify-content: space-between; align-items: center;
}
.table-num-label { font-weight: 700; font-size: .95rem; }
.table-seat-count {
  font-size: .75rem;
  background: rgba(255,255,255,.22);
  padding: .1rem .45rem;
  border-radius: 20px;
}
.table-seat-count.over-capacity { background: rgba(239,68,68,.55); }

.table-rect-body {
  padding: .65rem;
  min-height: 70px;
}

.drop-hint {
  display: none;
  color: var(--text-muted);
  font-size: .8rem;
  text-align: center;
  padding: .65rem;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-sm);
  margin: .2rem;
}
.drop-hint.visible          { display: block; }
.table-rect.drag-over .drop-hint { display: block; }

/* --- Seat chips (draggable) --- */
.seat-chip {
  display: flex; align-items: center; gap: .45rem;
  padding: .38rem .45rem;
  border-radius: var(--radius-sm);
  background: var(--bg);
  margin-bottom: .3rem;
  cursor: grab;
  transition: background var(--transition), box-shadow var(--transition), opacity var(--transition);
  user-select: none;
}
.seat-chip:last-of-type { margin-bottom: 0; }
.seat-chip:hover { background: #ede9fe; box-shadow: 0 2px 6px rgba(124,58,237,.12); }
.seat-chip.dragging { opacity: .35; cursor: grabbing; }

.seat-avatar-sm {
  width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-light), var(--secondary));
  color: #fff; font-size: .7rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.seat-chip-name {
  flex: 1; font-size: .83rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.drag-handle-icon { color: var(--text-muted); font-size: .85rem; opacity: .45; flex-shrink: 0; }

/* --- Unassigned zone --- */
.unassigned-zone {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 2px solid transparent;
  margin-bottom: 1.25rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.unassigned-zone.drag-over {
  border-color: var(--warning);
  box-shadow: 0 0 0 3px rgba(245,158,11,.18);
}
.unassigned-header {
  padding: .55rem 1rem;
  background: linear-gradient(135deg, var(--warning), #f97316);
  color: #fff; font-weight: 700; font-size: .88rem;
}
.unassigned-body {
  padding: .5rem;
  display: flex; flex-wrap: wrap; gap: .4rem;
  min-height: 48px;
}
.unassigned-body .seat-chip { margin-bottom: 0; }

/* --- Tier badges & plan info --- */
.tier-badge {
  display: inline-block;
  padding: .2rem .65rem;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: .03em;
  vertical-align: middle;
}
.tier-info-row {
  display: flex; align-items: center; gap: .6rem; margin-top: .3rem; flex-wrap: wrap;
}

/* Plan limits grid (admin) */
.tier-limits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.tier-limit-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.1rem 1.25rem;
  border-top: 4px solid var(--border);
}
.tier-limit-card.tier-free         { border-top-color: #6B7280; }
.tier-limit-card.tier-occasional   { border-top-color: var(--primary); }
.tier-limit-card.tier-professional { border-top-color: var(--success); }
.tier-limit-name {
  font-weight: 700; font-size: 1rem; margin-bottom: .6rem; color: var(--text);
}
.tier-limit-list {
  list-style: none; padding: 0;
}
.tier-limit-list li {
  font-size: .83rem; color: var(--text-muted);
  padding: .2rem 0;
  border-bottom: 1px solid var(--border);
}
.tier-limit-list li:last-child { border-bottom: none; }

/* Tier config table inputs */
.tier-config-table td { vertical-align: middle; }
.tier-config-table .tier-input {
  width: 70px !important;
  padding: .3rem .5rem;
  font-size: .85rem;
  text-align: center;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  color: var(--text);
}
.tier-config-table .tier-input:focus { border-color: var(--primary-light); }

/* Tier select in admin table */
.tier-select {
  padding: .25rem .5rem; font-size: .82rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--card-bg);
  color: var(--text);
  cursor: pointer;
  width: auto;
}

/* --- Admin Panel --- */
.admin-section { margin-bottom: 2rem; }
.admin-section h2 { font-size: 1.2rem; color: var(--primary); margin-bottom: 1rem; padding-bottom: .5rem; border-bottom: 2px solid var(--border); }

.stats-row { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }

.stat-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.75rem;
  flex: 1; min-width: 150px; text-align: center;
}
.stat-card .stat-num { font-size: 2rem; font-weight: 800; color: var(--primary); }
.stat-card .stat-label { font-size: .82rem; color: var(--text-muted); margin-top: .2rem; }

.admin-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.admin-table th {
  text-align: left; padding: .6rem 1rem;
  background: var(--bg); font-size: .78rem; text-transform: uppercase;
  letter-spacing: .05em; color: var(--text-muted);
  border-bottom: 1.5px solid var(--border);
}
.admin-table td { padding: .6rem 1rem; border-bottom: 1px solid var(--border); }
.admin-table tr:last-child td { border-bottom: none; }

.badge {
  display: inline-block; padding: .15rem .55rem; border-radius: 20px;
  font-size: .75rem; font-weight: 600;
}
.badge-admin   { background: #FDE68A; color: #92400E; }
.badge-user    { background: var(--border); color: var(--text-muted); }

/* --- Modal --- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
.modal-box {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: 0 25px 60px rgba(0,0,0,.25);
  width: 100%; max-width: 540px;
  padding: 2rem;
  position: relative;
  max-height: 90vh; overflow-y: auto;
}
.modal-close {
  position: absolute; top: 1rem; right: 1rem;
  background: none; border: none; font-size: 1.4rem;
  color: var(--text-muted); cursor: pointer;
  line-height: 1; padding: .2rem .4rem;
  border-radius: 4px;
}
.modal-close:hover { background: var(--bg); color: var(--text); }
.modal-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 1.5rem; color: var(--primary); }

/* --- Alert / Toast --- */
.alert {
  padding: .75rem 1.1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: .9rem;
  display: flex; align-items: flex-start; gap: .6rem;
}
.alert-error   { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }
.alert-success { background: #ECFDF5; color: #065F46; border: 1px solid #A7F3D0; }
.alert-info    { background: #EFF6FF; color: #1E40AF; border: 1px solid #BFDBFE; }

/* --- Spinner --- */
.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  margin: 2rem auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-center { display: flex; flex-direction: column; align-items: center; color: var(--text-muted); }

/* --- Misc --- */
.section-actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-bottom: 1rem; }

.manual-add-form {
  display: flex; gap: .75rem; flex-wrap: wrap; align-items: flex-end;
  padding: 1rem; background: var(--bg); border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
}
.manual-add-form .form-group { margin-bottom: 0; flex: 1; min-width: 160px; }

/* --- Inline editable name --- */
.editable-name {
  cursor: text;
  border-radius: 3px;
  border-bottom: 1px dashed transparent;
  transition: background var(--transition), border-color var(--transition);
  padding: 1px 3px;
  margin: -1px -3px;
}
.editable-name:hover {
  background: rgba(124,58,237,.07);
  border-bottom-color: var(--primary-light);
}
.editable-name-input {
  border: none;
  border-bottom: 2px solid var(--primary);
  outline: none;
  background: transparent;
  font-size: inherit;
  font-family: inherit;
  color: inherit;
  padding: 0 2px;
  min-width: 60px;
  width: auto;
}

/* --- Bulk action bar --- */
.bulk-action-bar {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
  background: #ede9fe;
  border: 1.5px solid var(--primary-light);
  border-radius: var(--radius-sm);
  padding: .55rem .85rem;
  margin-bottom: .6rem;
}
.bulk-action-bar.hidden { display: none; }
.bulk-count-label {
  font-weight: 700;
  font-size: .85rem;
  color: var(--primary-dark);
  white-space: nowrap;
  margin-right: .25rem;
}
.bulk-actions-group {
  display: flex;
  align-items: center;
  gap: .4rem;
  flex-wrap: wrap;
  flex: 1;
}
.bulk-table-select { width: auto !important; padding: .3rem .5rem; font-size: .8rem; }
.bulk-clear-btn { margin-left: auto; white-space: nowrap; }

/* --- Checkbox column --- */
.cb-col { width: 32px; padding: .4rem .5rem !important; text-align: center; }

/* --- Not-needed rows --- */
tr.not-needed td { opacity: .45; }
tr.not-needed .editable-cell { text-decoration: line-through; }
tr.not-needed .table-badge,
tr.not-needed .vip-toggle-btn { opacity: .6; }

/* --- Editable table cells (participant list) --- */
.editable-cell {
  display: inline-block;
  cursor: text;
  border-radius: 3px;
  border-bottom: 1px dashed transparent;
  transition: background var(--transition), border-color var(--transition);
  padding: 1px 3px;
  margin: -1px -3px;
  min-width: 30px;
}
.editable-cell:empty::before { content: '—'; color: var(--text-muted); }
.editable-cell:hover {
  background: rgba(124,58,237,.07);
  border-bottom-color: var(--primary-light);
}

/* --- VIP chip / star --- */
.vip-chip { border: 1.5px solid #fbbf24 !important; background: #fffbeb !important; }
.vip-star { font-size: .75rem; margin-left: .1rem; flex-shrink: 0; }
.vip-toggle-btn { min-width: 54px; font-size: .78rem; padding: .25rem .5rem; }

/* --- Published banner (allocation tab) --- */
.published-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .75rem 1rem;
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  border-radius: var(--radius-sm);
  margin-bottom: .75rem;
  color: #065F46;
  font-weight: 600;
}
.published-banner-info {
  display: flex; align-items: center; gap: .85rem; flex-wrap: wrap;
}
.alloc-qr {
  width: 90px; height: 90px;
  border-radius: 6px;
  border: 3px solid #fff;
  box-shadow: var(--shadow);
  flex-shrink: 0;
  cursor: pointer;
}

/* --- Publish UI --- */
.publish-url-box {
  display: flex; gap: .5rem; align-items: center;
}
.publish-url-box input {
  flex: 1; font-size: .85rem; background: var(--bg);
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  padding: .45rem .75rem; color: var(--text);
}
.qr-container { display: flex; justify-content: center; }
.qr-container canvas { border-radius: var(--radius-sm); border: 4px solid var(--bg); }

/* --- Public page --- */
.public-page { max-width: 800px; margin: 0 auto; padding: 1rem; }

.public-event-header {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius);
  padding: 2rem;
  color: #fff;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.public-event-header h1 { font-size: 1.8rem; margin-bottom: .4rem; }
.public-event-header .meta {
  opacity: .85; font-size: .9rem;
  display: flex; justify-content: center; gap: 1.25rem; flex-wrap: wrap;
  margin-top: .5rem;
}

.search-section { margin-bottom: 1.25rem; }
.search-input {
  width: 100%;
  padding: .85rem 1.25rem;
  font-size: 1.1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--card-bg);
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124,58,237,.12);
}

.search-results-list { margin-bottom: 1.25rem; }
.search-result {
  display: flex; align-items: center; justify-content: space-between;
  padding: .65rem 1rem;
  background: var(--card-bg);
  border-radius: var(--radius-sm);
  margin-bottom: .4rem;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: background var(--transition);
}
.search-result:hover { background: #ede9fe; }
.search-result-name { font-weight: 600; }
.search-no-results {
  text-align: center; padding: 1rem;
  color: var(--text-muted); font-size: .9rem;
}

/* Public table grid — same structure as allocation grid */
.public-table-rect {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 2px solid transparent;
  transition: border-color .25s, box-shadow .25s, transform .25s;
}
.public-table-rect.highlighted {
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(236,72,153,.2), var(--shadow-lg);
  transform: scale(1.03);
}
@keyframes flash-table {
  0%,100% { background: var(--card-bg); }
  40%      { background: #fdf4ff; }
}
.public-table-rect.flash { animation: flash-table .6s ease 2; }
.public-table-rect-header {
  padding: .6rem 1rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  display: flex; justify-content: space-between; align-items: center;
}
.public-table-rect-header .table-num-label { font-weight: 700; font-size: .95rem; }
.public-table-rect-header .table-seat-count {
  font-size: .75rem; background: rgba(255,255,255,.22);
  padding: .1rem .45rem; border-radius: 20px;
}
.public-table-rect-body { padding: .5rem; }
.public-seat-row {
  display: flex; align-items: center; gap: .45rem;
  padding: .35rem .45rem; border-radius: var(--radius-sm);
  font-size: .85rem;
}
.public-seat-row.match { background: #fdf4ff; font-weight: 600; }
.public-seat-avatar {
  width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-light), var(--secondary));
  color: #fff; font-size: .7rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* --- Allocation options panel --- */
.alloc-options { padding: 1rem 1.25rem; margin-bottom: 1rem; }
.alloc-options-title { font-weight: 700; margin-bottom: .75rem; color: var(--primary); }
.alloc-option-row {
  display: flex; align-items: flex-start; gap: .75rem;
  padding: .5rem 0; cursor: pointer;
  border-top: 1px solid var(--border);
}
.alloc-option-row input[type="checkbox"] {
  margin-top: .2rem; flex-shrink: 0;
  accent-color: var(--primary); width: 16px; height: 16px;
}
.alloc-option-row strong { display: block; font-size: .9rem; }
.alloc-option-row span   { font-size: .8rem; color: var(--text-muted); }

/* --- Zoom controls (allocation tab) --- */
.zoom-controls {
  display: flex; align-items: center; gap: .25rem;
  margin-left: auto;
  background: var(--card-bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .2rem .35rem;
}
.zoom-btn { padding: .25rem .55rem !important; font-size: .9rem !important; min-width: 28px; }
.zoom-label {
  font-size: .8rem; font-weight: 700; color: var(--text-muted);
  min-width: 38px; text-align: center;
}

/* --- VIP table (allocation view) --- */
.vip-table-rect   { border-color: #F59E0B !important; }
.vip-table-header { background: linear-gradient(135deg, #D97706, #F59E0B) !important; }

/* --- Table layout floor plan --- */
.layout-toolbar {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: .75rem; margin-bottom: .75rem;
}
.legend-item { display: flex; align-items: center; gap: .35rem; font-size: .82rem; color: var(--text-muted); }
.legend-dot  { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.vip-dot     { background: #F59E0B; }

.floor-canvas {
  position: relative; width: 100%; height: 520px;
  background: #F8F7FF;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background-image:
    linear-gradient(rgba(124,58,237,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124,58,237,.06) 1px, transparent 1px);
  background-size: 40px 40px;
}

.floor-table {
  position: absolute;
  width: 80px; height: 70px;
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  cursor: grab; user-select: none; gap: 2px;
  transition: box-shadow var(--transition), border-color var(--transition);
}
.floor-table:hover   { box-shadow: var(--shadow-lg); border-color: var(--primary-light); }
.floor-table.vip     { border-color: #F59E0B; background: #FFFBEB; }
.floor-table.vip:hover { border-color: #D97706; }
.floor-table.dragging { cursor: grabbing; box-shadow: 0 12px 30px rgba(0,0,0,.2); z-index: 10; opacity: .9; }

.vip-crown        { font-size: .85rem; line-height: 1; }
.floor-table-num  { font-weight: 700; font-size: .88rem; color: var(--text); }
.floor-table-count { font-size: .72rem; color: var(--text-muted); }

/* ── Footer nav ─────────────────────────────── */
.footer-nav    { display: flex; gap: 1.25rem; }
.footer-link   { color: var(--card-bg); opacity: .7; text-decoration: none; font-size: .88rem; font-weight: 500; transition: color var(--transition), opacity var(--transition); }
.footer-link:hover { color: var(--bg); opacity: 1; }

/* ── Pricing page ────────────────────────────── */
.pricing-page {
  max-width: 1200px; margin: 0 auto; padding: 2.5rem 1rem 3rem;
}
.pricing-header {
  text-align: center; margin-bottom: 2.5rem;
}
.pricing-header h1 { font-size: 2rem; margin-bottom: .5rem; }
.pricing-header p  { color: var(--text-muted); font-size: 1.05rem; }

/* ── Pricing grid — 3 top row, 2 bottom row centered ── */
/*
  6-column grid:
  Row 1: cards 1-3 each span 2 cols  → [1-2][3-4][5-6]
  Row 2: cards 4-5 each span 2 cols, offset by 1 → [2-4][4-6]
  This places row-2 cards directly below the gaps of row 1.
*/
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.5rem;
}
.pricing-card:nth-child(1) { grid-column: 1 / 3; }
.pricing-card:nth-child(2) { grid-column: 3 / 5; }
.pricing-card:nth-child(3) { grid-column: 5 / 7; }
.pricing-card:nth-child(4) { grid-column: 2 / 4; }
.pricing-card:nth-child(5) { grid-column: 4 / 6; }

.pricing-card {
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  position: relative;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}
.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.pricing-popular {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary), var(--shadow-lg);
}
.pricing-popular-badge {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--primary); color: #fff;
  font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: .25rem .85rem; border-radius: 999px; white-space: nowrap;
}
.pricing-tier-label {
  font-size: .85rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--primary); margin-bottom: .75rem;
}
.pricing-price {
  display: flex; align-items: baseline; gap: .25rem; margin-bottom: 1.25rem;
}
.pricing-amount { font-size: 2.75rem; font-weight: 800; color: var(--text); line-height: 1; }
.pricing-period { font-size: .9rem; color: var(--text-muted); }
.pricing-features {
  list-style: none; margin: 0 0 1.75rem; padding: 0;
  display: flex; flex-direction: column; gap: .55rem; flex: 1;
}
.pricing-features li { font-size: .9rem; color: var(--text-muted); }
.pricing-cta { width: 100%; text-align: center; justify-content: center; margin-top: auto; }

.pricing-footer-note {
  text-align: center; margin-top: 2rem; font-size: .85rem; color: var(--text-muted);
}

[data-theme="dark"] .pricing-popular {
  box-shadow: 0 0 0 1px var(--primary-light), var(--shadow-lg);
}

@media (max-width: 700px) {
  .pricing-grid { grid-template-columns: 1fr; }
  .pricing-card:nth-child(n) { grid-column: auto; }
}

/* ── Contact page ─────────────────────────────── */
.contact-page    { max-width: 640px; margin: 0 auto; padding: 2.5rem 1rem 3rem; }
.contact-header  { text-align: center; margin-bottom: 2rem; }
.contact-header h1 { font-size: 2rem; margin-bottom: .4rem; }
.contact-header p  { color: var(--text-muted); }
.contact-card    { padding: 2rem; }

/* ── Account settings / danger zone ─────────────── */
.danger-zone {
  border: 2px solid var(--danger);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin-top: 1rem;
}
.danger-zone h3 { color: var(--danger); margin: 0 0 .4rem; font-size: .95rem; }
.danger-zone p  { font-size: .88rem; color: var(--text-muted); margin: 0 0 .75rem; }

/* ── Admin: contact messages ─────────────────────── */
.msg-card { margin-bottom: 1rem; padding: 1rem 1.25rem; }
.msg-card-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  flex-wrap: wrap; gap: .5rem; margin-bottom: .25rem;
}
.msg-reply-preview {
  background: var(--bg); border-left: 3px solid var(--success);
  padding: .5rem .75rem; border-radius: 4px;
  font-size: .85rem; margin-top: .5rem; color: var(--text-muted);
}
.msg-reply-form { margin-top: .75rem; }
.msg-reply-form textarea { width: 100%; margin-bottom: .5rem; }

/* ── Admin: feedback ─────────────────────────────── */
.fb-admin-card { margin-bottom: 1rem; padding: 1rem 1.25rem; }
.fb-admin-header {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: .5rem; margin-bottom: .35rem;
}
.fb-screenshot-thumb {
  margin-top: .5rem; cursor: zoom-in; position: relative;
}
.fb-screenshot-thumb img {
  max-width: 100%; max-height: 160px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); object-fit: cover;
  transition: max-height .3s ease;
}
.fb-screenshot-thumb.expanded img  { max-height: none; cursor: zoom-out; }
.fb-thumb-hint {
  display: block; font-size: .72rem; color: var(--text-muted); margin-top: .2rem;
}

/* ── Floating feedback button ────────────────────── */
.feedback-fab {
  position: fixed; bottom: calc(var(--footer-h) + .75rem); right: 1.5rem; z-index: 900;
  width: 52px; height: 52px;
  background: var(--primary); color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; cursor: pointer;
  box-shadow: 0 4px 14px rgba(124,58,237,.45);
  transition: transform .2s, box-shadow .2s;
  user-select: none;
}
.feedback-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(124,58,237,.55);
}

/* ── Feedback panel ──────────────────────────────── */
.feedback-panel {
  position: fixed; bottom: calc(var(--footer-h) + 4.5rem); right: 1.5rem; z-index: 901;
  width: 340px; max-width: calc(100vw - 2rem);
  background: var(--card-bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
}
.feedback-panel-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--border);
  font-weight: 600; font-size: .95rem;
}
.feedback-panel-close {
  background: none; border: none; font-size: 1.3rem;
  cursor: pointer; color: var(--text-muted); line-height: 1; padding: 0;
}
.feedback-panel-body { padding: 1rem; display: flex; flex-direction: column; gap: .75rem; }
.feedback-panel-body .form-group { margin-bottom: 0; }
.feedback-panel-body textarea { width: 100%; min-height: 80px; }

.feedback-type-row { display: flex; gap: 1.25rem; margin-top: .25rem; }
.feedback-type-opt { display: flex; align-items: center; gap: .4rem; cursor: pointer; }

.fb-screenshot-preview {
  max-height: 120px; overflow: hidden; border-radius: var(--radius-sm);
  border: 1px solid var(--border); margin-bottom: .35rem;
}
.fb-screenshot-preview img { width: 100%; object-fit: cover; }
.fb-status { margin-top: .5rem; font-size: .88rem; }

/* ── Archive ─────────────────────────────────── */
.event-card-archived {
  opacity: .72;
  filter: grayscale(30%);
}
.event-card-archived .event-card-accent { background: var(--text-muted); }
.archived-badge {
  display: inline-block;
  font-size: .72rem; font-weight: 700; letter-spacing: .05em;
  color: var(--text-muted); background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px; padding: .15rem .55rem;
  margin-bottom: .35rem;
}
.archived-section {
  margin-top: 2rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: .75rem 1rem;
  background: var(--card-bg);
}
.archived-section summary {
  cursor: pointer; font-weight: 600; font-size: .95rem;
  color: var(--text-muted); user-select: none;
  list-style: none;
}
.archived-section summary::-webkit-details-marker { display: none; }
.archived-section summary::before { content: '▶ '; font-size: .7rem; }
.archived-section[open] summary::before { content: '▼ '; }

/* ── Landing page ────────────────────────────── */
.lp-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  padding: 4rem 2rem 4rem;
  max-width: 1100px;
  margin: 0 auto;
}
@media (max-width: 768px) {
  .lp-hero { grid-template-columns: 1fr; padding: 2.5rem 1rem; }
  .lp-hero-visual { display: none; }
}
.lp-badge {
  display: inline-block;
  background: var(--primary-light); color: var(--primary-dark);
  font-size: .78rem; font-weight: 700; letter-spacing: .06em;
  padding: .3rem .8rem; border-radius: 999px; margin-bottom: 1.25rem;
}
[data-theme="dark"] .lp-badge { background: #2D1B69; color: var(--primary-light); }
.lp-hero-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900; line-height: 1.12;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0 0 1.1rem;
}
.lp-hero-sub {
  font-size: 1.05rem; line-height: 1.65;
  color: var(--text-muted); margin-bottom: 1.75rem; max-width: 480px;
}
.lp-hero-hint {
  margin-top: .85rem; font-size: .82rem; color: var(--text-muted);
}

/* Floating mock event cards */
.lp-mock-stack {
  position: relative; height: 280px;
}
.lp-mock-card {
  position: absolute;
  background: var(--card-bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 240px;
  overflow: hidden;
}
.lp-mc-accent { height: 5px; background: linear-gradient(90deg, var(--primary), var(--secondary)); }
.lp-mc-body   { padding: .75rem 1rem; }
.lp-mc-title  { font-weight: 700; font-size: .9rem; margin-bottom: .3rem; }
.lp-mc-meta   { font-size: .78rem; color: var(--text-muted); margin-bottom: .5rem; }
.lp-mc-stats  { display: flex; gap: .75rem; font-size: .8rem; color: var(--text-muted); }
.lp-mc-1 { top: 0;    left: 40px;  transform: rotate(-2deg); z-index: 3; }
.lp-mc-2 { top: 80px; left: 0;     transform: rotate(1.5deg); z-index: 2; }
.lp-mc-3 { top: 155px; left: 60px; transform: rotate(-1deg); z-index: 1; opacity: .85; }

/* Features section */
.lp-features, .lp-steps, .lp-pricing-teaser, .lp-cta {
  padding: 4rem 2rem;
}
.lp-features  { background: var(--bg); }
.lp-steps     { background: var(--card-bg); }
.lp-pricing-teaser { background: linear-gradient(135deg, var(--primary) 0%, #5B21B6 100%); color: #fff; }
.lp-cta       { background: var(--bg); }

.lp-section-inner {
  max-width: 1000px; margin: 0 auto;
  text-align: center;
}
.lp-section-label {
  font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--primary); margin-bottom: .6rem;
}
.lp-pricing-teaser .lp-section-label { color: rgba(255,255,255,.7); }
.lp-section-inner h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 0 0 .6rem; }
.lp-section-sub { color: var(--text-muted); max-width: 520px; margin: 0 auto 2.5rem; }
.lp-pricing-teaser .lp-section-sub { color: rgba(255,255,255,.8); }

.lp-feat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  text-align: left;
  margin-top: 2rem;
}
.lp-feat-card {
  background: var(--card-bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}
.lp-feat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.lp-feat-icon { font-size: 1.8rem; margin-bottom: .6rem; }
.lp-feat-card h3 { font-size: 1rem; margin: 0 0 .4rem; }
.lp-feat-card p  { font-size: .88rem; color: var(--text-muted); margin: 0; line-height: 1.55; }

.lp-steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
  text-align: left;
}
.lp-step {
  padding: 1.5rem;
  border-left: 3px solid var(--primary);
  background: var(--bg);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.lp-step-num {
  font-size: 2rem; font-weight: 900; color: var(--primary);
  line-height: 1; margin-bottom: .5rem;
}
.lp-step h3 { font-size: .95rem; margin: 0 0 .35rem; }
.lp-step p  { font-size: .85rem; color: var(--text-muted); margin: 0; line-height: 1.55; }

.lp-pt-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 2rem; flex-wrap: wrap; text-align: left;
}
.lp-pricing-teaser h2 { color: #fff; }
.lp-pricing-teaser p  { color: rgba(255,255,255,.85); }
.lp-pt-btn {
  margin-top: 1rem; color: #fff !important;
  border-color: rgba(255,255,255,.5) !important;
}
.lp-pt-btn:hover { background: rgba(255,255,255,.15) !important; }
.lp-pt-tiers {
  display: flex; align-items: center; gap: 1.25rem;
  flex-shrink: 0;
}
.lp-pt-tier  { display: flex; flex-direction: column; align-items: center; gap: .15rem; }
.lp-pt-price { font-size: 2rem; font-weight: 800; color: #fff; line-height: 1; }
.lp-pt-name  { font-size: .78rem; color: rgba(255,255,255,.7); text-transform: uppercase; letter-spacing: .07em; }
.lp-pt-popular .lp-pt-price { font-size: 2.5rem; }
.lp-pt-popular .lp-pt-name  { color: #fff; font-weight: 700; }
.lp-pt-sep { font-size: 1.5rem; color: rgba(255,255,255,.35); }

.lp-cta h2 { margin-bottom: .5rem; }
.lp-cta p  { color: var(--text-muted); margin-bottom: 1.5rem; }
.lp-cta .btn-google { margin: 0 auto; }

@media (max-width: 640px) {
  .lp-pt-inner { flex-direction: column; }
  .lp-features, .lp-steps, .lp-pricing-teaser, .lp-cta { padding: 2.5rem 1rem; }
}

/* ── Info pages (Terms, Refunds, FAQ) ────────── */
.info-page {
  max-width: 760px; margin: 0 auto; padding: 2rem 1.5rem 3rem;
}
.info-page h1 {
  font-size: 2rem; font-weight: 700; margin-bottom: .25rem;
  color: var(--text);
}
.info-updated {
  color: var(--text-muted); font-size: .85rem; margin-bottom: 2rem;
}
.info-page h2 {
  font-size: 1.25rem; font-weight: 700; margin: 2rem 0 .5rem;
  color: var(--primary);
  border-bottom: 2px solid var(--border); padding-bottom: .35rem;
}
.info-page h3 {
  font-size: 1rem; font-weight: 600; margin: 1.25rem 0 .35rem;
}
.info-page p, .info-page li { line-height: 1.7; color: var(--text-muted); }
.info-page ul, .info-page ol { padding-left: 1.4rem; margin: .5rem 0 1rem; }
.info-page a { color: var(--primary); text-decoration: underline; }

/* FAQ */
.faq-list { display: flex; flex-direction: column; gap: .5rem; margin-top: 1.5rem; }
.faq-item {
  background: var(--card-bg); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 0;
  overflow: hidden;
}
.faq-q {
  padding: 1rem 1.25rem; font-weight: 600; cursor: pointer;
  list-style: none; display: flex; justify-content: space-between;
  align-items: center; color: var(--text);
}
.faq-q::-webkit-details-marker { display: none; }
.faq-q::after { content: '+'; font-size: 1.2rem; color: var(--primary); flex-shrink: 0; }
details[open] .faq-q::after { content: '−'; }
.faq-a { padding: 0 1.25rem 1rem; line-height: 1.7; color: var(--text-muted); }

/* ── Mobile / small-screen overrides ─────────── */
@media (max-width: 520px) {
  /* Increase footer height so two rows fit */
  :root { --footer-h: 80px; }

  /* Header: tighten padding and hide user-name text to prevent overflow */
  .header-inner { padding: 0 .75rem; }
  .logo { font-size: 1.2rem; }
  .header-nav { gap: .35rem; }
  #nav-user-name { display: none !important; }
  #nav-start-free-btn { display: none !important; }

  /* Footer: stack copyright + links on two rows */
  .footer-inner {
    flex-direction: column;
    justify-content: center;
    gap: .2rem;
    padding: .4rem 1rem;
    text-align: center;
  }
  .footer-nav { flex-wrap: wrap; justify-content: center; gap: .5rem 1rem; }

  /* Reduce main content padding */
  .container { padding: 1.25rem 1rem; }

  /* Tabs: scroll horizontally instead of wrapping */
  .tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .tab-btn { white-space: nowrap; font-size: .82rem; padding: .6rem .85rem; }

  /* Event detail header */
  .event-detail-header { padding: 1.25rem 1rem; }
  .event-detail-header h1 { font-size: 1.4rem; }

  /* Public event header */
  .public-event-header { padding: 1.25rem 1rem; }
  .public-event-header h1 { font-size: 1.4rem; }

  /* Login card */
  .login-card { padding: 2rem 1.25rem; }

  /* Floor canvas: slightly shorter on phones */
  .floor-canvas { height: 360px; }

  /* Published banner: wrap QR below the info row */
  .published-banner { flex-wrap: wrap; justify-content: center; }
  .published-banner-info { justify-content: center; }
}

/* ── Additional mobile breakpoints (600px) ─── */
@media (max-width: 600px) {
  /* Modal: tighter padding on small phones */
  .modal-box { padding: 1.25rem 1rem; }

  /* Page header: smaller title */
  .page-header h1 { font-size: 1.3rem; }

  /* Stats row: tighter gap */
  .stats-row { gap: .5rem; }

  /* Manual add form: stack all fields full-width */
  .manual-add-form .form-group { min-width: 100%; }

  /* Landing page feature cards: tighter spacing */
  .lp-feat-grid { gap: .75rem; }
  .lp-feat-card { padding: 1.25rem 1rem; }

  /* Landing page steps: tighter spacing */
  .lp-steps-grid { gap: .75rem; }
  .lp-step { padding: 1.25rem 1rem; }

  /* Info pages: reduce side padding */
  .info-page { padding: 1.25rem .75rem 2rem; }
  .info-page h1 { font-size: 1.5rem; }

  /* Feedback panel: stretch near full-width */
  .feedback-panel { right: .5rem; left: .5rem; width: auto; }
}
