/* ==========================================================
   1. VARIABLES
   ========================================================== */
:root {
    /* Surfaces */
    --bg: #f6f7f9;
    --surface: #ffffff;
    --surface-muted: #f3f4f6;
    --surface-hover: #f9fafb;

    /* Borders */
    --border: #e5e7eb;
    --border-strong: #d1d5db;

    /* Text */
    --text: #0f172a;
    --text-secondary: #6b7280;
    --text-tertiary: #9ca3af;

    /* Accent */
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-soft: #eef2ff;
    --primary-ring: rgba(79, 70, 229, 0.15);

    /* Status */
    --success: #16a34a;
    --success-soft: #ecfdf5;
    --success-border: #a7f3d0;
    --success-text: #065f46;

    --warning: #d97706;
    --warning-soft: #fffbeb;
    --warning-border: #fde68a;
    --warning-text: #92400e;

    --danger: #dc2626;
    --danger-soft: #fef2f2;
    --danger-border: #fecaca;
    --danger-text: #991b1b;

    --info-soft: #eff6ff;
    --info-border: #bfdbfe;
    --info-text: #1e40af;

    /* Code / extracted text — default (light) */
    --code-bg: var(--surface-muted);
    --code-text: #374151;

    /* Radii */
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 14px;

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);

    /* Motion */
    --transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        color 0.15s ease,
        transform 0.15s ease;
}

/* Dark theme overrides */
[data-theme="dark"] {
    --bg: #0b0f19;
    --surface: #121826;
    --surface-muted: #1a2130;
    --surface-hover: #1a2130;

    --border: #1f2937;
    --border-strong: #334155;

    --text: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-tertiary: #94a3b8;

    --primary: #6366f1;
    --primary-hover: #818cf8;
    --primary-soft: rgba(99, 102, 241, 0.14);
    --primary-ring: rgba(99, 102, 241, 0.28);

    --success-soft: rgba(22, 163, 74, 0.14);
    --success-border: rgba(22, 163, 74, 0.35);
    --success-text: #86efac;

    --warning-soft: rgba(217, 119, 6, 0.14);
    --warning-border: rgba(217, 119, 6, 0.35);
    --warning-text: #fcd34d;

    --danger-soft: rgba(220, 38, 38, 0.14);
    --danger-border: rgba(220, 38, 38, 0.35);
    --danger-text: #fca5a5;

    --info-soft: rgba(59, 130, 246, 0.14);
    --info-border: rgba(59, 130, 246, 0.35);
    --info-text: #93c5fd;

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.35);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.3);

    /* Code / extracted text — dark theme (light text on dark bg) */
    --code-bg: #1f2937;
    --code-text: #e2e8f0;

    --bs-body-bg: var(--bg);
    --bs-body-color: var(--text);
    --bs-body-color-rgb: 248, 250, 252;
    --bs-border-color: var(--border);
    --bs-secondary-color: var(--text-secondary);
    --bs-secondary-color-rgb: 203, 213, 225;
    --bs-emphasis-color: var(--text);
    --bs-heading-color: var(--text);
    --bs-link-color: var(--primary);
    --bs-link-hover-color: var(--primary-hover);
    --bs-link-color-rgb: 99, 102, 241;
    --bs-link-hover-color-rgb: 129, 140, 248;
}

/* ==========================================================
   2. BASE
   ========================================================== */
html, body {
    background-color: var(--bg);
    color: var(--text);
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        "Helvetica Neue",
        sans-serif;
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body { min-height: 100vh; }

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}
a:hover { color: var(--primary-hover); }

hr {
    border: none;
    border-top: 1px solid var(--border);
    opacity: 1;
    margin: 20px 0;
}

code {
    background: var(--code-bg);
    color: var(--code-text);
    padding: 2px 7px;
    border-radius: var(--radius-sm);
    font-size: 0.82em;
    font-family: "SF Mono", Monaco, "Cascadia Code", Consolas, monospace;
}

.mono {
    font-family: "SF Mono", Monaco, "Cascadia Code", Consolas, monospace;
    font-size: 0.9em;
    font-variant-numeric: tabular-nums;
}

details summary {
    cursor: pointer;
    user-select: none;
    padding: 8px 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: var(--transition);
}
details summary:hover { color: var(--text); }

/* ==========================================================
   3. TYPOGRAPHY
   ========================================================== */
h1, h2, h3, h4, h5, h6 {
    color: var(--text);
    font-weight: 600;
    letter-spacing: -0.015em;
    line-height: 1.25;
    margin-top: 0;
}

h1 { font-size: 1.75rem; letter-spacing: -0.025em; }
h2 { font-size: 1.15rem; letter-spacing: -0.02em; }
h3 { font-size: 1rem; }

.section-title {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 16px;
}

.text-muted { color: var(--text-secondary) !important; }
.fw-bold, strong { font-weight: 600; color: var(--text); }

/* ==========================================================
   4. LAYOUT
   ========================================================== */
.app-main {
    max-width: 1100px;
    padding-bottom: 72px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.page-header h1 { margin-bottom: 6px; }

.page-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.5;
}

.page-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

/* ==========================================================
   5. HEADER / NAVBAR
   ========================================================== */
.app-navbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    margin-bottom: 40px;
}

.app-navbar-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    column-gap: 24px;
    height: 64px;
}

.app-brand {
    justify-self: start;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-weight: 600;
    font-size: 0.98rem;
    letter-spacing: -0.015em;
    transition: var(--transition);
}
.app-brand:hover { color: var(--text); }

.app-brand-mark {
    display: block;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(79, 70, 229, 0.32));
    transition: var(--transition);
}
.app-brand:hover .app-brand-mark {
    filter: drop-shadow(0 3px 8px rgba(79, 70, 229, 0.45));
}

.app-brand-name {
    font-size: 1.02rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text);
    line-height: 1;
}

.app-nav-center {
    justify-self: center;
    display: flex;
    align-items: center;
    gap: 4px;
}

.app-nav-right {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 10px;
}

.app-nav-link {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 7px 12px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    line-height: 1;
    white-space: nowrap;
}
.app-nav-link:hover {
    color: var(--text);
    background: var(--surface-hover);
}
.app-nav-link.is-active {
    color: var(--primary);
    background: var(--primary-soft);
}

.app-nav-right .btn.btn-sm {
    padding: 7px 14px;
    font-size: 0.86rem;
    border-radius: 8px;
}

