/* Photographer dashboard. Same identity as the guest app (deep teal ink + marigold,
   Bricolage Grotesque + Figtree); layout: sidebar + content, made for a laptop. */
:root {
  --ink: #0e3b45;
  --marigold: #f0a63a;
  --bg: #f4f6f5;
  --surface: #ffffff;
  --surface-2: #eef1f0;
  --fg: #14211f;
  --muted: #5d6b69;
  --line: #dde3e1;
  --on-accent: #1c1405;
  --good: #1f8a52;
  --good-bg: #e3f3ea;
  --warning: #9a6200;
  --warning-bg: #fdf1dc;
  --critical: #b4372b;
  --critical-bg: #fbe7e4;
  --info-bg: #e6eff1;
  --side: #0e3b45;
  --side-fg: #e3eeee;
  --display: "Bricolage Grotesque", "Avenir Next", system-ui, sans-serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #9fd3dc; --marigold: #f3b457; --bg: #0d1514; --surface: #15201f; --surface-2: #1c2928;
    --fg: #e8eeec; --muted: #9aa9a6; --line: #2a3836; --good: #4cc489; --good-bg: #173326;
    --warning: #f3c06b; --warning-bg: #3a2c12; --critical: #ff8a7a; --critical-bg: #3d1d19; --info-bg: #182a2d;
    --side: #08201f; --side-fg: #d6e4e2; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--fg); font: 15px/1.5 var(--body); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; margin: 0; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: 28px; } h2 { font-size: 19px; } h3 { font-size: 16px; }
p { margin: 0; }
.muted { color: var(--muted); }
:focus-visible { outline: 2px solid var(--marigold); outline-offset: 2px; }
[hidden] { display: none !important; }

/* shell */
.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--side); color: var(--side-fg); padding: 22px 16px; display: flex; flex-direction: column; gap: 24px; position: sticky; top: 0; height: 100vh; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 800; font-size: 18px; text-decoration: none; color: #fff; }
.logo .mark { width: 32px; height: 32px; border-radius: 10px; background: var(--marigold); color: #1c1405; display: grid; place-items: center; font-size: 15px; }
.nav { display: grid; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; text-decoration: none; font-weight: 600; color: var(--side-fg); opacity: .8; }
.nav a:hover { background: rgb(255 255 255 / .07); opacity: 1; }
.nav a.on { background: rgb(255 255 255 / .12); opacity: 1; color: #fff; }
.nav svg, .btn svg, .tabs svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.nav .label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; opacity: .55; padding: 12px 12px 4px; font-weight: 700; }
.side .bottom { margin-top: auto; }
.side .bottom button { background: none; border: 0; color: var(--side-fg); opacity: .7; font: inherit; font-weight: 600; cursor: pointer; padding: 9px 12px; }
.main { padding: 28px 36px 64px; min-width: 0; }
.wrap { max-width: 1180px; margin: 0 auto; display: grid; gap: 22px; }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; align-items: center; padding: 12px 16px; gap: 12px; flex-wrap: wrap; }
  .nav { display: flex; gap: 4px; flex: 1; }
  .nav .label { display: none; }
  .side .bottom { margin: 0; }
  .main { padding: 20px 16px 48px; }
}

/* buttons & inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); font: inherit; font-weight: 650; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--marigold); border-color: var(--marigold); color: var(--on-accent); }
.btn.dark { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.btn.danger { background: var(--critical); border-color: var(--critical); color: #fff; }
.btn.wa { background: #1f8f4e; border-color: #1f8f4e; color: #fff; }
.btn.small { min-height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn.link { border: 0; background: none; padding: 0; min-height: 0; color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
label.field { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
input[type=text], input[type=password], input[type=search], input[type=date], input:not([type]), select {
  font: inherit; font-weight: 400; height: 42px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); width: 100%; min-width: 0;
}
input:focus, select:focus { outline: none; border-color: var(--marigold); box-shadow: 0 0 0 3px rgb(240 166 58 / .2); }
.hint { font-size: 13px; color: var(--muted); font-weight: 400; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; align-items: end; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }

/* cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px; display: grid; gap: 14px; min-width: 0; }
.card > header { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.grid-2 > .col { display: grid; gap: 22px; min-width: 0; }
@media (max-width: 1000px) { .grid-2 { grid-template-columns: 1fr; } }

/* pills & alerts */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 99px; white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.good { background: var(--good-bg); color: var(--good); }
.pill.warning { background: var(--warning-bg); color: var(--warning); }
.pill.critical { background: var(--critical-bg); color: var(--critical); }
.pill.neutral { background: var(--surface-2); color: var(--muted); }
.alerts { display: grid; gap: 10px; }
.alert { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 12px; border: 1px solid transparent; flex-wrap: wrap; }
.alert .text { flex: 1; min-width: 220px; font-weight: 600; }
.alert.critical { background: var(--critical-bg); border-color: color-mix(in srgb, var(--critical) 25%, transparent); }
.alert.critical .text { color: var(--critical); }
.alert.warning { background: var(--warning-bg); }
.alert.warning .text { color: var(--warning); }
.alert.info { background: var(--info-bg); }
.alert form { display: inline; }
.notice { background: var(--good-bg); color: var(--good); font-weight: 650; padding: 10px 14px; border-radius: 10px; }
.error { background: var(--critical-bg); color: var(--critical); font-weight: 650; padding: 10px 14px; border-radius: 10px; }
.error:empty { display: none; }

