/* Colors and fonts match GigBook. Layout follows a profile-page style: big cover header, round photo, tabs. */
:root {
  --bg: #f6f5f2; --surface: #ffffff; --surface-2: #f0eee9; --border: #e3e0d8;
  --text: #1f1d1a; --muted: #6d685f; --accent: #5b4bdb; --accent-2: #ece9ff; --accent-text: #ffffff;
  --ok: #1f8a5b; --ok-bg: #e3f4ec; --warn: #a86400; --warn-bg: #fff2dc; --bad: #b42318; --bad-bg: #fde8e6;
  --radius: 12px; --shadow: 0 1px 2px rgba(0,0,0,.05), 0 4px 16px rgba(0,0,0,.04);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141311; --surface: #1d1c19; --surface-2: #262420; --border: #34312b;
    --text: #f1eee8; --muted: #a39d92; --accent: #8f83ff; --accent-2: #2a2650; --accent-text: #14121f;
    --ok: #4cc38a; --ok-bg: #16302a; --warn: #f0b252; --warn-bg: #352712; --bad: #ff7a6b; --bad-bg: #3a1b18;
    --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #141311; --surface: #1d1c19; --surface-2: #262420; --border: #34312b;
  --text: #f1eee8; --muted: #a39d92; --accent: #8f83ff; --accent-2: #2a2650; --accent-text: #14121f;
  --ok: #4cc38a; --ok-bg: #16302a; --warn: #f0b252; --warn-bg: #352712; --bad: #ff7a6b; --bad-bg: #3a1b18;
  --shadow: none; color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; margin: 0 0 .4em; letter-spacing: -.01em; }
