:root {
    --bg: #0d0d12;
    --panel: #16161d;
    --panel-2: #1e1e28;
    --text: #eaeaf0;
    --muted: #8b8b9a;
    --accent: #ff2d78;
    --accent-2: #7c5cff;
    --ok: #7ee787;
    --err: #ff7b72;
    --border: #2a2a37;
    --radius: 12px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.55;
}

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

.container { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 20px; }

/* Nav */
.nav {
    border-bottom: 1px solid var(--border);
    background: rgba(13, 13, 18, 0.9);
    position: sticky; top: 0; z-index: 10; backdrop-filter: blur(8px);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { font-size: 1.4rem; font-weight: 800; letter-spacing: -0.5px; color: var(--text); }
.brand span { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 14px; }
.nav-links a { color: var(--muted); font-weight: 500; }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.inline { display: inline; margin: 0; }

/* Buttons */
.btn {
    display: inline-block; border: 1px solid transparent; border-radius: 999px;
    padding: 9px 18px; font-weight: 600; font-size: 0.95rem; cursor: pointer;
    font-family: inherit; transition: transform .05s ease, background .15s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #ff4d8d; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--muted); }
.btn-lg { padding: 13px 26px; font-size: 1.05rem; }
.btn-block { width: 100%; }

/* Layout blocks */
.container > main, main.container { padding-top: 32px; padding-bottom: 48px; }
.hero { text-align: center; padding: 64px 0 40px; }
.hero h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); margin: 0 0 12px; letter-spacing: -1.5px; }
.accent { color: var(--accent); }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 620px; margin: 0 auto 28px; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.stat-line { margin-top: 26px; color: var(--muted); }
.stat-line strong { color: var(--text); }

.panel {
    background: var(--panel); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 24px; margin: 24px 0;
}
.panel h2 { margin-top: 0; }
.center { text-align: center; }
.muted { color: var(--muted); }

/* Stat grid */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin: 24px 0; }
.stat {
    background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 18px; display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 0.9rem;
}
.stat-num { font-size: 2rem; font-weight: 800; color: var(--text); }
.stat-alert { border-color: var(--accent); }
.stat-alert .stat-num { color: var(--accent); }

/* Forms */
.auth-card {
    max-width: 420px; margin: 24px auto; background: var(--panel);
    border: 1px solid var(--border); border-radius: var(--radius); padding: 32px;
}
.auth-card h1 { margin-top: 0; }
.form { display: flex; flex-direction: column; gap: 16px; margin: 20px 0 12px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 0.9rem; color: var(--muted); }
.form input, .form select {
    background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px;
    padding: 11px 12px; color: var(--text); font-size: 1rem; font-family: inherit;
}
.form input:focus, .form select:focus { outline: none; border-color: var(--accent-2); }
.form .checkbox { flex-direction: row; align-items: flex-start; gap: 10px; }
.form .checkbox input { width: auto; margin-top: 3px; }

/* Flash */
.flash { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; border: 1px solid; }
.flash-error { background: rgba(255,123,114,.1); border-color: var(--err); color: var(--err); }
.flash-success { background: rgba(126,231,135,.1); border-color: var(--ok); color: var(--ok); }
.flash-info { background: rgba(124,92,255,.1); border-color: var(--accent-2); color: #b9a9ff; }

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 28px 0; color: var(--muted); }
.footer p { margin: 4px 0; }

/* ---- Admin ---- */
.admin-nav { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 28px; border-bottom: 1px solid var(--border); padding-bottom: 14px; }
.admin-nav a { color: var(--muted); padding: 6px 12px; border-radius: 8px; font-weight: 600; }
.admin-nav a:hover { color: var(--text); background: var(--panel-2); text-decoration: none; }

.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 8px; flex-wrap: wrap; }
.page-head h1 { margin: 0; }

.table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.table th, .table td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table th { color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; }
.table .right { text-align: right; }
.table .actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }

.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.badge-ok { background: rgba(126,231,135,.14); color: var(--ok); }
.badge-off { background: rgba(139,139,154,.16); color: var(--muted); }

.btn-sm { padding: 5px 12px; font-size: 0.82rem; }
.btn-danger { background: transparent; color: var(--err); border-color: var(--err); }
.btn-danger:hover { background: rgba(255,123,114,.12); }