.app-nav-toggle {
    display: none;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.app-nav-toggle:hover {
    background: var(--surface-hover);
    border-color: var(--border-strong);
}
.app-nav-toggle .nav-toggle-close { display: none; }
.app-nav-toggle.is-open .nav-toggle-open { display: none; }
.app-nav-toggle.is-open .nav-toggle-close { display: block; }

.app-nav-mobile { display: none; }

.app-nav-mobile-inner {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 0 16px;
}

.app-nav-mobile-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 6px;
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
    line-height: 1.3;
}
.app-nav-mobile-link:hover { background: var(--surface-hover); }
.app-nav-mobile-link-danger { color: var(--danger); }
.app-nav-mobile-link-danger:hover { background: var(--danger-soft); }

.app-nav-mobile-sep {
    height: 1px;
    background: var(--border);
    margin: 8px 0;
}

.app-nav-mobile .btn {
    margin-top: 8px;
    justify-content: center;
}

.usage-pill {
    display: inline-flex;
    align-items: center;
    font-size: 0.78rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--text-secondary);
    background: var(--surface-muted);
    border: 1px solid var(--border);
    padding: 4px 10px;
    border-radius: 999px;
    line-height: 1;
    letter-spacing: 0.01em;
}

/* --- Account menu --- */
.account-menu { position: relative; }

.account-menu-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px 5px 6px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 999px;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text);
}
.account-menu-trigger:hover {
    background: var(--surface-hover);
    border-color: var(--border);
}
.account-menu.is-open .account-menu-trigger {
    background: var(--surface-hover);
    border-color: var(--border);
}

.account-menu-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1 0%, #4338ca 100%);
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1;
    flex-shrink: 0;
}

.account-menu-caret {
    display: inline-flex;
    color: var(--text-tertiary);
    transition: transform 0.15s ease;
}
.account-menu.is-open .account-menu-caret { transform: rotate(180deg); }

.account-menu-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.04);
    padding: 6px;
    z-index: 100;
    animation: menu-pop 0.12s ease;
}

@keyframes menu-pop {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.account-menu-header {
    padding: 10px 10px 10px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 6px;
}
.account-menu-header-email {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.account-menu-header-plan {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 2px;
    text-transform: capitalize;
}

.account-menu-item {
    display: block;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.88rem;
    font-weight: 500;
    transition: var(--transition);
}
.account-menu-item:hover {
    background: var(--surface-hover);
    color: var(--text);
}
.account-menu-item-danger { color: var(--danger); }
.account-menu-item-danger:hover {
    background: var(--danger-soft);
    color: var(--danger-text);
}

.account-menu-sep {
    height: 1px;
    background: var(--border);
    margin: 6px 0;
}

/* ==========================================================
   6. BUTTONS
   ========================================================== */
.btn {
    font-weight: 500;
    font-size: 0.9rem;
    padding: 8px 16px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    letter-spacing: -0.005em;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    line-height: 1.4;
}

.btn:focus,
.btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--primary-ring);
}

.btn-lg {
    padding: 11px 22px;
    font-size: 0.95rem;
    border-radius: 11px;
}

.btn-sm {
    padding: 5px 12px;
    font-size: 0.82rem;
    border-radius: 8px;
}

.btn-block { width: 100%; }

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 1px 2px rgba(79, 70, 229, 0.2);
}
.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    color: #fff;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
    transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }

.btn-success {
    background-color: var(--success);
    border-color: var(--success);
    color: #fff;
    box-shadow: 0 1px 2px rgba(22, 163, 74, 0.2);
}
.btn-success:hover,
.btn-success:focus {
    background-color: #15803d;
    border-color: #15803d;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.25);
}
.btn-success:active { transform: translateY(0); }

.btn-secondary {
    background-color: var(--surface);
    border-color: var(--border);
    color: var(--text);
}
.btn-secondary:hover,
.btn-secondary:focus {
    background-color: var(--surface-hover);
    border-color: var(--border-strong);
    color: var(--text);
}

.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-danger {
    background-color: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
}
.btn-outline-primary { color: var(--primary); }
.btn-outline-danger  { color: var(--danger); }

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background: var(--primary-soft);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
}
.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
    background: var(--surface-hover);
    border-color: var(--border-strong);
    color: var(--text);
    transform: translateY(-1px);
}
.btn-outline-danger:hover,
.btn-outline-danger:focus {
    background: var(--danger-soft);
    border-color: var(--danger);
    color: var(--danger);
    transform: translateY(-1px);
}
.btn-outline-primary:active,
.btn-outline-secondary:active,
.btn-outline-danger:active { transform: translateY(0); }

/* ==========================================================
   7. CARDS
   ========================================================== */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
}

.table-card { overflow: hidden; padding: 4px; }

/* ==========================================================
   8. HERO
   ========================================================== */
.hero {
    text-align: center;
    padding: 16px 0 32px;
    max-width: 640px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 5px 12px 5px 10px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 500;
    margin-bottom: 20px;
    box-shadow: var(--shadow-xs);
}

.hero-badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
    flex-shrink: 0;
}

.hero-title {
    font-size: 2rem;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin: 0 0 12px;
}

.hero-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.55;
    margin: 0 0 24px;
}

.hero-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-features {
    list-style: none;
    padding: 0;
    margin: 24px 0 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.hero-features li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.hero-features .check {
    color: var(--success);
    font-weight: 700;
}

/* ==========================================================
   9. UPLOAD / DROPZONE
   ========================================================== */
.upload-card {
    max-width: 640px;
    margin: 0 auto 32px;
}

.dropzone-link {
    display: block;
    color: inherit;
}
.dropzone-link:hover { color: inherit; }

.dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 44px 24px;
    background: var(--surface);
    border: 2px dashed var(--border-strong);
    border-radius: var(--radius-lg);
    transition: var(--transition);
    cursor: pointer;
    min-height: 220px;
}

.dropzone:hover,
.dropzone-link:hover .dropzone {
    border-color: var(--primary);
    background: var(--surface-hover);
}

.dropzone-icon {
    font-size: 1.8rem;
    color: var(--primary);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--primary-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    font-weight: 700;
    line-height: 1;
}

