/* ReviewFlow — design system */
:root {
  --accent: #5B5BD6;
  --bg: #f4f4f7; --surface: #ffffff; --surface-2: #fafafc; --surface-3: #f0f0f4;
  --text: #121218; --text-2: #575866; --text-3: #8a8c99; --line: #e6e6ec; --line-2: #d6d6de;
  --shadow: 0 1px 1px rgba(16,16,32,.03), 0 2px 6px -1px rgba(16,16,32,.06);
  --shadow-lg: 0 24px 48px -12px rgba(16,16,32,.22), 0 4px 12px -2px rgba(16,16,32,.08);
  --hi: inset 0 1px 0 rgba(255,255,255,.7);
  --r: 14px; --r-sm: 9px;
  --gray: #6b6f7b; --gray-bg: #f0f0f3; --purple: #8e4ec6; --purple-bg: #f5eefc; --blue: #0b74de; --blue-bg: #e9f3fe;
  --amber: #b26a00; --amber-bg: #fff4d6; --orange: #d4570d; --orange-bg: #fff0e6; --red: #d1293d; --red-bg: #fdecee;
  --green: #18794e; --green-bg: #e7f6ee; --teal: #0e7c7b; --teal-bg: #e2f6f5; --indigo: #3e46c8; --indigo-bg: #ecedfd;
  --font: "Segoe UI Variable Text", "Segoe UI Variable", Inter, ui-sans-serif, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI Variable", Inter, ui-sans-serif, -apple-system, "Segoe UI", Roboto, sans-serif;
  --glow: color-mix(in srgb, var(--accent) 9%, transparent);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #09090c; --surface: #121217; --surface-2: #17171d; --surface-3: #1e1e25;
    --text: #ededf2; --text-2: #a4a5b2; --text-3: #737482; --line: #23232b; --line-2: #31313b;
    --shadow: 0 1px 2px rgba(0,0,0,.4); --shadow-lg: 0 28px 60px -12px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.05);
    --hi: inset 0 1px 0 rgba(255,255,255,.045);
    --gray: #a3a6b1; --gray-bg: #24242b; --purple: #c79bf2; --purple-bg: #2a1d38; --blue: #70b8ff; --blue-bg: #11253b;
    --amber: #ffca60; --amber-bg: #2f250b; --orange: #ff9b5c; --orange-bg: #351d0e; --red: #ff7b88; --red-bg: #371318;
    --green: #5bd49a; --green-bg: #0f2c1d; --teal: #54d6d3; --teal-bg: #0d2b2b; --indigo: #9ea5ff; --indigo-bg: #1b1e40;
    --glow: color-mix(in srgb, var(--accent) 16%, transparent);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #09090c; --surface: #121217; --surface-2: #17171d; --surface-3: #1e1e25;
  --text: #ededf2; --text-2: #a4a5b2; --text-3: #737482; --line: #23232b; --line-2: #31313b;
  --shadow: 0 1px 2px rgba(0,0,0,.4); --shadow-lg: 0 28px 60px -12px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.05);
  --hi: inset 0 1px 0 rgba(255,255,255,.045);
  --gray: #a3a6b1; --gray-bg: #24242b; --purple: #c79bf2; --purple-bg: #2a1d38; --blue: #70b8ff; --blue-bg: #11253b;
  --amber: #ffca60; --amber-bg: #2f250b; --orange: #ff9b5c; --orange-bg: #351d0e; --red: #ff7b88; --red-bg: #371318;
  --green: #5bd49a; --green-bg: #0f2c1d; --teal: #54d6d3; --teal-bg: #0d2b2b; --indigo: #9ea5ff; --indigo-bg: #1b1e40;
  --glow: color-mix(in srgb, var(--accent) 16%, transparent);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
