/* Tokens + shared components (site and app). */
@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,500;12..96,700;12..96,800&family=Instrument+Sans:wght@400;500;600;700&display=swap');

:root {
  --ink: #121521;
  --ink-2: #4B5163;
  --ink-3: #7A8093;
  --paper: #FFFFFF;
  --mist: #F5F6F8;          /* page background: light gray, cards are white */
  --mist-2: #ECEEF2;
  --rule: #E3E6EB;
  --act: #1463FF;          /* stage blue: the action color (change here to rebrand) */
  --act-ink: #FFFFFF;
  --act-soft: #E8F0FF;
  --good: #0E8A5F;
  --good-soft: #DDF4EA;
  --warn: #B45A00;
  --warn-soft: #FFF0DC;
  --bad: #C42B45;
  --bad-soft: #FDE4E8;
  /* role pass colors — used ONLY to mean "this role" */
  --r-photo: #E0307A;
  --r-video: #2457F5;
  --r-multicam: #0A6FB8;
  --r-vj: #7B2FF2;
  --r-ld: #E39A00;
  --r-lasers: #2DAF4A;
  --r-drone: #0EA5C6;
  --r-content: #F25C3B;
  --r-editor: #5B6478;
  --r-audio: #0F8C83;
  --r-dj: #C026D3;

  --display: 'Bricolage Grotesque', 'Instrument Sans', system-ui, sans-serif;
  --text: 'Instrument Sans', system-ui, -apple-system, sans-serif;
  --r-s: 8px; --r-m: 12px; --r-l: 18px;
  --shadow: 0 1px 2px rgba(18, 21, 33, .05), 0 6px 20px rgba(18, 21, 33, .06);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --ink: #EEF0FA; --ink-2: #B8BCD3; --ink-3: #8A8EA8;
  --paper: #1A1C30; --mist: #121325; --mist-2: #23263D; --rule: #2F3350;
  --act: #5B93FF; --act-ink: #0B1530; --act-soft: #15264A;
  --good: #45D19B; --good-soft: #10362A; --warn: #FFB65C; --warn-soft: #3B2A12; --bad: #FF7A90; --bad-soft: #3C1A23;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 16px/1.5 var(--text); color: var(--ink); background: var(--mist); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.1; margin: 0 0 .4em; letter-spacing: -.01em; font-weight: 700; }
h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; }
h2 { font-size: 24px; }
h3 { font-size: 18px; }
p { margin: 0 0 1em; }
a { color: var(--act); }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--act); outline-offset: 2px; border-radius: 6px; }
.muted { color: var(--ink-3); }
.small { font-size: 14px; }
.tiny { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border-radius: 999px; border: 1.5px solid var(--rule); background: var(--paper); color: var(--ink);
  font: 600 15px var(--text); cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--ink-3); }