.dropzone-title {
    font-size: 1.02rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.dropzone-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.dropzone-hint {
    color: var(--text-tertiary);
    font-size: 0.8rem;
    font-weight: 500;
    background: var(--surface-muted);
    padding: 3px 10px;
    border-radius: 999px;
}

.dropzone-interactive { position: relative; }
.dropzone-dragover {
    border-color: var(--primary) !important;
    background: var(--primary-soft) !important;
    transform: scale(1.005);
}
.dropzone-has-file {
    border-style: solid;
    border-color: var(--success-border);
    background: var(--success-soft);
    min-height: 160px;
}

.selected-file {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-top: 16px;
    box-shadow: var(--shadow-xs);
}

.selected-file-icon {
    font-size: 1.4rem;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    background: var(--surface-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.selected-file-info { flex: 1; min-width: 0; }

.selected-file-name {
    font-weight: 500;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.92rem;
}

.selected-file-size {
    color: var(--text-secondary);
    font-size: 0.82rem;
    margin-top: 2px;
}

.selected-file-check {
    color: var(--success);
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.upload-form .btn-lg { margin-top: 20px; }

/* ==========================================================
   10. FEATURE CARDS
   ========================================================== */
.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    max-width: 900px;
    margin: 0 auto;
}

.feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: var(--transition);
    text-align: left;
}

.feature-card:hover {
    border-color: var(--border-strong);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.feature-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--primary-soft);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    margin-bottom: 12px;
    font-weight: 600;
}

.feature-card h3 { font-size: 0.95rem; margin-bottom: 4px; }

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 0;
}

/* ==========================================================
   11. STATS
   ========================================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    box-shadow: var(--shadow-xs);
}

.stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 6px;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.02em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.stat-hint {
    color: var(--text-tertiary);
    font-size: 0.8rem;
    margin-top: 6px;
}

/* ==========================================================
   12. EMPTY STATE
   ========================================================== */
.empty-state {
    text-align: center;
    padding: 64px 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
}

.empty-icon {
    font-size: 2rem;
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: var(--primary-soft);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.empty-title { font-size: 1.15rem; margin-bottom: 8px; }

.empty-text {
    color: var(--text-secondary);
    font-size: 0.92rem;
    max-width: 380px;
    margin: 0 auto 20px;
    line-height: 1.55;
}

.empty-hint {
    color: var(--text-tertiary);
    font-size: 0.82rem;
    margin: 20px 0 0;
}

/* ==========================================================
   13. TABLES
   ========================================================== */
.table {
    --bs-table-bg: transparent;
    --bs-table-border-color: var(--border);
    --bs-table-hover-bg: var(--surface-hover);
    font-size: 0.9rem;
    margin-bottom: 0;
    color: var(--text);
}

.table thead th {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    font-weight: 600;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    background: transparent;
    white-space: nowrap;
}

.table tbody td {
    padding: 14px 16px;
    border-color: var(--border);
    color: var(--text);
    vertical-align: middle;
}

.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background-color 0.15s ease; }

.table td.text-end,
.table th.text-end { font-variant-numeric: tabular-nums; }

.table-sm thead th { padding: 10px 12px; }
.table-sm tbody td { padding: 10px 12px; font-size: 0.88rem; }

.table-hover tbody tr:hover > * {
    background-color: var(--surface-hover);
}

/* ==========================================================
   14. REVIEW PAGE (2-column layout)
   ========================================================== */
.review-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
    gap: 24px;
    align-items: start;
}

.review-main .card,
.review-side .card {
    margin-bottom: 0;
}

.review-side { position: sticky; top: 24px; }

@media (max-width: 900px) {
    .review-grid { grid-template-columns: 1fr; }
    .review-side { position: static; }
}

.field {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    padding: 11px 0;
    border-bottom: 1px solid var(--border);
}

.field:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.field .label {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    flex-shrink: 0;
}

.field .value {
    color: var(--text);
    font-weight: 500;
    text-align: right;
    word-break: break-word;
    font-variant-numeric: tabular-nums;
    font-size: 0.92rem;
}

.field-total {
    padding-top: 14px;
    margin-top: 4px;
    border-top: 1px solid var(--border);
}

.field-total .label {
    color: var(--text);
    font-weight: 600;
    font-size: 0.88rem;
}
.field-total .value {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text);
    letter-spacing: -0.01em;
}

/* ==========================================================
   15. VALIDATION
   ========================================================== */
.validation-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: var(--radius);
    font-size: 0.88rem;
    font-weight: 500;
    border: 1px solid transparent;
}

.validation-summary.is-success {
    background: var(--success-soft);
    border-color: var(--success-border);
    color: var(--success-text);
}
.validation-summary.is-info {
    background: var(--info-soft);
    border-color: var(--info-border);
    color: var(--info-text);
}
.validation-summary.is-error {
    background: var(--danger-soft);
    border-color: var(--danger-border);
    color: var(--danger-text);
}

.validation-list { list-style: none; padding: 0; margin: 0; }

.validation-list li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 12px;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
    margin-bottom: 6px;
    background: var(--surface-muted);
    color: var(--text);
    border: 1px solid transparent;
    line-height: 1.5;
}

.validation-list li:last-child { margin-bottom: 0; }

.validation-list li.error {
    background: var(--danger-soft);
    border-color: var(--danger-border);
    color: var(--danger-text);
}
.validation-list li.warning {
    background: var(--warning-soft);
    border-color: var(--warning-border);
    color: var(--warning-text);
}

/* ==========================================================
   16. FORMS
   ========================================================== */
.form-label {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 6px;
    display: block;
}

.form-control {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 9px 12px;
    font-size: 0.92rem;
    color: var(--text);
    transition: var(--transition);
    box-shadow: none;
    line-height: 1.4;
    width: 100%;
}

.form-control:hover:not(:focus) { border-color: var(--border-strong); }
.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-ring);
    background: var(--surface);
    color: var(--text);
    outline: none;
}
.form-control::placeholder { color: var(--text-tertiary); }

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
.form-grid-4 { grid-template-columns: repeat(4, 1fr); }

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 24px;
    flex-wrap: wrap;
}

@media (max-width: 720px) {
    .form-grid,
    .form-grid-4 { grid-template-columns: 1fr; }
}

/* ==========================================================
   17. ALERTS & BADGES
   ========================================================== */
