/* ============ HOCOplus app — brand design system ============ */
:root {
  --ink:      #0d0d14;
  --paper:    #f7f4ee;
  --white:    #ffffff;
  --gold:     #f0b429;
  --gold-ink: #7a5200;
  --coral:    #ff5c5c;
  --mint:     #3ecfb2;
  --midnight: #12122a;
  --muted:    #62606a;
  --line:     rgba(13, 13, 20, 0.12);
  --line-soft:rgba(13, 13, 20, 0.07);
  --shadow-sm: 0 2px 10px rgba(13, 13, 20, 0.06);
  --shadow-md: 0 8px 30px rgba(13, 13, 20, 0.10);
  --radius:   16px;
  --radius-sm: 10px;
  --pill:     100px;
  --sidebar:  248px;
  --maxw:     1120px;
  font-synthesis: none;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  min-height: 100vh;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; display: block; }

/* ---- logo ---- */
.logo {
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.04em;
  line-height: 1;
  color: var(--ink);
  font-size: 1.5rem;
}
.logo em { font-family: 'DM Serif Display', serif; font-style: italic; color: var(--gold); }
.logo sup { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 0.38em; font-weight: 600; vertical-align: super; }

/* ---- boot screen ---- */
.boot { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 22px; }
.boot .logo { font-size: 2.4rem; }
.boot-spin, .spin {
  width: 30px; height: 30px; border-radius: 50%;
  border: 3px solid var(--line); border-top-color: var(--gold);
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ typography ============ */
h1, h2, h3 { line-height: 1.1; letter-spacing: -0.01em; }
.display {
  font-family: 'Bebas Neue', sans-serif; letter-spacing: 0.01em; line-height: 0.95;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
}
.display .accent { font-family: 'DM Serif Display', serif; font-style: italic; color: var(--gold); }
.eyebrow { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.72rem; font-weight: 700; color: var(--muted); }
.muted { color: var(--muted); }

/* ============ buttons ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; font-size: 0.94rem;
  padding: 11px 22px; border-radius: var(--pill); border: 1.5px solid transparent;
  cursor: pointer; white-space: nowrap; transition: transform .12s, background .18s, border-color .18s, opacity .18s;
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--ink); color: var(--paper); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--midnight); }
.btn-gold { background: var(--gold); color: var(--gold-ink); }
.btn-gold:hover { filter: brightness(1.03); }
.btn-ghost { background: var(--white); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-danger { background: transparent; color: var(--coral); border-color: var(--coral); }
.btn-danger:hover { background: var(--coral); color: var(--white); }
.btn-sm { padding: 7px 14px; font-size: 0.85rem; }
.btn-block { width: 100%; }
.btn-link { background: none; border: none; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font: inherit; padding: 0; }

/* ============ forms ============ */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 0.82rem; font-weight: 600; }
.field .hint { font-size: 0.76rem; color: var(--muted); }
.input, .textarea, .select {
  font: inherit; font-size: 0.94rem; color: var(--ink);
  padding: 11px 14px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--line); background: var(--white); outline: none;
  transition: border-color .18s; width: 100%;
}
.input:focus, .textarea:focus, .select:focus { border-color: var(--gold); }
.textarea { min-height: 120px; resize: vertical; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .row2 { grid-template-columns: 1fr; } }

/* ============ cards ============ */
.card {
  background: var(--white); border: 1px solid var(--line-soft);
  border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 22px;
}
.card-pad-0 { padding: 0; overflow: hidden; }

