/* Indoswift Transcription upload portal */
:root {
    --brand: #9b2c42;
    --brand-dark: #7f2135;
    --bg-1: #7d1d2f;
    --bg-2: #4a1622;
    --bg-3: #2f141b;
    --on-dark: #f8ede9;
    --on-dark-muted: rgba(248, 237, 233, .75);
    --line-dark: rgba(214, 106, 128, .45);
    --card: #fcf8f6;
    --ink: #24232a;
    --ink-muted: #5d5a63;
    --eyebrow: #6b5a69;
    --soft: #f3e3e6;
    --soft-line: #dcc6cc;
    --dropzone: #f8edee;
    --error-bg: #fdeeef;
    --error-ink: #9b2c42;
    --warn-bg: #fdf4e1;
    --warn-ink: #7f4d0f;
    --warn-bar: #8a5410;
    --ok-bg: #e5f2ec;
    --ok-ink: #1f6a4a;
    --radius-card: 24px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
    font-family: "Noto Sans", "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--ink);
    background: var(--bg-3);
    -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }

.page {
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 0 64px;
    background:
        radial-gradient(ellipse at 0% 100%, var(--bg-1) 0%, transparent 60%),
        linear-gradient(125deg, var(--bg-1) 0%, var(--bg-2) 45%, var(--bg-3) 100%);
    color: var(--on-dark);
}

/* ---------- header / footer ---------- */
.top {
    padding: clamp(12px, 3vh, 30px) 0 clamp(10px, 2.4vh, 24px);
    border-bottom: 1px solid var(--line-dark);
}
.logo { display: inline-flex; align-items: center; text-decoration: none; color: var(--on-dark); }
.logo img { height: clamp(46px, 7.5vh, 66px); width: auto; display: block; }
.logo-text {
    flex-direction: column;
    font-weight: 700;
    font-size: 22px;
    letter-spacing: .02em;
    line-height: 1;
}
.logo-text small { font-size: 8px; font-weight: 500; letter-spacing: .04em; margin-top: 3px; opacity: .85; }

.bottom {
    border-top: 1px solid var(--line-dark);
    padding: clamp(8px, 2vh, 18px) 0 clamp(10px, 2.4vh, 22px);
    font-size: 13px;
    color: var(--on-dark-muted);
    text-align: center;
}

/* ---------- main layout ---------- */
.main {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 676px);
    gap: 56px;
    align-items: center;
    padding: clamp(10px, 2.4vh, 24px) 0;
    margin-right: -28px; /* card slightly overhangs like the design */
}

.intro h1 {
    font-weight: 400;
    font-size: clamp(40px, min(6vw, 9.5vh), 84px);
    line-height: 1.08;
    margin: 0 0 clamp(16px, 6vh, 56px);
    letter-spacing: -.005em;
}
.waves {
    display: block;
    width: 100%;
    max-width: 560px;
    height: clamp(50px, 11vh, 100px);
    color: rgba(226, 134, 152, .42);
    margin-bottom: clamp(16px, 5vh, 44px);
}
.features { list-style: none; margin: 0; padding: 0; }
.features li {
    display: flex;
    align-items: center;
    gap: 18px;
    font-weight: 600;
    font-size: clamp(18px, 1.9vw, 27px);
    margin-bottom: 20px;
}
.feat-icon {
    width: 48px; height: 48px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .08);
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.feat-icon svg { width: 24px; height: 24px; fill: none; stroke: var(--on-dark); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- card ---------- */
.card {
    background: var(--card);
    color: var(--ink);
    border-radius: var(--radius-card);
    padding: clamp(24px, 6vh, 52px) 40px clamp(24px, 5.5vh, 48px) 50px;
    min-height: min(648px, 100%);
    max-height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 30px 80px rgba(20, 4, 10, .35);
}
.view { display: flex; flex-direction: column; min-height: 0; }
.view > * { flex-shrink: 0; }
.view > .file-list { flex-shrink: 1; }
.view > .btn { align-self: center; }
.eyebrow {
    margin: 0 0 12px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--eyebrow);
}
.card h2 { margin: 0; font-size: 34px; font-weight: 700; letter-spacing: -.01em; }
.sub { margin: 10px 0 0; color: var(--ink-muted); font-size: 16px; line-height: 1.55; }