.alert {
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 12px 16px;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 20px;
}
.alert-danger {
    background: var(--danger-soft);
    border-color: var(--danger-border);
    color: var(--danger-text);
}
.alert-warning {
    background: var(--warning-soft);
    border-color: var(--warning-border);
    color: var(--warning-text);
}
.alert-success {
    background: var(--success-soft);
    border-color: var(--success-border);
    color: var(--success-text);
}
.alert-info {
    background: var(--info-soft);
    border-color: var(--info-border);
    color: var(--info-text);
}

.badge {
    font-size: 0.72rem;
    font-weight: 500;
    padding: 4px 9px;
    border-radius: 6px;
    letter-spacing: 0.01em;
    display: inline-block;
    line-height: 1.5;
    white-space: nowrap;
}
.badge.bg-primary {
    background-color: var(--primary-soft) !important;
    color: var(--primary);
}
.badge.bg-success {
    background-color: var(--success-soft) !important;
    color: var(--success-text);
}
.badge.bg-danger {
    background-color: var(--danger-soft) !important;
    color: var(--danger-text);
}
.badge.bg-secondary {
    background-color: var(--surface-muted) !important;
    color: var(--text-secondary);
}

/* ==========================================================
   18. ACTIONS / STATUS
   ========================================================== */
.status-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.88rem;
}

.actions-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ==========================================================
   19. EXTRACTED TEXT
   ========================================================== */
.extracted-text {
    background: var(--code-bg);
    color: var(--code-text);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px;
    max-height: 420px;
    overflow: auto;
    font-size: 0.8rem;
    line-height: 1.65;
    font-family: "SF Mono", Monaco, "Cascadia Code", Consolas, monospace;
    white-space: pre-wrap;
    word-break: break-word;
    margin: 0;
}

/* ==========================================================
   20. RESPONSIVE
   ========================================================== */
@media (max-width: 768px) {
    body { font-size: 14.5px; }

    .app-main {
        padding-left: 16px;
        padding-right: 16px;
        padding-bottom: 48px;
    }

    .app-navbar { margin-bottom: 24px; }

    .app-navbar-inner {
        grid-template-columns: auto auto;
        column-gap: 12px;
        height: 56px;
    }

    .app-brand {
        grid-column: 1;
        grid-row: 1;
        justify-self: start;
    }

    .app-nav-center,
    .app-nav-right { display: none; }

    .app-nav-toggle {
        display: inline-flex;
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
    }

    .app-nav-mobile:not([hidden]) {
        display: block;
        border-top: 1px solid var(--border);
    }

    .app-nav-mobile-inner { padding: 10px 0 18px; }

    .hero-title { font-size: 1.6rem; }
    .hero-subtitle { font-size: 0.95rem; }

    .features {
        grid-template-columns: 1fr;
        max-width: 100%;
    }

    .stats-grid { grid-template-columns: 1fr; }

    .page-header {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .page-actions { width: 100%; }
    .page-actions .btn { flex: 1; }

    .dropzone { padding: 32px 20px; min-height: 180px; }
    .dropzone-icon { width: 44px; height: 44px; font-size: 1.5rem; }

    .card.p-4 { padding: 20px !important; }

    .table thead th,
    .table tbody td {
        padding: 10px 12px;
        font-size: 0.85rem;
    }

    .empty-state { padding: 48px 20px; }

    .field .label,
    .field .value { font-size: 0.86rem; }

    .form-actions .btn { flex: 1; }
}

@media (max-width: 480px) {
    .hero-title { font-size: 1.4rem; }
    .hero-actions .btn { width: 100%; }

    .app-navbar-inner { column-gap: 8px; }
    .app-brand-name { font-size: 0.95rem; }

    .account-menu-dropdown {
        min-width: 200px;
        right: -4px;
    }

    .field {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }
    .field .value { text-align: left; }
}

/* ==========================================================
   21. HOME — SECTIONS
   ========================================================== */
.section {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 28px;
}

.section-header h2 {
    font-size: 1.35rem;
    letter-spacing: -0.02em;
    margin: 0 0 8px;
    color: var(--text);
}

.section-header p {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.5;
    margin: 0;
}

/* ==========================================================
   22. HOW IT WORKS — STEPS
   ========================================================== */
.steps {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr;
    align-items: stretch;
    gap: 12px;
}

.step {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px 18px;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow-xs);
}

.step:hover {
    border-color: var(--border-strong);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.step-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 14px;
    line-height: 1;
}

.step-icon::after {
    content: attr(data-step);
    position: absolute;
    top: -4px;
    right: -4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--surface);
    box-sizing: content-box;
}

.step-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 4px;
    color: var(--text);
}

.step-desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

.step-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    font-size: 1.05rem;
    font-weight: 400;
    user-select: none;
    padding: 0 2px;
}

/* ==========================================================
   23. EXAMPLE RESULT — DEMO CARD
   ========================================================== */
.demo-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xs);
}

.demo-pdf {
    background: var(--surface-muted);
    padding: 24px;
    border-right: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
}

.demo-pdf-frame {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 18px 18px 22px;
    box-shadow: var(--shadow-sm);
    width: 100%;
    max-width: 260px;
}

.demo-pdf-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-weight: 500;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.demo-pdf-header span:first-child {
    font-size: 0.95rem;
    line-height: 1;
}

.demo-pdf-lines {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.demo-pdf-line {
    height: 8px;
    border-radius: 4px;
    background: var(--surface-muted);
}

.demo-pdf-line.title {
    height: 10px;
    width: 55%;
    background: var(--border-strong);
}

.demo-pdf-line.short  { width: 40%; }
.demo-pdf-line.medium { width: 65%; }
.demo-pdf-line.wide   { width: 100%; }
.demo-pdf-line.total  {
    width: 75%;
    background: var(--primary-soft);
    margin-top: 4px;
}

.demo-data {
    padding: 24px 26px;
    display: flex;
    flex-direction: column;
}

.demo-data .section-title { margin-bottom: 12px; }

.demo-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    padding: 9px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.88rem;
}

.demo-row:last-of-type { border-bottom: none; }

.demo-row > span:first-child {
    color: var(--text-secondary);
    flex-shrink: 0;
}

.demo-row > span:last-child {
    color: var(--text);
    font-weight: 500;
    text-align: right;
    font-variant-numeric: tabular-nums;
    word-break: break-word;
}

.demo-row-total {
    padding-top: 14px;
    margin-top: 4px;
    border-top: 1px solid var(--border);
    border-bottom: none;
}