h1 { font-size: 1.75rem; } h2 { font-size: 1.3rem; } h3 { font-size: 1.05rem; font-family: var(--sans); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
p { margin: 0 0 .6em; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .tiny { font-size: .75rem; }
.row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; }
.stack > * + * { margin-top: .75rem; }
.hidden { display: none !important; }
.wrap { max-width: 600px; margin: 0 auto; padding: 0 16px 80px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.2rem; box-shadow: var(--shadow); }

/* Forms */
label { display: block; font-size: .85rem; font-weight: 550; margin-bottom: .25rem; color: var(--muted); }
input, textarea, select { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: .6rem .7rem; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
textarea { resize: vertical; min-height: 64px; }
input[type="checkbox"] { width: auto; accent-color: var(--accent); }
input[type="file"] { padding: .4rem; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; border: 1px solid var(--border); background: var(--surface); color: var(--text);
  padding: .5rem .9rem; border-radius: 8px; font: inherit; font-weight: 550; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.money { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.money:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.danger { color: var(--bad); }
.btn.big { width: 100%; padding: .8rem 1rem; font-size: 1.02rem; border-radius: 10px; }
.btn.small { padding: .3rem .6rem; font-size: .85rem; }
.chip { display: inline-flex; align-items: center; gap: .3rem; font-size: .72rem; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; padding: .15rem .55rem; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.chip.money, .chip.ok { background: var(--ok-bg); color: var(--ok); }
.chip.accent { background: var(--accent-2); color: var(--accent); }
.chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip.bad { background: var(--bad-bg); color: var(--bad); }
.e-badge { display: inline-block; font-size: .65rem; font-weight: 800; padding: 0 .3rem; border-radius: 3px; background: var(--muted); color: var(--surface); vertical-align: 1px; }

/* Song rows */
.song { display: flex; gap: .75rem; align-items: center; padding: .7rem 0; }
.song + .song { border-top: 1px solid var(--border); }
.art { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; background: var(--surface-2); flex: none; display: grid; place-items: center; color: var(--muted); font-size: 1.2rem; }
.song .info { flex: 1; min-width: 0; }
.song .title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.song .sub { color: var(--muted); font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vote { display: grid; justify-items: center; min-width: 44px; padding: .3rem .4rem; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); font: inherit; font-size: .8rem; font-weight: 700; cursor: pointer; line-height: 1.1; }
.vote .h { font-size: 1.05rem; }
.vote.on { color: var(--accent); border-color: var(--accent); background: var(--accent-2); }

/* Search results */
.results { margin-top: .5rem; max-height: 340px; overflow: auto; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.results button { all: unset; box-sizing: border-box; display: flex; gap: .7rem; align-items: center; width: 100%; padding: .5rem .7rem; cursor: pointer; }
.results button:hover, .results button:focus-visible { background: var(--accent-2); }
.results button + button { border-top: 1px solid var(--border); }
.results .art { width: 40px; height: 40px; }
.selected { display: flex; gap: .7rem; align-items: center; padding: .6rem; border-radius: 12px; background: var(--accent-2); border: 1px solid var(--accent); }

/* Segmented control (Up next / Played, filters) */
.seg { display: flex; background: var(--surface-2); border-radius: 10px; padding: 3px; gap: 2px; overflow-x: auto; }
.seg button { flex: 1; border: 0; background: transparent; padding: .45rem .8rem; border-radius: 8px; font: inherit; font-weight: 550; font-size: .9rem; color: var(--muted); cursor: pointer; white-space: nowrap; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.12); }

/* Dialogs */
dialog { border: 1px solid var(--border); border-radius: 16px; background: var(--surface); color: var(--text); padding: 20px; width: min(440px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(20,18,15,.5); backdrop-filter: blur(2px); }
.amounts { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
.amounts button { font: inherit; font-weight: 700; padding: .7rem 0; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; }
.amounts button.on { border-color: var(--ok); background: var(--ok-bg); color: var(--ok); }
.pay { display: grid; gap: .5rem; }
.pay .btn { justify-content: flex-start; padding: .8rem 1rem; }
.venmo-dot, .cash-dot, .card-dot { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; font-size: .8rem; font-weight: 800; color: #fff; }
.venmo-dot { background: #008cff; } .cash-dot { background: #00c244; } .card-dot { background: #635bff; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: .7rem 1rem; border-radius: 12px; font-weight: 600; box-shadow: 0 10px 30px rgba(0,0,0,.25); z-index: 50; max-width: calc(100vw - 32px); }
.toast.bad { background: var(--bad); color: #fff; }

/* ---------- Profile header: big cover image, round photo overlapping its bottom-left corner ---------- */
.profile-head { margin: 0 -16px; }
.cover { position: relative; aspect-ratio: 16 / 10; max-height: 340px; width: 100%; overflow: hidden;
  background: radial-gradient(120% 90% at 15% 10%, var(--accent) 0%, transparent 60%), radial-gradient(90% 80% at 95% 95%, #c86bd8 0%, transparent 60%), var(--accent-2); }
.cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover::after { content: ''; position: absolute; inset: auto 0 0 0; height: 40%; background: linear-gradient(transparent, rgba(0,0,0,.35)); pointer-events: none; }
.cover-edit { position: absolute; top: 12px; right: 12px; z-index: 2; background: rgba(0,0,0,.55); border-color: rgba(255,255,255,.3); color: #fff; backdrop-filter: blur(4px); }
.cover-edit:hover { background: rgba(0,0,0,.7); }
.avatar-row { position: relative; padding: 0 16px; margin-top: -60px; z-index: 1; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.avatar-wrap { position: relative; }
.avatar { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; flex: none; border: 4px solid var(--surface); background: linear-gradient(135deg, var(--accent), #c86bd8); display: grid; place-items: center; font-family: var(--serif); font-weight: 700; font-size: 2.4rem; color: #fff; box-shadow: 0 6px 20px rgba(0,0,0,.2); }
.avatar-edit { position: absolute; right: 2px; bottom: 6px; width: 34px; height: 34px; padding: 0; border-radius: 50%; }
.profile-info { padding: 12px 16px 0; }
.profile-info h1 { font-size: 2rem; margin: 0 0 .15rem; }
.profile-info .tagline { color: var(--muted); margin: 0; }
.icon-row { display: flex; gap: .5rem; margin-top: .9rem; flex-wrap: wrap; align-items: center; }
.round { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--border); color: var(--text); cursor: pointer; text-decoration: none; font: inherit; padding: 0; box-shadow: var(--shadow); }
.round:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.round svg { width: 19px; height: 19px; }
@media (min-width: 632px) { .profile-head { margin: 0; } .cover { border-radius: 0 0 18px 18px; } }

/* Underlined page tabs (Make Request / Requests) */
.page-tabs { display: flex; justify-content: center; gap: 1.75rem; margin: 20px 0 16px; border-bottom: 1px solid var(--border); }
.page-tabs button { font: inherit; font-weight: 600; font-size: 1rem; background: none; border: 0; color: var(--muted); padding: .65rem .3rem; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; display: inline-flex; gap: .45rem; align-items: center; white-space: nowrap; }
@media (max-width: 420px) { .page-tabs { gap: 1rem; } .page-tabs button { font-size: .93rem; } .seg button { padding: .45rem .5rem; font-size: .85rem; } }
.page-tabs button:hover { color: var(--text); }
.page-tabs button.on { color: var(--text); border-bottom-color: var(--accent); }
.count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--accent-text); font-size: .72rem; font-weight: 700; display: inline-grid; place-items: center; }

/* A card inside a card with a centered title, for the request form */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 12px; box-shadow: var(--shadow); }
.panel-inner { background: var(--surface-2); border-radius: 14px; padding: 22px 18px; }
.panel-title { text-align: center; font-size: 1.5rem; margin: 0 0 1rem; }
.fine-print { text-align: center; font-size: .8rem; color: var(--muted); margin: .9rem 0 0; }
.notice { text-align: center; font-weight: 550; margin: .2rem 0 .8rem; }

/* Status pill with dropdown (Taking requests / Paused) */
.status-pill { display: flex; justify-content: center; margin-top: 18px; }
.status-pill select { width: auto; border-radius: 999px; padding: .55rem 2.2rem .55rem 1.1rem; font-weight: 600; background-color: var(--ok-bg); color: var(--ok); border: 1px solid color-mix(in srgb, var(--ok) 35%, transparent); appearance: none;
  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='%23888' stroke-width='3'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .9rem center; cursor: pointer; }
.status-pill select.paused { background-color: var(--warn-bg); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }

/* Top bar on the DJ side */
.topbar { position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center; padding: .6rem 0; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
.admin-badge { display: inline-flex; align-items: center; gap: .35rem; font-size: .78rem; font-weight: 700; padding: .25rem .65rem; border-radius: 999px; border: 1px solid var(--accent); color: var(--accent); }
.admin-badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

/* Side menu (drawer) */
dialog.drawer { margin: 0 0 0 auto; height: 100vh; max-height: 100vh; width: min(320px, 88vw); border-radius: 0; border-width: 0 0 0 1px; padding: 18px 14px; }
.menu a, .menu button { display: flex; width: 100%; align-items: center; gap: .6rem; padding: .65rem .7rem; border-radius: 8px; color: var(--text); font: inherit; font-weight: 500; background: none; border: 0; cursor: pointer; text-align: left; text-decoration: none; }
.menu a:hover, .menu button:hover { background: var(--surface-2); text-decoration: none; }
.menu .group { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 1rem .7rem .3rem; }
.menu .danger { color: var(--bad); }

.banner { border-radius: 10px; padding: .75rem 1rem; font-weight: 550; background: var(--warn-bg); color: var(--warn); }
.empty { text-align: center; color: var(--muted); padding: 1.5rem 0; }
.foot { text-align: center; margin-top: 2rem; }