/* dropzone */
.dropzone {
    margin-top: 28px;
    border: 1px solid var(--soft-line);
    border-radius: 12px;
    background: var(--dropzone);
    padding: 22px 20px 18px;
    text-align: center;
    transition: background .15s, border-color .15s;
}
.dropzone.is-over { background: #f3dfe3; border-color: var(--brand); border-style: dashed; }
.drop-icon {
    width: 48px; height: 48px; border-radius: 10px;
    background: var(--soft);
    display: inline-flex; align-items: center; justify-content: center;
}
.drop-icon svg { width: 26px; height: 26px; fill: none; stroke: var(--brand); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.drop-title { font-weight: 700; font-size: 19px; margin: 12px 0 4px; }
.drop-or { margin: 0 0 10px; color: var(--ink-muted); font-size: 14px; }
.drop-hint { margin: 8px 0 0; font-size: 12.5px; color: var(--ink-muted); }
.note { margin: 30px 0 0; font-size: 14.5px; color: var(--ink-muted); }

/* buttons */
.btn {
    font: inherit;
    font-weight: 700;
    font-size: 15px;
    border-radius: 8px;
    padding: 15px 36px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background .15s, box-shadow .15s;
}
.btn:focus-visible, .link-btn:focus-visible { outline: 3px solid rgba(155, 44, 66, .35); outline-offset: 2px; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-outline { background: #fff; color: var(--brand); border-color: var(--soft-line); }
.btn-outline:hover { background: var(--error-bg); }
.link-btn {
    font: inherit; font-weight: 700; font-size: 14.5px;
    color: var(--brand); background: none; border: 0; padding: 4px 0; cursor: pointer;
}
.link-btn:hover { text-decoration: underline; }

/* alerts */
.alert {
    border-radius: 10px;
    padding: 18px 19px;
    margin-top: 28px;
    font-size: 14.5px;
    line-height: 1.6;
}
.alert strong { display: block; font-size: 15.5px; }
.alert-error { background: var(--error-bg); color: var(--error-ink); }
.alert-error + .dropzone { margin-top: 24px; }
.alert-warn { background: var(--warn-bg); color: var(--warn-ink); margin-top: clamp(14px, 3.5vh, 32px); }
.alert-confirm { background: var(--error-bg); color: var(--ink-muted); margin-top: clamp(14px, 3.5vh, 32px); }
.alert-confirm strong { color: var(--error-ink); font-size: 17px; margin-bottom: 2px; }
.confirm-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }

/* file list */
.file-list {
    list-style: none;
    margin: clamp(12px, 2.5vh, 22px) 0 0;
    padding: 0 19px;
    background: var(--soft);
    border-radius: 10px;
    /* many files: the list scrolls inside the card, never the page */
    flex: 0 1 auto;
    min-height: 48px;
    max-height: 262px; /* 5 rows; shrinks on short screens */
    overflow-y: auto;
}
.file-list li {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 13px 0;
    font-size: 15px;
    border-bottom: 1px solid var(--soft-line);
}
.file-list li:last-child { border-bottom: 0; }
.file-list .fname { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.file-list .fsize { color: var(--ink-muted); white-space: nowrap; font-size: 14px; }
.file-list li.is-done .fsize::before { content: "\2713  "; color: var(--ok-ink); font-weight: 700; }
.file-list li { align-items: center; }
.file-list .fname { flex: 1; }
.fnum {
    flex-shrink: 0;
    width: 24px; height: 24px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: #fff; color: var(--brand);
    font-size: 12px; font-weight: 700;
    border: 1px solid var(--soft-line);
    margin-right: -4px;
}
.list-label { margin: clamp(12px, 2.5vh, 20px) 0 0; font-size: 13px; font-weight: 700; color: var(--eyebrow); letter-spacing: .04em; }
.list-label + .file-list { margin-top: 8px; }

/* reference number: deliberately unlike the file list */
.ref-card {
    display: flex; flex-direction: column; gap: 2px;
    margin-top: clamp(12px, 2.5vh, 22px);
    padding: 14px 18px;
    background: #fff;
    border: 2px dashed var(--brand);
    border-radius: 12px;
}
.ref-label { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--eyebrow); }
.ref-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ref-number {
    font-family: "Consolas", "SFMono-Regular", Menlo, monospace;
    font-size: clamp(24px, 3.6vh, 30px);
    font-weight: 700; letter-spacing: .08em;
    color: var(--brand);
    user-select: all;
}
.ref-hint { font-size: 12.5px; color: var(--ink-muted); }
.copy-btn {
    font: inherit; font-size: 13px; font-weight: 700;
    color: var(--brand); background: var(--error-bg);
    border: 1px solid var(--soft-line); border-radius: 6px;
    padding: 6px 12px; cursor: pointer;
}
.copy-btn:hover { background: var(--soft); }

/* centred action buttons */
.actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: clamp(14px, 3vh, 26px); }
.view > .actions { align-self: stretch; }
.actions-hint { margin: 10px 0 0; text-align: center; font-size: 12.5px; color: var(--ink-muted); }
/* ---------- final screen: centred confirmation, compact ---------- */
#view-done { margin-top: auto; margin-bottom: auto; text-align: center; }
.done-head { display: flex; flex-direction: column; align-items: center; gap: clamp(8px, 1.6vh, 14px); }
.done-head .done-icon { margin: 0; width: clamp(44px, 7vh, 60px); height: clamp(44px, 7vh, 60px); border-radius: 50%; }
.done-head .done-icon svg { width: 55%; height: 55%; }
.done-head h2 { margin: 0 !important; font-size: clamp(24px, 3.6vh, 32px); }
#view-done .sub { margin-top: 6px; font-size: 15px; line-height: 1.5; }
#view-done .ref-bar { text-align: left; }
#done-files li { text-align: left; }
/* reference number: one slim line, still unlike the file tiles */
.ref-bar {
    display: flex; align-items: center; gap: 12px;
    margin-top: clamp(10px, 2vh, 16px);
    padding: 8px 10px 8px 16px;
    background: #fff;
    border: 1.5px dashed var(--brand);
    border-radius: 10px;
}
.ref-bar .ref-label { font-size: 11.5px; }
.ref-bar .ref-number { font-size: 20px; letter-spacing: .06em; margin-right: auto; }
#view-done .list-label { margin-top: clamp(10px, 2vh, 18px); }

/* files as tiles in two columns: 5 files take 3 rows */
#done-files {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); /* 1 file = full width */
    gap: 8px;
    padding: 0;
    background: transparent;
    border-radius: 0;
    min-height: 44px;
    max-height: none;
}
#done-files li {
    padding: 8px 12px;
    border: 0;
    border-radius: 8px;
    background: var(--soft);
    gap: 10px;
    font-size: 14px;
    min-width: 0;
}
#done-files .fnum { width: 22px; height: 22px; font-size: 11.5px; margin-right: 0; }
#done-files .fsize { font-size: 13px; }
#view-done .actions { margin-top: clamp(12px, 2.4vh, 22px); }

