:root {
  --bg: #050505;
  --bg-2: #0b0b0b;
  --card: #0e0e0e;
  --card-2: #141414;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --text: #f5f5f5;
  --muted: #8a8a8a;
  --muted-2: #5c5c5c;
  --white: #ffffff;
  --radius: 22px;
  --radius-sm: 12px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --font: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
[hidden] { display: none !important; }
button, input { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
.mono { font-variant-numeric: tabular-nums; letter-spacing: 0.01em; }
::selection { background: #fff; color: #000; }

.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Brand ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: 0.22em; font-size: 15px; }
.brand-mark { width: 30px; height: 30px; color: #fff; }
.brand-mark.sm { width: 16px; height: 16px; vertical-align: -3px; margin-right: 6px; }
.pill { font-size: 11px; text-transform: uppercase; letter-spacing: 0.14em; border: 1px solid var(--line-2); border-radius: 99px; padding: 4px 10px; color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border: 1px solid transparent; border-radius: 99px; padding: 10px 18px; cursor: pointer;
  font-weight: 600; font-size: 14px; white-space: nowrap; background: none;
  transition: transform 0.2s var(--ease), background 0.2s, border-color 0.2s, opacity 0.2s, box-shadow 0.3s;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.35; cursor: not-allowed; }
.btn-primary { background: #fff; color: #000; box-shadow: 0 0 0 0 rgba(255,255,255,0); }
.btn-primary:hover:not(:disabled) { box-shadow: 0 10px 40px -10px rgba(255,255,255,0.45); }
.btn-ghost { border-color: var(--line-2); color: var(--text); }
.btn-ghost:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.25); }
.btn-ghost.active { background: #fff; color: #000; border-color: #fff; }
.btn-link { padding: 0; color: var(--muted); font-weight: 500; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--line-2); }
.btn-link:hover { color: #fff; }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-xl { padding: 16px 28px; font-size: 16px; }

/* ---------- Login ---------- */
.login { min-height: 100vh; display: flex; flex-direction: column; position: relative; overflow: hidden; padding: 28px clamp(20px, 5vw, 64px); }
.login-glow {
  position: absolute; width: 1100px; height: 1100px; left: 50%; top: -620px; transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(255,255,255,0.13), rgba(255,255,255,0.03) 55%, transparent 70%);
  pointer-events: none; animation: breathe 9s ease-in-out infinite;
}
@keyframes breathe { 50% { opacity: 0.65; transform: translateX(-50%) scale(1.05); } }
.login-top { display: flex; align-items: center; justify-content: space-between; position: relative; }
.login-center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 60px 0 40px; position: relative; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); border: 1px solid var(--line); border-radius: 99px; padding: 7px 14px; background: rgba(255,255,255,0.02); backdrop-filter: blur(8px); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: #fff; box-shadow: 0 0 12px #fff; animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: 0.3; } }
.hero { font-size: clamp(44px, 8vw, 104px); line-height: 0.95; letter-spacing: -0.045em; font-weight: 700; margin: 28px 0 22px; }
.hero-dim { background: linear-gradient(180deg, #fff 0%, #555 120%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { max-width: 560px; color: var(--muted); font-size: 17px; margin: 0 0 36px; }
.login-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.login-hint { color: var(--muted-2); font-size: 13px; margin-top: 18px; }
.login-error { color: #fff; background: rgba(255,255,255,0.06); border: 1px solid var(--line-2); padding: 10px 16px; border-radius: 12px; font-size: 13px; }
.login-features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; position: relative; }
.feat { background: var(--bg); padding: 22px; display: flex; flex-direction: column; gap: 6px; }
.feat-n { font-size: 12px; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.feat b { font-weight: 600; }
.feat span:last-child { color: var(--muted); font-size: 13px; }

/* ---------- App shell ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  padding: 16px clamp(20px, 4vw, 48px); background: rgba(5,5,5,0.72); backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.user { display: flex; align-items: center; gap: 12px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line-2); }
.avatar-fallback { display: inline-grid; place-items: center; background: #fff; color: #000; font-weight: 700; font-size: 13px; }
.user-name { font-weight: 500; font-size: 14px; }
.workspace { max-width: 1120px; margin: 0 auto; padding: 48px clamp(16px, 4vw, 32px) 40px; display: flex; flex-direction: column; gap: 20px; }
.page-head h2 { font-size: clamp(32px, 4vw, 48px); letter-spacing: -0.035em; margin: 0; font-weight: 700; }
.page-head p { color: var(--muted); margin: 6px 0 12px; }
.foot { max-width: 1120px; margin: 0 auto; padding: 24px clamp(16px, 4vw, 32px) 48px; display: flex; justify-content: space-between; color: var(--muted-2); font-size: 13px; border-top: 1px solid var(--line); }

/* ---------- Cards ---------- */
.card {
  background: linear-gradient(180deg, var(--card) 0%, var(--bg-2) 100%);
  border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 3vw, 32px);
  position: relative; animation: rise 0.6s var(--ease) both;
}
.card::before { content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.10), transparent 40%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.workspace > .card:nth-of-type(2) { animation-delay: 0.05s; }
.workspace > .card:nth-of-type(3) { animation-delay: 0.1s; }
.workspace > .card:nth-of-type(4) { animation-delay: 0.15s; }
.card-head { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.card-head h3 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
.card-head p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.step { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 14px; border: 1px solid var(--line-2); font-weight: 600; font-size: 13px; font-variant-numeric: tabular-nums; color: var(--muted); background: rgba(255,255,255,0.02); }
.card.is-done .step { background: #fff; color: #000; border-color: #fff; }
.switch-head { margin-left: 0; }
.switch-label { margin-left: auto; font-size: 13px; color: var(--muted); }
.ad-body.off #adConfig { opacity: 0.45; }
.ad-hint { color: var(--muted-2); font-size: 12px; }
#adUploadBtn { align-self: flex-start; }

/* ---------- Dropzone ---------- */
.drop { display: block; position: relative; border: 1px dashed var(--line-2); border-radius: 18px; cursor: pointer; transition: border-color 0.2s, background 0.2s; overflow: hidden; }
.drop:hover, .drop.drag { border-color: rgba(255,255,255,0.45); background: rgba(255,255,255,0.025); }
.drop-inner { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 56px 20px; text-align: center; }
.drop-sm .drop-inner { padding: 34px 20px; }
.drop-inner b { font-weight: 600; font-size: 16px; }
.drop-inner span { color: var(--muted); font-size: 13px; }
.drop-icon { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; border: 1px solid var(--line-2); margin-bottom: 10px; background: rgba(255,255,255,0.03); transition: transform 0.3s var(--ease); }
.drop:hover .drop-icon { transform: translateY(-3px); }
.upload-progress { position: absolute; inset: 0; background: rgba(8,8,8,0.92); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.upload-progress .bar { width: min(360px, 70%); height: 4px; background: var(--line); border-radius: 4px; overflow: hidden; }
.upload-progress .bar i { display: block; height: 100%; width: 0; background: #fff; transition: width 0.2s; }
.upload-label { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- Media ---------- */
.media { display: grid; grid-template-columns: 1.6fr 1fr; gap: 24px; }
.player-wrap { border-radius: 16px; overflow: hidden; background: #000; border: 1px solid var(--line); aspect-ratio: 16/9; }
.player-wrap video { width: 100%; height: 100%; display: block; object-fit: contain; background: #000; }
.media-side { display: flex; flex-direction: column; gap: 20px; }
.meta { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.meta div { background: var(--card); padding: 12px 14px; }
.meta span { display: block; color: var(--muted); font-size: 12px; }
.meta b { font-weight: 600; font-variant-numeric: tabular-nums; word-break: break-all; }
.meta .wide { grid-column: span 2; }

/* ---------- Fields ---------- */
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 13px; color: var(--muted); display: flex; justify-content: space-between; align-items: center; }
.field small { color: var(--muted-2); font-size: 12px; }
.field output { color: var(--text); }
.input { background: rgba(255,255,255,0.03); border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 12px 14px; outline: none; transition: border-color 0.2s, background 0.2s; width: 100%; }
.input:focus { border-color: #fff; background: rgba(255,255,255,0.05); }
.input.invalid { border-color: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,0.15); }
.input-big { font-size: 28px; font-weight: 600; letter-spacing: -0.02em; padding: 14px 18px; }
.time-row { display: flex; gap: 10px; }
.time-row .input { flex: 1; font-size: 18px; font-weight: 600; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.chips button, .seg button { border: 1px solid var(--line-2); background: none; border-radius: 99px; padding: 6px 14px; font-size: 13px; cursor: pointer; font-variant-numeric: tabular-nums; transition: all 0.2s; }
.chips button:hover, .seg button:hover { border-color: rgba(255,255,255,0.35); }
.chips button.on, .seg button.on { background: #fff; color: #000; border-color: #fff; font-weight: 600; }
.seg { display: inline-flex; padding: 4px; border: 1px solid var(--line-2); border-radius: 99px; gap: 4px; align-self: flex-start; }
.seg button { border: none; padding: 7px 16px; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.stat { background: var(--card); padding: 18px; display: flex; flex-direction: column; gap: 4px; }
.stat span { color: var(--muted); font-size: 12px; }
.stat b { font-size: 30px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }

/* switch */
.switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; font-size: 14px; color: var(--muted); user-select: none; margin-top: 20px; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { width: 42px; height: 24px; border-radius: 99px; background: rgba(255,255,255,0.1); border: 1px solid var(--line-2); position: relative; transition: background 0.25s; flex: none; }
.switch .track i { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #777; transition: transform 0.25s var(--ease), background 0.25s; }
.switch input:checked + .track { background: #fff; border-color: #fff; }
.switch input:checked + .track i { transform: translateX(18px); background: #000; }
.switch input:focus-visible + .track { box-shadow: 0 0 0 3px rgba(255,255,255,0.25); }
.switch-head, .switch-sm { margin-top: 0; }
.switch-sm .track { width: 34px; height: 20px; }
.switch-sm .track i { width: 14px; height: 14px; }
.switch-sm input:checked + .track i { transform: translateX(14px); }

/* range */
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 4px; border-radius: 4px; background: linear-gradient(to right, #fff var(--p, 50%), rgba(255,255,255,0.12) var(--p, 50%)); outline: none; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 4px solid #000; box-shadow: 0 0 0 1px #fff; cursor: pointer; }
input[type=range]::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 4px solid #000; box-shadow: 0 0 0 1px #fff; cursor: pointer; }

/* ---------- Format ---------- */
.format-row { display: flex; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 26px; }
.format-cards { display: flex; gap: 10px; flex-wrap: wrap; }
.fmt { display: flex; align-items: center; gap: 14px; text-align: left; padding: 12px 18px 12px 12px; border-radius: 16px; border: 1px solid var(--line-2); background: rgba(255,255,255,0.02); cursor: pointer; transition: all 0.2s; }
.fmt:hover { border-color: rgba(255,255,255,0.35); }
.fmt b { display: block; font-weight: 600; font-size: 14px; }
.fmt small { color: var(--muted); font-size: 12px; }
.fmt.on { background: #fff; color: #000; border-color: #fff; }
.fmt.on small { color: #555; }
.fmt-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,0.06); flex: none; }
.fmt.on .fmt-icon { background: #000; }
.fmt-icon i { display: block; border: 1.5px solid currentColor; border-radius: 4px; position: relative; }
.fmt.on .fmt-icon i { border-color: #fff; }
.fmt-h i { width: 28px; height: 17px; }
.fmt-v i { width: 17px; height: 28px; }
.fmt-v i::after { content: ''; position: absolute; left: 1px; right: 1px; top: 50%; height: 7px; transform: translateY(-50%); background: currentColor; border-radius: 1px; }
.fmt.on .fmt-v i::after { background: #fff; }
.preview-stage canvas { max-height: 620px; width: auto !important; max-width: 100%; margin: 0 auto; touch-action: none; }
.preview-stage { display: flex; justify-content: center; background: repeating-conic-gradient(#0c0c0c 0 25%, #111 0 50%) 0 0 / 20px 20px; }
.preview-stage canvas.can-move { cursor: move; }
.preview-stage canvas.can-resize { cursor: nwse-resize; }
.cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.ad-meta-row { margin: 0 0 14px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.layout-empty { border: 1px dashed var(--line-2); border-radius: 16px; padding: 40px; text-align: center; color: var(--muted-2); font-size: 14px; }
.layout-tip { margin: 0; color: var(--muted-2); font-size: 12px; }
@media (max-width: 900px) { .cols-2 { grid-template-columns: 1fr; } }

/* ---------- Timeline ---------- */
.timeline-wrap { margin-top: 26px; }
.timeline { position: relative; height: 64px; border-radius: 14px; background: rgba(255,255,255,0.02); border: 1px solid var(--line); overflow: hidden; display: flex; }
.tl-empty { margin: auto; color: var(--muted-2); font-size: 13px; }
.tl-seg { position: absolute; top: 0; bottom: 0; display: flex; align-items: flex-end; padding: 0 0 8px 8px; font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; border-right: 1px solid #000; overflow: hidden; transition: background 0.2s; }
.tl-seg.odd { background: rgba(255,255,255,0.92); color: #000; }
.tl-seg.even { background: rgba(255,255,255,0.72); color: #000; }
.tl-seg:hover { background: #fff; }
.tl-seg.rest { background: repeating-linear-gradient(135deg, rgba(255,255,255,0.5) 0 6px, rgba(255,255,255,0.35) 6px 12px); }
.tl-seg.dropped { background: transparent; color: var(--muted-2); border-left: 1px dashed var(--line-2); }
.tl-intro { position: absolute; top: 0; bottom: 0; left: 0; background: repeating-linear-gradient(135deg, rgba(255,255,255,0.07) 0 6px, transparent 6px 12px); border-right: 1px solid rgba(255,255,255,0.4); }
.tl-ad { position: absolute; top: 8px; width: 3px; height: 22px; margin-left: -1.5px; background: #000; border-radius: 3px; box-shadow: 0 0 0 2px rgba(255,255,255,0.9); }
.tl-legend { display: flex; gap: 18px; margin-top: 12px; font-size: 12px; color: var(--muted); }
.tl-legend span { display: inline-flex; align-items: center; gap: 8px; }
.tl-legend i { width: 14px; height: 10px; border-radius: 3px; display: inline-block; }
.lg-intro { background: repeating-linear-gradient(135deg, rgba(255,255,255,0.3) 0 3px, transparent 3px 6px); border: 1px solid var(--line-2); }
.lg-slice { background: #fff; }
.lg-ad { background: #000; box-shadow: 0 0 0 2px #fff; width: 4px !important; }

/* ---------- Ads ---------- */
.ad-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 24px; margin-top: 4px; }
.preview-stage { position: relative; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: #000; }
.preview-stage canvas { display: block; width: 100%; height: auto; }
.preview-stage.picking { cursor: crosshair; }
.preview-badge { position: absolute; left: 12px; top: 12px; font-size: 11px; letter-spacing: 0.04em; background: rgba(0,0,0,0.6); backdrop-filter: blur(8px); border: 1px solid var(--line-2); padding: 5px 10px; border-radius: 99px; display: flex; align-items: center; gap: 7px; }
.rec { width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: pulse 1.4s infinite; }
.picker-hint { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); background: #fff; color: #000; font-size: 12px; font-weight: 600; padding: 7px 14px; border-radius: 99px; white-space: nowrap; }
.preview-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; color: var(--muted); font-size: 13px; gap: 12px; }
.ad-controls { display: flex; flex-direction: column; gap: 14px; }
.group { border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 14px; background: rgba(255,255,255,0.015); }
.group-title { font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); display: flex; justify-content: space-between; align-items: center; font-weight: 600; }
.stepper { display: flex; align-items: stretch; border: 1px solid var(--line-2); border-radius: var(--radius-sm); overflow: hidden; }
.stepper button { width: 48px; background: rgba(255,255,255,0.03); border: none; font-size: 20px; cursor: pointer; transition: background 0.2s; }
.stepper button:hover { background: rgba(255,255,255,0.1); }
.stepper .input { border: none; border-radius: 0; text-align: center; font-size: 18px; font-weight: 600; background: none; }
.color-row { display: flex; align-items: center; gap: 12px; }
.swatch { position: relative; width: 36px; height: 36px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line-2); cursor: pointer; flex: none; }
.swatch input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.swatch span { position: absolute; inset: 3px; border-radius: 7px; background: #00ff00; pointer-events: none; }
.color-row .btn { margin-left: auto; }
.pos-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; width: 132px; aspect-ratio: 16/10; padding: 8px; border: 1px solid var(--line-2); border-radius: 12px; }
.pos-grid button { border: 1px solid var(--line-2); border-radius: 5px; background: none; cursor: pointer; transition: all 0.2s; }
.pos-grid button:hover { border-color: rgba(255,255,255,0.5); }
.pos-grid button.on { background: #fff; border-color: #fff; }

/* ---------- Export ---------- */
.names { border: 1px solid var(--line); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 6px; max-height: 196px; overflow: auto; background: rgba(255,255,255,0.015); }
.names-row { display: flex; align-items: center; gap: 10px; font-size: 13px; padding: 6px 8px; border-radius: 8px; }
.names-row:hover { background: rgba(255,255,255,0.04); }
.names-row .ico { width: 22px; height: 22px; border-radius: 6px; background: #fff; color: #000; display: grid; place-items: center; font-size: 10px; font-weight: 700; flex: none; }
.names-row .n { flex: 1; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.names-row .d { color: var(--muted); font-variant-numeric: tabular-nums; }
.names-more { color: var(--muted-2); font-size: 12px; padding: 4px 8px; }
.export-bar { margin-top: 26px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.export-summary { margin: 0; color: var(--muted); font-size: 14px; max-width: 620px; }
.export-summary b { color: var(--text); font-weight: 600; }

/* ---------- Result ---------- */
.result { border-color: var(--line-2); }
.result-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
.result-head h3 { margin: 4px 0 0; font-size: 26px; letter-spacing: -0.03em; }
.result-status { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }
.result-status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: pulse 1.2s infinite; }
.result.done .result-status::before, .result.failed .result-status::before { animation: none; }
.result.failed .result-status::before { background: transparent; border: 1px solid #fff; }
.result-actions { display: flex; gap: 10px; }
.progress { height: 6px; background: var(--line); border-radius: 6px; overflow: hidden; }
.progress-bar { height: 100%; width: 0; background: #fff; border-radius: 6px; transition: width 0.4s var(--ease); position: relative; overflow: hidden; }
.progress-bar::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(0,0,0,0.35), transparent); animation: shimmer 1.4s infinite; }
.result.done .progress-bar::after { display: none; }
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.progress-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; margin-top: 10px; font-variant-numeric: tabular-nums; }
.files { list-style: none; margin: 22px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.files li { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 14px; padding: 12px 12px 12px 14px; background: rgba(255,255,255,0.02); animation: rise 0.4s var(--ease) both; }
.files .fi { width: 36px; height: 36px; border-radius: 10px; background: #fff; color: #000; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; font-variant-numeric: tabular-nums; }
.files .fn { flex: 1; min-width: 0; }
.files .fn b { display: block; font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.files .fn span { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.files a { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; flex: none; transition: all 0.2s; }
.files a:hover { background: #fff; color: #000; border-color: #fff; }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: #fff; color: #000; padding: 12px 20px; border-radius: 99px; font-weight: 600; font-size: 14px; z-index: 200; box-shadow: 0 20px 60px -10px rgba(0,0,0,0.8); animation: toast 0.35s var(--ease); max-width: calc(100vw - 32px); }
@keyframes toast { from { opacity: 0; transform: translate(-50%, 12px); } }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .media, .ad-grid, .grid-2 { grid-template-columns: 1fr; }
  .login-features { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .login-features { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr 1fr; }
  .stat b { font-size: 22px; }
  .user-name { display: none; }
  .export-bar .btn, .result-actions, .result-actions .btn { width: 100%; }
  .foot { flex-direction: column; gap: 8px; }
}
.tl-outro { left: auto; border-right: none; border-left: 1px solid rgba(255,255,255,0.4); }