/* event header & tabs */
.event-head { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.event-head .thumb { width: 72px; height: 72px; border-radius: 14px; object-fit: cover; background: linear-gradient(135deg, var(--ink), #1b5a66); flex: 0 0 auto; }
.event-head .info { flex: 1; min-width: 220px; display: grid; gap: 4px; }
.event-head .meta { color: var(--muted); font-size: 14px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.crumb { font-size: 13px; color: var(--muted); text-decoration: none; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs a { display: flex; align-items: center; gap: 8px; padding: 10px 14px; text-decoration: none; font-weight: 650; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--fg); }
.tabs a.on { color: var(--fg); border-color: var(--marigold); }
.tabs .count { font-size: 12px; background: var(--surface-2); color: var(--muted); padding: 0 7px; border-radius: 99px; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: grid; gap: 2px; }
.stat .n { font-family: var(--display); font-weight: 800; font-size: 30px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat .l { font-size: 13px; color: var(--muted); font-weight: 600; }
.progress { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--marigold); border-radius: 99px; transition: width .4s; }
.list { display: grid; }
.list .item { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.list .item:last-child { border-bottom: 0; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 14px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }

/* qr & link */
.share { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 18px; align-items: center; }
.share .qr svg { width: 150px; height: 150px; display: block; border-radius: 10px; background: #fff; padding: 6px; }
@media (max-width: 520px) { .share { grid-template-columns: 1fr; } }
.linkbox { display: flex; gap: 8px; min-width: 0; }
.linkbox input { font-size: 13px; background: var(--surface-2); }
.poster-preview { width: 100%; max-width: 260px; border-radius: 8px; border: 1px solid var(--line); box-shadow: 0 6px 20px rgb(0 0 0 / .08); }

/* events grid */
.events { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; }
.event-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; text-decoration: none; display: grid; grid-template-rows: auto 1fr; transition: transform .15s, box-shadow .15s; }
.event-card:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgb(0 0 0 / .08); }
.event-card .cover { height: 150px; background: linear-gradient(135deg, var(--ink), #1b5a66); position: relative; }
.event-card .cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.event-card .cover .pill { position: absolute; top: 12px; left: 12px; }
.event-card .body { padding: 14px 16px 16px; display: grid; gap: 6px; align-content: start; }
.event-card .nums { display: flex; gap: 14px; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.new-card { border: 2px dashed var(--line); border-radius: 16px; padding: 18px; display: grid; gap: 12px; align-content: start; background: transparent; }

/* photos */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.toolbar select, .toolbar input { width: auto; min-width: 160px; }
.toolbar input[type=search] { flex: 1; min-width: 200px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.ph { position: relative; border-radius: 10px; overflow: hidden; background: var(--surface-2); aspect-ratio: 1; }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .15s, opacity .15s; }
.ph.hidden-photo img { opacity: .35; }
.ph .open { position: absolute; inset: 0; border: 0; padding: 0; background: none; cursor: zoom-in; }
.ph .tag { position: absolute; left: 8px; bottom: 8px; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: rgb(0 0 0 / .6); color: #fff; }
.ph .tag.warn { background: var(--critical); }
.ph .pick { position: absolute; top: 8px; left: 8px; width: 22px; height: 22px; accent-color: var(--marigold); cursor: pointer; }
.ph .acts { position: absolute; top: 6px; right: 6px; display: flex; gap: 4px; opacity: 0; transition: opacity .15s; }
.ph:hover .acts, .ph:focus-within .acts, .ph .acts .on { opacity: 1; }
.ph .acts form { display: contents; }
.ph .acts button { width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgb(0 0 0 / .55); color: #fff; font-size: 14px; cursor: pointer; display: grid; place-items: center; }
.ph .acts button.on { background: var(--marigold); color: #1c1405; opacity: 1; }
.ph.selected { outline: 3px solid var(--marigold); outline-offset: -3px; }
.placeholder { width: 100%; height: 100%; display: grid; place-items: center; font-size: 12px; color: var(--muted); text-transform: capitalize; }
.bulkbar { position: sticky; bottom: 16px; z-index: 5; display: flex; gap: 10px; align-items: center; justify-content: space-between; background: var(--fg); color: var(--bg); border-radius: 14px; padding: 10px 12px 10px 18px; box-shadow: 0 10px 30px rgb(0 0 0 / .2); flex-wrap: wrap; }
.bulkbar .btn { border-color: transparent; }
.pager { display: flex; gap: 10px; align-items: center; justify-content: center; }

/* upload */
.dropzone { border: 2px dashed var(--line); border-radius: 14px; padding: 32px 20px; text-align: center; display: grid; gap: 12px; justify-items: center; transition: border-color .15s, background .15s; }
.dropzone.over { border-color: var(--marigold); background: color-mix(in srgb, var(--marigold) 8%, transparent); }
.dropzone .row { justify-content: center; }
.dropzone svg { width: 36px; height: 36px; stroke: var(--muted); fill: none; stroke-width: 1.6; }
progress { width: 100%; height: 8px; accent-color: var(--marigold); }
.errors { color: var(--critical); font-size: 13px; padding-left: 18px; max-height: 160px; overflow: auto; margin: 0; }

/* guests */
.table-wrap { overflow-x: auto; }
table.guests { width: 100%; border-collapse: collapse; font-size: 14px; }
table.guests th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; padding: 0 12px 10px; border-bottom: 1px solid var(--line); }
table.guests td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.guests tr:last-child td { border-bottom: 0; }
.faces { display: flex; }
.face { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid var(--surface); background: var(--surface-2); margin-left: -8px; display: grid; place-items: center; font-weight: 800; color: var(--muted); font-size: 14px; }
.face:first-child { margin-left: 0; }
.people-names { color: var(--muted); font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }
.actions { display: flex; gap: 6px; justify-content: flex-end; }

/* settings preview */
.phone { width: 230px; height: 440px; border-radius: 32px; border: 8px solid #101716; overflow: hidden; background: #f6f7f6; display: flex; flex-direction: column; color: #14211f; flex: 0 0 auto; }
.phone .pcover { height: 52%; position: relative; background: linear-gradient(135deg, #0e3b45, #1b5a66); }
.phone .pcover img { width: 100%; height: 100%; object-fit: cover; }
.phone .pcover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(0 0 0 / .3), transparent 35%, transparent 55%, #f6f7f6); }
.phone .pbrand { position: absolute; top: 10px; left: 10px; z-index: 1; display: flex; gap: 6px; align-items: center; color: #fff; font-size: 11px; font-weight: 700; text-shadow: 0 1px 4px rgb(0 0 0 / .5); }
.phone .pmono { width: 22px; height: 22px; border-radius: 50%; background: #f0a63a; color: #1c1405; display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 9px; text-shadow: none; }
.phone .ptext { padding: 0 14px; margin-top: -18px; position: relative; z-index: 1; display: grid; gap: 3px; }
.phone .ptext small { font-size: 8px; font-weight: 700; letter-spacing: .08em; color: #5d6b69; }
.phone .ptext strong { font-family: var(--display); font-size: 20px; line-height: 1; }
.phone .pbtn { margin: auto 14px 6px; height: 30px; border-radius: 9px; background: #f0a63a; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.phone .ppow { text-align: center; font-size: 8px; color: #5d6b69; padding-bottom: 10px; }
.settings-brand { display: flex; gap: 28px; align-items: flex-start; flex-wrap: wrap; }
.settings-brand form { flex: 1; min-width: 260px; display: grid; gap: 14px; }
.danger-zone { border-color: color-mix(in srgb, var(--critical) 35%, var(--line)); }

/* login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--side); }
.login .card { width: min(380px, 100%); }

/* photo viewer */
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgb(8 12 12 / .96); color: #fff; display: grid; grid-template-rows: auto 1fr auto; }
.lb-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 18px; flex-wrap: wrap; }
.lb-info { display: grid; min-width: 0; }
.lb-info strong { overflow-wrap: anywhere; }
.lb-info span { font-size: 13px; opacity: .7; }
.lightbox .btn:not(.primary) { background: rgb(255 255 255 / .1); border-color: transparent; color: #fff; }
.lightbox .btn:disabled { opacity: .5; }
.lb-close { width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgb(255 255 255 / .1); color: #fff; font-size: 18px; cursor: pointer; }
.lb-stage { position: relative; display: grid; place-items: center; min-height: 0; padding: 0 70px; }
.lb-stage img { max-width: 100%; max-height: calc(100vh - 150px); object-fit: contain; border-radius: 6px; transition: opacity .2s; }
.lb-empty { opacity: .7; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgb(255 255 255 / .12); color: #fff; font-size: 26px; cursor: pointer; }
.lb-nav:hover { background: rgb(255 255 255 / .22); }
.lb-nav.prev { left: 14px; } .lb-nav.next { right: 14px; }
.lb-foot { text-align: center; padding: 10px; font-size: 13px; opacity: .7; font-variant-numeric: tabular-nums; }
@media (max-width: 700px) { .lb-stage { padding: 0 8px; } .lb-nav { display: none; } }