body.no-scroll { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -0.01em; }
h1 { font-size: 24px; font-weight: 700; } h2 { font-size: 16px; font-weight: 650; } h3 { font-size: 14px; font-weight: 650; }
p { margin: 0; }
[hidden] { display: none !important; }
.muted { color: var(--text-2); } .small { font-size: 12.5px; } .block { display: block; } .mono { font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.grow { flex: 1; } .right { text-align: right; } .c { text-align: center; } .nowrap { white-space: nowrap; }
.pad { padding: 16px; } .pad-x { padding: 0 16px 16px; }
.late { color: var(--red); font-weight: 600; }
.ic { width: 18px; height: 18px; flex: none; }
.pi { width: 16px; height: 16px; flex: none; vertical-align: -3px; }
.pi-tiktok { color: var(--text); }
.boot { display: grid; place-items: center; min-height: 100vh; }

/* ---------- buttons & inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: var(--r-sm);
  border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font-weight: 550; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, box-shadow .15s; box-shadow: var(--shadow); }
.btn:hover { background: var(--surface-3); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn .ic { width: 16px; height: 16px; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent); filter: brightness(1.08); }
.btn-success { background: #1f9d5c; border-color: #1f9d5c; color: #fff; } .btn-success:hover { background: #1a8a50; }
.btn-warn { background: #e38a0b; border-color: #e38a0b; color: #fff; } .btn-warn:hover { background: #cc7a06; }
.btn-danger { background: #d1293d; border-color: #d1293d; color: #fff; } .btn-danger:hover { background: #b9192d; }
.btn-ghost-danger { color: var(--red); } .btn-ghost-danger:hover { background: var(--red-bg); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn-lg { height: 44px; font-size: 15px; }
.btn-block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: var(--r-sm); border: 0; background: transparent; cursor: pointer; color: var(--text-2); position: relative; flex: none; }
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn.on { background: var(--accent); color: #fff; }
.icon-btn.small { width: 28px; font-size: 20px; line-height: 1; }
.icon-btn.flip .ic { transform: scaleX(-1); }
.link { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 550; cursor: pointer; font-size: 13px; }
.link:hover { text-decoration: underline; } .link.danger { color: var(--red); }
input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]), select, textarea {
  width: 100%; border: 1px solid var(--line-2); background: var(--surface); border-radius: var(--r-sm); padding: 8px 10px; outline: none; min-height: 36px;
  transition: border-color .15s, box-shadow .15s; }
textarea { resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
input[type=color] { width: 100%; height: 36px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface); padding: 3px; }
input[type=checkbox] { accent-color: var(--accent); width: 16px; height: 16px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 6px; font-size: 13px; font-weight: 550; color: var(--text-2); }
.form label.check-row, .check-row { display: flex; align-items: center; gap: 8px; font-weight: 500; color: var(--text); cursor: pointer; }
.form.compact { gap: 10px; }
.form-actions { display: flex; justify-content: flex-end; }
.form-error { color: var(--red); font-size: 13px; }
fieldset { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 14px; margin: 0; display: grid; gap: 6px; }
legend { font-size: 13px; font-weight: 600; color: var(--text-2); padding: 0 4px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.seg { display: inline-flex; background: var(--surface-3); border-radius: var(--r-sm); padding: 3px; gap: 2px; flex: none; }
.seg button { border: 0; background: none; padding: 5px 11px; border-radius: 6px; cursor: pointer; font-size: 13px; font-weight: 550; color: var(--text-2); display: inline-flex; align-items: center; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.seg button .ic { width: 16px; height: 16px; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); background: var(--surface); border-radius: 999px; padding: 4px 10px; font-size: 12.5px; font-weight: 550; cursor: pointer; }
.chip .ic { width: 14px; height: 14px; }
.chip.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.spin { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; display: inline-block; animation: spin .7s linear infinite; opacity: .7; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge .ic { width: 13px; height: 13px; }
.tone-gray { color: var(--gray); background: var(--gray-bg); } .tone-purple { color: var(--purple); background: var(--purple-bg); }
.tone-blue { color: var(--blue); background: var(--blue-bg); } .tone-amber { color: var(--amber); background: var(--amber-bg); }
.tone-orange { color: var(--orange); background: var(--orange-bg); } .tone-red { color: var(--red); background: var(--red-bg); }
.tone-green { color: var(--green); background: var(--green-bg); } .tone-teal { color: var(--teal); background: var(--teal-bg); }
.tone-indigo { color: var(--indigo); background: var(--indigo-bg); }
.tone-text-orange { color: var(--orange); font-weight: 600; }
.plat { display: inline-flex; align-items: center; gap: 5px; }
.client-dot { display: inline-flex; align-items: center; gap: 6px; font-weight: 550; }
.client-dot::before { content: ""; width: 8px; height: 8px; border-radius: 3px; background: var(--c, var(--accent)); flex: none; }
.client-dot.small { font-size: 12.5px; color: var(--text-2); }
.role-tag { font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 4px; background: var(--surface-3); color: var(--text-2); display: inline-flex; align-items: center; gap: 3px; }
.role-tag.team { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.role-tag.internal { background: var(--amber-bg); color: var(--amber); }
.role-tag.ok { background: var(--green-bg); color: var(--green); } .role-tag .ic { width: 12px; height: 12px; }
.avatar { --h: 250; display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; flex: none; font-size: 12px; font-weight: 700;
  background: hsl(var(--h) 70% 92%); color: hsl(var(--h) 55% 32%); }
.avatar.sm { width: 24px; height: 24px; font-size: 10px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .avatar { background: hsl(var(--h) 35% 24%); color: hsl(var(--h) 80% 82%); } }
:root[data-theme="dark"] .avatar { background: hsl(var(--h) 35% 24%); color: hsl(var(--h) 80% 82%); }
.mention { color: var(--accent); font-weight: 600; background: color-mix(in srgb, var(--accent) 12%, transparent); border-radius: 4px; padding: 0 3px; }

/* ---------- shell ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar { width: 252px; flex: none; background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; padding: 16px 12px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 6px; }
.brand b { display: block; font-size: 14.5px; line-height: 1.2; } .brand small { display: block; color: var(--text-3); font-size: 12px; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--accent); color: #fff; flex: none; }
.brand-mark .ic { width: 18px; height: 18px; stroke-width: 2.6; }
.brand.big .brand-mark { width: 40px; height: 40px; border-radius: 11px; } .brand.big b { font-size: 18px; }
.nav { display: grid; gap: 2px; }
.nav-link { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-sm); color: var(--text-2); font-weight: 550; }
.nav-link:hover { background: var(--surface-3); color: var(--text); }
.nav-link.active { background: color-mix(in srgb, var(--accent) 11%, transparent); color: var(--accent); }
.nav-link span { flex: 1; }
.nav-count { background: var(--accent); color: #fff; font-size: 11px; border-radius: 999px; padding: 0 7px; line-height: 18px; }
.nav-sep { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); font-weight: 650; padding: 14px 10px 4px; }
.me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px 6px 0; border-top: 1px solid var(--line); }
.me div { flex: 1; min-width: 0; } .me b { display: block; font-size: 13px; } .me small { color: var(--text-3); font-size: 12px; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; height: 60px; padding: 0 24px; background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.search { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 0 10px; height: 36px; max-width: 460px; flex: 1; color: var(--text-3); }
.search input { border: 0 !important; box-shadow: none !important; padding: 0 !important; min-height: 0 !important; background: transparent !important; height: 100%; }
.search.sm { max-width: 240px; height: 32px; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.bell .dot { position: absolute; top: 3px; right: 2px; background: var(--red); color: #fff; font-size: 10px; min-width: 16px; height: 16px; border-radius: 8px; display: grid; place-items: center; padding: 0 4px; }
.view { padding: 24px; flex: 1; }
.only-mobile { display: none; }
.scrim { display: none; }
.page { max-width: 1320px; margin: 0 auto; display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
.page.narrow { max-width: 860px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head p { margin-top: 4px; }
.quick { display: flex; gap: 8px; flex-wrap: wrap; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; }
.card-tools { display: flex; gap: 8px; padding: 0 16px 10px; } .card-tools select { width: auto; }
.empty { text-align: center; padding: 48px 20px; display: grid; justify-items: center; gap: 8px; }
.empty-ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }
.empty p { color: var(--text-2); max-width: 420px; }

/* ---------- notifications popover ---------- */
.notif-pop { position: fixed; z-index: 60; width: min(380px, calc(100vw - 24px)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-lg); overflow: hidden; }
.notif-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.notif-list { max-height: 420px; overflow-y: auto; }
.notif { display: flex; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.notif:hover { background: var(--surface-2); }
.notif b { display: block; font-size: 13px; font-weight: 600; } .notif small { display: block; color: var(--text-2); font-size: 12.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.notif em { font-style: normal; color: var(--text-3); font-size: 11.5px; }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex: none; }
.notif.unread .notif-dot { background: var(--accent); }
.notif-foot { display: block; text-align: center; padding: 10px; font-weight: 600; color: var(--accent); font-size: 13px; }
.nlist { list-style: none; margin: 0; padding: 0; }
.nlist a { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.nlist li:last-child a { border-bottom: 0; }
.nlist li.unread a { background: color-mix(in srgb, var(--accent) 5%, transparent); }
.nlist b { display: block; } .nlist small { color: var(--text-2); display: block; } .nlist em { margin-left: auto; font-style: normal; color: var(--text-3); font-size: 12px; white-space: nowrap; }
.nlist span:nth-child(2) { flex: 1; min-width: 0; }
.n-ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); flex: none; }

/* ---------- toasts & modal ---------- */
#toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 100; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { background: #1d1d22; color: #fff; padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow-lg); font-weight: 550; font-size: 13.5px; animation: tin .2s ease-out; transition: opacity .3s, transform .3s; max-width: min(520px, 92vw); }
.toast-err { background: #c42335; }
.toast.out { opacity: 0; transform: translateY(6px); }
@keyframes tin { from { opacity: 0; transform: translateY(8px); } }
.modal-wrap { position: fixed; inset: 0; z-index: 50; background: rgba(10,10,16,.45); display: grid; place-items: center; padding: 16px; overflow-y: auto; animation: fin .15s; }
@keyframes fin { from { opacity: 0; } }
.modal { background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-lg); width: min(520px, 100%); padding: 22px; display: grid; gap: 14px; max-height: calc(100vh - 32px); overflow-y: auto; }
.modal.wide { width: min(860px, 100%); }
.modal.full { width: min(1400px, 100%); height: calc(100vh - 32px); padding: 0; overflow: hidden; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.modal-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.notice { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: var(--r-sm); background: var(--blue-bg); color: var(--text); font-size: 13.5px; }
.notice > .ic { color: var(--blue); } .notice > div { flex: 1; }
.notice-warn { background: var(--amber-bg); } .notice-warn > .ic { color: var(--amber); }
.card-inset { background: var(--surface-3); border-radius: var(--r-sm); padding: 10px 12px; }
.card-inset ul { margin: 6px 0 0; padding-left: 18px; }
.copy-box { display: flex; gap: 8px; }

/* ---------- auth ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(360px, 520px) 1fr; }
.auth-card { padding: 40px clamp(24px, 6vw, 72px) 24px; display: flex; flex-direction: column; background: var(--surface); border-right: 1px solid var(--line); }
.auth-form { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 18px; width: 100%; max-width: 380px; margin: 0 auto; }
.auth-form h1 { margin-top: 22px; font-size: 28px; letter-spacing: -0.02em; }
.auth-form .btn-lg { margin-top: 4px; }
.auth-foot { text-align: center; color: var(--text-3); font-size: 12px; }
.auth-side { position: relative; overflow: hidden; background: radial-gradient(900px 520px at 85% 0%, color-mix(in srgb, var(--accent) 60%, #fff) 0%, var(--accent) 42%, #14112e 100%); color: #fff; display: grid; place-items: center; padding: 40px; }
.auth-side::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.09) 1px, transparent 1px); background-size: 22px 22px; mask-image: linear-gradient(180deg, #000, transparent 85%); }
.auth-side-inner { position: relative; max-width: 460px; } .auth-side h2 { font-size: 32px; line-height: 1.15; margin-bottom: 22px; letter-spacing: -0.02em; }
.auth-side ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 13px; font-size: 15px; color: rgba(255,255,255,.88); }
.auth-side li { display: flex; align-items: center; gap: 12px; } .auth-side .ic { width: 20px; height: 20px; }
.mock { position: relative; height: 300px; margin-bottom: 34px; }
.mock-phone { position: absolute; left: 40px; top: 0; width: 170px; padding: 8px; border-radius: 22px; background: rgba(10,10,20,.55); box-shadow: 0 30px 60px rgba(0,0,0,.35); backdrop-filter: blur(6px); transform: rotate(-4deg); }
.mock-media { position: relative; height: 240px; border-radius: 15px; overflow: hidden; background: linear-gradient(160deg, #ff8a65, #e5484d 45%, #3b1d6e); }
.mock-logo { position: absolute; top: 12px; right: 12px; font-size: 9px; font-weight: 800; letter-spacing: .1em; padding: 3px 6px; border: 1.5px dashed #ffcc00; border-radius: 4px; }
.mock-ring { position: absolute; left: 30px; top: 40px; width: 90px; height: 90px; border-radius: 50%; background: rgba(255,255,255,.25); }
.mock-bar { position: absolute; left: 14px; bottom: 34px; width: 110px; height: 12px; border-radius: 3px; background: rgba(255,255,255,.85); }
.mock-bar.short { bottom: 16px; width: 70px; background: rgba(255,255,255,.5); }
.mock-tl { position: relative; height: 4px; margin: 12px 4px 6px; border-radius: 2px; background: rgba(255,255,255,.2); }
.mock-tl i { position: absolute; inset: 0 auto 0 0; background: #fff; border-radius: 2px; }
.mock-tl b { position: absolute; top: -6px; width: 9px; height: 9px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: #ffb224; }
.mock-tl b.c { background: #ff6b5c; }
.mock-comment { position: absolute; left: 170px; top: 70px; display: flex; gap: 10px; align-items: flex-start; width: 250px; padding: 12px 14px; border-radius: 14px; background: #fff; color: #17171c; box-shadow: 0 20px 40px rgba(0,0,0,.25); animation: float 6s ease-in-out infinite; }
.mock-comment small { color: #6b6f7b; font-size: 11px; } .mock-comment p { font-size: 13px; font-weight: 550; margin-top: 2px; }
.mock-comment em { font-style: normal; background: #ecebff; color: #5b5bd6; font-weight: 700; padding: 0 5px; border-radius: 4px; margin-right: 4px; font-size: 11.5px; }
.mock-av { width: 28px; height: 28px; border-radius: 50%; background: #ffe4d6; color: #b2430d; display: grid; place-items: center; font-size: 10px; font-weight: 800; flex: none; }
.mock-approved { position: absolute; left: 210px; top: 180px; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 12px; background: #1f9d5c; font-weight: 700; font-size: 14px; box-shadow: 0 16px 32px rgba(0,0,0,.25); animation: float 6s ease-in-out -3s infinite; }
.mock-approved .ic { width: 18px; height: 18px; stroke-width: 2.6; }
@keyframes float { 50% { transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .mock-comment, .mock-approved { animation: none; } }
.demo { border: 1px dashed var(--line-2); border-radius: var(--r-sm); padding: 10px 12px; }
.demo summary { cursor: pointer; font-weight: 600; font-size: 13px; color: var(--text-2); }
.demo-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

/* ---------- dashboard ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stats.small { grid-template-columns: repeat(5, 1fr); }
.stat { --t: var(--accent); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; display: grid; gap: 4px; box-shadow: var(--shadow); position: relative; overflow: hidden; transition: transform .15s, box-shadow .15s, border-color .15s; }
.stat::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--t); opacity: 0; transition: opacity .15s; }
a.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--t) 45%, var(--line)); }
a.stat:hover::after { opacity: 1; }
.stat b { font-size: 30px; font-weight: 750; letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat > span, .stat-label { color: var(--text-2); font-weight: 600; font-size: 13px; }
.stat small { color: var(--text-3); font-size: 12px; }
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.stat-ic { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; flex: none; color: var(--t); background: color-mix(in srgb, var(--t) 14%, transparent); }
.stat-ic .ic { width: 17px; height: 17px; }
.stat.warn b { color: var(--orange); } .stat.bad b { color: var(--red); } .stat.ok b { color: var(--green); }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.dash-side { display: grid; gap: 18px; }
.rows { display: grid; }
.row { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-top: 1px solid var(--line); }
.row:hover { background: var(--surface-2); }
.row-thumb { width: 44px; height: 44px; border-radius: 8px; overflow: hidden; flex: none; background: var(--surface-3); }
.row-main { flex: 1; min-width: 0; } .row-main b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-main small { color: var(--text-2); display: flex; align-items: center; gap: 4px; white-space: nowrap; overflow: hidden; }
.row-main small .pi { width: 14px; height: 14px; }
.row-status { width: 200px; display: flex; justify-content: flex-start; flex: none; }
.row-due { width: 92px; text-align: right; font-size: 12.5px; color: var(--text-2); flex: none; }
.row-due.late { color: var(--red); font-weight: 600; }
.row-count { width: 44px; display: inline-flex; gap: 4px; align-items: center; justify-content: flex-end; color: var(--text-2); font-size: 12.5px; }
.row-count .ic { width: 15px; height: 15px; }
.row-time { width: 64px; font-weight: 600; font-size: 13px; color: var(--text-2); }
.thumb-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-ph { width: 100%; height: 100%; display: grid; place-items: center; align-content: center; gap: 2px; color: var(--text-3); font-size: 10px; font-weight: 600; background: var(--surface-3); }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--green); font-weight: 600; }
.live i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.feed { list-style: none; margin: 0; padding: 0 16px 12px; display: grid; gap: 12px; max-height: 420px; overflow-y: auto; }
.feed li { display: flex; gap: 10px; font-size: 13px; }
.feed li > div { min-width: 0; display: grid; } .feed a { color: var(--accent); font-weight: 550; } .feed small { color: var(--text-3); }
.dl { list-style: none; margin: 0; padding: 0 0 6px; }
.dl a { display: flex; align-items: center; gap: 12px; padding: 9px 16px; border-top: 1px solid var(--line); }
.dl a:hover { background: var(--surface-2); }
.dl a > span:nth-child(2) { flex: 1; min-width: 0; } .dl b { display: block; } .dl small { color: var(--text-2); }
.dl-date { width: 42px; text-align: center; border-radius: 8px; background: var(--surface-3); padding: 3px 0; font-size: 11px; color: var(--text-2); line-height: 1.2; flex: none; text-transform: uppercase; }
.dl-date b { display: block; font-size: 16px; color: var(--text); }
.dl-date.late { background: var(--red-bg); } .dl-date.late b { color: var(--red); }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-weight: 600; color: var(--text-3); font-size: 12px; padding: 8px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 10px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr.sel td { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.table .det { max-width: 340px; }
.muted-row td { opacity: .55; }
.who { display: flex; align-items: center; gap: 10px; } .who b { display: block; } .who small { color: var(--text-2); }
.progress { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; flex: 1; }
.progress i { display: block; height: 100%; background: var(--accent); border-radius: 3px; transition: width .2s; }
.progress-line { display: flex; align-items: center; gap: 10px; min-width: 160px; } .progress-line small { color: var(--text-2); width: 40px; }

/* ---------- library ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px; align-items: center; }
.filters select, .cal-filters select, .card-tools select { width: auto; max-width: 170px; min-height: 34px; height: 34px; padding: 4px 28px 4px 10px; font-size: 13px; }
.filters .search { min-width: 240px; height: 34px; }
.filters .seg { margin-left: auto; }
select { appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238b8d98' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center; background-size: 14px; padding-right: 28px !important; }
select[multiple] { background-image: none; }
.bulk { position: sticky; top: 68px; z-index: 10; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 12px; background: var(--text); color: var(--bg); border-radius: var(--r); box-shadow: var(--shadow-lg); }
.bulk .btn:not(.btn-primary) { background: transparent; color: var(--bg); border-color: color-mix(in srgb, var(--bg) 30%, transparent); box-shadow: none; }
.bulk select { width: auto; background: transparent; color: var(--bg); border-color: color-mix(in srgb, var(--bg) 30%, transparent); }
.bulk select option { color: #111; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.lib-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); position: relative; transition: box-shadow .15s, transform .15s; }
.lib-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.lib-card.sel { outline: 2px solid var(--accent); }
.lib-thumb { display: block; aspect-ratio: 4/5; background: var(--surface-3); position: relative; overflow: hidden; }
.lib-badges { position: absolute; bottom: 8px; left: 8px; display: flex; gap: 4px; }
.lib-badges b, .pcard-thumb .dur, .pcard-thumb .newv { background: rgba(0,0,0,.66); color: #fff; font-size: 11px; padding: 2px 6px; border-radius: 5px; font-weight: 600; backdrop-filter: blur(4px); }
.lib-plat { position: absolute; top: 8px; right: 8px; background: rgba(255,255,255,.92); border-radius: 7px; width: 26px; height: 26px; display: grid; place-items: center; }
.lib-plat .pi-tiktok { color: #111; }
.lib-check { position: absolute; top: 8px; left: 8px; z-index: 2; background: rgba(255,255,255,.92); border-radius: 6px; width: 26px; height: 26px; display: grid; place-items: center; opacity: 0; transition: opacity .15s; cursor: pointer; }
.lib-card:hover .lib-check, .lib-card.sel .lib-check { opacity: 1; }
.lib-body { padding: 10px 12px 12px; display: grid; gap: 5px; justify-items: start; }
.lib-title { font-weight: 650; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lib-foot { display: flex; justify-content: space-between; width: 100%; color: var(--text-2); font-size: 12px; margin-top: 2px; }
.lib-foot span { display: inline-flex; align-items: center; gap: 4px; } .lib-foot .ic { width: 14px; height: 14px; }
.lib-table .t-thumb { width: 60px; } .lib-table .t-thumb a { display: block; width: 40px; height: 40px; border-radius: 6px; overflow: hidden; }
.drop-overlay { position: fixed; inset: 0; z-index: 40; background: color-mix(in srgb, var(--accent) 22%, rgba(0,0,0,.25)); border: 3px dashed var(--accent); display: grid; place-items: center; align-content: center; gap: 8px; color: #fff; font-size: 20px; pointer-events: none; }
.drop-overlay .ic { width: 48px; height: 48px; }
.due { font-size: 12px; color: var(--text-2); } .due.late { color: var(--red); }

/* ---------- upload ---------- */
.dropzone { border: 2px dashed var(--line-2); border-radius: var(--r); padding: 26px; display: grid; justify-items: center; gap: 4px; text-align: center; cursor: pointer; color: var(--text-2); transition: border-color .15s, background .15s; }
.dropzone .ic { width: 28px; height: 28px; color: var(--accent); }
.dropzone b { color: var(--text); } .dropzone span { font-size: 12.5px; }
.dropzone.over, .dropzone:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 5%, transparent); }
.dropzone.small { padding: 18px; }
.up-list { display: grid; gap: 10px; max-height: 46vh; overflow-y: auto; }
.up-item { display: flex; gap: 12px; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px; align-items: flex-start; }
.up-item.done { border-color: color-mix(in srgb, var(--green) 50%, var(--line)); } .up-item.error { border-color: var(--red); }
.up-item.error .up-state { color: var(--red); }
.up-thumb { width: 72px; height: 90px; border-radius: 6px; background: var(--surface-3); display: grid; place-items: center; overflow: hidden; flex: none; position: relative; color: var(--text-3); }
.up-thumb img { width: 100%; height: 100%; object-fit: cover; }
.up-thumb b { position: absolute; bottom: 3px; right: 3px; background: rgba(0,0,0,.6); color: #fff; font-size: 10px; padding: 0 4px; border-radius: 3px; }
.up-fields { flex: 1; display: grid; gap: 6px; min-width: 0; }
.up-row1 { display: grid; grid-template-columns: 1fr 130px 190px; gap: 6px; }
.up-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-2); gap: 10px; }
.up-meta span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- review ---------- */
.review { display: grid; gap: 14px; max-width: 1500px; margin: 0 auto; }
.rv-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rv-title { flex: 1; min-width: 240px; } .rv-title h1 { font-size: 21px; }
.rv-sub { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; color: var(--text-2); font-size: 13px; }
.rv-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: auto; justify-content: flex-end; }
.ver-select { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 0 4px 0 10px; height: 36px; background: var(--surface); }
.ver-select select { border: 0 !important; box-shadow: none !important; width: auto; min-height: 0; padding: 4px; background: transparent; font-weight: 600; }
.menu-wrap { position: relative; }
.menu-pop { position: absolute; right: 0; top: 42px; z-index: 30; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-lg); padding: 6px; width: 250px; display: grid; gap: 2px; }
.menu-pop button { display: flex; align-items: center; gap: 9px; border: 0; background: none; padding: 8px 10px; border-radius: 6px; cursor: pointer; text-align: left; font-weight: 500; }
.menu-pop button:hover { background: var(--surface-3); } .menu-pop button.danger { color: var(--red); }
.menu-pop .menu-label { font-size: 11px; color: var(--text-3); font-weight: 650; text-transform: uppercase; letter-spacing: .05em; padding: 6px 10px 2px; }
.menu-pop select { margin: 0 4px 6px; width: calc(100% - 8px); }
#rvbanners { display: grid; gap: 8px; } #rvbanners:empty { display: none; }
.rv-body { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 16px; align-items: start; }
.rv-stage { display: grid; gap: 14px; min-width: 0; }
.stage-box { background: #0c0c10; border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); }
.stage-empty { display: grid; justify-items: center; gap: 8px; padding: 60px 20px; color: #c9cad3; text-align: center; }
.stage-empty .ic { width: 40px; height: 40px; }
.player { display: flex; flex-direction: column; color: #e8e8ee; outline: none; }
.frame-area { display: grid; place-items: center; padding: 14px; min-height: 300px; background: radial-gradient(circle at 50% 30%, #1c1c24, #0c0c10 70%); }
.frame { position: relative; aspect-ratio: var(--ar); width: min(100%, calc(64vh * var(--ar))); max-height: 64vh; }
.frame video, .frame img { width: 100%; height: 100%; display: block; object-fit: contain; background: #000; border-radius: 4px; }
.frame canvas.ann { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.frame canvas.ann.drawing { pointer-events: auto; cursor: crosshair; outline: 2px dashed #ffcc00; outline-offset: 2px; }
.big-play { position: absolute; inset: 0; margin: auto; width: 68px; height: 68px; border-radius: 50%; border: 0; background: rgba(255,255,255,.16); backdrop-filter: blur(6px); color: #fff; cursor: pointer; display: grid; place-items: center; transition: opacity .2s, transform .2s; }
.big-play .ic { width: 28px; height: 28px; fill: currentColor; margin-left: 4px; }
.big-play:hover { transform: scale(1.06); }
.player.playing .big-play { opacity: 0; pointer-events: none; }
.timeline { position: relative; height: 30px; margin: 0 14px; cursor: pointer; touch-action: none; }
.tl-track { position: absolute; left: 0; right: 0; top: 13px; height: 5px; background: rgba(255,255,255,.14); border-radius: 3px; overflow: hidden; }
.tl-buf { position: absolute; inset: 0 auto 0 0; background: rgba(255,255,255,.18); }
.tl-prog { position: absolute; inset: 0 auto 0 0; background: var(--accent); }
.timeline:hover .tl-track { height: 7px; top: 12px; }
.tl-head { position: absolute; top: 9px; width: 13px; height: 13px; margin-left: -6.5px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 60%, transparent); pointer-events: none; }
.tl-markers { position: absolute; inset: 0; pointer-events: none; }
.tl-marker { position: absolute; top: 0; width: 11px; height: 11px; margin-left: -5.5px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: #ffb224; border: 2px solid #0c0c10; cursor: pointer; pointer-events: auto; padding: 0; }
.tl-marker.client { background: #ff6b5c; } .tl-marker.resolved { background: #6b7280; opacity: .7; }
.tl-marker:hover { transform: rotate(-45deg) scale(1.35); }
.tl-hover { position: absolute; top: -20px; transform: translateX(-50%); font-size: 11px; background: #000; color: #fff; padding: 1px 6px; border-radius: 4px; opacity: 0; pointer-events: none; white-space: nowrap; }
.timeline:hover .tl-hover { opacity: 1; }
.controls { display: flex; align-items: center; gap: 4px; padding: 4px 10px 10px; flex-wrap: wrap; }
.controls .icon-btn { color: #d6d7de; } .controls .icon-btn:hover { background: rgba(255,255,255,.1); color: #fff; }
.controls .icon-btn.on { background: var(--accent); color: #fff; }
.controls .icon-btn .ic { width: 19px; height: 19px; }
.controls .tc { font-variant-numeric: tabular-nums; font-size: 13px; color: #c9cad3; margin-left: 6px; font-family: ui-monospace, Consolas, monospace; }
.controls .vol { width: 80px; accent-color: var(--accent); }
.controls select.speed { width: auto; background: rgba(255,255,255,.08); border: 0; color: #fff; min-height: 30px; padding: 2px 6px; }
.controls select.speed option { color: #111; }
.controls .btn { box-shadow: none; }
.player.image .controls { padding-top: 10px; }
.pen-bar { display: flex; align-items: center; gap: 8px; padding: 8px 14px 12px; flex-wrap: wrap; border-top: 1px solid rgba(255,255,255,.08); }
.pen-bar .muted { color: #a9aab5; }
.swatch { width: 22px; height: 22px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); background: var(--sw); cursor: pointer; padding: 0; }
.swatch.on { border-color: #fff; box-shadow: 0 0 0 2px var(--accent); }
.player:fullscreen { background: #000; justify-content: center; }
.player:fullscreen .frame-area { flex: 1; } .player:fullscreen .frame { width: min(100%, calc(84vh * var(--ar))); max-height: 84vh; }
.player.pdf iframe { width: 100%; height: 72vh; border: 0; background: #fff; display: block; }
.audio-box { display: grid; justify-items: center; gap: 16px; padding: 60px 20px; color: #c9cad3; } .audio-box .ic { width: 48px; height: 48px; } .audio-box audio { width: min(520px, 100%); }
.decide { display: flex; align-items: center; gap: 16px; padding: 16px; flex-wrap: wrap; border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line)); }
.decide-text { flex: 1; min-width: 220px; display: grid; gap: 2px; } .decide-text b { font-size: 15px; } .decide-text span { color: var(--text-2); font-size: 13px; }
.decide-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.dbtn { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 18px; border-radius: 10px; font-weight: 650; font-size: 14.5px; cursor: pointer; border: 1px solid transparent; transition: transform .1s, filter .15s; }
.dbtn:active { transform: scale(.98); } .dbtn .ic { width: 18px; height: 18px; stroke-width: 2.4; }
.dbtn.approve { background: #1f9d5c; color: #fff; } .dbtn.approve:hover { filter: brightness(1.08); }
.dbtn.changes { background: var(--amber-bg); color: var(--amber); border-color: color-mix(in srgb, var(--amber) 35%, transparent); }
.dbtn.reject { background: var(--surface); color: var(--red); border-color: color-mix(in srgb, var(--red) 40%, transparent); } .dbtn.reject:hover { background: var(--red-bg); }
.decided { display: flex; gap: 12px; padding: 14px 16px; align-items: flex-start; }
.decided > .ic { width: 22px; height: 22px; margin-top: 2px; }
.decided b { display: block; } .decided span { display: block; font-size: 13px; color: var(--text-2); } .decided p { margin-top: 6px; color: var(--text); }
.decided.tone-green { background: var(--green-bg); border-color: transparent; } .decided.tone-red { background: var(--red-bg); border-color: transparent; }
.decided.tone-orange { background: var(--orange-bg); border-color: transparent; } .decided.tone-gray { background: var(--surface); }
.rv-meta { padding: 16px; display: grid; gap: 12px; }
.meta-head { display: flex; justify-content: space-between; align-items: center; }
.meta-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px; }
.meta-caption label { font-size: 12px; color: var(--text-3); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.caption { white-space: pre-wrap; margin-top: 4px; line-height: 1.55; }
.hashtags { color: var(--accent); margin-top: 8px; font-weight: 550; word-break: break-word; }
.meta-list { margin: 0; display: grid; gap: 8px; font-size: 13px; }
.meta-list > div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 8px; }
.meta-list dt { color: var(--text-3); } .meta-list dd { margin: 0; overflow: hidden; text-overflow: ellipsis; }
.pub-note { display: flex; align-items: center; gap: 6px; border-top: 1px solid var(--line); padding-top: 10px; } .pub-note .ic { width: 14px; height: 14px; }
.rv-panel { position: sticky; top: 76px; display: flex; flex-direction: column; max-height: calc(100vh - 92px); overflow: hidden; }
.portal .rv-panel, .guest .rv-panel { top: 84px; }
.tabs { display: flex; border-bottom: 1px solid var(--line); padding: 0 6px; flex: none; overflow-x: auto; }
.tab { border: 0; background: none; padding: 12px 10px; font-weight: 600; color: var(--text-2); cursor: pointer; border-bottom: 2px solid transparent; display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; }
.tab b { background: var(--surface-3); color: var(--text-2); font-size: 11px; border-radius: 999px; padding: 0 6px; line-height: 17px; }
.tab.active { color: var(--text); border-bottom-color: var(--accent); }
.panel-body { flex: 1; overflow-y: auto; display: flex; flex-direction: column; min-height: 200px; }
.fb-tools { display: flex; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); align-items: center; }
.fb-tools select { width: auto; min-height: 30px; padding: 4px 8px; font-size: 13px; margin-left: auto; }
.fb-list { flex: 1; padding: 6px 12px; display: grid; gap: 4px; align-content: start; }
.fb-empty { text-align: center; color: var(--text-2); padding: 30px 10px; display: grid; justify-items: center; gap: 6px; }
.fb-empty .ic { width: 28px; height: 28px; color: var(--text-3); }
.cm { padding: 10px; border-radius: 10px; display: grid; gap: 6px; border: 1px solid transparent; transition: background .2s, border-color .2s; }
.cm:hover { background: var(--surface-2); }
.cm.hl { border-color: color-mix(in srgb, var(--accent) 50%, transparent); background: color-mix(in srgb, var(--accent) 6%, transparent); }
.cm.resolved > .cm-body { opacity: .6; }
.cm.internal { background: color-mix(in srgb, var(--amber-bg) 60%, transparent); }
.cm-head { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 13px; }
.cm-head .muted { font-size: 12px; }
.cm-body { font-size: 13.5px; line-height: 1.5; word-break: break-word; }
.cm-actions { display: flex; gap: 12px; }
.cm-actions .link { font-size: 12px; color: var(--text-2); font-weight: 550; } .cm-actions .link:hover { color: var(--accent); }
.cm.decision, .cm.note { grid-template-columns: 22px 1fr; align-items: start; }
.cm.decision > .ic, .cm.note > .ic { width: 18px; height: 18px; margin-top: 2px; }
.cm.decision.tone-green { background: var(--green-bg); color: var(--text); } .cm.decision.tone-red { background: var(--red-bg); color: var(--text); }
.cm.decision.tone-orange { background: var(--orange-bg); color: var(--text); }
.cm.decision.tone-green > .ic { color: var(--green); } .cm.decision.tone-red > .ic { color: var(--red); } .cm.decision.tone-orange > .ic { color: var(--orange); }
.cm.note { background: var(--blue-bg); } .cm.note > .ic { color: var(--blue); }
.resolved-tag { display: inline-flex; align-items: center; gap: 3px; color: var(--green); font-size: 12px; font-weight: 600; margin-left: auto; } .resolved-tag .ic { width: 13px; height: 13px; }
.tc-chip { display: inline-flex; align-items: center; gap: 4px; background: color-mix(in srgb, var(--accent) 13%, transparent); color: var(--accent); border: 0; border-radius: 6px; padding: 1px 7px; margin-right: 6px; font-weight: 650; font-size: 12px; cursor: pointer; font-variant-numeric: tabular-nums; vertical-align: 1px; }
.tc-chip .ic { width: 12px; height: 12px; } .tc-chip:hover { background: var(--accent); color: #fff; }
.tc-chip.sm { cursor: default; }
.ann-chip { justify-self: start; display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line-2); background: var(--surface); border-radius: 6px; padding: 2px 8px; font-size: 12px; cursor: pointer; font-weight: 550; }
.ann-chip .ic { width: 13px; height: 13px; color: #ff3b30; }
.replies { margin-left: 14px; padding-left: 10px; border-left: 2px solid var(--line); display: grid; gap: 2px; }
.cm.reply { padding: 6px 8px; }
.reply-form { display: grid; gap: 6px; margin-top: 4px; }
.composer { border-top: 1px solid var(--line); padding: 10px 12px 12px; display: grid; gap: 8px; background: var(--surface); position: sticky; bottom: 0; }
.composer-box { position: relative; }
.composer-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tc-toggle { display: inline-flex; align-items: center; gap: 5px; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); border-radius: 999px; padding: 3px 10px 3px 6px; font-size: 12.5px; font-weight: 650; cursor: pointer; font-variant-numeric: tabular-nums; }
.tc-toggle .ic { width: 14px; height: 14px; }
.tc-toggle:has(input:not(:checked)) { background: var(--surface-3); color: var(--text-3); text-decoration: line-through; }
.internal-toggle input { width: 13px; height: 13px; }
.mention-pop { position: absolute; left: 8px; bottom: 100%; margin-bottom: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); box-shadow: var(--shadow-lg); padding: 4px; display: grid; min-width: 200px; z-index: 5; }
.mention-pop button { display: flex; align-items: center; gap: 8px; border: 0; background: none; padding: 6px 8px; border-radius: 6px; cursor: pointer; text-align: left; }
.mention-pop button.on, .mention-pop button:hover { background: var(--surface-3); }
.ver-list { padding: 10px 12px; display: grid; gap: 10px; }
.ver { border: 1px solid var(--line); border-radius: 10px; padding: 12px; display: grid; gap: 6px; }
.ver.sel { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.ver-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.vnum { font-weight: 800; font-size: 15px; margin-right: 2px; }
.ver-meta { font-size: 12px; color: var(--text-2); } .ver-notes { font-size: 13px; }
.ver-aps { list-style: none; padding: 0; margin: 0; display: grid; gap: 3px; font-size: 12.5px; }
.ver-aps li { display: flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 6px; } .ver-aps .ic { width: 14px; height: 14px; }
.ver-btns { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.timeline-list { list-style: none; margin: 0; padding: 12px 16px; display: grid; gap: 0; }
.timeline-list li { display: grid; grid-template-columns: 14px 1fr; gap: 10px; padding-bottom: 14px; position: relative; }
.timeline-list li::before { content: ""; position: absolute; left: 6px; top: 14px; bottom: 0; width: 2px; background: var(--line); }
.timeline-list li:last-child::before { display: none; }
.tl-dot { width: 14px; height: 14px; border-radius: 50%; border: 3px solid var(--surface); background: var(--accent); margin-top: 3px; box-shadow: 0 0 0 1px var(--line); }
.timeline-list b { display: block; font-size: 13px; } .timeline-list p { margin-top: 3px; color: var(--text-2); }
.share { padding: 12px 14px; display: grid; gap: 12px; }
.share h4 { font-size: 13px; margin-top: 4px; }
.link-row { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 10px; flex-wrap: wrap; }
.link-row > div { flex: 1; min-width: 160px; } .link-row b { display: block; font-size: 13px; } .link-row span { display: block; }
.link-row.off { opacity: .55; }
.guest-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 4px 0 10px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.bare { min-height: 100vh; } .bare > .review { padding: 18px; }

/* compare */
.cmp { display: flex; flex-direction: column; height: 100%; }
.cmp-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.cmp-head h2 { display: flex; align-items: center; gap: 8px; } .cmp-ctl { flex: 1; display: flex; justify-content: center; }
.cmp-body { flex: 1; overflow: auto; background: #0c0c10; padding: 16px; }
.cmp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; height: 100%; }
.cmp-pane { display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.cmp-pane .muted { color: #a9aab5; }
.cmp-label { display: flex; align-items: center; gap: 8px; } .cmp-label select { width: auto; max-width: 70%; }
.cmp-media { flex: 1; min-height: 0; display: grid; place-items: center; background: #000; border-radius: 8px; overflow: hidden; }
.cmp-media video, .cmp-media img { max-width: 100%; max-height: 66vh; display: block; }
.cmp-foot { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--line); } .cmp-foot:empty { display: none; }
.cmp-seek { flex: 1; accent-color: var(--accent); } .cmp-foot .tc { font-family: ui-monospace, Consolas, monospace; }
.cmp-slider { display: grid; gap: 10px; justify-items: center; }
.cmp-labels { display: flex; justify-content: space-between; width: min(100%, 720px); gap: 10px; } .cmp-labels select { width: auto; }
.slider-stage { position: relative; width: min(100%, 720px); aspect-ratio: 4/5; max-height: 68vh; }
.slider-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.slider-line { position: absolute; top: 0; bottom: 0; width: 2px; background: #fff; box-shadow: 0 0 6px rgba(0,0,0,.6); pointer-events: none; }
.slider-range { width: min(100%, 720px); accent-color: var(--accent); }

/* ---------- clients ---------- */
.client-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.client-card { padding: 16px; display: grid; gap: 14px; border-top: 3px solid var(--c); transition: transform .15s, box-shadow .15s; }
.client-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.cc-top { display: flex; gap: 12px; align-items: center; } .cc-top b { display: block; font-size: 15px; } .cc-top small { color: var(--text-2); }
.cc-logo { width: 40px; height: 40px; border-radius: 10px; background: var(--c); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 18px; flex: none; }
.cc-logo.lg { width: 52px; height: 52px; font-size: 22px; border-radius: 13px; }
.cc-progress { display: grid; gap: 4px; } .cc-progress small { color: var(--text-2); } .cc-progress .progress i { background: var(--c); }
.cc-chips { display: flex; flex-wrap: wrap; gap: 6px; min-height: 22px; }
.cc-foot { display: flex; justify-content: space-between; align-items: center; } .chan { display: flex; gap: 6px; }
.avatars { display: flex; } .avatars .avatar { margin-left: -6px; border: 2px solid var(--surface); }
.client-head { align-items: center; }
.plist, .ulist { list-style: none; margin: 0; padding: 0 0 6px; }
.plist li, .ulist li { display: flex; align-items: center; gap: 10px; padding: 9px 16px; border-top: 1px solid var(--line); }
.plist li > div, .ulist li > div { flex: 1; min-width: 0; } .plist b, .ulist b { display: block; } .plist small, .ulist small { color: var(--text-2); display: block; overflow: hidden; text-overflow: ellipsis; }
.plist select { width: auto; min-height: 30px; padding: 3px 6px; font-size: 12.5px; }
.chan-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.chan-pick input { display: none; } .chan-pick .chip:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }

/* ---------- calendar ---------- */
.cal-bar { display: flex; align-items: center; gap: 12px; padding: 10px 12px; flex-wrap: wrap; }
.cal-nav { display: flex; align-items: center; gap: 6px; } .cal-nav h2 { margin-left: 8px; font-size: 17px; text-transform: capitalize; min-width: 190px; }
.cal-filters { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; } .cal-filters select { width: auto; }
.cal-layout { display: grid; gap: 16px; } .cal-layout.with-tray { grid-template-columns: minmax(0, 1fr) 250px; align-items: start; }
.cal-body { display: grid; gap: 14px; min-width: 0; }
.month { overflow: hidden; }
.mhead, .mgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.mhead div { padding: 8px 10px; font-size: 12px; font-weight: 650; color: var(--text-3); text-transform: uppercase; border-bottom: 1px solid var(--line); }
.mcell { min-height: 118px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 6px; display: flex; flex-direction: column; gap: 4px; min-width: 0; transition: background .15s; }
.mcell:nth-child(7n) { border-right: 0; }
.mcell.other { background: var(--surface-2); } .mcell.other .mday { color: var(--text-3); }
.mday { font-size: 12.5px; font-weight: 650; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; }
.mcell.today .mday { background: var(--accent); color: #fff; }
.mevents { display: grid; gap: 3px; }
.drop-hint { background: color-mix(in srgb, var(--accent) 12%, transparent) !important; outline: 2px dashed var(--accent); outline-offset: -2px; }
.ev { display: grid; grid-template-columns: 13px minmax(0, 1fr); align-items: center; column-gap: 5px; row-gap: 1px; font-size: 11.5px; padding: 4px 6px 5px; border-radius: 6px; border-left: 3px solid var(--c); min-width: 0; cursor: pointer; transition: transform .1s, box-shadow .15s; }
.ev:hover { box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.ev .pi { width: 13px; height: 13px; }
.ev-t { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 11px; }
.ev-title { grid-column: 1 / -1; color: var(--text); font-weight: 550; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ev[draggable=true] { cursor: grab; } .ev.dragging, .wev.dragging { opacity: .4; }
.more-ev { border: 0; background: none; color: var(--accent); font-size: 11.5px; font-weight: 600; text-align: left; cursor: pointer; padding: 0 4px; }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.wcol { min-height: 380px; display: flex; flex-direction: column; } .wcol.today { border-color: var(--accent); }
.whead { padding: 10px; border-bottom: 1px solid var(--line); display: grid; } .whead b { text-transform: capitalize; font-size: 13px; } .whead span { font-size: 12px; color: var(--text-2); }
.wevents { padding: 8px; display: grid; gap: 6px; align-content: start; flex: 1; }
.wev { display: grid; gap: 3px; justify-items: start; border: 1px solid var(--line); border-left: 3px solid var(--c); border-radius: 7px; padding: 7px; font-size: 12px; background: var(--surface); }
.wev[draggable=true] { cursor: grab; } .wev b { font-size: 12.5px; line-height: 1.3; } .wev small { color: var(--text-2); }
.wev-time { display: flex; gap: 4px; align-items: center; font-weight: 650; color: var(--text-2); }
.lgroup h3 { text-transform: capitalize; display: flex; align-items: center; gap: 6px; }
.tray { position: sticky; top: 76px; max-height: calc(100vh - 92px); display: flex; flex-direction: column; }
.tray-list { display: grid; gap: 6px; padding: 0 12px 12px; overflow-y: auto; }
.tray-ev { display: grid; grid-template-columns: 16px 1fr; padding: 7px 8px; font-size: 12.5px; } .tray-ev small { grid-column: 2; color: var(--text-2); font-size: 11.5px; }

/* ---------- settings / mail ---------- */
.mail-grid { display: grid; grid-template-columns: 360px 1fr; gap: 16px; min-height: 70vh; }
.mail-list { overflow-y: auto; max-height: 75vh; }
.mail-item { display: grid; gap: 2px; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line); background: none; padding: 12px 14px; cursor: pointer; }
.mail-item:hover { background: var(--surface-2); } .mail-item.on { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.mail-item small { color: var(--text-2); } .mail-item em { font-style: normal; color: var(--text-3); font-size: 12px; }
.mail-preview { overflow: hidden; } .mail-preview iframe { width: 100%; height: 100%; min-height: 70vh; border: 0; background: #f3f4f6; border-radius: var(--r); }

/* ---------- client portal ---------- */
.portal { flex-direction: column; }
.portal-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 24px; height: 68px; padding: 0 clamp(16px, 4vw, 40px); background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.portal-nav { display: flex; gap: 4px; }
.portal-nav a { padding: 8px 14px; border-radius: 999px; font-weight: 600; color: var(--text-2); }
.portal-nav a:hover { background: var(--surface-3); } .portal-nav a.active { background: var(--text); color: var(--bg); }
.portal-view { padding: 28px clamp(16px, 4vw, 40px); }
.phome { max-width: 1120px; margin: 0 auto; display: grid; gap: 30px; }
.welcome { display: flex; align-items: center; gap: 28px; justify-content: space-between; padding: 28px; border-radius: 18px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 12%, var(--surface)), var(--surface)); border: 1px solid var(--line); }
.welcome h1 { font-size: 30px; } .welcome p { color: var(--text-2); margin-top: 6px; max-width: 560px; font-size: 15px; }
.welcome-cta { font-size: 15px !important; color: var(--text) !important; } .welcome-cta b { color: var(--accent); font-size: 18px; }
.welcome-cta.ok { display: flex; align-items: center; gap: 6px; color: var(--green) !important; font-weight: 600; }
.ring { --p: 0; width: 150px; height: 150px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--surface-3) 0); }
.ring > div { width: 120px; height: 120px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; align-content: center; text-align: center; padding: 8px; }
.ring b { font-size: 17px; line-height: 1.15; } .ring span { font-size: 12px; color: var(--text-2); }
.psec { display: grid; gap: 12px; } .psec.card { gap: 0; }
.psec-head { display: flex; align-items: center; gap: 10px; } .psec.card .psec-head { padding: 14px 16px 8px; justify-content: space-between; }
.psec-head h2 { font-size: 18px; } .count { background: var(--accent); color: #fff; border-radius: 999px; padding: 0 9px; font-weight: 700; font-size: 13px; line-height: 22px; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.pgrid.small { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.pcard { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
.pcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.pcard-thumb { aspect-ratio: 4/5; position: relative; background: var(--surface-3); display: block; overflow: hidden; }
.pcard.mini .pcard-thumb { aspect-ratio: 1; }
.pcard-thumb .dur { position: absolute; bottom: 10px; right: 10px; } .pcard-thumb .newv { position: absolute; top: 10px; left: 10px; background: var(--accent); }
.pcard-body { padding: 14px; display: grid; gap: 6px; justify-items: start; }
.pcard-body b { font-size: 15px; line-height: 1.3; } .pcard-body small { color: var(--text-2); }
.pcard-body .btn { margin-top: 6px; width: 100%; }
.pcard.mini .pcard-body { padding: 10px; } .pcard.mini b { font-size: 13px; }
.pcard-plat { font-size: 12.5px; color: var(--text-2); }
.calm { display: flex; align-items: center; gap: 14px; padding: 22px; border-radius: 16px; background: var(--green-bg); color: var(--green); }
.calm .ic { width: 28px; height: 28px; } .calm b { display: block; color: var(--text); font-size: 15px; } .calm span { color: var(--text-2); }
.pcols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.pfeed, .pup { list-style: none; margin: 0; padding: 0 0 6px; }
.pfeed a { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-top: 1px solid var(--line); }
.pfeed a > div { min-width: 0; flex: 1; } .pfeed-head { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .pfeed a:hover, .pup a:hover { background: var(--surface-2); }
.pfeed p { margin: 3px 0; font-size: 13.5px; } .pfeed small { color: var(--text-3); }
.pup a { display: flex; align-items: center; gap: 12px; padding: 9px 16px; border-top: 1px solid var(--line); }
.pup a > span:nth-child(2) { flex: 1; min-width: 0; } .pup b { display: block; } .pup small { color: var(--text-2); display: flex; align-items: center; gap: 4px; }
.plist-simple { display: grid; gap: 8px; }
.plist-simple a { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.plist-simple a:hover { border-color: var(--accent); } .plist-simple b { flex: 1; } .plist-simple span { color: var(--text-2); font-size: 13px; }
.portal .review .rv-head h1 { font-size: 22px; }

/* ---------- finishing touches ---------- */
.review.client #decision, .review.guest #decision { order: -1; } /* approval buttons first for clients */
.review #decision:empty { display: none; }
.live-pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 650;
  color: var(--text-3); background: var(--surface-3); margin-right: 4px; }
.live-pill i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.live-pill.on { color: var(--green); background: var(--green-bg); }
.live-pill.on i { animation: pulse 1.8s infinite; }
#toasts .toast-link { pointer-events: auto; cursor: pointer; display: block; }
.toast-live { background: var(--accent); }
.toast-link::after { content: " →"; opacity: .8; }
.stat.bump { animation: bump .9s ease-out; }
@keyframes bump { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--t) 60%, transparent); } 100% { box-shadow: 0 0 0 12px transparent; } }
.form-actions.gap { gap: 8px; }
.mail-err { color: var(--red) !important; font-size: 12px; }
.mail-item em { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.decided-next { display: flex !important; align-items: center; gap: 6px; margin-top: 8px; color: var(--text-2); }
.decided-next .ic { width: 14px; height: 14px; }
.controls input[type=range].vol { -webkit-appearance: none; appearance: none; height: 4px; border-radius: 2px; background: rgba(255,255,255,.22); }
.controls input[type=range].vol::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: #fff; cursor: pointer; }
.controls input[type=range].vol::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: #fff; }
.card-head h2 { font-size: 15px; }
.page-head h1 { letter-spacing: -0.02em; }
.sidebar .btn-primary { height: 40px; box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 35%, transparent); }
.nav-link .ic { width: 17px; height: 17px; }
.lib-thumb .thumb-ph, .row-thumb .thumb-ph { background: linear-gradient(160deg, var(--surface-3), var(--surface-2)); }
.badge { letter-spacing: .005em; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 10px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .rv-body { grid-template-columns: 1fr; }
  .rv-panel { position: static; max-height: none; }
  .panel-body { max-height: 70vh; }
  .dash-grid { grid-template-columns: 1fr; }
  .cal-layout.with-tray { grid-template-columns: 1fr; } .tray { position: static; max-height: 320px; }
}
@media (max-width: 960px) {
  .sidebar { position: fixed; left: 0; top: 0; z-index: 45; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-lg); }
  .menu-open .sidebar { transform: none; }
  .menu-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 44; }
  .only-mobile { display: inline-grid; }
  .stats { grid-template-columns: repeat(2, 1fr); } .stats.small { grid-template-columns: repeat(3, 1fr); }
  .meta-grid { grid-template-columns: 1fr; }
  .mail-grid { grid-template-columns: 1fr; }
  .week { grid-template-columns: 1fr; } .wcol { min-height: 0; }
  .auth { grid-template-columns: 1fr; } .auth-side { display: none; }
  .pcols { grid-template-columns: 1fr; }
  .cmp-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .view, .portal-view { padding: 16px; }
  .topbar { padding: 0 12px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .up-row1 { grid-template-columns: 1fr; }
  .stats.small { grid-template-columns: repeat(2, 1fr); }
  .row-due { display: none; }
  .row { flex-wrap: wrap; row-gap: 4px; }
  .row-main { flex-basis: calc(100% - 56px - 56px); }
  .row-status { order: 5; width: 100%; padding-left: 56px; }
  .portal-top { gap: 8px; height: auto; padding: 10px 16px; flex-wrap: wrap; }
  .portal-top .brand small { display: none; }
  .portal-nav { order: 3; width: 100%; overflow-x: auto; }
  .welcome { flex-direction: column; align-items: flex-start; padding: 20px; gap: 16px; } .welcome h1 { font-size: 24px; }
  .ring { width: 104px; height: 104px; } .ring > div { width: 84px; height: 84px; } .ring b { font-size: 13px; } .ring span { font-size: 10.5px; }
  .pcard-thumb { aspect-ratio: 16/11; }
  .mcell { min-height: 74px; padding: 3px; } .ev-title, .ev-t { display: none; } .ev { justify-content: center; padding: 3px; }
  .mhead div { padding: 6px 2px; text-align: center; }
  .dbtn { flex: 1; justify-content: center; padding: 0 10px; }
  .decide-btns { width: 100%; }
  .filters select { max-width: none; flex: 1 1 140px; }
  .controls .vol { display: none; }
  .frame-area { padding: 8px; min-height: 200px; }
  .modal { padding: 16px; }
  .cal-nav h2 { min-width: 0; font-size: 15px; }
}

/* =====================================================================
   ReviewFlow 2.0 — premium layer (overrides above)
   ===================================================================== */
body { background:
    radial-gradient(1100px 520px at 105% -12%, var(--glow), transparent 62%),
    radial-gradient(800px 420px at -10% 110%, color-mix(in srgb, var(--accent) 5%, transparent), transparent 60%),
    var(--bg);
  background-attachment: fixed; font-size: 14px; letter-spacing: -0.003em; }
::selection { background: color-mix(in srgb, var(--accent) 28%, transparent); }
h1, h2, h3, .stat b, .brand b, .welcome h1, .auth-form h1, .auth-side h2 { font-family: var(--font-display); }
h1 { font-size: 27px; font-weight: 700; letter-spacing: -0.028em; }
h2 { letter-spacing: -0.015em; }
kbd { font: 600 11px/1 var(--font); padding: 3px 6px; border-radius: 5px; border: 1px solid var(--line-2); border-bottom-width: 2px; background: var(--surface); color: var(--text-3); }

/* page enter: transform only (never hides content) */
.view > .page, .view > .review, .portal-view > .phome, .portal-view > .page { animation: rise .32s cubic-bezier(.2,.8,.2,1); }
@keyframes rise { from { transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .view > *, .portal-view > * { animation: none !important; } }

/* buttons */
.btn { height: 36px; border-radius: 10px; font-weight: 600; box-shadow: var(--shadow), var(--hi); border-color: var(--line-2);
  transition: background .15s, border-color .15s, box-shadow .2s, transform .12s; }
.btn:hover { border-color: color-mix(in srgb, var(--text) 18%, var(--line-2)); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn-primary { background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 88%, #fff), var(--accent)); border-color: color-mix(in srgb, var(--accent) 80%, #000);
  box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 6px 16px -6px color-mix(in srgb, var(--accent) 70%, transparent), 0 1px 2px rgba(0,0,0,.12); text-shadow: 0 1px 0 rgba(0,0,0,.12); }
.btn-primary:hover { background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 80%, #fff), color-mix(in srgb, var(--accent) 94%, #fff)); filter: none;
  box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 10px 22px -8px color-mix(in srgb, var(--accent) 80%, transparent), 0 1px 2px rgba(0,0,0,.12); border-color: color-mix(in srgb, var(--accent) 80%, #000); }
.btn-success, .dbtn.approve { background: linear-gradient(180deg, #2bb36c, #1c9455); border-color: #188a4e; box-shadow: 0 1px 0 rgba(255,255,255,.22) inset, 0 8px 18px -8px rgba(31,157,92,.7); }
.btn-danger { background: linear-gradient(180deg, #e2434f, #c8232f); }
.icon-btn { border-radius: 10px; transition: background .15s, color .15s; }
input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]), select, textarea { border-radius: 10px; background: var(--surface); box-shadow: inset 0 1px 2px rgba(16,16,32,.04); }
input:hover:not(:focus), select:hover:not(:focus), textarea:hover:not(:focus) { border-color: color-mix(in srgb, var(--text) 22%, var(--line-2)); }
input:focus, select:focus, textarea:focus { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.seg { border-radius: 10px; background: var(--surface-3); box-shadow: inset 0 1px 2px rgba(0,0,0,.05); }
.seg button { border-radius: 7px; transition: color .15s, background .15s; }
.seg button.on { box-shadow: 0 1px 3px rgba(16,16,32,.12), var(--hi); }
.chip { transition: border-color .15s, background .15s; } .chip:hover { border-color: var(--accent); }
.badge { box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 16%, transparent); height: 23px; padding: 0 9px; }

/* cards */
.card, .stat, .lib-card, .pcard, .client-card { border-color: var(--line); box-shadow: var(--shadow), var(--hi); }
.card-head { padding: 16px 18px 12px; }
.card-head h2 { font-size: 15px; font-weight: 650; }
.row { padding: 11px 18px; transition: background .12s; }
.row:hover { background: color-mix(in srgb, var(--accent) 4%, var(--surface-2)); }
.row-thumb { width: 46px; height: 46px; border-radius: 10px; box-shadow: 0 0 0 1px var(--line); }
.row-main b { font-weight: 620; }

/* sidebar */
.sidebar { background: color-mix(in srgb, var(--surface) 72%, transparent); backdrop-filter: blur(16px); border-right-color: var(--line); padding: 18px 14px; gap: 16px; }
.brand-mark { background: linear-gradient(140deg, color-mix(in srgb, var(--accent) 65%, #fff) 0%, var(--accent) 48%, color-mix(in srgb, var(--accent) 70%, #000) 100%);
  box-shadow: 0 1px 0 rgba(255,255,255,.35) inset, 0 6px 14px -4px color-mix(in srgb, var(--accent) 60%, transparent); border-radius: 10px; }
.nav { gap: 3px; }
.nav-link { position: relative; padding: 8px 11px; border-radius: 10px; transition: background .15s, color .15s; }
.nav-link.active { background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 15%, transparent), color-mix(in srgb, var(--accent) 5%, transparent)); color: var(--text); }
.nav-link.active .ic { color: var(--accent); }
.nav-link.active::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.nav-count { background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 85%, #fff), var(--accent)); font-weight: 700; }
.me { border-top: 0; padding: 10px; border-radius: 12px; background: var(--surface-3); margin-top: auto; }

/* topbar */
.topbar { height: 62px; background: color-mix(in srgb, var(--bg) 72%, transparent); backdrop-filter: saturate(1.6) blur(14px); }
.search { border-radius: 11px; cursor: text; transition: border-color .15s, box-shadow .15s; box-shadow: var(--shadow); }
.search:hover { border-color: color-mix(in srgb, var(--text) 20%, var(--line-2)); }
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); }
.search kbd { margin-left: auto; flex: none; }
.live-pill { box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 18%, transparent); }
.live-pill.on i { box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 25%, transparent); }
.theme-btn .ic { width: 18px; height: 18px; }

/* dashboard hero */
.hero { position: relative; overflow: hidden; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  padding: 26px 28px; border-radius: 20px; border: 1px solid var(--line);
  background:
    radial-gradient(600px 240px at 100% 0%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%),
    radial-gradient(380px 200px at 0% 100%, color-mix(in srgb, var(--teal) 10%, transparent), transparent 70%),
    var(--surface);
  box-shadow: var(--shadow), var(--hi); }
.hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: radial-gradient(color-mix(in srgb, var(--text) 9%, transparent) 1px, transparent 1px); background-size: 18px 18px;
  mask-image: radial-gradient(420px 200px at 92% 10%, #000, transparent 75%); }
.hero > * { position: relative; z-index: 1; }
.hero h1 { font-size: 30px; }
.hero-date { font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); margin-bottom: 6px; }
.hero-sum { margin-top: 8px; color: var(--text-2); font-size: 14.5px; max-width: 620px; }
.hero-sum b { color: var(--text); }
.hero-sum a { color: var(--accent); font-weight: 650; }
.hero .quick .btn:not(.btn-primary) { background: color-mix(in srgb, var(--surface) 75%, transparent); backdrop-filter: blur(8px); }

/* stats */
.stats { gap: 14px; }
.stat { padding: 18px 18px 16px; border-radius: 16px; gap: 3px; isolation: isolate; }
.stat::before { content: ""; position: absolute; z-index: -1; right: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--t) 16%, transparent), transparent); transition: transform .3s; }
a.stat:hover::before { transform: scale(1.25); }
.stat::after { height: 2px; background: linear-gradient(90deg, transparent, var(--t), transparent); }
.stat b { font-size: 34px; font-weight: 700; letter-spacing: -0.04em; }
.stat-ic { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(140deg, color-mix(in srgb, var(--t) 22%, transparent), color-mix(in srgb, var(--t) 8%, transparent));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--t) 22%, transparent); }
.stat-label { color: var(--text-2) !important; font-size: 13px !important; }

/* feed & lists */
.feed li { padding: 2px 0; }
.dl-date { border-radius: 10px; box-shadow: inset 0 0 0 1px var(--line); background: var(--surface-2); }
.table th { text-transform: uppercase; font-size: 11px; letter-spacing: .06em; padding: 10px 18px; background: var(--surface-2); }
.table td { padding: 12px 18px; }
.table tbody tr { transition: background .12s; } .table tbody tr:hover td { background: var(--surface-2); }
.progress { height: 7px; border-radius: 4px; } .progress i { background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 70%, #fff), var(--accent)); border-radius: 4px; }
.cc-progress .progress i { background: var(--c); }

/* library */
.filters.card { padding: 12px; border-radius: 16px; }
.lib-grid { gap: 16px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.lib-card { border-radius: 16px; transition: box-shadow .2s, transform .2s, border-color .2s; }
.lib-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.lib-thumb img { transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.lib-card:hover .lib-thumb img, .pcard:hover .pcard-thumb img { transform: scale(1.04); }
.lib-thumb::after, .pcard-thumb::after { content: ""; position: absolute; inset: auto 0 0 0; height: 40%; background: linear-gradient(transparent, rgba(0,0,0,.35)); pointer-events: none; }
.lib-badges, .pcard-thumb .dur, .pcard-thumb .newv { z-index: 1; }
.lib-body { padding: 12px 14px 14px; }
.bulk { border-radius: 14px; background: color-mix(in srgb, var(--text) 92%, transparent); backdrop-filter: blur(12px); }

/* modals & popovers */
.modal-wrap { background: rgba(8,8,14,.5); backdrop-filter: blur(6px); }
.modal { border-radius: 20px; border: 1px solid var(--line); animation: pop .22s cubic-bezier(.2,.9,.3,1.2); box-shadow: var(--shadow-lg), var(--hi); }
@keyframes pop { from { transform: translateY(8px) scale(.98); } }
.notif-pop, .menu-pop { border-radius: 16px; animation: pop .18s ease-out; }
.toast { background: rgba(20,20,28,.92); backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,.08); border-radius: 12px; padding: 11px 16px;
  box-shadow: 0 18px 40px -10px rgba(0,0,0,.45); display: flex; align-items: center; gap: 10px; }
.toast::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #5bd49a; box-shadow: 0 0 0 3px rgba(91,212,154,.25); flex: none; }
.toast-err { background: rgba(180,28,45,.95); } .toast-err::before { background: #fff; box-shadow: none; }
.toast-live { background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 92%, #000), color-mix(in srgb, var(--accent) 70%, #000)); }
.toast-live::before { background: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.25); }

/* review */
.stage-box { border-radius: 18px; box-shadow: 0 30px 60px -24px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.04); }
.frame-area { background: radial-gradient(circle at 50% 25%, color-mix(in srgb, var(--accent) 16%, #16161e), #0a0a0e 72%); }
.decide { border-radius: 18px; background: radial-gradient(420px 160px at 0% 0%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 70%), var(--surface); }
.dbtn { border-radius: 12px; height: 48px; }
.rv-panel { border-radius: 18px; }
.tab.active { border-bottom-width: 2px; }
.cm { border-radius: 12px; }
.tl-prog { background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 70%, #fff), var(--accent)); }

/* clients */
.client-card { border-radius: 18px; border-top: 1px solid var(--line); position: relative; overflow: hidden; }
.client-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 70px; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 16%, transparent), transparent); pointer-events: none; }
.client-card > * { position: relative; }
.cc-logo { border-radius: 12px; box-shadow: 0 1px 0 rgba(255,255,255,.3) inset, 0 6px 14px -6px var(--c); }

/* calendar */
.mcell.today { background: color-mix(in srgb, var(--accent) 5%, transparent); }
.mcell.today .mday { box-shadow: 0 4px 10px -2px color-mix(in srgb, var(--accent) 60%, transparent); }
.ev { background: color-mix(in srgb, var(--c) 9%, var(--surface)); }

/* client portal */
.portal-top { background: color-mix(in srgb, var(--surface) 75%, transparent); backdrop-filter: saturate(1.6) blur(14px); height: 70px; }
.portal-nav { background: var(--surface-3); padding: 4px; border-radius: 999px; box-shadow: inset 0 1px 2px rgba(0,0,0,.05); }
.portal-nav a { padding: 7px 16px; font-size: 13.5px; transition: background .15s, color .15s; }
.portal-nav a.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(16,16,32,.14), var(--hi); }
.welcome { position: relative; overflow: hidden; border-radius: 24px; padding: 34px 36px;
  background: radial-gradient(640px 280px at 100% 0%, color-mix(in srgb, var(--accent) 26%, transparent), transparent 70%),
              radial-gradient(420px 220px at 0% 100%, color-mix(in srgb, var(--teal) 10%, transparent), transparent 70%), var(--surface);
  box-shadow: var(--shadow), var(--hi); }
.welcome::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: radial-gradient(color-mix(in srgb, var(--text) 9%, transparent) 1px, transparent 1px); background-size: 18px 18px;
  mask-image: radial-gradient(420px 220px at 90% 15%, #000, transparent 75%); }
.welcome > * { position: relative; z-index: 1; }
.welcome h1 { font-size: 34px; letter-spacing: -0.03em; }
.ring { background: conic-gradient(color-mix(in srgb, var(--accent) 60%, #fff), var(--accent) calc(var(--p) * 1%), var(--surface-3) 0);
  box-shadow: 0 16px 36px -14px color-mix(in srgb, var(--accent) 60%, transparent); }
.ring > div { box-shadow: inset 0 0 0 1px var(--line); }
.pcard { border-radius: 20px; }
.pcard:hover { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.pcard-thumb img { transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.calm { border-radius: 18px; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--green) 20%, transparent); }
.plist-simple a { border-radius: 14px; transition: border-color .15s, transform .15s; } .plist-simple a:hover { transform: translateX(2px); }
.count { background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 85%, #fff), var(--accent)); }

/* login */
.auth-card { background: var(--surface); }
.auth-form h1 { font-size: 32px; letter-spacing: -0.03em; }
.auth-side { background:
  radial-gradient(700px 420px at 80% 5%, color-mix(in srgb, var(--accent) 55%, #fff) 0%, transparent 60%),
  radial-gradient(600px 500px at 10% 100%, color-mix(in srgb, var(--accent) 50%, #0bd) 0%, transparent 60%),
  linear-gradient(160deg, var(--accent), #120f2c 85%); }
.auth-side h2 { font-size: 36px; }

/* empty states */
.empty-ic { width: 56px; height: 56px; border-radius: 16px; background: linear-gradient(140deg, color-mix(in srgb, var(--accent) 22%, transparent), color-mix(in srgb, var(--accent) 6%, transparent));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 20%, transparent); }

/* ---------- command palette ---------- */
.cmdk-wrap { position: fixed; inset: 0; z-index: 90; background: rgba(8,8,14,.5); backdrop-filter: blur(6px); display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; animation: fin .12s; }
.cmdk { width: min(640px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg), var(--hi); overflow: hidden; animation: pop .2s cubic-bezier(.2,.9,.3,1.2); display: flex; flex-direction: column; max-height: 70vh; }
.cmdk-in { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--line); color: var(--text-3); }
.cmdk-in input { border: 0 !important; box-shadow: none !important; background: transparent !important; height: 56px; font-size: 16px; padding: 0 !important; color: var(--text); }
.cmdk-list { overflow-y: auto; padding: 8px; }
.cmdk-group { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--text-3); padding: 10px 10px 4px; }
.cmdk-item { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: none; text-align: left; padding: 9px 10px; border-radius: 10px; cursor: pointer; color: var(--text); }
.cmdk-item.on { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.cmdk-item.on .cmdk-ic { color: var(--accent); }
.cmdk-ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); flex: none; overflow: hidden; }
.cmdk-ic img { width: 100%; height: 100%; object-fit: cover; }
.cmdk-ic .ic { width: 17px; height: 17px; }
.cmdk-txt { flex: 1; min-width: 0; } .cmdk-txt b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmdk-txt small { display: block; color: var(--text-2); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmdk-item .go { color: var(--text-3); opacity: 0; } .cmdk-item.on .go { opacity: 1; }
.cmdk-foot { display: flex; gap: 14px; padding: 10px 16px; border-top: 1px solid var(--line); color: var(--text-3); font-size: 12px; background: var(--surface-2); }
.cmdk-foot span { display: inline-flex; gap: 6px; align-items: center; }
.cmdk-empty { padding: 30px; text-align: center; color: var(--text-2); }

@media (max-width: 960px) {
  .nav-link.active::before { display: none; }
  .sidebar { background: var(--surface); }
}
@media (max-width: 640px) {
  .hero { padding: 20px; border-radius: 16px; } .hero h1 { font-size: 24px; }
  .welcome { padding: 22px; } .welcome h1 { font-size: 26px; }
  .portal-top { height: auto; }
  .portal-nav { justify-content: space-between; }
  .portal-nav a { flex: 1; text-align: center; padding: 7px 8px; }
  .search kbd { display: none; }
  .stat b { font-size: 28px; }
}
/* search button + misc (2.0) */
.search-btn { font: inherit; text-align: left; color: var(--text-3); min-width: 0; }
.search-btn span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-btn:hover { color: var(--text-2); }
.hero .quick { position: relative; z-index: 1; }
@media (max-width: 640px) {
  .search-btn span { font-size: 13px; }
  .topbar { gap: 6px; } .topbar-right { gap: 0; }
  .topbar .live-pill { padding: 0 8px; margin-right: 0; } .topbar .live-pill span { display: none; }
  .hero .quick .btn { flex: 1 1 auto; }
}
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 > *, .grid-3 > * { min-width: 0; }
@media (max-width: 640px) { .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); } }.form { grid-template-columns: minmax(0, 1fr); } .form > * { min-width: 0; }
/* ---------- 2.1: logo, 2FA, attachments ---------- */
.brand-mark.has-logo { background: var(--surface); padding: 0; overflow: hidden; box-shadow: 0 0 0 1px var(--line), 0 4px 10px -4px rgba(0,0,0,.2); }
.brand-mark.has-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.logo-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding-bottom: 14px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.logo-prev { width: 64px; height: 64px; border-radius: 14px; display: grid; place-items: center; background: var(--surface-3); overflow: hidden; flex: none; }
.logo-prev img { width: 100%; height: 100%; object-fit: contain; }
.logo-prev .brand-mark { width: 44px; height: 44px; }
label.btn { cursor: pointer; }
.tone-text-green { color: var(--green); }
.steps { margin: 0; padding-left: 20px; display: grid; gap: 12px; }
.steps li { padding-left: 4px; line-height: 1.5; }
.keybox { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 8px 0 6px; padding: 12px 14px; border-radius: 12px; background: var(--surface-3); }
.keybox span { display: grid; gap: 2px; } .keybox small { color: var(--text-3); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; font-weight: 650; }
.keybox code { font: 600 15px/1.3 ui-monospace, Consolas, monospace; letter-spacing: .04em; word-break: break-all; }
.keybox .btn { margin-left: auto; }
.code-input { font: 600 22px/1 ui-monospace, Consolas, monospace !important; letter-spacing: .3em; text-align: center; height: 52px; }
.backup-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 14px; border-radius: 12px; background: var(--surface-3); }
.backup-codes code { font: 600 15px ui-monospace, Consolas, monospace; text-align: center; padding: 6px; border-radius: 8px; background: var(--surface); }
.twofa-step { display: grid; gap: 12px; }
.auth-foot { display: flex; align-items: center; justify-content: center; gap: 5px; flex-wrap: wrap; } .auth-foot .ic { width: 13px; height: 13px; }
.attachments { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.att-img { position: relative; display: block; }
.att-img img { width: 84px; height: 64px; object-fit: cover; border-radius: 8px; display: block; box-shadow: 0 0 0 1px var(--line); transition: transform .15s; }
.att-img a:hover img { transform: scale(1.03); }
.att-del { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: var(--text); color: var(--bg); display: none; place-items: center; cursor: pointer; padding: 0; }
.att-img:hover .att-del { display: grid; } .att-del .ic { width: 12px; height: 12px; }
.att-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 4px 6px 4px 9px; border-radius: 8px; background: var(--surface-3); font-size: 12.5px; font-weight: 550; }
.att-chip a { display: inline-flex; align-items: center; gap: 5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-chip a:hover { color: var(--accent); }
.att-chip .ic { width: 14px; height: 14px; flex: none; } .att-chip small { color: var(--text-3); white-space: nowrap; }
.att-chip button { border: 0; background: none; color: var(--text-3); cursor: pointer; padding: 2px; display: grid; place-items: center; border-radius: 5px; }
.att-chip button:hover { color: var(--red); background: var(--red-bg); }
.attach-pending { display: flex; flex-wrap: wrap; gap: 6px; }.form label:has(> span.muted) { display: block; }
.form label:has(> span.muted) > :is(input, select, textarea) { margin-top: 6px; }