.demo-row-total > span:first-child {
    color: var(--text);
    font-weight: 600;
    font-size: 0.9rem;
}

.demo-row-total > span:last-child {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.demo-actions {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.demo-caption {
    color: var(--text-tertiary);
    font-size: 0.78rem;
    margin: 0;
    text-align: center;
}

/* ==========================================================
   24. HOME — RESPONSIVE
   ========================================================== */
@media (max-width: 768px) {
    .section { padding: 28px 0; }
    .section-header h2 { font-size: 1.2rem; }

    .steps {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .step-arrow {
        transform: rotate(90deg);
        font-size: 1rem;
        padding: 0;
    }

    .demo-card { grid-template-columns: 1fr; }

    .demo-pdf {
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 20px;
    }

    .demo-data { padding: 20px; }
    .demo-pdf-frame { max-width: 220px; }
}

@media (max-width: 480px) {
    .step { padding: 18px 14px; }

    .demo-row {
        font-size: 0.84rem;
        padding: 8px 0;
    }

    .demo-row-total > span:last-child { font-size: 1rem; }
}

/* ==========================================================
   25. AUTH (login / register)
   ========================================================== */
.auth-wrap {
    min-height: 560px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
    background:
        radial-gradient(
            900px 420px at 50% 0%,
            rgba(99, 102, 241, 0.07),
            rgba(99, 102, 241, 0) 70%
        );
    border-radius: var(--radius-lg);
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px 36px 32px;
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.auth-brand {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}
.auth-brand svg {
    filter: drop-shadow(0 2px 6px rgba(79, 70, 229, 0.25));
}

.auth-title {
    font-size: 1.5rem;
    letter-spacing: -0.025em;
    margin: 0 0 6px;
    color: var(--text);
}

.auth-subtitle {
    color: var(--text-secondary);
    font-size: 0.92rem;
    margin: 0 0 24px;
    line-height: 1.5;
}

.auth-alert {
    text-align: left;
    margin: 0 0 20px;
    padding: 10px 14px;
    font-size: 0.88rem;
    border-radius: var(--radius);
    background: var(--danger-soft);
    border: 1px solid var(--danger-border);
    color: var(--danger-text);
    line-height: 1.5;
}

.social-login {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.social-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 44px;
    padding: 0 16px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
}
.social-button:hover:not(:disabled) {
    background: var(--surface-hover);
    border-color: var(--border-strong);
}
.social-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.social-button-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 4px 0 20px;
    color: var(--text-tertiary);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}
.auth-divider span { font-weight: 500; }

.auth-form { text-align: left; }
.auth-field { margin-bottom: 16px; }

.auth-label {
    display: block;
    font-size: 0.83rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 6px;
}

.auth-input {
    width: 100%;
    height: 46px;
    padding: 10px 14px;
    font-size: 0.95rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    transition: var(--transition);
    box-shadow: none;
}
.auth-input:hover:not(:focus) { border-color: var(--border-strong); }
.auth-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-ring);
}
.auth-input::placeholder { color: var(--text-tertiary); }

.input-with-icon { position: relative; }
.input-with-icon .auth-input { padding-right: 42px; }

.password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: var(--transition);
}
.password-toggle:hover {
    color: var(--text-secondary);
    background: var(--surface-muted);
}
.password-toggle:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--primary-ring);
}

.auth-hint {
    font-size: 0.78rem;
    color: var(--text-tertiary);
    margin-top: 6px;
}

.auth-submit {
    width: 100%;
    height: 46px;
    margin-top: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 10px;
    justify-content: center;
}
.auth-submit.is-loading {
    opacity: 0.85;
    cursor: wait;
}

.auth-footer {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin: 22px 0 0;
    text-align: center;
}
.auth-footer a {
    color: var(--primary);
    font-weight: 500;
}
.auth-footer a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.auth-terms {
    font-size: 0.78rem;
    color: var(--text-tertiary);
    margin: 16px 0 0;
    line-height: 1.5;
    text-align: center;
}

@media (max-width: 480px) {
    .auth-wrap {
        padding: 24px 12px;
        min-height: 0;
    }
    .auth-card {
        padding: 32px 22px 24px;
        border-radius: 12px;
    }
    .auth-title { font-size: 1.35rem; }
}

/* ==========================================================
   26. LINE ITEMS EDITING
   ========================================================== */
.line-items-table { margin-bottom: 0; }
.line-items-table th { padding: 8px 10px; }

.line-items-table td {
    padding: 6px 10px;
    vertical-align: middle;
}

.line-items-table .form-control-sm {
    height: 36px;
    padding: 6px 10px;
    font-size: 0.88rem;
    border-radius: 8px;
}

.line-item-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
    color: var(--text-tertiary);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    transition: var(--transition);
}
.line-item-remove:hover {
    color: var(--danger);
    border-color: var(--danger-border);
    background: var(--danger-soft);
}
.line-item-remove:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--primary-ring);
}

/* ==========================================================
   27. THEME TOGGLE
   ========================================================== */
.theme-toggle {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
}

.theme-toggle-value {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--surface-muted);
    border: 1px solid var(--border);
    padding: 2px 8px;
    border-radius: 999px;
    line-height: 1.5;
    min-width: 54px;
    justify-content: center;
}

.theme-toggle:hover .theme-toggle-value {
    color: var(--text);
    border-color: var(--border-strong);
}

/* ==========================================================
   28. LANGUAGE SWITCHER
   ========================================================== */
.lang-switcher {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.lang-trigger {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 10px;
    height: 34px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    line-height: 1;
    transition: var(--transition);
    box-shadow: none;
    outline: none;
}

.lang-trigger:hover {
    border-color: var(--border-strong);
    color: var(--text);
    background: var(--surface-hover);
}

.lang-switcher.is-open .lang-trigger {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-soft);
}

.lang-trigger:focus-visible {
    box-shadow: 0 0 0 3px var(--primary-ring);
}

.lang-globe {
    color: currentColor;
    flex-shrink: 0;
    opacity: 0.85;
}

.lang-code {
    font-size: 0.78rem;
    font-weight: 700;
    min-width: 20px;
    text-align: center;
    color: currentColor;
}

.lang-caret {
    color: currentColor;
    opacity: 0.65;
    transition: transform 0.15s ease;
    flex-shrink: 0;
}