/* ============ badges ============ */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 11px; border-radius: var(--pill);
  font-size: 0.74rem; font-weight: 700; letter-spacing: .02em;
  background: var(--paper); border: 1px solid var(--line);
}
.badge-gold { background: rgba(240,180,41,.16); border-color: rgba(240,180,41,.4); color: var(--gold-ink); }
.badge-mint { background: rgba(62,207,178,.16); border-color: rgba(62,207,178,.5); color: #12705f; }
.badge-coral{ background: rgba(255,92,92,.14); border-color: rgba(255,92,92,.45); color: #a92626; }
.badge-muted{ color: var(--muted); }

/* ============ auth / centered layouts ============ */
.center-wrap { min-height: 100vh; display: grid; place-items: center; padding: 32px 20px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card .logo { font-size: 2rem; margin-bottom: 6px; }
.stack { display: flex; flex-direction: column; }
.stack-gap > * + * { margin-top: 14px; }

/* ============ app shell (host area) ============ */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar {
  background: var(--midnight); color: #d8d8e6; padding: 22px 16px;
  display: flex; flex-direction: column; gap: 6px; position: sticky; top: 0; height: 100vh;
}
.sidebar .logo { color: var(--paper); padding: 4px 10px 18px; }
.sidebar .logo em { color: var(--gold); }
.nav-link {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px;
  color: #b9b9cc; text-decoration: none; font-weight: 600; font-size: 0.9rem; transition: background .15s, color .15s;
}
.nav-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-link.active { background: var(--gold); color: var(--gold-ink); }
.nav-link .ic { width: 18px; text-align: center; }
.sidebar-foot { margin-top: auto; border-top: 1px solid rgba(255,255,255,.1); padding-top: 12px; }
.sidebar-foot .who { font-size: 0.78rem; color: #9a9ab0; padding: 0 12px 8px; overflow: hidden; text-overflow: ellipsis; }

.main { min-width: 0; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 32px; border-bottom: 1px solid var(--line-soft); background: var(--paper);
  position: sticky; top: 0; z-index: 20;
}
.topbar h1 { font-family: 'Bebas Neue', sans-serif; font-size: 1.7rem; letter-spacing: .02em; }
.content { padding: 28px 32px 64px; max-width: var(--maxw); }
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 60; transform: translateX(-100%); transition: transform .22s; width: 260px; }
  .sidebar.open { transform: translateX(0); }
  .content, .topbar { padding-left: 18px; padding-right: 18px; }
  .menu-toggle { display: inline-flex !important; }
}
.menu-toggle { display: none; background: none; border: none; font-size: 1.4rem; cursor: pointer; }

/* ============ public / attendee layouts ============ */
.pub-header {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 24px; max-width: var(--maxw); margin: 0 auto;
}
.pub-nav { display: flex; align-items: center; gap: 10px; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 24px; }
.container-narrow { max-width: 720px; margin: 0 auto; padding: 24px; }

/* event grid */
.grid { display: grid; gap: 20px; }
.grid-events { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.evt-card { display: flex; flex-direction: column; overflow: hidden; text-decoration: none; color: inherit; transition: transform .14s, box-shadow .18s; }
.evt-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.evt-cover { aspect-ratio: 16/9; background: linear-gradient(135deg, var(--gold) 0%, var(--coral) 100%); position: relative; }
.evt-cover img { width: 100%; height: 100%; object-fit: cover; }
.evt-date-chip {
  position: absolute; top: 12px; left: 12px; background: var(--white);
  border-radius: 12px; padding: 6px 10px; text-align: center; box-shadow: var(--shadow-sm); line-height: 1;
}
.evt-date-chip .m { font-size: 0.66rem; font-weight: 700; text-transform: uppercase; color: var(--coral); letter-spacing: .06em; }
.evt-date-chip .d { font-family: 'Bebas Neue', sans-serif; font-size: 1.5rem; }
.evt-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.evt-body h3 { font-size: 1.1rem; }
.evt-meta { font-size: 0.84rem; color: var(--muted); display: flex; flex-direction: column; gap: 3px; margin-top: auto; }

/* ============ tables ============ */
.table-wrap { overflow-x: auto; border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--white); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.tbl th, .tbl td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
.tbl th { font-size: 0.74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.tbl tr:last-child td { border-bottom: none; }
.tbl tbody tr:hover { background: var(--paper); }

/* ============ empty / states ============ */
.empty { text-align: center; padding: 56px 24px; color: var(--muted); }
.empty .big { font-size: 2.6rem; margin-bottom: 10px; }

/* ============ stat tiles ============ */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.tile { background: var(--white); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 18px 20px; }
.tile .k { font-size: 0.78rem; color: var(--muted); font-weight: 600; }
.tile .v { font-family: 'Bebas Neue', sans-serif; font-size: 2.1rem; line-height: 1; margin-top: 6px; }

/* ============ modal ============ */
.modal-back { position: fixed; inset: 0; background: rgba(13,13,20,.5); display: grid; place-items: center; padding: 20px; z-index: 100; }
.modal { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-md); width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto; padding: 26px; }
.modal h3 { margin-bottom: 14px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }

/* ============ toast ============ */
#toast-root { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: var(--ink); color: var(--paper); padding: 12px 20px; border-radius: var(--pill);
  font-size: 0.88rem; font-weight: 600; box-shadow: var(--shadow-md);
  animation: toast-in .2s ease; max-width: 90vw;
}
.toast.err { background: var(--coral); }
.toast.ok  { background: #1f7a68; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ============ utilities ============ */
.flex { display: flex; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.items-center { align-items: center; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.wrap { flex-wrap: wrap; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }
.mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.text-sm { font-size: 0.85rem; } .text-lg { font-size: 1.15rem; }
.hidden { display: none !important; }
.divider { height: 1px; background: var(--line-soft); margin: 20px 0; border: none; }
.price-tag { font-family: 'Bebas Neue', sans-serif; font-size: 1.5rem; }
.free-tag { color: #12705f; font-weight: 700; }
