:root {
    --bg: #eeece7;
    --surface: #ffffff;
    --border: #d0d5dd;
    --text: #212121;
    --muted: #8792a4;
    --accent: #c29d57;
    --accent-hover: #ffca60;
    --ok: #4fd47d;
    --warn: #c29d57;
    --err: #ff0000;
    --radius: 10px;
    --radius-btn: 12px;
    --surface-muted: #f5f5f5;
    --btn-hover-bg: #ececec;
    --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    /* CaravanTypography (web): bodyLarge, titleLarge, labelMedium */
    --fs-body: 1rem;
    --lh-body: 1.5;
    --fs-title-lg: 1.125rem;
    --lh-title-lg: 1.3333333;
    --fs-label: 0.75rem;
    --lh-label: 1.3333333;
    --fs-table: 0.875rem;
    --lh-table: 1.4285714;
}

[data-theme="dark"] {
    --bg: #0f1419;
    --surface: #1a2330;
    --surface-muted: #222a36;
    --border: #334155;
    --text: #e8eef7;
    --muted: #8b9bb4;
    --accent: #c29d57;
    --accent-hover: #ffca60;
    --ok: #4fd47d;
    --warn: #ffca60;
    --err: #ff6b6b;
    --btn-hover-bg: #2f3a4d;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font);
    font-size: var(--fs-body);
    line-height: var(--lh-body);
    font-weight: 400;
    background: linear-gradient(180deg, var(--surface-muted) 0%, var(--bg) 65%);
    color: var(--text);
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.wrap {
    max-width: min(96vw, 1680px);
    margin: 0 auto;
    padding: 1.25rem 1rem 2.5rem;
}

/* Верификация: без ограничения по ширине — максимум места для превью по горизонтали */
.wrap.wrap--full-width {
    max-width: none;
    width: 100%;
    padding-left: clamp(0.65rem, 1.5vw, 1.25rem);
    padding-right: clamp(0.65rem, 1.5vw, 1.25rem);
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 0 1.25rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.5rem;
}

.topbar--auth {
    margin-bottom: 1rem;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.brand-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    min-width: 0;
    flex-shrink: 1;
}

.brand-link:hover {
    text-decoration: none;
    opacity: 0.92;
}

.brand-logos {
    display: block;
    line-height: 0;
}

.brand-logo {
    height: 40px;
    width: auto;
    max-width: min(52vw, 280px);
    object-fit: contain;
    display: block;
    background: transparent;
}

.brand-logo--dark {
    display: none;
}

[data-theme="dark"] .brand-logo--light {
    display: none;
}

[data-theme="dark"] .brand-logo--dark {
    display: block;
}

.theme-toggle {
    min-width: 2.75rem;
    min-height: 2.75rem;
    padding: 0.35rem;
    font-size: 1.25rem;
    line-height: 1;
}

.theme-toggle__icon {
    display: inline-block;
}

.sync-badge {
    font-weight: 700;
}

.sync-badge--yes {
    color: var(--ok);
}

.sync-badge--no {
    color: var(--muted);
}

[data-theme="dark"] .sync-badge--no {
    color: var(--text);
}

.nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    align-items: center;
}

.nav a {
    font-weight: 500;
    font-size: 0.875rem;
    line-height: 1.4285714;
}

.nav form.nav-ai-form {
    display: inline-flex;
    margin: 0;
    align-items: center;
}

.nav .btn.nav-ai {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.85rem;
    min-height: auto;
    font-size: 0.875rem;
    line-height: 1.4285714;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.row-upload-actions {
    align-items: flex-end;
}

.home-import-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(460px, 1fr));
    gap: 1rem;
    align-items: stretch;
    margin-bottom: 1.25rem;
}

.home-import-grid > .card {
    margin-bottom: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.home-import-grid > .card form {
    margin-top: auto;
}

/* Чуть компактнее контент в блоках импорта */
.home-import-grid > .card {
    font-size: 0.95rem;
}

.home-import-grid > .card .muted,
.home-import-grid > .card ul,
.home-import-grid > .card p {
    font-size: 0.86rem;
    line-height: 1.35;
}

.home-import-grid > .card h2 {
    font-size: 1.05rem;
}

.upload-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.inline-assign-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
}