.lang-switcher.is-open .lang-caret {
    transform: rotate(180deg);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 170px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow:
        0 8px 24px rgba(15, 23, 42, 0.12),
        0 2px 6px rgba(15, 23, 42, 0.06);
    padding: 5px;
    z-index: 100;
    animation: menu-pop 0.12s ease;
}

.lang-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    color: var(--text);
    font-size: 0.88rem;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
    line-height: 1.2;
}

.lang-item:hover {
    background: var(--surface-hover);
    color: var(--text);
}

.lang-item.is-active {
    background: var(--primary-soft);
    color: var(--primary);
}

.lang-code-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 20px;
    padding: 0 5px;
    border-radius: 4px;
    background: var(--surface-muted);
    color: var(--text-secondary);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}

.lang-item.is-active .lang-code-sm {
    background: var(--primary);
    color: #fff;
}

.lang-mobile {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.lang-mobile .app-nav-mobile-link.is-active {
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 600;
}

@media (max-width: 768px) {
    .lang-switcher { display: none; }
}
@media (min-width: 769px) {
    .lang-mobile { display: none; }
}

/* ==========================================================
   29. FOOTER
   ========================================================== */
.app-footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    margin-top: 80px;
    padding: 48px 0 28px;
}

.app-footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.app-footer-brand .app-brand {
    font-size: 0.95rem;
    margin-bottom: 12px;
}

.app-footer-brand .app-brand-mark {
    width: 28px;
    height: 28px;
}

.app-footer-tagline {
    color: var(--text-secondary);
    font-size: 0.88rem;
    margin: 0;
    line-height: 1.5;
    max-width: 280px;
}

.app-footer-title {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    font-weight: 600;
    margin: 0 0 14px;
}

.app-footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.app-footer-links a {
    color: var(--text);
    font-size: 0.88rem;
    text-decoration: none;
    transition: var(--transition);
}

.app-footer-links a:hover {
    color: var(--primary);
}

.app-footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 24px;
    color: var(--text-tertiary);
    font-size: 0.82rem;
    text-align: center;
}

@media (max-width: 768px) {
    .app-footer {
        margin-top: 48px;
        padding: 32px 0 20px;
    }

    .app-footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 28px;
        margin-bottom: 28px;
    }

    .app-footer-brand {
        grid-column: 1 / -1;
        margin-bottom: 8px;
    }
}

@media (max-width: 480px) {
    .app-footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

/* ==========================================================
   30. FAQ
   ========================================================== */
.faq-list {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.faq-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0;
    transition: var(--transition);
}

.faq-item:hover {
    border-color: var(--border-strong);
}

.faq-item[open] {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-ring);
}

.faq-item summary {
    padding: 16px 20px;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text);
    cursor: pointer;
    list-style: none;
    position: relative;
    padding-right: 48px;
    line-height: 1.4;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: "+";
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.4rem;
    font-weight: 300;
    color: var(--text-tertiary);
    line-height: 1;
    transition: transform 0.15s ease, color 0.15s ease;
}

.faq-item[open] summary::after {
    content: "−";
    color: var(--primary);
}

.faq-item summary:hover {
    color: var(--primary);
}

.faq-item p {
    padding: 0 20px 18px;
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.65;
}

/* ==========================================================
   31. DEMO — VALIDATED BADGE
   ========================================================== */
.demo-data-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.demo-validated-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--success-text);
    background: var(--success-soft);
    border: 1px solid var(--success-border);
    padding: 3px 9px;
    border-radius: 999px;
    line-height: 1.4;
    white-space: nowrap;
}

.demo-validated-badge .check {
    font-weight: 700;
}

/* ==========================================================
   32. BENEFITS — 4 CARDS
   ========================================================== */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

@media (max-width: 900px) {
    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .benefits-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================
   33. PRICING
   ========================================================== */
.pricing-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.pricing-card {
    position: relative;
    padding: 32px 28px 28px;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.pricing-card:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-sm);
}

.pricing-card-featured {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-ring);
}

.pricing-card-featured:hover {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-ring), var(--shadow-sm);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 24px;
    background: var(--primary);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 5px 10px;
    border-radius: 6px;
    line-height: 1;
    text-transform: uppercase;
}

.pricing-name {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    margin: 0 0 16px;
}

.pricing-price {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-bottom: 8px;
    line-height: 1;
}

.pricing-amount {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.03em;
    line-height: 1;
}

.pricing-period {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.pricing-desc {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.5;
    margin: 0 0 20px;
    min-height: 2.5em;
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.pricing-features li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text);
    line-height: 1.45;
}

.pricing-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--success-soft);
    color: var(--success-text);
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1;
    margin-top: 1px;
}

.pricing-card-featured .pricing-check {
    background: var(--primary-soft);
    color: var(--primary);
}

.pricing-cta {
    margin-top: auto;
}

.pricing-cta .btn {
    height: 44px;
    font-size: 0.92rem;
    font-weight: 500;
    border-radius: 10px;
}

@media (max-width: 700px) {
    .pricing-grid {
        grid-template-columns: 1fr;
    }

    .pricing-card {
        padding: 28px 22px 22px;
    }

    .pricing-amount {
        font-size: 2.1rem;
    }
}

/* ==========================================================
   34. UPLOAD PAGE
   ========================================================== */
.upload-info-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.82rem;
    color: var(--text-secondary);
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 7px 14px;
    border-radius: 999px;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.upload-info-badge strong {
    color: var(--text);
    font-weight: 600;
}

.upload-form {
    max-width: 640px;
    margin: 0 auto;
}

.upload-zone {
    margin-bottom: 16px;
}

.upload-form .dropzone {
    margin: 0;
}

.upload-form .dropzone[hidden] {
    display: none;
}

.upload-secure-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--text-tertiary);
    font-size: 0.82rem;
    margin: 0 0 20px;
    line-height: 1.4;
    text-align: center;
}

.upload-secure-note svg {
    flex-shrink: 0;
    opacity: 0.85;
}

.upload-form .selected-file {
    margin-top: 0;
}

.selected-file-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text-tertiary);
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.selected-file-remove:hover {
    color: var(--danger);
    border-color: var(--danger-border);
    background: var(--danger-soft);
}

.selected-file-remove:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--primary-ring);
}

