﻿:root {
    --ink: #111111;
    --body: #374151;
    --muted: #6b7280;
    --hair: #e5e7eb;
    --hair-soft: #f3f4f6;
    --canvas: #ffffff;
    --soft: #f8f9fa;
    --table-head: #eef2f7;
    --on: #ffffff;
    --brand-blue: #0f73f6;
    --brand-blue-soft: rgba(15, 115, 246, 0.08);
    --success-color: #10b981;
    --text-muted: #6b7280;
    --pill: 9999px;
    --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

/* ==========================================================
   БАЗОВЫЕ СТИЛИ СТРАНИЦЫ
   ========================================================== */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: radial-gradient(circle at 50% 220px, rgba(37, 99, 235, 0.10), transparent 320px), linear-gradient(180deg, #eef0f4 0%, #f7f8fb 42%, #ffffff 100%);
    color: var(--ink);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.5;
}

a {
    color: inherit;
}

button,
input,
.btn {
    font: inherit;
}

.page {
    min-height: 100vh;
    background: transparent;
}

/* ==========================================================
   ШАПКА
   ========================================================== */

.top-nav {
    position: sticky;
    top: 0;
    z-index: 20;

    height: 72px;

    background: rgba(255, 255, 255, 0.68);
    backdrop-filter: blur(12px);

    border-bottom: 1px solid rgba(255, 255, 255, 0.72);

    box-shadow: 0 16px 40px rgba(17, 24, 39, 0.04);

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding-left: 36px;
    padding-right: 36px;
}


/* ==========================================================
   ОБЩИЕ СТИЛИ КНОПОК
   ========================================================== */

.btn {
    height: 46px;
    border-radius: var(--pill);
    padding: 0 26px;
    border: 1px solid transparent;
    background: linear-gradient(180deg, #2f8bff 0%, #0f73f6 100%);
    color: var(--on);
    font-size: 14px;
    line-height: 1;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
    box-shadow: 0 16px 32px rgba(15, 115, 246, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.btn:hover {
    background: linear-gradient(180deg, #1d7df6 0%, #075ed2 100%);
}

.btn.secondary {
    color: #111827;
    border-color: rgba(17, 24, 39, 0.08);
    background: rgba(255, 255, 255, 0.72);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 12px 28px rgba(17, 24, 39, 0.05);
}

.btn.secondary:hover {
    background: var(--soft);
}

/* ==========================================================
   ЭЛЕМЕНТЫ УПРАВЛЕНИЯ В ТАБЛИЦЕ
   ========================================================== */

.status-pill {
    height: 34px;
    padding: 0 16px;
    border-radius: var(--pill);

    display: inline-flex;
    align-items: center;
    justify-content: center;

    font-size: 13px;
    font-weight: 600;
    line-height: 1;

    white-space: nowrap;

    border: 1px solid transparent;
}


.status-pill.completed {
    color: #16a34a;
    background: rgba(22,163,74,0.08);
}


.status-pill.processing {
    color: #0f73f6;
    background: rgba(15,115,246,0.08);
}


.status-pill.error {
    color: #dc2626;
    background: rgba(220,38,38,0.08);
}

/* кнопки в таблице */

.table-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.table-btn {
    height: 34px;
    padding: 0 16px;

    border-radius: 9px;

    font-size: 13px;
    font-weight: 600;

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.85),
        0 8px 18px rgba(17,24,39,0.08);
}


.table-btn.download {
    color:#0f73f6;

    background:#ffffff;

    border-color:
        rgba(37,99,235,0.14);
}


.table-btn.download:hover {

    background:#ffffff;

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.92),
        0 12px 28px rgba(37,99,235,0.08);
}


.actions {
    display:flex;
    gap:10px;
    align-items:center;
    justify-content:flex-end;
}

/* ==========================================================
   ОСНОВНОЙ КОНТЕНТ И ПРИВЕТСТВЕННЫЙ БЛОК
   ========================================================== */

.main {
    flex: 1;
    min-width: 0;

    height: calc(100vh - 72px);

    overflow-y: auto;
}

.main > * {
    max-width: 1180px;
    margin-left: auto;
    margin-right: auto;
}

/* ==========================================================
   ПУБЛИЧНЫЙ ЛЕНДИНГ
   ========================================================== */

.landing-header-nav,
.landing-login-button {
    display: none;
}

body.landing-active .landing-header-nav {
    display: flex;
    align-items: center;
    gap: 26px;
    margin-left: auto;
    margin-right: auto;
    color: #465368;
    font-size: 15px;
}

body.landing-active .landing-header-nav a {
    text-decoration: none;
}

/* На лендинге используем те же размеры шапки, что и в приложении,
   но центральную навигацию держим действительно по центру окна. */
body.landing-active .top-nav {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
}

body.landing-active .header-actions {
    justify-content: flex-end;
}

body.landing-active .landing-header-nav a:hover {
    color: var(--brand-blue);
}

body.landing-active .landing-login-button {
    display: inline-flex;
    height: 36px;
    padding: 0 18px;
    border-radius: 9px;
    font-size: 13px;
    box-shadow: none;
}

.landing-page {
    --landing-ink: #101827;
    --landing-muted: #5f6b7a;
    --landing-line: #dfe5ed;
    --landing-soft: #f5f8fc;
    color: var(--landing-ink);
    background: #fff;
    font-family: var(--font);
}

.landing-page[hidden] { display: none; }

/* Собственное display:flex у каркаса приложения не должно отменять hidden. */
.app-layout[hidden] { display: none; }

.landing-container {
    width: min(1160px, calc(100% - 48px));
    margin: 0 auto;
}

.landing-hero {
    overflow: hidden;
    padding: 90px 0 76px;
    background: radial-gradient(circle at 73% 35%, rgba(15, 115, 246, 0.14), transparent 26%), linear-gradient(180deg, #f8fbff 0%, #fff 88%);
}

.landing-hero-grid,
.landing-pricing {
    display: grid;
    grid-template-columns: 1.02fr .98fr;
    align-items: center;
    gap: 56px;
}

.landing-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    color: #0b5fc8;
    background: rgba(15, 115, 246, .1);
    font-size: 13px;
    font-weight: 650;
}

.landing-page h1 {
    max-width: 620px;
    margin: 17px 0 18px;
    font-size: clamp(42px, 5vw, 64px);
    line-height: 1.06;
    letter-spacing: -2.2px;
}

.landing-hero-copy > p,
.landing-lead {
    max-width: 660px;
    margin: 0;
    color: var(--landing-muted);
    font-size: 18px;
    line-height: 1.55;
}

.landing-hero-actions {
    display: flex;
    margin-top: 30px;
}

.landing-signup-button {
    height: 46px;
    padding: 0 24px;
    border-radius: 9px;
    font-size: 14px;
}

.landing-microcopy {
    max-width: 600px;
    margin-top: 14px;
    color: #6b7788;
    font-size: 15px;
}

.landing-product-window {
    overflow: hidden;
    border: 1px solid #d7e1ee;
    border-radius: 19px;
    background: #fff;
    box-shadow: 0 28px 70px rgba(23, 53, 93, .16);
    transform: rotate(1.5deg);
}

.landing-window-head {
    display: flex;
    align-items: center;
    gap: 7px;
    height: 42px;
    padding: 0 17px;
    border-bottom: 1px solid #edf1f5;
}

.landing-window-head i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d4dce8;
}

.landing-window-body {
    display: grid;
    grid-template-columns: 122px 1fr;
    min-height: 350px;
}

.landing-mock-sidebar {
    padding: 21px 14px;
    border-right: 1px solid #edf1f5;
    background: #f7f9fc;
}

.landing-mock-logo { color: var(--brand-blue); font-size: 17px; font-weight: 800; letter-spacing: -.5px; }
.landing-mock-nav { display: grid; gap: 11px; margin-top: 28px; color: #687487; font-size: 11px; }
.landing-mock-nav b { padding: 8px 9px; border-radius: 7px; color: #0d65d7; background: #eaf3ff; }
.landing-mock-main { padding: 27px 25px; }
.landing-mock-main h2 { margin: 0; font-size: 20px; letter-spacing: -.4px; }
.landing-mock-line { width: 46%; height: 9px; margin-top: 11px; border-radius: 9px; background: #e6ebf2; }

.landing-upload-preview {
    display: grid;
    min-height: 130px;
    margin-top: 25px;
    border: 1.5px dashed #a9c9f8;
    border-radius: 11px;
    background: #f8fbff;
    place-items: center;
    text-align: center;
}

.landing-upload-preview strong { display: grid; width: 35px; height: 35px; margin: 0 auto 7px; border-radius: 50%; color: var(--brand-blue); background: #deedff; place-items: center; font-size: 22px; }
.landing-upload-preview b,.landing-upload-preview small { display: block; }
.landing-upload-preview b { color: #3e4e63; font-size: 12px; }
.landing-upload-preview small { margin-top: 3px; color: #7b8797; font-size: 10px; }
.landing-file-preview { display: flex; align-items: center; gap: 9px; margin-top: 18px; padding: 10px; border: 1px solid #e7ecf2; border-radius: 9px; font-size: 11px; }
.landing-file-preview i { width: 24px; height: 29px; border-radius: 4px; background: #e2efff; }
.landing-file-preview em { flex: 1; height: 7px; border-radius: 8px; background: #e9eef5; }

.landing-section { padding: 100px 0; }
.landing-soft { background: var(--landing-soft); }
.landing-kicker { color: var(--brand-blue); font-size: 13px; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; }
.landing-page h2 { max-width: 720px; margin: 10px 0 14px; font-size: clamp(31px, 4vw, 46px); line-height: 1.12; letter-spacing: -1.4px; }

.landing-service-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; margin-top: 44px; }
.landing-service { min-height: 286px; padding: 31px; border: 1px solid var(--landing-line); border-radius: 18px; background: #fff; }
.landing-service > span,.landing-audience-grid article > span { display: grid; width: 46px; height: 46px; border-radius: 13px; color: var(--brand-blue); background: #e8f2ff; place-items: center; font-size: 23px; }
.landing-service-icon img { width: 23px; height: 23px; object-fit: contain; }
.landing-service h3 { margin: 23px 0 8px; font-size: 24px; letter-spacing: -.5px; }
.landing-service p,.landing-audience-grid p,.landing-steps p { margin: 0; color: var(--landing-muted); }
.landing-service ul { display: grid; gap: 8px; margin: 20px 0 0; padding: 0; list-style: none; color: #334155; font-size: 14px; }
.landing-service li::before { content: "✓"; margin-right: 9px; color: var(--brand-blue); font-weight: 800; }

.landing-audience-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 42px; }
.landing-audience-grid article { min-height: 176px; padding: 22px; border: 1px solid var(--landing-line); border-radius: 14px; background: #fff; }
.landing-audience-grid article > span { width: 36px; height: 36px; border-radius: 10px; font-size: 18px; }
.landing-audience-grid h3 { margin: 16px 0 5px; font-size: 17px; letter-spacing: -.2px; }
.landing-audience-grid p { font-size: 14px; }

.landing-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 44px; }
.landing-steps article { position: relative; padding-top: 68px; }
.landing-steps b { position: absolute; top: 0; left: 0; display: grid; width: 42px; height: 42px; border-radius: 50%; color: var(--brand-blue); background: #e8f2ff; place-items: center; }
.landing-steps article:not(:last-child)::after { content: ""; position: absolute; top: 20px; left: 57px; right: -14px; height: 1px; background: #d4dfed; }
.landing-steps h3 { margin: 0 0 8px; font-size: 20px; }

.landing-checks { display: grid; gap: 17px; margin-top: 28px; }
.landing-checks p { display: grid; grid-template-columns: 28px 1fr; gap: 12px; margin: 0; color: var(--landing-muted); font-size: 14px; }
.landing-checks b { display: grid; width: 28px; height: 28px; border-radius: 50%; color: var(--brand-blue); background: #e7f2ff; place-items: center; }
.landing-checks strong { display: block; margin-bottom: 2px; color: var(--landing-ink); }
.landing-pricing aside { padding: 34px; border-radius: 19px; color: #fff; background: linear-gradient(145deg, #0d274c, #0e65d4); box-shadow: 0 25px 50px rgba(9,66,141,.24); }
.landing-pricing aside small { color: #cfe4ff; font-size: 13px; font-weight: 650; }
.landing-pricing aside h3 { margin: 12px 0 5px; font-size: 30px; line-height: 1.2; letter-spacing: -.8px; }
.landing-pricing aside p { margin: 0; color: #d8e9ff; }
.landing-credit-rules { display: grid; gap: 16px; margin-top: 18px; }
.landing-credit-rules p { display: grid; gap: 3px; }
.landing-credit-rules strong { color: #fff; font-size: 16px; }
.landing-credit-rules span { color: #d8e9ff; font-size: 18px; font-weight: 650; }
.landing-pricing aside ul { display: grid; gap: 12px; margin: 28px 0 0; padding: 23px 0 0; border-top: 1px solid rgba(255,255,255,.22); list-style: none; font-size: 14px; }
.landing-pricing aside li::before { content: "•"; margin-right: 8px; }
.landing-pricing-offer { margin-top: 28px; padding: 34px 34px 20px; border: 1px solid #dbeafe; border-bottom: 0; border-radius: 19px 19px 0 0; background: linear-gradient(135deg, #f5faff, #fff); }
.landing-pricing-offer-label { margin: 0 0 18px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .08em; }
.landing-pricing-offer-copy p { margin: 6px 0; color: var(--body); font-weight: 650; }
.landing-pricing-offer-copy .landing-pricing-offer-free { margin-top: 16px; color: var(--muted); font-size: 14px; font-weight: 400; }
.landing-pricing-package-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 28px; }
.landing-pricing-package-grid article { min-height: 130px; padding: 20px; border: 1px solid #dce8f7; border-radius: 13px; background: rgba(255,255,255,.8); }
.landing-pricing-package-grid h3 { margin: 0; color: var(--ink); font-size: 18px; }
.landing-pricing-package-grid p { margin: 7px 0 20px; color: var(--muted); font-size: 14px; }
.landing-pricing-package-grid strong { color: var(--brand-blue); font-size: 22px; }
.landing-payment-section { position: relative; z-index: 1; margin-top: -100px; padding: 0 0 72px; background: transparent; }
.landing-payment-section .landing-container { border: 1px solid #dbeafe; border-top: 0; border-radius: 0 0 19px 19px; background: linear-gradient(135deg, #f5faff, #fff); }
.landing-payment-methods { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 18px 34px 30px; color: var(--muted); font-size: 13px; }
.landing-payment-methods > div { display: flex; align-items: center; gap: 9px; }
.payment-logo { display: block; width: auto; height: 27px; max-width: 54px; object-fit: contain; }

.landing-cta { padding: 76px 0; color: #fff; background: linear-gradient(115deg, #075dd0, #1685fb); text-align: center; }
.landing-cta h2 { margin-right: auto; margin-left: auto; }
.landing-cta p { max-width: 560px; margin: 0 auto 25px; color: #dcecff; font-size: 18px; }
.landing-cta .btn { height: 44px; border-color: transparent; border-radius: 9px; color: #0b63cf; background: #fff; box-shadow: none; }

.landing-footer { padding: 34px 0; color: #687487; background: #fff; font-size: 13px; }
.landing-footer .landing-container { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.landing-footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
.landing-footer button { padding: 0; border: 0; color: inherit; background: transparent; font: inherit; cursor: pointer; }
.landing-footer button:hover { color: var(--brand-blue); }
.landing-footer p { margin: 0; white-space: nowrap; }

@media (max-width: 980px) {
    body.landing-active .landing-header-nav { display: none; }
    body.landing-active .top-nav { display: flex; }
    .landing-hero-grid,.landing-pricing { grid-template-columns: 1fr; gap: 38px; }
    .landing-pricing-package-grid { grid-template-columns: repeat(2, 1fr); }
    .landing-product-window { max-width: 620px; transform: none; }
    .landing-audience-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 680px) {
    .landing-container { width: min(100% - 32px, 580px); }
    .landing-hero { padding: 60px 0 55px; }
    .landing-page h1 { font-size: 44px; letter-spacing: -1.5px; }
    .landing-section { padding: 68px 0; }
    .landing-service-grid,.landing-audience-grid,.landing-steps { grid-template-columns: 1fr; }
    .landing-steps article:not(:last-child)::after { display: none; }
    .landing-window-body { grid-template-columns: 96px 1fr; }
    .landing-mock-main { padding: 21px 16px; }
    .landing-footer .landing-container { align-items: flex-start; flex-direction: column; }
    .landing-footer p { white-space: normal; }
}

.app-footer {
    width: 100%;
    margin: 48px auto 28px;
    border-top: 1px solid #e5e7eb;
    color: #94a3b8;
    font-size: 13px;
    line-height: 1.45;
}

.main:has(.pricing-page:not([hidden])) .app-footer {
    width: min(1120px, calc(100% - 48px));
}

.app-footer-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px 0;
}

.app-footer-link {
    padding: 0;
    border: 0;
    background: transparent;
    color: #64748b;
    font: inherit;
    cursor: pointer;
    transition: color .18s ease;
}

.app-footer-link:hover,
.app-footer-link:focus-visible {
    color: var(--brand-blue);
}

.app-footer-copyright {
    padding: 16px 0 0;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}


.hero {
    max-width: 1120px;
    margin: 0 auto;
    padding: 42px 0 0;
    text-align: left;
}

.hero-copy {
    display: block;
}

.badge {
    width: max-content;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    border-radius: var(--pill);
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.8);
    color: var(--ink);
    font-size: 13px;
    line-height: 1.4;
    font-weight: 500;
    box-shadow: 0 12px 28px rgba(17, 24, 39, 0.05);
}

.badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success-color);
}

h1 {
    margin: 0;
    max-width: 850px;
    color: #111827;
    font-family: var(--font);
    font-size: clamp(42px, 6vw, 64px);
    line-height: 1.05;
    letter-spacing: -2px;
    font-weight: 600;
}

.about-page h1 {
    font-size: 42px;
}

.lead {
    margin: 0;
    max-width: none;
    color: #5f6673;
    font-size: 18px;
    line-height: 1.55;
}

.app-page[hidden] {
    display: none;
}

.home-page .upload-section {
    padding-top: 0;
}

.how-page {
    padding-bottom: 72px;
}

.how-page .how-page-heading {
    text-align: center;
}

.how-content {
    width: 100%;
    display: grid;
    gap: 22px;
}

.how-tabs {
    width: 100%;
    display: flex;
    gap: 32px;
    margin: 0 0 2px;
    padding: 0;
    border-bottom: 0;
}

.how-tab {
    min-height: 48px;
    margin-bottom: -1px;
    padding: 10px 2px;
    border: 0;
    border-bottom: 2px solid transparent;
    color: #374151;
    background: transparent;
    cursor: pointer;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    transition: color .18s, background .18s, box-shadow .18s;
}

.how-tab:hover {
    color: var(--brand-blue);
}

.how-tab.active {
    color: var(--brand-blue);
    border-bottom-color: var(--brand-blue);
    background: transparent;
    box-shadow: none;
}

.how-tab-panel {
    display: grid;
    gap: 22px;
}

.how-tab-panel[hidden] {
    display: none;
}

.how-intro-card,
.how-info-card,
.how-format-card {
    border: 1px solid rgba(255, 255, 255, 0.86);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 20px 54px rgba(17, 24, 39, 0.07);
    backdrop-filter: blur(16px);
}

.how-intro-card {
    padding: 36px;
    border-radius: 12px;
    text-align: center;
}

.how-eyebrow {
    display: inline-flex;
    padding: 6px 12px;
    border-radius: 999px;
    color: var(--brand-blue);
    background: var(--brand-blue-soft);
    font-size: 13px;
    font-weight: 700;
}

.how-intro-card h2 {
    margin: 16px 0 0;
    color: var(--ink);
    font-size: 32px;
    line-height: 1.2;
    letter-spacing: -.6px;
}

.how-intro-card > p {
    max-width: 760px;
    margin: 12px auto 0;
    color: var(--body);
    font-size: 16px;
    line-height: 1.6;
}

.how-result-flow {
    max-width: 720px;
    display: grid;
    grid-template-columns: 1fr 46px 1fr;
    align-items: center;
    gap: 14px;
    margin: 28px auto 0;
}

.how-result-flow > div {
    display: grid;
    gap: 5px;
    padding: 18px 20px;
    border: 1px solid #dbe5f2;
    border-radius: 10px;
    background: #f8fbff;
}

.how-result-flow span {
    color: #7b8492;
    font-size: 13px;
}

.how-result-flow strong {
    color: #1f2937;
    font-size: 17px;
}

.how-result-flow .how-flow-arrow {
    color: var(--brand-blue);
    font-size: 25px;
    font-weight: 600;
}

.how-details-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.how-info-card {
    padding: 28px 30px;
    border-radius: 12px;
}

.how-info-card h3,
.how-format-card h3 {
    margin: 0;
    color: var(--ink);
    font-size: 21px;
    line-height: 1.3;
    font-weight: 600;
}

.how-check-list {
    display: grid;
    gap: 12px;
    margin: 20px 0 0;
    padding: 0;
    list-style: none;
}

.how-check-list li {
    position: relative;
    padding-left: 28px;
    color: var(--body);
    line-height: 1.5;
}

.how-check-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--brand-blue);
    font-weight: 700;
}

.how-price-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, .9), rgba(238, 246, 255, .86));
}

.how-price {
    display: block;
    margin-top: 18px;
    color: var(--brand-blue);
    font-size: 20px;
    line-height: 1.4;
}

.how-price-card p {
    margin: 10px 0 0;
    color: var(--body);
    line-height: 1.55;
}

.how-format-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: 26px 30px;
    border-radius: 12px;
}

.how-format-card p {
    margin: 8px 0 0;
    color: var(--body);
    line-height: 1.55;
}

.how-format-card-stacked p + p {
    margin-top: 6px;
}

.how-start-button {
    flex: 0 0 auto;
    height: 44px;
    min-width: 190px;
    border-radius: 9px;
    box-shadow: 0 9px 20px rgba(15, 115, 246, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.how-story-card,
.how-section-card {
    border: 1px solid rgba(255, 255, 255, 0.86);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 20px 54px rgba(17, 24, 39, 0.07);
    backdrop-filter: blur(16px);
}

.how-story-card {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(320px, .88fr);
    align-items: center;
    gap: 28px;
    padding: 34px 38px;
    overflow: hidden;
}

.how-story-copy h2,
.how-section-heading h2 {
    margin: 14px 0 0;
    color: var(--ink);
    font-size: 30px;
    line-height: 1.24;
    letter-spacing: -.5px;
    font-weight: 600;
}

.how-story-copy p {
    margin: 13px 0 0;
    color: var(--body);
    font-size: 16px;
    line-height: 1.65;
}

.how-story-card > img {
    width: 100%;
    max-height: 340px;
    object-fit: contain;
    mix-blend-mode: multiply;
}

.how-section-card {
    padding: 34px 38px;
}

#howTranscriptionRequirements,
#howTranscriptionPricing,
#howTranslationRequirements,
#howTranslationPricing {
    scroll-margin-top: 22px;
}

.how-section-heading {
    max-width: 850px;
}

.how-section-heading > span {
    color: var(--brand-blue);
    font-size: 13px;
    line-height: 1.4;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.how-section-heading > p {
    margin: 10px 0 0;
    color: var(--body);
    font-size: 16px;
    line-height: 1.6;
}

.how-benefit-grid,
.how-requirements-grid,
.how-example-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 24px;
}

.how-benefit-grid article,
.how-requirements-grid > div,
.how-example-grid article {
    padding: 20px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fbff;
}

.how-benefit-grid strong,
.how-requirements-grid strong,
.how-example-grid strong {
    display: block;
    color: #1f2937;
    font-size: 16px;
    line-height: 1.45;
    font-weight: 600;
}

.how-benefit-grid p,
.how-requirements-grid p,
.how-example-grid p {
    margin: 7px 0 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.55;
}

.how-steps-list {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin: 26px 0 0;
    padding: 0;
    list-style: none;
    counter-reset: how-step;
}

.how-steps-list li {
    position: relative;
    min-height: 210px;
    padding: 56px 18px 20px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
    counter-increment: how-step;
}

.how-steps-list li::before {
    content: counter(how-step);
    position: absolute;
    top: 18px;
    left: 18px;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #ffffff;
    background: var(--brand-blue);
    font-size: 13px;
    font-weight: 700;
}

.how-steps-list b {
    display: block;
    color: #1f2937;
    font-size: 15px;
    line-height: 1.45;
}

.how-steps-list p {
    margin: 9px 0 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.55;
}

.how-steps-four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.how-assurance {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    align-items: center;
    gap: 26px;
    margin-top: 24px;
    padding: 12px 24px 12px 12px;
    border-radius: 10px;
    background: linear-gradient(135deg, #f2f8ff, #ffffff);
}

.how-assurance img {
    width: 190px;
    height: 142px;
    object-fit: cover;
    mix-blend-mode: multiply;
}

.how-assurance strong {
    color: #1f2937;
    font-size: 17px;
}

.how-assurance p {
    margin: 8px 0 0;
    color: #64748b;
    line-height: 1.6;
}

.how-note {
    margin: 20px 0 0;
    padding: 14px 16px;
    border-left: 3px solid var(--brand-blue);
    border-radius: 0 8px 8px 0;
    color: #526173;
    background: #f4f8fd;
    font-size: 14px;
    line-height: 1.55;
}

.how-technical-list {
    display: grid;
    gap: 9px;
    margin: 20px 0 0;
    padding-left: 20px;
    color: var(--body);
    line-height: 1.55;
}

.how-technical-list li::marker {
    color: var(--brand-blue);
}

.how-language-list {
    column-count: 4;
    column-gap: 24px;
    margin: 24px 0 0;
    padding: 0;
    list-style: none;
}

.how-language-list li {
    min-width: 0;
    padding: 7px 0;
    border-bottom: 1px solid #e6edf5;
    break-inside: avoid;
    color: #526173;
    font-size: 14px;
    line-height: 1.45;
}

.how-cost-section {
    background: linear-gradient(135deg, rgba(255, 255, 255, .94), rgba(238, 246, 255, .88));
}

.how-pricing-details {
    margin-top: 22px;
    color: var(--body);
    line-height: 1.55;
}

.how-pricing-details > p {
    margin: 0;
}

.how-pricing-details ul {
    display: grid;
    gap: 8px;
    margin: 12px 0 0;
    padding-left: 20px;
}

.how-pricing-details li::marker {
    color: var(--brand-blue);
}

.how-examples-title {
    margin: 26px 0 14px;
    color: var(--ink);
    font-size: 16px;
    line-height: 1.3;
}

.how-example-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.how-example-grid article > span {
    display: block;
    margin-bottom: 9px;
    color: #7b8492;
    font-size: 13px;
    font-weight: 500;
}

.how-cost-section > .how-start-button,
.how-supported-languages > .how-start-button,
#howTranscriptionRequirements > .how-start-button {
    display: block;
    margin: 26px 0 0 auto;
}

@media (max-width: 1000px) {
    .how-language-list {
        column-count: 2;
    }
}

@media (max-width: 760px) {
    .how-tabs {
        gap: 24px;
    }

    .how-details-grid,
    .how-result-flow {
        grid-template-columns: 1fr;
    }

    .how-story-card,
    .how-benefit-grid,
    .how-requirements-grid,
    .how-example-grid,
    .how-steps-list,
    .how-steps-four,
    .how-assurance,
    .how-language-list {
        grid-template-columns: 1fr;
    }

    .how-language-list {
        column-count: 1;
    }

    .how-story-card,
    .how-section-card {
        padding: 26px 22px;
    }

    .how-steps-list li {
        min-height: 0;
    }

    .how-assurance {
        padding: 16px;
    }

    .how-assurance img {
        width: 100%;
        height: auto;
    }

    .how-flow-arrow {
        transform: rotate(90deg);
    }

    .how-format-card {
        align-items: stretch;
        flex-direction: column;
    }
}

.about-content {
    display: grid;
    gap: 24px;
    padding: 0 0 86px;
}

.about-card {
    border: 1px solid rgba(255, 255, 255, 0.86);
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 20px 54px rgba(17, 24, 39, 0.07);
    backdrop-filter: blur(16px);
}

.about-card {
    padding: 30px;
    border-radius: 12px;
}

.about-card h2 {
    margin: 0;
    color: var(--ink);
    font-size: 30px;
    line-height: 1.25;
    letter-spacing: -0.4px;
    font-weight: 600;
}

.about-card p {
    margin: 12px 0 0;
    color: var(--body);
    line-height: 1.65;
}

.about-product-intro,
.about-future,
.about-audience {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(280px, .7fr);
    align-items: center;
    gap: 38px;
}

.about-product-intro {
    overflow: hidden;
    background: linear-gradient(135deg, rgba(255, 255, 255, .96), rgba(233, 245, 255, .9));
}

.about-eyebrow {
    display: block;
    margin-bottom: 12px;
    color: var(--brand-blue);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.about-showcase-image,
.about-future img {
    width: 100%;
    max-height: 260px;
    object-fit: contain;
}

.about-section-title {
    max-width: 800px;
}

.about-values-grid {
    display: grid;
    gap: 16px;
    margin-top: 24px;
}

.about-values-grid article {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
}

.about-values-grid h3 {
    margin: 0;
    color: var(--ink);
    font-size: 18px;
    line-height: 1.3;
}

.about-values-grid p {
    margin: 10px 0 0;
    color: var(--body);
    line-height: 1.55;
}

.about-values-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.about-values-grid article {
    padding: 21px;
}

.about-audience {
    align-items: start;
    background: linear-gradient(135deg, rgba(255, 255, 255, .95), rgba(241, 248, 255, .9));
}

.about-audience-list {
    display: grid;
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.about-audience-list li {
    display: grid;
    gap: 4px;
    padding-bottom: 14px;
    border-bottom: 1px solid #dce8f2;
}

.about-audience-list li:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.about-audience-list strong {
    color: var(--ink);
}

.about-audience-list span {
    color: var(--body);
    font-size: 14px;
    line-height: 1.45;
}

.about-future {
    background: linear-gradient(135deg, rgba(249, 253, 255, .98), rgba(232, 244, 255, .9));
}

/* ==========================================================
   ТАРИФЫ
   ========================================================== */

.pricing-page {
    width: min(1120px, calc(100% - 48px));
    margin: 0 auto;
    padding: 0 0 72px;
}

.pricing-heading {
    max-width: 1120px;
    margin: 0 auto 32px;
    text-align: left;
}

.pricing-heading h1 {
    margin: 0;
    font-size: 42px;
    line-height: 1.12;
    letter-spacing: -1.2px;
    font-weight: 600;
}

.pricing-heading span {
    display: block;
    margin-top: 12px;
    color: var(--body);
    font-size: 17px;
    line-height: 1.5;
}

.pricing-packages,
.pricing-rules {
    width: 100%;
    max-width: none;
}

.pricing-packages {
    margin-top: 0;
    padding: 28px;
    border: 1px solid #dfe4ec;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 6px 18px rgba(17, 24, 39, 0.035);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    margin-top: 22px;
}

.pricing-card,
.pricing-rules,
.pricing-faq {
    border: 1px solid #dfe4ec;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 6px 18px rgba(17, 24, 39, 0.035);
}

.pricing-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 20px;
}

.pricing-package-card {
    cursor: pointer;
    transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s, background 0.18s;
}

.pricing-package-card:hover,
.pricing-package-card:focus-visible {
    border-color: rgba(15, 115, 246, 0.58);
    background: #f8fbff;
    box-shadow: 0 14px 30px rgba(15, 115, 246, 0.12);
    transform: translateY(-3px);
    outline: none;
}

.pricing-card-action {
    display: block;
    margin-top: auto;
    padding-top: 18px;
    color: var(--brand-blue);
    font-weight: 600;
}

.pricing-card-primary {
    border-color: var(--brand-blue);
    background: linear-gradient(160deg, #ffffff, #f2f8ff);
    box-shadow: 0 0 0 1px var(--brand-blue), 0 12px 26px rgba(15, 115, 246, .12);
}

.pricing-package-free {
    background: linear-gradient(160deg, #f8fcff, #eef8ff);
}

.pricing-package-free.is-exhausted {
    cursor: default;
    border-color: #d9dee6;
    background: #f4f5f7;
    box-shadow: none;
    color: #87909d;
}

.pricing-package-free.is-exhausted .pricing-label,
.pricing-package-free.is-exhausted .pricing-card-action {
    color: #87909d;
}

.pricing-package-free.is-exhausted .pricing-amount strong,
.pricing-package-free.is-exhausted .pricing-card-heading h2 {
    color: #667085;
}

.pricing-package-free.is-exhausted:hover,
.pricing-package-free.is-exhausted:focus-visible {
    border-color: #d9dee6;
    background: #f4f5f7;
    box-shadow: none;
    transform: none;
}

.pricing-label {
    display: flex;
    align-items: flex-start;
    min-height: 36px;
    margin-bottom: 8px;
    color: var(--brand-blue);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.pricing-card-heading h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
}

.pricing-card-heading p {
    min-height: 21px;
    margin: 8px 0 0;
    color: var(--body);
    line-height: 1.5;
}

.pricing-amount {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin: 28px 0 24px;
}

.pricing-amount strong {
    color: var(--ink);
    font-size: 27px;
    line-height: 1;
    font-weight: 600;
    white-space: nowrap;
}

.pricing-amount span {
    color: var(--muted);
}

.pricing-features {
    display: grid;
    gap: 13px;
    margin: 0 0 28px;
    padding: 0;
    color: var(--body);
    list-style: none;
}

.pricing-features li {
    position: relative;
    padding-left: 24px;
    line-height: 1.45;
}

.pricing-features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--brand-blue);
    font-weight: 700;
}

.pricing-button {
    width: 100%;
    height: 42px;
    margin-top: auto;
    border: 1px solid rgba(15, 115, 246, 0.32);
    border-radius: 9px;
    font-weight: 600;
    cursor: pointer;
}

.pricing-button-secondary {
    color: var(--brand-blue);
    background: #ffffff;
}

.pricing-button-secondary:hover {
    background: var(--brand-blue-soft);
}

.pricing-button-primary {
    color: #ffffff;
    border-color: transparent;
    background: linear-gradient(180deg, #2f8bff 0%, #0f73f6 100%);
    box-shadow: 0 8px 18px rgba(15, 115, 246, 0.2);
}

.pricing-button-primary:hover {
    background: linear-gradient(180deg, #1d7df6 0%, #075ed2 100%);
}

body.public-pricing-active .landing-header-nav { display: none; }
body.public-pricing-active .top-nav { grid-template-columns: 1fr auto; }
.public-pricing-active .header-actions { margin-left: auto; }
.public-pricing-page { min-height: calc(100vh - 72px); overflow: hidden; background: #fff; }

/* ==========================================================
   ПРЕДПРОСМОТР СТРАНИЦЫ РАСШИФРОВКИ
   ========================================================== */
body.transcript-preview-active {
    background: #f7f9fc;
}

body.transcript-preview-active .landing-header-nav { display: none; }
body.transcript-preview-active .top-nav { grid-template-columns: 1fr auto; }
body.transcript-preview-active .header-actions { margin-left: auto; }
.transcript-preview-page { min-height: calc(100vh - 72px); padding: 0; }
.transcript-preview-workspace { display: grid; grid-template-columns: 210px minmax(0, 1fr); min-height: calc(100vh - 72px); }
.transcript-preview-sidebar { display: flex; flex-direction: column; padding: 28px 14px 22px; border-right: 1px solid #e1e8f1; background: #fff; color: #64748b; }
.transcript-preview-sidebar-label { margin: 0 12px 18px; color: #9aa7b8; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.transcript-preview-sidebar nav { display: grid; gap: 4px; }
.transcript-preview-sidebar nav > span,.transcript-preview-sidebar nav > b,.transcript-preview-sidebar-bottom > span { display: block; padding: 11px 12px; border-radius: 9px; font-size: 14px; font-weight: 500; }
.transcript-preview-sidebar nav > b { background: #eaf3ff; color: #146fda; font-weight: 650; }
.transcript-preview-sidebar-bottom { display: grid; gap: 3px; margin-top: auto; }
.transcript-preview-shell { min-width: 0; padding: 32px 30px 40px; }
.transcript-preview-shell > * { width: 100%; margin-left: auto; margin-right: auto; }
.transcript-preview-document { --preview-panel-width: 320px; position: relative; display: grid; grid-template-rows: auto minmax(0, 1fr); height: calc(100vh - 144px); min-height: 600px; overflow: hidden; border: 1px solid #dce6f2; border-radius: 18px; background: #fff; box-shadow: 0 18px 45px rgba(47, 70, 105, .07); }
.transcript-preview-top-row { display: grid; grid-template-columns: minmax(0, 1fr) var(--preview-panel-width); }
.transcript-preview-top-row.is-panel-collapsed { grid-template-columns: minmax(0, 1fr) 0; }
.transcript-preview-top-row.is-panel-collapsed .transcript-preview-right-tabs { display: none; }
.transcript-preview-open-panel-actions { display: none; align-items: center; gap: 18px; }
.transcript-preview-document.is-panel-collapsed .transcript-preview-open-panel-actions { display: inline-flex; }
.transcript-preview-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 28px; padding: 24px 30px 8px; }
.transcript-preview-title-row { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.transcript-preview-right-tabs { align-self: end; min-width: 0; margin: 0; padding: 0 36px; overflow: hidden; background: #fff; box-sizing: border-box; }
.transcript-preview-panel-tabs.transcript-preview-right-tabs::after { right: 36px; left: 36px; }
.transcript-preview-right-tabs .transcript-preview-collapse-panel { display: grid; width: 28px; height: 28px; margin: -8px 0 0 auto; padding: 0; border: 0; border-bottom: 0; border-radius: 7px; color: #607089; font-size: 19px; line-height: 1; place-items: center; }
.transcript-preview-right-tabs .transcript-preview-collapse-panel:hover { background: #f1f5f9; color: var(--brand-blue); }
.transcript-preview-back,.transcript-preview-share { border: 0; background: transparent; color: #61708a; cursor: default; font: inherit; font-size: 14px; padding: 10px 0; }
.transcript-preview-back { width: 28px; height: 28px; margin-top: 2px; padding: 0; border-radius: 50%; cursor: pointer; font-size: 20px; line-height: 1; }
.transcript-preview-back:hover { background: #f1f5f9; color: var(--brand-blue); }
.transcript-preview-title-block h1 { margin: 0; color: #18263b; font-size: 24px; line-height: 1.2; font-weight: 650; letter-spacing: -0.04em; }
.transcript-preview-title-block p { display: flex; flex-wrap: wrap; gap: 0; margin: 10px 0 0; color: #718096; font-size: 13px; }
.transcript-preview-title-block p > span + span::before { content: "·"; margin: 0 9px; color: #b2bcc9; }
.transcript-preview-actions { display: flex; align-items: center; gap: 18px; }
.transcript-preview-icon-action { display: grid; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: #607089; place-items: center; cursor: pointer; }
.transcript-preview-icon-action:hover { background: #f1f5f9; color: var(--brand-blue); }
.transcript-preview-icon-action img,.transcript-preview-icon-placeholder { display: block; width: 18px; height: 18px; object-fit: contain; }
.transcript-preview-icon-action img { filter: brightness(0) saturate(100%) invert(39%) sepia(12%) saturate(1536%) hue-rotate(178deg) brightness(93%) contrast(91%); }
.transcript-preview-icon-placeholder { color: currentColor; font-size: 20px; line-height: 18px; text-align: center; }
.transcript-preview-body { display: grid; grid-template-columns: minmax(0, 1fr) var(--preview-panel-width); min-height: 0; overflow: hidden; background: #fff; }
.transcript-preview-body.is-panel-collapsed { grid-template-columns: minmax(0, 1fr) 0; }
.transcript-preview-body.is-panel-collapsed .transcript-preview-speakers { display: none; }
.transcript-preview-transcript { display: grid; grid-template-rows: auto auto minmax(0, 1fr); min-width: 0; min-height: 0; padding: 12px 36px 0; }
.transcript-preview-transcript > .transcript-preview-panel-tabs { margin-bottom: 14px; }
.transcript-preview-panel-tabs { position: relative; display: flex; gap: 22px; margin: 0 0 24px; padding-bottom: 0; }
.transcript-preview-panel-tabs::after { content: ''; position: absolute; right: 0; bottom: 0; left: 0; height: 1px; background: #e6ebf1; }
.transcript-preview-panel-tabs button { padding: 0 0 9px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: #8491a3; cursor: pointer; font: inherit; font-size: 13px; font-weight: 650; }
.transcript-preview-panel-tabs button.active { position: relative; z-index: 1; border-bottom-color: var(--brand-blue); color: var(--brand-blue); }
.transcript-preview-resizer { position: relative; z-index: 2; width: 8px; cursor: col-resize; background: #edf2f7; transition: background .16s ease; }
.transcript-preview-resizer::after { content: ''; position: absolute; top: 50%; left: 50%; width: 3px; height: 38px; transform: translate(-50%, -50%); border-radius: 999px; background: #aebed1; }
.transcript-preview-resizer:hover, .transcript-preview-resizer:focus-visible { outline: 0; background: rgba(15, 115, 246, .16); }
.transcript-preview-resizer:hover::after, .transcript-preview-resizer:focus-visible::after { background: var(--brand-blue); }
.transcript-preview-global-resizer { position: absolute; top: 0; right: calc(var(--preview-panel-width) - 4px); bottom: 0; z-index: 5; }
.transcript-preview-document.is-panel-collapsed .transcript-preview-global-resizer { display: none; }
.transcript-preview-toolbar { display: flex; justify-content: space-between; gap: 22px; align-items: center; padding-bottom: 14px; border-bottom: 1px solid #edf1f6; color: #8996a9; font-size: 12px; }
.transcript-preview-toggles { display: flex; align-items: center; gap: 16px; color: #64748b; font-size: 13px; }
.transcript-preview-toggle { display: inline-flex; align-items: center; gap: 7px; padding: 0; border: 0; background: transparent; color: #64748b; cursor: pointer; font: inherit; }
.transcript-preview-toggle b { position: relative; width: 28px; height: 17px; border-radius: 999px; background: #c7d1df; transition: background .18s ease; }
.transcript-preview-toggles b::after { content: ""; position: absolute; top: 3px; right: 3px; width: 11px; height: 11px; border-radius: 50%; background: #fff; }
.transcript-preview-toggle.is-on b { background: #1f7bf0; }
.transcript-preview-toggle:not(.is-on) b::after { right: 14px; }
.transcript-preview-toggle.is-disabled { cursor: default; opacity: .42; }
.transcript-preview-search { display: flex; align-items: center; gap: 9px; width: min(280px, 100%); min-height: 39px; padding: 0 12px; border: 1px solid #e0e7f0; border-radius: 9px; background: #f8fafc; color: #8290a3; }
.transcript-preview-search span { font-size: 20px; line-height: 1; }
.transcript-preview-search input { width: 100%; border: 0; outline: 0; background: transparent; color: #34445b; font: inherit; }
.transcript-preview-search input::placeholder { color: #94a1b2; }
.transcript-preview-turns,.transcript-preview-plain-text,.transcript-preview-summary { min-height: 0; overflow-y: auto; padding-right: 16px; scrollbar-color: #b8c4d2 transparent; }
.transcript-preview-turn { padding-top: 27px; }
.transcript-preview-turn header { display: grid; grid-template-columns: 11px auto 1fr; align-items: center; gap: 8px; }
.transcript-preview-turn header i,.transcript-preview-speaker-list i { display: block; width: 10px; height: 10px; border-radius: 999px; background: #8a9ab0; }
.transcript-preview-turn header strong { color: #26364c; font-size: 15px; font-weight: 650; }
.transcript-preview-turn time { color: #8fa0b7; font-size: 13px; }
.transcript-preview-turn p { max-width: 720px; margin: 11px 0 0 20px; color: #526177; font-size: 15px; line-height: 1.65; }
.transcript-preview-plain-text { max-width: 760px; margin: 28px 0 0; color: #526177; font-size: 15px; line-height: 1.75; }
.speaker-b i { background: #177bf2 !important; }.speaker-c i { background: #32bd8c !important; }.speaker-d i { background: #9a78ee !important; }.speaker-e i { background: #f49a43 !important; }.speaker-f i { background: #e95d9c !important; }.speaker-g i { background: #1eabbc !important; }
.transcript-preview-speakers { display: grid; grid-template-rows: auto minmax(0, 1fr); min-width: 0; min-height: 0; padding: 0 36px; border-left: 1px solid #e5ebf3; background: #fff; }
.transcript-preview-speakers > .transcript-preview-panel-tabs { display: none; }
.transcript-preview-speakers h2 { margin: 0; color: #27374d; font-size: 17px; font-weight: 650; }
.transcript-preview-speakers #previewEditor,.transcript-preview-speakers .transcript-preview-chat { min-height: 0; overflow-y: auto; padding-bottom: 28px; scrollbar-color: #b8c4d2 transparent; }
.transcript-preview-speakers #previewEditor > p { margin: 6px 0 23px; color: #8b98aa; font-size: 13px; }
.transcript-preview-speaker-list { display: grid; gap: 17px; }
.transcript-preview-speaker-list > div { display: grid; grid-template-columns: 10px auto auto 1fr; gap: 8px; align-items: center; color: #3b4b60; font-size: 13px; }
.transcript-preview-speaker-list strong { font-weight: 600; }
.transcript-preview-speaker-list button { width: 24px; height: 24px; padding: 0; border: 0; background: transparent; color: #7b8aa0; cursor: default; font-size: 16px; }
.transcript-preview-summary { max-width: 760px; padding: 28px 2px; }
.transcript-preview-summary > p,.transcript-preview-chat > p { margin: 0 0 8px; color: var(--brand-blue); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.transcript-preview-summary h2,.transcript-preview-chat h2 { margin: 0 0 20px; color: #26364c; font-size: 24px; letter-spacing: -.03em; }
.transcript-preview-summary div { display: grid; gap: 5px; padding: 16px 0; border-top: 1px solid #e8edf3; color: #64748b; line-height: 1.5; }
.transcript-preview-summary strong { color: #26364c; }
.transcript-preview-chat { display: grid; align-content: start; gap: 12px; }
.transcript-preview-chat[hidden] { display: none; }
.transcript-preview-chat > span { color: #718096; font-size: 13px; line-height: 1.55; }
.transcript-preview-chat label { display: flex; gap: 8px; margin-top: 16px; padding: 5px 5px 5px 11px; border: 1px solid #dfe7f0; border-radius: 10px; background: #fff; }
.transcript-preview-chat input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; font: inherit; font-size: 13px; }
.transcript-preview-chat button { width: 28px; height: 28px; border: 0; border-radius: 7px; background: var(--brand-blue); color: #fff; }
.transcript-preview-saved { position: fixed; right: 28px; bottom: 28px; z-index: 30; padding: 10px 14px; border-radius: 10px; background: #183451; color: #fff; font-size: 13px; box-shadow: 0 10px 25px rgba(24, 52, 81, .22); opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .18s ease, transform .18s ease; }
.transcript-preview-saved.is-visible { opacity: 1; transform: translateY(0); }
@media (max-width: 760px) {
    .transcript-preview-workspace { display: block; }
    .transcript-preview-sidebar { display: none; }
    .transcript-preview-shell { padding: 28px 16px 48px; }
    .transcript-preview-document { height: auto; min-height: 0; }
    .transcript-preview-head { grid-template-columns: 1fr; gap: 14px; padding-bottom: 24px; }
    .transcript-preview-actions { justify-content: flex-start; }
    .transcript-preview-body { grid-template-columns: 1fr; min-height: 0; }
    .transcript-preview-resizer { display: none; }
    .transcript-preview-transcript { padding: 22px 20px 30px; }
    .transcript-preview-speakers { border-top: 1px solid #e5ebf3; border-left: 0; }
    .transcript-preview-toggles { gap: 10px; font-size: 12px; }
}
.public-pricing-hero { padding: 80px 0 48px; text-align: center; background: linear-gradient(180deg, #f4f9ff 0%, #fff 100%); }
.public-pricing-hero .landing-kicker { justify-content: center; }
.public-pricing-hero h1 { max-width: 720px; margin: 10px auto 14px; font-size: clamp(38px, 5vw, 58px); line-height: 1.08; letter-spacing: -1.8px; }
.public-pricing-hero p { max-width: 590px; margin: 0 auto; color: var(--body); font-size: 18px; }
.public-pricing-content { padding: 0 0 80px; }
.public-pricing-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
.public-pricing-grid .pricing-card { min-height: 220px; padding: 28px 24px; border: 1px solid rgba(255,255,255,.55); border-radius: 18px; background: rgba(255,255,255,.96); box-shadow: 0 22px 45px rgba(0,20,55,.2); }
.public-pricing-grid .pricing-card-primary { transform: translateY(-10px); border-color: #8dc1ff; background: linear-gradient(160deg, #fff, #eaf4ff); box-shadow: 0 28px 55px rgba(0,17,52,.3); }
.public-pricing-grid .pricing-card-heading h2 { font-size: 24px; }
.public-pricing-grid .pricing-amount { margin: 34px 0 0; }
.public-pricing-grid .pricing-amount strong { color: #075ed2; font-size: 34px; }
.public-pricing-summary { max-width: 700px; margin: 42px auto 26px; color: var(--body); text-align: center; }
.public-pricing-summary p { margin: 7px 0; }
.public-pricing-summary p:last-child { color: var(--muted); }
.public-pricing-actions { display: flex; justify-content: center; }

@media (max-width: 800px) { .public-pricing-grid { grid-template-columns: repeat(2, 1fr); } .public-pricing-grid .pricing-card-primary { transform: none; } }
@media (max-width: 520px) { .public-pricing-hero { padding-top: 54px; } .public-pricing-grid { grid-template-columns: 1fr; } }

.pricing-rules,
.pricing-faq {
    margin: 20px 0 0;
    padding: 28px;
}

.pricing-section-heading h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.pricing-section-heading p {
    margin: 6px 0 0;
    color: var(--muted);
}

.pricing-rules-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 24px;
}

.pricing-rules-grid article {
    padding: 20px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fbff;
}

.pricing-rules-grid strong {
    display: block;
    color: #1f2937;
    font-size: 16px;
    line-height: 1.45;
    font-weight: 600;
}

.pricing-rules-grid p {
    margin: 7px 0 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.55;
}

.pricing-faq-list {
    margin-top: 16px;
}

.pricing-faq details {
    border-top: 1px solid #edf0f4;
}

.pricing-faq details:first-child {
    border-top: 0;
}

.pricing-faq summary {
    padding: 17px 0;
    color: var(--ink);
    font-weight: 600;
    cursor: pointer;
}

.pricing-faq details p {
    margin: -5px 0 18px;
    color: var(--body);
    line-height: 1.55;
}

@media (max-width: 1100px) {
    .pricing-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .pricing-page {
        width: calc(100% - 32px);
        padding-top: 0;
    }

    .pricing-heading h1 {
        font-size: 34px;
    }

    .about-page h1 {
        font-size: 34px;
    }

    .pricing-grid,
    .pricing-rules-grid {
        grid-template-columns: 1fr;
    }

    .pricing-packages {
        padding: 22px;
    }

    .pricing-card-heading p {
        min-height: 0;
    }
}

/* ==========================================================
   ЛИЧНЫЙ КАБИНЕТ
   ========================================================== */

.account-page {
    width: min(1280px, calc(100% - 48px));
    margin: 0 auto;
    padding: 0 0 60px;
}

.account-page-heading {
    margin-bottom: 24px;
}

.account-page-heading h1 {
    margin: 0;
    font-size: 30px;
    line-height: 1.15;
    letter-spacing: -.8px;
    font-weight: 600;
}

.account-page-heading span {
    display: block;
    margin-top: 8px;
    color: var(--body);
}

.page-heading {
    width: min(1120px, 100%);
    margin: 0 auto 32px;
    padding-top: 42px;
    text-align: left;
}

.home-page .page-heading,
.about-page .page-heading,
.pricing-page .page-heading {
    text-align: center;
}

.account-page > .page-heading {
    width: 100%;
}

.page-heading h1,
.about-page .page-heading h1,
.pricing-heading.page-heading h1,
.account-page-heading.page-heading h1 {
    margin: 0;
    max-width: none;
    font-size: 42px;
    line-height: 1.12;
    letter-spacing: -1.2px;
    font-weight: 600;
}

.page-heading .page-subtitle {
    display: block;
    max-width: none;
    margin: 8px 0 0;
    color: var(--body);
    font-size: 16px;
    line-height: 1.5;
}

.account-top-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(300px, .75fr);
    gap: 20px;
}

.account-bottom-grid {
    display: grid;
    grid-template-columns: 1.3fr .7fr;
    gap: 20px;
    margin-top: 20px;
}

.account-bottom-grid-single {
    grid-template-columns: 1fr;
}

.account-panel {
    border: 1px solid #dfe4ec;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 6px 18px rgba(17, 24, 39, 0.035);
}

.account-panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px;
}

.account-operations-panel .account-panel-heading {
    border-bottom: 1px solid #edf0f4;
}

.account-panel-heading h2 {
    margin: 0;
    font-size: 30px;
    font-weight: 600;
}

.account-panel-heading p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 16px;
}

.account-balance-number {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 22px 20px 0;
}

.account-balance-number strong {
    font-size: 42px;
    font-weight: 600;
}

.account-balance-number span {
    color: var(--body);
}

.account-progress {
    display: flex;
    height: 10px;
    margin: 18px 20px 0;
    overflow: hidden;
    border-radius: var(--pill);
    background: #e8edf4;
}

.account-progress-used {
    width: 25%;
    background: var(--brand-blue);
}

.account-progress-reserved {
    width: 3.75%;
    background: #f59e0b;
}

.account-progress-legend {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 14px 20px 20px;
}

.account-progress-legend div {
    display: grid;
    grid-template-columns: 10px 1fr;
    align-items: center;
    gap: 3px 7px;
}

.account-progress-legend i {
    width: 8px;
    height: 8px;
    border-radius: 2px;
}

.account-progress-legend span {
    color: var(--muted);
    font-size: 14px;
}

.account-progress-legend strong {
    grid-column: 2;
    font-size: 14px;
}

.account-legend-blue {
    background: var(--brand-blue);
}

.account-legend-orange {
    background: #f59e0b;
}

.account-legend-gray {
    background: #d8dee7;
}

.account-balance-sources {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin: 0 20px 20px;
    border: 1px solid #edf0f4;
}

.account-balance-sources div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 14px;
}

.account-balance-sources div + div {
    border-left: 1px solid #edf0f4;
}

.account-balance-sources span {
    color: var(--muted);
    font-size: 14px;
}

.account-balance-sources strong {
    font-size: 14px;
}

.account-active-job {
    margin: 0 20px 20px;
    padding: 13px 14px;
    border-left: 3px solid #f59e0b;
    background: #fff9ee;
}

.account-active-job div {
    display: flex;
    align-items: center;
    gap: 8px;
}

.account-active-job div span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f59e0b;
}

.account-active-job p {
    margin: 5px 0 0 16px;
    color: var(--muted);
    font-size: 12px;
}

.account-active-job.empty {
    border-left: 0;
    background: transparent;
}

.account-active-job.empty p {
    margin: 0;
}

.account-tariff-name {
    display: block;
    padding: 22px 20px 12px;
    color: var(--brand-blue);
    font-size: 28px;
    font-weight: 600;
}

.account-package-list {
    display: grid;
    gap: 10px;
    padding: 22px 20px 12px;
}

.account-package-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid #dfe4ec;
    border-radius: 9px;
    color: var(--body);
    background: #ffffff;
    cursor: pointer;
}

.account-package-option:hover {
    color: var(--brand-blue);
    border-color: rgba(15, 115, 246, 0.42);
    background: var(--brand-blue-soft);
}

.account-package-option-primary {
    border-color: rgba(15, 115, 246, 0.42);
}

.account-tariff-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 11px 20px;
    border-top: 1px solid #edf0f4;
}

.account-tariff-row span {
    color: var(--muted);
}

.account-tariff-row strong {
    font-size: 13px;
    text-align: right;
}

.account-outline-button {
    height: 36px;
    padding: 0 18px;
    border: 1px solid #cfd7e3;
    border-radius: 9px;
    background: #ffffff;
    color: var(--body);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

.account-outline-button {
    width: calc(100% - 40px);
    margin: 18px 20px 0;
    border-color: rgba(15, 115, 246, .3);
    color: var(--brand-blue);
}

.account-text-button {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--brand-blue);
    font-family: inherit;
    font-size: 16px;
    cursor: pointer;
}

.account-tariff-panel .account-text-button {
    display: block;
    margin: 14px auto 20px;
}

.account-operations-panel {
    margin-top: 20px;
}

.account-table-heading {
    align-items: center;
}

.account-table-shell {
    overflow-x: auto;
}

.account-table-wrap {
    overflow-x: hidden;
    overflow-y: auto;
}

.account-operations-table {
    width: 100%;
    border-collapse: collapse;
}

.account-operations-table th,
.account-operations-table td {
    padding: 14px 20px;
    border-bottom: 1px solid #edf0f4;
    text-align: left;
    white-space: nowrap;
}

.account-operations-table th {
    background: var(--table-head);
    color: #374151;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.account-operations-panel .account-operations-table thead th {
    padding-top: 11px;
    padding-bottom: 11px;
    background: #ffffff;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .03em;
    border-top: 1px solid var(--hair-soft);
    border-bottom: 1px solid var(--hair-soft);
}

.account-operations-table-header {
    table-layout: fixed;
}

.account-operations-table td:nth-child(2) {
    display: grid;
    gap: 3px;
    white-space: normal;
}

.account-operations-table td:nth-child(2) span {
    color: var(--muted);
    font-size: 12px;
}

.account-operations-table th:nth-child(3),
.account-operations-table th:nth-child(4) {
    text-align: right;
}

.account-operations-table td:nth-child(3),
.account-operations-table td:nth-child(4) {
    font-weight: 600;
    text-align: right;
}

.account-operations-table tbody tr.account-positive-row {
    background: rgba(22, 163, 74, 0.08);
}

.account-plus-value {
    color: #16a34a;
}

.account-reserved-value {
    color: #f59e0b;
}

.account-operations-table tbody tr.account-error-row {
    background: rgba(220, 38, 38, 0.08);
}

.account-error-value {
    color: #dc2626;
}

@media (max-width: 1050px) {
    .account-top-grid,
    .account-bottom-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .account-page {
        width: calc(100% - 32px);
        padding-top: 0;
    }

    .account-progress-legend,
    .account-balance-sources {
        grid-template-columns: 1fr;
    }

    .account-balance-sources div + div {
        border-top: 1px solid #edf0f4;
        border-left: 0;
    }

}

/* ==========================================================
   ЗАГРУЗКА АУДИО
   ========================================================== */

.upload-section {
    padding: 16px 0 86px;
    scroll-margin-top: 25px;
}

.transcription-workflow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin: 0 auto 20px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
}

.transcription-workflow::-webkit-scrollbar {
    display: none;
}

.transcription-workflow-step {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    color: #374151;
    font-size: 16px;
    line-height: 1.5;
}

.transcription-workflow-step span {
    display: grid;
    width: 26px;
    height: 26px;
    place-items: center;
    border: 1px solid #dce4ee;
    border-radius: 50%;
    background: #fff;
    color: inherit;
    font-size: 13px;
    font-weight: 400;
}

.transcription-workflow-step strong {
    font-weight: 400;
}

.transcription-workflow-step.is-active span {
    border-color: #0f73f6;
    background: #0f73f6;
    color: #fff;
}

.transcription-workflow-separator {
    display: block;
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-top: 1.5px solid #94a3b8;
    border-right: 1.5px solid #94a3b8;
    transform: rotate(45deg);
}

.upload-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    justify-items: center;
    align-items: start;
}

.panel {
    width: 100%;
    padding: 24px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.86);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(247, 248, 251, 0.72));
    box-shadow: 0 28px 70px rgba(17, 24, 39, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(18px);
}

.panel-head {
    display: flex;
    align-items: flex-start;
    padding: 10px 14px 0;
    margin-bottom: 20px;
}

.panel-head > div {
    width: 100%;
}

.section-title {
    margin: 0;
    font-family: var(--font);
    font-size: 30px;
    line-height: 1.15;
    letter-spacing: -0.8px;
    font-weight: 600;
}

.section-copy {
    width: 100%;
    max-width: none;
    margin: 8px 0 0;
    color: #374151;
    font-size: 16px;
    line-height: 1.5;
}

.drop {
    position: relative;
    min-height: 310px;
    border-radius: 12px;
    border: 1.5px dashed rgba(148, 163, 184, 0.74);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(250, 251, 253, 0.78));
    display: grid;
    place-items: center;
    padding: 38px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.18s, background 0.18s, box-shadow 0.18s, transform 0.18s;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92), inset 0 -18px 42px rgba(37, 99, 235, 0.035);
    overflow: hidden;
}

.drop::before {
    content: "";
    position: absolute;
    width: 250px;
    height: 250px;
    left: 50%;
    top: 44%;
    transform: translate(-50%, -50%);
    border-radius: var(--pill);
    background: radial-gradient(circle, rgba(37, 99, 235, 0.18), rgba(37, 99, 235, 0.06) 45%, transparent 72%);
    filter: blur(2px);
    pointer-events: none;
}

.drop:hover,
.drop.drag {
    border-color: #2f8bff;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(244, 249, 255, 0.92));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.96), 0 24px 60px rgba(37, 99, 235, 0.16);
    transform: translateY(-2px);
}

.drop-inner {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 20px;
    justify-items: center;
    max-width: 560px;
}

.upload-icon {
    width: 112px;
    height: 112px;
    border-radius: var(--pill);
    background: radial-gradient(circle at 36% 24%, #ffffff 0%, #dcecff 34%, #9fc8ff 100%);
    color: #0f73f6;
    display: grid;
    place-items: center;
    font-size: 48px;
    font-weight: 700;
    box-shadow: 0 26px 52px rgba(15, 115, 246, 0.28), inset 0 2px 0 rgba(255, 255, 255, 0.95), inset 0 -16px 30px rgba(37, 99, 235, 0.12);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.75);
}

.upload-icon img {
    width: 54px;
    height: 54px;
}

.upload-text {
    font-size: 24px;
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: -0.45px;
    color: #111827;
    overflow-wrap: anywhere;
}

.formats-hint {
    max-width: 560px;
    color: #8a929f;
    font-size: 16px;
    line-height: 1.5;
}

#fileInput {
    display: none;
}

.panel.batch-has-files {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 36%);
    gap: 20px;
    align-items: stretch;
}

.panel.batch-has-files .panel-head {
    grid-column: 1 / -1;
}

.batch-panel {
    display: none;
    min-height: 310px;
    padding: 18px;
    border-radius: 12px;
    background: #eef3f9;
}

.panel.batch-has-files .batch-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
}

.panel.batch-has-files .drop {
    min-height: 0;
    height: 100%;
    margin-top: 0;
}

.batch-language-preview {
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
    color: #374151;
    font-size: 14px;
    font-weight: 600;
}

.batch-language-preview label {
    color: #1f2937;
}

.transcription-language-picker {
    position: relative;
}

.transcription-language-button {
    width: 100%;
    min-height: 46px;
    text-align: left;
    padding: 9px 48px 9px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    color: #111827;
    background-color: #ffffff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6l4 4 4-4' stroke='%239ca3af' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px 16px;
    color: #1f2937;
    font: inherit;
    font-weight: 400;
    cursor: text;
}

.transcription-language-button::placeholder {
    color: #64748b;
    opacity: 1;
}

.transcription-language-button:focus-visible {
    outline: 2px solid rgba(15, 115, 246, 0.28);
    outline-offset: 1px;
}

.transcription-language-menu {
    position: absolute;
    z-index: 20;
    top: calc(100% + 4px);
    width: 100%;
    max-height: 300px;
    overflow-y: auto;
    padding: 4px;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
}

.transcription-language-option {
    display: block;
    width: 100%;
    padding: 9px 8px;
    border: 0;
    border-radius: 6px;
    color: #1f2937;
    background: transparent;
    font: inherit;
    font-weight: 400;
    text-align: left;
    cursor: pointer;
}

.transcription-language-option:hover,
.transcription-language-option.selected {
    background: #eff6ff;
}

.transcription-language-option[hidden] {
    display: none;
}

.transcription-language-option.preferred-language {
    font-weight: 700;
}

.transcription-language-native {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.batch-language-preview p {
    margin: 0;
    color: #64748b;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.4;
}

.batch-language-preview.invalid .transcription-language-button {
    border-color: #dc2626;
    color: #dc2626;
    box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.08);
}

.batch-language-preview.invalid .transcription-language-button:focus {
    outline: 2px solid rgba(220, 38, 38, 0.16);
    outline-offset: 1px;
}

.batch-files {
    display: grid;
}

.batch-file {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 4px 12px;
    padding: 11px 38px 11px 2px;
    border-bottom: 1px solid #d5dde8;
}

.batch-file-name {
    overflow: hidden;
    color: #1f2937;
    font-size: 14px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.batch-file-duration,
.batch-file-state,
.batch-file-estimate {
    color: #64748b;
    font-size: 13px;
}

.batch-file-state,
.batch-file-estimate,
.batch-file-progress,
.batch-file-duplicate {
    grid-column: 1 / 3;
}

.batch-file-duplicate {
    margin-top: 4px;
    padding: 8px 10px;
    border-radius: 6px;
    background: #f1f5f9;
    color: #475569;
    font-size: 13px;
    line-height: 1.4;
}

.batch-file-duplicate.completed {
    border-left: 3px solid #f59e0b;
    background: #fffbeb;
    color: #7c5a10;
}

.batch-file-duration {
    grid-column: 1 / 3;
    grid-row: 2;
    white-space: nowrap;
}

.batch-file-duration:empty {
    display: none;
}

.batch-file-estimate {
    margin-top: 2px;
}

.batch-file-progress {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 5px;
    margin-top: 3px;
}

.batch-file-progress span {
    height: 7px;
    border-radius: 4px;
    background: #dbe5f1;
}

.batch-file-progress span.filled {
    background: #0f73f6;
}

.batch-file-remove {
    position: absolute;
    top: 11px;
    right: 2px;
    padding: 5px;
    border: 0;
    background: transparent;
    color: #374151;
    cursor: pointer;
    font-size: 20px;
}

.batch-file-state.completed {
    color: #0f73f6;
}

.batch-file-state.failed,
.batch-file-state.paused {
    color: #dc2626;
}

.batch-credit-cost {
    margin-top: auto;
    padding: 14px 0 12px;
    color: #374151;
    font-size: 14px;
    line-height: 1.4;
}

.batch-credit-cost[hidden] {
    display: none;
}

.batch-credit-cost strong {
    color: #111827;
    font-weight: 600;
}

.batch-warning {
    display: none;
    margin-bottom: 8px;
    padding: 10px 12px;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    background: #ffffff;
    color: #f97316;
    font-size: 14px;
    line-height: 1.4;
}

.drop.batch-processing .formats-hint {
    display: none;
}

.file-limit-message {
    margin: 8px 28px 4px 0;
    color: #64748b;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
}

.batch-warning.visible {
    display: block;
}

.file-selection-warning {
    display: none;
    color: #dc2626;
    font-size: 14px;
    line-height: 1.4;
}

.file-selection-warning.visible {
    display: block;
}

.panel.batch-has-files .file-selection-warning {
    grid-column: 1 / -1;
}

.batch-start {
    width: 100%;
    min-height: 42px;
    border: 0;
    border-radius: 8px;
    background: #0f73f6;
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-weight: 600;
}

.batch-start:disabled {
    background: #aeb8c6;
    cursor: not-allowed;
}

.batch-start[hidden] {
    display: none;
}

.batch-credit-cost[hidden] + .batch-start {
    margin-top: auto;
}

@media (max-width: 900px) {
    .panel.batch-has-files {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================
   СТАТУС ТРАНСКРИБАЦИИ
   ========================================================== */

.status {
    display: none;
    margin-top: 18px;
    background: var(--canvas);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 18px 42px rgba(17, 24, 39, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.status-top {
    padding: 18px 18px 16px;
    border-bottom: 1px solid var(--hair-soft);
    background: rgba(255, 255, 255, 0.78);
}

.status-line {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.status-kicker {
    font-size: 14px;
    font-weight: 400;
    color: var(--muted);
}

.status-current {
    margin-top: 4px;
    font-size: 22px;
    line-height: 1.35;
    font-weight: 600;
    color: var(--ink);
}

.status-body {
    display: block;
}

.steps {
    display: grid;
}

.step {
    display: grid;
    grid-template-columns: 28px 1fr auto;
    gap: 12px;
    align-items: center;
    min-height: 58px;
    padding: 0 18px;
    border-bottom: 1px solid var(--hair-soft);
    font-size: 14px;
    color: var(--body);
}

.step:last-child {
    border-bottom: 0;
}

.step-icon {
    width: 18px;
    height: 18px;
    border-radius: var(--pill);
    border: 1px solid var(--hair);
    background: var(--canvas);
    position: relative;
}

.ss {
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--pill);
    padding: 4px 9px;
    background: var(--soft);
    color: var(--muted);
    white-space: nowrap;
}

.step.active {
    background: linear-gradient(90deg, var(--soft), #ffffff);
}

.step.active .step-icon {
    border-color: #8cc2ff;
    background: #0f73f6;
    box-shadow: 0 0 0 5px rgba(15, 115, 246, 0.16);
    animation: pulse 1.25s ease-in-out infinite;
}

.step.active .ss {
    background: #eaf3ff;
    color: #0f73f6;
}

.step.completed .step-icon {
    background: var(--success-color);
    border-color: var(--success-color);
}

.step.completed .step-icon::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 3px;
    width: 5px;
    height: 9px;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.step.completed .ss {
    background: #ecfdf5;
    color: #047857;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.23);
    }
}

#errorBlock {
    display: none;
    margin-top: 16px;
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #991b1b;
    border-radius: var(--r-md);
    padding: 14px;
    font-size: 14px;
}

/* ==========================================================
   ИСТОРИЯ ОБРАБОТОК
   ========================================================== */

.history {
    padding: 0 0 72px;
    scroll-margin-top: 90px;
}

.transcription-rules-row {
    margin-top: -62px;
    margin-bottom: 24px;
}

.history-head {
    display: block;
    padding: 30px;
}

.history-title {
    margin: 0;
    font-family: var(--font);
    font-size: 30px;
    line-height: 1.25;
    letter-spacing: -0.4px;
    font-weight: 600;
}

.history-copy {
    margin: 8px 0 0;
    color: var(--body);
    font-size: 16px;
    line-height: 1.55;
}

.history-selection-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-width: 760px;
    min-height: 58px;
    padding: 10px 0;
    border-top: 1px solid var(--hair-soft);
    border-bottom: 1px solid var(--hair-soft);
    background: #ffffff;
    color: var(--body);
    font-size: 14px;
}

.history-select-all-control {
    display: inline-flex;
    align-items: center;
    gap: 0;
    font-weight: 500;
    cursor: pointer;
}

.history-master-checkbox-slot {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    padding-left: 22px;
    padding-right: 8px;
}

.history-selection-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: calc(18px + var(--history-scrollbar-width, 0px));
}

.history-selection-actions[hidden] {
    display: none;
}

.history-selection-actions .btn {
    height: 34px;
    padding: 0 16px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: none;
}

.history-clear-selection {
    color: var(--body);
    border-color: #cfd7e3;
    background: #ffffff;
}

.history-clear-selection:hover {
    color: var(--brand-blue);
    border-color: rgba(15, 115, 246, 0.35);
    background: var(--brand-blue-soft);
}

.history-delete-selection {
    color: var(--body);
    border-color: #cfd7e3;
    background: #ffffff;
}

.history-delete-selection:hover {
    color: #dc2626;
    border-color: rgba(220, 38, 38, 0.48);
    background: rgba(220, 38, 38, 0.08);
}

.history-trash-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    background: currentColor;
    mask: url('/static/icons/trash.svg') center / contain no-repeat;
    -webkit-mask: url('/static/icons/trash.svg') center / contain no-repeat;
}

.table-card {
    background: var(--canvas);
    border: 1px solid var(--hair);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 54px rgba(17, 24, 39, 0.07);
}

.history-table-shell {
    overflow-x: auto;
}

.history-table-wrap {
    overflow-x: hidden;
    overflow-y: hidden;
}

.history-table-wrap.is-scrollable {
    overflow-y: auto;
}

.history-table {
    table-layout: fixed;
}

.history-table-header {
    width: calc(100% - var(--history-scrollbar-width, 0px));
}

.history-select-col {
    width: 60px;
}

.history-status-col {
    width: 150px;
}

.history-result-col {
    width: 190px;
}

table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
}

th,
td {
    padding: 16px 18px;
    text-align: left;
    border-bottom: 1px solid var(--hair-soft);
    vertical-align: middle;
}

.table-card th {
    background: var(--table-head);
    color: #374151;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

td {
    font-size: 14px;
    color: var(--body);
}

.history-file-cell {
    white-space: normal;
    word-break: break-word;
}

.history-file-cell strong,
.history-file-cell span {
    display: block;
}

.history-select-column,
.history-select-cell {
    width: 52px;
    padding-left: 22px;
    padding-right: 8px;
    text-align: center;
}

.history-select-all-control input,
.history-select-cell input {
    appearance: none;
    width: 17px;
    height: 17px;
    margin: 0;
    border: 1px solid rgba(148, 163, 184, 0.72);
    border-radius: 4px;
    background: #ffffff;
    cursor: pointer;
}

.history-select-all-control input:hover,
.history-select-cell input:hover {
    border-color: rgba(100, 116, 139, 0.9);
}

.history-select-all-control input:checked,
.history-select-cell input:checked {
    border-color: #0f73f6;
    background: #0f73f6;
}

.history-select-all-control input:checked::after,
.history-select-cell input:checked::after {
    content: "";
    display: block;
    width: 4px;
    height: 8px;
    margin: 2px 0 0 5px;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.history-select-all-control input:indeterminate {
    border-color: #0f73f6;
    background: #0f73f6;
}

.history-select-all-control input:indeterminate::after {
    content: "";
    display: block;
    width: 9px;
    height: 2px;
    margin: 7px auto 0;
    border-radius: 1px;
    background: #ffffff;
}

.history-select-cell input:disabled {
    cursor: not-allowed;
    opacity: 0.38;
}

.history-row-selected td {
    background: rgba(15, 115, 246, 0.055);
}

.history-status-column,
.history-actions-column,
.history-status-cell,
.actions-cell {
    width: 1%;
    white-space: nowrap;
    text-align: right;
}

.history-status-column,
.history-status-cell {
    padding-right: 20px;
}

.history-actions-column,
.actions-cell {
    padding-left: 20px;
}

.history-file-cell strong {
    font-weight: 600;
}

.history-file-open {
    display: block;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.history-file-open:hover strong,
.history-file-open:focus-visible strong { color: var(--brand-blue); }
.history-file-open:focus-visible { outline: 2px solid rgba(15, 115, 246, 0.28); outline-offset: 3px; border-radius: 3px; }

.main:has(.transcript-viewer-page:not([hidden])) { overflow-y: auto; background: #f7f8fb; }
.transcript-viewer-page { box-sizing: border-box; max-width: 1260px; margin: 0 auto; padding: 34px 42px 54px; }
.main:has(.transcript-viewer-body.is-stuck) .transcript-viewer-page::before { content: ''; position: fixed; z-index: 9; top: var(--transcript-scroll-host-top); left: var(--transcript-scroll-host-left); width: var(--transcript-scroll-host-width); height: calc(16px + var(--transcript-sticky-toolbar-height)); background: #f7f8fb; }
.transcript-viewer-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.transcript-viewer-title-row { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.transcript-viewer-back { width: 28px; height: 28px; margin-top: 2px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 21px; line-height: 1; cursor: pointer; }
.transcript-viewer-back:hover, .transcript-viewer-back:focus-visible { color: var(--brand-blue); background: rgba(15, 115, 246, .08); }
.transcript-viewer-title h1 { margin: 0; font-size: 30px; color: var(--ink); }
.transcript-viewer-title p { margin: 7px 0 0; color: var(--muted); font-size: 14px; }
.transcript-viewer-actions { display: flex; align-items: center; gap: 14px; }
.transcript-viewer-tabs { display: flex; gap: 32px; margin: 0 0 22px; }
.transcript-viewer-tab { min-height: 42px; margin-bottom: -1px; padding: 8px 2px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: #374151; font: inherit; font-size: 15px; font-weight: 600; }
.transcript-viewer-tab.active { color: var(--brand-blue); border-bottom-color: var(--brand-blue); }
.transcript-viewer-tab:disabled { opacity: .62; cursor: default; }
.transcript-viewer-body { display: grid; grid-template-columns: minmax(0, 1fr) 245px; align-items: stretch; border: 1px solid var(--hair-soft); border-radius: 18px; background: #fff; overflow: hidden; }
.transcript-viewer-body.is-stuck { overflow: visible; }
.transcript-viewer-content { min-width: 0; padding: 0 20px 36px 30px; }
.transcript-viewer-toolbar { position: sticky; top: var(--transcript-sticky-top, 16px); z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 0 -20px 28px -30px; padding: 24px 20px 18px 30px; background: #fff; }
.transcript-viewer-body.is-stuck .transcript-viewer-toolbar { border-radius: 18px 0 0 0; box-shadow: 0 12px 28px rgba(17, 24, 39, .08); }
.transcript-viewer-search-controls { display: flex; align-items: center; gap: 8px; min-width: 0; }
.transcript-viewer-search { display: flex; align-items: center; gap: 8px; width: 260px; padding: 9px 10px; border-radius: 10px; background: #f4f7fb; color: var(--muted); }
.transcript-viewer-search input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--body); font: inherit; }
.transcript-viewer-search-status { color: var(--muted); font-size: 12px; }
.transcript-viewer-search-navigation { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.transcript-viewer-search-navigation[hidden] { display: none; }
.transcript-viewer-search-navigation div { display: flex; gap: 4px; }
.transcript-viewer-search-navigation button { width: 24px; height: 22px; padding: 0; border: 0; border-radius: 4px; background: transparent; color: var(--muted); font-size: 19px; line-height: 1; cursor: pointer; }
.transcript-viewer-search-navigation button:hover, .transcript-viewer-search-navigation button:focus-visible { background: rgba(15, 115, 246, .09); color: var(--brand-blue); }
.transcript-viewer-switches { display: flex; gap: 13px; color: var(--muted); font-size: 13px; }
.transcript-viewer-switches label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.transcript-viewer-switches input { accent-color: var(--primary); }
.transcript-viewer-turn { margin: 0 0 24px; }
.transcript-viewer-turns, .transcript-viewer-plain { padding-right: 12px; }
.transcript-viewer-turn header, .transcript-viewer-speaker { display: flex; align-items: center; gap: 7px; color: var(--ink); }
.transcript-viewer-turn header i, .transcript-viewer-speaker i { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }
.transcript-viewer-turn time { margin-left: 2px; color: var(--muted); font-size: 13px; }
.transcript-viewer-time-separator { margin: 0 1px 0 2px; color: var(--muted); }
.transcript-viewer-turn p { margin: 8px 0 0 17px; color: var(--body); line-height: 1.6; }
.transcript-viewer-turn mark, .transcript-viewer-plain mark { padding: 0 1px; border-radius: 2px; background: rgba(15, 115, 246, .18); color: inherit; }
.transcript-viewer-turn mark.is-active-search-match, .transcript-viewer-plain mark.is-active-search-match { background: rgba(15, 115, 246, .38); }
.transcript-viewer-pencil { display: grid; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 8px; background: transparent; cursor: pointer; place-items: center; -webkit-mask: none; mask: none; }
.transcript-viewer-pencil img { display: block; width: 16px; height: 16px; filter: brightness(0) saturate(100%) invert(39%) sepia(12%) saturate(1536%) hue-rotate(178deg) brightness(93%) contrast(91%); }
.transcript-viewer-pencil:hover, .transcript-viewer-pencil:focus-visible { background: #f1f5f9; outline: 0; }
.transcript-viewer-pencil:hover img,.transcript-viewer-pencil:focus-visible img { filter: brightness(0) saturate(100%) invert(39%) sepia(73%) saturate(2558%) hue-rotate(201deg) brightness(101%) contrast(93%); }
.transcript-viewer-plain { white-space: pre-wrap; color: var(--body); line-height: 1.75; }
.transcript-viewer-speakers { min-width: 0; border-left: 1px solid var(--hair-soft); border-radius: 0 17px 17px 0; background: #ecf4fe; }
.transcript-viewer-speakers-inner { margin: 16px; padding: 20px; border-radius: 12px; background: #fff; }
.transcript-viewer-body.is-stuck .transcript-viewer-speakers-inner { position: sticky; top: calc(var(--transcript-sticky-top, 16px) + 16px); z-index: 10; margin: 16px; padding: 20px; border-radius: 12px; background: #fff; box-shadow: 0 0 0 16px #ecf4fe; }
.transcript-viewer-speakers h2 { margin: 0 0 20px; font-size: 16px; color: var(--ink); }
.transcript-viewer-speaker { min-height: 20px; margin: 0 0 6px; }
.transcript-viewer-speaker-input { box-sizing: border-box; min-width: 4ch; max-width: 170px; height: 34px; padding: 0; border: 0; border-radius: 2px; outline: 0; background: transparent; color: var(--ink); font: inherit; font-weight: 400; line-height: inherit; field-sizing: content; }
.transcript-viewer-speaker-input:focus { background: transparent; }
.transcript-save-toast { position: fixed; z-index: 40; left: 50%; bottom: 28px; display: flex; align-items: center; gap: 8px; padding: 10px 14px; transform: translateX(-50%); border: 1px solid rgba(15, 115, 246, .17); border-radius: 10px; background: #fff; box-shadow: 0 10px 28px rgba(15, 23, 42, .14); color: #334155; font-size: 13px; }
.transcript-save-toast[hidden] { display: none; }
.transcript-save-toast-icon { display: inline-grid; width: 17px; height: 17px; place-items: center; border-radius: 50%; background: var(--brand-blue); color: #fff; font-size: 11px; font-weight: 700; }
.transcript-save-toast.is-saving .transcript-save-toast-icon { background: #94a3b8; font-size: 0; }
.transcript-save-toast.is-saving .transcript-save-toast-icon::after { content: ''; width: 7px; height: 7px; border: 2px solid #fff; border-right-color: transparent; border-radius: 50%; animation: transcript-save-spin .7s linear infinite; }
@keyframes transcript-save-spin { to { transform: rotate(360deg); } }
@media (max-width: 780px) { .transcript-viewer-page { padding: 22px 16px 36px; } .transcript-viewer-body { grid-template-columns: 1fr; } .transcript-viewer-content { display: block; } .transcript-viewer-turns, .transcript-viewer-plain { padding-right: 0; } .transcript-viewer-speakers, .transcript-viewer-body.is-stuck .transcript-viewer-speakers { position: static; width: auto; height: auto; min-height: 0; border: 0; border-top: 1px solid var(--hair-soft); border-radius: 0; box-shadow: none; } .transcript-viewer-body.is-stuck .transcript-viewer-speakers-inner { position: static; min-height: 0; padding: 25px 20px; border-radius: 0; } .transcript-viewer-toolbar, .transcript-viewer-body.is-stuck .transcript-viewer-toolbar { position: static; width: auto; align-items: stretch; flex-direction: column; margin: 0 0 28px; padding: 24px 0 0; border: 0; border-radius: 0; box-shadow: none; } .transcript-viewer-search { width: auto; } .transcript-viewer-head { grid-template-columns: 1fr; } .transcript-viewer-actions { justify-content: space-between; } }

/* Широкая рабочая область расшифровки. */
.main:has(.transcript-viewer-page:not([hidden])) { overflow: hidden; }
.transcript-viewer-page { max-width: none; height: 100%; padding: 24px 30px 32px; }
.transcript-viewer-document { --viewer-panel-width: clamp(240px, 20%, 360px); position: relative; display: grid; grid-template-rows: auto minmax(0,1fr); height: 100%; min-height: 560px; overflow: hidden; border: 0; border-radius: 18px; background: #fff; box-shadow: 0 18px 45px rgba(47,70,105,.07); }
.transcript-viewer-top-row,.transcript-viewer-body { display: grid; grid-template-columns: minmax(0,1fr) max(340px, var(--viewer-panel-width)); min-height: 0; }
.transcript-viewer-head { align-items: flex-start; margin: 0; padding: 24px 36px 8px; }
.transcript-viewer-title h1 { font-size: 24px; font-weight: 600; letter-spacing: normal; }
.transcript-viewer-back { display: grid; width: 34px; height: 34px; margin-top: 0; border-radius: 8px; place-items: center; }
.transcript-viewer-back img { display: block; width: 20px; height: 20px; }
.transcript-viewer-back:hover img,.transcript-viewer-back:focus-visible img { filter: brightness(0) saturate(100%) invert(39%) sepia(73%) saturate(2558%) hue-rotate(201deg) brightness(101%) contrast(93%); }
.transcript-viewer-title p { font-size: 13px; }
.transcript-viewer-actions { gap: 18px; }
.transcript-viewer-icon-action { display: grid; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: #607089; font-size: 20px; place-items: center; cursor: pointer; }
.transcript-viewer-icon-action:hover { background: #f1f5f9; color: var(--brand-blue); }
.transcript-viewer-icon-action img { width: 18px; height: 18px; filter: brightness(0) saturate(100%) invert(39%) sepia(12%) saturate(1536%) hue-rotate(178deg) brightness(93%) contrast(91%); }
.transcript-viewer-icon-action:hover img,.transcript-viewer-icon-action:focus-visible img { filter: brightness(0) saturate(100%) invert(39%) sepia(73%) saturate(2558%) hue-rotate(201deg) brightness(101%) contrast(93%); }
.transcript-viewer-back,.transcript-viewer-icon-action { position: relative; }
.transcript-viewer-back::after,.transcript-viewer-icon-action::after { content: attr(data-tooltip); position: absolute; z-index: 110; top: calc(100% + 7px); left: 50%; padding: 7px 9px; border-radius: 7px; background: #1d2a3d; color: #fff; font-size: 12px; font-weight: 500; line-height: 1; white-space: nowrap; opacity: 0; pointer-events: none; transform: translate(-50%, -4px); transition: opacity .15s, transform .15s; }
.transcript-viewer-back:hover::after,.transcript-viewer-back:focus-visible::after,.transcript-viewer-icon-action:hover::after,.transcript-viewer-icon-action:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }
.transcript-viewer-open-panel-actions { display: none; gap: 18px; }
.transcript-viewer-right-tabs { position: relative; display: flex; gap: 22px; align-self: end; min-width: 0; margin: 0; padding: 0 36px; overflow: visible; background: #fff; box-sizing: border-box; }
.transcript-viewer-right-tabs::after,.transcript-viewer-tabs::after { content: ''; position: absolute; right: 0; bottom: 0; left: 0; height: 1px; background: #e6ebf1; }
.transcript-viewer-right-tabs button,.transcript-viewer-tabs button { position: relative; z-index: 1; padding: 0 0 9px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: #8491a3; font: inherit; font-size: 13px; font-weight: 650; cursor: pointer; }
.transcript-viewer-right-tabs button.active,.transcript-viewer-tabs button.active { border-bottom-color: var(--brand-blue); color: var(--brand-blue); }
.transcript-viewer-collapse-panel { display: grid; width: 34px; height: 34px; margin: -11px 0 0 auto; border-radius: 8px!important; place-items: center; }
.transcript-viewer-body { overflow: hidden; border: 0; border-radius: 0; }
.transcript-viewer-content { display: grid; grid-template-rows: auto auto minmax(0,1fr); min-height: 0; padding: 12px 36px 0; }
.transcript-viewer-tabs { position: relative; display: flex; gap: 22px; margin: 0 0 14px; }
.transcript-viewer-content.is-summary-active .transcript-viewer-tabs { margin-bottom: 0; }
.transcript-viewer-tabs button { font-size: 15px; font-weight: 600; }
.transcript-viewer-right-tabs { gap: 22px; }
.transcript-viewer-right-tabs > button:not(.transcript-viewer-collapse-panel) { font-size: 15px; font-weight: 600; }
.transcript-viewer-right-tabs > button { white-space: nowrap; }
.transcript-viewer-collapse-panel { padding: 0!important; border-bottom: 0!important; }
.transcript-viewer-collapse-panel img { width: 18px; height: 18px; filter: brightness(0) saturate(100%) invert(39%) sepia(12%) saturate(1536%) hue-rotate(178deg) brightness(93%) contrast(91%); }
.transcript-viewer-collapse-panel:hover img,.transcript-viewer-collapse-panel:focus-visible img { filter: brightness(0) saturate(100%) invert(39%) sepia(73%) saturate(2558%) hue-rotate(201deg) brightness(101%) contrast(93%); }
.transcript-viewer-collapse-panel:hover,.transcript-viewer-collapse-panel:focus-visible { background: #f1f5f9; }
.transcript-viewer-summary-placeholder { display: grid; align-content: start; gap: 8px; min-height: 0; padding-top: 27px; color: var(--muted); }
.transcript-viewer-summary-placeholder[hidden] { display: none; }
.transcript-viewer-summary-placeholder h2 { margin: 0; color: var(--ink); font-size: 16px; font-weight: 600; }
.transcript-viewer-summary-placeholder p { margin: 0; font-size: 15px; }
.transcript-viewer-search { min-height: 39px; padding: 0 12px; border: 1px solid #e0e7f0; border-radius: 9px; background: #f8fafc; }
.transcript-viewer-search img { width: 15px; height: 15px; opacity: .7; }
.transcript-viewer-search input { font-size: 14px; }

/* На более узких окнах поиск и две рабочие области сжимаются предсказуемо. */
.transcript-viewer-search { width: 320px; max-width: 100%; }
@media (max-width: 1050px) {
    .transcript-viewer-top-row,.transcript-viewer-body { grid-template-columns: minmax(0,1fr) min(340px, var(--viewer-panel-width)); }
    .transcript-viewer-resizer { right: calc(min(340px, var(--viewer-panel-width)) - 4px); }
    .transcript-viewer-head,.transcript-viewer-content,.transcript-viewer-speakers { padding-right: 24px; padding-left: 24px; }
    .transcript-viewer-right-tabs { padding-right: 24px; padding-left: 24px; }
    .transcript-viewer-search { width: min(280px, 100%); }
}
@media (max-width: 780px) {
    .main:has(.transcript-viewer-page:not([hidden])) { overflow-y: auto; }
    .transcript-viewer-page { height: auto; padding: 16px; }
    .transcript-viewer-document { height: auto; min-height: 0; overflow: visible; }
    .transcript-viewer-top-row,.transcript-viewer-body { grid-template-columns: 1fr!important; }
    .transcript-viewer-right-tabs { min-height: 42px; margin-top: 8px; }
    .transcript-viewer-resizer { display: none; }
    .transcript-viewer-body { overflow: visible; }
    .transcript-viewer-content { min-height: 480px; }
    .transcript-viewer-speakers { min-height: 240px; padding-top: 24px; border-top: 1px solid #e5ebf3; border-left: 0; }
    .transcript-viewer-search { width: min(300px, 100%); }
}
.transcript-viewer-toolbar { position: static; margin: 0; padding: 0 0 14px; border-bottom: 1px solid #edf1f6; box-shadow: none; }
.transcript-viewer-toolbar[hidden] { display: none; }
.transcript-viewer-turns,.transcript-viewer-plain { min-height: 0; margin-right: -30px; overflow-y: auto; padding-right: 30px; }
@media (max-width: 1050px) { .transcript-viewer-turns,.transcript-viewer-plain { margin-right: -18px; padding-right: 18px; } }
.transcript-viewer-turns,.transcript-viewer-plain { padding-bottom: 40px; }
.transcript-viewer-turn { margin: 0; padding-top: 27px; }
.transcript-viewer-speakers { position: relative; min-height: 0; padding: 27px 36px 24px; overflow-y: auto; border-left: 1px solid #e5ebf3; border-radius: 0; background: #fff; }
.transcript-viewer-speakers-inner { margin: 0; padding: 0; border-radius: 0; background: transparent; }
.transcript-viewer-speakers h2 { margin: 0 0 20px; }
.transcript-viewer-speakers h2,.transcript-viewer-chat h2,.transcript-viewer-turn strong,.transcript-viewer-speaker strong { font-weight: 600; }
.transcript-viewer-details dl { display: grid; gap: 0; margin: 0; }
.transcript-viewer-details dl > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 8px 0; border-bottom: 1px solid #edf1f6; }
.transcript-viewer-details dt { color: #8491a3; font-size: 13px; }
.transcript-viewer-details dd { min-width: 0; margin: 0; color: var(--ink); font-size: 13px; font-weight: 500; text-align: right; }
.transcript-viewer-speaker-section { margin-top: 26px; }
.transcript-viewer-speaker-section h3 { margin: 0 0 14px; color: var(--ink); font-size: 16px; font-weight: 600; }
.transcript-viewer-speaker-section .transcript-viewer-speaker { margin-bottom: 8px; }
.transcript-viewer-speaker-count { margin: -14px 0 20px; color: #8b98aa; font-size: 13px; }
.transcript-viewer-speaker strong { font-weight: 400; }
.transcript-viewer-speakers .transcript-save-toast { position: absolute; right: 36px; bottom: 24px; left: 36px; z-index: 4; justify-content: center; transform: translateY(8px); }
.transcript-viewer-speakers .transcript-save-toast.is-saving { transform: translateY(8px); }
.transcript-viewer-speakers .transcript-save-toast:not([hidden]) { display: flex; }
.transcript-viewer-chat { display: grid; align-content: start; gap: 12px; min-height: 0; overflow-y: auto; }
.transcript-viewer-chat[hidden] { display: none; }
.transcript-viewer-chat > p { margin: 0; color: var(--brand-blue); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.transcript-viewer-chat h2 { margin: 0; color: var(--ink); font-size: 16px; font-weight: 600; }
.transcript-viewer-chat > span { color: var(--muted); font-size: 13px; line-height: 1.55; }
.transcript-viewer-chat label { display: flex; gap: 8px; margin-top: 16px; padding: 5px 5px 5px 11px; border: 1px solid #dfe7f0; border-radius: 10px; }
.transcript-viewer-chat input { min-width: 0; flex: 1; border: 0; outline: 0; font: inherit; }
.transcript-viewer-chat label button { width: 28px; border: 0; border-radius: 7px; background: var(--brand-blue); color: #fff; }
.transcript-viewer-resizer { position: absolute; top: 0; right: calc(max(340px, var(--viewer-panel-width)) - 4px); bottom: 0; z-index: 12; width: 8px; background: #edf2f7; cursor: col-resize; }
.transcript-viewer-resizer:hover,.transcript-viewer-resizer:focus-visible { background: rgba(15,115,246,.16); outline: 0; }
.transcript-viewer-page.is-panel-collapsed .transcript-viewer-top-row,.transcript-viewer-page.is-panel-collapsed .transcript-viewer-body { grid-template-columns: minmax(0,1fr) 0; }
.transcript-viewer-page.is-panel-collapsed .transcript-viewer-right-tabs,.transcript-viewer-page.is-panel-collapsed .transcript-viewer-speakers,.transcript-viewer-page.is-panel-collapsed .transcript-viewer-resizer { display: none; }
.transcript-viewer-page.is-panel-collapsed .transcript-viewer-open-panel-actions { display: inline-flex; }

/* Правая панель повторяет устройство левого таб-меню. */
.transcript-viewer-right-tabs { align-self: stretch; display: flex; align-items: flex-end; min-height: 49px; padding: 0 36px; overflow: visible; }
.transcript-viewer-right-tabs::after { right: 36px; left: 36px; }
.transcript-viewer-right-tab-list { display: flex; align-self: stretch; gap: 22px; }
.transcript-viewer-right-tab-list button { position: relative; z-index: 1; align-self: end; padding: 0 0 9px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: #8491a3; font: inherit; font-size: 15px; font-weight: 600; line-height: 1.5; white-space: nowrap; cursor: pointer; }
.transcript-viewer-right-tab-list button.active { border-bottom-color: var(--brand-blue); color: var(--brand-blue); }
.transcript-viewer-collapse-panel { position: relative; z-index: 1; display: grid; flex: 0 0 34px; width: 34px; height: 34px; margin: 0 0 0 auto; padding: 0!important; border: 0!important; border-radius: 8px!important; background: transparent; place-items: center; }
.transcript-viewer-collapse-panel:hover,.transcript-viewer-collapse-panel:focus-visible { background: #f1f5f9; }
@media (max-width: 1050px) { .transcript-viewer-right-tabs { padding-right: 24px; padding-left: 24px; } .transcript-viewer-right-tabs::after { right: 24px; left: 24px; } }

/* Две рабочие карточки разделяют одну сетку: их границы у девайдера
   всегда совпадают, включая шапки. */
.transcript-viewer-document {
    background: #edf2f7;
    grid-template-columns: minmax(0, 1fr) max(340px, var(--viewer-panel-width));
    grid-template-rows: auto minmax(0, 1fr);
    column-gap: 8px;
}
.transcript-viewer-top-row,.transcript-viewer-body { display: contents; }
.transcript-viewer-page,.transcript-viewer-document,.transcript-viewer-top-row,.transcript-viewer-body,.transcript-viewer-head,.transcript-viewer-content,.transcript-viewer-right-tabs,.transcript-viewer-speakers { min-width: 0; }
.transcript-viewer-head { border-radius: 17px 17px 0 0; background: #fff; }
.transcript-viewer-content { border-radius: 0 0 17px 17px; background: #fff; }
.transcript-viewer-right-tabs { border-radius: 17px 17px 0 0; background: #fff; }
.transcript-viewer-speakers { border-radius: 0 0 17px 17px; background: #fff; }
.transcript-viewer-resizer {
    right: var(--viewer-panel-width);
    background: #edf2f7;
}
@media (max-width: 1050px) {
    .transcript-viewer-document { grid-template-columns: minmax(0, 1fr) min(340px, var(--viewer-panel-width)); }
    .transcript-viewer-resizer { right: min(340px, var(--viewer-panel-width)); }
}
.transcript-viewer-page.is-panel-collapsed .transcript-viewer-document {
    grid-template-columns: minmax(0, 1fr) 0;
    column-gap: 0;
}
@media (max-width: 780px) {
    .transcript-viewer-document { grid-template-columns: 1fr; column-gap: 0; }
    .transcript-viewer-head,.transcript-viewer-right-tabs,.transcript-viewer-content,.transcript-viewer-speakers { border-radius: 0; }
}

/* Каталог, расшифровка и инструменты образуют три независимые рабочие области. */
.transcript-viewer-document {
    --viewer-catalog-width: clamp(240px, 20%, 360px);
    grid-template-columns: var(--viewer-catalog-width) minmax(300px, 1fr) var(--viewer-panel-width);
}
.transcript-viewer-catalog {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    grid-row: 1 / -1;
    grid-column: 1;
    min-width: 0;
    overflow: hidden;
    border-radius: 17px;
    background: #fff;
}
.transcript-viewer-catalog-head { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; padding: 24px 16px 12px; background: #fff; }
.transcript-viewer-catalog-head::after { content: ''; position: absolute; right: 6px; bottom: 0; left: 16px; height: 1px; background: #e6ebf1; }
.transcript-viewer-catalog-head h2 { align-self: flex-start; margin: 0; color: var(--ink); font-size: 24px; font-weight: 600; letter-spacing: normal; }
.transcript-viewer-catalog-head .transcript-viewer-back::after { top: calc(100% + 7px); left: 0; transform: translateY(-4px); }
.transcript-viewer-catalog-head .transcript-viewer-back:hover::after,.transcript-viewer-catalog-head .transcript-viewer-back:focus-visible::after { transform: translateY(0); }
.transcript-viewer-catalog-list {
    display: grid;
    align-content: start;
    min-height: 0;
    overflow-y: auto;
    margin-right: 6px;
    padding: 4px 0 16px 16px;
}
.transcript-viewer-catalog-item {
    display: grid;
    gap: 5px;
    width: 100%;
    padding: 12px 10px;
    border: 0;
    border-bottom: 1px solid #e6ebf1;
    border-radius: 0;
    background: transparent;
    color: var(--ink);
    font: inherit;
    text-align: left;
    cursor: pointer;
}
.transcript-viewer-catalog-item:hover { background: #f5f8fc; }
.transcript-viewer-catalog-item.active { background: #edf5ff; }
.transcript-viewer-catalog-item strong { overflow: hidden; font-size: 13px; font-weight: 600; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.transcript-viewer-catalog-item span { overflow: hidden; color: #8491a3; font-size: 12px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.transcript-viewer-head { grid-row: 1; grid-column: 2; }
.transcript-viewer-content { grid-row: 2; grid-column: 2; }
.transcript-viewer-right-tabs { grid-row: 1; grid-column: 3; }
.transcript-viewer-speakers { grid-row: 2; grid-column: 3; }
.transcript-viewer-catalog-resizer {
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--viewer-catalog-width);
    z-index: 12;
    width: 8px;
    background: #edf2f7;
    cursor: col-resize;
}
.transcript-viewer-catalog-resizer:hover,.transcript-viewer-catalog-resizer:focus-visible { background: rgba(15,115,246,.16); outline: 0; }
@media (max-width: 1050px) {
    .transcript-viewer-document { grid-template-columns: var(--viewer-catalog-width) minmax(0, 1fr) var(--viewer-panel-width); }
    .transcript-viewer-catalog-resizer { left: var(--viewer-catalog-width); }
    .transcript-viewer-resizer { right: var(--viewer-panel-width); }
}
.transcript-viewer-page.is-panel-collapsed .transcript-viewer-document { grid-template-columns: var(--viewer-catalog-width) minmax(0, 1fr) 0; }
.transcript-viewer-page.is-panel-auto-collapsed .transcript-viewer-document { grid-template-columns: var(--viewer-catalog-width) minmax(0, 1fr) 0; column-gap: 0; }
.transcript-viewer-page.is-panel-auto-collapsed .transcript-viewer-right-tabs,
.transcript-viewer-page.is-panel-auto-collapsed .transcript-viewer-speakers,
.transcript-viewer-page.is-panel-auto-collapsed .transcript-viewer-resizer { display: none; }
.transcript-viewer-page.is-panel-auto-collapsed .transcript-viewer-open-panel-actions { display: inline-flex; }
@media (max-width: 780px) {
    .transcript-viewer-document { grid-template-columns: 1fr; }
    .transcript-viewer-catalog,.transcript-viewer-catalog-resizer { display: none; }
    .transcript-viewer-head,.transcript-viewer-content,.transcript-viewer-right-tabs,.transcript-viewer-speakers { grid-column: 1; }
}

/* Общая шапка правой рабочей области и её вкладки. */
.transcript-viewer-right-tabs {
    display: grid;
    grid-template-rows: auto auto;
    align-items: end;
    min-height: 84px;
    padding: 24px 36px 0;
    z-index: 2;
}
.transcript-viewer-panel-heading { grid-row: 1; display: flex; align-items: flex-start; justify-content: space-between; min-width: 0; margin: 0 0 8px; }
.transcript-viewer-panel-title { margin: 0; color: var(--ink); font-size: 24px; font-weight: 600; letter-spacing: normal; }
.transcript-viewer-right-tab-list { grid-row: 2; grid-column: 1; align-self: end; }
.transcript-viewer-panel-heading .transcript-viewer-collapse-panel { align-self: flex-start; margin: 0; padding: 0!important; border: 0!important; background: transparent; }
.transcript-viewer-panel-heading .transcript-viewer-collapse-panel:hover,
.transcript-viewer-panel-heading .transcript-viewer-collapse-panel:focus-visible { background: #f1f5f9; }
.transcript-viewer-panel-heading .transcript-viewer-collapse-panel::after { content: attr(data-tooltip); position: absolute; z-index: 110; top: calc(100% + 7px); right: 0; padding: 7px 9px; border-radius: 7px; background: #1d2a3d; color: #fff; font-size: 12px; font-weight: 500; line-height: 1; white-space: nowrap; opacity: 0; pointer-events: none; transform: translateY(-4px); transition: opacity .15s, transform .15s; }
.transcript-viewer-panel-heading .transcript-viewer-collapse-panel:hover::after,.transcript-viewer-panel-heading .transcript-viewer-collapse-panel:focus-visible::after { opacity: 1; transform: translateY(0); }
@media (max-width: 1050px) { .transcript-viewer-right-tabs { padding-right: 24px; padding-left: 24px; } }

/* Таб-меню центральной области находится в общей шапке — на одной линии с правым. */
.transcript-viewer-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; align-items: start; min-height: 84px; padding: 24px 36px 0; }
.transcript-viewer-title-row { grid-row: 1; grid-column: 1; }
.transcript-viewer-actions { grid-row: 1; grid-column: 2; }
.transcript-viewer-head .transcript-viewer-tabs { grid-row: 2; grid-column: 1 / -1; align-self: end; margin: 0; }
.transcript-viewer-content { grid-template-rows: auto minmax(0, 1fr); }

/* Единая сетка трёх рабочих панелей. */
.transcript-viewer-catalog { grid-template-rows: var(--viewer-header-height, 156px) minmax(0, 1fr); }
.transcript-viewer-catalog-head { box-sizing: border-box; align-items: flex-start; padding: 24px 24px 0; }
.transcript-viewer-catalog-head::after { right: 24px; left: 24px; }
.transcript-viewer-catalog-list { margin-right: 6px; padding: 4px 18px 16px 24px; }
.transcript-viewer-head,
.transcript-viewer-right-tabs {
    box-sizing: border-box;
    grid-template-rows: minmax(0, 1fr) 44px;
    min-height: var(--viewer-header-height, 156px);
    height: var(--viewer-header-height, 156px);
    padding: 24px 24px 0;
}
.transcript-viewer-right-tabs { align-items: stretch; }
.transcript-viewer-actions { align-self: flex-start; }
.transcript-viewer-right-tabs::after { right: 24px; left: 24px; }
.transcript-viewer-content { container-type: inline-size; padding-right: 24px; padding-left: 24px; }
.transcript-viewer-speakers { padding-right: 24px; padding-left: 24px; }
.transcript-viewer-catalog-list { margin-right: 0; padding-right: 24px; }
.transcript-viewer-turns,.transcript-viewer-plain { margin-right: -24px; padding-right: 24px; }
@container (max-width: 520px) {
    .transcript-viewer-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; }
    .transcript-viewer-search-controls { min-width: 0; }
    .transcript-viewer-search { width: 100%; min-width: 0; }
    .transcript-viewer-switches { display: grid; grid-template-columns: 1fr; gap: 5px; justify-items: start; }
}
@media (max-width: 780px) {
    .transcript-viewer-head { grid-template-columns: 1fr; }
    .transcript-viewer-actions { grid-row: auto; grid-column: 1; }
    .transcript-viewer-head .transcript-viewer-tabs { grid-row: auto; grid-column: 1; }
    .transcript-viewer-head,.transcript-viewer-right-tabs { height: auto; min-height: 0; }
}

.history-file-cell span {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.history-file-cell .history-expiry-warning {
    display: inline;
    margin-top: 0;
    color: #dc2626;
}

tbody tr:last-child td {
    border-bottom: 0;
}

.empty-history {
    text-align: center;
    padding: 32px 18px;
    color: var(--muted);
}

.actions-cell {
    text-align: right;
    padding-right: 18px;
}

/* Лёгкий список для истории расшифровок. */
.transcription-history-card {
    border-color: #e3eaf3;
    border-radius: 18px;
    box-shadow: 0 16px 42px rgba(25, 48, 82, 0.06);
}

.transcription-history-card .history-head { padding: 28px 30px 24px; }
.transcription-history-card .history-title { font-size: 28px; font-weight: 600; }
.transcription-history-card .history-copy { margin-top: 7px; color: var(--muted); font-size: 14px; }
.transcription-history-card .history-selection-toolbar { min-width: 0; min-height: 54px; padding: 8px 18px 8px 0; background: transparent; }
.transcription-history-card .history-master-checkbox-slot,
.transcription-history-card .history-select-column,
.transcription-history-card .history-select-cell { width: 66px; padding-left: 30px; }
.transcription-history-card .history-table,
.transcription-history-card .history-table-header { min-width: 0; }
.transcription-history-card .history-table-wrap .history-table { width: calc(100% - var(--history-scrollbar-width, 0px)); }
.transcription-history-card .history-status-col { width: 238px; }
.transcription-history-card .history-result-col { width: 184px; }
.transcription-history-card .history-table-header th { padding-top: 11px; padding-bottom: 11px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; }
.transcription-history-card .history-table-header .history-status-column,
.transcription-history-card .history-table-header .history-actions-column { text-align: left; }
.transcription-history-card .history-table-header .history-actions-column { padding-left: 28px; }
.transcription-history-card .history-table td { padding-top: 17px; padding-bottom: 17px; border-bottom-color: #edf1f5; }
.transcription-history-card .history-file-cell strong { color: var(--ink); font-size: 15px; font-weight: 600; }
.transcription-history-card .history-file-open strong { transition: color .15s ease; }
.transcription-history-card .history-file-open:hover strong,
.transcription-history-card .history-file-open:focus-visible strong { color: var(--brand-blue); }
.transcription-history-card .history-file-cell span { margin-top: 5px; color: var(--muted); }
.transcription-history-card .history-status-cell { padding-right: 38px; text-align: left; }
.transcription-history-card .history-status-value .status-pill { height: auto; padding: 0; border: 0; background: transparent; font-size: 14px; font-weight: 600; }
.transcription-history-card .history-status-value .status-pill::before { content: ''; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: currentColor; }
.transcription-history-card .history-expiry { min-height: 18px; margin-top: 5px; color: var(--muted); font-size: 12px; }
.transcription-history-card .history-expiry .history-expiry-warning { color: #c87818; }
.transcription-history-card .actions-cell { padding-right: 30px; }
.transcription-history-card .actions { align-items: center; gap: 12px; }
.transcription-history-card .history-action { position: relative; z-index: 1; display: grid; width: 34px; height: 34px; padding: 0; border: 0; background: transparent; color: #607089; font: inherit; place-items: center; cursor: pointer; }
.transcription-history-card .history-action-icon { display: grid; width: 34px; height: 34px; border-radius: 8px; background: transparent; place-items: center; }
.transcription-history-card .history-open-icon,
.transcription-history-card .history-download-icon,
.transcription-history-card .history-trash-icon { width: 17px; height: 17px; background: currentColor; }
.transcription-history-card .history-open-icon { mask: url('/static/icons/arrow-tr.svg') center / contain no-repeat; -webkit-mask: url('/static/icons/arrow-tr.svg') center / contain no-repeat; }
.transcription-history-card .history-download-icon { mask: url('/static/icons/download.svg') center / contain no-repeat; -webkit-mask: url('/static/icons/download.svg') center / contain no-repeat; }
.transcription-history-card .history-trash-icon { mask: url('/static/icons/trash.svg') center / contain no-repeat; -webkit-mask: url('/static/icons/trash.svg') center / contain no-repeat; }
.transcription-history-card .history-action:hover .history-action-icon,
.transcription-history-card .history-action:focus-visible .history-action-icon { background: var(--brand-blue-soft); }
.transcription-history-card .history-action:not(.history-delete-action):hover,
.transcription-history-card .history-action:not(.history-delete-action):focus-visible { color: var(--brand-blue); }
.transcription-history-card .history-delete-action:hover,
.transcription-history-card .history-delete-action:focus-visible { color: var(--brand-blue); }
.transcription-history-card .history-action::after { content: attr(data-tooltip); position: absolute; z-index: 110; top: calc(100% + 7px); left: 50%; padding: 7px 9px; border-radius: 7px; background: #1d2a3d; color: #fff; font-size: 12px; font-weight: 500; line-height: 1; white-space: nowrap; opacity: 0; pointer-events: none; transform: translate(-50%, -4px); transition: opacity .15s, transform .15s; }
.transcription-history-card .history-action:hover::after,
.transcription-history-card .history-action:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 760px) {
    .transcription-history-card .history-table-header { display: none; }
    .transcription-history-card .history-table-wrap { overflow: visible; max-height: none !important; }
    .transcription-history-card .history-table,
    .transcription-history-card .history-table tbody { display: block; width: 100%; }
    .transcription-history-card .history-table tr { display: grid; grid-template-columns: 34px minmax(0, 1fr); column-gap: 8px; padding: 17px 18px; border-bottom: 1px solid #edf1f5; }
    .transcription-history-card .history-table td { display: block; padding: 0; border: 0; }
    .transcription-history-card .history-select-cell { grid-row: 1 / span 2; width: auto; padding: 2px 0 0; text-align: left; }
    .transcription-history-card .history-file-cell { min-width: 0; }
    .transcription-history-card .history-status-cell { grid-column: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
    .transcription-history-card .history-expiry { margin-top: 0; text-align: right; }
    .transcription-history-card .actions-cell { grid-column: 2; margin-top: 12px; padding-right: 0; }
    .transcription-history-card .actions { justify-content: flex-start; }
    .transcription-history-card .history-selection-toolbar { padding-right: 18px; }
}

/* ==========================================================
   АДАПТИВНАЯ ВЁРСТКА
   ========================================================== */

@media (max-width: 820px) {
    .status-body {
        grid-template-columns: 1fr;
    }

    .about-product-intro,
    .about-future,
    .about-audience,
    .about-values-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .main {
        width: calc(100% - 28px);
    }

    .app-footer {
        width: 100%;
        margin-top: 40px;
    }

    .main:has(.pricing-page:not([hidden])) .app-footer {
        width: calc(100% - 32px);
    }

    .hero {
        text-align: left;
        padding: 42px 0 0;
    }

    .hero-copy {
        justify-items: start;
    }

    .btn {
        width: 100%;
    }

    h1 {
        font-size: 42px;
        letter-spacing: -1.3px;
    }

    .lead {
        font-size: 16px;
    }

    .panel {
        border-radius: 30px;
        padding: 18px;
    }

    .panel-head {
        display: grid;
        padding: 6px 6px 0;
    }

    .history-selection-toolbar {
        min-height: 58px;
    }

    .history-selection-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .drop {
        min-height: 280px;
        border-radius: 28px;
        padding: 26px;
    }

    .upload-icon {
        width: 92px;
        height: 92px;
        font-size: 40px;
    }

    .step {
        grid-template-columns: 22px 1fr;
    }

    .ss {
        display: none;
    }
}

@media (max-width: 520px) {
    .main {
        width: 100%;
    }

    .hero,
    .history,
    .about-content,
    .transcription-rules-row {
        margin-left: 16px;
        margin-right: 16px;
    }

    .home-page-heading {
        width: calc(100% - 32px);
        margin-left: 16px;
        margin-right: 16px;
    }

    .upload-section {
        padding-bottom: 72px;
    }

    .panel {
        border-radius: 0;
    }

    .drop {
        min-height: 240px;
    }
}

.step.active .ss,
.step.completed .ss {
    font-size: 0;
}

.step.active .ss::after,
.step.completed .ss::after {
    font-size: 13px;
}

.step.active .ss::after {
    content: "в работе";
}

.step.completed .ss::after {
    content: "готово";
}

/* ==========================================================
   КНОПКИ И СОСТОЯНИЯ В ИСТОРИИ
   ========================================================== */

.processing-icon {
    width: 54px;
    height: 54px;
    animation: spin 1.2s linear infinite;
}

@keyframes spin {
    from {transform: rotate(0deg);}
    to {transform: rotate(360deg);}
}

.table-btn.download {
    color: #ffffff;
    background: linear-gradient(180deg, #2f8bff 0%, #0f73f6 100%);
    border-color: transparent;

    box-shadow:
        0 8px 18px rgba(15,115,246,0.22);
}


.table-btn.download:hover {
    background: linear-gradient(180deg, #1d7df6 0%, #075ed2 100%);

    box-shadow:
        0 12px 24px rgba(15,115,246,0.28);
}


.table-btn.download .table-icon {
    filter: brightness(0) invert(1);
}

/* ==========================================================
   МОДАЛЬНЫЕ ОКНА И ПОДТВЕРЖДЕНИЕ УДАЛЕНИЯ
   ========================================================== */

.modal-overlay {

    position: fixed;
    inset: 0;

    display: none;

    justify-content: center;
    align-items: center;

    background: rgba(17, 24, 39, 0.45);

    z-index: 1200;
}


.modal-overlay.show {
    display: flex;
}


.modal {

    width: 420px;
    max-width: calc(100vw - 32px);

    background: #ffffff;

    border-radius: 12px;

    padding: 28px;

    box-shadow:
        0 24px 60px rgba(15, 23, 42, 0.18);
    
    position: relative;
}

.modal .btn {
    border-radius: 9px;
}

.legal-document-modal {
    width: 720px;
    max-height: calc(100vh - 48px);
    display: flex;
    flex-direction: column;
}

.legal-document-scroll {
    min-height: 260px;
    max-height: min(52vh, 460px);
    margin-bottom: 20px;
    padding: 18px 20px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 9px;
    background: #f8fafc;
}

.legal-document-scroll p {
    margin: 0 0 16px;
}

.legal-document-scroll p:last-child {
    margin-bottom: 0;
}

.legal-document-scroll h3 {
    margin: 24px 0 9px;
    color: #17233d;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
}

.legal-document-scroll h3:first-of-type {
    margin-top: 0;
}

.legal-document-scroll a {
    color: #1476e8;
}

.legal-document-notice {
    color: #64748b;
    font-weight: 500;
}

.legal-document-modal .modal-actions {
    flex: 0 0 auto;
}

@media (max-width: 600px) {
    .legal-document-modal {
        max-height: calc(100vh - 32px);
    }

    .legal-document-scroll {
        min-height: 220px;
        max-height: 52vh;
        padding: 16px;
    }
}


.modal-title {

    font-size: 22px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 12px;
}


.modal-text {

    font-size: 16px;
    line-height: 1.5;
    color: #111111;
    margin-bottom: 20px;
}

.delete-modal-copy p {
    margin: 0;
}

.delete-modal-copy p + p {
    margin-top: 16px;
}

.delete-modal-copy .delete-balance-note {
    font-size: 15px;
    line-height: 1.5;
    color: #6b7280;
}

.modal-option-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.5;
    color: #111111;
    margin-bottom: 12px;
}


.modal-actions {

    display: flex;
    justify-content: flex-end;
    gap: 12px;
}


.btn.danger {

    box-shadow: none;
    color: #ffffff;

    background: linear-gradient(
        180deg,
        #f87171 0%,
        #dc2626 100%
    );

    border-color: transparent;
}


.btn.danger:hover {

    box-shadow:
        0 12px 24px rgba(220, 38, 38, 0.22);
}


.account-settings-modal {
    width: 560px;
}

.settings-page {
    padding-bottom: 64px;
}

.settings-page-heading,
.settings-layout {
    width: min(1120px, calc(100% - 48px));
    margin-left: auto;
    margin-right: auto;
}

.settings-page-heading {
    text-align: center;
}

.settings-layout {
    display: grid;
    gap: 20px;
}

.settings-card {
    background: #ffffff;
    border: 1px solid #dbe3ef;
    border-radius: 12px;
    padding: 28px 30px;
    box-shadow: 0 12px 28px rgba(31, 41, 55, 0.05);
}

.settings-card-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 18px;
}

.settings-card-heading h2 {
    margin: 0 0 6px;
    font-size: 24px;
    line-height: 1.25;
    font-weight: 600;
    color: #111827;
}

.settings-card-heading p {
    margin: 0;
    font-size: 16px;
    line-height: 1.55;
    color: #64748b;
}

.settings-field,
.settings-form {
    border-top: 0;
    padding-top: 0;
}

.settings-profile-grid {
    display: grid;
    grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.55fr);
    gap: 20px;
    align-items: stretch;
}

.settings-profile-grid > * {
    padding: 18px 20px;
    border-radius: 9px;
    background: #f8fafc;
}

.settings-readonly-field {
    display: grid;
    align-content: start;
    gap: 8px;
    padding-bottom: 18px;
}

.settings-readonly-field label,
.settings-form > label {
    font-size: 14px;
    line-height: 1.35;
    font-weight: 600;
    color: #374151;
}

.settings-readonly-field span {
    font-size: 16px;
    color: #111827;
}

.settings-readonly-field small,
.settings-help {
    font-size: 14px;
    line-height: 1.45;
    color: #64748b;
}

.settings-form {
    display: grid;
    gap: 10px;
}

.settings-name-form {
    align-content: start;
}

.settings-form input,
#deleteAccountConfirmation {
    min-height: 44px;
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    padding: 10px 12px;
    font: inherit;
    color: #111827;
    background: #ffffff;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.settings-password-input {
    position: relative;
    width: min(340px, 100%);
}

.settings-password-input input {
    padding-right: 44px;
}

.settings-password-input .input-eye {
    position: absolute;
    top: 50%;
    right: 13px;
    width: 20px;
    height: 20px;
    transform: translateY(-50%);
    opacity: 0.72;
}

.settings-password-input .input-eye:hover,
.settings-password-input .input-eye:focus {
    opacity: 1;
    outline: none;
}

.settings-form input:focus,
#deleteAccountConfirmation:focus {
    border-color: #1687e8;
    box-shadow: 0 0 0 3px rgba(22, 135, 232, 0.12);
}

.settings-input-action {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
}

.settings-password-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 8px;
}

.settings-card .btn {
    border-radius: 9px;
}

.settings-name-form .btn.secondary:hover {
    border-color: rgba(15, 115, 246, 0.35);
    background: var(--brand-blue-soft);
    box-shadow: none;
    color: var(--brand-blue);
}

.settings-message {
    min-height: 20px;
    font-size: 14px;
    line-height: 1.4;
}

.settings-message:empty {
    display: none;
}

.settings-message.success {
    color: #15803d;
}

.settings-message.error {
    color: #dc2626;
}

.settings-danger-card {
    border-color: rgba(220, 38, 38, 0.28);
    background: rgba(254, 242, 242, 0.62);
}

.settings-danger-card .settings-card-heading {
    margin-bottom: 0;
}

.contact-page {
    padding-bottom: 64px;
}

.contact-page-heading,
.contact-card,
.contact-note {
    width: min(1120px, calc(100% - 48px));
    margin-left: auto;
    margin-right: auto;
}

.contact-page-heading {
    text-align: center;
}

.contact-card {
    padding: 30px;
    background: #ffffff;
    border: 1px solid #dbe3ef;
    border-radius: 12px;
    box-shadow: 0 12px 28px rgba(31, 41, 55, 0.05);
}

.contact-card-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 32px;
    margin-bottom: 26px;
}

.contact-card-heading h2 {
    margin: 0 0 6px;
    font-size: 24px;
    line-height: 1.25;
    font-weight: 600;
    color: #111827;
}

.contact-card-heading p,
.contact-note p {
    margin: 0;
    font-size: 16px;
    line-height: 1.55;
    color: #64748b;
}

.contact-reply-address {
    flex: 0 0 auto;
    display: grid;
    gap: 3px;
    padding: 12px 15px;
    border-radius: 9px;
    background: #f8fafc;
    font-size: 14px;
    color: #64748b;
}

.contact-reply-address[hidden],
.contact-email-field[hidden] {
    display: none;
}

.contact-reply-address strong {
    color: #374151;
    font-weight: 600;
}

.contact-form {
    display: grid;
    gap: 10px;
}

.contact-form label {
    margin-top: 4px;
    font-size: 14px;
    line-height: 1.35;
    font-weight: 600;
    color: #374151;
}

.contact-form select,
.contact-form input[type="email"],
.contact-form textarea {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    padding: 11px 12px;
    font: inherit;
    color: #111827;
    background: #ffffff;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.contact-email-field {
    display: grid;
    gap: 10px;
}

.contact-email-field:has(.contact-field-error:not([hidden])) {
    gap: 7px;
}

.contact-form input.contact-input-error {
    border-color: #dc2626;
}

.contact-form input.contact-input-error:focus {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.contact-field-error {
    font-size: 13px;
    line-height: 1.4;
    color: #dc2626;
}

.contact-field-error[hidden] {
    display: none;
}

.contact-honeypot {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.contact-form select {
    min-height: 46px;
    appearance: none;
    padding-right: 42px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6l4 4 4-4' stroke='%236b7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px 16px;
}

.contact-form textarea {
    min-height: 170px;
    resize: vertical;
}

.contact-form select:focus,
.contact-form input[type="email"]:focus,
.contact-form textarea:focus {
    border-color: #1687e8;
    box-shadow: 0 0 0 3px rgba(22, 135, 232, 0.12);
}

.contact-form input.contact-input-error:focus {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.contact-form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 8px;
}

.contact-form-footer p {
    margin: 0;
    font-size: 14px;
    line-height: 1.45;
    color: #64748b;
}

.contact-message-meta {
    display: grid;
    gap: 3px;
}

.contact-message-meta span {
    font-size: 13px;
    line-height: 1.4;
    color: #94a3b8;
}

.contact-form-footer .btn {
    flex: 0 0 auto;
    border-radius: 9px;
}

.contact-form-message {
    min-height: 20px;
    font-size: 14px;
    color: #64748b;
}

.contact-form-message:empty {
    display: none;
}

.contact-note {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-top: 18px;
    padding: 20px 22px;
    border: 1px solid rgba(15, 115, 246, 0.18);
    border-radius: 12px;
    background: rgba(15, 115, 246, 0.05);
}

.contact-note-icon {
    flex: 0 0 24px;
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #0f73f6;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
}

.contact-note strong {
    display: block;
    margin-bottom: 3px;
    color: #111827;
}

@media (max-width: 720px) {
    .settings-page-heading,
    .settings-layout,
    .contact-page-heading,
    .contact-card,
    .contact-note {
        width: min(100% - 32px, 920px);
    }

    .settings-card {
        padding: 22px 20px;
    }

    .settings-card-heading,
    .settings-readonly-field,
    .settings-password-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .settings-input-action {
        grid-template-columns: 1fr;
    }

    .settings-profile-grid {
        grid-template-columns: 1fr;
    }

    .contact-card {
        padding: 22px 20px;
    }

    .contact-card-heading,
    .contact-form-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .contact-reply-address {
        width: 100%;
    }

    .contact-form-footer .btn {
        width: 100%;
    }
}

.account-settings-modal > .modal-title {
    margin-bottom: 24px;
}

.account-settings-section {
    margin-bottom: 22px;
}

.account-settings-heading {
    margin: 0 0 10px;
    color: #111827;
    font-size: 16px;
    font-weight: 600;
}

.account-settings-row {
    min-height: 70px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border: 1px solid #e2e8f0;
    border-bottom: 0;
    background: #ffffff;
}

.account-settings-row:first-of-type {
    border-radius: 9px 9px 0 0;
}

.account-settings-row:last-child {
    border-bottom: 1px solid #e2e8f0;
    border-radius: 0 0 9px 9px;
}

.account-settings-row:only-of-type {
    border-bottom: 1px solid #e2e8f0;
    border-radius: 9px;
}

.account-settings-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.account-settings-label {
    color: #64748b;
    font-size: 13px;
}

.account-settings-value {
    overflow: hidden;
    color: #111827;
    font-size: 15px;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-settings-password {
    letter-spacing: 2px;
}

.account-settings-action {
    height: 38px;
    padding: 0 16px;
    flex: 0 0 auto;
}

.account-settings-danger {
    padding-top: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border-top: 1px solid #e2e8f0;
}

.account-settings-danger p {
    max-width: 310px;
    margin: 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.45;
}

.account-settings-delete {
    height: 40px;
    padding: 0 18px;
    flex: 0 0 auto;
}

@media (max-width: 600px) {
    .account-settings-modal {
        max-height: calc(100vh - 32px);
        overflow-y: auto;
    }

    .account-settings-danger {
        align-items: stretch;
        flex-direction: column;
    }

    .account-settings-delete {
        width: 100%;
    }
}





.step-info {
    margin-top: 10px;
    font-size: 12px;
}

.step-extra {
    margin-top: 6px;
    font-size: 12px;
    color: #666;
}

#step2 {
    padding-top: 12px;
    padding-bottom: 12px;
}

#step2 .step-info,
#step2 .step-extra {
    grid-column: 2 / -1;
}



/* Варианты скачивания результата. */

.download-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 8px 0 20px;
}

.download-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    line-height: 1.35;
    color: #111111;
    cursor: pointer;
}

.download-processing {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
}


.download-processing .processing-icon {
    width: 32px;
    height: 32px;
}


.processing-text {
    font-size: 16px;
    line-height: 1.4;
    color: var(--text-color);
}


/* ==========================================================
   КАРКАС ПРИЛОЖЕНИЯ И БОКОВОЕ МЕНЮ
   ========================================================== */

.app-layout {
    display: flex;
    width: 100%;
    position: relative;

    min-height: calc(100vh - 72px);
}







.sidebar {
    flex: 0 0 300px;
    width: 300px;
    position: sticky;
    top: 72px;
    height: calc(100vh - 72px);
    padding: 24px 16px;
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(12px);
    border-right: 1px solid rgba(229, 231, 235, 0.55);
    box-shadow: 0 16px 40px rgba(17, 24, 39, 0.04);
    overflow-y: auto;
    z-index: 1000;

    display: flex;
    flex-direction: column;
}


.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 0;
}


.sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;

    height: 37px;
    width: 100%;

    padding: 0 11px;

    border-radius: 12px;

    border: none;
    background: transparent;

    color: var(--body);

    font-size: 14px;
    font-family: inherit;
    font-weight: 500;

    cursor: pointer;
    text-align: left;

    transition:
        background .18s,
        color .18s;
}

.sidebar-item-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    transition: filter .18s;
}


.sidebar-item:not(.active):hover {
    background: transparent;
    color: var(--brand-blue);
}

.download-modal { width: 468px; padding: 0; overflow: hidden; border-radius: 16px; }
.download-modal-header { display: flex; align-items: center; padding: 24px 28px 20px; }
.download-modal-header .modal-title { margin: 0; font-size: 21px; }
.download-modal-close { top: 17px; right: 18px; }
.download-option-group { padding: 0 28px; }
.download-option-group + .download-option-group { margin-top: 20px; }
.download-modal .modal-option-title { margin: 0 0 9px; color: #1f2937; font-size: 15px; font-weight: 700; }
.download-modal .download-options { display: grid; gap: 0; margin: 0; padding: 4px; border-radius: 10px; background: #f5f7fa; }
.download-modal .download-options label { min-height: 40px; padding: 8px 10px; border: 1px solid transparent; border-radius: 7px; background: transparent; font-size: 14px; transition: background .16s, color .16s; }
.download-modal .download-options label:hover { background: rgba(255, 255, 255, .7); }
.download-modal .download-options label:has(input:checked) { border-radius: 7px; background: #fff; color: #145fc4; }
.download-modal .download-options input { accent-color: #1677f8; }
.download-modal .download-options:not(.download-file-types) { padding: 0; border-radius: 0; background: transparent; }
.download-modal .download-options:not(.download-file-types) label { min-height: 38px; padding: 7px 2px; border: 0; border-radius: 0; background: transparent; }
.download-modal .download-options:not(.download-file-types) label:hover { background: transparent; color: #145fc4; }
.download-modal .download-options:not(.download-file-types) label:has(input:checked) { border-radius: 0; background: transparent; color: #145fc4; }
.download-modal .download-file-types { position: relative; display: flex; flex-flow: row nowrap; align-items: stretch; gap: 22px; padding: 0; border-radius: 0; background: transparent; }
.download-modal .download-file-types::after { content: ''; position: absolute; right: 0; bottom: 0; left: 0; height: 1px; background: #e3e8ef; }
.download-modal .download-file-types label { position: relative; z-index: 1; display: flex; flex: 0 0 auto; min-height: 38px; padding: 8px 0; justify-content: flex-start; border: 0; border-bottom: 2px solid transparent; border-radius: 0; color: #8491a3; font-size: 14px; font-weight: 700; white-space: nowrap; }
.download-modal .download-file-types label:hover { background: transparent; color: var(--brand-blue); }
.download-modal .download-file-types input { position: absolute; opacity: 0; pointer-events: none; }
.download-modal .download-file-types label:has(input:checked) { border-bottom-color: var(--brand-blue); border-radius: 0; background: transparent; color: var(--brand-blue); }
.download-modal-actions { min-height: 60px; margin: 24px 0 0; padding: 0 28px 24px; border-top: 0; background: transparent; }
.download-modal-actions .btn { min-width: 112px; }
.work-modal { width: 468px; padding: 24px 28px; border-radius: 16px; }
.work-modal .modal-title { margin-bottom: 12px; font-size: 21px; }
.work-modal .modal-text { margin-bottom: 22px; color: #66758a; font-size: 14px; }
.work-modal .modal-actions { margin-top: 22px; }
@media (max-width: 520px) { .download-modal-header,.download-option-group { padding-right: 20px; padding-left: 20px; } .download-modal-actions { padding-right: 20px; padding-left: 20px; } }

.sidebar-item.active {
    background: var(--brand-blue-soft);
    color: var(--brand-blue);
}

.sidebar-item:not(.active):hover .sidebar-item-icon,
.sidebar-item.active .sidebar-item-icon,
.user-action:hover .action-icon,
.user-action.active .action-icon {
    filter: brightness(0) saturate(100%) invert(39%) sepia(99%) saturate(2536%) hue-rotate(202deg) brightness(99%) contrast(95%);
}


.sidebar-account-area {
    margin-top: auto;
}


.sidebar-billing {
    display: none;
    margin: 0 8px 14px;
    padding: 16px;
    border: 1px solid #dfe4ec;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 8px 24px rgba(17, 24, 39, 0.05);
}


.sidebar-account-area:has(.sidebar-user.authenticated) .sidebar-billing {
    display: block;
}


.sidebar-billing-plan {
    color: var(--ink);
    font-size: 14px;
    font-weight: 600;
}


.sidebar-billing-usage {
    margin-top: 5px;
    color: var(--body);
    font-size: 13px;
    line-height: 1.4;
}


.sidebar-billing-progress {
    display: flex;
    width: 100%;
    height: 7px;
    margin-top: 12px;
    overflow: hidden;
    border-radius: var(--pill);
    background: #e8edf4;
}


.billing-progress-used {
    width: 25%;
    background: var(--brand-blue);
}


.billing-progress-reserved {
    width: 3.75%;
    background: #f59e0b;
}

.billing-progress-preview {
    width: 0;
    background: #f97316;
}


.sidebar-billing-reserved {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 9px;
    color: var(--muted);
    font-size: 12px;
}


.billing-reserved-marker {
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    border-radius: 50%;
    background: #f59e0b;
}

.billing-reserved-marker.preview {
    background: #f97316;
}


.sidebar-account-button {
    width: 100%;
    height: 36px;
    margin-top: 14px;
    border: 1px solid #cfd7e3;
    border-radius: 9px;
    background: #ffffff;
    color: var(--body);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color .18s, color .18s, background .18s;
}


.sidebar-account-button:hover {
    border-color: rgba(15, 115, 246, 0.35);
    background: var(--brand-blue-soft);
    color: var(--brand-blue);
}


.header-actions .btn.secondary {
    height: 36px;
    padding: 0 18px;
    border: 1px solid #cfd7e3;
    border-radius: 9px;
    background: #ffffff;
    box-shadow: none;
    color: var(--body);
    font-size: 13px;
    font-weight: 500;
}


.header-actions .btn.secondary:hover {
    border-color: rgba(15, 115, 246, 0.35);
    background: var(--brand-blue-soft);
    box-shadow: none;
    color: var(--brand-blue);
}


.sidebar-user {

    margin-top: 0;

    padding: 0;

    border-top: 1px solid rgba(255,255,255,0.72);

    font-size: 14px;

}

.user-name {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding-left: 11px;

    font-weight: 600;
}


.user-icon {
    flex-shrink: 0;
}


.user-text {
    display: flex;
    flex-direction: column;
}


.user-email {
    margin-top: 4px;

    font-size: 13px;
    color: #6b7280;
}


.user-actions {
    margin-top: 16px;
    padding-top: 0px;
    padding-bottom: 0;

    border-top: 1px solid rgba(255,255,255,0.72);

}


.user-action {
    display: flex;
    align-items: center;
    gap: 10px;

    width: 100%;
    min-height: 37px;
    padding: 0 11px;

    border-radius: 12px;

    background: none;
    border: none;

    color: #374151;
    text-decoration: none;
    font-size: 14px;
    font-family: inherit;

    cursor: pointer;
    text-align: left;

    transition:
        background .18s,
        color .18s;
}

.user-action:hover {
    background: transparent;
    color: var(--brand-blue);
}

.user-action.active {
    background: var(--brand-blue-soft);
    color: var(--brand-blue);
}

.user-action .action-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    transition: filter .18s;
}



/* ==========================================================
   ОКНО УЧЁТНОЙ ЗАПИСИ
   ========================================================== */

.account-logo {

    display: block;

    margin: 0 auto 24px;

    width: 119px;

    height: 29px;

}

.sidebar-balance-action { display: none; }

.modal-secondary-text {

    font-size: 15px;
    line-height: 1.5;

}

.account-subtitle {

    margin-top: -8px;
    margin-bottom: 28px;

    text-align: center;

    color: #6b7280;

}


.form-group {

    margin-bottom: 18px;

}


.form-group label {

    display: block;

    margin-bottom: 8px;

    font-size: 14px;

    font-weight: 500;

}


.input-wrapper {

    display: flex;

    align-items: center;

    border: 1px solid #d1d5db;

    border-radius: 12px;

    padding: 0 14px;

    height: 48px;

    background: white;

}


.input-icon {

    margin-right: 6px;

}


.input-wrapper input {

    flex: 1;

    border: none;

    outline: none;

    font-size: 15px;

    background: transparent;

}


.forgot-password {

    display: flex;
    justify-content: flex-end;
    align-items: center;

    width: 100%;

    margin-top: -6px;
    margin-bottom: 24px;

    padding: 0;

}


.register-block {

    margin-top: 0px;

    text-align: center;

    font-size: 15px;

    color: #6b7280;

}


.register-block a {

    margin-left: 4px;

    color: #2563eb;

    text-decoration: none;

    font-weight: 500;

}

.register-options {
    margin-bottom: 24px;
}

.account-modal .modal-title {
    text-align: center;
}

.password-reset-modal .modal-text {
    margin-bottom: 24px;
    color: #6b7280;
}

.password-reset-modal .form-group {
    margin-bottom: 24px;
}

.password-reset-modal .modal-actions .btn {
    min-width: 124px;
}

.new-password-modal .modal-text {
    margin-bottom: 24px;
    color: #6b7280;
}

.new-password-modal .form-error {
    min-height: 20px;
    margin: -6px 0 10px;
}

.new-password-modal .modal-actions {
    margin-bottom: 0;
}

/* Единая компактная компоновка окон входа и регистрации. */
.account-modal {
    max-height: calc(100vh - 32px);
    overflow-y: auto;
}

.account-modal .account-logo {
    margin-bottom: 16px;
}

.account-modal .form-group {
    margin-bottom: 8px;
}

.account-modal .field-error {
    min-height: 15px;
    margin-top: 3px;
    font-size: 12px;
    line-height: 15px;
}

.account-modal .register-options {
    margin-bottom: 14px;
}

.account-modal .modal-actions {
    height: auto;
    margin-bottom: 16px;
}

.account-submit {

    width: 100%;

}


/* Региональный шаг перед существующей формой регистрации. */
.registration-region-modal {
    max-height: calc(100vh - 32px);
    overflow-y: auto;
}

.registration-region-modal [hidden] {
    display: none !important;
}

.registration-region-title {
    padding-right: 20px;
    text-align: center;
}

.registration-region-heading {
    margin: 22px 0 10px;
    font-weight: 600;
    color: #1f2937;
}

.registration-region-list {
    margin: 0 0 20px;
    padding: 0;
    list-style: none;
    color: #4b5563;
    font-size: 14px;
    line-height: 1.55;
}

.registration-region-list li {
    display: flex;
    align-items: center;
    gap: 10px;
}

.registration-region-list img {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
}

.registration-region-list li + li {
    margin-top: 7px;
}

.registration-region-question {
    margin: 22px 0 18px;
    font-weight: 600;
    line-height: 1.45;
    color: #1f2937;
}

.registration-region-notice {
    margin: 20px 0;
    line-height: 1.5;
}

.registration-region-actions {
    display: grid;
    gap: 10px;
    margin-top: 20px;
}

.registration-country-select-arrow {
    margin-left: 16px;
    color: #9ca3af;
    font-size: 11px;
    pointer-events: none;
}

.registration-change-country {
    justify-self: center;
    margin-top: 4px;
}

.registration-country-search-group {
    margin: 22px 0 14px;
}

.registration-country-search-group .input-wrapper {
    padding-left: 14px;
}

.registration-country-search-input {
    padding-right: 14px;
}

.registration-country-search-input:focus-within {
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.registration-country-list {
    max-height: min(36vh, 280px);
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 9px;
    background: #ffffff;
}

.registration-country-option {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 11px 14px;
    border: none;
    border-bottom: 1px solid #eef2f7;
    background: transparent;
    color: #1f2937;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.registration-country-option:last-child {
    border-bottom: none;
}

.registration-country-option:hover,
.registration-country-option:focus-visible {
    outline: none;
    background: #eff6ff;
    color: #1d4ed8;
}

.registration-country-name {
    flex: 1;
}

.registration-country-empty {
    padding: 22px 0 8px;
    text-align: center;
}

@media (max-width: 560px) {
    .registration-region-modal {
        padding: 24px 20px;
    }
}


.guest-login-btn {

    width: 100%;
    border-radius: 9px;

}


.guest-login-btn:hover {

    background: #2563eb;

}



.modal-close {

    position: absolute;

    top: 14px;
    right: 18px;

    border: none;
    background: none;

    font-size: 28px;
    line-height: 1;

    color: var(--text-muted);

    cursor: pointer;

}


.modal-close:hover {

    color: var(--text);

}


.input-eye {
    cursor: pointer;
}


/* ==========================================================
   ЭЛЕМЕНТЫ УПРАВЛЕНИЯ В ШАПКЕ
   ========================================================== */

.header-logo {
    display: flex;
    align-items: center;
}


.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}


.language-switcher {
    position: relative;
}


.header-actions .language-switcher-button {
    min-width: 126px;
    justify-content: space-between;
    gap: 12px;
}

.language-switcher-current {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.language-switcher-flag {
    width: 18px;
    height: 14px;
    object-fit: contain;
    flex: 0 0 auto;
}


.language-switcher-arrow {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6l4 4 4-4' stroke='%239ca3af' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    transition: transform .18s ease;
}


.language-switcher.open .language-switcher-arrow {
    transform: rotate(180deg);
}


.language-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 50;
    width: 100%;
    min-width: 150px;
    padding: 6px;
    border: 1px solid #d8e0eb;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 16px 36px rgba(17, 24, 39, 0.12);
}


.language-menu[hidden] {
    display: none;
}


.language-option {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: 36px;
    padding: 0 10px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--body);
    font: inherit;
    font-size: 13px;
    text-align: left;
    cursor: pointer;
}


.language-option-flag {
    width: 18px;
    height: 14px;
    object-fit: contain;
    flex: 0 0 auto;
}


.language-option:hover,
.language-option:focus-visible {
    outline: none;
    background: var(--brand-blue-soft);
    color: var(--brand-blue);
}


.language-option.selected {
    color: var(--brand-blue);
    font-weight: 600;
}


.text-action-button {
    background: none;
    border: none;
    padding: 0;

    color: #2563eb;
    font-family: inherit;
    text-decoration: none;

    cursor: pointer;

    transition: color .18s;
}

.registration-consent-text {
    line-height: 1.45;
}


.text-action-button:hover {
    color: #1d4ed8;
}

.field-error {
    min-height: 18px;
    margin-top: 6px;
    font-size: 13px;
    color: #d9534f;
    visibility: hidden;
}


.input-wrapper:has(.input-error) {
    border-color: #d9534f !important;
}


/* ==========================================================
   Translation page
   ========================================================== */

.translation-form textarea {
    width: 100%;
    box-sizing: border-box;

    border: 1px solid #cbd5e1;
    border-radius: 9px;

    padding: 11px 12px;

    font: inherit;
    color: #111827;
    background: #ffffff;

    outline: none;

    resize: vertical;

    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}


.translation-form textarea:focus {
    border-color: #2563eb;

    box-shadow:
        0 0 0 3px rgba(37, 99, 235, 0.12);
}


/* ----------------------------------------------------------
   Поля перевода
   ---------------------------------------------------------- */

.translation-fields {
    display: flex;
    flex-direction: column;
    gap: 22px;
}


.translation-field {
    width: 100%;
}


.translation-field label {
    display: block;
    margin-bottom: 7px;
}


/* ----------------------------------------------------------
   Счётчик
   ---------------------------------------------------------- */

.translation-field-meta {
    margin-top: 6px;

    display: flex;
    justify-content: flex-end;

    font-size: 13px;
    color: #64748b;
}


/* ----------------------------------------------------------
   Нижняя часть формы
   ---------------------------------------------------------- */

.translation-form-footer {
    margin-top: 22px;

    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    gap: 20px;
}


.translation-message-meta p {
    margin: 0;

    font-size: 13px;
    color: #64748b;
}


/* ----------------------------------------------------------
   Сообщение
   ---------------------------------------------------------- */

.translation-form-message {
    margin-top: 14px;

    font-size: 14px;
}


/* ----------------------------------------------------------
   Нижняя информационная карточка
   ---------------------------------------------------------- */

.translation-note {
    margin-top: 20px;

    display: flex;
    align-items: flex-start;

    gap: 12px;

    padding: 16px 18px;

    border: 1px solid #e2e8f0;
    border-radius: 10px;

    background: #ffffff;
}


.translation-note-icon {
    flex: 0 0 auto;

    width: 24px;
    height: 24px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #eff6ff;
    color: #2563eb;

    font-weight: 600;
}


.translation-note strong {
    display: block;
    margin-bottom: 4px;
}


.translation-note p {
    margin: 0;

    color: #64748b;
}

.translation-page {
    padding-bottom: 64px;
}

.translation-page-heading {
    text-align: center;
}

.translation-content {
    width: 100%;
    margin: 0 auto;
}

.translation-content > .transcription-workflow {
    margin-bottom: -4px;
}

.translation-file-card {
    padding: 30px;
}

.transcription-file-card {
    padding: 30px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 20px 54px rgba(17, 24, 39, 0.07);
    backdrop-filter: blur(16px);
}

.transcription-file-card .panel-head {
    padding: 0;
    margin-bottom: 0;
}

.transcription-file-card .section-title {
    color: var(--ink);
    line-height: 1.25;
    letter-spacing: -0.4px;
}

.transcription-file-card .section-copy {
    color: var(--body);
    line-height: 1.55;
}

.transcription-file-card .drop {
    margin-top: 22px;
}

.translation-file-card h2 {
    margin: 0;
    color: var(--ink);
    font-size: 30px;
    line-height: 1.25;
    letter-spacing: -0.4px;
    font-weight: 600;
}

.translation-workspace {
    margin-top: 22px;
}

.translation-file-card.has-file .translation-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 36%);
    gap: 20px;
}

.translation-main-area {
    min-width: 0;
}

.translation-language-grid {
    display: none;
    grid-template-columns: minmax(0, 1fr) 36px minmax(0, 1fr);
    grid-template-rows: 1fr auto;
    align-items: end;
    gap: 14px;
    min-height: 260px;
    padding: 28px 28px 18px;
    border: 1px solid #d5dde8;
    border-radius: 12px;
    background: #f8fbff;
}

.translation-language-notice {
    grid-column: 1 / -1;
    align-self: start;
    margin-bottom: 14px;
    color: #374151;
}

.translation-language-notice > strong {
    display: block;
    color: #1f2937;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
}

.translation-language-notice p {
    margin: 7px 0 0;
    color: #64748b;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.5;
}

.translation-language-notice p strong {
    color: #475569;
    font-weight: 600;
}

.translation-file-card.has-file .translation-language-grid {
    display: grid;
}

.translation-language-control {
    display: grid;
    gap: 8px;
    color: #374151;
    font-size: 14px;
    font-weight: 600;
}

.translation-language-picker {
    position: relative;
}

.translation-language-search {
    width: 100%;
    min-height: 46px;
    padding: 9px 48px 9px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    color: #111827;
    background-color: #ffffff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6l4 4 4-4' stroke='%239ca3af' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px 16px;
    font: inherit;
    font-weight: 400;
    cursor: text;
}

.translation-language-search::placeholder {
    color: #64748b;
    opacity: 1;
}

.translation-language-menu {
    position: absolute;
    z-index: 20;
    top: calc(100% + 4px);
    width: 100%;
    max-height: 300px;
    overflow: visible;
    padding: 4px;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
}

.sidebar-collapse-tab {
    position: absolute;
    top: 27px;
    left: 285px;
    z-index: 1100;
    display: grid;
    width: 30px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 0 9px 9px 0;
    background: rgba(255, 255, 255, .78);
    box-shadow: none;
    place-items: center;
    cursor: pointer;
    transition: background .18s, border-color .18s;
}

.sidebar-collapse-tab:hover { background: rgba(255, 255, 255, .78); }
.sidebar-collapse-tab img { width: 19px; height: 19px; transition: filter .18s; }
.sidebar-collapse-tab::after { content: attr(data-tooltip); position: absolute; top: 50%; left: calc(100% + 8px); z-index: 1101; padding: 7px 9px; border-radius: 7px; background: #1d2a3d; color: #fff; font-size: 12px; font-weight: 500; line-height: 1; white-space: nowrap; opacity: 0; pointer-events: none; transform: translate(-4px, -50%); transition: opacity .15s, transform .15s; }
.sidebar-collapse-tab[data-tooltip=""]::after { display: none; }
.sidebar-collapse-tab:hover::after { opacity: 1; transform: translate(0, -50%); }

.translation-language-option {
    display: block;
    width: 100%;
    padding: 9px 8px;
    border: 0;
    border-radius: 6px;
    color: #1f2937;
    background: transparent;
    font: inherit;
    font-weight: 400;
    text-align: left;
    cursor: pointer;
}

.translation-language-option:hover,
.translation-language-option.selected {
    background: #eff6ff;
}

.translation-language-option[hidden] {
    display: none;
}

.translation-language-native {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.translation-language-control.invalid .translation-language-search {
    border-color: #dc2626;
    color: #dc2626;
    box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.08);
}

.translation-language-control.invalid .translation-language-search:focus {
    outline: 2px solid rgba(220, 38, 38, 0.16);
    outline-offset: 1px;
}

.translation-language-arrow {
    display: grid;
    place-items: center;
    min-height: 46px;
    color: var(--brand-blue);
    font-size: 24px;
    font-weight: 600;
}

.translation-file-drop {
    position: relative;
    display: flex;
    width: 100%;
    min-height: 310px;
    margin: 0;
    padding: 38px;
    border: 1.5px dashed rgba(148, 163, 184, 0.74);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(250, 251, 253, 0.78));
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 20px;
    color: #64748b;
    cursor: pointer;
    font: inherit;
    overflow: hidden;
    text-align: center;
    transition: border-color 0.18s, background 0.18s, box-shadow 0.18s, transform 0.18s;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92), inset 0 -18px 42px rgba(37, 99, 235, 0.035);
}

.translation-file-drop::before {
    content: "";
    position: absolute;
    width: 250px;
    height: 250px;
    left: 50%;
    top: 44%;
    transform: translate(-50%, -50%);
    border-radius: var(--pill);
    background: radial-gradient(circle, rgba(37, 99, 235, 0.18), rgba(37, 99, 235, 0.06) 45%, transparent 72%);
    filter: blur(2px);
    pointer-events: none;
}

.translation-file-drop:hover {
    border-color: #2f8bff;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(244, 249, 255, 0.92));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.96), 0 24px 60px rgba(37, 99, 235, 0.16);
    transform: translateY(-2px);
}

.translation-file-drop > * {
    position: relative;
    z-index: 1;
}

.translation-file-drop .translation-upload-icon {
    display: grid;
    width: 112px;
    height: 112px;
    max-width: none;
    place-items: center;
    border-radius: var(--pill);
    background: radial-gradient(circle at 36% 24%, #ffffff 0%, #dcecff 34%, #9fc8ff 100%);
    box-shadow: 0 26px 52px rgba(15, 115, 246, 0.28), inset 0 2px 0 rgba(255, 255, 255, 0.95), inset 0 -16px 30px rgba(37, 99, 235, 0.12);
}

.translation-upload-icon img {
    width: 54px;
    height: 54px;
}

.translation-file-drop strong {
    color: var(--ink);
    font-size: 24px;
    line-height: 1.25;
    letter-spacing: -0.45px;
    font-weight: 700;
}

.translation-file-drop > span:last-child {
    max-width: 680px;
    text-align: center;
    color: #8a929f;
    font-size: 16px;
    line-height: 1.5;
}

.translation-file-card.has-file .translation-file-drop {
    display: none;
}

.translation-file-panel {
    display: none;
    min-width: 0;
    min-height: 260px;
    padding: 18px;
    border-radius: 12px;
    background: #eef3f9;
    flex-direction: column;
    transition: flex-basis .2s ease, width .2s ease, padding .2s ease;
}

.app-layout.sidebar-collapsed .sidebar { flex-basis: 72px; width: 72px; padding: 24px 12px; overflow: visible; }
.app-layout.sidebar-collapsed .sidebar-collapse-tab { left: 57px; }
.app-layout.sidebar-collapsed .sidebar-item { justify-content: center; height: 37px; padding: 0; }
.app-layout.sidebar-collapsed .sidebar-item > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sidebar-nav-tooltip { position: fixed; top: var(--sidebar-nav-tooltip-top, 0); left: 60px; z-index: 1101; padding: 7px 9px; border-radius: 7px; background: #1d2a3d; color: #fff; font-size: 12px; font-weight: 500; line-height: 1; white-space: nowrap; opacity: 0; pointer-events: none; transform: translate(-4px, -50%); transition: opacity .15s, transform .15s; }
.sidebar-nav-tooltip[hidden] { display: none; }
.sidebar-nav-tooltip.is-visible { opacity: 1; transform: translate(0, -50%); }
.app-layout.sidebar-collapsed .sidebar-billing, .app-layout.sidebar-collapsed .user-text { display: none !important; }
.app-layout.sidebar-collapsed .sidebar-account-area { display: flex; width: 100%; flex-direction: column; align-items: center; }
.app-layout.sidebar-collapsed .sidebar-user { display: flex; width: 100%; padding: 0; flex-direction: column; align-items: center; }
.app-layout.sidebar-collapsed .user-name { position: relative; display: grid; width: 42px; height: 37px; padding: 0; place-items: center; }
.app-layout.sidebar-collapsed .user-name::after { content: attr(data-tooltip); position: absolute; top: 50%; left: 60px; z-index: 20; padding: 7px 9px; border-radius: 7px; background: #1d2a3d; color: #fff; font-size: 12px; font-weight: 500; line-height: 1; white-space: nowrap; opacity: 0; pointer-events: none; transform: translate(-4px, -50%); transition: opacity .15s, transform .15s; }
.app-layout.sidebar-collapsed .user-name:hover::after { opacity: 1; transform: translate(0, -50%); }
.app-layout.sidebar-collapsed .user-actions { display: grid; width: 100%; gap: 0; margin: 0; padding: 0; border: 0; justify-items: center; }
.app-layout.sidebar-collapsed .sidebar-balance-action { display: grid; }
.app-layout.sidebar-collapsed .user-action { position: relative; display: grid; width: 42px; height: 37px; margin: 0 auto; padding: 0; border-radius: 10px; font-size: 0; place-items: center; }
.app-layout.sidebar-collapsed .user-action .action-icon { position: absolute; top: 50%; left: 50%; width: 18px; height: 18px; transform: translate(-50%, -50%); }
.app-layout.sidebar-collapsed .user-action::after { content: attr(data-tooltip); position: absolute; left: 60px; z-index: 20; padding: 7px 9px; border-radius: 7px; background: #1d2a3d; color: #fff; font-size: 12px; line-height: 1; white-space: nowrap; opacity: 0; pointer-events: none; transform: translateX(-4px); transition: opacity .15s, transform .15s; }
.app-layout.sidebar-collapsed .user-action:hover::after { opacity: 1; transform: translateX(0); }

.translation-file-card.has-file .translation-file-panel {
    display: flex;
}

.translation-selected-file {
    position: relative;
    display: flex;
    min-height: 58px;
    padding: 0 36px 12px 0;
    border-bottom: 1px solid #d5dde8;
    align-items: flex-start;
    gap: 12px;
}

.translation-selected-file > div {
    display: grid;
    gap: 5px;
}

.translation-file-panel .translation-document-name {
    display: block;
    overflow: hidden;
    color: #1f2937;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    text-overflow: ellipsis;
}

.translation-file-panel .translation-document-status {
    display: block;
    color: #64748b;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.5;
}

.translation-selected-file .btn {
    margin-left: auto;
}

.translation-file-remove {
    position: absolute;
    top: -4px;
    right: 0;
    padding: 4px;
    border: 0;
    color: #374151;
    background: transparent;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
}

.translation-selected-file [hidden],
.translation-credit-preview[hidden] {
    display: none;
}

.translation-credit-preview {
    margin-top: auto;
    padding: 16px 0 12px;
    color: #374151;
    font-size: 14px;
}

.translation-credit-preview strong {
    color: #111827;
    font-weight: 600;
}

.translation-credit-preview.insufficient,
.translation-credit-preview.insufficient strong {
    color: #c62828;
}

.translation-submit {
    width: 100%;
    min-height: 44px;
    margin-top: 0;
    border-radius: 9px;
}

.translation-submit:disabled {
    color: #ffffff;
    background: #aeb8c6;
    cursor: not-allowed;
    box-shadow: none;
}

.translation-credit-preview[hidden] + .translation-submit {
    margin-top: auto;
}

.translation-rules-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    padding: 0;
    color: #64748b;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 400;
}

.translation-rules-copy {
    max-width: 850px;
    line-height: 1.55;
}

.translation-rules-copy p {
    margin: 0;
}

.translation-rules-copy p + p {
    margin-top: 4px;
}

.translation-rules-copy ul {
    margin: 4px 0 0;
    padding-left: 20px;
}

.translation-rules-copy li {
    line-height: inherit;
}

.translation-rules-row .translation-rules-link {
    flex: 0 0 auto;
}

.translation-rules-link {
    padding: 0;
    border: 0;
    color: var(--brand-blue);
    background: transparent;
    cursor: pointer;
    font: inherit;
}

.translation-history-meta {
    display: block;
    margin-top: 5px;
    color: #64748b;
    font-size: 13px;
    font-weight: 400;
}

.translation-history-status {
    color: #15803d;
    font-weight: 600;
}

.translation-file-card > p,
.translation-quick-card > p,
.translation-history-heading p {
    margin: 8px 0 0;
    color: var(--body);
    font-size: 16px;
    line-height: 1.55;
}

.translation-file-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.translation-file-step {
    display: flex;
    min-width: 0;
    min-height: 250px;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 22px;
    border-radius: 10px;
    background: #f8fafc;
}

.translation-step-number {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    color: #ffffff;
    background: var(--brand-blue);
    font-size: 14px;
    font-weight: 700;
}

.translation-file-step h3 {
    margin: 0 0 4px;
    color: var(--ink);
    font-size: 20px;
    line-height: 1.3;
    font-weight: 600;
}

.translation-file-step label,
.translation-field label {
    color: #374151;
    font-size: 14px;
    font-weight: 600;
}

.translation-file-step select,
.translation-language-row select {
    min-height: 44px;
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    padding: 9px 40px 9px 12px;
    color: #111827;
    background-color: #ffffff;
    font: inherit;
}

.translation-file-step .btn {
    width: 100%;
    margin-top: auto;
    border-radius: 9px;
}

.translation-document-name,
.translation-document-status,
.translation-document-ready {
    max-width: 100%;
    overflow-wrap: anywhere;
    color: #64748b;
    font-size: 14px;
    line-height: 1.45;
}

.translation-document-status {
    color: #c96c00;
}

.translation-document-ready {
    color: var(--brand-blue);
    font-weight: 600;
}

.translation-document-ready::before {
    content: "✓ ";
}

.translation-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.translation-form textarea {
    min-height: 210px;
}

.translation-language-row {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #374151;
    font-size: 14px;
    font-weight: 600;
}

.translation-language-row select {
    width: 190px;
}

.translation-form-footer .btn {
    border-radius: 9px;
}

.translation-history-heading {
    padding: 30px;
}

.translation-history-heading h2 {
    margin: 0;
    color: var(--ink);
    font-size: 30px;
    line-height: 1.25;
    letter-spacing: -0.4px;
    font-weight: 600;
}

.translation-language-pair-col {
    width: 220px;
}

.translation-history-table-wrap {
    overflow-y: auto;
    scrollbar-gutter: stable;
}

.translation-history-table thead {
    position: sticky;
    top: 0;
    z-index: 1;
}

.translation-history-card .translation-history-table thead th {
    padding-top: 11px;
    padding-bottom: 11px;
    background: #ffffff;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .03em;
    text-transform: uppercase;
    border-top: 1px solid var(--hair-soft);
    border-bottom: 1px solid var(--hair-soft);
}

.translation-history-table .history-status-column,
.translation-history-table .history-status-cell {
    text-align: right;
}

@media (max-width: 900px) {
    .translation-content {
        width: 100%;
    }

    .translation-file-steps,
    .translation-fields {
        grid-template-columns: 1fr;
    }

    .translation-language-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .translation-file-card.has-file .translation-workspace {
        grid-template-columns: 1fr;
    }

    .translation-language-arrow {
        min-height: auto;
        transform: rotate(90deg);
    }

    .translation-rules-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .translation-file-step {
        min-height: auto;
    }

    .translation-file-step .btn {
        margin-top: 8px;
    }

    .translation-form-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .translation-language-row,
    .translation-language-row select,
    .translation-form-footer .btn {
        width: 100%;
    }
}
