/* 3DRedbox Dubbing - monochrome, editorial, three-dimensional */
:root {
  --bg: #f7f7f6;
  --surface: #ffffff;
  --surface2: #f2f2f0;
  --ink: #0b0b0b;
  --ink2: #3a3a3a;
  --muted: #7a7a76;
  --line: #e2e2df;
  --line2: #c9c9c4;
  --line3: #0b0b0b;
  --ok: #1a1a1a;
  --radius: 4px;
  --sans: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --display: "Space Grotesk", "Inter", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, Menlo, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 14px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { margin: 0; font-family: var(--display); letter-spacing: -.02em; font-weight: 500; }
a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line2); text-underline-offset: 3px; }
.nav a, .brand, .btn, .tool, .job-row, .outputs a, a.link, a.backlink { text-decoration: none; }
a.link { color: var(--ink); font-size: 12.5px; display: inline-flex; align-items: center; gap: 4px; border-bottom: 1px solid var(--ink); padding-bottom: 1px; }
a.link:hover { color: var(--muted); border-color: var(--muted); }
code { font-family: var(--mono); font-size: 12px; background: var(--surface2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 3px; }
.ic { flex-shrink: 0; vertical-align: middle; stroke-width: 1.5; }
.ic.muted { color: var(--muted); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.ok { color: var(--ink); } .warn { color: var(--ink2); } .err { color: var(--ink); }
::selection { background: var(--ink); color: #fff; }

/* ---------- motion */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes spin3d { from { transform: rotateX(-24deg) rotateY(0deg); } to { transform: rotateX(-24deg) rotateY(360deg); } }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes gridmove { from { background-position: 0 0; } to { background-position: 0 48px; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { from { background-position: -200% 0; } to { background-position: 200% 0; } }
.main > * { animation: rise .55s var(--ease) both; }
.main > *:nth-child(2) { animation-delay: .05s; } .main > *:nth-child(3) { animation-delay: .1s; }
.main > *:nth-child(4) { animation-delay: .15s; } .main > *:nth-child(5) { animation-delay: .2s; } .main > *:nth-child(6) { animation-delay: .25s; }
.two > *, .tools > *, .plans > *, .grid > * { animation: rise .6s var(--ease) both; }
.two > *:nth-child(2), .tools > *:nth-child(2), .plans > *:nth-child(2), .grid > *:nth-child(2) { animation-delay: .06s; }
.tools > *:nth-child(3), .plans > *:nth-child(3), .grid > *:nth-child(3) { animation-delay: .12s; }
.tools > *:nth-child(4), .plans > *:nth-child(4), .grid > *:nth-child(4) { animation-delay: .18s; }
.tools > *:nth-child(5), .plans > *:nth-child(5) { animation-delay: .24s; } .tools > *:nth-child(6) { animation-delay: .3s; }
.tools > *:nth-child(7) { animation-delay: .36s; } .tools > *:nth-child(8) { animation-delay: .42s; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- 3D scene (pure CSS) */
.scene { perspective: 900px; width: 200px; height: 200px; display: flex; align-items: center; justify-content: center; position: relative; }
.scene.lg { width: 320px; height: 320px; }
.cube { position: relative; width: 120px; height: 120px; transform-style: preserve-3d; animation: spin3d 22s linear infinite; }
.scene.lg .cube { width: 190px; height: 190px; }
.cube i { position: absolute; inset: 0; border: 1px solid currentColor; background: rgba(255,255,255,.03); backface-visibility: visible; }
.cube i:nth-child(1) { transform: translateZ(60px); }
.cube i:nth-child(2) { transform: rotateY(180deg) translateZ(60px); }
.cube i:nth-child(3) { transform: rotateY(90deg) translateZ(60px); }
.cube i:nth-child(4) { transform: rotateY(-90deg) translateZ(60px); }
.cube i:nth-child(5) { transform: rotateX(90deg) translateZ(60px); }
.cube i:nth-child(6) { transform: rotateX(-90deg) translateZ(60px); }
.scene.lg .cube i:nth-child(1) { transform: translateZ(95px); } .scene.lg .cube i:nth-child(2) { transform: rotateY(180deg) translateZ(95px); }
.scene.lg .cube i:nth-child(3) { transform: rotateY(90deg) translateZ(95px); } .scene.lg .cube i:nth-child(4) { transform: rotateY(-90deg) translateZ(95px); }
.scene.lg .cube i:nth-child(5) { transform: rotateX(90deg) translateZ(95px); } .scene.lg .cube i:nth-child(6) { transform: rotateX(-90deg) translateZ(95px); }
.cube i::after { content: ""; position: absolute; inset: 14%; border: 1px solid currentColor; opacity: .35; }
.cube i:nth-child(1)::after { inset: 0; border: 0; background: currentColor; opacity: .06; }
.scene .floor { position: absolute; inset: auto 0 6% 0; height: 1px; background: currentColor; opacity: .25; }
.scene .shadow { position: absolute; bottom: 4%; left: 50%; width: 60%; height: 14px; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(ellipse, rgba(0,0,0,.28), transparent 70%); animation: floaty 6s ease-in-out infinite; }
.scene.on-dark { color: #fff; }
.scene.on-dark .shadow { background: radial-gradient(ellipse, rgba(255,255,255,.28), transparent 70%); }
.scene.on-light { color: var(--ink); }
.isogrid { background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 48px 48px; }
.isogrid.dark { background-image: linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px); }

/* ---------- forms */
button, input, select, textarea { font-family: inherit; font-size: 14px; color: var(--ink); }
input, select, textarea { background: var(--surface); border: 1px solid var(--line2); border-radius: var(--radius); padding: 9px 12px; width: 100%; outline: none; transition: border-color .2s, box-shadow .2s; }
input:hover, select:hover, textarea:hover { border-color: var(--ink2); }
input:focus, select:focus, textarea:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(11,11,11,.08); }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%230b0b0b' stroke-width='1.5' 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 10px center; padding-right: 34px; }
textarea { min-height: 76px; resize: vertical; }
input[type=range] { padding: 0; height: 22px; accent-color: var(--ink); border: 0; box-shadow: none; }
label { display: block; color: var(--ink2); font-size: 11.5px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 6px; }
label b { color: var(--ink); text-transform: none; letter-spacing: 0; }
label .muted { text-transform: none; letter-spacing: 0; font-weight: 400; }
.field { margin-bottom: 14px; }
.hint { color: var(--muted); font-size: 12.5px; margin-top: 6px; line-height: 1.5; }
label.chk { display: flex; align-items: center; gap: 10px; cursor: pointer; margin: 10px 0; color: var(--ink); font-weight: 400; font-size: 13.5px; text-transform: none; letter-spacing: 0; }
label.chk input[type=checkbox] { appearance: none; width: 34px; height: 18px; border-radius: 999px; background: transparent; border: 1px solid var(--line2); position: relative; cursor: pointer; flex-shrink: 0; transition: background .2s, border-color .2s; padding: 0; margin: 0; box-shadow: none; }
label.chk input[type=checkbox]::after { content: ""; position: absolute; top: 3px; left: 3px; width: 10px; height: 10px; border-radius: 50%; background: var(--ink2); transition: left .2s var(--ease), background .2s; }
label.chk input[type=checkbox]:checked { background: var(--ink); border-color: var(--ink); }
label.chk input[type=checkbox]:checked::after { left: 19px; background: #fff; }
label.chk input[type=checkbox]:disabled { opacity: .4; cursor: not-allowed; }

/* ---------- buttons */
.btn { background: var(--surface); border: 1px solid var(--line2); border-radius: var(--radius); padding: 9px 14px; cursor: pointer; font-weight: 500; display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; color: var(--ink); transition: background .2s, border-color .2s, transform .15s var(--ease), color .2s; }
.btn:hover { border-color: var(--ink); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.primary:hover { background: #262626; }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--ink); }
.btn.danger:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn.small { padding: 5px 10px; font-size: 12.5px; gap: 6px; }
.btn.small .ic { width: 14px; height: 14px; }
.btn.block { width: 100%; }
.btn.big { padding: 12px 20px; font-size: 14px; }
.btn.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.iconbtn { background: transparent; border: 0; cursor: pointer; color: var(--muted); padding: 6px; border-radius: var(--radius); display: inline-flex; transition: color .2s, background .2s; }
.iconbtn:hover { background: var(--surface2); color: var(--ink); }
.tabs { display: flex; gap: 0; flex-wrap: wrap; border: 1px solid var(--line2); border-radius: var(--radius); width: max-content; overflow: hidden; }
.tabs .btn { border: 0; border-radius: 0; border-right: 1px solid var(--line2); transform: none; }
.tabs .btn:last-child { border-right: 0; }

/* ---------- layout */
.app { display: flex; min-height: 100vh; }
.sidebar { width: 248px; background: var(--surface); border-right: 1px solid var(--line); padding: 22px 16px 16px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; flex-shrink: 0; align-self: flex-start; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 12px; padding: 2px 6px 22px; color: var(--ink); }
.brand b { font-family: var(--display); font-size: 14px; font-weight: 600; display: block; line-height: 1.15; letter-spacing: -.01em; }
.brand small { color: var(--muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.brand.light { color: #fff; padding: 0; }
.brand.light small { color: rgba(255,255,255,.55); }
.logo { transition: transform .6s var(--ease); }
.brand:hover .logo { transform: rotate(-12deg); }
.nav { flex: 1; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius); color: var(--ink2); margin: 1px 0; font-size: 13.5px; position: relative; transition: color .2s, background .2s, padding-left .25s var(--ease); }
.nav a .ic { color: var(--muted); transition: color .2s; }
.nav a:hover { color: var(--ink); padding-left: 14px; }
.nav a:hover .ic { color: var(--ink); }
.nav a.active { color: var(--ink); background: var(--surface2); font-weight: 500; }
.nav a.active .ic { color: var(--ink); }
.nav a.active::before { content: ""; position: absolute; left: -16px; top: 9px; bottom: 9px; width: 2px; background: var(--ink); }
.nav .sec { color: var(--muted); font-size: 10.5px; font-weight: 500; text-transform: uppercase; letter-spacing: .14em; padding: 18px 10px 6px; }
.side-foot { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 10px; }
.credit-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin-bottom: 10px; background: var(--surface); }
.credit-box small { color: var(--muted); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.credit-box .amount { font-family: var(--display); font-size: 24px; font-weight: 500; letter-spacing: -.03em; margin: 2px 0; font-variant-numeric: tabular-nums; }
.credit-box .bar { height: 3px; }
.plan-row { margin-bottom: 6px; }
.plan-pill { display: inline-block; font-size: 10.5px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--ink); border: 1px solid var(--ink); border-radius: 999px; padding: 2px 8px; }
.me { display: flex; align-items: center; gap: 10px; padding: 4px 4px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 500; font-size: 13px; flex-shrink: 0; }
.who { flex: 1; min-width: 0; }
.who b { display: block; font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who small { display: block; color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.main { flex: 1; padding: 34px 44px 72px; min-width: 0; max-width: 1480px; overflow-x: hidden; }
.topbar { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 26px; gap: 12px; flex-wrap: wrap; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.topbar h1 { font-size: 30px; font-weight: 500; letter-spacing: -.03em; }
.topbar .sub { color: var(--muted); margin: 6px 0 0; font-size: 14px; max-width: 760px; }
.section-title { font-family: var(--sans); font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .16em; color: var(--muted); margin: 30px 0 14px; display: flex; align-items: center; gap: 12px; }
.section-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- hero */
.hero { display: grid; grid-template-columns: 1.3fr .9fr; gap: 28px; background: var(--ink); color: #fff; border-radius: 6px; padding: 40px 44px; position: relative; overflow: hidden; min-height: 300px; }
.hero::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px); background-size: 48px 48px; animation: gridmove 6s linear infinite; pointer-events: none; }
.hero > * { position: relative; }
.hero .eyebrow { font-size: 11px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: rgba(255,255,255,.55); margin-bottom: 14px; }
.hero h2 { font-size: 34px; font-weight: 400; line-height: 1.15; max-width: 560px; letter-spacing: -.03em; }
.hero p { color: rgba(255,255,255,.65); max-width: 520px; margin: 14px 0 24px; font-size: 14.5px; }
.hero .btn { border-color: rgba(255,255,255,.35); color: #fff; background: transparent; }
.hero .btn:hover { border-color: #fff; }
.hero .btn.primary { background: #fff; color: var(--ink); border-color: #fff; }
.hero .btn.primary:hover { background: #e8e8e6; }
.hero-side { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.14); align-self: center; }
.kpi { background: var(--ink); padding: 16px 18px; }
.kpi span { display: block; color: rgba(255,255,255,.5); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 6px; }
.kpi b { font-family: var(--display); font-size: 24px; font-weight: 400; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.kpi b.warn { color: rgba(255,255,255,.7); font-size: 17px; }
.hero .scene { position: absolute; right: 36px; top: 50%; transform: translateY(-50%); opacity: .9; }
.hero.with-scene { grid-template-columns: 1.1fr .9fr; }
.hero.with-scene .hero-side { margin-right: 220px; }

/* ---------- tools grid */
.tools { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.tool { background: var(--surface); padding: 22px 22px 24px; color: var(--ink); display: flex; flex-direction: column; gap: 6px; position: relative; transition: background .25s; min-height: 170px; }
.tool::after { content: ""; position: absolute; left: 22px; right: 22px; bottom: 0; height: 1px; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.tool:hover { background: var(--surface2); }
.tool:hover::after { transform: scaleX(1); }
.tool-ico { width: 38px; height: 38px; border: 1px solid var(--line2); border-radius: 50%; color: var(--ink); display: flex; align-items: center; justify-content: center; margin-bottom: 10px; transition: transform .35s var(--ease), border-color .2s; }
.tool:hover .tool-ico { transform: rotate(-8deg) scale(1.05); border-color: var(--ink); }
.tool-ico .ic { width: 18px; height: 18px; }
.tool .num { position: absolute; top: 18px; right: 20px; font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: .08em; }
.tool b { font-family: var(--display); font-size: 15px; font-weight: 500; }
.tool span { color: var(--muted); font-size: 12.5px; line-height: 1.45; }

/* ---------- cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 16px; transition: border-color .25s; }
.card:hover { border-color: var(--line2); }
.card h3 { font-size: 14px; font-weight: 500; margin: 0 0 14px; display: flex; align-items: center; gap: 10px; color: var(--ink); letter-spacing: -.01em; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.card-head h3 { margin: 0; }
.step { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--ink); color: var(--ink); font-family: var(--mono); font-size: 11px; display: inline-flex; align-items: center; justify-content: center; }
.grid { display: grid; gap: 14px; }
.grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.two { display: grid; grid-template-columns: 1.15fr .85fr; gap: 18px; align-items: start; }
.two > *, .grid > * { min-width: 0; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row > * { flex: 1; }
.row > .btn, .row > .fixed { flex: 0 0 auto; }
.divider { border-top: 1px solid var(--line); margin: 16px 0; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; position: relative; overflow: hidden; }
.stat::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--ink); transform: scaleY(0); transform-origin: top; transition: transform .35s var(--ease); }
.stat:hover::before { transform: scaleY(1); }
.stat b { display: block; font-family: var(--display); font-size: 26px; font-weight: 400; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 7px 18px; font-size: 13px; }
.kv span { color: var(--muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; padding-top: 2px; }
.checks { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 7px; }
.checks li { padding-left: 22px; position: relative; font-size: 13.5px; color: var(--ink2); }
.checks li::before { content: ""; position: absolute; left: 0; top: 7px; width: 10px; height: 5px; border-left: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); transform: rotate(-45deg); }
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--ink); background: var(--surface); margin: 14px 0; font-size: 13.5px; color: var(--ink); }
.alert.warn { border-style: dashed; }
.alert.err { background: var(--ink); color: #fff; }
.alert.err a { color: #fff; }
.alert .ic { margin-top: 2px; }

/* ---------- timeline */
.timeline { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.timeline li { position: relative; padding: 0 0 18px 40px; counter-increment: s; }
.timeline li::before { content: "0" counter(s); position: absolute; left: 0; top: 2px; font-family: var(--mono); font-size: 11px; color: var(--ink); letter-spacing: .06em; }
.timeline li:not(:last-child)::after { content: ""; position: absolute; left: 4px; top: 22px; bottom: 4px; width: 1px; background: var(--line2); }
.timeline b { display: block; font-size: 13.5px; font-weight: 500; }
.timeline span { color: var(--muted); font-size: 12.5px; }

/* ---------- badges / status */
.badge { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; font-size: 10.5px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; border: 1px solid var(--line2); color: var(--ink2); background: var(--surface); }
.badge.running { border-color: var(--ink); color: var(--ink); }
.badge.waiting { border-style: dashed; border-color: var(--ink); color: var(--ink); }
.badge.done { background: var(--ink); border-color: var(--ink); color: #fff; }
.badge.failed, .badge.cancelled { color: var(--muted); text-decoration: line-through; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line2); flex-shrink: 0; }
.dot.running { background: var(--ink); box-shadow: 0 0 0 3px rgba(11,11,11,.12); animation: floaty 1.6s ease-in-out infinite; }
.dot.waiting { background: transparent; border: 1px solid var(--ink); } .dot.done { background: var(--ink); } .dot.failed, .dot.cancelled { background: var(--line2); }
.bar { height: 4px; background: var(--surface2); border-radius: 0; overflow: hidden; position: relative; }
.bar > i { display: block; height: 100%; background: var(--ink); width: 0; transition: width .5s var(--ease); }
.bar.blue > i, .bar.green > i { background: var(--ink); }
.bar.live > i { background-image: linear-gradient(90deg, var(--ink) 0%, #555 50%, var(--ink) 100%); background-size: 200% 100%; animation: shimmer 1.6s linear infinite; }

/* ---------- job rows */
.jobs { display: flex; flex-direction: column; }
.job-row { display: flex; align-items: center; gap: 14px; padding: 13px 8px; border-bottom: 1px solid var(--line); color: var(--ink); transition: padding-left .25s var(--ease), background .2s; }
.job-row:last-child { border-bottom: 0; }
.job-row:hover { padding-left: 14px; background: var(--surface2); }
.jr-main { flex: 1; min-width: 0; }
.jr-main .t { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; }
.jr-main .m { color: var(--muted); font-size: 12px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jr-main .bar { margin-top: 8px; max-width: 320px; }
.jr-side { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.jr-side small { color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; font-family: var(--mono); }
.job-msg { margin: 12px 0 6px; color: var(--ink2); font-size: 13.5px; }
.backlink { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 13px; }
.backlink:hover { color: var(--ink); }
.empty { text-align: center; color: var(--muted); padding: 36px 10px; }
.empty .ic { width: 28px; height: 28px; color: var(--line2); }
.empty p { margin: 8px 0 0; }

/* ---------- uploader */
.drop { border: 1px dashed var(--line2); border-radius: var(--radius); padding: 30px 20px; text-align: center; color: var(--muted); cursor: pointer; background: var(--surface); transition: border-color .2s, background .2s; position: relative; }
.drop:hover, .drop.over { border-color: var(--ink); background: var(--surface2); }
.drop b { color: var(--ink); display: block; font-size: 14px; font-weight: 500; margin-bottom: 4px; }
.drop .ic { width: 24px; height: 24px; margin-bottom: 8px; transition: transform .3s var(--ease); }
.drop:hover .ic { transform: translateY(-3px); }
.files { margin-top: 10px; }
.file { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 6px; background: var(--surface); animation: rise .35s var(--ease) both; }
.file .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.file .meta { color: var(--muted); font-size: 12px; white-space: nowrap; font-family: var(--mono); }
.file .x { cursor: pointer; color: var(--muted); display: inline-flex; padding: 2px; border-radius: 3px; }
.file .x:hover { color: var(--ink); background: var(--surface2); }
.file .x .ic { width: 15px; height: 15px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 6px 12px; border: 1px solid var(--line2); border-radius: 999px; cursor: pointer; font-size: 13px; background: var(--surface); user-select: none; transition: .15s; }
.chip:hover { border-color: var(--ink); }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.preview-box { position: relative; width: 100%; aspect-ratio: 16/9; background: var(--ink); border-radius: var(--radius); overflow: hidden; }
.preview-box img { position: absolute; }
.preview-box .empty { color: rgba(255,255,255,.5); }
.voice-grid { grid-template-columns: 1.4fr 1fr; }
.voice-grid .row > select { min-width: 0; }

/* ---------- tables */
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-size: 10.5px; font-weight: 500; text-transform: uppercase; letter-spacing: .12em; white-space: nowrap; border-bottom-color: var(--line2); }
tr:hover td { background: var(--surface2); }
td input, td textarea { padding: 6px 8px; font-size: 13px; }
td textarea { min-height: 46px; }

/* ---------- outputs / media */
.outputs a.out { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 8px; background: var(--surface); color: var(--ink); transition: .2s; }
.outputs a.out:hover { border-color: var(--ink); padding-left: 16px; }
.outputs .k { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line2); display: flex; align-items: center; justify-content: center; color: var(--ink); flex-shrink: 0; }
video, audio { width: 100%; border-radius: var(--radius); background: #000; display: block; }
.log { background: var(--ink); color: #d7d7d3; border-radius: var(--radius); padding: 14px 16px; font-family: var(--mono); font-size: 12px; max-height: 380px; overflow: auto; white-space: pre-wrap; line-height: 1.6; }

/* ---------- auth */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-side { background: var(--ink); color: #fff; padding: 44px 52px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-side::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px); background-size: 48px 48px; animation: gridmove 8s linear infinite; pointer-events: none; }
.auth-side > * { position: relative; }
.auth-side .scene { margin: 26px 0 30px; }
.auth-hero h2 { font-size: 40px; font-weight: 400; line-height: 1.1; max-width: 520px; letter-spacing: -.035em; }
.auth-hero p { color: rgba(255,255,255,.65); max-width: 500px; font-size: 15px; margin: 16px 0 30px; }
.feat { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; max-width: 520px; }
.feat li { display: flex; gap: 14px; align-items: flex-start; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.14); }
.feat .ic { width: 18px; height: 18px; color: rgba(255,255,255,.7); margin-top: 2px; }
.feat b { display: block; font-size: 13.5px; font-weight: 500; }
.feat span { color: rgba(255,255,255,.55); font-size: 12.5px; }
.auth-foot { color: rgba(255,255,255,.4); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: var(--bg); }
.auth-card { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 36px 38px; animation: rise .6s var(--ease) both; }
.auth-card h2 { font-size: 26px; font-weight: 400; letter-spacing: -.03em; }
.auth-card p { margin: 6px 0 24px; }
.auth-switch { text-align: center; margin-top: 18px; color: var(--muted); font-size: 13px; }

/* ---------- plans / invoices */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.plans.p5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.plan { background: var(--surface); padding: 26px 22px; position: relative; display: flex; flex-direction: column; transition: background .25s; }
.plan:hover { background: var(--surface2); }
.plan.hl { background: var(--ink); color: #fff; }
.plan.hl:hover { background: #151515; }
.plan.hl .muted, .plan.hl .plan-tag, .plan.hl .checks li { color: rgba(255,255,255,.65); }
.plan.hl .checks li::before { border-color: #fff; }
.plan.hl .btn { background: #fff; color: var(--ink); border-color: #fff; }
.plan.hl .btn:disabled { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.plan.cur { background: var(--surface2); }
.plan.hl.cur { background: var(--ink); }
.plan.hl.cur:hover { background: #151515; }
.plan .ribbon { position: absolute; top: 14px; right: 16px; font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: inherit; opacity: .7; }
.plan-name { font-family: var(--display); font-size: 17px; font-weight: 500; }
.plan-tag { color: var(--muted); font-size: 12.5px; margin-bottom: 18px; min-height: 18px; }
.plan-price { font-family: var(--display); font-size: 36px; font-weight: 400; letter-spacing: -.04em; line-height: 1; margin-bottom: 8px; }
.plan-price small { font-family: var(--sans); font-size: 11px; font-weight: 400; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.plan.hl .plan-price small { color: rgba(255,255,255,.6); }
.plan-credit { font-weight: 500; margin-bottom: 4px; font-size: 13px; }
.plan .bonus { border: 1px solid currentColor; font-size: 10px; letter-spacing: .06em; padding: 1px 6px; border-radius: 999px; margin-left: 4px; }
.plan .btn { margin: 8px 0 16px; }
.plan .checks { margin: 0; flex: 1; }
.invoice { max-width: 860px; padding: 36px 40px; }
.inv-head { display: flex; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--ink); padding-bottom: 20px; margin-bottom: 20px; }
.inv-head > div:first-child { display: flex; gap: 14px; align-items: flex-start; }
.inv-seller { font-size: 13px; color: var(--ink2); line-height: 1.5; }
.inv-seller b { display: block; color: var(--ink); font-size: 15px; }
.inv-meta { text-align: right; }
.inv-meta h2 { font-size: 22px; letter-spacing: .2em; color: var(--muted); margin-bottom: 8px; font-weight: 400; }
.inv-meta .kv { grid-template-columns: auto auto; justify-content: end; text-align: left; }
.inv-billto { margin-bottom: 20px; font-size: 13.5px; line-height: 1.55; }
.inv-billto small { display: block; color: var(--muted); font-size: 10.5px; letter-spacing: .14em; margin-bottom: 4px; }
.inv-billto b { display: block; font-size: 15px; }
.inv-table { margin-bottom: 20px; }
.inv-table td { padding: 12px; }
.inv-table tr.total td { border-top: 1px solid var(--ink); border-bottom: 0; font-size: 15px; }
.inv-pay { border: 1px dashed var(--line2); border-radius: var(--radius); padding: 14px 16px; font-size: 13.5px; line-height: 1.6; }
#calc-amt { flex: 1; }

/* ---------- misc */
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 50; display: flex; flex-direction: column; gap: 8px; }
.toast div { background: var(--ink); color: #fff; padding: 11px 16px; border-radius: var(--radius); max-width: 380px; font-size: 13.5px; animation: rise .35s var(--ease) both; }
.toast div.err { border-left: 3px solid #fff; }
.toast div.ok { border-left: 3px solid rgba(255,255,255,.5); }
.spin { display: inline-block; width: 14px; height: 14px; border: 1.5px solid var(--line2); border-top-color: var(--ink); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: middle; }

@media (max-width: 1400px) { .plans.p5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1180px) {
  .two { grid-template-columns: 1fr; } .hero, .hero.with-scene { grid-template-columns: 1fr; } .hero .scene { display: none; } .hero.with-scene .hero-side { margin-right: 0; }
  .tools { grid-template-columns: repeat(2, 1fr); } .grid.c3, .grid.c4 { grid-template-columns: repeat(2, 1fr); } .plans { grid-template-columns: 1fr; } .voice-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) { .plans.p5 { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .app { flex-direction: column; } .sidebar { width: 100%; height: auto; position: relative; }
  .main { padding: 18px; } .auth { grid-template-columns: 1fr; } .auth-side { display: none; }
  .grid.c2, .grid.c3, .grid.c4, .tools { grid-template-columns: 1fr; }
}
@media print {
  .sidebar, .topbar, .toast, .row .btn, .row .badge { display: none !important; }
  .main { padding: 0; max-width: none; } .card { border: 0; } body { background: #fff; }
  .main > *, .two > *, .grid > * { animation: none !important; }
}

.plans.p6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.plans.p6 .plan { padding: 22px 16px; }
.plans.p6 .plan-price { font-size: 30px; }
@media (max-width: 1500px) { .plans.p6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) { .plans.p6 { grid-template-columns: 1fr; } }

.pay-card .row .btn { min-width: 180px; }
