/* =========================================================
   AI FILMING – app shell (user dashboard + admin)
   Builds on tokens and buttons from app.css
   ========================================================= */

body.app-body { background: #07060f; }
.app { display: grid; grid-template-columns: 256px minmax(0, 1fr); min-height: 100vh; min-height: 100svh; }

/* ---------- sidebar ---------- */
.sidebar {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 4px;
  padding: calc(18px + env(safe-area-inset-top, 0px)) 14px calc(18px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, #0b0918, #08070f); border-right: 1px solid var(--line);
  scrollbar-width: thin;
}
.sidebar .logo { padding: 6px 10px 18px; }
.side-label { margin: 16px 10px 6px; font-size: 12px; font-weight: 700; color: var(--dim); }
.side-link {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px;
  color: var(--muted); font-weight: 600; font-size: 14.5px; transition: background-color .15s, color .15s;
}
.side-link .icon { width: 19px; height: 19px; }
.side-link:hover { color: var(--text); background: rgba(255,255,255,.05); }
.side-link.is-active { color: var(--text); background: linear-gradient(90deg, rgba(240,70,156,.18), rgba(139,92,246,.10)); box-shadow: inset 2px 0 0 var(--pink); }
.side-link .count { margin-left: auto; font-size: 12px; padding: 1px 8px; border-radius: 999px; background: rgba(255,138,61,.15); color: #ffb27d; }
.side-cta { margin: 14px 4px 4px; }
.side-foot { margin-top: auto; padding-top: 16px; }
.credit-box { padding: 14px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid var(--line); }
.credit-box b { font-family: var(--font-display); font-size: 22px; display: block; }
.credit-box small { color: var(--muted); font-size: 12.5px; }
.credit-box a { display: inline-block; margin-top: 8px; font-size: 13px; font-weight: 700; color: #ffb27d; }
.credit-box.is-low { border-color: rgba(255,138,61,.5); background: rgba(255,138,61,.08); }

/* ---------- topbar ---------- */
.main { min-width: 0; display: flex; flex-direction: column; }
.scrim { display: none; }
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px;
  height: calc(64px + env(safe-area-inset-top, 0px)); padding: env(safe-area-inset-top, 0px) clamp(16px, 3vw, 32px) 0;
  background: rgba(7,6,15,.8); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-title { font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.credit-pill { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 999px; background: rgba(255,255,255,.06); border: 1px solid var(--line-2); font-weight: 700; font-size: 14px; }
.credit-pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--grad); }
.credit-pill.is-low { border-color: rgba(255,138,61,.6); color: #ffb27d; }
.icon-btn { position: relative; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.05); border: 1px solid var(--line); }
.icon-btn:hover { background: rgba(255,255,255,.1); }
.icon-btn .dot { position: absolute; top: 7px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 0 2px #07060f; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 14px; background: var(--grad); color: #fff; flex: 0 0 auto; }
.drawer-btn { display: none; }

.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 40; min-width: 240px; max-width: min(360px, 92vw);
  padding: 8px; border-radius: 14px; background: #120f22; border: 1px solid var(--line-2);
  box-shadow: 0 24px 60px -20px rgba(0,0,0,.9); display: none;
}
.dropdown.is-open .dropdown-menu { display: block; animation: rise .15s ease; }
.dropdown-menu a, .dropdown-menu button { display: flex; width: 100%; gap: 10px; padding: 9px 10px; border-radius: 10px; color: var(--text); font-size: 14px; text-align: left; background: none; border: 0; }
.dropdown-menu a:hover, .dropdown-menu button:hover { background: rgba(255,255,255,.06); }
.dropdown-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; font-size: 13px; color: var(--muted); }
.dropdown-head b { display: block; color: var(--text); font-size: 14px; }
.notif { display: block !important; }
.notif b { display: block; font-size: 13.5px; }
.notif span { display: block; font-size: 12.5px; color: var(--muted); }
.notif.is-unread b::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--pink); margin-right: 6px; vertical-align: middle; }

