/* Ashq Review — same tokens as ashishsajwan.com */
:root {
  --bg: #060606;
  --panel: #0a0a0a;
  --raise: #121211;
  --raise-2: #191918;
  --text: #f2f2ef;
  --muted: #9a9a96;
  --muted-2: #6b6b67;
  --line: rgba(255, 255, 255, 0.1);
  --line-2: rgba(255, 255, 255, 0.16);
  --accent: #9b2d3a;
  --accent-hi: #c8475a;
  --ok: #5f9e7a;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  /* track colours: quiet, desaturated, one family */
  --k-caption: #b9a77a;
  --k-cut: #f2f2ef;
  --k-graphic: #8c86b8;
  --k-broll: #7f8f9b;
  --k-music: #6f8f86;
  --k-sfx: #a07c62;
  --k-zoom: #b07a8a;
  --k-insert: #8a8a86;
  --k-speech: #4d4d4a;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
::selection { background: rgba(155, 45, 58, 0.55); }

.mono { font-family: var(--mono); }
.label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.accent { color: var(--accent-hi); }

/* ---------- buttons ---------- */
.btn {
  height: 32px;
  padding: 0 14px;
  border-radius: 6px;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--text);
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
}
.btn:hover { background: var(--raise-2); }
.btn.primary { background: var(--text); color: var(--bg); border-color: var(--text); font-weight: 500; }
.btn.primary:hover { background: #fff; }
.btn.danger { border-color: rgba(200, 71, 90, 0.5); color: #f0c5cb; }
.btn.danger:hover { background: rgba(155, 45, 58, 0.18); }
.btn:disabled { opacity: 0.4; cursor: default; }
.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 0;
  background: transparent;
  color: var(--muted);
  display: inline-grid;
  place-items: center;
}
.icon-btn:hover { background: var(--raise-2); color: var(--text); }
.icon-btn.on { color: var(--text); background: var(--raise-2); }
.icon-btn svg { width: 16px; height: 16px; }
.chip {
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 12px;
}
.chip:hover { color: var(--text); border-color: var(--line-2); }
.chip.on { color: var(--text); border-color: var(--text); }
select.plain {
  appearance: none;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%239a9a96' stroke-width='1.3'/%3E%3C/svg%3E") no-repeat right 10px center;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  height: 32px;
  padding: 0 28px 0 10px;
  font-size: 13px;
}
select.plain option { background: var(--raise); }

.status {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
}
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--muted-2); }
.status.review::before { background: var(--text); }
.status.changes { color: #e5a3ad; }
.status.changes::before { background: var(--accent-hi); }
.status.approved { color: #a9cdb8; }
.status.approved::before { background: var(--ok); }

#toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 20px);
  background: var(--text);
  color: var(--bg);
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 50;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
#toast button { margin-left: 12px; background: none; border: 0; color: var(--accent); font-weight: 600; }

/* ---------- library ---------- */
.lib { max-width: 1120px; margin: 0 auto; padding: 0 32px 96px; }
.lib-nav { height: 72px; display: flex; align-items: center; justify-content: space-between; }
.lib-nav img { height: 20px; display: block; }
.lib-nav .label { color: var(--muted); }
.lib-hero { padding: 72px 0 40px; }
.lib-hero h1 { font-size: 72px; font-weight: 500; letter-spacing: -0.035em; line-height: 1; margin: 18px 0 18px; }
.lib-hero p { color: var(--muted); max-width: 520px; margin: 0; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 20px 0; margin: 40px 0 48px; }
.stats .v { font-family: var(--mono); font-size: 13px; margin-top: 6px; }
.lib-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.tabs { display: flex; gap: 20px; }
.tabs button { background: none; border: 0; padding: 6px 0; color: var(--muted-2); font-family: var(--mono); font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase; border-bottom: 1px solid transparent; }
.tabs button:hover { color: var(--text); }
.tabs button.on { color: var(--text); border-color: var(--text); }
.rows { border-top: 1px solid var(--line); }
.row {
  display: grid;
  grid-template-columns: 36px 96px minmax(0, 1fr) 180px 150px 70px 80px;
  gap: 20px;
  align-items: center;
  padding: 16px 8px;
  border-bottom: 1px solid var(--line);
  transition: background 0.15s;
}
.row:hover { background: var(--panel); }
.row .idx { font-family: var(--mono); font-size: 12px; color: var(--accent-hi); }
.thumb { width: 96px; height: 54px; border-radius: 4px; background: var(--raise) center/cover no-repeat; position: relative; overflow: hidden; }
.thumb.vertical { background-size: contain; }
.row .t { font-size: 15px; }
.row .c { font-family: var(--mono); font-size: 11px; color: var(--muted-2); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 2px; }
.row .m { font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .n { font-family: var(--mono); font-size: 12px; color: var(--muted-2); }
.row .n.has { color: var(--accent-hi); }
.empty { padding: 56px 8px; color: var(--muted); }
.empty code { font-family: var(--mono); color: var(--text); font-size: 12px; }

/* ---------- review ---------- */
.rv {
  height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  grid-template-rows: 56px minmax(0, 1fr) auto;
  grid-template-areas: "top top" "stage side" "time side";
}
.top {
  grid-area: top;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 16px 0 12px;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}
.top .crumb { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.top .crumb .title { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .spacer { flex: 1; }
.top img { height: 15px; display: block; opacity: 0.9; }
.top .sep { width: 1px; height: 20px; background: var(--line); }

.stage-wrap { grid-area: stage; display: flex; flex-direction: column; min-height: 0; background: #000; }
.stage { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.stage canvas { position: absolute; touch-action: none; }
.stage canvas.drawing { cursor: crosshair; }
.drawbar {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: none;
  align-items: center;
  gap: 2px;
  padding: 4px;
  background: rgba(18, 18, 17, 0.92);
  border: 1px solid var(--line-2);
  border-radius: 8px;
  backdrop-filter: blur(8px);
  z-index: 5;
}
.drawbar.show { display: flex; }
.drawbar .sw { width: 18px; height: 18px; border-radius: 50%; border: 2px solid transparent; margin: 0 4px; }
.drawbar .sw.on { border-color: var(--text); }
.drawbar .div { width: 1px; height: 20px; background: var(--line-2); margin: 0 4px; }
.stage .hint {
  position: absolute; left: 12px; bottom: 12px; font-family: var(--mono); font-size: 10.5px;
  letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); background: rgba(0, 0, 0, 0.6);
  padding: 4px 8px; border-radius: 4px; pointer-events: none; display: none;
}
.stage .hint.show { display: block; }

.controls {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-top: 1px solid var(--line);
  background: var(--bg);
}
.controls .tc { font-family: var(--mono); font-size: 12.5px; margin: 0 10px; color: var(--muted); white-space: nowrap; }
.controls .tc b { color: var(--text); font-weight: 400; }
.controls .spacer { flex: 1; }
.controls select.plain { height: 28px; font-size: 12px; }
.controls input[type=range] { width: 80px; accent-color: var(--text); }

/* timeline */
.timeline { grid-area: time; border-top: 1px solid var(--line); background: var(--bg); user-select: none; min-width: 0; }
.tl-head { display: flex; align-items: center; gap: 14px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.tl-head .legend { display: flex; gap: 14px; flex-wrap: wrap; flex: 1; }
.tl-head .legend span { display: inline-flex; align-items: center; gap: 6px; }
.tl-head .legend i { width: 7px; height: 7px; border-radius: 2px; display: inline-block; }
.tl-body { display: grid; grid-template-columns: 112px minmax(0, 1fr); max-height: 34vh; overflow-y: auto; }
.tl-labels { border-right: 1px solid var(--line); }
.tl-labels div { height: 26px; display: flex; align-items: center; padding: 0 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.tl-labels div.ruler { height: 22px; }
.tl-labels div.pic { height: 48px; }
.tl-labels div.snd { height: 36px; }
.tl-scroll { overflow-x: auto; overflow-y: hidden; position: relative; scrollbar-width: thin; scrollbar-color: #2a2a28 transparent; }
.tl-content { position: relative; }
.lane { position: relative; height: 26px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.lane.ruler { height: 22px; cursor: ew-resize; }
.lane.pic { height: 48px; background-size: 100% 100%; background-repeat: no-repeat; opacity: 0.9; }
.lane.snd { height: 36px; }
.lane.snd canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.tick { position: absolute; top: 0; height: 100%; border-left: 1px solid var(--line-2); padding-left: 4px; font-family: var(--mono); font-size: 9.5px; color: var(--muted-2); line-height: 22px; }
.tick.minor { height: 5px; border-color: var(--line); }
.item {
  position: absolute;
  top: 4px;
  height: 18px;
  border-radius: 3px;
  font-size: 10.5px;
  line-height: 18px;
  padding: 0 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #0b0b0b;
  cursor: pointer;
  min-width: 3px;
}
.item.cut { width: 2px !important; min-width: 2px; padding: 0; border-radius: 1px; top: 5px; height: 16px; opacity: 0.75; }
.item.speech { background: var(--k-speech); color: var(--text); opacity: 0.9; }
.item.nmark { background: var(--accent); color: var(--text); }
.item.nmark.done { background: #3a3a38; color: var(--muted); }
.item.nmark.pin { width: 10px !important; min-width: 10px; padding: 0; top: 7px; height: 12px; border-radius: 2px 2px 6px 6px; transform: translateX(-5px); }
.sel { position: absolute; top: 0; bottom: 0; background: rgba(155, 45, 58, 0.18); border-left: 1px solid var(--accent-hi); border-right: 1px solid var(--accent-hi); pointer-events: none; display: none; }
.playhead { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--text); pointer-events: none; z-index: 3; }
.playhead::before { content: ""; position: absolute; top: 0; left: -5px; border: 5px solid transparent; border-top: 6px solid var(--text); }

/* sidebar */
.side { grid-area: side; border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; background: var(--panel); }
.side-tabs { display: flex; gap: 22px; padding: 0 18px; border-bottom: 1px solid var(--line); height: 44px; align-items: stretch; flex: none; }
.side-tabs button { background: none; border: 0; border-bottom: 1px solid transparent; color: var(--muted-2); font-family: var(--mono); font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase; padding: 0; margin-bottom: -1px; }
.side-tabs button:hover { color: var(--text); }
.side-tabs button.on { color: var(--text); border-color: var(--text); }
.side-tabs .count { color: var(--accent-hi); margin-left: 4px; }
.pane { flex: 1; overflow-y: auto; min-height: 0; scrollbar-width: thin; scrollbar-color: #2a2a28 transparent; }

.composer { padding: 14px 18px 16px; border-bottom: 1px solid var(--line); background: var(--bg); }
.composer .when { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.tcchip {
  font-family: var(--mono);
  font-size: 12px;
  height: 24px;
  padding: 0 8px;
  border-radius: 4px;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--text);
}
.tcchip.empty { color: var(--muted-2); }
.tcchip.accent { border-color: rgba(200, 71, 90, 0.6); color: #f0c5cb; }
.composer textarea {
  width: 100%;
  min-height: 64px;
  max-height: 220px;
  resize: none;
  background: transparent;
  border: 0;
  outline: none;
  padding: 0;
  font-size: 14px;
  line-height: 1.5;
}
.composer textarea::placeholder { color: var(--muted-2); }
.composer .quote { font-size: 12.5px; color: var(--muted); border-left: 2px solid var(--accent); padding: 2px 0 2px 10px; margin: 0 0 10px; display: none; }
.composer .quote.show { display: block; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 12px; }
.composer .foot { display: flex; align-items: center; gap: 6px; }
.composer .foot .who { font-family: var(--mono); font-size: 11px; color: var(--muted-2); background: none; border: 0; padding: 0 6px; }
.composer .foot .who:hover { color: var(--text); }
.composer .foot .spacer { flex: 1; }
.kbd { font-family: var(--mono); font-size: 10px; color: var(--muted-2); }

.filters { display: flex; align-items: center; gap: 16px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.filters .spacer { flex: 1; }
.filters button { background: none; border: 0; padding: 0; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted-2); }
.filters button.on { color: var(--text); }
.filters button:hover { color: var(--text); }

.note { padding: 14px 18px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background 0.15s; }
.note:hover { background: rgba(255, 255, 255, 0.02); }
.note.active { background: rgba(155, 45, 58, 0.08); box-shadow: inset 2px 0 0 var(--accent-hi); }
.note.done { opacity: 0.55; }
.note .h { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.note .av { width: 20px; height: 20px; border-radius: 50%; background: var(--raise-2); display: grid; place-items: center; font-size: 10.5px; color: var(--muted); flex: none; }
.note .av.claude { background: var(--accent); color: var(--text); }
.note .au { font-size: 12.5px; color: var(--muted); }
.note .h .spacer { flex: 1; }
.note .ver { font-family: var(--mono); font-size: 10.5px; color: var(--muted-2); }
.note .body { white-space: pre-wrap; word-wrap: break-word; font-size: 14px; }
.note .q { font-size: 12.5px; color: var(--muted); border-left: 2px solid var(--accent); padding-left: 10px; margin: 0 0 8px; }
.note .ntags { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.note .ntags span { font-family: var(--mono); font-size: 10px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted-2); }
.note img.frame { display: block; width: 100%; max-height: 220px; object-fit: contain; background: #000; border-radius: 4px; margin-top: 10px; border: 1px solid var(--line); }
.note .acts { display: flex; gap: 2px; opacity: 0; transition: opacity 0.15s; }
.note:hover .acts, .note.active .acts { opacity: 1; }
.note .acts .icon-btn { width: 26px; height: 26px; }
.reply { display: flex; gap: 8px; margin-top: 10px; padding-left: 10px; border-left: 1px solid var(--line-2); }
.reply .rt { font-size: 13px; color: var(--muted); white-space: pre-wrap; }
.reply .rt b { color: var(--text); font-weight: 500; margin-right: 6px; }
.reply-in { margin-top: 10px; display: flex; gap: 6px; }
.reply-in input { flex: 1; height: 30px; background: transparent; border: 1px solid var(--line); border-radius: 6px; padding: 0 10px; font-size: 13px; outline: none; }
.reply-in input:focus { border-color: var(--line-2); }

.transcript { padding: 18px; font-size: 15px; line-height: 1.75; color: var(--muted); }
.transcript p { margin: 0 0 14px; }
.transcript span { cursor: pointer; border-radius: 3px; padding: 1px 0; }
.transcript span:hover { color: var(--text); }
.transcript span.now { color: var(--text); background: rgba(155, 45, 58, 0.35); }
.transcript span.past { color: #c9c9c5; }
.transcript span.noted { text-decoration: underline; text-decoration-color: var(--accent-hi); text-underline-offset: 4px; }
.quote-pop { position: fixed; z-index: 30; display: none; }
.quote-pop.show { display: block; }

.versions .v { padding: 16px 18px; border-bottom: 1px solid var(--line); cursor: pointer; }
.versions .v:hover { background: rgba(255, 255, 255, 0.02); }
.versions .v.on { box-shadow: inset 2px 0 0 var(--text); }
.versions .v .h { display: flex; align-items: baseline; gap: 10px; }
.versions .v .l { font-size: 15px; }
.versions .v .d { font-family: var(--mono); font-size: 11px; color: var(--muted-2); }
.versions .v .ch { color: var(--muted); font-size: 13px; margin-top: 6px; }
.versions .file { font-family: var(--mono); font-size: 10.5px; color: var(--muted-2); margin-top: 6px; word-break: break-all; }

.help { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6); display: none; place-items: center; z-index: 40; }
.help.show { display: grid; }
.help .card { background: var(--raise); border: 1px solid var(--line-2); border-radius: 10px; padding: 24px 28px; width: min(440px, 92vw); }
.help h3 { margin: 0 0 16px; font-weight: 500; font-size: 17px; }
.help dl { display: grid; grid-template-columns: 110px 1fr; gap: 8px 16px; margin: 0; font-size: 13px; }
.help dt { font-family: var(--mono); font-size: 12px; color: var(--text); }
.help dd { margin: 0; color: var(--muted); }

@media (max-width: 960px) {
  .rv { height: auto; min-height: 100vh; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto auto; grid-template-areas: "top" "stage" "time" "side"; }
  .top { flex-wrap: wrap; row-gap: 8px; padding: 8px 12px; }
  .top .crumb { flex: 1 1 calc(100% - 48px); }
  .top .spacer { display: none; }
  .top .btn { flex: 1; justify-content: center; }
  .controls input[type=range], .controls select.plain { display: none; }
  .tl-body { grid-template-columns: 76px minmax(0, 1fr); }
  .stage { height: 56vh; flex: none; }
  .side { border-left: 0; border-top: 1px solid var(--line); }
  .pane { max-height: none; }
  .top .hide-sm { display: none; }
  .row { grid-template-columns: 28px 72px 1fr 90px; }
  .row .hide-sm { display: none; }
  .thumb { width: 72px; height: 40px; }
  .lib { padding: 0 16px 64px; }
  .lib-hero h1 { font-size: 48px; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}

/* ---------- portal: auth (centred, one column) ---------- */
.auth-wrap { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 20px; gap: 36px; }
.auth-logo img { height: 24px; display: block; }
.auth { width: 100%; max-width: 400px; text-align: center; }
.auth h1 { font-size: clamp(40px, 9vw, 56px); font-weight: 500; letter-spacing: -0.035em; line-height: 1; margin: 16px 0 14px; }
.auth .lede { color: var(--muted); margin: 0 auto 32px; max-width: 360px; }
.auth-form { display: grid; gap: 14px; text-align: left; }
.field { display: grid; gap: 6px; }
.field input {
  height: 44px; background: transparent; border: 1px solid var(--line-2); border-radius: 6px;
  padding: 0 12px; font-size: 16px; outline: none; transition: border-color 0.15s; width: 100%;
}
.field input:focus { border-color: var(--text); }
.btn.wide { width: 100%; justify-content: center; height: 44px; font-size: 14px; }
.btn.big { height: 52px; font-size: 15px; gap: 10px; }
.btn.big .arrow { transition: transform 0.15s; }
.btn.big:hover .arrow { transform: translateX(3px); }
.hint-line { font-size: 13px; color: var(--muted-2); margin: 12px 0 0; }
.or { display: flex; align-items: center; gap: 14px; margin: 36px 0 22px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.form-msg { margin: 0; min-height: 18px; font-size: 13px; color: #e5a3ad; text-align: left; }
.form-msg.ok { color: #a9cdb8; }
.auth-alt { display: flex; justify-content: center; gap: 20px; margin-top: 22px; font-size: 13px; color: var(--muted); }
.auth-alt a:hover { color: var(--text); }
.auth-foot { margin: 0; }
.auth-foot a:hover { color: var(--text); }
.auth-cookie { margin: -24px 0 0; font-size: 12px; color: var(--muted-2); }
.muted { color: var(--muted); }

/* ---------- portal: admin (sidebar + inbox) ---------- */
.admin { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.admin-side { border-right: 1px solid var(--line); padding: 24px 16px; position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--panel); }
.admin-logo img { height: 20px; display: block; margin: 0 8px 36px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav .label { padding: 0 8px 8px; }
.side-nav a { display: flex; justify-content: space-between; align-items: center; padding: 8px; border-radius: 6px; color: var(--muted); font-size: 14px; }
.side-nav a:hover { color: var(--text); background: var(--raise); }
.side-nav a.on { color: var(--text); background: var(--raise-2); }
.cnt { font-family: var(--mono); font-size: 11px; color: var(--muted-2); }
.cnt.hot { color: var(--text); background: var(--accent); border-radius: 999px; padding: 0 7px; line-height: 18px; }
.admin-main { padding: 28px 40px 80px; min-width: 0; }
.admin-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 32px; }
.admin-top h1 { font-size: clamp(32px, 5vw, 48px); font-weight: 500; letter-spacing: -0.03em; line-height: 1; margin: 12px 0 0; }
.admin-main .stats { margin: 0 0 32px; }
.bell-wrap { position: relative; }
.bell { position: relative; width: 40px; height: 40px; border-radius: 8px; border: 1px solid var(--line-2); background: transparent; color: var(--text); display: grid; place-items: center; }
.bell:hover { background: var(--raise-2); }
.bell .badge { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--accent-hi); color: #fff; font: 600 10.5px/18px var(--mono); }
.inbox { position: absolute; right: 0; top: 48px; width: min(420px, calc(100vw - 32px)); max-height: 70vh; overflow-y: auto; background: var(--raise); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6); display: none; z-index: 20; }
.inbox.show { display: block; }
.inbox-h { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.inbox-sec { padding: 14px 16px; border-bottom: 1px solid var(--line); display: grid; gap: 12px; }
.inbox-sec:last-child { border-bottom: 0; }
.inbox .t { font-size: 14px; }
.inbox .c { font-family: var(--mono); font-size: 11px; color: var(--muted-2); margin-top: 2px; }
.req { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.req-act { display: flex; gap: 6px; flex-wrap: wrap; }
.req-act select.plain { flex: 1; min-width: 140px; }
.ev { display: grid; grid-template-columns: 14px 1fr; gap: 10px; align-items: start; padding: 4px 0; }
a.ev:hover .t { text-decoration: underline; }
.ev .dot { width: 7px; height: 7px; border-radius: 50%; margin-top: 7px; background: var(--muted-2); }
.ev .dot.revisions { background: var(--accent-hi); }
.ev .dot.approved { background: var(--ok); }
.ev .dot.signup { background: var(--text); }
.ev:not(.unseen) .t { color: var(--muted); }

/* ---------- portal: dashboard ---------- */
.bar-r { display: inline-flex; gap: 8px; align-items: center; }
.prow { display: grid; grid-template-columns: 36px 120px minmax(0, 1fr) 80px; gap: 20px; align-items: center; padding: 18px 8px; border-bottom: 1px solid var(--line); transition: background 0.15s; }
a.prow:hover { background: var(--panel); }
.prow.off { opacity: 0.7; }
.prow .idx { font-family: var(--mono); font-size: 12px; color: var(--accent-hi); }
.prow .thumb { width: 120px; height: 68px; }
.prow .t { font-size: 16px; display: flex; align-items: center; gap: 10px; }
.prow .c { font-family: var(--mono); font-size: 11px; color: var(--muted-2); letter-spacing: 0.03em; margin: 3px 0 10px; }
.prow .n { font-family: var(--mono); font-size: 12px; color: var(--muted-2); text-align: right; }
.new { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text); background: var(--accent); padding: 2px 6px; border-radius: 3px; }
.steps { display: flex; gap: 4px; flex-wrap: wrap; }
.steps span { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted-2); padding-right: 10px; }
.steps i { width: 14px; height: 2px; background: var(--line-2); border-radius: 1px; }
.steps .past { color: var(--muted); }
.steps .past i { background: var(--muted); }
.steps .now { color: var(--text); }
.steps .now i { background: var(--accent-hi); width: 22px; }

/* ---------- portal: accounts ---------- */
.urow { display: grid; grid-template-columns: minmax(0, 1fr) 100px 180px 220px; gap: 16px; align-items: center; padding: 16px 8px; border-bottom: 1px solid var(--line); }
.urow .t { display: flex; gap: 10px; align-items: center; }
.urow .c { font-family: var(--mono); font-size: 11px; color: var(--muted-2); margin-top: 2px; }
.urow .bar-r { justify-content: flex-end; }

@media (max-width: 960px) {
  .admin { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .prow .hide-sm { display: none; }
  .admin-side { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 14px 16px; }
  .admin-logo img { margin: 0 0 12px; }
  .side-nav { flex-direction: row; overflow-x: auto; gap: 6px; scrollbar-width: none; }
  .side-nav .label { display: none; }
  .side-nav a { white-space: nowrap; gap: 8px; border: 1px solid var(--line); }
  .admin-main { padding: 20px 16px 64px; }
  .prow { grid-template-columns: 72px minmax(0, 1fr); gap: 14px; }
  .prow .idx { display: none; }
  .prow .thumb { width: 72px; height: 40px; }
  .urow { grid-template-columns: 1fr; }
  .urow .bar-r { justify-content: flex-start; }
}

/* ---------- in-page dialogs ---------- */
.dlg-wrap { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; background: rgba(0, 0, 0, 0); transition: background 0.18s, backdrop-filter 0.18s; }
.dlg-wrap.show { background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(4px); }
.dlg { width: min(420px, 100%); background: var(--raise); border: 1px solid var(--line-2); border-radius: 12px; padding: 24px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  opacity: 0; transform: translateY(8px) scale(0.98); transition: opacity 0.18s, transform 0.18s; }
.dlg-wrap.show .dlg { opacity: 1; transform: none; }
.dlg h3 { margin: 12px 0 8px; font-size: 20px; font-weight: 500; letter-spacing: -0.01em; }
.dlg p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.dlg-in { width: 100%; height: 42px; margin-top: 16px; background: transparent; border: 1px solid var(--line-2); border-radius: 6px; padding: 0 12px; font-size: 15px; outline: none; }
.dlg-in:focus { border-color: var(--text); }
.dlg-act { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; }
.btn.danger-solid { background: var(--accent); border-color: var(--accent); color: var(--text); font-weight: 500; }
.btn.danger-solid:hover { background: var(--accent-hi); border-color: var(--accent-hi); }
@media (max-width: 480px) { .dlg-act { flex-direction: column-reverse; } .dlg-act .btn { width: 100%; justify-content: center; height: 42px; } }
