/* Traci Registration — shared styles. Dark base; theme.css overrides for light. */
:root {
  --bg: #0b0f16; --panel: #111827; --panel2: #0f172a; --text: #e5e7eb; --muted: #9ca3af;
  --line: rgba(255,255,255,0.09); --accent: #60a5fa; --accent2: #2563eb; --btn: rgba(255,255,255,0.07);
  --btnHover: rgba(255,255,255,0.12); --good: #10b981; --warn: #f59e0b; --bad: #ef4444;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; font-size: 15px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 26px; margin: 0 0 6px; letter-spacing: -0.02em; }
h2 { font-size: 18px; margin: 0 0 10px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.hidden { display: none !important; }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; background: var(--glass, rgba(17,24,39,0.85)); border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px); }
.brand { font-weight: 800; color: var(--text); letter-spacing: 0.2px; white-space: nowrap; font-size: 17px; }
html, body { overflow-x: hidden; }
@media (max-width: 520px) {
  .topbar { gap: 6px; padding: 8px 10px; }
  .topbar .navlink { padding: 6px 8px; white-space: nowrap; }
  .hideSm { display: none; }
  .langSwitch button { padding: 5px 8px; }
  .themeToggle { width: 30px !important; height: 30px !important; font-size: 14px !important; }
}
@media (max-width: 720px) { .topbar.admin { flex-wrap: wrap; } }
.brand span { color: var(--accent); }
.topbar .spacer { flex: 1; }
.topbar .user-info { display: flex; align-items: center; gap: 8px; }
.topbar .navlink { color: var(--muted); padding: 6px 10px; border-radius: 8px; font-size: 14px; }
.topbar .navlink:hover, .topbar .navlink.active { color: var(--text); background: var(--btn); text-decoration: none; }
.langSwitch { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.langSwitch button { background: none; border: 0; color: var(--muted); padding: 5px 10px; cursor: pointer; font-size: 12px; font-weight: 700; }
.langSwitch button.active { background: var(--accent2); color: #fff; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 24px 16px 72px; }
.wrap.narrow { max-width: 720px; }

/* Panels, cards */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px; margin-bottom: 16px;
  box-shadow: 0 10px 30px var(--shadow, rgba(0,0,0,.25)); }
.panelHdr { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.card { background: var(--w03, rgba(255,255,255,0.03)); border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 10px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 640px) { .grid2, .grid3 { grid-template-columns: 1fr; } }

/* Forms */
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.field > label { font-size: 12px; color: var(--muted); font-weight: 600; }
.inp { background: var(--w04, rgba(255,255,255,0.04)); border: 1px solid var(--line); color: var(--text);
  padding: 10px 11px; border-radius: 10px; font-size: 14px; outline: none; width: 100%; font-family: inherit; }
.inp:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(96,165,250,0.15); }
textarea.inp { resize: vertical; min-height: 70px; }
select.inp option { background: var(--menu-bg, #0d1117); color: var(--text); }
.inp.invalid { border-color: var(--c-red-text, #f87171); }
.hint { font-size: 12px; color: var(--muted); }
.checkRow { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.5; margin-bottom: 12px; }
.checkRow input { margin-top: 3px; width: 16px; height: 16px; flex-shrink: 0; }
.checkRow.invalid { border: 1px solid var(--c-red-text, #f87171); background: rgba(239,68,68,0.10); border-radius: 10px; padding: 10px 12px; }
.checkRow.invalid label { color: var(--c-red-text, #f87171); }
.actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 8px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--btn); border: 1px solid var(--line);
  color: var(--text); padding: 9px 14px; border-radius: 10px; cursor: pointer; font-size: 14px; font-weight: 600; font-family: inherit; }
.btn:hover { background: var(--btnHover); text-decoration: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--accent2); border-color: var(--accent2); color: #fff; }
.btn.primary:hover { filter: brightness(1.1); }
.btn.danger { background: rgba(239,68,68,0.15); border-color: rgba(239,68,68,0.4); color: var(--c-red-text, #f87171); }
.btn.good { background: #065f46; border-color: #047857; color: #fff; }
.btn.sm { padding: 5px 10px; font-size: 12px; border-radius: 8px; }
.btn.swish { background: #16a34a; border-color: #16a34a; color: #fff; }
.btn.stripe { background: #635bff; border-color: #635bff; color: #fff; }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 3px 10px; white-space: nowrap; border: 1px solid transparent; }
.badge.open, .badge.confirmed { background: rgba(16,185,129,0.14); color: var(--c-green-text, #34d399); border-color: rgba(16,185,129,0.35); }
.badge.upcoming, .badge.pending_payment { background: rgba(245,158,11,0.14); color: var(--c-amber-text, #fbbf24); border-color: rgba(245,158,11,0.35); }
.badge.payment_claimed, .badge.waitlisted { background: rgba(96,165,250,0.14); color: var(--accent); border-color: rgba(96,165,250,0.35); }
.badge.closed, .badge.cancelled, .badge.refunded, .badge.draft { background: rgba(148,163,184,0.12); color: var(--muted); border-color: rgba(148,163,184,0.3); }
.badge.published { background: rgba(16,185,129,0.14); color: var(--c-green-text, #34d399); }
button.badge { cursor: pointer; font-family: inherit; }
button.badge:hover { filter: brightness(1.15); text-decoration: underline; }

/* Boxes */
.box { border-radius: 10px; padding: 10px 12px; font-size: 13px; line-height: 1.55; margin-bottom: 12px; }
.box.info { background: rgba(96,165,250,0.08); border: 1px solid rgba(96,165,250,0.35); }
.box.warn { background: rgba(245,158,11,0.12); border: 1px solid rgba(245,158,11,0.45); color: var(--c-amber-text, #fbbf24); }
.box.err { background: rgba(239,68,68,0.10); border: 1px solid rgba(239,68,68,0.4); color: var(--c-red-text, #f87171); }
.box.ok { background: rgba(16,185,129,0.10); border: 1px solid rgba(16,185,129,0.35); color: var(--c-green-text, #34d399); }
.box.heart { background: rgba(236,72,153,0.12); border: 1px solid rgba(236,72,153,0.4); font-weight: 600; text-align: center; }

/* Tables */
.tableWrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; color: var(--muted); font-weight: 600; padding: 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }

/* Tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted); padding: 10px 14px; cursor: pointer;
  font-size: 14px; font-weight: 600; white-space: nowrap; font-family: inherit; margin-bottom: -1px; }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab .count { background: var(--c-amber, #f59e0b); color: #111; border-radius: 999px; font-size: 11px; padding: 0 6px; margin-left: 4px; }

/* Modal */
.modalBg { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: none; align-items: flex-start; justify-content: center;
  z-index: 200; overflow-y: auto; padding: 40px 12px; }
.modalBg.open { display: flex; }
.modal { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; width: 100%; max-width: 500px; box-shadow: 0 24px 60px rgba(0,0,0,.6); }
.modal.wide { max-width: 720px; }
.modalHdr { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.modalHdr .title { font-weight: 800; font-size: 17px; }
.modalClose { background: none; border: 0; color: var(--muted); font-size: 24px; cursor: pointer; line-height: 1; }
.modalBody { padding: 18px; }

/* Rich text (organiser descriptions) */
.richText p { margin: 0 0 10px; }
.richText .rtHead { display: block; font-weight: 700; margin: 14px 0 4px; color: var(--text); }
.richText .rtHead:first-child { margin-top: 0; }
.richText ul { margin: 2px 0 10px; padding-left: 20px; }
.richText strong { color: var(--text); }

/* Toast */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: #1d4ed8; color: #fff; padding: 10px 20px;
  border-radius: 10px; font-size: 14px; z-index: 999; box-shadow: 0 8px 24px rgba(0,0,0,.4); }
.footer { text-align: center; color: var(--muted); font-size: 12px; padding: 24px 0; }

/* Site footer */
.siteFooter { border-top: 1px solid var(--line); margin-top: 32px; padding: 28px 16px 20px; background: var(--w02, rgba(255,255,255,0.02)); }
.footCols { max-width: 1040px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.footCols a { display: block; color: var(--muted); font-size: 14px; margin: 6px 0; }
.footCols a:hover { color: var(--text); }
.footHead { font-weight: 800; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 4px; }
.footBottom { max-width: 1040px; margin: 18px auto 0; color: var(--muted); font-size: 12px; }
@media (max-width: 520px) { .footCols { grid-template-columns: 1fr 1fr; } }
/* Info pages */
.prose { line-height: 1.7; font-size: 15px; }
.prose h2 { margin-top: 24px; } .prose p, .prose li { color: var(--text); }
.faq details { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; background: var(--w03); }
.faq summary { cursor: pointer; font-weight: 700; }
.faq details p { margin: 8px 0 0; color: var(--muted); }
.searchBox { display: flex; gap: 8px; margin: 12px 0 18px; }
.searchBox .inp { font-size: 16px; }