.assign-input {
    min-width: 10rem;
    max-width: 16rem;
}

/* Колонка «Треккод» в таблице изображений на главной */
.home-images-track-cell {
    vertical-align: middle;
    min-width: 10.5rem;
    max-width: 18rem;
}

.home-images-track-cell__row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
}

.home-images-track-cell__assign-form {
    flex: 1 1 auto;
    margin: 0;
    min-width: 0;
}

.home-images-track-editor {
    display: flex;
    align-items: stretch;
    min-height: 2rem;
    max-width: 100%;
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .home-images-track-editor {
    box-shadow: none;
}

.home-images-track-editor__input {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 0.35rem 0.55rem;
    border: none;
    border-radius: 0;
    background: transparent;
    color: var(--text);
    font-family: inherit;
    font-size: var(--fs-table);
    line-height: var(--lh-table);
}

.home-images-track-editor__input::placeholder {
    color: var(--muted);
}

.home-images-track-editor__input:focus {
    outline: none;
    box-shadow: inset 0 0 0 1px var(--accent);
}

.home-images-track-editor__save {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 2.15rem;
    margin: 0;
    padding: 0;
    border: none;
    border-left: 1px solid var(--border);
    border-radius: 0;
    background: var(--surface);
    color: var(--accent);
    cursor: pointer;
    line-height: 0;
    transition: background 0.12s ease, color 0.12s ease;
}

.home-images-track-editor__save:hover {
    background: var(--btn-hover-bg);
    color: var(--accent-hover);
}

.home-images-track-editor__save:focus-visible {
    outline: 2px solid rgba(194, 157, 87, 0.45);
    outline-offset: -2px;
    z-index: 1;
}

.home-images-track-cell__value {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    padding: 0.2rem 0.15rem 0.2rem 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: var(--fs-table);
    line-height: var(--lh-table);
}

.home-images-track-cell__value a {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-images-track-cell__reassign {
    margin: 0;
}

.home-images-track-cell__edit-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}

.home-images-track-cell__edit-row .home-images-track-editor {
    flex: 1 1 7rem;
    min-width: 0;
    max-width: 100%;
}

.home-images-track-cell__cancel {
    margin: 0;
    padding: 0.2rem 0.35rem;
    font-size: var(--fs-label);
    line-height: var(--lh-label);
    color: var(--muted);
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.home-images-track-cell__cancel:hover {
    color: var(--text);
}

/* Колонка «Действия» — только иконки */
.home-images-actions-cell {
    vertical-align: middle;
    min-width: 5.5rem;
    max-width: 16rem;
}

.home-images-actions-cell__toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
}

.home-images-actions-cell__delete-form {
    margin: 0;
    display: inline;
}

.home-images-actions-cell__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    margin: 0;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--muted);
    cursor: pointer;
    line-height: 0;
    transition: border-color 0.12s ease, color 0.12s ease, background 0.12s ease;
}

.home-images-actions-cell__btn:hover {
    background: var(--btn-hover-bg);
}

.home-images-actions-cell__btn:focus-visible {
    outline: 2px solid rgba(194, 157, 87, 0.45);
    outline-offset: 1px;
}

.home-images-actions-cell__btn--edit {
    color: var(--accent);
    border-color: rgba(194, 157, 87, 0.45);
}

.home-images-actions-cell__btn--edit:hover {
    color: var(--accent-hover);
    border-color: var(--accent);
}

.home-images-actions-cell__btn--edit[aria-expanded="true"] {
    background: var(--surface-muted);
    border-color: var(--accent);
}

.home-images-actions-cell__btn--delete:hover {
    color: var(--err);
    border-color: rgba(255, 0, 0, 0.28);
}

/* Увеличенная область клика для чекбоксов массового выбора изображений */
.home-img-hit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.9rem;
    height: 1.9rem;
    margin: 0;
    padding: 0;
    cursor: pointer;
    border-radius: 8px;
}

.home-img-hit:hover {
    background: var(--surface-muted);
}

.home-img-hit input[type="checkbox"] {
    width: 1.05rem;
    height: 1.05rem;
    margin: 0;
    cursor: pointer;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.35rem;
    margin-bottom: 1.25rem;
}