.btn.primary { background: var(--act); border-color: var(--act); color: var(--act-ink); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.danger { color: var(--bad); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.small { min-height: 34px; padding: 0 12px; font-size: 14px; }
.btn.block { width: 100%; }
.btn[disabled], .btn.busy { opacity: .55; pointer-events: none; }
.btn .ic { width: 18px; height: 18px; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--act); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- forms ---------- */
label.f { display: block; margin-bottom: 14px; }
label.f > span { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
label.f > small { display: block; color: var(--ink-3); font-size: 13px; margin-top: 5px; }
input:not([type]), input[type=text], input[type=email], input[type=time], input[type=password], input[type=number], input[type=date], input[type=tel], input[type=url], input[type=search], select, textarea {
  width: 100%; min-height: 46px; padding: 10px 14px; border: 1.5px solid var(--rule); border-radius: var(--r-m);
  background: var(--paper); color: var(--ink); font: 16px var(--text); }
textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--act); box-shadow: 0 0 0 3px var(--act-soft); }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1 1 160px; min-width: 0; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: 15px; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--act); flex: none; }
.money-in { position: relative; }
.money-in::before { content: '$'; position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.money-in input { padding-left: 28px; }

/* role checkboxes / chips */
.roles { display: flex; flex-wrap: wrap; gap: 8px; }
.role-chip { --c: var(--ink-3); position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px 6px 10px;
  border-radius: 999px; border: 1.5px solid var(--rule); background: var(--paper); font-weight: 600; font-size: 14px; cursor: pointer; user-select: none; }
.role-chip::before { content: ''; width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.role-chip input { position: absolute; opacity: 0; pointer-events: none; }
.role-chip:has(input:checked) { border-color: var(--c); background: color-mix(in srgb, var(--c) 12%, var(--paper)); }
.role-chip:has(input:focus-visible) { outline: 3px solid var(--act); outline-offset: 2px; }
.role-chip.static { cursor: default; padding: 3px 10px 3px 8px; font-size: 13px; }
[data-role=photo]{--c:var(--r-photo)} [data-role=video]{--c:var(--r-video)} [data-role=multicam]{--c:var(--r-multicam)}
[data-role=vj]{--c:var(--r-vj)} [data-role=ld]{--c:var(--r-ld)} [data-role=lasers]{--c:var(--r-lasers)} [data-role=drone]{--c:var(--r-drone)}
[data-role=content]{--c:var(--r-content)} [data-role=dj]{--c:var(--r-dj)} [data-role=editor]{--c:var(--r-editor)} [data-role=audio]{--c:var(--r-audio)}

/* status pills */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: var(--mist-2); color: var(--ink-2); white-space: nowrap; }
.pill.good { background: var(--good-soft); color: var(--good); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.act { background: var(--act-soft); color: var(--act); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }

/* ---------- the laminate: creator + gig cards ---------- */
.lam { --c: var(--act); position: relative; background: var(--paper); border-radius: var(--r-l); box-shadow: var(--shadow);
  overflow: hidden; display: flex; flex-direction: column; color: inherit; text-decoration: none; border: 1px solid var(--rule); }
.lam::before { /* the punched slot at the top of a credential */
  content: ''; position: absolute; top: 10px; left: 50%; width: 38px; height: 7px; margin-left: -19px; border-radius: 99px;
  background: var(--mist); box-shadow: inset 0 1px 2px rgba(0,0,0,.18); z-index: 2; }
.lam .band { height: 54px; background: var(--c); position: relative; overflow: hidden; }
.lam .band img { width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.lam .band.tall { height: 120px; }
.lam .who { display: flex; gap: 12px; align-items: center; padding: 0 16px; margin-top: -26px; position: relative; z-index: 1; }
.lam .body { padding: 10px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.lam .name { font: 700 18px/1.15 var(--display); }
.lam .meta { color: var(--ink-3); font-size: 14px; }
.lam .body > .pill, .lam .body > .badge-founding, .lam .body .pill { align-self: flex-start; }
.lam .pass { font: 800 12px/1 var(--display); letter-spacing: .04em; color: var(--paper); background: var(--c); padding: 5px 8px; border-radius: 6px; align-self: flex-start; }
a.lam:hover { border-color: var(--ink-3); }
.avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--mist-2) center/cover; border: 3px solid var(--paper); flex: none;
  display: grid; place-items: center; font: 700 18px var(--display); color: var(--ink-2); overflow: hidden; }
.avatar.s { width: 36px; height: 36px; font-size: 14px; border-width: 2px; }
.avatar.l { width: 88px; height: 88px; font-size: 30px; border-width: 4px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.stars { color: #E8A300; font-weight: 700; }
.badge-founding { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--act); background: var(--act-soft); padding: 2px 8px; border-radius: 99px; }

.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }

/* panels + lists */
.panel { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r-l); padding: 20px; }
.panel + .panel { margin-top: 16px; }
.panel > h2:first-child, .panel > h3:first-child { margin-top: 0; }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--rule); }
.list > li:first-child { border-top: 0; }
.list .grow { flex: 1; min-width: 0; }
.list a.rowlink { display: flex; gap: 12px; align-items: center; color: inherit; text-decoration: none; flex: 1; min-width: 0; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 15px; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; font-weight: 500; }
.empty { text-align: center; padding: 36px 16px; color: var(--ink-3); }
.empty h3 { color: var(--ink); }

/* toast + modal */
#toasts { position: fixed; left: 50%; bottom: calc(24px + var(--safe-bottom) + var(--tabbar, 0px)); transform: translateX(-50%); z-index: 100; display: grid; gap: 8px; width: min(92vw, 420px); }
.toast { background: var(--ink); color: var(--paper); padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow); font-weight: 500; animation: tin .2s ease-out; }
.toast.bad { background: var(--bad); color: #fff; }
@keyframes tin { from { transform: translateY(8px); opacity: 0; } }
dialog.modal { border: 0; padding: 0; border-radius: 20px; width: min(560px, 94vw); max-height: 90vh; background: var(--paper); color: var(--ink); box-shadow: 0 30px 80px rgba(0,0,0,.35); }
dialog.modal::backdrop { background: rgba(14, 15, 30, .5); }
dialog.modal .m-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px 6px; }
dialog.modal .m-head h2 { margin: 0; font-size: 22px; }
dialog.modal .m-body { padding: 8px 20px 20px; overflow: auto; max-height: calc(90vh - 70px); }
dialog.modal .m-foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
.x { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--mist); color: var(--ink); font-size: 22px; cursor: pointer; line-height: 1; }

.skel { background: linear-gradient(90deg, var(--mist-2), var(--mist), var(--mist-2)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 12px; min-height: 80px; }
@keyframes sk { to { background-position: -200% 0; } }
.lam .body .pill { max-width: 100%; overflow: hidden; text-overflow: ellipsis; display: inline-block; }