.upload-form #process-btn {
    height: 48px;
    font-size: 0.98rem;
    font-weight: 500;
    border-radius: 11px;
    margin-top: 8px;
}

.upload-form #process-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: 0 1px 2px rgba(79, 70, 229, 0.15);
}

.limit-block {
    max-width: 480px;
    margin: 24px auto 0;
    text-align: center;
}

.limit-block-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--warning-soft);
    color: var(--warning-text);
    font-size: 1.5rem;
    margin-bottom: 16px;
    line-height: 1;
}

.limit-block-title {
    font-size: 1.15rem;
    margin: 0 0 8px;
}

.limit-block-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0 0 20px;
    line-height: 1.55;
}

.upload-processing {
    max-width: 480px;
    margin: 40px auto 0;
    text-align: center;
    padding: 40px 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
}

.upload-spinner {
    width: 44px;
    height: 44px;
    margin: 0 auto 20px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: voince-spin 0.85s linear infinite;
}

@keyframes voince-spin {
    to { transform: rotate(360deg); }
}

.upload-processing-title {
    font-size: 1.15rem;
    margin: 0 0 8px;
    color: var(--text);
}

.upload-processing-desc {
    color: var(--text-secondary);
    font-size: 0.92rem;
    margin: 0 0 6px;
    line-height: 1.5;
}

.upload-processing-hint {
    color: var(--text-tertiary);
    font-size: 0.8rem;
    margin: 0;
    line-height: 1.5;
}

@media (max-width: 480px) {
    .upload-info-badge {
        font-size: 0.76rem;
        padding: 6px 12px;
    }

    .upload-processing {
        margin-top: 24px;
        padding: 32px 18px;
    }

    .upload-spinner {
        width: 38px;
        height: 38px;
    }
}

/* ==========================================================
   35. INVOICES LIST
   ========================================================== */
.inv-col-id {
    width: 60px;
    font-size: 0.78rem;
    color: var(--text-tertiary);
    white-space: nowrap;
}

.inv-supplier {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 180px;
}

.inv-supplier-name {
    font-weight: 500;
    color: var(--text);
    font-size: 0.9rem;
    line-height: 1.3;
}

.inv-filename {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    font-family: "SF Mono", Monaco, "Cascadia Code", Consolas, monospace;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 240px;
    line-height: 1.3;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 999px;
    line-height: 1.4;
    letter-spacing: 0.01em;
    white-space: nowrap;
    border: 1px solid transparent;
}

.status-badge.status-approved {
    color: var(--success-text);
    background: var(--success-soft);
    border-color: var(--success-border);
}

.status-badge.status-rejected {
    color: var(--danger-text);
    background: var(--danger-soft);
    border-color: var(--danger-border);
}

.status-badge.status-review {
    color: var(--primary);
    background: var(--primary-soft);
    border-color: var(--primary-ring);
}

.status-badge.status-uploaded {
    color: var(--text-secondary);
    background: var(--surface-muted);
    border-color: var(--border);
}

.status-badge.status-processing {
    color: var(--info-text);
    background: var(--info-soft);
    border-color: var(--info-border);
}

.status-badge.status-failed {
    color: var(--danger-text);
    background: var(--danger-soft);
    border-color: var(--danger-border);
}

@media (max-width: 768px) {
    .inv-col-id {
        width: auto;
        font-size: 0.72rem;
    }

    .inv-supplier {
        min-width: 140px;
    }

    .inv-filename {
        max-width: 140px;
    }

    .status-badge {
        font-size: 0.68rem;
        padding: 3px 8px;
    }
}

/* ==========================================================
   36. ACCOUNT PAGE
   ========================================================== */
.account-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.account-usage-value {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 0;
    line-height: 1;
}

.account-usage-value .stat-value {
    font-size: 2rem;
}

.account-usage-sep {
    font-size: 1.25rem;
    color: var(--text-tertiary);
    font-weight: 400;
    margin: 0 2px;
}

.account-usage-limit {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.account-usage-label {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    margin-left: 6px;
    font-weight: 400;
}

.account-usage-note {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin: 12px 0 0;
    line-height: 1.5;
}

.account-balance-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.03em;
    line-height: 1;
    margin-bottom: 12px;
}

.account-balance-hint {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin: 0;
    line-height: 1.5;
    flex: 1;
}

.account-plan-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.account-plan-name {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.2;
}