.card h2 {
    margin: 0 0 1rem;
    font-size: var(--fs-title-lg);
    line-height: var(--lh-title-lg);
    font-weight: 600;
    color: #202c3c;
}

[data-theme="dark"] .card h2 {
    color: var(--text);
}

.grid-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
}

.stat {
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.85rem 1rem;
}

.stat .label {
    font-size: var(--fs-label);
    line-height: var(--lh-label);
    font-weight: 500;
    color: var(--muted);
}

.stat .value {
    font-size: 1.5rem;
    line-height: 1.2;
    font-weight: 700;
}

.stat-value--complete {
    color: var(--ok);
}

.home-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.home-tabs__btn.home-tabs__btn {
    font-weight: 500;
    color: var(--muted);
    background: transparent;
    border: 1px solid transparent;
    box-shadow: none;
}

.home-tabs__btn.home-tabs__btn[aria-selected="true"] {
    color: var(--text);
    font-weight: 600;
    border-bottom: 2px solid var(--accent);
    border-radius: 0;
    margin-bottom: -1px;
}

.home-tab-panel:not(.is-active) {
    display: none;
}

.home-filter {
    margin-bottom: 1rem;
    max-width: 52rem;
}

.home-filter label {
    display: block;
    font-size: var(--fs-label);
    font-weight: 500;
    color: var(--muted);
    margin-bottom: 0.35rem;
}

.home-filter__input {
    width: 100%;
    max-width: 100%;
    padding: 0.5rem 0.65rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
}

.table-wrap--wide {
    max-width: 100%;
}

.table--compact {
    font-size: 0.85rem;
}

.table--compact th,
.table--compact td {
    padding: 0.35rem 0.5rem;
    vertical-align: middle;
}

.table-cell--clip {
    max-width: 10rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.table-cell--mono {
    font-family: ui-monospace, monospace;
    font-size: 0.8rem;
}

th.table-cell--num,
td.table-cell--num {
    width: 2.5rem;
    min-width: 2.25rem;
    max-width: 3rem;
    text-align: center;
    font-variant-numeric: tabular-nums;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
}

.table-sortable th.table-sortable-th {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 1.15rem;
}

.table-sortable th.table-sortable-th:hover {
    background: var(--surface-muted);
}

.table-sortable th.table-sortable-th:focus-visible {
    outline: 2px solid rgba(194, 157, 87, 0.45);
    outline-offset: -2px;
}

.table-sort-indicator {
    position: absolute;
    right: 0.15rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.55rem;
    line-height: 1;
    opacity: 0.4;
    pointer-events: none;
}

.table-sort-indicator::before {
    content: '·';
}

.table-sortable-th.is-sorted-asc .table-sort-indicator::before {
    content: '▲';
    opacity: 0.95;
}

.table-sortable-th.is-sorted-desc .table-sort-indicator::before {
    content: '▼';
    opacity: 0.95;
}

.flash {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    border: 1px solid var(--border);
}

.flash.ok {
    border-color: rgba(79, 212, 125, 0.45);
    background: rgba(79, 212, 125, 0.12);
}

.flash.error {
    border-color: rgba(255, 0, 0, 0.35);
    background: rgba(255, 0, 0, 0.08);
}

label {
    display: block;
    font-size: var(--fs-label);
    line-height: var(--lh-label);
    font-weight: 500;
    color: var(--muted);
    margin-bottom: 0.35rem;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="datetime-local"],
input[type="file"] {
    width: 100%;
    max-width: 420px;
    padding: 0.55rem 0.65rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--surface-muted);
    color: var(--text);
    font-family: inherit;
    font-size: var(--fs-body);
    line-height: var(--lh-body);
}

input:focus {
    outline: 2px solid rgba(194, 157, 87, 0.35);
    border-color: var(--accent);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    min-height: 2.5rem;
    border-radius: var(--radius-btn);
    border: 1px solid var(--border);
    background: var(--surface-muted);
    color: var(--text);
    font-family: inherit;
    font-weight: 500;
    font-size: 0.875rem;
    line-height: 1.4285714;
    cursor: pointer;
}

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

