@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;1,400&family=Jost:wght@300;400;500;600&display=swap');

:root {
  --gold: #F5A800;
  --gold-light: #FFD166;
  --gold-dark: #C98A00;
  --navy: #1B2A4A;
  --navy-mid: #243660;
  --cream: #FAF7F2;
  --bg: #F0ECE4;
  --text: #1B2A4A;
  --muted: #6B7A99;
  --error: #C0392B;
  --success: #27AE60;
  --border: #DDD;
  --white: #fff;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Jost', sans-serif; color: var(--text); min-height: 100vh; }

/* Nav */
nav {
  background: var(--navy);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  border-bottom: 3px solid var(--gold);
  position: sticky; top: 0; z-index: 50;
}
.nav-logo img { height: 42px; width: auto; }
.nav-right { display: flex; align-items: center; gap: 10px; }
.nav-user { font-size: 13px; color: #AAA; }
.nav-user span { color: var(--gold-light); font-weight: 500; }
.nav-badge { background: var(--gold); color: var(--navy); font-size: 10px; padding: 3px 8px; letter-spacing: 0.1em; font-weight: 700; text-transform: uppercase; margin-left: 8px; }
.btn-nav { background: none; border: 1px solid #444; color: #AAA; padding: 6px 14px; font-family: 'Jost', sans-serif; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; cursor: pointer; transition: all 0.2s; }
.btn-nav:hover, .btn-nav.active { border-color: var(--gold); color: var(--gold); }

/* Buttons */
.btn { padding: 10px 20px; font-family: 'Jost', sans-serif; font-size: 12px; font-weight: 500; letter-spacing: 0.15em; text-transform: uppercase; border: none; cursor: pointer; transition: all 0.2s; white-space: nowrap; display: inline-block; text-decoration: none; }
.btn-primary { background: var(--navy); color: var(--gold-light); }
.btn-primary:hover { background: var(--navy-mid); }
.btn-gold { background: var(--gold); color: var(--navy); font-weight: 600; }
.btn-gold:hover { background: var(--gold-dark); }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }
.btn-danger { background: #FDF0EF; color: var(--error); border: 1px solid #F5BFBB; }
.btn-danger:hover { background: #FAD7D5; }
.btn-sm { padding: 5px 12px; font-size: 10px; }
.btn-full { width: 100%; text-align: center; padding: 14px; font-size: 13px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Forms */
.form-group { margin-bottom: 18px; }
label { display: block; font-size: 11px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
input[type="text"], input[type="email"], input[type="password"], select, textarea {
  width: 100%; padding: 11px 14px; border: 1px solid var(--border); background: #fff;
  font-family: 'Jost', sans-serif; font-size: 14px; color: var(--text);
  transition: border-color 0.2s; outline: none; border-radius: 0;
  appearance: none; -webkit-appearance: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--gold); }
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B7A99' stroke-width='1.5' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; cursor: pointer; }

/* Layout */
.container { max-width: 1140px; margin: 0 auto; padding: 36px 24px; }
.page-header { margin-bottom: 28px; display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.page-header-left h2 { font-family: 'Cormorant Garamond', serif; font-size: 30px; font-weight: 600; color: var(--navy); }
.page-header-left p { font-size: 14px; color: var(--muted); margin-top: 3px; }

/* Cards */
.card { background: var(--cream); box-shadow: 0 4px 24px rgba(27,42,74,0.12); position: relative; }
.card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, var(--gold-dark), var(--gold-light), var(--gold-dark)); }

/* Sections */
.section { background: white; box-shadow: 0 2px 8px rgba(0,0,0,0.06); margin-bottom: 20px; }
.section-header { padding: 16px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.section-title { font-family: 'Cormorant Garamond', serif; font-size: 20px; font-weight: 600; color: var(--navy); }
.section-body { padding: 24px; }

/* Stats */
.stats-bar { display: flex; gap: 14px; margin-bottom: 24px; flex-wrap: wrap; }
.stat-card { flex: 1; min-width: 110px; background: white; padding: 18px 20px; border-top: 3px solid var(--gold); box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.stat-num { font-family: 'Cormorant Garamond', serif; font-size: 34px; font-weight: 600; color: var(--navy); line-height: 1; }
.stat-label { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }

/* Tables */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { font-size: 10px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--muted); padding: 10px 14px; text-align: left; border-bottom: 2px solid var(--border); font-weight: 500; }
.data-table td { padding: 12px 14px; border-bottom: 1px solid #F0EDE8; font-size: 13px; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #FAFAF8; }

/* Badges */
.badge { display: inline-block; padding: 3px 9px; font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 500; }
.badge-pending { background: #FFF8E8; color: #B8860B; }
.badge-confirmed { background: #EDFAED; color: var(--success); }
.badge-declined { background: #FDF0EF; color: var(--error); }
.badge-host { background: #E8EDF8; color: var(--navy); }
.badge-half { background: #FFF0D0; color: #8B5E00; }
.badge-full { background: #E8EDF8; color: var(--navy); }
.badge-double { background: #E8F5E8; color: #1A6B1A; }
.badge-active { background: #EDFAED; color: var(--success); }
.badge-inactive { background: #F0F0F0; color: #888; }

/* Modal */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.55); z-index: 100; align-items: center; justify-content: center; padding: 20px; }
.modal-overlay.open { display: flex; }
.modal { background: white; width: 520px; max-width: 100%; box-shadow: 0 24px 60px rgba(0,0,0,0.3); position: relative; max-height: 90vh; display: flex; flex-direction: column; }
.modal::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--gold-dark), var(--gold-light), var(--gold-dark)); }
.modal-header { padding: 18px 22px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; flex-shrink: 0; }
.modal-header h3 { font-family: 'Cormorant Garamond', serif; font-size: 21px; color: var(--navy); }
.modal-close { background: none; border: none; font-size: 22px; cursor: pointer; color: var(--muted); line-height: 1; padding: 0 4px; }
.modal-body { padding: 22px; overflow-y: auto; }
.modal-footer { padding: 14px 22px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; flex-shrink: 0; }

/* Messages */
.error-msg { background: #FDF0EF; border-left: 3px solid var(--error); padding: 10px 14px; font-size: 13px; color: var(--error); margin-bottom: 14px; display: none; }
.success-msg { background: #EFF7EF; border-left: 3px solid var(--success); padding: 10px 14px; font-size: 13px; color: var(--success); margin-bottom: 14px; display: none; }
.info-msg { background: #EEF3FF; border-left: 3px solid var(--navy); padding: 10px 14px; font-size: 13px; color: var(--navy); margin-bottom: 14px; }

/* Loading */
.loading { text-align: center; padding: 48px; color: var(--muted); font-size: 14px; }
.spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid var(--border); border-top-color: var(--gold); border-radius: 50%; animation: spin 0.7s linear infinite; margin-right: 8px; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Empty state */
.empty-state { text-align: center; padding: 48px 24px; color: var(--muted); }
.empty-state .icon { font-size: 36px; margin-bottom: 10px; }
.empty-state p { font-size: 14px; }

/* Toast */
.toast { position: fixed; bottom: 24px; right: 24px; background: var(--navy); color: white; padding: 12px 18px; font-size: 13px; z-index: 300; transform: translateY(80px); opacity: 0; transition: all 0.3s; border-left: 3px solid var(--gold); max-width: 380px; line-height: 1.5; }
.toast.show { transform: translateY(0); opacity: 1; }

/* Tabs */
.tabs { display: flex; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.tab { flex: 1; padding: 11px; text-align: center; font-size: 13px; font-weight: 500; letter-spacing: 0.05em; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: all 0.2s; }
.tab.active { color: var(--navy); border-bottom-color: var(--gold); }

/* Admin tabs */
.admin-tabs { display: flex; gap: 4px; margin-bottom: 28px; border-bottom: 2px solid var(--border); }
.admin-tab { padding: 10px 20px; font-size: 12px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all 0.2s; }
.admin-tab.active { color: var(--navy); border-bottom-color: var(--gold); font-weight: 600; }

/* Form row */
.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }

/* Allocation pills */
.alloc-pills { display: flex; gap: 8px; }
.alloc-pill { flex: 1; padding: 10px; text-align: center; border: 2px solid var(--border); cursor: pointer; transition: all 0.2s; font-size: 12px; font-weight: 500; letter-spacing: 0.05em; }
.alloc-pill:hover { border-color: var(--gold); }
.alloc-pill.selected { background: var(--navy); color: var(--gold-light); border-color: var(--navy); }
.alloc-pill .pill-seats { font-size: 11px; color: var(--muted); margin-top: 2px; }
.alloc-pill.selected .pill-seats { color: var(--gold); }

/* Seat progress */
.seat-bar { height: 6px; background: #EEE; margin-top: 4px; }
.seat-fill { height: 100%; background: var(--gold); transition: width 0.3s; }

/* Inline edit */
.editable { cursor: pointer; border-bottom: 1px dashed transparent; transition: border-color 0.2s; }
.editable:hover { border-bottom-color: var(--gold); }

/* ── Global Mobile Fixes ─────────────────────────────────────────── */
@media (max-width: 600px) {
  nav { padding: 0 12px; height: 58px; }
  .nav-logo img { height: 34px; }
  .nav-badge { display: none; }
  .container { padding: 16px 12px; }
  .page-header { flex-direction: column; align-items: flex-start; }
  .stats-bar { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { min-width: 0; padding: 14px 12px; }
  .stat-num { font-size: 26px; }
  .modal { width: 100% !important; max-width: 100vw; }
  .modal-body { padding: 16px; }
  .form-row { flex-direction: column; }
  .data-table th, .data-table td { padding: 8px 8px; font-size: 11px; }
  .section-body { padding: 16px; }
}
