/* ── Reset ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Design tokens ──────────────────────────────── */
:root {
  --red:          #C8102E;
  --red-hover:    #9e0c24;
  --red-bg:       #fdf3f4;
  --green:        #16a34a;
  --green-bg:     #dcfce7;
  --text-heading: #1a1a1a;
  --text-body:    #444;
  --text-muted:   #666;
  --border:       #e5e5e5;
  --bg-page:      #f4f4f4;
  --bg-card:      #ffffff;
  --bg-subtle:    #fafafa;
  --font:         Arial, "Helvetica Neue", system-ui, sans-serif;
  --radius:       8px;
  --radius-sm:    4px;
  --radius-lg:    12px;
  --radius-full:  9999px;
}

/* ── Base ───────────────────────────────────────── */
body { font-family: var(--font); background: var(--bg-page); color: var(--text-body); line-height: 1.6; font-size: 0.9rem; overflow-x: hidden; }
html { overflow-x: hidden; }
a { color: var(--red); }
a:hover { color: var(--red-hover); }
strong { font-weight: 600; }

/* ── Accent bar ─────────────────────────────────── */
.accent-bar { height: 4px; background: var(--red); width: 100%; }

/* ── Site header ────────────────────────────────── */
.site-header { background: var(--bg-card); border-bottom: 1px solid var(--border); padding: 0.85rem 1.5rem; display: flex; align-items: center; justify-content: space-between; }
.site-header__brand { display: flex; align-items: center; text-decoration: none; }
.site-header__logo-img { height: 64px; width: auto; display: block; }
.site-header__nav { display: flex; align-items: center; gap: 1.25rem; }
.site-header__link { font-size: 0.95rem; color: var(--text-body); text-decoration: none; font-weight: 500; }
.site-header__link:hover { color: var(--red); }
.site-header__lang { display: flex; align-items: center; gap: 0.2rem; font-size: 0.95rem; color: var(--text-body); cursor: default; margin-left: 0.5rem; }
.site-header__lang-sep { margin-left: 0.15rem; color: var(--text-muted); }
.site-header__lang-link { margin-left: 0.15rem; color: var(--text-muted); text-decoration: none; cursor: pointer; }
.site-header__lang-link:hover { color: var(--red); }
.site-header__lang-active { font-weight: 700; color: var(--text-heading); }

/* ── Page container ─────────────────────────────── */
.container { max-width: 880px; margin: 0 auto; padding: 2rem 1rem; width: 100%; }

/* ── Card ───────────────────────────────────────── */
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); }

/* ── Drop zone ──────────────────────────────────── */
.drop-zone { border: 2px dashed var(--red); border-radius: var(--radius-lg); background: var(--bg-card); padding: 2rem 1.5rem; text-align: center; cursor: pointer; transition: background 0.15s, border-style 0.15s; margin-bottom: 1rem; }
.drop-zone:hover, .drop-zone.drag-over { background: var(--red-bg); border-style: solid; }
.drop-zone__icon { margin-bottom: 0.5rem; }
.drop-zone__icon svg { width: 40px; height: 40px; color: var(--red); }
.drop-zone__primary { font-size: 0.85rem; font-weight: 600; color: var(--text-heading); margin-bottom: 0.15rem; }
.drop-zone__formats { font-size: 0.68rem; color: var(--text-muted); margin-top: 0.15rem; }
.drop-zone__secondary { font-size: 0.72rem; color: var(--text-muted); margin-top: 0.15rem; }
.drop-zone__secondary a { color: var(--red); text-decoration: underline; }
.drop-zone.has-file { background: var(--red-bg); border-style: solid; }
.drop-zone__filename { font-size: 1rem; color: var(--red); font-weight: 700; margin-top: 0.5rem; background: var(--bg-card); display: inline-block; padding: 0.3rem 0.75rem; border-radius: var(--radius-full); border: 1.5px solid var(--red); }
.drop-zone__clear { font-size: 0.7rem; color: var(--red); cursor: pointer; text-decoration: underline; margin-left: 0.5rem; }

/* ── Form ───────────────────────────────────────── */
.form-group { margin-bottom: 0.9rem; }
label { display: block; font-size: 0.72rem; font-weight: 600; color: var(--text-body); margin-bottom: 0.3rem; }
input[type="email"], input[type="number"], select {
  width: 100%; padding: 0.45rem 0.6rem; border: 1px solid var(--border);
  border-radius: var(--radius); font-size: 0.8rem; font-family: var(--font);
  color: var(--text-heading); background: var(--bg-card);
}
input[type="email"]:focus, input[type="number"]:focus, select:focus {
  outline: 2px solid var(--red); outline-offset: 1px; border-color: var(--red);
}

.checkbox-row { display: flex; gap: 1rem; font-size: 0.75rem; color: var(--text-body); }
.checkbox-row label { font-weight: 400; display: flex; align-items: center; gap: 0.3rem; margin: 0; cursor: pointer; }
input[type="checkbox"] { accent-color: var(--red); cursor: pointer; }