.btn.primary {
    background: var(--accent);
    border-color: transparent;
    color: #ffffff;
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.25;
    min-height: 3.5rem;
    padding-left: 1rem;
    padding-right: 1rem;
}

.btn.primary:hover {
    background: var(--accent-hover);
    color: #202c3c;
}

.btn.ghost {
    background: transparent;
}

/* Вторичное действие: читается как кнопка, без акцента primary */
.btn.secondary {
    background: var(--surface-muted);
    border: 1px solid var(--border);
    color: var(--text);
    box-shadow: 0 1px 2px rgba(15, 20, 25, 0.08);
}

.btn.secondary:hover {
    background: var(--btn-hover-bg);
    border-color: var(--accent);
    box-shadow: 0 2px 6px rgba(15, 20, 25, 0.12);
}

[data-theme="dark"] .btn.secondary {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}

[data-theme="dark"] .btn.secondary:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
}

.verify-quick-status {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.verify-quick-status__label {
    width: 100%;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--muted);
}

.verify-quick-status__form {
    display: inline;
    margin: 0;
}

.row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    align-items: flex-end;
    margin-bottom: 1rem;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--fs-table);
    line-height: var(--lh-table);
}

th,
td {
    text-align: left;
    padding: 0.55rem 0.65rem;
    border-bottom: 1px solid var(--border);
}

th {
    color: var(--muted);
    font-weight: 500;
    font-size: 0.6875rem;
    line-height: 1.2727273;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

tr:hover td {
    background: var(--surface-muted);
}

.badge {
    display: inline-block;
    padding: 0.15rem 0.45rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.badge.pending {
    background: rgba(240, 193, 75, 0.15);
    color: var(--warn);
}

.badge.verified {
    background: rgba(62, 207, 142, 0.15);
    color: var(--ok);
}

.badge.mismatch {
    background: rgba(255, 107, 107, 0.15);
    color: var(--err);
}

/* NO_CODE и CANNOT_VERIFY — везде красные (ошибка / проблема) */
.badge.no_code,
.badge.cannot_verify {
    background: rgba(255, 0, 0, 0.12);
    color: var(--err);
    border: 1px solid rgba(255, 0, 0, 0.28);
}

[data-theme="dark"] .badge.no_code,
[data-theme="dark"] .badge.cannot_verify {
    background: rgba(255, 107, 107, 0.16);
    border-color: rgba(255, 107, 107, 0.45);
    color: #ff8a8a;
}

.badge.verified-warn {
    background: rgba(194, 157, 87, 0.2);
    color: #202c3c;
    font-weight: 800;
    border: 1px solid rgba(220, 240, 120, 0.35);
}

.badge.verified2-once {
    background: rgba(255, 202, 96, 0.22);
    color: #202c3c;
    font-weight: 800;
}

.badge.verified2-done {
    background: rgba(62, 207, 142, 0.22);
    color: var(--ok);
    font-weight: 800;
}

.badge--status-xl {
    font-size: 1.35rem;
    padding: 0.35rem 0.65rem;
    letter-spacing: 0.04em;
}

.badge--status-en {
    text-transform: none;
    letter-spacing: 0.03em;
}

.verify-status-desc {
    margin: 0.4rem 0 0;
    font-size: 0.92rem;
    font-weight: 400;
    line-height: 1.45;
    color: var(--muted);
}

.verify-pass-hint {
    font-size: 1.05rem;
    font-weight: 600;
}

.verify-second-pass-msg {
    margin: 0 0 0.5rem;
    padding: 0.5rem 0.65rem;
    border-radius: var(--radius);
    border: 1px solid rgba(61, 139, 253, 0.35);
    background: rgba(61, 139, 253, 0.1);
    font-size: 0.95rem;
}

.verify-msg.verify-msg--verified-warn {
    margin: 0 0 0.5rem;
    padding: 0.5rem 0.65rem;
    border-radius: var(--radius);
    border: 1px solid rgba(200, 220, 100, 0.45);
    background: rgba(200, 220, 90, 0.12);
    color: #dfe8b0;
    font-size: 0.95rem;
}

.verify-layout {
    display: grid;
    gap: 1rem;
}

.verify-layout.card {
    padding: 1rem 1.1rem;
}

/* Правая колонка — только форма/AI; максимум места под превью */
@media (min-width: 900px) {
    .verify-layout {
        grid-template-columns: minmax(0, 1fr) minmax(220px, min(32vw, 340px));
        align-items: start;
    }
}

.verify-img-stage {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 0;
}

.verify-panel {
    min-width: 0;
}

/* Компактный блок AI, чтобы не раздувать боковую колонку */
.verify-layout .ai-job-panel {
    padding: 0.65rem 0.75rem;
    margin-bottom: 0.85rem;
}

.verify-layout .ai-job-title {
    font-size: 0.95rem;
    margin-bottom: 0.35rem;
}

.verify-layout .ai-job-line {
    margin: 0.28rem 0;
    font-size: 0.88rem;
}

.verify-layout .verify-meta {
    font-size: 0.82rem;
    margin-top: 0.5rem;
    line-height: 1.35;
}

.verify-img-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    font-size: 0.9rem;
    color: var(--muted);
}

.verify-img-toolbar-queue {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin-right: 0.15rem;
}

.verify-img-toolbar input[type="range"] {
    min-width: 12rem;
    max-width: 100%;
    vertical-align: middle;
}

.verify-img-toolbar-gap {
    flex: 1 1 0.5rem;
    min-width: 0.25rem;
    max-width: 1.5rem;
}

.verify-img-toolbar-label {
    font-size: 0.88rem;
    white-space: nowrap;
}

.verify-img-toolbar-rotate {
    display: inline-flex;
    gap: 0.35rem;
    align-items: center;
}

.verify-img-toolbar-delete {
    margin: 0 0 0 auto;
    display: inline-flex;
    align-items: center;
}

.verify-rotate-btn {
    min-width: 2.35rem;
    padding: 0.35rem 0.5rem;
    font-size: 1.15rem;
    line-height: 1;
}

.verify-img-viewport {
    overflow: hidden;
    min-height: min(78vh, 920px);
    max-height: 88vh;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: var(--surface-muted);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 0.65rem;
    cursor: grab;
    touch-action: none;
    overscroll-behavior: contain;
}

.verify-img-viewport.verify-img-viewport--dragging {
    cursor: grabbing;
    user-select: none;
}

.verify-img-zoom-inner {
    flex: 0 0 auto;
    position: relative;
    transform: translate(0, 0) rotate(0deg) scale(2);
    transform-origin: center center;
    transition: transform 0.12s ease-out;
}

.verify-img-zoom-inner.verify-img-zoom-inner--dragging {
    transition: none;
}

.verify-img {
    display: block;
    max-height: min(82vh, 1100px);
    width: auto;
    max-width: 100%;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--surface-muted);
}