/* ---------- page ---------- */
.page { padding: clamp(18px, 3vw, 32px) clamp(16px, 3vw, 32px) 64px; width: 100%; max-width: 1400px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.page-title { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.4rem, 2.6vw, 1.9rem); letter-spacing: -.02em; }
.page-sub { color: var(--muted); margin-top: 6px; font-size: 15px; max-width: 70ch; }
.page-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.back-link { display: inline-flex; gap: 6px; color: var(--muted); font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.back-link:hover { color: var(--text); }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } .span-2 { grid-column: auto; } }
@media (max-width: 460px) { .grid-4 { grid-template-columns: 1fr; } }

.card { padding: 20px; border-radius: 18px; background: rgba(255,255,255,.035); border: 1px solid var(--line); min-width: 0; }
.card + .card { margin-top: 16px; }
.grid > .card + .card { margin-top: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-title { font-size: 16px; font-weight: 700; }
.card-link { font-size: 13.5px; font-weight: 700; color: var(--muted); }
.card-link:hover { color: var(--text); }

.stat { position: relative; overflow: hidden; }
.stat-label { color: var(--muted); font-size: 13.5px; font-weight: 600; }
.stat-value { font-family: var(--font-display); font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 700; margin-top: 6px; letter-spacing: -.02em; }
.stat-meta { color: var(--dim); font-size: 13px; margin-top: 4px; }
.stat::after { content: ""; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: radial-gradient(circle, rgba(240,70,156,.18), transparent 70%); }
.stat--accent { background: linear-gradient(135deg, rgba(255,138,61,.16), rgba(139,92,246,.14)); border-color: rgba(240,70,156,.3); }

/* ---------- alerts ---------- */
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line-2); background: rgba(255,255,255,.04); margin-bottom: 18px; font-size: 14.5px; }
.alert b { display: block; }
.alert .btn { margin-left: auto; flex: 0 0 auto; }
.alert--warn { border-color: rgba(255,138,61,.45); background: rgba(255,138,61,.08); }
.alert--bad { border-color: rgba(248,113,113,.45); background: rgba(248,113,113,.08); }
.alert--ok { border-color: rgba(52,211,153,.4); background: rgba(52,211,153,.07); }
.alert--info { border-color: rgba(79,124,255,.45); background: rgba(79,124,255,.08); }