.account-plan-price {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.account-plan-note {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin: 8px 0 0;
    line-height: 1.55;
}

.account-plan-note a {
    color: var(--primary);
    font-weight: 500;
}

/* ==========================================================
   37. SETTINGS PAGE
   ========================================================== */
.settings-card {
    max-width: 640px;
}

.settings-note {
    color: var(--text-secondary);
    font-size: 0.88rem;
    margin: 0 0 20px;
    line-height: 1.55;
}

.settings-form {
    max-width: 420px;
}

.settings-field {
    margin-bottom: 16px;
}

.settings-danger {
    border-color: var(--danger-border);
}

.settings-danger-title {
    color: var(--danger-text);
}

.settings-danger-details {
    margin-top: 8px;
}

.settings-danger-details summary {
    font-size: 0.9rem;
    color: var(--text-secondary);
    padding: 6px 0;
}

.settings-danger-details summary:hover {
    color: var(--danger-text);
}

@media (max-width: 768px) {
    .account-usage-value .stat-value {
        font-size: 1.7rem;
    }

    .account-balance-value {
        font-size: 1.7rem;
    }
}

/* ==========================================================
   38. RESPONSIVE — POLISH
   ========================================================== */

@media (min-width: 769px) and (max-width: 1024px) {
    .app-main {
        padding-left: 24px;
        padding-right: 24px;
    }

    .hero-features {
        gap: 6px 14px;
        font-size: 0.82rem;
    }

    .steps {
        gap: 8px;
    }

    .step {
        padding: 18px 14px;
    }

    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .demo-pdf,
    .demo-data {
        padding: 20px;
    }

    .app-footer-grid {
        gap: 28px;
    }

    .pricing-card {
        padding: 26px 22px 22px;
    }
}

@media (max-width: 768px) {
    .app-main .btn:not(.btn-sm) {
        min-height: 44px;
        padding-top: 11px;
        padding-bottom: 11px;
    }

    .app-nav-mobile-link {
        min-height: 44px;
        padding-top: 13px;
        padding-bottom: 13px;
    }

    .hero-features {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        max-width: 240px;
        margin-left: auto;
        margin-right: auto;
        text-align: left;
    }

    .step {
        padding: 18px 16px;
    }

    .step-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        margin-bottom: 10px;
    }

    .step-icon::after {
        width: 16px;
        height: 16px;
        font-size: 0.6rem;
    }

    .demo-data .section-title {
        font-size: 0.72rem;
    }

    .demo-row {
        font-size: 0.84rem;
    }

    .benefits-grid {
        grid-template-columns: 1fr;
    }

    .faq-item summary {
        padding: 14px 44px 14px 16px;
        font-size: 0.9rem;
    }

    .faq-item summary::after {
        right: 16px;
    }

    .faq-item p {
        padding: 0 16px 16px;
        font-size: 0.86rem;
    }

    .app-footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }

    .app-footer-brand {
        grid-column: 1 / -1;
    }

    .account-plan-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .account-plan-row > div:last-child {
        align-self: flex-start;
    }

    .settings-card {
        max-width: 100%;
    }

    .settings-form {
        max-width: 100%;
    }

    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -16px;
        padding: 0 16px;
    }

    .table-responsive .table {
        min-width: 720px;
    }

    .status-badge {
        font-size: 0.68rem;
        padding: 3px 8px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 8px 0 24px;
    }

    .hero-badge {
        font-size: 0.74rem;
        padding: 4px 10px 4px 8px;
        margin-bottom: 16px;
    }

    .hero-actions {
        flex-direction: column;
        gap: 8px;
        max-width: 320px;
        margin: 0 auto;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .dropzone {
        padding: 28px 18px;
        min-height: 160px;
    }

    .dropzone-icon {
        width: 40px;
        height: 40px;
        font-size: 1.3rem;
        margin-bottom: 12px;
    }

    .dropzone-title {
        font-size: 0.95rem;
    }

    .dropzone-subtitle,
    .dropzone-hint {
        font-size: 0.78rem;
    }

    .section {
        padding: 24px 0;
    }

    .section-header {
        margin-bottom: 20px;
    }

    .section-header h2 {
        font-size: 1.15rem;
    }

    .section-header p {
        font-size: 0.85rem;
    }

    .inv-col-id {
        display: none;
    }

    .app-footer-grid {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .pricing-card {
        padding: 24px 18px 20px;
    }

    .pricing-amount {
        font-size: 1.9rem;
    }

    .pricing-badge {
        left: 16px;
    }

    .stats-grid {
        gap: 12px;
    }

    .page-actions {
        flex-direction: column;
    }

    .page-actions .btn {
        width: 100%;
    }

    .upload-info-badge {
        font-size: 0.72rem;
        padding: 5px 10px;
    }

    .alert {
        padding: 10px 14px;
        font-size: 0.85rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* ==========================================================
   39. MICRO-INTERACTIONS
   ========================================================== */

@keyframes voince-page-in {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

body {
    animation: voince-page-in 0.22s ease-out;
}

@keyframes voince-badge-pulse {
    0%, 100% { box-shadow: 0 0 0 3px var(--primary-soft); }
    50%      { box-shadow: 0 0 0 6px var(--primary-soft); }
}

.hero-badge-dot {
    animation: voince-badge-pulse 2.4s ease-in-out infinite;
}

.btn {
    -webkit-tap-highlight-color: transparent;
}

.btn:active:not(:disabled) {
    transform: scale(0.98);
    transition-duration: 0.06s;
}

.btn:disabled,
.btn[disabled] {
    transform: none !important;
    box-shadow: none;
}

.card {
    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        box-shadow 0.18s ease,
        transform 0.18s ease;
}

.card:hover {
    box-shadow: var(--shadow-sm);
}

.feature-card:hover,
.step:hover,
.pricing-card:hover {
    transform: translateY(-2px);
}

.account-card:hover,
.settings-card:hover {
    transform: none;
    box-shadow: var(--shadow-xs);
}

:focus {
    outline: none;
}

:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--primary-ring);
    border-radius: var(--radius-sm);
}

.form-control:focus-visible,
.auth-input:focus-visible {
    box-shadow: 0 0 0 3px var(--primary-ring);
}

.app-footer-links a,
.auth-footer a,
p.text-muted a {
    position: relative;
}

.app-footer-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    height: 1px;
    width: 0;
    background: currentColor;
    transition: width 0.18s ease;
    opacity: 0.5;
}

.app-footer-links a:hover::after {
    width: 100%;
}

@keyframes voince-validated-in {
    from { opacity: 0; transform: translateY(-2px); }
    to   { opacity: 1; transform: translateY(0); }
}

.demo-validated-badge {
    animation: voince-validated-in 0.35s ease-out 0.15s both;
}

@keyframes voince-alert-in {
    from { opacity: 0; transform: translateY(-3px); }
    to   { opacity: 1; transform: translateY(0); }
}

.alert {
    animation: voince-alert-in 0.18s ease-out;
}

.status-badge {
    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease;
}

.dropzone {
    transition:
        background-color 0.18s ease,
        border-color 0.18s ease,
        transform 0.18s ease;
}

@keyframes voince-spin-ease {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.upload-spinner {
    animation: voince-spin-ease 0.85s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}

.account-menu-caret svg,
.lang-caret {
    transition: transform 0.18s ease;
}

@keyframes voince-menu-in {
    from { opacity: 0; transform: translateY(-4px) scale(0.99); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.lang-dropdown,
.account-menu-dropdown {
    animation: voince-menu-in 0.14s ease-out;
    transform-origin: top right;
}

@keyframes voince-shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton {
    background: linear-gradient(
        90deg,
        var(--surface-muted) 0%,
        var(--surface-hover) 50%,
        var(--surface-muted) 100%
    );
    background-size: 200% 100%;
    animation: voince-shimmer 1.4s ease-in-out infinite;
    border-radius: var(--radius-sm);
}

@media (prefers-reduced-motion: reduce) {
    body,
    .alert,
    .lang-dropdown,
    .account-menu-dropdown,
    .demo-validated-badge,
    .hero-badge-dot,
    .upload-spinner {
        animation: none !important;
    }

    .btn:active,
    .feature-card:hover,
    .step:hover,
    .pricing-card:hover {
        transform: none !important;
    }

    .app-footer-links a::after {
        transition: none !important;
    }
}