/* Код или статус поверх изображения */
.verify-code-overlay {
    position: absolute;
    left: 50%;
    top: 14%;
    transform: translateX(-50%);
    pointer-events: none;
    z-index: 3;
    font-weight: 700;
    letter-spacing: 0.06em;
    user-select: none;
    text-align: center;
}

.verify-code-overlay--user-code {
    font-size: clamp(1.25rem, 2.8vw, 2.3rem);
    white-space: nowrap;
    color: rgb(79, 212, 125);
    opacity: 0.75;
    text-shadow:
        0 0 8px rgba(10, 30, 10, 0.2),
        0 1px 2px rgba(0, 0, 0, 0.25);
}

.verify-code-overlay--bad-status {
    max-width: min(96%, 26rem);
    white-space: normal;
    line-height: 1.25;
    font-size: clamp(0.95rem, 2.2vw, 1.45rem);
    color: rgb(248, 113, 113);
    opacity: 0.75;
    text-shadow:
        0 0 10px rgba(40, 10, 10, 0.35),
        0 1px 2px rgba(0, 0, 0, 0.35);
}

.ai-batch-head h1 {
    margin: 0 0 0.5rem;
    font-size: 1.35rem;
}

.ai-batch-summary {
    margin-top: 0.75rem;
    font-size: 0.95rem;
}

.ai-batch-summary-done {
    color: var(--ok);
    margin: 0.35rem 0 0;
}

.ai-batch-h2 {
    margin: 0 0 0.75rem;
    font-size: 1.1rem;
}

