/* ============================================================
   Neylora — Design System
   ============================================================ */

:root {
  --gold:        #D4A017;
  --gold-hover:  #C69615;
  --gold-light:  #fdf6e3;
  --bg:          #ffffff;
  --surface:     #ffffff;
  --border:      #E5E5EA;
  --border-soft: #F2F2F7;
  --text-primary:   #111111;
  --text-secondary: #6B6B6B;
  --radius-sm:  12px;
  --radius-md:  18px;
  --radius-lg:  24px;
  --shadow-card: 0 8px 30px rgba(17,17,17,.04);
  --shadow-hover: 0 12px 40px rgba(17,17,17,.08);
}

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

body {
  font-family: 'Poppins', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
  line-height: 1.6;
}

/* ---- Header ---- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-soft);
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.header-logo img { display: block; }
.header-inner .btn-ghost {
  position: absolute;
  right: 24px;
}

/* ---- Layout ---- */
.main-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}
.page-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 24px;
}

/* ---- Card ---- */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 24px;
  box-shadow: var(--shadow-card);
}
.card + .card { margin-top: 16px; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 10px 20px;
  text-decoration: none;
  transition: background .15s, box-shadow .15s, transform .1s;
  white-space: nowrap;
}
.btn:disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }

.btn-primary {
  background: var(--gold);
  color: #fff;
}
.btn-primary:hover { background: var(--gold-hover); box-shadow: 0 4px 14px rgba(212,160,23,.3); }

.btn-secondary {
  background: var(--border-soft);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--border); }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--border-soft); color: var(--text-primary); }

.btn-sm { padding: 7px 14px; font-size: 13px; border-radius: 10px; }

/* ---- Forms ---- */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  font-weight: 500;
}
.form-input,
.form-select {
  width: 100%;
  font-family: inherit;
  font-size: 15px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-primary);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  appearance: none;
}
.form-input:focus,
.form-select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212,160,23,.12);
}
.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B6B6B' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
@media (max-width: 600px) {
  .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
}

.form-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
}
.form-checkbox input[type=checkbox] {
  width: 18px;
  height: 18px;
  accent-color: var(--gold);
  cursor: pointer;
}

/* ---- Alert ---- */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 16px;
}
.alert-error   { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }

/* ---- Badge ---- */
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 20px;
  background: var(--gold-light);
  color: var(--gold);
  border: 1px solid #f0d880;
}
.badge-gray {
  background: var(--border-soft);
  color: var(--text-secondary);
  border-color: var(--border);
}

/* ---- Stat grid ---- */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat-box {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
}
.stat-label { font-size: 13px; color: var(--text-secondary); }
.stat-value { font-size: 1.5rem; font-weight: 600; color: var(--text-primary); line-height: 1.2; }

/* ---- Table ---- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border-soft); }
th { font-size: 12px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .05em; }
tbody tr:hover { background: var(--border-soft); }

/* ---- Subnav ---- */
.subnav {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  margin-bottom: 24px;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--border-soft);
}
.subnav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: color .15s, background .15s;
}
.subnav a:hover  { color: var(--text-primary); background: var(--border-soft); }
.subnav a.active { color: var(--text-primary); background: var(--border-soft); }

/* ---- Scent cards ---- */
.scent-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 480px) { .scent-grid { grid-template-columns: 1fr; } }

.scent-card {
  position: relative;
  min-height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s, transform .15s;
  text-align: center;
  font-family: inherit;
  width: 100%;
}
.scent-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}
.scent-card.selected {
  border-color: var(--gold);
  background: #fffdf5;
  box-shadow: 0 0 0 3px rgba(212,160,23,.1);
}
.scent-name  { font-size: 1.1rem; font-weight: 600; color: var(--text-primary); }
.scent-sub   { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }
.scent-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--gold);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---- Guest event header ---- */
.event-hero {
  text-align: center;
  padding: 32px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  box-shadow: var(--shadow-card);
}
.event-hero-title {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(2.5rem, 8vw, 4rem);
  color: var(--gold);
  font-weight: 400;
  line-height: 1.2;
}
.event-hero-date {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-top: 8px;
}

/* ---- Login page ---- */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 24px;
}
.login-box {
  width: 100%;
  max-width: 420px;
}
.login-logo {
  display: block;
  margin: 0 auto 32px;
  max-width: 180px;
}

/* ---- Misc ---- */
.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.flex-gap { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.text-muted { color: var(--text-secondary); font-size: 13px; }
.mt-4  { margin-top: 16px; }
.mt-6  { margin-top: 24px; }
.mb-4  { margin-bottom: 16px; }
.space-y > * + * { margin-top: 12px; }