/* ---------- status badges ---------- */
.status { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status--ok { color: var(--green); background: rgba(52,211,153,.1); }
.status--warn { color: #ffb27d; background: rgba(255,138,61,.12); }
.status--warn::before { animation: pulse-dot 1.4s ease-in-out infinite; }
.status--info { color: #8fb0ff; background: rgba(79,124,255,.12); }
.status--bad { color: #fca5a5; background: rgba(248,113,113,.12); }
.status--muted { color: var(--muted); background: rgba(255,255,255,.07); }
@keyframes pulse-dot { 50% { opacity: .35; } }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; border-radius: 14px; border: 1px solid var(--line); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-weight: 700; color: var(--muted); font-size: 12.5px; padding: 12px 14px; background: rgba(255,255,255,.03); white-space: nowrap; }
.table td { padding: 12px 14px; border-top: 1px solid var(--line); vertical-align: middle; }
.table tr:hover td { background: rgba(255,255,255,.02); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .actions { text-align: right; white-space: nowrap; }
.table .muted, .muted { color: var(--muted); }
.table .small, .small { font-size: 12.5px; }
.pos { color: var(--green); font-weight: 700; }
.neg { color: #fca5a5; font-weight: 700; }
.cell-user { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.cell-user .avatar { width: 30px; height: 30px; font-size: 12px; }
.thumb { width: 40px; aspect-ratio: 186 / 326; object-fit: cover; border-radius: 6px; background: var(--bg-3); }
.thumb-wide { width: 72px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; background: var(--bg-3); }

/* ---------- forms ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-size: 13.5px; font-weight: 700; color: #d8d4ee; }
.help { font-size: 12.5px; color: var(--dim); }
.input, .field input[type=text], .field input[type=email], .field input[type=password], .field input[type=number], .field input[type=url],
.field input[type=search], .field input[type=datetime-local], .field select, .field textarea, select.input, textarea.input {
  width: 100%; min-height: 44px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line-2);
  background: rgba(5,4,11,.6); color: var(--text); font: inherit; font-size: 15px;
  transition: border-color .15s, box-shadow .15s;
}
.field textarea, textarea.input { min-height: 110px; resize: vertical; line-height: 1.55; }
textarea.tall { min-height: 260px; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: rgba(240,70,156,.7); box-shadow: 0 0 0 3px rgba(240,70,156,.18); }
.field select, select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a8a4c2' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.field select option { background: #120f22; }
.field.has-error input, .field.has-error textarea, .field.has-error select { border-color: #f87171; }
.field-error { color: #fca5a5; font-size: 12.5px; }
.check { display: inline-flex; align-items: center; gap: 10px; font-size: 14.5px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--pink); }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; align-items: center; }
.form-actions .spacer { flex: 1; }
.search-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.search-row .input { flex: 1 1 220px; width: auto; }
.search-row select.input { flex: 0 1 200px; }
.chips-select { display: flex; flex-wrap: wrap; gap: 8px; }
.chips-select label { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 13.5px; cursor: pointer; }
.chips-select input { accent-color: var(--pink); }
.chips-select label:has(input:checked) { border-color: rgba(240,70,156,.7); background: rgba(240,70,156,.12); }

.btn-danger { background: rgba(248,113,113,.12); color: #fca5a5; border-color: rgba(248,113,113,.35); }
.btn-danger:hover { background: rgba(248,113,113,.22); }
.btn-outline { background: transparent; border-color: var(--line-2); }
.btn-outline:hover { background: rgba(255,255,255,.07); }
.btn-xs { height: 30px; padding: 0 12px; font-size: 12.5px; }
.btn[disabled], .btn.is-loading { opacity: .6; pointer-events: none; }
.btn.is-loading::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.cost-tag { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: rgba(0,0,0,.25); }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; width: fit-content; max-width: 100%; }
.tab { padding: 8px 16px; border-radius: 10px; font-weight: 700; font-size: 14px; color: var(--muted); white-space: nowrap; }
.tab:hover { color: var(--text); }
.tab.is-active { background: rgba(255,255,255,.1); color: var(--text); }
.tab .n { margin-left: 6px; font-size: 12px; color: var(--dim); }

/* ---------- empty / loading ---------- */
.empty { text-align: center; padding: clamp(36px, 6vw, 64px) 20px; border-radius: 18px; border: 1px dashed var(--line-2); background: rgba(255,255,255,.02); }
.empty .icon { width: 40px; height: 40px; color: #ffb27d; margin: 0 auto 12px; }
.empty h3 { font-size: 18px; }
.empty p { color: var(--muted); margin: 8px auto 18px; max-width: 46ch; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid rgba(255,255,255,.15); border-top-color: var(--pink); animation: spin .8s linear infinite; }
.skeleton { border-radius: 10px; background: linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.09), rgba(255,255,255,.04)); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- project cards ---------- */
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 18px; }
.project-card { display: flex; flex-direction: column; gap: 10px; }
.project-poster { position: relative; display: block; aspect-ratio: 186 / 326; border-radius: 14px; overflow: hidden; background: linear-gradient(160deg, #1b1533, #0d0b1a); border: 1px solid var(--line); }
.project-poster img { width: 100%; height: 100%; object-fit: cover; }
.project-poster .ph { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; text-align: center; font-family: var(--font-display); font-weight: 700; font-size: 18px; color: rgba(255,255,255,.75); background: radial-gradient(circle at 30% 20%, rgba(240,70,156,.3), transparent 60%), radial-gradient(circle at 80% 90%, rgba(79,124,255,.3), transparent 60%); }
.project-poster .status { position: absolute; left: 10px; top: 10px; backdrop-filter: blur(8px); background: rgba(5,4,11,.7); }
.project-meta h3 { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.project-meta p { color: var(--muted); font-size: 13px; }
.project-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); min-width: 0; }
.list-item:first-child { border-top: 0; padding-top: 0; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .grow b { display: block; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item .grow span { display: block; font-size: 13px; color: var(--muted); }

.quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.quick a { display: flex; align-items: center; gap: 10px; padding: 14px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid var(--line); font-weight: 700; font-size: 14px; }
.quick a:hover { background: rgba(255,255,255,.08); }
.quick .icon { color: #ffb27d; }

.hero-create { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; padding: clamp(20px, 3vw, 32px); border-radius: 22px; margin-bottom: 20px;
  background: radial-gradient(80% 140% at 0% 0%, rgba(255,138,61,.25), transparent 60%), radial-gradient(80% 140% at 100% 100%, rgba(79,124,255,.25), transparent 60%), #120e24; border: 1px solid rgba(240,70,156,.25); }
.hero-create h2 { font-family: var(--font-display); font-size: clamp(1.2rem, 2.4vw, 1.6rem); }
.hero-create p { color: #cfcbe6; margin-top: 6px; }

/* ---------- wizard ---------- */
.wizard-steps { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 22px; scrollbar-width: none; }
.wizard-steps::-webkit-scrollbar { display: none; }
.wstep { flex: 1 0 auto; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.03); color: var(--muted); font-size: 13.5px; font-weight: 700; white-space: nowrap; }
.wstep .n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; background: rgba(255,255,255,.08); flex: 0 0 auto; }
.wstep.is-done { color: var(--text); }
.wstep.is-done .n { background: rgba(52,211,153,.2); color: var(--green); }
.wstep.is-current { color: var(--text); border-color: rgba(240,70,156,.6); background: rgba(240,70,156,.1); }
.wstep.is-current .n { background: var(--grad); color: #fff; }
.wstep.is-locked { opacity: .45; pointer-events: none; }

.gen-panel { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 18px; border-radius: 16px; border: 1px solid var(--line-2); background: linear-gradient(135deg, rgba(139,92,246,.1), rgba(240,70,156,.06)); margin-bottom: 18px; }
.gen-panel .grow { flex: 1 1 260px; }
.gen-panel b { display: block; }
.gen-panel p { color: var(--muted); font-size: 14px; }
.job-state { display: none; align-items: center; gap: 10px; width: 100%; padding: 12px 14px; border-radius: 12px; background: rgba(5,4,11,.6); border: 1px solid var(--line); font-size: 14px; font-weight: 600; }
.job-state.is-visible { display: flex; }
.job-steps { display: flex; gap: 6px; align-items: center; color: var(--dim); font-size: 13px; }
.job-steps span.on { color: var(--text); }
.job-steps span.on.ok { color: var(--green); }
.job-steps span.on.bad { color: #fca5a5; }
.job-steps i { font-style: normal; color: var(--dim); }

.item-card { padding: 18px; border-radius: 16px; background: rgba(255,255,255,.035); border: 1px solid var(--line); }
.item-card + .item-card { margin-top: 12px; }
.item-card.is-approved { border-color: rgba(52,211,153,.35); }
.item-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.item-head .grow { flex: 1; min-width: 180px; }
.item-head input.title-input { font-weight: 700; font-size: 16px; }

/* ---------- scenes ---------- */
.scene-card { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; padding: 18px; border-radius: 18px; background: rgba(255,255,255,.035); border: 1px solid var(--line); }
.scene-card + .scene-card { margin-top: 14px; }
.scene-media { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: radial-gradient(circle at 30% 30%, rgba(139,92,246,.25), transparent 60%), #0d0b1a; border: 1px solid var(--line); display: grid; place-items: center; }
.scene-media img, .scene-media video { width: 100%; height: 100%; object-fit: cover; }
.scene-media .ph { color: var(--dim); font-size: 13px; font-weight: 600; text-align: center; padding: 10px; }
.scene-media .status { position: absolute; left: 8px; top: 8px; background: rgba(5,4,11,.75); }
.scene-num { font-family: var(--font-display); font-weight: 800; font-size: 14px; color: #ffb27d; }
.scene-title { font-size: 17px; font-weight: 700; }
.scene-desc { color: #cfcbe6; font-size: 14.5px; margin-top: 6px; }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 16px; margin-top: 12px; }
.kv div { min-width: 0; }
.kv dt { font-size: 12px; color: var(--dim); font-weight: 600; }
.kv dd { margin: 0; font-size: 13.5px; font-weight: 600; overflow-wrap: anywhere; }
.prompt-box { margin-top: 12px; padding: 12px; border-radius: 12px; background: rgba(5,4,11,.6); border: 1px solid var(--line); font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; color: #cfcbe6; white-space: pre-wrap; max-height: 140px; overflow: auto; }
.scene-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.scene-edit { margin-top: 14px; }
.scene-edit summary { cursor: pointer; font-weight: 700; font-size: 14px; color: var(--muted); }
.scene-edit[open] summary { margin-bottom: 14px; }
@media (max-width: 900px) { .scene-card { grid-template-columns: 1fr; } }

/* ---------- timeline ---------- */
.timeline { display: flex; flex-direction: column; gap: 10px; }
.clip { display: grid; grid-template-columns: 28px 160px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 10px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid var(--line); }
.clip.is-dragging { opacity: .4; }
.clip.drop-before { box-shadow: 0 -3px 0 var(--pink); }
.clip.drop-after { box-shadow: 0 3px 0 var(--pink); }
.clip-handle { cursor: grab; color: var(--dim); display: grid; place-items: center; height: 100%; }
.clip-media { aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #0d0b1a; }
.clip-media img, .clip-media video { width: 100%; height: 100%; object-fit: cover; }
.clip-info { min-width: 0; }
.clip-info input { font-weight: 700; }
.clip-info small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.clip-btns { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.timeline-bar { display: flex; height: 54px; gap: 3px; padding: 6px; border-radius: 14px; background: rgba(5,4,11,.7); border: 1px solid var(--line); margin-bottom: 18px; overflow: hidden; }
.timeline-bar span { flex: var(--d) 0 0; min-width: 6px; border-radius: 6px; overflow: hidden; background: #1b1533; }
.timeline-bar img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 760px) {
  .clip { grid-template-columns: 24px 110px minmax(0, 1fr); }
  .clip-btns { grid-column: 1 / -1; justify-content: flex-start; }
}

/* ---------- player modal ---------- */
.player { width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 14px; overflow: hidden; position: relative; }
.player video, .player img { width: 100%; height: 100%; object-fit: contain; background: #000; }
.player img.kb { object-fit: cover; animation: kenburns 8s ease-in-out infinite alternate; }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.12) translate(-2%, -2%); } }
.player-caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 20px; background: linear-gradient(0deg, rgba(0,0,0,.85), transparent); font-size: 15px; text-align: center; }
.modal-card.wide { width: min(1000px, 100%); }
.modal-pad { padding: 28px; }

/* ---------- pager ---------- */
.pager { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 16px; }
.pager a, .pager-cur { min-width: 36px; height: 36px; display: grid; place-items: center; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line); font-size: 14px; font-weight: 700; }
.pager a:hover { background: rgba(255,255,255,.06); }
.pager-cur { background: rgba(240,70,156,.15); border-color: rgba(240,70,156,.5); }
.pager-total { margin-left: 8px; color: var(--dim); font-size: 13px; }

/* ---------- charts ---------- */
.chart-box { position: relative; height: 280px; }
.bar-list { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 140px 1fr 80px; gap: 10px; align-items: center; font-size: 13.5px; }
.bar-row .bar { height: 10px; border-radius: 10px; background: rgba(255,255,255,.06); overflow: hidden; }
.bar-row .bar i { display: block; height: 100%; background: var(--grad); border-radius: 10px; }

/* ---------- plan cards (subscription page) ---------- */
.plan-current { border-color: rgba(52,211,153,.5) !important; }

/* ---------- auth ---------- */
.auth { min-height: 100vh; min-height: 100svh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
.auth-art { position: relative; overflow: hidden; isolation: isolate; }
.auth-art .wall-tilt { position: absolute; inset: -20% -10%; transform: rotate(-10deg); }
.auth-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(5,4,11,.2), var(--bg)), linear-gradient(0deg, rgba(5,4,11,.9), transparent 50%); }
.auth-quote { position: absolute; left: 40px; bottom: 40px; right: 40px; z-index: 1; font-family: var(--font-display); font-size: clamp(1.4rem, 2.6vw, 2.2rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.auth-panel { display: flex; flex-direction: column; justify-content: center; padding: calc(32px + env(safe-area-inset-top, 0px)) clamp(20px, 6vw, 80px) calc(32px + env(safe-area-inset-bottom, 0px)); }
.auth-box { width: 100%; max-width: 420px; margin: 0 auto; }
.auth-box .logo { margin-bottom: 36px; }
.auth-title { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.6rem, 3vw, 2.1rem); letter-spacing: -.02em; }
.auth-sub { color: var(--muted); margin: 8px 0 26px; }
.auth-form { display: grid; gap: 16px; }
.auth-alt { margin-top: 22px; color: var(--muted); font-size: 14.5px; text-align: center; }
.auth-alt a { color: var(--text); font-weight: 700; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--dim); font-size: 13px; margin: 6px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.btn-google { background: #fff; color: #1f1f1f; }
.btn-google:hover { background: #f1f1f1; }
.label-row { display: flex; justify-content: space-between; align-items: baseline; }
.label-row a { font-size: 13px; color: var(--muted); font-weight: 600; }
@media (max-width: 900px) { .auth { grid-template-columns: 1fr; } .auth-art { display: none; } }

/* ---------- responsive shell ---------- */
@media (max-width: 1000px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 60; width: min(290px, 86vw); height: 100%;
    transform: translateX(-102%); transition: transform .25s ease; box-shadow: 30px 0 80px rgba(0,0,0,.6);
  }
  .sidebar.is-open { transform: none; }
  .drawer-btn { display: grid; }
  .scrim { position: fixed; inset: 0; z-index: 55; background: rgba(0,0,0,.55); display: none; }
  .scrim.is-open { display: block; }
  .credit-pill span.lbl { display: none; }
}
@media (max-width: 520px) { .topbar-title { font-size: 15px; } .hide-sm { display: none !important; } }

/* ---------- utilities ---------- */
.mt-0 { margin-top: 0 !important; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-2 { margin-bottom: 16px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.text-right { text-align: right; }
.nowrap { white-space: nowrap; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; }
.hidden { display: none !important; }
.gradient-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.toast.ok { border-color: rgba(52,211,153,.5); }
.toast.bad { border-color: rgba(248,113,113,.5); }
.toast.warn { border-color: rgba(255,138,61,.5); }

/* =========================================================
   v1.1 – language switch, verification code, checkout, payment review
   ========================================================= */
.lang-switch--sm a { min-width: 30px; height: 28px; padding: 0 7px; font-size: 11.5px; }
@media (max-width: 520px) { .topbar .lang-switch--sm { display: none; } }
.auth-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 36px; }
.auth-top .logo { margin-bottom: 0; }

.code-input { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 28px !important; letter-spacing: .5em; text-align: center; height: 64px !important; padding-left: .5em !important; }
.link-btn { background: none; border: 0; padding: 0; color: var(--text); font: inherit; font-weight: 700; text-decoration: underline; text-decoration-color: var(--pink); text-underline-offset: 3px; cursor: pointer; }
.verify-more { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 14px; }
.verify-more summary { cursor: pointer; color: var(--muted); font-size: 14px; font-weight: 600; }

.side-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--pink); color: #fff; font-size: 11.5px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }

.checkout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 860px) { .checkout { grid-template-columns: 1fr; } }
.checkout-summary { position: sticky; top: 84px; }
@media (max-width: 860px) { .checkout-summary { position: static; } }
.checkout-item { font-family: var(--font-display); font-size: 1.35rem; margin-top: 6px; }
.checkout-price { font-family: var(--font-display); font-weight: 800; font-size: 2.2rem; letter-spacing: -.02em; margin-top: 12px; }
.checkout-price .per { font-family: var(--font-body); font-size: 14px; color: var(--muted); font-weight: 600; margin-left: 4px; }
.pay-methods { display: grid; gap: 12px; }
.pay-method { display: block; margin: 0; }
.pay-method > button, a.pay-method { width: 100%; display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: var(--radius); border: 1px solid var(--line-2); background: rgba(255,255,255,.04); color: var(--text); text-align: left; font: inherit; cursor: pointer; transition: border-color .2s, background-color .2s, transform .2s; }
.pay-method > button:hover, a.pay-method:hover { border-color: rgba(240,70,156,.6); background: rgba(240,70,156,.06); transform: translateY(-1px); }
.pm-logo { width: 46px; height: 46px; flex: 0 0 46px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 22px; color: #fff; }
.pm-logo .icon { width: 24px; height: 24px; }
.pm-card { background: linear-gradient(135deg, #635bff, #8b5cf6); }
.pm-paypal { background: linear-gradient(135deg, #003087, #009cde); font-style: italic; }
.pm-usdt { background: linear-gradient(135deg, #26a17b, #1a7f60); }
.pm-btc { background: linear-gradient(135deg, #f7931a, #e2761b); }
.pm-text { display: grid; gap: 3px; flex: 1; min-width: 0; }
.pm-text b { font-size: 16px; }
.pm-text small { color: var(--muted); font-size: 13.5px; }
.pm-go { font-size: 20px; color: var(--muted); }
.pay-accepted { margin-top: -6px; }
.btn.is-disabled { pointer-events: none; opacity: .5; }

.crypto-steps { margin: 16px 0 0; padding-left: 22px; display: grid; gap: 18px; }
.crypto-steps > li { padding-left: 4px; line-height: 1.6; }
.crypto-steps > li::marker { color: var(--pink); font-weight: 800; }
.crypto-steps .amount { color: #ffb27d; font-size: 1.05em; }
.wallet-box { display: flex; align-items: center; gap: 16px; margin-top: 12px; padding: 14px; border-radius: var(--radius); border: 1px dashed var(--line-2); background: rgba(255,255,255,.03); flex-wrap: wrap; }
.wallet-qr { padding: 8px; background: #fff; border-radius: 10px; line-height: 0; }
.wallet-qr img, .wallet-qr canvas { display: block; }
.wallet-addr { display: grid; gap: 10px; flex: 1; min-width: 200px; }
.wallet-addr .mono { word-break: break-all; font-size: 14.5px; color: var(--text); }
.wallet-addr .btn { justify-self: start; }
.checkout-done { max-width: 640px; margin: 20px auto 0; text-align: center; padding: 34px 28px; }
.checkout-done .kv { text-align: left; }
.checkout-done .form-actions { justify-content: center; }
.done-icon { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 14px; display: flex; align-items: center; justify-content: center; background: rgba(240,70,156,.12); color: var(--pink); }
.done-icon .icon { width: 30px; height: 30px; }

.review-list { display: grid; gap: 14px; }
.review-item { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 760px) { .review-item { grid-template-columns: 1fr; } }
.review-shot { display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--line-2); background: var(--bg-3); }
.review-shot img { width: 100%; max-height: 300px; object-fit: contain; display: block; }
.review-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 14px; }
.table .bar { display: block; height: 8px; border-radius: 8px; background: rgba(255,255,255,.06); overflow: hidden; margin-bottom: 4px; }
.table .bar i { display: block; height: 100%; background: var(--grad); }
[hidden] { display: none !important; }