.ai-batch-table .col-lvl {
    white-space: nowrap;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* Уровень проверки (0–100): зелёный / жёлтый / красный */
.ai-batch-lvl--high {
    color: var(--ok);
    font-weight: 600;
}

.ai-batch-lvl--mid {
    color: var(--warn);
    font-weight: 600;
}

.ai-batch-lvl--low {
    color: var(--err);
    font-weight: 600;
}

.ai-batch-lvl--na {
    color: var(--muted);
    font-weight: 400;
}

.ai-batch-lvl--fail {
    color: #ff8a8a;
    font-weight: 600;
}

.ai-batch-table .col-rec {
    max-width: 14rem;
    min-width: 7rem;
    vertical-align: middle;
}

.ai-rec-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    line-height: 1.25;
}

.ai-rec-ico {
    flex-shrink: 0;
    display: block;
}

.ai-rec-label {
    font-size: 0.92rem;
    font-weight: 600;
}

.ai-rec-wrap--yes {
    color: var(--ok);
}

.ai-rec-wrap--no {
    color: var(--err);
}

.ai-rec-wrap--pending {
    color: var(--warn);
}

.ai-rec-wrap--pending .ai-rec-label {
    font-weight: 500;
}

.ai-rec-wrap--unknown {
    color: var(--muted);
}

.ai-rec-wrap--unknown .ai-rec-label {
    font-weight: 400;
}

.ai-batch-table .col-code.ai-batch-code-val {
    color: var(--accent);
    font-weight: 600;
}

.ai-batch-table .col-code.ai-batch-code-empty {
    color: var(--muted);
}

.ai-batch-foot {
    margin-top: 0.5rem;
}

.verify-panel label {
    font-size: 1rem;
    color: var(--text);
}

.verify-input {
    font-size: 1.35rem;
    letter-spacing: 0.06em;
    max-width: none;
}

.verify-meta {
    font-size: 0.9rem;
    color: var(--muted);
    margin-top: 0.75rem;
}

.verify-keys {
    font-size: 0.85rem;
    color: var(--muted);
    margin-top: 1rem;
}

.muted {
    color: var(--muted);
}

.stack {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.thumb {
    max-width: 120px;
    max-height: 90px;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.login-box {
    max-width: 400px;
    margin: 3rem auto;
}

.login-box h1 {
    margin-top: 0;
    font-size: 1.375rem;
    line-height: 1.2727273;
    font-weight: 700;
    color: #202c3c;
}

[data-theme="dark"] .login-box h1 {
    color: var(--text);
}

.ai-job-panel {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
    margin-bottom: 1.25rem;
    background: var(--surface-muted);
}

.ai-job-title {
    margin: 0 0 0.5rem;
    font-size: 1rem;
}

.ai-job-line {
    margin: 0.35rem 0;
}

.ai-job-code-line .ai-job-code-val {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--accent);
    margin-left: 0.25rem;
}

.ai-job-lvl-line {
    font-size: 1rem;
}

.ai-job-extra {
    margin-top: 0.65rem;
    padding-top: 0.65rem;
    border-top: 1px solid var(--border);
    font-size: 0.88rem;
}

.ai-job-extra-title {
    font-weight: 600;
    margin-bottom: 0.35rem;
    font-size: 0.9rem;
    color: var(--text);
}

.ai-job-extra-list {
    margin: 0;
    padding-left: 1.1rem;
    line-height: 1.45;
}

.ai-job-extra-list li {
    margin: 0.18rem 0;
}

.verify-layout .ai-job-extra {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
}

.verify-lvl-pct {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    margin-left: 0.25rem;
}

.verify-lvl-unit {
    font-weight: 600;
    margin-left: 1px;
}

.verify-lvl--high {
    color: var(--ok);
}

.verify-lvl--mid {
    color: var(--warn);
}

.verify-lvl--low {
    color: var(--err);
}

.verify-lvl--na {
    color: var(--muted);
    font-weight: 500;
}

.verify-lvl--fail {
    color: #ff0000;
    font-weight: 700;
}

.verify-form--locked {
    opacity: 0.65;
}

.verify-lock-msg {
    color: var(--warn);
    font-weight: 600;
    margin: 0 0 0.75rem;
}