/* Wide forms (admin create/edit) */
.form-wide { max-width: 760px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.fieldset { border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin: 0; }
.fieldset legend { color: var(--muted); padding: 0 8px; font-size: 0.85rem; }
.form textarea { background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; padding: 11px 12px; color: var(--text); font: inherit; resize: vertical; }
.form textarea:focus { outline: none; border-color: var(--accent-2); }
.form-actions { display: flex; gap: 10px; align-items: center; }
a.stat { text-decoration: none; }
a.stat:hover { border-color: var(--muted); }
@media (max-width: 620px) { .grid-2 { grid-template-columns: 1fr; } }

/* ---- Public directory + profiles ---- */
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; margin: 8px 0 24px; }
.filter-bar input[type=search], .filter-bar select {
    background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px;
    padding: 10px 12px; color: var(--text); font: inherit;
}
.filter-bar input[type=search] { flex: 1; min-width: 180px; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: block; color: var(--text); transition: transform .08s ease, border-color .15s ease; }
.card:hover { transform: translateY(-2px); border-color: var(--muted); text-decoration: none; }
.card-img { height: 130px; background: linear-gradient(135deg, var(--panel-2), #262633); background-size: cover; background-position: center; }
.card-body { padding: 14px; }

.profile-head { border-radius: var(--radius); background: linear-gradient(135deg, #201826, #16161d); background-size: cover; background-position: center; padding: 48px 28px; margin-bottom: 24px; }
.kicker { text-transform: uppercase; letter-spacing: 2px; font-size: 0.75rem; color: var(--accent); font-weight: 700; }
.profile-head h1 { margin: 6px 0 6px; font-size: clamp(1.8rem, 4vw, 2.8rem); }
.genres { color: var(--muted); margin: 0; }
.profile-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; align-items: start; }
.profile-side .panel:first-child { margin-top: 0; }
.profile-main .panel:first-child { margin-top: 0; }
@media (max-width: 720px) { .profile-grid { grid-template-columns: 1fr; } }

.socials { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.pill { display: inline-block; padding: 4px 12px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--border); font-size: 0.85rem; }
.pill-link { color: var(--text); }
.pill-link:hover { border-color: var(--accent); text-decoration: none; }

.event-list { list-style: none; padding: 0; margin: 0; }
.event-row { display: flex; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); }
.event-row:last-child { border-bottom: 0; }
.event-date { text-align: center; min-width: 48px; background: var(--panel-2); border-radius: 8px; padding: 6px 0; }
.event-mon { display: block; font-size: 0.7rem; text-transform: uppercase; color: var(--accent); font-weight: 700; }
.event-day { display: block; font-size: 1.3rem; font-weight: 800; }
.event-info { flex: 1; }
.event-meta { display: flex; align-items: center; gap: 8px; }

.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.video-embed { position: relative; padding-bottom: 56.25%; height: 0; border-radius: 8px; overflow: hidden; }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.gallery img { width: 100%; height: 120px; object-fit: cover; border-radius: 8px; }

/* Admin photo thumbs */
.thumb-grid { display: flex; flex-wrap: wrap; gap: 12px; margin: 8px 0 4px; }
.thumb-wrap { display: flex; flex-direction: column; gap: 4px; font-size: 0.8rem; }
.thumb { width: 110px; height: 80px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); }
.thumb-remove { color: var(--muted); }
.photo-current { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }

/* ---- Events / calendar ---- */
.view-toggle { display: flex; gap: 8px; margin-bottom: 16px; }
.inline-field { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 0.9rem; }
.inline-field input { background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; color: var(--text); font: inherit; }

.cal-head { display: flex; align-items: center; justify-content: space-between; margin: 8px 0 14px; }
.cal-head h2 { margin: 0; }
.calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-dow { text-align: center; color: var(--muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.5px; padding-bottom: 4px; }
.cal-cell { min-height: 92px; background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 6px; overflow: hidden; }
.cal-empty { background: transparent; border: 0; }
.cal-num { font-size: 0.8rem; color: var(--muted); margin-bottom: 4px; }
.cal-event { display: block; background: rgba(255,45,120,.14); color: var(--text); border-left: 3px solid var(--accent); border-radius: 4px; padding: 3px 6px; font-size: 0.72rem; margin-bottom: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-event:hover { text-decoration: none; background: rgba(255,45,120,.26); }
.cal-time { display: block; color: var(--muted); font-size: 0.65rem; }
@media (max-width: 620px) { .cal-cell { min-height: 60px; } .cal-event { font-size: 0.6rem; } }

/* ---- Approval queue ---- */
.diff td { vertical-align: top; }
.diff-old { color: var(--muted); }
.diff-new { color: var(--ok); }
.approve-actions { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; margin-top: 16px; }
.reject-form { display: flex; gap: 8px; align-items: center; margin: 0; flex: 1; min-width: 260px; }
.reject-form input { flex: 1; background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; padding: 9px 12px; color: var(--text); font: inherit; }

/* ---- QR ---- */
.qr-panel { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.qr-img { border-radius: 8px; background: #fff; padding: 6px; }

/* ---- Fan / favorites ---- */
.profile-actions { margin-top: 14px; }
.fav-btn { font-size: 0.95rem; }
.fav-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.fav-cols h3 { margin: 0 0 8px; font-size: 0.9rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.fav-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--border); }
.fav-row:last-child { border-bottom: 0; }
@media (max-width: 620px) { .fav-cols { grid-template-columns: 1fr; } }

/* ---- Homepage GPS / gig grid ---- */
.geo-bar { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.geo-form { display: flex; gap: 8px; }
.geo-form input { background: var(--panel-2); border: 1px solid var(--border); border-radius: 999px; padding: 12px 18px; color: var(--text); font: inherit; min-width: 200px; }
.geo-hint { font-size: 0.9rem; }
.cta-panel { margin-top: 32px; }

.gig-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin-top: 12px; }
.gig-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; color: var(--text); display: block; transition: transform .08s ease, border-color .15s; }
.gig-card:hover { transform: translateY(-2px); border-color: var(--muted); text-decoration: none; }
.gig-img { height: 120px; background: linear-gradient(135deg, var(--panel-2), #2a2333); background-size: cover; background-position: center; position: relative; }
.gig-dist { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,.6); color: #fff; font-size: 0.72rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; }
.gig-body { padding: 14px; }
.gig-date { color: var(--accent); font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.3px; }
.gig-title { display: block; margin: 3px 0 5px; }

/* homepage sections */
.home-section { margin: 32px 0; }
.home-section h2 { margin-top: 0; }

/* ---- Header search (moved from hero) ---- */
.nav-inner { flex-wrap: wrap; height: auto; min-height: 64px; gap: 10px 18px; padding: 8px 0; }
.nav-search { display: flex; align-items: center; gap: 6px; flex: 1 1 280px; max-width: 460px; }
.nav-search input {
    flex: 1; min-width: 120px; background: var(--panel-2); border: 1px solid var(--border);
    border-radius: 999px; padding: 8px 14px; color: var(--text); font: inherit;
}
.nav-search input:focus { outline: none; border-color: var(--accent-2); }
#geo-btn { white-space: nowrap; }
@media (max-width: 780px) { .nav-search { order: 3; flex-basis: 100%; max-width: none; } }

/* ---- Responsive header + burger menu ---- */
.nav-top { display: flex; align-items: center; gap: 12px; }
.nav-toggle {
    display: none; background: transparent; border: 1px solid var(--border); color: var(--text);
    border-radius: 8px; font-size: 1.25rem; line-height: 1; padding: 6px 12px; cursor: pointer;
}
.nav-toggle:hover { border-color: var(--muted); }

@media (max-width: 780px) {
    .nav-inner { flex-direction: column; align-items: stretch; gap: 10px; padding: 10px 0; }
    .nav-top { justify-content: space-between; }
    .nav-toggle { display: block; }
    .nav-search { order: 0; max-width: none; flex-basis: auto; }

    .nav-links { display: none; flex-direction: column; align-items: stretch; gap: 2px; padding-top: 6px; border-top: 1px solid var(--border); }
    .nav.nav-open .nav-links { display: flex; }
    .nav-links a, .nav-links .btn { width: 100%; text-align: left; padding: 12px 10px; border-radius: 8px; }
    .nav-links a:hover { background: var(--panel-2); }
    .nav-links .inline, .nav-links .inline button { width: 100%; }
    .nav-links .inline button { text-align: left; }
}
