/* docdef UI refresh: shared visual language with the public landing page. */
:root {
  --ink: #122033; --muted: #5f7188; --line: #dde5ef; --line-strong: #cbd7e6;
  --paper: #fff; --bg: #f6f8fb; --soft: #eaf2ff; --blue: #1f6feb;
  --blue-dark: #1658be; --green: #1e8054; --red: #b8364c;
  --shadow: 0 12px 30px #183b640a; --shadow-sm: 0 3px 12px #183b6405;
  --radius: 18px;
}
html { scroll-behavior: auto; }
body { font-family: "Segoe UI", Arial, sans-serif; background: var(--bg); line-height: 1.5; overflow-x: hidden; }
button, input, select, textarea { font-family: inherit; }
input[type="file"]::file-selector-button { border: 0; border-radius: 6px; background: #eaf2ff; color: #1658be; font: 600 11px/1.5 "Segoe UI", Arial, sans-serif; padding: 7px 10px; margin-right: 9px; cursor: pointer; }
input[type="file"]::file-selector-button:hover { background: #dceaff; }
button { -webkit-tap-highlight-color: transparent; }
button, a, summary, input, select, textarea { touch-action: manipulation; }
:focus-visible { outline: 3px solid #1f6feb; outline-offset: 3px; }
.ui-icon { width: 21px; height: 21px; flex: none; vertical-align: middle; }
.ui-icon-library { position: absolute; width: 0; height: 0; overflow: hidden; pointer-events: none; }
.eyebrow { font-size: 10px; font-weight: 650; letter-spacing: 1.5px; color: #54749c; margin-bottom: 12px; }
.eyebrow.light { color: #54749c; }
.button { min-height: 44px; border-radius: 9px; padding: 11px 18px; font-size: 13px; font-weight: 600; line-height: 1.5; box-shadow: none; }
.button.primary { background: var(--blue); box-shadow: 0 3px 8px #1f6feb0d; }
.button.primary:hover:not(:disabled) { background: var(--blue-dark); box-shadow: 0 4px 12px #1f6feb16; }
.button:hover:not(:disabled), .button:active:not(:disabled), .icon-button:hover { transform: none; }
.button.ghost:hover:not(:disabled) { background: #f7faff; border-color: #b9cce6; }
.button:disabled { opacity: 1; color: #617796; background: #e4ecf8; border-color: #e4ecf8; box-shadow: none; }
.button.small { min-height: 36px; font-size: 12px; padding: 7px 12px; }
.button kbd { font: 500 11px/1.4 "Segoe UI", Arial, sans-serif; white-space: nowrap; }
.button:disabled kbd { border-color: #c9d8ec; background: #ffffff6b; }
.text-button { min-height: 32px; font-size: 12px; font-weight: 600; padding: 5px 0; }
.icon-button { width: 40px; height: 40px; border-radius: 10px; flex: none; }
.panel, .upload-card, .how-card { border: 1px solid var(--line); box-shadow: none; background: #fff; border-radius: 17px; }
.panel { padding: 25px; }
.panel-head { gap: 15px; margin-bottom: 23px; }
.panel-head h3 { font-size: 17px; font-weight: 650; letter-spacing: -.3px; }
.panel-head p { font-size: 12px; line-height: 1.6; margin-top: 6px; }
.panel-head .step-chip { flex: none; }
.stack-form label, .security-grid label { font-size: 12px; line-height: 1.6; font-weight: 600; }
.stack-form input, .stack-form select, .stack-form textarea, .security-grid input { min-height: 44px; border-radius: 9px; font: 14px/1.5 "Segoe UI", Arial, sans-serif; }
.brand img { width: 120px; height: auto; }
.app-shell { display: grid; grid-template-columns: 242px minmax(0, 1fr); }
.sidebar { width: 242px; background: #fff; padding: 29px 17px 18px; border-color: #e0e7f0; backdrop-filter: none; z-index: 30; }
.sidebar > .brand { margin: 0 13px 30px; }
.side-nav { gap: 4px; }
.nav-group-label { font-size: 9px; letter-spacing: 1.2px; text-transform: uppercase; color: #75849a; padding: 0 13px 10px; font-weight: 600; }
.nav-account-label { padding-top: 23px; }
.nav-item { min-height: 44px; gap: 11px; padding: 10px 12px; font-size: 12px; font-weight: 500; line-height: 1.3; border: 0; color: #50627b; }
.nav-icon { width: 19px; height: 19px; color: #758dab; }
.nav-item.active { background: #eaf2ff; color: var(--blue-dark); box-shadow: none; font-weight: 600; }
.nav-item.active .nav-icon { color: var(--blue); }
.nav-item:hover { background: #f2f6fc; }
.nav-item.active:hover { background: #eaf2ff; }
.nav-free { margin-left: auto; background: #eaf6ee; color: #24754f; font-size: 8px; font-weight: 650; padding: 3px 5px; border-radius: 4px; letter-spacing: .3px; }
.security-card { display: flex; align-items: start; gap: 10px; margin-top: auto; padding: 14px 12px; border: 0; border-radius: 12px; background: #f6f8fb; color: #4d6482; }
.security-card > .ui-icon { width: 20px; height: 20px; color: #6889b6; }
.security-card strong { font-size: 11px; font-weight: 600; }
.security-card p { font-size: 10px; line-height: 1.7; margin: 5px 0 0; color: #70829a; }
.tour-launch { display: flex; justify-content: center; align-items: center; gap: 8px; min-height: 42px; padding: 10px 0 0; margin-top: 7px; border: 0; font-size: 10px; color: #58769e; background: none; }
.tour-launch .ui-icon { width: 16px; height: 16px; }
.sidebar-close, .sidebar-logout, .sidebar-backdrop { display: none; }
.main-area { min-width: 0; }
.topbar { height: 80px; padding: 0 36px; background: #ffffffed; border-bottom: 1px solid #e5ebf3; gap: 18px; z-index: 20; }
.top-kicker { color: #75849a; font-size: 8px; font-weight: 600; letter-spacing: 1.2px; margin-bottom: 4px; }
.topbar h1 { font-size: 17px; font-weight: 650; letter-spacing: -.3px; }
.top-actions { gap: 12px; }
.credit-pill { display: flex; align-items: center; gap: 7px; min-height: 39px; padding: 8px 12px; border: 1px solid var(--line); box-shadow: none; border-radius: 10px; background: #fff; }
.credit-pill .ui-icon { width: 16px; height: 16px; color: #8297b3; }
.credit-pill strong { font-size: 14px; font-weight: 600; }
.credit-pill > span { display: inline; color: #6a7e9a; font-size: 11px; }
.user-chip { border: 0; padding-left: 8px; }
.user-chip > span { width: 34px; height: 34px; background: #edf3fc; color: #5175a5; border: 0; border-radius: 50%; font-size: 12px; }
.user-chip strong { font-size: 12px; font-weight: 600; }
.user-chip small { font-size: 10px; }
.notification-button svg { width: 19px; height: 19px; }
.content { max-width: 1390px; padding: 35px 36px 50px; }
.hero-panel, .section-hero, .section-hero.compact { display: flex; align-items: center; justify-content: space-between; min-height: 0; padding: 0; margin: 0 0 27px; background: none; border: 0; border-radius: 0; box-shadow: none; overflow: visible; color: var(--ink); }
.hero-panel::before, .hero-panel::after { display: none; }
.hero-copy { max-width: 730px; }
.hero-copy h2, .section-hero h2 { font-size: clamp(25px, 2.3vw, 33px); line-height: 1.2; letter-spacing: -1px; font-weight: 650; margin: 0 0 10px; color: var(--ink); }
.hero-copy p, .section-hero p { font-size: 14px; line-height: 1.65; color: var(--muted); max-width: 670px; margin: 0; }
.hero-panel .eyebrow { color: #54749c; }
.format-chips { display: flex; flex-wrap: wrap; gap: 7px; justify-content: end; max-width: 160px; margin-left: 20px; }
.format-chips span { border: 1px solid #d9e4f2; background: #fff; color: #637e9f; padding: 6px 8px; border-radius: 6px; font-size: 9px; font-weight: 500; }
.upload-layout, .inspector-layout { display: grid; grid-template-columns: minmax(0, 1fr) 285px; align-items: start; gap: 22px; margin-top: 0; }
.upload-card { padding: 24px; }
.dropzone { height: 195px; border: 1.5px dashed #b0c8e9; background: #f7faff; border-radius: 13px; padding: 20px; text-align: center; }
.dropzone::before { display: none; }
.dropzone:hover, .dropzone.dragover { transform: none; background: #edf4ff; border-color: var(--blue); box-shadow: none; }
.dropzone:focus-visible, .compact-dropzone:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
.upload-orb { width: 45px; height: 45px; margin-bottom: 13px; box-shadow: none; background: #eaf2ff; border: 1px solid #d0e1fa; border-radius: 13px; }
.upload-orb .ui-icon { width: 23px; height: 23px; }
.dropzone strong { font-size: 15px; font-weight: 600; }
.dropzone > span:not(.upload-orb) { font-size: 12px; color: #74869f; margin-top: 6px; }
.dropzone small { font-size: 9px; font-weight: 500; color: #7488a2; margin-top: 13px; letter-spacing: .4px; }
.file-selection { min-height: 77px; height: auto; background: #f2f7ff; border-color: #c9dbf6; gap: 12px; }
.file-selection { min-width: 0; }
.file-selection .file-badge, .file-selection button { flex: none; }
.file-selection > div { flex: 1 1 0; min-width: 0; }
.file-selection strong, .file-selection small { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compact-dropzone { min-width: 0; }
.compact-dropzone > span { flex: none; }
.compact-dropzone > div { min-width: 0; flex: 0 1 auto; }
.compact-dropzone strong { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-selection strong { font-size: 14px; }
.file-selection small { font-size: 11px; line-height: 1.5; margin-top: 3px; }
.file-selection button { min-width: 36px; min-height: 36px; }
.settings-disclosure { margin-top: 18px; padding: 0; border: 1px solid #e0e7f1; border-radius: 11px; background: #fff; }
.settings-disclosure > summary { min-height: 72px; display: flex; align-items: center; gap: 13px; list-style: none; cursor: pointer; padding: 14px 16px; }
summary::-webkit-details-marker { display: none; }
.settings-disclosure > summary > .ui-icon { width: 21px; color: #7892b5; }
.settings-disclosure > summary > span:not(.disclosure-action) { display: flex; flex-direction: column; gap: 4px; }
.settings-disclosure summary strong { font-size: 13px; font-weight: 600; }
.settings-disclosure summary small { font-size: 11px; color: var(--muted); }
.disclosure-action { display: flex; align-items: center; gap: 7px; margin-left: auto; font-size: 11px; color: var(--blue); }
.disclosure-action .ui-icon { width: 16px; height: 16px; transition: transform .2s; }
.settings-disclosure[open] > summary { border-bottom: 1px solid #e6ecf4; }
.settings-disclosure[open] .disclosure-action .ui-icon { transform: rotate(180deg); }
.settings-body { padding: 18px; }
.mask-settings-head { align-items: center; gap: 12px; }
.mask-settings-head small { display: none; }
.mask-settings-head strong { font-size: 12px; font-weight: 600; }
.mask-guide-link { font-size: 11px; padding: 7px 0 0; margin: 0; }
.category-choices { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 17px; }
.category-group { border: 0; padding: 0 0 13px; border-bottom: 1px solid #edf1f7; border-radius: 0; background: none; }
.category-group:last-child { border-bottom: 0; padding-bottom: 0; }
.category-group-head { align-items: center; }
.category-group-head strong { font-size: 11px; font-weight: 600; color: #536b8b; }
.category-group-head .text-button { font-size: 10px; min-height: 28px; }
.category-group-items { gap: 7px; }
.category-choice span { font-size: 11px; font-weight: 500; border-radius: 7px; padding: 8px 10px; color: #5f738f; border-color: #dce5f1; }
.category-choice input:checked + span { background: #edf4ff; border-color: #b0ccf5; color: #1b5ebb; }
.category-choice input:checked + span::before { content: "✓"; margin-right: 5px; font-size: 10px; }
.dictionary-choice { margin-top: 17px; padding-top: 14px; }
.dictionary-choice strong { font-size: 12px; }
.dictionary-choice small { font-size: 11px; line-height: 1.5; }
.rule-choices p { font-size: 12px; }
.advanced-options { margin: 12px 0 17px; }
.advanced-options summary { min-height: 40px; display: flex; align-items: center; gap: 9px; font-size: 12px; color: #617795; list-style: none; cursor: pointer; padding: 5px 1px; }
.advanced-options summary .ui-icon { width: 16px; height: 16px; }
.advanced-options summary .ui-icon:last-child { margin-left: auto; }
.advanced-options[open] summary .ui-icon:last-child { transform: rotate(180deg); }
.advanced-options summary small { font-size: 10px; color: #788ba5; margin-left: 5px; }
.upload-options { grid-template-columns: 1fr 1fr; gap: 17px; margin: 12px 0 18px; padding: 15px; border-radius: 10px; background: #f7f9fc; }
.switch-row { position: relative; min-height: 44px; }
.switch-row input { display: block; position: absolute; opacity: 0; width: 1px; height: 1px; overflow: hidden; }
.switch-row input:focus-visible + i { outline: 3px solid var(--blue); outline-offset: 4px; }
.switch-row strong { font-weight: 600; font-size: 12px; }
.switch-row small { font-size: 11px; }
.field-compact span { font-size: 11px; }
.field-compact input { font-size: 13px; min-height: 42px; }
#analyzeButton, #inspectButton, #replaceButton { min-height: 48px; }
#inspectButton { margin-top: 18px; }
.how-card { display: block; padding: 22px; }
.how-illustration { background: #f5f8fe; border-radius: 11px; overflow: hidden; margin-bottom: 20px; }
.how-illustration img { display: block; width: 100%; height: 144px; object-fit: cover; }
.card-title { padding-bottom: 14px; gap: 10px; }
.card-title > span { font-size: 13px; font-weight: 600; }
.card-title small { font-size: 9px; padding: 4px 6px; white-space: nowrap; }
.mini-flow { padding-top: 12px; gap: 9px; }
.mini-flow li { gap: 11px; padding: 5px 0 7px; }
.mini-flow b { width: 28px; height: 28px; flex: none; background: #f3f7fe; color: #5f83b2; border-color: #dbe6f5; border-radius: 8px; }
.mini-flow b .ui-icon { width: 16px; height: 16px; }
.mini-flow .current b { background: #eaf2ff; color: var(--blue); box-shadow: none; border-color: #d2e1f7; }
.mini-flow strong { font-size: 12px; font-weight: 600; }
.mini-flow span { font-size: 10px; line-height: 1.6; }
.privacy-note { display: flex; align-items: center; gap: 9px; margin-top: 17px; padding: 11px; background: #f0f7f3; color: #49745d; font-size: 10px; }
.privacy-note > .ui-icon { width: 17px; height: 17px; }
.inspector-free { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 8px 12px; background: #eaf6ee; color: #1f7a4f; border: 1px solid #d5e8dd; border-radius: 8px; white-space: nowrap; }
.inspector-free .ui-icon { width: 15px; height: 15px; }
.jobs-section { margin-top: 30px; }
.section-title { gap: 16px; align-items: center; margin-bottom: 17px; }
.section-title h3 { font-size: 18px; font-weight: 650; letter-spacing: -.4px; }
.section-title p { font-size: 12px; margin-top: 5px; }
.job-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.job-card { padding: 17px 19px; border-radius: 12px; box-shadow: none; display: grid; grid-template-columns: minmax(0,1fr) auto; column-gap: 22px; align-items: center; }
.job-card:hover { transform: none; box-shadow: none; border-color: #b7cce9; }
.job-top { gap: 13px; min-width: 0; }
.job-type { width: 40px; height: 43px; font-size: 9px; background: #f0f5fd; color: #537caf; border-radius: 8px; flex: none; }
.job-info { flex: 1; }
.job-info strong { font-size: 13px; font-weight: 600; }
.job-info small { font-size: 11px; line-height: 1.5; color: #7586a0; }
.status-chip { font-size: 10px; font-weight: 500; border-radius: 6px; padding: 5px 8px; }
.status-chip.review { background: #fff5e1; color: #946016; }
.status-chip.completed { background: #e9f6ee; color: #27794b; }
.status-chip.processing, .status-chip.queued { background: #edf3fd; color: #436fa9; }
.status-chip.failed { background: #fff0f1; color: #ad4055; }
.job-progress { display: none; }
progress.job-progress { grid-column: 1 / -1; width: 100%; height: 3px; border: 0; margin-top: 13px; background: #e9eff7; }
progress.job-progress.processing, progress.job-progress.queued { display: block; }
progress.job-progress::-webkit-progress-bar { background: #e9eff7; border-radius: 3px; }
progress.job-progress::-webkit-progress-value { background: #689cf0; border-radius: 3px; }
progress.job-progress::-moz-progress-bar { background: #689cf0; border-radius: 3px; }
.job-foot { margin: 0; display: flex; gap: 18px; font-size: 10px; }
.job-actions { flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.job-actions button, .job-actions a { display: inline-flex; align-items: center; justify-content: center; min-height: 35px; font-size: 11px; font-weight: 500; padding: 7px 11px; line-height: 1.4; }
.job-actions [data-action="delete"] { width: 34px; border: 0; color: #8798ad; }
.job-actions .ui-icon { width: 16px; height: 16px; }
.empty-state { padding: 28px; min-height: 160px; border-style: solid; border-color: #e1e8f2; background: #fff; gap: 5px; text-align: center; }
.empty-state .ui-icon { width: 33px; height: 33px; color: #86a9d9; margin-bottom: 8px; }
.empty-state strong { font-weight: 600; font-size: 14px; }
.empty-state p { font-size: 12px; }
.hero-symbol { display: grid; place-items: center; border: 1px solid #d9e6f8; background: #edf4ff; border-radius: 14px; padding: 15px; box-shadow: none; color: #6792cc; }
.hero-symbol .ui-icon { width: 27px; height: 27px; }
.replace-grid { grid-template-columns: minmax(0,.85fr) minmax(0,1.15fr); gap: 22px; margin-top: 0; }
.replace-mode-tabs { padding: 4px; border: 1px solid #e0e7f1; background: #f4f7fb; border-radius: 9px; }
.replace-mode-tabs button { min-height: 38px; font-size: 12px; font-weight: 500; }
.replace-mode-tabs .active { background: #fff; box-shadow: 0 2px 5px #1738600a; }
.replace-review-info { border: 0; padding: 17px 0; background: none; align-items: start; gap: 11px; }
.replace-review-info > span { color: #6f92c4; }
.replace-review-info p { font-size: 12px; line-height: 1.6; }
.replace-review-info strong { font-size: 13px; }
.encrypted-note { background: #f4f7fb; border-color: #e3eaf3; margin: 17px 0; }
.encrypted-note small { font-size: 11px; }
.mapping-row input { min-width: 0; font-size: 13px; }
.mapping-remove { min-height: 36px; }
.mapping-labels { font-size: 10px; }
.ai-flow { margin-top: 23px; }
.recovery-path { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 20px; background: #f5f8fd; border: 1px solid #e1e9f5; border-radius: 12px; }
.recovery-path > span { display: inline-flex; align-items: center; gap: 9px; font-size: 12px; color: #5b7393; }
.recovery-path b, .recovery-path > .ui-icon { color: #9bb0ce; font-weight: 400; }
.recovery-path .recovery-result { color: #2a7950; }
.recovery-help { margin-block: 12px 20px; }
.text-disclosure { font-size: 13px; color: var(--muted); line-height: 1.7; }
.text-disclosure summary { display: flex; align-items: center; justify-content: space-between; min-height: 44px; gap: 13px; cursor: pointer; list-style: none; font-size: 12px; font-weight: 600; color: #4873ab; }
.text-disclosure summary > .ui-icon { width: 17px; height: 17px; }
.text-disclosure[open] summary > .ui-icon { transform: rotate(180deg); }
.text-disclosure p { margin: 10px 0; }
.text-disclosure .panel-head { display: none; }
.dictionary-grid { grid-template-columns: 1fr .8fr; align-items: start; gap: 22px; }
.guide-mini-visual { display: grid; place-items: center; gap: 14px; background: #f2f7ff; border-radius: 12px; padding: 29px 16px; margin-bottom: 13px; }
.guide-mini-visual span { font-size: 16px; font-weight: 600; color: #5e7b9f; }
.guide-mini-visual > .ui-icon { color: #80a0c9; transform: rotate(90deg); }
.guide-mini-visual code { font-size: 15px; padding: 7px 12px; border: 1px solid #c8dcf8; border-radius: 7px; background: #e4efff; color: #2a65b1; }
.pattern-guide ol { padding-left: 21px; font-size: 13px; }
.pattern-list-panel { margin-top: 22px; }
.pattern-item { padding: 16px; border-radius: 10px; }
.pattern-item strong { font-size: 13px; font-weight: 600; }
.pattern-item code { margin-top: 5px; font-size: 12px; overflow-wrap: anywhere; }
.history-panel { margin-top: 0; }
.history-tools { grid-template-columns: minmax(0,1fr) 210px; }
.history-tools input, .history-tools select { font-size: 13px; min-height: 44px; }
.history-row { grid-template-columns: minmax(160px,1.8fr) minmax(85px,.7fr) 55px 107px minmax(160px,1fr); gap: 14px; padding: 18px 3px; font-size: 12px; }
.history-row.header { font-size: 9px; font-weight: 500; }
.history-name strong { font-weight: 600; font-size: 12px; }
.history-name > span { width: 34px; height: 39px; flex: none; font-size: 8px; }
.history-row .status-chip { margin-left: 0; justify-self: start; }
.history-row > :nth-child(3), .history-row > :nth-child(4) { display: block; }
.billing-hero { min-height: 0; padding: 27px 30px; background: #eaf2ff; border: 1px solid #d6e4f8; color: var(--ink); border-radius: 18px; }
.billing-hero h2 { font-size: 38px; letter-spacing: -1.4px; font-weight: 650; }
.billing-hero p { color: #607c9f; font-size: 12px; margin: 9px 0 0; }
.balance-orbit { width: 85px; height: 85px; display: grid; place-items: center; box-shadow: none; border: 1px solid #d1e0f6; background: #f8fbff; border-radius: 22px; color: #78a1d8; }
.balance-orbit .ui-icon { width: 38px; height: 38px; }
.billing-help { border: 0; margin: 20px 0; background: transparent; padding: 0; gap: 16px; }
.billing-help strong { font-size: 13px; font-weight: 600; }
.billing-help span { font-size: 12px; margin-top: 5px; }
.billing-help .button { min-height: 40px; font-size: 12px; }
.package-grid { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 15px; }
.package-card { padding: 23px 19px; box-shadow: none; border-radius: 14px; }
.package-card h3 { font-size: 14px; font-weight: 600; color: #4e6482; }
.package-card.featured { box-shadow: none; border-color: #93b7ee; background: #f3f7ff; }
.package-card.featured::before { display: none; }
.package-card.featured h3::after { content: "Популярный"; display: block; color: #407ac8; font-size: 8px; margin-top: 3px; font-weight: 500; }
.package-amount { gap: 6px; margin-top: 21px; }
.package-amount strong { font-size: 30px; letter-spacing: -.8px; font-weight: 650; }
.package-amount > span { font-size: 10px; }
.package-price { display: flex; flex-direction: column; gap: 5px; font-size: 11px; }
.package-price b { font-size: 17px; font-weight: 600; }
.package-card .button { font-size: 11px; padding-inline: 9px; }
.package-card-free { background: #fbfefc; border-color: #d5e8dc; }
.package-free-note { font-size: 11px; line-height: 1.6; padding: 12px 0; }
.ledger-row { padding-block: 15px; }
.ledger-row div strong { font-size: 13px; font-weight: 600; }
.ledger-row small { font-size: 11px; margin-top: 3px; }
.support-grid { grid-template-columns: 1fr .9fr; gap: 22px; }
.support-ticket { border-radius: 12px; padding: 18px; }
.support-ticket-head strong { font-size: 13px; font-weight: 600; }
.support-ticket p { font-size: 12px; line-height: 1.7; }
.support-ticket-meta, .admin-support-meta { font-size: 10px; }
.support-answer { padding: 12px; border-radius: 9px; background: #f3f7fd; }
.support-form textarea { min-height: 145px; }
.security-grid { grid-template-columns: 1fr 1fr; gap: 22px; }
.security-grid .panel > div > .button { margin-top: 15px; }
.security-grid .step-chip { width: auto; min-width: 48px; padding-inline: 9px; height: 30px; font-size: 9px; }
.admin-metrics article { box-shadow: none; border-radius: 13px; padding: 20px; }
.admin-metrics strong { font-size: 29px; font-weight: 650; color: #2f64aa; }
.admin-metrics span { font-size: 11px; }
.admin-user { grid-template-columns: minmax(150px,1fr) 70px 80px 100px; gap: 14px; font-size: 11px; padding: 20px 0; }
.admin-user-email strong { font-size: 13px; font-weight: 600; }
.admin-user-email small { font-size: 10px; line-height: 1.6; }
.admin-user-actions { grid-column: 1 / -1; }
.admin-user-actions input { min-height: 38px; }
.admin-create-user { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px 16px; padding: 18px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 12px; background: #f8fbff; }
.admin-create-user > label:not(.admin-create-2fa) { display: grid; gap: 7px; font-size: 11px; font-weight: 600; color: var(--muted); }
.admin-create-user input[type="email"], .admin-create-user input[type="password"] { min-width: 0; width: 100%; min-height: 42px; border: 1px solid var(--line-strong); border-radius: 8px; padding: 9px 11px; background: #fff; color: var(--ink); }
.admin-create-2fa { grid-column: 1 / -1; display: flex; align-items: center; gap: 9px; font-size: 11px; color: var(--ink); }
.admin-create-2fa input { width: 16px; height: 16px; margin: 0; accent-color: var(--blue); }
.admin-create-user .button { grid-column: 1 / -1; justify-self: start; }
.admin-support-ticket { grid-template-columns: 1fr 1fr; }
.admin-support-panel { margin-top: 22px; }
.notification-panel { width: min(420px, calc(100vw - 32px)); top: 76px; right: 24px; bottom: auto; max-height: calc(100dvh - 95px); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 20px 60px #183a6226; }
.notification-head { padding: 19px; }
.notification-head strong { font-size: 15px; }
.notification-head small { font-size: 11px; margin-top: 3px; }
.notification-head button { display: grid; place-items: center; min-height: 38px; min-width: 38px; }
.notification-item { padding: 18px; gap: 12px; }
.notification-item strong { font-size: 12px; font-weight: 600; }
.notification-item p { font-size: 12px; line-height: 1.6; }
.notification-item time { font-size: 10px; }
/* Authentication */
.auth-shell { height: 100dvh; min-height: 0; grid-template-columns: minmax(0,1.04fr) minmax(0,1fr); grid-template-rows: minmax(0,1fr); overflow: hidden; }
.auth-story { background: #f4f7fd; color: var(--ink); padding: 42px clamp(30px,5.5vw,88px); border-right: 1px solid #e3eaf4; }
.auth-story::before { display: none; }
.auth-story .auth-brand { padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; backdrop-filter: none; }
.auth-story .auth-brand img { width: 125px; height: auto; }
.auth-copy { margin: auto 0 5px; padding-top: 45px; max-width: 540px; }
.auth-copy .eyebrow { font-size: 9px; margin-bottom: 20px; }
.auth-copy h1 { font-size: clamp(32px,3.3vw,49px); line-height: 1.12; letter-spacing: -1.7px; font-weight: 650; margin-bottom: 20px; }
.auth-copy h1 span { color: var(--blue); }
.auth-copy > p { font-size: 15px; color: var(--muted); max-width: 380px; line-height: 1.7; }
.auth-art { position: relative; margin-top: 10px; }
.auth-art img { width: 100%; height: auto; border-radius: 22px; mix-blend-mode: multiply; }
.auth-art > span { position: absolute; bottom: 9px; right: 0; display: flex; align-items: center; gap: 8px; background: #fffffff0; border: 1px solid #dce6f4; border-radius: 10px; padding: 12px 16px; font-size: 11px; color: #55749c; box-shadow: 0 10px 25px #12315507; }
.auth-art > span .ui-icon { width: 17px; height: 17px; }
.auth-formats { display: flex; flex-wrap: wrap; gap: 25px; margin: 32px 0 auto; padding-top: 20px; border-top: 1px solid #e0e7f2; }
.auth-formats span { display: flex; align-items: center; gap: 7px; font-size: 11px; color: #647f9f; }
.auth-formats .ui-icon { width: 17px; height: 17px; }
.auth-panel { min-height: 0; height: 100%; display: flex; flex-direction: column; align-items: center; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; background: #fff; padding: 45px; }
.auth-shell.captcha-challenge-open { height: auto; min-height: 100dvh; grid-template-rows: auto; overflow: visible; }
.auth-panel.captcha-challenge-open { height: auto; min-height: 100dvh; overflow: visible; scrollbar-gutter: auto; }
.auth-card { flex: none; max-width: 390px; margin-block: auto; }
.auth-tabs { background: #f2f5fa; border: 1px solid #e6ecf4; padding: 4px; margin-bottom: 31px; border-radius: 10px; }
.auth-tab { min-height: 39px; font-size: 13px; font-weight: 500; }
.auth-tab.active { color: var(--blue-dark); box-shadow: 0 2px 5px #203f6409; font-weight: 600; }
.auth-heading h2 { font-size: 29px; font-weight: 650; letter-spacing: -.8px; }
.auth-heading p { font-size: 13px; line-height: 1.7; margin-top: 8px; }
.auth-card label { font-size: 12px; font-weight: 600; }
.auth-card input { min-height: 48px; font-size: 15px; font-weight: 400; }
.auth-card .button { font-size: 14px; min-height: 48px; }
.auth-link { min-height: 40px; font-size: 12px; font-weight: 500; }
.trust-note { display: flex; justify-content: center; align-items: center; gap: 8px; font-size: 11px; }
.trust-note .ui-icon { width: 16px; height: 16px; color: #7a95b9; }
.auth-back { min-height: 40px; font-size: 13px; }
/* Review: stable document canvas, readable findings, explicit mobile panels. */
.review-modal { padding: 12px; background: #edf1f7; }
.review-shell { grid-template-rows: 63px 62px minmax(0,1fr); border-radius: 15px; box-shadow: none; }
.review-top { gap: 22px; padding-inline: 22px; }
.review-brand img { width: 103px; height: auto; }
.review-brand span { display: none; }
.review-file { min-width: 0; flex: 1 1 0; }
.review-file strong { font-size: 13px; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.review-file small { font-size: 11px; margin-top: 3px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.review-steps { background: #fff; padding-inline: 4%; }
.review-steps span { font-size: 11px; font-weight: 600; }
.review-steps small { font-size: 9px; margin-top: 3px; }
.review-steps b { width: 26px; height: 26px; font-weight: 500; }
.review-steps .current b { box-shadow: none; }
.review-steps .done b { background: #eef6f1; border-color: #d9e8de; color: #4e8560; }
.review-mobile-tabs { display: none; }
.review-main { display: grid; grid-template-columns: minmax(0,1fr) 360px; gap: 12px; padding: 12px; min-height: 0; background: #f3f6fa; overflow: hidden; }
.document-pane { display: flex; flex-direction: column; min-width: 0; min-height: 0; border-radius: 10px; }
.document-tools { gap: 4px; min-height: 48px; padding: 0 10px; background: #fff; overflow-x: auto; scrollbar-width: thin; }
.document-tools .tool-tab { font-size: 11px; padding: 0 10px; min-height: 44px; height: auto; white-space: nowrap; flex: none; }
.document-tools .tool-tab:disabled { color: #9aa9bc; }
.document-tools .icon-button { width: 32px; height: 32px; }
.document-tools > b { font-size: 10px; white-space: nowrap; }
.text-preview { padding: 25px; background: #edf1f6; }
.text-page { padding: 48px 42px; font-size: 14px; line-height: 1.85; border: 1px solid #e0e6ee; box-shadow: 0 3px 10px #1c3b5f06; }
.text-page mark, .docx-page mark, .xlsx-cell-text mark { background: #ffd4d8; border-bottom-color: #d94357; }
.text-page mark.unselected, .docx-page mark.unselected, .xlsx-cell-text mark.unselected { background: #fff0a8; border-bottom-color: #d39a12; }
.text-page mark.jev-rejected, .docx-page mark.jev-rejected, .xlsx-cell-text mark.jev-rejected { background: #e2e5e9; border-bottom-color: #8995a2; }
.preview-box:not(.selected):not(.jev-rejected) { border-color: #d39a12; background: rgba(255, 220, 87, .32); }
.review-mobile-action { display: none; }
.findings-pane { display: flex; flex-direction: column; min-height: 0; margin: 0; overflow-y: auto; overscroll-behavior: contain; border-radius: 10px; background: #fff; }
.findings-head { padding: 17px; flex: none; }
.findings-head strong { font-size: 14px; font-weight: 600; }
.findings-head small { font-size: 11px; margin-top: 5px; }
.count-badge { border-radius: 7px; font-size: 12px; font-weight: 600; }
.finding-actions { padding: 10px 15px; flex: none; gap: 10px; font-size: 11px; }
.finding-actions select { min-width: 0; max-width: 56%; font-size: 11px; min-height: 34px; }
.finding-actions label { white-space: nowrap; }
.finding-actions input, .finding-card input { width: 16px; height: 16px; flex: none; accent-color: var(--blue); }
.findings-list { flex: 1 0 130px; overflow-y: auto; min-height: 130px; }
.finding-card { padding: 15px; grid-template-columns: 20px minmax(0,1fr) auto; gap: 10px; }
.finding-copy strong { font-size: 12px; font-weight: 600; line-height: 1.5; }
.finding-copy small { font-size: 10px; line-height: 1.5; margin-top: 5px; }
.confidence { font-size: 10px; background: #edf6f0; color: #518566; padding: 3px 5px; }
.manual-finding { padding: 13px 15px; flex: none; }
.manual-finding label { font-size: 11px; font-weight: 500; }
.manual-finding input { font-size: 12px; min-height: 38px; }
.review-warning { font-size: 11px; line-height: 1.6; padding: 10px 12px; margin: 0 15px 12px; border-color: #efdfbc; background: #fff9ec; flex: none; }
.findings-pane > .button { width: auto; min-height: 46px; margin: 0 15px 14px; border-radius: 9px; padding: 11px 12px; font-size: 12px; flex: none; }
.replacement-editor { flex: none; padding: 15px; background: #f8faff; border-top: 1px solid #dce7f7; }
.replacement-editor-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.replacement-editor-head strong { font-size: 12px; }
.replacement-editor-head .replacement-generate { width: 28px; height: 28px; border-radius: 8px; border-color: #d2e2f4; background: #f4f9ff; color: var(--blue); }
.replacement-editor-head .replacement-generate:hover:not(:disabled) { background: #dfefff; border-color: #91bbe9; }
.replacement-editor-head .replacement-generate:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.replacement-editor-head .replacement-generate:disabled { opacity: .45; cursor: not-allowed; }
.replacement-editor > small { font-size: 10px; }
.replacement-row { font-size: 11px; grid-template-columns: minmax(0,1fr) 16px minmax(0,1fr); }
.replacement-row input { min-height: 38px; font-size: 12px; }
.inspection-report { flex: none; font-size: 11px; }
.inspection-report p { font-size: 11px; line-height: 1.6; }
.inspection-score strong { font-size: 31px; }
.inspection-categories span { font-size: 10px; }
.mask-guide-dialog { border: 1px solid #d4dfec; border-radius: 18px; padding: 28px; }
.mask-guide-intro { font-size: 13px; }
.mask-guide-list article { box-shadow: none; border-radius: 11px; }
.mask-guide-list article h3 { font-size: 14px; }
.mask-guide-list article p { font-size: 12px; }
.toast { border-radius: 11px; font-size: 13px; box-shadow: 0 10px 25px #16335312; }
.tour-card { border-radius: 16px; border-color: #d5e3f7; box-shadow: 0 14px 40px #183b6420; max-height: calc(100dvh - 24px); overflow-y: auto; }
.tour-example { display: grid; gap: 7px; margin: -4px 0 14px; padding: 10px; border: 1px solid #e0e7f1; border-radius: 9px; background: #f8faff; color: #43536b; font-size: 11px; }
.tour-example[hidden] { display: none; }
.tour-example mark { padding: 2px 4px; border-radius: 4px; background: #ffd4d8; color: #81303a; }
.tour-example mark.unselected { background: #fff0a8; color: #74500a; }
@media (min-width: 1800px) { .content { max-width: 1420px; } }
@media (max-width: 1200px) {
  .app-shell { grid-template-columns: 218px minmax(0,1fr); }
  .sidebar { width: 218px; padding-inline: 12px; }
  .nav-item { font-size: 11px; gap: 9px; }
  .content { padding: 30px 26px; }
  .topbar { padding-inline: 26px; }
  .upload-layout, .inspector-layout { grid-template-columns: minmax(0,1fr) 250px; gap: 18px; }
  .upload-card, .how-card { padding: 20px; }
  .how-card .card-title small { display: none; }
  .job-card { grid-template-columns: 1fr; }
  .job-foot { justify-content: space-between; margin-top: 13px; }
  .package-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .history-row { grid-template-columns: minmax(140px,1.3fr) 100px 46px 100px minmax(115px,1fr); gap: 10px; }
  .history-row .job-actions { gap: 5px; }
  .history-row .job-actions a, .history-row .job-actions button { font-size: 10px; padding: 6px 8px; }
  .review-main { grid-template-columns: minmax(0,1fr) 330px; }
  .review-top { gap: 17px; }
  .text-preview { padding: 18px; }
}
@media (max-width: 1000px) {
  .upload-layout, .inspector-layout { grid-template-columns: 1fr; }
  .how-card { display: none; }
  .format-chips { display: none; }
  .hero-copy h2, .section-hero h2 { font-size: 29px; }
  .replace-grid, .dictionary-grid, .support-grid, .security-grid { grid-template-columns: 1fr; }
  .history-row { grid-template-columns: minmax(130px,1fr) 90px 100px; }
  .history-row > :nth-child(2) { display: none; }
  .history-row > :nth-child(3) { grid-column: 2; font-size: 10px; color: var(--muted); }
  .history-row > :nth-child(3)::after { content: " стр."; }
  .history-row.header > :nth-child(3)::after { content: ""; }
  .history-row > :nth-child(4) { grid-column: 3; grid-row: 1; }
  .history-row > .job-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .history-row.header { display: none; }
  .pattern-guide { padding: 20px; }
  .guide-mini-visual { display: flex; justify-content: center; flex-wrap: wrap; padding: 20px; }
  .guide-mini-visual > .ui-icon { transform: none; }
  .auth-panel { padding: 35px; }
  .auth-story { padding: 35px; }
  .auth-copy h1 { font-size: 38px; }
  .auth-formats { gap: 14px; }
}
@media (max-width: 820px) {
  .app-shell { display: block; }
  .sidebar { width: min(286px, calc(100vw - 42px)); padding: 25px 17px 19px; transform: translateX(-105%); visibility: hidden; z-index: 60; box-shadow: none; transition: transform .2s, visibility .2s; }
  .sidebar.open { transform: translateX(0); visibility: visible; box-shadow: 15px 0 40px #1220331f; }
  .sidebar > .brand { margin-bottom: 31px; }
  .sidebar-close { display: grid; position: absolute; right: 15px; top: 20px; width: 36px; height: 36px; place-items: center; border: 0; border-radius: 8px; color: #7187a5; background: #f2f5fa; }
  .sidebar-logout { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; border: 0; background: none; color: #607795; font-size: 12px; margin-top: 5px; }
  .sidebar-logout .ui-icon { width: 17px; height: 17px; }
  .nav-item { font-size: 13px; min-height: 44px; gap: 13px; }
  .nav-account-label { padding-top: 17px; }
  .sidebar-backdrop { display: block; position: fixed; inset: 0; border: 0; z-index: 50; background: #12203352; backdrop-filter: blur(2px); cursor: default; }
  .sidebar .security-card { margin-top: 22px; }
  .sidebar { overflow-y: auto; overscroll-behavior: contain; }
  .main-area { width: 100%; }
  .topbar { height: 68px; padding: 0 20px; gap: 12px; }
  .menu-button { display: grid; }
  .topbar > div:not(.top-actions) { min-width: 0; }
  .topbar h1 { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .top-kicker { font-size: 7px; letter-spacing: .6px; }
  .user-chip, #logoutButton { display: none; }
  .top-actions { gap: 8px; }
  .credit-pill > span { display: inline; }
  .credit-pill .ui-icon { display: none; }
  .credit-pill { padding: 7px 10px; gap: 4px; }
  .credit-pill strong { font-size: 13px; }
  .content { padding: 28px 24px 35px; }
  .hero-panel, .section-hero { margin-bottom: 24px; gap: 15px; }
  .review-modal { padding: 0; }
  .review-shell { border: 0; border-radius: 0; grid-template-rows: 60px 52px minmax(0,1fr); }
  .review-main { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 8px; padding: 8px; overflow: hidden; }
  .review-steps { overflow: hidden; padding-inline: 20px; }
  .review-steps small { display: none; }
  .review-steps > div { gap: 6px; }
  .review-steps i { margin-inline: 6px; min-width: 0; }
  .review-steps span { font-size: 9px; }
  .review-steps b { width: 24px; height: 24px; }
  .document-pane, .findings-pane { min-height: 0; margin: 0; }
  .text-page { padding: 35px 22px; font-size: 13px; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-story { display: none; }
  .auth-panel { padding: 36px 24px; }
  .auth-card { width: min(100%,420px); margin-block: 20px 0; }
  .mobile-brand { display: flex; margin-bottom: 36px; }
  .mobile-brand img { width: 118px; }
  .guide-mini-visual { margin-bottom: 10px; }
}
@media (max-width: 600px) {
  .topbar { height: 64px; padding: 0 16px; gap: 9px; }
  .topbar h1 { font-size: 14px; max-width: 145px; }
  .top-kicker { display: none; }
  .top-actions { margin-left: auto; gap: 7px; }
  .topbar .icon-button { width: 38px; height: 38px; }
  .credit-pill { min-height: 36px; border: 0; background: #f0f5fe; padding-inline: 9px; }
  .credit-pill > span { font-size: 10px; }
  .content { padding: 27px 17px 35px; }
  .hero-panel { min-height: 0; }
  .hero-copy h2, .section-hero h2 { font-size: 27px; letter-spacing: -.8px; }
  .hero-copy p, .section-hero p { font-size: 13px; line-height: 1.65; }
  .eyebrow { font-size: 9px; letter-spacing: 1.25px; margin-bottom: 11px; }
  .upload-card { padding: 16px; border-radius: 14px; }
  .dropzone { height: 185px; padding: 17px 10px; border-radius: 11px; }
  .dropzone strong { font-size: 14px; }
  .dropzone > span:not(.upload-orb) { max-width: 250px; font-size: 11px; line-height: 1.5; }
  .dropzone small { font-size: 8px; letter-spacing: .3px; }
  .upload-orb { width: 43px; height: 43px; margin-bottom: 12px; }
  .settings-disclosure { margin-top: 14px; }
  .settings-disclosure > summary { gap: 10px; min-height: 72px; padding: 13px; }
  .settings-disclosure summary strong { font-size: 12px; }
  .settings-disclosure summary small { font-size: 10px; max-width: 160px; }
  .settings-disclosure > summary > .ui-icon { width: 18px; }
  .disclosure-action { font-size: 10px; gap: 3px; }
  .disclosure-action .ui-icon { width: 14px; height: 14px; }
  .settings-body { padding: 14px; }
  .mask-settings-head { align-items: start; }
  .mask-settings-head .text-button { font-size: 10px; max-width: 70px; }
  .category-group-head strong { font-size: 11px; }
  .category-group-head .text-button { font-size: 9px; }
  .category-choice span { min-height: 36px; display: flex; align-items: center; padding: 7px 9px; font-size: 11px; }
  .dictionary-choice { flex-direction: column; align-items: start; gap: 6px; }
  .advanced-options { margin: 10px 0 13px; }
  .advanced-options summary { font-size: 11px; min-height: 38px; gap: 7px; }
  .advanced-options summary small { display: none; }
  .upload-options { grid-template-columns: 1fr; padding: 13px; gap: 18px; }
  .field-compact input { font-size: 16px; }
  #analyzeButton, #inspectButton, #replaceButton { font-size: 12px; padding-inline: 14px; gap: 7px; }
  .button kbd { font-size: 9px; padding: 4px 5px; }
  .jobs-section { margin-top: 26px; }
  .section-title h3 { font-size: 17px; }
  .section-title p { font-size: 11px; }
  .section-title .text-button { font-size: 11px; flex: none; }
  .job-card { padding: 15px; border-radius: 12px; }
  .job-top { flex-wrap: wrap; gap: 11px; }
  .job-info { width: calc(100% - 53px); flex: 1; }
  .job-info strong { font-size: 12px; white-space: normal; overflow-wrap: anywhere; }
  .job-info small { font-size: 10px; }
  .job-top > .status-chip { margin: 0 0 0 51px; }
  .job-type { width: 39px; height: 42px; }
  .job-foot { margin-top: 14px; flex-wrap: wrap; gap: 10px; font-size: 10px; }
  .job-actions { margin-left: auto; gap: 6px; }
  .job-actions button, .job-actions a { min-height: 36px; font-size: 11px; }
  .job-actions [data-action="delete"] { min-width: 36px; }
  .job-progress { margin-top: 10px; }
  .inspector-hero { flex-direction: column; align-items: start; }
  .inspector-free { font-size: 11px; padding: 6px 10px; }
  .panel { padding: 20px; border-radius: 14px; min-width: 0; }
  .support-grid > .panel { padding: 20px; }
  .panel-head { margin-bottom: 20px; }
  .panel-head h3 { font-size: 16px; }
  .panel-head p { font-size: 11px; }
  .stack-form input, .stack-form select, .stack-form textarea, .security-grid input, .auth-card input { font-size: 16px; }
  .stack-form > .button { width: 100%; font-size: 12px; }
  .guide-mini-visual { flex-direction: column; gap: 12px; padding: 20px 13px; }
  .guide-mini-visual > .ui-icon { transform: rotate(90deg); }
  .guide-mini-visual span { font-size: 14px; }
  .guide-mini-visual code { font-size: 13px; }
  .hero-symbol { display: none; }
  .replace-grid { gap: 17px; }
  .replace-mode-tabs { grid-template-columns: 1fr 1fr; }
  .replace-mode-tabs button { font-size: 11px; padding: 9px 5px; }
  .compact-dropzone { height: 120px; padding-inline: 16px; }
  .compact-dropzone strong { font-size: 13px; max-width: 200px; }
  .compact-dropzone .ui-icon { width: 21px; }
  .mapping-labels { display: none; }
  .mapping-row { grid-template-columns: minmax(0,1fr) 24px; gap: 7px; padding: 12px; background: #f7f9fc; border: 1px solid #e2e8f1; border-radius: 10px; }
  .mapping-row .map-from, .mapping-row .map-to { grid-column: 1; font-size: 16px; min-height: 43px; }
  .mapping-row .map-from { grid-row: 1; }
  .mapping-row .map-to { grid-row: 2; }
  .mapping-arrow { display: none; }
  .mapping-remove { grid-row: 1 / 3; grid-column: 2; background: transparent; }
  .recovery-path { gap: 12px; padding: 18px; flex-direction: column; align-items: start; }
  .recovery-path > b, .recovery-path > .ui-icon { margin-left: 2px; }
  .recovery-path > .ui-icon { transform: rotate(90deg); }
  .restore-upload-form { grid-template-columns: 1fr; gap: 16px; }
  .restore-upload-form input { max-width: 100%; min-width: 0; font-size: 12px; }
  .restore-upload-form label { min-width: 0; font-size: 12px; }
  .restore-upload-form .button { grid-column: auto; font-size: 12px; }
  .history-tools { grid-template-columns: 1fr; gap: 9px; }
  .history-tools input, .history-tools select { font-size: 16px; min-width: 0; }
  .history-row { position: relative; grid-template-columns: minmax(0,1fr) auto; gap: 12px; padding: 18px 0; }
  .history-row > .history-name { grid-column: 1 / -1; }
  .history-name strong { white-space: normal; overflow-wrap: anywhere; font-size: 12px; line-height: 1.5; }
  .history-row > :nth-child(2) { display: block; font-size: 10px; color: var(--muted); grid-column: 1; }
  .history-row > :nth-child(3) { grid-column: 2; font-size: 10px; }
  .history-row > :nth-child(4) { grid-column: 1 / -1; grid-row: auto; justify-self: start; }
  .history-row > .job-actions { grid-column: 1 / -1; justify-self: start; justify-content: start; margin-left: 0; }
  .history-row .job-actions a, .history-row .job-actions button { min-height: 38px; font-size: 11px; }
  .billing-hero { padding: 24px; border-radius: 15px; }
  .billing-hero h2 { font-size: 32px; }
  .billing-hero p { font-size: 11px; }
  .balance-orbit { display: none; }
  .billing-help { flex-direction: column; align-items: stretch; margin-block: 22px; }
  .billing-help .button { width: 100%; }
  .package-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .package-card { padding: 18px 13px; border-radius: 12px; }
  .package-card h3 { font-size: 12px; }
  .package-card.featured h3::after { font-size: 7px; }
  .package-amount { flex-wrap: wrap; gap: 3px 6px; margin-top: 15px; }
  .package-amount strong { font-size: 25px; }
  .package-amount > span { font-size: 9px; }
  .package-price { font-size: 10px; }
  .package-price b { font-size: 16px; }
  .package-card .button { font-size: 10px; padding: 9px 6px; min-height: 42px; }
  .package-free-note { font-size: 10px; }
  .ledger-row { grid-template-columns: 30px minmax(0,1fr) auto; gap: 10px; }
  .ledger-icon { width: 29px; height: 31px; border-radius: 7px; }
  .ledger-row div strong { font-size: 12px; }
  .ledger-row small { font-size: 10px; }
  .ledger-row > strong { font-size: 11px; }
  .support-ticket { padding: 15px; }
  .support-ticket-head { flex-wrap: wrap; gap: 8px; }
  .support-ticket-head .status-chip { margin-left: 0; }
  .security-grid .panel > div > .button { width: 100%; font-size: 12px; }
  .admin-metrics { grid-template-columns: 1fr 1fr; gap: 12px; }
  .admin-metrics article { padding: 17px; }
  .admin-metrics strong { font-size: 26px; }
  .admin-metrics span { font-size: 10px; }
  .admin-user { grid-template-columns: minmax(0,1fr) auto; gap: 10px; }
  .admin-user > :nth-child(3), .admin-user > :nth-child(4) { display: block; }
  .admin-user > .status-chip { justify-self: start; margin: 0; }
  .admin-user-actions { display: flex; flex-wrap: wrap; gap: 8px; }
  .admin-user-actions input { width: 70px; font-size: 16px; }
  .admin-user-actions .button { font-size: 11px; }
  .admin-support-ticket { grid-template-columns: 1fr; }
  .notification-panel { right: 12px; top: 72px; width: calc(100vw - 24px); max-height: calc(100dvh - 88px); }
  .auth-panel { padding: 30px 24px; }
  .auth-card { margin-top: 0; }
  .mobile-brand { margin-bottom: 32px; }
  .auth-heading h2 { font-size: 28px; }
  .auth-heading p { font-size: 13px; margin-bottom: 23px; }
  .auth-card form { gap: 18px; }
  .auth-tabs { margin-bottom: 28px; }
  .auth-tab { font-size: 12px; }
  .trust-note { font-size: 10px; }
  .review-shell { grid-template-rows: 57px 40px 49px minmax(0,1fr) auto; height: 100dvh; }
  .review-top { padding-inline: 14px; gap: 12px; }
  .review-brand img { width: 82px; }
  .review-file { padding-left: 12px; flex: 1; }
  .review-file strong { font-size: 11px; }
  .review-file small { font-size: 9px; margin-top: 3px; }
  .review-top .icon-button { width: 34px; height: 34px; }
  .review-steps { padding: 7px 18px; overflow: hidden; }
  .review-steps span { display: none; }
  .review-steps b { width: 22px; height: 22px; font-size: 9px; }
  .review-steps .current span { display: flex; font-size: 10px; }
  .review-steps .current small { display: none; }
  .review-steps i { margin-inline: 6px; }
  .review-mobile-tabs { display: grid; grid-template-columns: 1fr 1fr; background: #fff; border-bottom: 1px solid #e0e7f1; padding: 4px 12px; gap: 8px; }
  .review-mobile-tabs button { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 39px; border: 0; background: #fff; color: #7286a2; font: 500 12px "Segoe UI", Arial, sans-serif; border-radius: 7px; }
  .review-mobile-tabs .active { background: #eaf2ff; color: var(--blue-dark); }
  .review-mobile-tabs .ui-icon { width: 16px; height: 16px; }
  .review-mobile-tabs b { font-size: 10px; font-weight: 500; background: #edf2f8; padding: 2px 6px; border-radius: 5px; }
  .review-main { display: grid; grid-template-columns: minmax(0,1fr); grid-template-rows: minmax(0,1fr); padding: 8px; gap: 0; overflow: hidden; }
  .review-main > .document-pane, .review-main > .findings-pane { grid-area: 1 / 1; width: 100%; min-height: 0; margin: 0; }
  .review-main[data-mobile-pane="document"] > .findings-pane,
  .review-main[data-mobile-pane="findings"] > .document-pane { visibility: hidden; pointer-events: none; }
  .review-mobile-action { display: flex; flex-direction: column; gap: 5px; padding: 8px 13px max(8px, env(safe-area-inset-bottom)); border-top: 1px solid #dce5ef; background: #fff; }
  .review-mobile-action span { color: var(--muted); font-size: 10px; text-align: center; }
  .review-mobile-action .button { min-height: 43px; font-size: 12px; }
  .findings-pane > #finalizeButton { display: none; }
  body.tour-mobile-active { overflow: hidden; }
  body.tour-mobile-active .content { padding-top: var(--tour-clearance); padding-bottom: var(--tour-clearance); }
  .tour-card { max-height: max(120px, min(48dvh, calc(100dvh - 185px))); }
  .document-tools { padding: 0 7px; gap: 1px; min-height: 44px; }
  .document-tools .tool-tab { min-height: 44px; padding-inline: 8px; font-size: 10px; }
  .document-tools .icon-button { width: 28px; height: 30px; }
  .text-preview { padding: 13px 8px; }
  .text-page { padding: 35px 19px; min-height: 480px; font-size: 12px; }
  .docx-page { --doc-left: 22px !important; --doc-right: 22px !important; }
  .findings-head { padding: 14px; }
  .finding-actions { padding: 9px 13px; }
  .finding-card { padding: 13px; }
  .finding-copy strong { font-size: 13px; }
  .finding-copy small { font-size: 10px; }
  .findings-list { flex-basis: 160px; }
  .findings-pane > .button { min-height: 46px; margin-inline: 13px; font-size: 12px; }
  .manual-finding { padding: 13px; }
  .manual-finding input { min-height: 42px; font-size: 16px; }
  .finding-actions select { min-height: 36px; }
  .review-warning { font-size: 10px; margin-inline: 13px; }
  .replacement-row { grid-template-columns: minmax(0,1fr); gap: 7px; padding: 9px 0; }
  .replacement-row i { display: none; }
  .replacement-row input { font-size: 16px; }
  .inspection-score strong { font-size: 29px; }
  .mask-guide-dialog { padding: 22px 17px; max-width: calc(100vw - 24px); }
  .mask-guide-list { grid-template-columns: 1fr; }
  .mask-guide-head h2 { font-size: 22px; }
  .mask-guide-list article code { overflow-wrap: anywhere; }
  .toast-stack { left: 13px; right: 13px; bottom: 13px; width: auto; }
  .toast { max-width: 100%; }
}
@media (max-width: 360px) {
  .topbar { padding-inline: 12px; gap: 7px; }
  .topbar h1 { max-width: 108px; font-size: 13px; }
  .credit-pill > span { display: none; }
  .content { padding-inline: 14px; }
  .hero-copy h2, .section-hero h2 { font-size: 25px; }
  .upload-card { padding: 13px; }
  .dropzone strong { font-size: 13px; }
  .disclosure-action { font-size: 0; }
  .settings-disclosure summary small { max-width: 168px; }
  .package-card { padding-inline: 11px; }
  .package-amount strong { font-size: 23px; }
  .auth-panel { padding-inline: 20px; }
  .review-brand { display: none; }
  .review-file { border: 0; padding-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media (max-width: 600px) {
  .admin-create-user { grid-template-columns: 1fr; padding: 15px; }
  .admin-create-user input[type="email"], .admin-create-user input[type="password"] { font-size: 16px; }
}