/* short screens (small laptops, zoomed browsers): drop the extras */
@media (min-width: 901px) and (max-height: 720px) {
    .done-head .done-icon, .actions-hint, #view-done .list-label { display: none; }
    #done-files { margin-top: 10px; gap: 6px; }
    #done-files li { padding: 6px 12px; }
    #view-done .actions { margin-top: 12px; }
    #view-done .btn { padding-top: 12px; padding-bottom: 12px; }
    .card { padding-top: 22px; padding-bottom: 22px; }
}

/* "Upload more" banner */
.append-banner {
    display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
    margin-top: 18px; padding: 12px 16px;
    background: #fff; border: 1px solid var(--soft-line); border-left: 4px solid var(--brand);
    border-radius: 8px; font-size: 14.5px; color: var(--ink-muted);
}
.append-banner strong { color: var(--brand); letter-spacing: .04em; }
.append-banner .link-btn { font-size: 13.5px; }

.secure-note { display: flex; align-items: flex-start; gap: 8px; }
.secure-note svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; fill: none; stroke: var(--ok-ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }


/* progress */
.progress-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: clamp(12px, 3vh, 26px); }
.percent { font-size: clamp(34px, 5.5vh, 48px); font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.eta { font-weight: 700; font-size: 15px; color: var(--ink-muted); text-align: right; }
.bar { height: 9px; border-radius: 9px; background: var(--soft); margin-top: 10px; overflow: hidden; }
.bar-fill { display: block; height: 100%; width: 0; background: var(--brand); border-radius: 9px; transition: width .3s ease; }
.is-paused .bar-fill { background: var(--warn-bar); }
.progress-foot { display: flex; justify-content: space-between; margin-top: 12px; font-size: 14.5px; color: var(--ink-muted); }

.upload-foot {
    display: flex; justify-content: space-between; align-items: center; gap: 16px;
    margin-top: clamp(16px, 4.5vh, 40px); padding-top: clamp(10px, 2vh, 18px);
    border-top: 1px solid var(--soft-line);
    font-size: 14.5px; color: var(--ink-muted);
}
.is-paused .upload-foot #up-foot-text { visibility: hidden; }

/* done */
.done-icon {
    width: 50px; height: 50px; border-radius: 10px;
    background: var(--ok-bg);
    display: inline-flex; align-items: center; justify-content: center;
    margin-bottom: clamp(10px, 2.5vh, 22px);
    flex-shrink: 0;
}
.done-icon svg { width: 26px; height: 26px; fill: none; stroke: var(--ok-ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.done-title { margin-bottom: 4px !important; }
.reference {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    background: var(--soft); border-radius: 10px;
    padding: 16px 19px; margin: clamp(12px, 2.5vh, 22px) 0 clamp(14px, 3.5vh, 30px);
    font-weight: 700; font-size: 15px;
}
.reference strong { color: var(--brand); font-size: 15.5px; letter-spacing: .03em; user-select: all; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
    .page { padding: 0 36px; }
    .main { gap: 36px; margin-right: 0; }
    .card { padding: 40px 32px; }
}
@media (max-width: 900px) {
    /* phones/tablets: stacked layout, normal page flow */
    .page { height: auto; min-height: 100vh; }
    .card { max-height: none; }
    .main { grid-template-columns: minmax(0, 1fr); align-content: start; gap: 28px; padding: 32px 0; }
    .intro h1 { margin-bottom: 24px; }
    .waves { margin-bottom: 20px; height: 70px; }
    .card { min-height: 0; }
}
@media (max-width: 560px) {
    .page { padding: 0 16px; }
    .top { padding: 22px 0 18px; }
    .logo img { height: 44px; }
    .waves { display: none; }
    .features li { font-size: 17px; gap: 12px; }
    .feat-icon { width: 38px; height: 38px; }
    .card { padding: 28px 20px; border-radius: 18px; }
    .card h2 { font-size: 26px; }
    .percent { font-size: 38px; }
    .btn { padding: 13px 24px; }
    .confirm-actions .btn, .actions .btn { flex: 1; padding-left: 12px; padding-right: 12px; }
    .upload-foot { flex-direction: column; align-items: flex-start; }
}
