:root {
  --bg: #0f1014;
  --panel: #191b22;
  --panel-2: #22252e;
  --line: #2f333f;
  --text: #f1f2f5;
  --muted: #9ba1b0;
  --accent: #ff4d6d;
  --accent-ink: #fff;
  --ok: #3ddc97;
  --warn: #ffb84d;
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 15px/1.5 Inter, system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
h1 { font-size: 26px; line-height: 1.2; margin: 0 0 6px; text-wrap: balance; }
h2 { font-size: 17px; margin: 0 0 10px; }
p { margin: 0 0 10px; }
.muted { color: var(--muted); }
.small-text { font-size: 13px; }

.bar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: rgba(15,16,20,.92); backdrop-filter: blur(8px); z-index: 5; }
.brand { font-weight: 700; font-size: 18px; text-decoration: none; letter-spacing: -.01em; }
.brand span { color: var(--accent); }
.bar nav { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.bar nav a { text-decoration: none; }
.badge { font-size: 12px; padding: 3px 9px; border-radius: 99px; background: rgba(255,184,77,.14); color: var(--warn); }

main { max-width: 1040px; margin: 0 auto; padding: 22px 16px 80px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 760px) { .grid-2 { grid-template-columns: 1fr; } }

label { display: block; font-weight: 600; font-size: 13px; margin: 12px 0 5px; }
label .hint { font-weight: 400; color: var(--muted); }
input[type=text], input[type=password], input[type=url], textarea, select {
  width: 100%; background: var(--panel-2); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font: inherit;
}
textarea { resize: vertical; min-height: 96px; }
input:focus-visible, textarea:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 10px; padding: 10px 16px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn:hover { filter: brightness(1.08); }
.btn.secondary { background: var(--panel-2); color: var(--text); border: 1px solid var(--line); }
.btn.ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.btn.small { padding: 6px 12px; font-size: 13px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; filter: none; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.spacer { flex: 1; }

.choices { display: grid; gap: 8px; }
.choice { display: flex; gap: 10px; align-items: flex-start; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: pointer; font-weight: 400; margin: 0; }
.choice:has(input:checked) { border-color: var(--accent); background: rgba(255,77,109,.08); }
.choice input { margin-top: 3px; accent-color: var(--accent); }
.choice b { display: block; font-size: 14px; }
.choice span { color: var(--muted); font-size: 13px; }

.photos { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.photo { position: relative; width: 84px; height: 84px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #fff; }
.photo img { width: 100%; height: 100%; object-fit: contain; }
.photo button { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0,0,0,.7); color: #fff; cursor: pointer; line-height: 1; }

.estimate { background: var(--panel-2); border-radius: 10px; padding: 12px; font-size: 14px; margin-top: 14px; font-variant-numeric: tabular-nums; }
.estimate b { color: var(--text); }

.list { display: grid; gap: 10px; }
.item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; }
.item:hover { border-color: #4a5063; }
.item .title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill { font-size: 12px; padding: 3px 10px; border-radius: 99px; background: var(--panel-2); color: var(--muted); white-space: nowrap; }
.pill.ok { color: var(--ok); background: rgba(61,220,151,.12); }
.pill.busy { color: var(--warn); background: rgba(255,184,77,.12); }
.pill.bad { color: #ff7b7b; background: rgba(255,123,123,.12); }

.status { display: flex; align-items: center; gap: 10px; }
.spinner { width: 16px; height: 16px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }
.error-box { background: rgba(255,123,123,.1); border: 1px solid rgba(255,123,123,.35); color: #ffb3b3; border-radius: 10px; padding: 10px 12px; margin-top: 10px; overflow-wrap: anywhere; }

.studio { display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: 18px; align-items: start; }
@media (max-width: 760px) { .studio { grid-template-columns: 1fr; } .player { max-width: 300px; margin: 0 auto; } }
.player canvas, .player video { width: 100%; aspect-ratio: 9/16; border-radius: 12px; background: #000; display: block; }
.scrub { width: 100%; accent-color: var(--accent); margin: 8px 0 0; }
progress { width: 100%; height: 8px; accent-color: var(--accent); }
.checks { display: flex; gap: 16px; flex-wrap: wrap; margin: 10px 0; }
.checks label { display: flex; align-items: center; gap: 7px; font-weight: 400; margin: 0; font-size: 14px; }
.checks input { accent-color: var(--accent); }

.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.shot { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.shot .thumb { position: relative; aspect-ratio: 9/16; background: #000; }
.shot .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shot .n { position: absolute; top: 6px; left: 6px; background: rgba(0,0,0,.7); border-radius: 6px; padding: 1px 7px; font-size: 12px; font-variant-numeric: tabular-nums; }
.shot .tags { position: absolute; top: 6px; right: 6px; display: flex; gap: 4px; }
.shot .tag { background: var(--accent); border-radius: 6px; padding: 1px 6px; font-size: 11px; font-weight: 600; }
.shot .tag.vid { background: var(--ok); color: #05301f; }
.shot .body { padding: 8px 10px 10px; font-size: 13px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.shot .line { color: var(--text); }
.shot .acts { display: flex; gap: 6px; margin-top: auto; }
.shot .acts .btn { flex: 1; padding: 5px 6px; font-size: 12px; }

dialog { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; width: min(560px, calc(100vw - 32px)); }
dialog::backdrop { background: rgba(0,0,0,.6); }
.caption-box { background: var(--panel-2); border-radius: 10px; padding: 10px 12px; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.login { max-width: 380px; margin: 60px auto; }
#toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: #2b2f3a; border: 1px solid var(--line); padding: 10px 16px; border-radius: 10px; max-width: calc(100vw - 32px); z-index: 20; }