/* ── Buttons ─────────────────────────────────────── */
.btn { display: inline-block; padding: 0.6rem 1.25rem; border: none; border-radius: var(--radius); font-size: 0.85rem; font-weight: 600; cursor: pointer; text-decoration: none; font-family: var(--font); transition: background 0.15s; }
.btn-primary { background: var(--red); color: #fff; width: 100%; text-align: center; border-radius: var(--radius-full); }
.btn-primary:hover { background: var(--red-hover); color: #fff; }
.btn-primary:disabled { background: #777; cursor: not-allowed; }
.btn-secondary { background: #64748b; color: #fff; }
.btn-secondary:hover { background: #475569; color: #fff; }

/* ── Input with icon ────────────────────────────── */
.input-with-icon { position: relative; }
.input-with-icon input { padding-right: 2.25rem; }
.input-with-icon__icon { position: absolute; right: 0.65rem; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-muted); pointer-events: none; }

/* ── Privacy line ───────────────────────────────── */
.privacy-line { display: flex; align-items: flex-start; justify-content: center; gap: 0.25rem; font-size: 0.64rem; color: var(--text-muted); margin-top: auto; padding-top: 0.75rem; line-height: 1.35; }
.privacy-line svg { width: 12px; height: 12px; flex-shrink: 0; margin-top: 0.1rem; }
.privacy-line__content { display: flex; flex-wrap: nowrap; justify-content: center; gap: 0.2rem; min-width: 0; text-align: center; white-space: nowrap; }
.privacy-line__cta { white-space: nowrap; }
.privacy-line a { color: var(--text-muted); }

/* ── Error / result ─────────────────────────────── */
.error { color: #dc2626; background: #fef2f2; padding: 0.75rem 1rem; border-radius: var(--radius); margin: 0.75rem 0; font-size: 0.8rem; }

/* ── Status page ─────────────────────────────────── */
.status-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.75rem; margin: 0 auto 1rem; }
.status-header { margin-bottom: 1.25rem; text-align: center; }
.status-header__label { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; display: block; margin-bottom: 0.2rem; }
.status-header__filename { font-size: 1rem; font-weight: 700; color: var(--text-heading); word-break: break-all; }

/* ── Pipeline stepper ───────────────────────────── */
.stepper { display: flex; align-items: flex-start; justify-content: center; margin-bottom: 1.5rem; }
.stepper__node { display: flex; flex-direction: column; align-items: center; gap: 0.3rem; min-width: 64px; }
.stepper__circle { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.7rem; font-weight: 700; flex-shrink: 0; }
.stepper__circle--done { background: var(--red); color: #fff; }
.stepper__circle--active { background: #fff; border: 2.5px solid var(--red); color: var(--red); position: relative; }
.stepper__circle--active::after { content: ""; width: 8px; height: 8px; background: var(--red); border-radius: 50%; animation: pulse 1.4s ease-in-out infinite; position: absolute; }
.stepper__circle--pending { background: var(--border); }
.stepper__label { font-size: 0.65rem; text-align: center; line-height: 1.3; }
.stepper__label--done { color: var(--red); font-weight: 600; }
.stepper__label--active { color: var(--text-heading); font-weight: 700; }
.stepper__label--pending { color: var(--text-muted); }
.stepper__connector { flex: 1; height: 2px; margin-top: 13px; min-width: 8px; }
.stepper__connector--done { background: var(--red); }
.stepper__connector--pending { background: var(--border); }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(0.7); } }
@media (prefers-reduced-motion: reduce) { .stepper__circle--active::after { animation: none; } .highlight-flash { animation: none; } }
@keyframes highlight-flash { 0% { box-shadow: 0 0 0 0 rgba(207,0,99,0.3); } 40% { box-shadow: 0 0 0 8px rgba(207,0,99,0.15); } 100% { box-shadow: 0 0 0 0 rgba(207,0,99,0); } }
.highlight-flash { animation: highlight-flash 1.2s ease-out; border-radius: var(--radius); }

/* ── Progress bar ───────────────────────────────── */
.progress-bar { width: 100%; height: 7px; background: #f0f0f0; border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 0.4rem; }
.progress-bar--sm { height: 4px; margin: 0 1rem; width: auto; }
.progress-fill { height: 100%; background: var(--red); border-radius: var(--radius-lg); transition: width 0.5s ease; }
.progress-label { display: flex; justify-content: space-between; font-size: 0.68rem; color: var(--text-muted); margin-bottom: 1.25rem; }
.progress-label__pct { font-weight: 700; color: var(--text-heading); }

/* ── Queue banner ──────────────────────────────── */
.queue-banner { background: #fffbeb; border: 1px solid #f59e0b; border-radius: var(--radius); padding: 0.75rem 1rem; margin: 0.75rem 0; text-align: center; }
.queue-banner__position { font-size: 0.85rem; font-weight: 600; color: #92400e; }
.queue-banner__warning { font-size: 0.75rem; color: #92400e; margin-top: 0.4rem; line-height: 1.5; }

/* ── Email reminder ─────────────────────────────── */
.email-reminder { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.65rem 1rem; font-size: 0.72rem; color: var(--text-muted); text-align: center; }

/* ── Log panel ──────────────────────────────────── */
.log-panel { border-top: 1px solid var(--border); background: var(--bg-card); margin-top: 1.25rem; border-radius: 0 0 var(--radius) var(--radius); overflow: hidden; }
.log-panel__header { padding: 0.5rem 1rem; display: flex; align-items: center; justify-content: space-between; cursor: pointer; user-select: none; }
.log-panel__left { display: flex; align-items: center; gap: 0.4rem; font-size: 0.68rem; color: var(--text-body); font-weight: 600; }
.log-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.log-dot--ok { background: #6ee7b7; }
.log-dot--warning { background: #fbbf24; }
.log-dot--error { background: #ef4444; }
.log-panel__badge { background: #fef3c7; color: #92400e; font-size: 0.6rem; padding: 0.1rem 0.35rem; border-radius: 10px; font-weight: 600; }
.log-panel__toggle { font-size: 0.65rem; color: var(--red); font-weight: 600; }
.log-panel__body { display: none; }
.log-panel--expanded .log-panel__body { display: block; }
.log-panel__compact-stepper { padding: 0.35rem 1rem; font-size: 0.62rem; color: var(--text-muted); border-bottom: 1px solid var(--border); background: var(--bg-subtle); }
.log-panel__compact-stepper .cs-done { color: var(--red); font-weight: 600; }
.log-panel__compact-stepper .cs-active { color: var(--text-heading); font-weight: 700; border-bottom: 1.5px solid var(--red); }
.log-console { background: #1a1a1a; padding: 0.65rem 1rem; font-family: "Cascadia Code", "Fira Mono", monospace; font-size: 0.65rem; line-height: 1.7; max-height: 200px; overflow-y: auto; }
.log-console:empty { display: none; }
.log-line--ok { color: #6ee7b7; }
.log-line--warning { color: #fbbf24; }
.log-line--active { color: #60a5fa; }
.log-line--pending { color: #555; }

/* ── Footer ─────────────────────────────────────── */
footer { text-align: center; margin-top: 2rem; color: var(--text-muted); font-size: 0.78rem; }
.footer-content { display: flex; justify-content: center; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.footer-content a { color: var(--text-muted); text-decoration: none; }
.footer-content a:hover { color: var(--red); }
.privacy-notice { margin-top: 0.75rem; padding: 0.75rem 1rem; background: var(--bg-subtle); border: 1px solid var(--border); border-radius: var(--radius); font-size: 0.72rem; color: var(--text-muted); text-align: left; max-width: 680px; margin-left: auto; margin-right: auto; }
.privacy-notice summary { cursor: pointer; color: var(--text-muted); list-style: none; }
.privacy-notice summary::-webkit-details-marker { display: none; }
.privacy-notice p { margin-top: 0.5rem; line-height: 1.5; }

/* ── Hero section ──────────────────────────────── */
.hero { display: grid; grid-template-columns: 1fr 1fr; gap: 0; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.hero__text { padding: 2.5rem 2rem 2rem; display: flex; flex-direction: column; }
.hero__upload { padding: 2rem 2rem; background: var(--bg-subtle); display: flex; flex-direction: column; }
.hero__headline { font-size: 1.75rem; font-weight: 700; color: var(--text-heading); line-height: 1.2; margin-bottom: 1rem; min-height: 4.25rem; }
.hero__highlight { color: var(--red); }
.hero__benefits { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1rem; min-height: 4.6rem; }
.hero__benefit { display: flex; align-items: center; gap: 0.35rem; font-size: 0.75rem; color: var(--text-body); white-space: nowrap; }
.hero__benefit-icon { width: 18px; height: 18px; flex-shrink: 0; }
.hero__desc { font-size: 0.85rem; color: var(--text-body); line-height: 1.6; margin-bottom: 1.25rem; min-height: 5.5rem; }
.hero__sample-link { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.82rem; color: var(--red); font-weight: 500; text-decoration: none; cursor: pointer; margin-top: auto; }
.hero__sample-link:hover { color: var(--red-hover); }
.hero__sample-link svg { width: 16px; height: 16px; }
.hero__sample-player { margin-top: 1rem; display: none; background: #000; border-radius: var(--radius); overflow: hidden; max-width: 880px; }
.hero__sample-player.is-open { display: block; }
.hero__sample-player video { width: 100%; aspect-ratio: 16/9; display: block; }

/* ── Collapsible section ───────────────────────── */
.collapsible { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); margin-top: 1rem; overflow: hidden; }
.collapsible__header { padding: 0.85rem 1.25rem; display: flex; align-items: center; gap: 0.6rem; cursor: pointer; user-select: none; min-height: 4.5rem; }
.collapsible__icon { width: 20px; height: 20px; flex-shrink: 0; color: var(--text-muted); }
.collapsible__copy { display: flex; flex-direction: column; justify-content: center; gap: 0.15rem; min-width: 0; }
.collapsible__title { font-size: 0.88rem; font-weight: 700; color: var(--text-heading); }
.collapsible__subtitle { font-size: 0.75rem; color: var(--text-muted); line-height: 1.35; }
.collapsible__right { margin-left: auto; display: flex; align-items: center; gap: 0.75rem; }
.collapsible__action { font-size: 0.72rem; color: var(--red); font-weight: 600; cursor: pointer; text-decoration: none; display: none; }
.collapsible.is-open .collapsible__action { display: inline; }
.collapsible__chevron { width: 16px; height: 16px; color: var(--text-muted); transition: transform 0.2s; }
.collapsible.is-open .collapsible__chevron { transform: rotate(180deg); }
.collapsible__body { display: none; border-top: 1px solid var(--border); }
.collapsible.is-open .collapsible__body { display: block; }

/* ── Advanced options body ─────────────────────── */
.adv-options { padding: 1.25rem; }
.adv-options__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; align-items: start; }
.adv-option { display: grid; grid-template-rows: minmax(1.25rem, auto) minmax(34px, auto) minmax(2.2rem, auto); gap: 0.35rem; align-content: start; min-width: 0; }
.adv-option select { align-self: center; width: 100%; min-width: 0; max-width: 100%; }
.adv-option .toggle { align-self: center; }
.adv-option__label { display: flex; align-items: center; gap: 0.4rem; font-size: 0.78rem; font-weight: 600; color: var(--text-body); }
.adv-option__label svg { width: 16px; height: 16px; color: var(--red); }
.adv-option__hint { font-size: 0.68rem; color: var(--text-muted); line-height: 1.4; min-height: 2.2rem; }
.adv-option__extra { margin-top: 0.75rem; }

/* ── Toggle switch ─────────────────────────────── */
.toggle { position: relative; display: inline-flex; align-items: center; gap: 0.5rem; cursor: pointer; }
.toggle__input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle__track { width: 36px; height: 20px; background: #ccc; border-radius: var(--radius-full); position: relative; transition: background 0.2s; flex-shrink: 0; }
.toggle__input:checked + .toggle__track { background: var(--red); }
.toggle__track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; background: #fff; border-radius: 50%; transition: transform 0.2s; }
.toggle__input:checked + .toggle__track::after { transform: translateX(16px); }
.toggle__label { font-size: 0.78rem; color: var(--text-body); font-weight: 600; }
.toggle__state { font-size: 0.72rem; color: var(--text-muted); }

/* ── FAQ items ─────────────────────────────────── */
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:last-child { border-bottom: none; }
.faq-item__question { padding: 0.75rem 1.25rem; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-size: 0.82rem; font-weight: 600; color: var(--text-body); }
.faq-item__question:hover { color: var(--text-heading); }
.faq-item__chevron { width: 14px; height: 14px; color: var(--red); transition: transform 0.2s; flex-shrink: 0; margin-left: 1rem; }
.faq-item.is-open .faq-item__chevron { transform: rotate(180deg); }
.faq-item__answer { display: none; padding: 0 1.25rem 1rem; font-size: 0.78rem; color: var(--text-body); line-height: 1.65; }
.faq-item.is-open .faq-item__answer { display: block; }
.faq-item__answer p { margin-bottom: 0.5rem; }
.faq-item__answer p:last-child { margin-bottom: 0; }

/* ── How It Works (horizontal) ─────────────────── */
.how-it-works-strip { display: flex; align-items: stretch; justify-content: center; gap: 0; padding: 0.25rem 1rem 2rem; margin-top: 0; }
.hiw-step { display: flex; flex: 1 1 0; flex-direction: column; align-items: center; text-align: center; max-width: 200px; min-height: 12rem; }
.hiw-step__icon { width: 56px; height: 56px; background: var(--red-bg); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 0.6rem; }
.hiw-step__icon svg { width: 28px; height: 28px; color: var(--red); }
.hiw-step__num { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; background: var(--red); color: #fff; border-radius: 50%; font-size: 0.65rem; font-weight: 700; margin-bottom: 0.35rem; }
.hiw-step__title { font-size: 0.82rem; font-weight: 700; color: var(--text-heading); margin-bottom: 0.25rem; min-height: 2rem; display: flex; align-items: flex-end; justify-content: center; }
.hiw-step__desc { font-size: 0.72rem; color: var(--text-muted); line-height: 1.5; min-height: 3.4rem; }
.hiw-heading { text-align: center; color: var(--red); font-size: 1rem; font-weight: 700; margin-top: 2rem; margin-bottom: 0; }
.hiw-arrow { display: flex; align-items: center; padding-top: 1rem; color: var(--text-muted); }
.hiw-arrow svg { width: 24px; height: 24px; }

/* ── Trust bar ─────────────────────────────────── */
.trust-bar { display: flex; align-items: center; justify-content: center; gap: 1.5rem; padding: 1.25rem; margin-top: 0.5rem; flex-wrap: wrap; }
.trust-bar__label { display: flex; align-items: center; gap: 0.4rem; font-size: 0.75rem; color: var(--text-muted); white-space: nowrap; }
.trust-bar__label svg { width: 16px; height: 16px; color: var(--red); }
.trust-bar__logos { display: flex; align-items: center; gap: 1.5rem; }
.trust-bar__logo { height: 32px; width: auto; opacity: 0.7; filter: grayscale(100%); }
.trust-bar__logo:hover { opacity: 1; filter: grayscale(100%); }

/* ── Responsive: upload page ───────────────────── */
@media (max-width: 768px) {
  .hero { grid-template-columns: 1fr; }
  .hero__upload { order: -1; }
  .hero__headline { font-size: 1.35rem; }
  .hero__benefits { flex-direction: column; gap: 0.5rem; }
  .adv-options__grid { grid-template-columns: 1fr; gap: 1rem; }
  .how-it-works-strip { flex-direction: column; align-items: center; gap: 1rem; }
  .hiw-arrow { transform: rotate(90deg); padding: 0; }
  .trust-bar { flex-direction: column; gap: 0.75rem; }
  .trust-bar__logos { gap: 1rem; }
  .hero__headline, .hero__benefits, .hero__desc, .collapsible__header, .adv-option__hint, .hiw-step, .hiw-step__title, .hiw-step__desc { min-height: auto; }
  .hero__benefit { white-space: normal; }
  .hero__upload { display: block; }
  .privacy-line__content { white-space: normal; flex-wrap: wrap; }
  .site-header { padding: 0.5rem 0.6rem; justify-content: center; gap: 1rem; }
  .site-header__logo-img { height: 32px; }
  .site-header__nav { gap: 0.5rem; }
  .site-header__link { font-size: 0.72rem; }
  .site-header__lang { font-size: 0.72rem; margin-left: 0; }
  .trust-bar__logos { flex-wrap: wrap; justify-content: center; gap: 0.75rem; }
  .trust-bar__logo { height: 18px; }
}

/* ── Responsive: status page ─────────────────────── */
@media (max-width: 768px) {
  .stepper { flex-wrap: wrap; gap: 0.25rem; }
  .stepper__connector { display: none; }
  .stepper__node { min-width: 50px; }
  .status-card { padding: 1.25rem; }
}

/* ── Accessibility ──────────────────────────────── */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, .toggle__input:focus-visible + .toggle__track, .collapsible__header:focus-visible, .faq-item__question:focus-visible, .filter-pill:focus-visible {
  outline: 3px solid #0f766e; outline-offset: 2px;
}
.skip-link { position: absolute; top: -40px; left: 0; background: var(--red); color: #fff; padding: 0.5rem 1rem; z-index: 1001; font-size: 0.85rem; text-decoration: none; border-radius: 0 0 var(--radius) 0; }
.skip-link:focus { top: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ══════════════════════════════════════════════════
   DOWNLOAD PAGE
   ══════════════════════════════════════════════════ */
.dl-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem 2rem 1.5rem; text-align: center; }
.dl-success { margin-bottom: 1.25rem; }
.dl-success__icon { width: 52px; height: 52px; background: var(--green-bg); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 0.75rem; }
.dl-success__icon svg { width: 26px; height: 26px; color: var(--green); }
.dl-success__title { font-size: 1.15rem; font-weight: 700; color: var(--text-heading); margin-bottom: 0.25rem; }
.dl-success__filename { font-size: 0.78rem; color: var(--text-muted); word-break: break-all; margin-bottom: 0.15rem; }
.dl-success__email { font-size: 0.72rem; color: var(--text-muted); }
.dl-preview { background: #000; border-radius: var(--radius); overflow: hidden; margin-bottom: 1.25rem; }
.dl-preview video { width: 100%; aspect-ratio: 16 / 9; display: block; }
.dl-actions { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1.25rem; }
.dl-btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; width: 100%; padding: 0.65rem 1.25rem; border: none; border-radius: var(--radius-full); font-size: 0.85rem; font-weight: 600; font-family: var(--font); cursor: pointer; text-decoration: none; transition: background 0.15s; }
.dl-btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.dl-btn--primary { background: var(--red); color: #fff; }
.dl-btn--primary:hover { background: var(--red-hover); color: #fff; }
.dl-btn--secondary { background: #64748b; color: #fff; }
.dl-btn--secondary:hover { background: #475569; color: #fff; }
.dl-font-notice { background: #fef9c3; border: 1px solid #fde68a; border-radius: var(--radius); padding: 0.75rem 1rem; text-align: left; margin-bottom: 1.25rem; }
.dl-font-notice__header { display: flex; align-items: center; gap: 0.4rem; font-size: 0.78rem; font-weight: 600; color: #92400e; margin-bottom: 0.35rem; }
.dl-font-notice__header svg { width: 16px; height: 16px; flex-shrink: 0; color: #b45309; }
.dl-font-notice__list { list-style: none; margin: 0.25rem 0 0.4rem; padding: 0; }
.dl-font-notice__list li { font-size: 0.72rem; color: #78350f; padding: 0.1rem 0 0.1rem 0.75rem; position: relative; }
.dl-font-notice__list li::before { content: "\2022"; position: absolute; left: 0; color: #b45309; }
.dl-font-notice__slides { color: #92400e; font-weight: 400; }
.dl-font-notice__help { font-size: 0.72rem; color: #92400e; line-height: 1.5; margin: 0; }
.dl-expiry { font-size: 0.72rem; color: var(--text-muted); margin-bottom: 0.75rem; line-height: 1.5; }
.dl-another { font-size: 0.78rem; color: var(--red); text-decoration: none; font-weight: 500; }
.dl-another:hover { color: var(--red-hover); text-decoration: underline; }
@media (max-width: 768px) {
  .dl-card { padding: 1.5rem 1.25rem 1.25rem; }
  .dl-success__title { font-size: 1.05rem; }
}

/* ══════════════════════════════════════════════════
   ERROR PAGE
   ══════════════════════════════════════════════════ */
.error-card { margin: 4rem auto; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 2.5rem 2rem; text-align: center; }
.error-card__code { font-size: 72px; font-weight: 700; color: var(--border); line-height: 1; margin: 0 0 0.25rem; letter-spacing: -2px; }
.error-card__title { font-size: 1.5rem; font-weight: 600; color: var(--text-heading); margin: 0.5rem 0 0.75rem; }
.error-card__message { font-size: 1rem; color: var(--text-body); line-height: 1.6; margin: 0 0 2rem; }
.error-card__btn { display: inline-block; padding: 0.65rem 1.75rem; background: var(--red); color: #fff; text-decoration: none; border-radius: var(--radius); font-size: 0.95rem; font-weight: 500; transition: background 0.15s; }
.error-card__btn:hover { background: var(--red-hover); color: #fff; }

/* ══════════════════════════════════════════════════
   ADMIN DASHBOARD
   ══════════════════════════════════════════════════ */
.admin-header { display: flex; align-items: center; margin-bottom: 1.25rem; flex-wrap: wrap; gap: 0.5rem; }
.admin-header__title { font-size: 1rem; font-weight: 700; color: var(--text-heading); margin: 0; }
.admin-header__count { font-size: 0.72rem; color: var(--text-muted); margin-left: 0.75rem; }
.admin-header__actions { margin-left: auto; display: flex; align-items: center; gap: 0.5rem; }
.admin-header__actions .btn { font-size: 0.72rem; padding: 0.35rem 0.75rem; line-height: 1.4; box-sizing: border-box; }
.admin-header__cleanup-result { font-size: 0.7rem; color: var(--text-muted); }
.filter-pills { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1rem; }
.filter-pill { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.3rem 0.7rem; border-radius: var(--radius-full); font-size: 0.68rem; font-weight: 600; cursor: pointer; border: 1.5px solid var(--border); background: var(--bg-card); color: var(--text-body); transition: background 0.15s, border-color 0.15s, color 0.15s; user-select: none; }
.filter-pill:hover { border-color: #ccc; background: var(--bg-subtle); }
.filter-pill.is-active { border-color: var(--text-heading); background: var(--text-heading); color: #fff; }
.filter-pill--completed.is-active { border-color: #065f46; background: #d1fae5; color: #065f46; }
.filter-pill--failed.is-active { border-color: #991b1b; background: #fee2e2; color: #991b1b; }
.filter-pill--active.is-active { border-color: #1e40af; background: #dbeafe; color: #1e40af; }
.filter-pill--pending.is-active { border-color: #6b7280; background: #f3f4f6; color: #6b7280; }
.filter-pill__count { font-weight: 400; opacity: 0.8; }
.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.75rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); table-layout: fixed; }
.admin-table thead tr { border-bottom: 2px solid var(--border); text-align: left; }
.admin-table th { padding: 0.6rem 0.5rem; font-weight: 700; color: var(--text-muted); font-size: 0.65rem; text-transform: uppercase; cursor: pointer; user-select: none; }
.admin-table th.admin-table__th-thumb { width: 5%; cursor: default; }
.admin-table th.admin-table__th-created { width: 14%; }
.admin-table th.admin-table__th-file { width: 17%; }
.admin-table th.admin-table__th-email { width: 16%; }
.admin-table th.admin-table__th-slides { width: 5%; }
.admin-table th.admin-table__th-convtime { width: 8%; }
.admin-table th.admin-table__th-video { width: 6%; }
.admin-table th.admin-table__th-status { width: 12%; }
.admin-table th.admin-table__th-actions { width: 9%; cursor: default; }
.admin-table tbody tr { border-bottom: 1px solid var(--border); }
.admin-table tbody tr:last-child { border-bottom: none; }
.admin-table tbody tr.is-hidden { display: none; }
.admin-table__row-clickable { cursor: pointer; }
.admin-table__row-clickable:hover { background: var(--bg-subtle); }
.admin-table__td-thumb { padding: 0.35rem 1.25rem 0.35rem 0.5rem; vertical-align: middle; }
.admin-table__thumb { width: 40px; height: auto; border-radius: 3px; display: block; border: 1px solid var(--border); }
.admin-table__td { padding: 0.55rem 0.5rem; color: var(--text-muted); white-space: nowrap; }
.admin-table__td--truncate { overflow: hidden; text-overflow: ellipsis; }
.admin-table__td--visible { overflow: hidden; text-overflow: ellipsis; }
.admin-table__td--center { text-align: center; }
.admin-table__td--nowrap { white-space: nowrap; }
.admin-table__file-link { color: var(--text-heading); font-weight: 500; text-decoration: none; }
.admin-table__file-link:hover { text-decoration: underline; color: var(--text-heading); }
.status-badge { padding: 0.15rem 0.5rem; border-radius: 10px; font-size: 0.65rem; font-weight: 600; display: inline-block; }
.status-badge--completed { background: #d1fae5; color: #065f46; }
.status-badge--failed { background: #fee2e2; color: #991b1b; }
.status-badge--pending { background: #f3f4f6; color: #6b7280; }
.status-badge--active { background: #dbeafe; color: #1e40af; }
.admin-table__action-link { color: var(--red); font-size: 0.7rem; text-decoration: none; margin-right: 0.5rem; }
.admin-table__action-link:hover { text-decoration: underline; }
.admin-table__action-link--muted { color: var(--text-muted); margin-right: 0; }
.admin-table__td--actions { white-space: nowrap; }
.admin-table__action-icon { color: var(--red); margin-right: 0.6rem; vertical-align: middle; display: inline-block; }
.admin-table__action-icon:hover { color: var(--red-hover); }
.admin-table__action-icon--muted { color: var(--text-muted); margin-right: 0; }
.admin-table__action-icon--muted:hover { color: var(--text-body); }
.admin-table__action-error { color: #991b1b; font-size: 0.68rem; }
.admin-table__action-progress { color: var(--text-muted); font-size: 0.7rem; }
.admin-empty { padding: 2rem; text-align: center; color: var(--text-muted); }
.admin-pagination { display: flex; align-items: center; justify-content: center; gap: 0.75rem; margin-top: 1rem; font-size: 0.75rem; }
.admin-pagination__btn { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.35rem 0.75rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-card); color: var(--text-body); font-size: 0.72rem; font-weight: 500; cursor: pointer; font-family: var(--font); transition: background 0.15s, border-color 0.15s; }
.admin-pagination__btn:hover:not(:disabled) { background: var(--bg-subtle); border-color: #ccc; }
.admin-pagination__btn:disabled { opacity: 0.4; cursor: not-allowed; }
.admin-pagination__info { font-size: 0.72rem; color: var(--text-muted); font-weight: 500; }
@media (max-width: 768px) {
  .admin-header { flex-direction: column; align-items: flex-start; }
  .admin-header__actions { margin-left: 0; width: 100%; }
  .admin-header__count { margin-left: 0; }
  .filter-pills { gap: 0.3rem; }
}

/* ══════════════════════════════════════════════════
   ADMIN JOB DETAIL
   ══════════════════════════════════════════════════ */
.back-nav { margin-bottom: 1rem; }
.back-nav .btn { font-size: 0.75rem; padding: 0.35rem 0.75rem; }
.job-header { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 1rem; }
.job-header__title { font-size: 1rem; font-weight: 700; color: var(--text-heading); }
.job-header__id { font-size: 0.72rem; font-weight: 400; color: var(--text-muted); font-family: monospace; }
.job-card { padding: 1.25rem 1.5rem; margin-bottom: 1rem; }
.meta-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.5rem; }
.meta-item__label { font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.meta-item__value { font-size: 0.75rem; color: var(--text-heading); }
.meta-item__value--mono { font-size: 0.72rem; color: var(--text-muted); font-family: monospace; }
.meta-item__value--overflow { overflow: hidden; text-overflow: ellipsis; }
.job-error { margin-top: 1rem; }
.job-actions { margin-top: 1rem; display: flex; align-items: center; gap: 0.75rem; }
.job-actions .btn { font-size: 0.72rem; padding: 0.35rem 0.75rem; width: auto; border-radius: var(--radius); }
.job-actions .btn-secondary { white-space: nowrap; }
.job-preview { margin-top: 0.75rem; }
.job-preview__video { aspect-ratio: 16/9; width: 100%; background: #000; border-radius: var(--radius); }
.pipeline-card { padding: 1.25rem 1.5rem; margin-bottom: 1rem; }
.pipeline-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.75rem; }
.pipeline-header__left { display: flex; align-items: center; gap: 0.5rem; }
.pipeline-header__title { font-size: 0.72rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.pipeline-header__icon { font-size: 0.75rem; }
.pipeline-header__icon--done { color: #065f46; }
.pipeline-header__icon--failed { color: #991b1b; }
.pipeline-header__icon--active { color: #1e40af; }
.pipeline-header__total { font-size: 0.7rem; font-weight: 600; color: var(--red); }
.pipeline-header__pct { font-size: 0.7rem; color: var(--text-muted); }
.pipeline-stages { display: flex; gap: 0.35rem; align-items: stretch; }
.pipeline-stage { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 0.2rem; }
.pipeline-pill { width: 100%; display: flex; align-items: center; justify-content: center; gap: 0.25rem; padding: 0.3rem 0.25rem; border-radius: 10px; font-size: 0.62rem; font-weight: 600; white-space: nowrap; text-align: center; }
.pipeline-pill--done { background: #d1fae5; color: #065f46; }
.pipeline-pill--active { background: #dbeafe; color: #1e40af; }
.pipeline-pill--failed { background: #fee2e2; color: #991b1b; }
.pipeline-pill--pending { background: #f3f4f6; color: #9ca3af; }
.pipeline-timing { font-size: 0.58rem; color: var(--text-muted); font-weight: 600; }
.pipeline-substep { height: 3px; background: #e0e7ff; border-radius: 2px; margin-top: 0.5rem; overflow: hidden; }
.pipeline-substep__fill { height: 100%; background: #3b82f6; border-radius: 2px; transition: width 0.3s; }
/* ── Email notification status (admin job detail) ─ */
.email-status-card { padding: 1.25rem 1.5rem; margin-bottom: 1rem; }
.email-status__title { font-size: 0.72rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.5rem; }
.email-status__body { display: flex; align-items: center; gap: 0.5rem; }
.email-status__icon { font-size: 0.85rem; flex-shrink: 0; }
.email-status__icon--sent { color: #065f46; }
.email-status__icon--warning { color: #b45309; }
.email-status__icon--pending { color: #6b7280; }
.email-status__text { font-size: 0.78rem; color: var(--text-body); }
.email-status__text strong { font-weight: 600; }
.email-status__time { font-size: 0.68rem; color: var(--text-muted); margin-left: 0.5rem; }
.email-status__preview { margin-top: 0.35rem; margin-left: 1.35rem; }
.email-status__section { border-top: 1px solid var(--border); margin-top: 1rem; padding-top: 0.75rem; }
.email-status__preview-toggle { font-size: 0.72rem; color: var(--red); cursor: pointer; font-weight: 600; list-style: none; }
.email-status__preview-toggle::-webkit-details-marker { display: none; }
.email-status__preview-toggle::before { content: "▸ "; }
details[open] > .email-status__preview-toggle::before { content: "▾ "; }
.email-status__preview-body { margin-top: 0.5rem; padding: 0.75rem; background: var(--bg-subtle); border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 0.72rem; color: var(--text-body); line-height: 1.6; }
.email-status__preview-body h4 { font-size: 0.78rem; color: var(--text-heading); margin: 0.5rem 0 0.25rem; }
.email-status__preview-body h4:first-child { margin-top: 0; }
.email-status__preview-body hr { border: none; border-top: 1px solid var(--border); margin: 0.5rem 0; }
.email-status__preview-body a { color: var(--red); }
.font-card { padding: 1.25rem 1.5rem; margin-bottom: 1rem; }
.font-card__title { font-size: 0.72rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.5rem; }
.font-list { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.font-pill { padding: 0.15rem 0.5rem; border-radius: 10px; font-size: 0.65rem; font-weight: 600; }
.font-pill--installed { background: #d1fae5; color: #065f46; }
.font-pill--missing { background: #fee2e2; color: #991b1b; }
.font-note { font-size: 0.68rem; color: var(--text-muted); margin-top: 0.5rem; }
.font-missing-list { list-style: none; padding: 0; margin: 0.5rem 0 0.75rem 0.5rem; }
.font-missing-list li { font-size: 0.72rem; color: #991b1b; padding: 0.2rem 0; }
.log-card { padding: 0; overflow: hidden; margin-bottom: 1rem; }
.log-toolbar { padding: 0.75rem 1rem; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; border-bottom: 1px solid var(--border); }
.log-toolbar__title { font-size: 0.72rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.log-toolbar__count { font-weight: 400; text-transform: none; margin-left: 0.5rem; }
.log-toolbar__controls { display: flex; gap: 0.35rem; align-items: center; }
.log-search-input { padding: 0.3rem 0.5rem; border: 1px solid var(--border); border-radius: var(--radius); font-size: 0.72rem; width: 160px; font-family: var(--font); }
.log-search-input:focus { outline: 2px solid var(--red); outline-offset: 1px; border-color: var(--red); }
.log-filter-btn { padding: 0.25rem 0.6rem; font-size: 0.68rem; }
.log-filter-btn--active { background: var(--red); color: #fff; }
.log-empty { padding: 2rem; text-align: center; color: var(--text-muted); font-size: 0.8rem; }
@media (max-width: 768px) {
  .pipeline-stages { flex-direction: column; gap: 0.25rem; }
  .pipeline-stage { flex-direction: row; gap: 0.5rem; }
  .pipeline-pill { width: auto; flex: 1; }
  .meta-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .log-toolbar { flex-direction: column; align-items: flex-start; }
  .log-toolbar__controls { width: 100%; }
  .log-search-input { flex: 1; width: auto; }
  .job-header { flex-direction: column; gap: 0.5rem; }
}
