/* =============================================
   ╔═══════════════════════════════════════════╗
   ║  YOKI — Стили приложения                  ║
   ║  Автор: chudo_boy · © 2026                ║
   ║  Контакт: chudo.boy654@gmail.com          ║
   ║  Все права защищены.                      ║
   ╚═══════════════════════════════════════════╝
   Структура: переменные → сброс → компоненты
   ============================================= */

/* ===== Переменные цветов и размеров ===== */
:root {
	--bg: #f2f2f2;
	--surface: #ffffff;
	--border: #e0e0e0;
	--border-focus: #000000;

	--text-primary: #0a0a0a;
	--text-secondary: #555555;
	--text-muted: #999999;

	--accent: #0a0a0a; /* чёрный — главный цвет */
	--accent-hover: #333333;
	--accent-light: #f0f0f0;

	--good: #1a7a4a;
	--good-bg: #e6f4ed;
	--warn: #7a5a00;
	--warn-bg: #f7f0d8;
	--bad: #b00020;
	--bad-bg: #fce8ec;

	--radius: 12px;
	--radius-sm: 8px;
	--shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
	--shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* ===== SVG-иконки (маска → наследуют цвет текста) ===== */
.ic {
	display: inline-block;
	width: 15px;
	height: 15px;
	background-color: currentColor;
	-webkit-mask: var(--ic) center / contain no-repeat;
	mask: var(--ic) center / contain no-repeat;
	vertical-align: middle;
	flex-shrink: 0;
}

.ic-activation {
	--ic: url("активация.svg");
}
.ic-battery {
	--ic: url("акб.svg");
}
.ic-cellular {
	--ic: url("сотовый-модуль.svg");
}
.ic-screen {
	--ic: url("экран.svg");
}
.ic-icloud {
	--ic: url("icloud.svg");
}
.ic-simlock {
	--ic: url("sim-lock.svg");
}
.ic-color {
	--ic: url("color.svg");
}
.ic-done {
	--ic: url("done.svg");
}
.ic-warning {
	--ic: url("warning.svg");
}
.ic-key {
	--ic: url("key.svg");
}
.ic-arrow {
	--ic: url("arrow.svg");
}
.ic-arrow-clock {
	--ic: url("arrow-clock.svg");
}
.ic-price {
	--ic: url("цена.svg");
}
.ic-camera {
	--ic: url("camera.svg");
}
.ic-attention {
	--ic: url("внимание.svg");
}
.ic-market {
	--ic: url("рынок.svg");
}
.ic-wifi {
	--ic: url("wifi.svg");
}
.ic-bluetooth {
	--ic: url("bluetooth.svg");
}

.ic.spin {
	animation: spin 0.9s linear infinite;
}

/* ===== Сброс и база ===== */
*,
*::before,
*::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

body {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	background: var(--bg);
	color: var(--text-primary);
	font-size: 14px;
	line-height: 1.5;
	min-height: 100vh;
}

/* ===== Шапка ===== */
.header {
	background: #000000;
	border-bottom: 1px solid #000;
	padding: 0 24px;
	height: 60px;
	display: flex;
	align-items: center;
	gap: 32px;
	position: sticky;
	top: 0;
	z-index: 100;
}

.logo {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 46px;
	height: 46px;
	background: #fff;
	border-radius: 11px;
}

.logo svg {
	width: 36px;
	height: 36px;
	display: block;
	overflow: visible;
}

/* Сборка логотипа по частям при загрузке (каждая группа «выскакивает») */
.logo svg > g {
	transform-box: fill-box;
	transform-origin: center;
	opacity: 0;
	animation: logoPart 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.logo svg > g:nth-of-type(1) {
	animation-delay: 0.04s;
}
.logo svg > g:nth-of-type(2) {
	animation-delay: 0.1s;
}
.logo svg > g:nth-of-type(3) {
	animation-delay: 0.16s;
}
.logo svg > g:nth-of-type(4) {
	animation-delay: 0.22s;
}
.logo svg > g:nth-of-type(5) {
	animation-delay: 0.28s;
}
.logo svg > g:nth-of-type(6) {
	animation-delay: 0.34s;
}
.logo svg > g:nth-of-type(7) {
	animation-delay: 0.4s;
}
.logo svg > g:nth-of-type(8) {
	animation-delay: 0.46s;
}
.logo svg > g:nth-of-type(9) {
	animation-delay: 0.52s;
}

@keyframes logoPart {
	from {
		opacity: 0;
		transform: scale(0.4) translateY(4px);
	}
	to {
		opacity: 1;
		transform: scale(1) translateY(0);
	}
}

.nav {
	display: flex;
	gap: 4px;
}

.nav-btn {
	background: none;
	border: none;
	padding: 6px 14px;
	border-radius: var(--radius-sm);
	font-size: 14px;
	font-weight: 500;
	color: rgba(255, 255, 255, 0.55);
	cursor: pointer;
	transition: all 0.15s;
}

.nav-btn:hover {
	background: rgba(255, 255, 255, 0.1);
	color: rgba(255, 255, 255, 0.9);
}

.nav-btn.active {
	background: #ffffff;
	color: #000000;
}

/* ===== Страницы ===== */
.page {
	padding: 32px 24px;
	max-width: 1100px;
	margin: 0 auto;
}

.page.hidden {
	display: none;
}

.page-title {
	margin-bottom: 24px;
}

.page-title h1 {
	font-size: 24px;
	font-weight: 700;
	color: var(--text-primary);
}

.subtitle {
	color: var(--text-secondary);
	margin-top: 4px;
}

/* ===== Лэйаут ===== */
.layout {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
	align-items: start;
}

@media (max-width: 860px) {
	.layout {
		grid-template-columns: 1fr;
	}
}

.right-col {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

/* ===== Карточка ===== */
.card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 24px;
	box-shadow: var(--shadow);
}

/* ===== Формы ===== */
.form-group {
	margin-bottom: 20px;
}

.form-group:last-child {
	margin-bottom: 0;
}

.form-label {
	display: block;
	font-weight: 600;
	font-size: 13px;
	color: var(--text-secondary);
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-bottom: 8px;
}

.input {
	width: 100%;
	padding: 10px 14px;
	border: 1.5px solid var(--border);
	border-radius: var(--radius-sm);
	font-size: 14px;
	color: var(--text-primary);
	background: var(--surface);
	outline: none;
	transition: border-color 0.15s;
}

.input:focus {
	border-color: var(--border-focus);
}

.input::placeholder {
	color: var(--text-muted);
}

.select {
	width: 100%;
	padding: 10px 14px;
	border: 1.5px solid var(--border);
	border-radius: var(--radius-sm);
	font-size: 14px;
	color: var(--text-primary);
	background: var(--surface);
	outline: none;
	cursor: pointer;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	transition: border-color 0.15s;
}

.select:focus {
	border-color: var(--border-focus);
}

.input-hint {
	font-size: 12px;
	color: var(--text-muted);
	margin-top: 6px;
}

/* ===== Чипсы (выбор одного из) ===== */
.chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.chip {
	padding: 7px 16px;
	border: 1.5px solid var(--border);
	border-radius: 99px;
	background: var(--surface);
	font-size: 13px;
	font-weight: 500;
	color: var(--text-secondary);
	cursor: pointer;
	transition: all 0.15s;
}

.chip:hover {
	border-color: #000000;
	color: #000000;
}

.chip.active {
	background: #000000;
	border-color: #000000;
	color: white;
}

/* ===== Чекбоксы ===== */
.checks-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.check-item {
	display: flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	padding: 10px 12px;
	border-radius: var(--radius-sm);
	border: 1.5px solid var(--border);
	transition: all 0.15s;
}

.check-item:hover {
	border-color: #000000;
	background: var(--accent-light);
}

/* Прячем стандартный чекбокс */
.check-item input[type="checkbox"] {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

/* Кастомный квадратик */
.check-box {
	width: 18px;
	height: 18px;
	border: 2px solid var(--border);
	border-radius: 5px;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.15s;
	background: var(--surface);
}

.check-item input:checked ~ .check-box {
	background: #000000;
	border-color: #000000;
}

.check-item input:checked ~ .check-box::after {
	content: "✓";
	color: white;
	font-size: 11px;
	font-weight: 700;
}

.check-label {
	flex: 1;
	font-size: 14px;
}

.check-badge {
	font-size: 12px;
	font-weight: 600;
	padding: 2px 8px;
	border-radius: 99px;
}

.check-badge.good {
	background: var(--good-bg);
	color: var(--good);
}
.check-badge.warn {
	background: var(--warn-bg);
	color: var(--warn);
}
.check-badge.bad {
	background: var(--bad-bg);
	color: var(--bad);
}

/* ===== Загрузка фото ===== */
.photo-card {
}

.upload-zone {
	border: 2px dashed var(--border);
	border-radius: var(--radius);
	padding: 32px 16px;
	text-align: center;
	cursor: pointer;
	transition: all 0.15s;
	background: var(--bg);
}

.upload-zone:hover,
.upload-zone.dragover {
	border-color: #000000;
	background: var(--accent-light);
}

.upload-icon {
	font-size: 32px;
	margin-bottom: 8px;
}

.upload-text {
	font-weight: 600;
	color: var(--text-primary);
	margin-bottom: 4px;
}

.upload-sub {
	color: #000000;
	font-weight: 500;
	margin-bottom: 8px;
}

.upload-hint {
	font-size: 12px;
	color: var(--text-muted);
}

/* Сетка превью фото */
.photos-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 8px;
	margin-top: 16px;
}

.photo-thumb {
	position: relative;
	aspect-ratio: 1;
	border-radius: var(--radius-sm);
	overflow: hidden;
	border: 1px solid var(--border);
}

.photo-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.photo-remove {
	position: absolute;
	top: 4px;
	right: 4px;
	background: rgba(0, 0, 0, 0.6);
	color: white;
	border: none;
	border-radius: 50%;
	width: 20px;
	height: 20px;
	font-size: 12px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
}

/* ===== Кнопка Оценить ===== */
.evaluate-btn {
	width: 100%;
	padding: 14px;
	background: #000000;
	color: white;
	border: none;
	border-radius: var(--radius);
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	transition: all 0.15s;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
	letter-spacing: 0.01em;
}

.evaluate-btn:hover {
	background: #222222;
	transform: translateY(-1px);
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.evaluate-btn:active {
	transform: translateY(0);
}

.evaluate-btn.loading {
	opacity: 0.7;
	cursor: not-allowed;
}

.btn-icon {
	font-size: 18px;
}

/* ===== Карточка результата ===== */
.result-card {
	border: 2px solid #000000;
}

.result-card.hidden {
	display: none;
}

.result-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	margin-bottom: 20px;
	padding-bottom: 20px;
	border-bottom: 1px solid var(--border);
}

.result-label {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: var(--text-secondary);
	margin-bottom: 6px;
}

.result-condition {
	font-size: 48px;
	font-weight: 800;
	color: #000000;
	line-height: 1;
}

.result-price-block {
	text-align: right;
}

.result-price {
	font-size: 28px;
	font-weight: 800;
	color: var(--text-primary);
}

/* Разбивка цены */
.result-breakdown {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-bottom: 16px;
}

.breakdown-row {
	display: flex;
	justify-content: space-between;
	font-size: 13px;
	color: var(--text-secondary);
}

.breakdown-row.total {
	font-weight: 700;
	font-size: 15px;
	color: var(--text-primary);
	padding-top: 8px;
	border-top: 1px solid var(--border);
}

.negative {
	color: var(--bad);
}

/* Комментарий ИИ */
.result-comment {
	background: var(--bg);
	border-radius: var(--radius-sm);
	border-left: 3px solid #000;
	padding: 12px;
	font-size: 13px;
	color: var(--text-secondary);
	margin-bottom: 16px;
	line-height: 1.6;
}

.result-comment:empty {
	display: none;
}

/* Кнопки действий */
.result-actions {
	display: flex;
	gap: 8px;
}

.action-btn {
	flex: 1;
	padding: 10px;
	border-radius: var(--radius-sm);
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	border: none;
	transition: all 0.15s;
}

.action-btn.primary {
	background: #000000;
	color: white;
}

.action-btn.primary:hover {
	background: #333333;
}

.action-btn.secondary {
	background: var(--bg);
	color: var(--text-secondary);
	border: 1.5px solid var(--border);
}

.action-btn.secondary:hover {
	border-color: #000000;
	color: #000000;
}

/* ===== Пустые состояния ===== */
.empty-state {
	text-align: center;
	padding: 48px 24px;
	color: var(--text-secondary);
}

.empty-icon {
	font-size: 40px;
	margin-bottom: 12px;
}

.empty-sub {
	font-size: 13px;
	color: var(--text-muted);
	margin-top: 4px;
}

.empty-sub code {
	background: var(--bg);
	padding: 2px 6px;
	border-radius: 4px;
	font-family: "Menlo", monospace;
	font-size: 12px;
	color: var(--accent);
}

/* ===== Источник цены (бейдж) ===== */
.price-source {
	display: inline-block;
	font-size: 11px;
	font-weight: 600;
	padding: 4px 10px;
	border-radius: 99px;
	margin-bottom: 12px;
}

.price-source.avito {
	background: #000;
	color: #fff;
}

.price-source.fallback {
	background: var(--bg);
	color: var(--text-secondary);
	border: 1px solid var(--border);
}

/* ===== Диапазон Авито ===== */
.avito-range {
	font-size: 12px;
	color: var(--text-secondary);
	background: var(--bg);
	padding: 8px 12px;
	border-radius: var(--radius-sm);
	margin-bottom: 12px;
}

/* ===== Таблица цен ===== */
.table-meta {
	display: flex;
	gap: 10px;
	align-items: stretch;
	margin-bottom: 16px;
	flex-wrap: wrap;
}

/* Плашка-«квадрат»: и для отображения времени, и для кнопки обновления */
.meta-chip {
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 8px 14px;
	border: 1px solid var(--border);
	border-radius: 10px;
	background: var(--bg);
	font-size: 12px;
	color: var(--text-secondary);
	line-height: 1.3;
	min-height: 44px;
}
.meta-chip-label {
	font-size: 10px;
	letter-spacing: 0.6px;
	text-transform: uppercase;
	color: var(--text-muted);
}
.meta-chip-value {
	font-size: 13px;
	font-weight: 600;
	color: var(--text-primary);
}
.meta-chip-btn {
	flex-direction: row;
	gap: 8px;
	align-items: center;
	font-size: 13px;
	font-weight: 500;
	color: var(--text-primary);
	cursor: pointer;
	background: var(--bg-card);
	transition: all 0.15s;
}
.meta-chip-btn:hover {
	background: var(--bg);
	border-color: var(--text-muted);
}
.meta-chip-btn .ic {
	width: 14px;
	height: 14px;
}

.link-btn {
	background: none;
	border: none;
	color: #000000;
	cursor: pointer;
	font-size: 13px;
	font-weight: 500;
	padding: 0;
	text-decoration: underline;
}

.link-btn:hover {
	text-decoration: underline;
}

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

.prices-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}

.prices-table th {
	text-align: left;
	padding: 10px 12px;
	background: var(--bg);
	color: var(--text-secondary);
	font-weight: 600;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.4px;
	border-bottom: 1px solid var(--border);
}

.prices-table td {
	padding: 10px 12px;
	border-bottom: 1px solid var(--border);
	color: var(--text-primary);
}

.prices-table tr:last-child td {
	border-bottom: none;
}
.prices-table tr:hover td {
	background: var(--bg);
}

.price-avito {
	color: var(--good);
	font-weight: 600;
}
.price-new {
	color: var(--accent);
	font-weight: 600;
}
.price-missing {
	color: var(--text-muted);
}
.price-fallback {
	color: var(--warn);
	font-weight: 500;
}
.price-range {
	color: var(--text-muted);
	font-size: 11px;
}

.progress-item-prices {
	font-size: 12px;
	color: var(--text-secondary);
	text-align: right;
}

.progress-item-prices b {
	color: var(--text-primary);
}

/* ===== Цветовые свотчи ===== */
.color-swatches {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.color-placeholder {
	font-size: 13px;
	color: var(--text-muted);
	padding: 8px 0;
}

.color-swatch {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 5px;
	background: none;
	border: none;
	cursor: pointer;
	padding: 6px 8px;
	border-radius: var(--radius-sm);
	border: 1.5px solid transparent;
	transition: all 0.15s;
	min-width: 58px;
}

.color-swatch:hover {
	border-color: var(--border);
	background: var(--bg);
}

.color-swatch.active {
	border-color: #000;
	background: var(--bg);
}

.swatch-circle {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	display: block;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
	flex-shrink: 0;
}

.swatch-name {
	font-size: 10px;
	color: var(--text-secondary);
	text-align: center;
	line-height: 1.3;
	max-width: 58px;
	word-break: break-word;
}

.color-swatch.active .swatch-name {
	color: var(--text-primary);
	font-weight: 600;
}

/* ===== Карточка парсинга ===== */
.scrape-card {
	margin-bottom: 0;
}

.scrape-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.scrape-title {
	font-weight: 600;
	font-size: 15px;
	margin-bottom: 4px;
}

.scrape-sub {
	font-size: 13px;
	color: var(--text-secondary);
}

.scrape-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 20px;
	background: #000000;
	color: white;
	border: none;
	border-radius: var(--radius-sm);
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
	flex-shrink: 0;
	transition: all 0.15s;
}

.scrape-btn:hover:not(:disabled) {
	background: #333333;
}

.scrape-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

/* ===== Прогресс парсинга ===== */
.progress-wrap {
	margin-top: 20px;
	padding-top: 20px;
	border-top: 1px solid var(--border);
}

.progress-wrap.hidden {
	display: none;
}

/* Шапка прогресса: текущий этап + счётчик */
.progress-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 10px;
}

.progress-stage {
	display: flex;
	align-items: center;
	gap: 9px;
	font-size: 13px;
	font-weight: 600;
	color: var(--text-primary);
	min-width: 0;
}

.progress-stage span:last-child {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.progress-count {
	font-size: 13px;
	font-weight: 700;
	color: var(--good);
	white-space: nowrap;
	flex-shrink: 0;
	font-variant-numeric: tabular-nums;
}

.progress-spinner {
	width: 15px;
	height: 15px;
	border: 2px solid var(--border);
	border-top-color: var(--good);
	border-radius: 50%;
	flex-shrink: 0;
	animation: spin 0.7s linear infinite;
}

.progress-spinner.done {
	animation: none;
	border: none;
}

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

.progress-bar-bg {
	position: relative;
	height: 9px;
	background: var(--bg);
	border: 1px solid var(--border);
	border-radius: 99px;
	overflow: hidden;
	margin-bottom: 16px;
}

/* Индетерминантная фаза — пока нет первых данных (запуск браузера) */
.progress-bar-bg.indeterminate::after {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	width: 35%;
	border-radius: 99px;
	background: linear-gradient(90deg, transparent, var(--good), transparent);
	animation: indet 1.3s ease-in-out infinite;
}

@keyframes indet {
	0% {
		left: -35%;
	}
	100% {
		left: 100%;
	}
}

.progress-bar-fill {
	position: relative;
	height: 100%;
	width: 0;
	background: linear-gradient(90deg, #1a7a4a, #28b673);
	border-radius: 99px;
	overflow: hidden;
	transition: width 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* Прячем заполнение в индетерминантной фазе */
.progress-bar-bg.indeterminate .progress-bar-fill {
	opacity: 0;
}

/* Бегущий блик по заполненной части — «живая» полоса */
.progress-bar-fill::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
	background-size: 45% 100%;
	background-repeat: no-repeat;
	animation: sheen 1.3s linear infinite;
}

@keyframes sheen {
	0% {
		background-position: -50% 0;
	}
	100% {
		background-position: 150% 0;
	}
}

.progress-list {
	display: flex;
	flex-direction: column;
	gap: 4px;
	max-height: 280px;
	overflow-y: auto;
}

.progress-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 6px 10px;
	border-radius: var(--radius-sm);
	font-size: 13px;
	animation: fadeIn 0.2s ease;
}

.progress-item.success {
	background: var(--good-bg);
}
.progress-item.error {
	background: var(--bad-bg);
}
.progress-item.loading {
	background: var(--bg);
}

.progress-item-name {
	color: var(--text-primary);
	font-weight: 500;
}
.progress-item-price {
	color: var(--good);
	font-weight: 600;
}
.progress-item-error {
	color: var(--bad);
	font-size: 12px;
}
.progress-item-loader {
	color: var(--text-muted);
	font-size: 12px;
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(-4px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* =============================================
   НОВЫЙ РАЗДЕЛ: Двухрежимная оценка
   ============================================= */

/* ── Переключатель режимов ──────────────────── */
.mode-switcher {
	display: flex;
	gap: 12px;
	margin-bottom: 24px;
}

.mode-btn {
	flex: 1;
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 16px 20px;
	border: 2px solid var(--border);
	border-radius: var(--radius);
	background: var(--surface);
	cursor: pointer;
	text-align: left;
	transition:
		border-color 0.15s,
		background 0.15s;
	position: relative;
}

.mode-btn:hover {
	border-color: #999;
}

.mode-btn.active {
	border-color: var(--accent);
	background: var(--accent);
	color: white;
}

.mode-icon {
	font-size: 28px;
	line-height: 1;
	flex-shrink: 0;
}

.mode-texts {
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
}

.mode-label {
	font-size: 15px;
	font-weight: 600;
	white-space: nowrap;
}

.mode-sub {
	font-size: 12px;
	color: var(--text-secondary);
}

.mode-btn.active .mode-sub {
	color: rgba(255, 255, 255, 0.65);
}

.mode-badge {
	position: absolute;
	top: 10px;
	right: 12px;
	font-size: 10px;
	font-weight: 700;
	padding: 2px 8px;
	border-radius: 20px;
	background: var(--accent-light);
	color: var(--text-muted);
	letter-spacing: 0.03em;
}

.mode-btn.active .mode-badge {
	background: rgba(255, 255, 255, 0.2);
	color: white;
}

/* ── Панели режимов ─────────────────────────── */
.mode-panel {
	display: block;
}
.mode-panel.hidden {
	display: none;
}

/* ── USB: инструкция подключения ────────────── */
.usb-guide {
	display: flex;
	flex-direction: column;
	gap: 20px;
	padding: 4px 0;
}

.usb-steps {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.usb-step {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 14px;
	color: var(--text-primary);
}

.usb-step-num {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--accent);
	color: white;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 13px;
	font-weight: 700;
	flex-shrink: 0;
}

.read-btn {
	width: 100%;
	padding: 15px;
	background: var(--accent);
	color: white;
	border: none;
	border-radius: var(--radius);
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	transition: background 0.15s;
}

.read-btn:hover:not(:disabled) {
	background: var(--accent-hover);
}

.read-btn:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

.read-btn.loading {
	animation: pulse 1.4s ease-in-out infinite;
}

.usb-hint {
	font-size: 12px;
	color: var(--text-muted);
	text-align: center;
	line-height: 1.6;
}

.usb-hint code {
	background: var(--bg);
	padding: 1px 6px;
	border-radius: 4px;
	font-family: "SF Mono", "Fira Mono", monospace;
	font-size: 11px;
}

/* ── USB: карточка устройства ────────────────── */
.device-card {
	border: 1.5px solid var(--border);
	border-radius: var(--radius);
	overflow: hidden;
	margin-bottom: 20px;
}

.device-card-header {
	padding: 14px 18px;
	background: var(--accent);
	color: white;
}

.device-model-name {
	font-size: 18px;
	font-weight: 700;
}

.device-model-sub {
	font-size: 13px;
	opacity: 0.75;
	margin-top: 3px;
}

.device-fields {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0;
	border-bottom: 1px solid var(--border);
}

.device-field {
	padding: 12px 18px;
	border-right: 1px solid var(--border);
	border-bottom: 1px solid var(--border);
}

.device-field:nth-child(even) {
	border-right: none;
}

.device-field-key {
	font-size: 10px;
	color: var(--text-muted);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	margin-bottom: 3px;
}

.device-field-val {
	font-size: 13px;
	font-weight: 600;
	color: var(--text-primary);
}

.device-status-rows {
	padding: 12px 18px;
	display: flex;
	flex-direction: column;
	gap: 9px;
}

.device-status-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 13px;
}

.device-status-label {
	color: var(--text-secondary);
}

.status-ok {
	color: var(--good);
	font-weight: 600;
}
.status-warn {
	color: var(--warn);
	font-weight: 600;
}
.status-bad {
	color: var(--bad);
	font-weight: 600;
}

/* ── Section label ───────────────────────────── */
.section-label {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--text-muted);
	margin-bottom: 16px;
}

.usb-manual-checks {
	padding-top: 4px;
}

/* ── Grade selector (A/B/C/D) ─────────────────── */
.grade-selector {
	display: flex;
	gap: 8px;
	margin-bottom: 4px;
}

.grade-btn {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 10px 6px;
	border: 2px solid var(--border);
	border-radius: var(--radius-sm);
	background: var(--surface);
	cursor: pointer;
	transition: all 0.15s;
	gap: 4px;
}

.grade-btn:hover {
	border-color: #999;
}

.grade-btn.active {
	border-color: var(--accent);
	background: var(--accent);
	color: white;
}

.grade-letter {
	font-size: 22px;
	font-weight: 800;
	line-height: 1;
}

.grade-desc {
	font-size: 10px;
	color: var(--text-muted);
	white-space: nowrap;
}

.grade-btn.active .grade-desc {
	color: rgba(255, 255, 255, 0.7);
}

.grade-ai-hint {
	font-size: 11px;
	color: var(--text-muted);
	margin-top: 6px;
	display: flex;
	align-items: center;
	gap: 4px;
}

/* ── Battery row ──────────────────────────────── */
.battery-row {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.battery-input {
	width: 76px !important;
	text-align: center;
}

.battery-unit {
	font-size: 14px;
	color: var(--text-secondary);
	font-weight: 600;
}

.battery-check-label {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	cursor: pointer;
	color: var(--text-primary);
	margin-left: 6px;
	user-select: none;
}

.battery-check-label input[type="checkbox"] {
	display: none;
}

/* ── Кнопка анализа ИИ ────────────────────────── */
.analyze-btn {
	width: 100%;
	margin-top: 12px;
	padding: 12px;
	border: 2px dashed var(--border);
	background: transparent;
	border-radius: var(--radius);
	font-size: 14px;
	font-weight: 600;
	color: var(--text-secondary);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	transition:
		border-color 0.3s ease,
		border-style 0s linear 0.3s,
		color 0.3s ease,
		background 0.3s ease;
}

.analyze-btn:hover {
	border-color: var(--accent);
	color: var(--accent);
	background: var(--accent-light);
	border-style: solid;
}

/* Дино-логотип вместо робота на кнопке */
.dino-ic {
	width: 20px;
	height: 20px;
	display: block;
	flex-shrink: 0;
}

/* Загрузка анализа: кнопка остаётся «обычной» — только зелёная заливка
   идёт слева направо (как у IMEI и анализа цены Авито). Текст/спиннер — зелёные. */
.analyze-btn.loading {
	border-style: solid;
	border-color: var(--border);
	background: transparent;
	color: var(--good);
	cursor: progress;
	position: relative;
	overflow: hidden;
}

/* Зелёная заливка, ширина которой управляется из JS через --ai-fill, —
   идёт в тандем с процентами и не уходит вперёд. */
.analyze-btn.loading::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: var(--ai-fill, 0%);
	background: rgba(34, 160, 100, 0.22); /* приятный прозрачный зелёный */
	border-right: 2px solid rgba(26, 122, 74, 0.55);
	transition: width 0.18s linear;
	z-index: 0;
}

/* Контент кнопки во время загрузки — поверх зелёной заливки */
.analyze-btn .pc-txt {
	position: relative;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
}

.analyze-btn .ai-pct {
	font-size: 16px;
	font-weight: 700;
	color: var(--good);
	font-variant-numeric: tabular-nums;
	min-width: 48px;
	text-align: left;
}

/* Крутящийся спиннер (arrow-clock SVG) — единственный индикатор при загрузке */
.spin-loader {
	width: 22px;
	height: 22px;
	animation: spin 0.9s linear infinite;
}

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

/* Маленький логотип Авито (для бейджа и строки разбивки в результате) */
.avito-logo-sm {
	height: 13px;
	width: auto;
	display: inline-block;
	vertical-align: -2px;
}

@keyframes pulse {
	0%,
	100% {
		opacity: 1;
	}
	50% {
		opacity: 0.55;
	}
}

/* ── AI Result Card ──────────────────────────── */
.ai-result-card {
	border-left: 4px solid var(--accent);
}

.ai-result-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 14px;
}

.ai-badge {
	font-size: 12px;
	font-weight: 600;
	color: var(--text-muted);
	letter-spacing: 0.02em;
}

.ai-result-grade {
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: var(--accent);
	color: white;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 20px;
	font-weight: 800;
}

.ai-rows {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.ai-row {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-size: 13px;
	line-height: 1.4;
}

.ai-row-icon {
	font-size: 14px;
	width: 20px;
	flex-shrink: 0;
}
.ai-row-text {
	color: var(--text-secondary);
}

.ai-comment {
	margin-top: 12px;
	padding: 10px 12px;
	background: var(--accent-light);
	border-radius: var(--radius-sm);
	font-size: 13px;
	color: var(--text-primary);
	line-height: 1.55;
}

/* ── photo-card hidden in USB mode ───────────── */
.photo-card.hidden {
	display: none;
}
.ai-result-card.hidden {
	display: none;
}

/* ── Setup banner ────────────────────────────── */
.setup-banner {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 14px;
	border-radius: var(--radius-sm);
	background: var(--accent-light);
	font-size: 13px;
	color: var(--text-secondary);
	margin-bottom: 20px;
	transition: background 0.3s;
}

.setup-banner.ready {
	background: var(--good-bg);
	color: var(--good);
}

.setup-banner.error {
	background: var(--bad-bg);
	color: var(--bad);
}

.setup-banner.installing {
	background: #fffbe6;
	color: #7a5a00;
}

.setup-banner-icon {
	font-size: 16px;
	flex-shrink: 0;
}

.setup-banner.hidden {
	display: none;
}

/* ── AI Defects list ─────────────────────────── */
.ai-defects {
	margin-top: 12px;
	padding: 10px 12px;
	background: var(--bad-bg);
	border-radius: var(--radius-sm);
	border-left: 3px solid var(--bad);
}

.ai-defects-title {
	font-size: 11px;
	font-weight: 700;
	color: var(--bad);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin-bottom: 6px;
}

.ai-defect-item {
	font-size: 13px;
	color: var(--text-primary);
	line-height: 1.6;
}

.ai-tip {
	margin-top: 10px;
	padding: 8px 12px;
	background: #fffbe6;
	border-radius: var(--radius-sm);
	font-size: 12px;
	color: #7a5a00;
	line-height: 1.5;
}

/* ── Photo upload guide ───────────────────────── */
.photo-guide {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 6px;
	margin-top: 12px;
}

.photo-guide-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 3px;
	padding: 8px 4px;
	border: 1.5px dashed var(--border);
	border-radius: var(--radius-sm);
	font-size: 11px;
	color: var(--text-muted);
	text-align: center;
	line-height: 1.3;
}

.photo-guide-item.done {
	border-color: var(--good);
	background: var(--good-bg);
	color: var(--good);
}

.photo-guide-emoji {
	font-size: 18px;
}

/* =============================================
   COMPACT TWO-COLUMN EVALUATE LAYOUT
   ============================================= */

/* ── Страница оценки: полный экран ─────────── */
#page-evaluate {
	padding: 0;
	max-width: none;
	margin: 0;
	height: calc(100vh - 60px);
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

/* ── Тонкая шапка страницы ─────────────────── */
.eval-topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 8px 20px;
	border-bottom: 1px solid var(--border);
	background: var(--surface);
	flex-shrink: 0;
	min-height: 40px;
}

.eval-page-title {
	font-size: 14px;
	font-weight: 600;
	color: var(--text-primary);
}

/* Setup banner встроенный в топбар */
.eval-topbar .setup-banner {
	margin-bottom: 0;
	padding: 5px 12px;
	font-size: 12px;
	border-radius: 20px;
}

/* ── Сетка: два столбца ─────────────────────── */
.eval-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
	flex: 1;
	padding: 14px 20px;
	min-height: 0;
	overflow: hidden;
}

.eval-col {
	display: flex;
	flex-direction: column;
	min-height: 0;
	overflow: hidden;
}

.eval-card {
	flex: 1;
	padding: 14px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	overflow-y: auto;
	overflow-x: hidden;
	min-height: 0;
	scrollbar-width: thin;
	scrollbar-color: var(--border) transparent;
}

/* ── Шапка секции в левой карточке ─────────── */
.scan-header-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-shrink: 0;
}

.eval-section-title {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.01em;
	color: var(--text-primary);
	background: var(--accent-light);
	padding: 8px 14px;
	border-radius: var(--radius-sm);
}

.eval-section-title .ic {
	width: 17px;
	height: 17px;
}

/* ── Маленькая кнопка «Считать» ─────────────── */
.read-btn-sm {
	padding: 6px 14px;
	background: var(--accent);
	color: white;
	border: none;
	border-radius: var(--radius-sm);
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s;
	white-space: nowrap;
	flex-shrink: 0;
}

.read-btn-sm:hover:not(:disabled) {
	background: var(--accent-hover);
}

.read-btn-sm:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

/* ── Инструкция-подсказка ────────────────────── */
.scan-idle-hint {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 12px;
	background: var(--bg);
	border-radius: var(--radius-sm);
	flex-shrink: 0;
}

.idle-step {
	display: flex;
	align-items: center;
	gap: 5px;
	font-size: 11px;
	color: var(--text-secondary);
}

.idle-num {
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: var(--accent);
	color: white;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 10px;
	font-weight: 700;
	flex-shrink: 0;
}

.idle-arrow {
	color: var(--text-muted);
	font-size: 12px;
}

/* ── Компактная карточка устройства ─────────── */
.device-compact {
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex-shrink: 0;
}

.device-compact.hidden {
	display: none;
}

.dc-head {
	display: flex;
	align-items: center;
	gap: 14px;
	padding-bottom: 10px;
	border-bottom: 1px solid var(--border);
}

.dc-head-info {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 7px;
}

.dc-model {
	font-size: 16px;
	font-weight: 700;
	color: var(--text-primary);
	line-height: 1.2;
	letter-spacing: -0.01em;
}

.dc-sub {
	font-size: 11px;
	color: var(--text-secondary);
	margin-top: 2px;
}

.dc-color-preview {
	flex-shrink: 0;
	display: none;
	line-height: 0;
	filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.18));
}

.dc-color-preview svg {
	display: block;
}

/* ── Кнопка «Анализ» (справа в блоке) — квадратная, как «Считать» ── */
.price-calc-btn-sm {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 16px;
	background: var(--accent);
	color: #fff;
	border: none;
	border-radius: var(--radius-sm);
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s;
	white-space: nowrap;
}

.price-calc-btn-sm:hover:not(:disabled) {
	background: var(--accent-hover);
}
.price-calc-btn-sm:disabled {
	opacity: 0.55;
	cursor: progress;
}

/* Загрузка через весь блок: зелёная заливка слева направо (от Авито до кнопки) */
.dc-market.loading::after {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 0;
	background: linear-gradient(90deg, rgba(26, 122, 74, 0.08), rgba(26, 122, 74, 0.28));
	border-right: 2px solid rgba(26, 122, 74, 0.65);
	animation: marketFill 2s cubic-bezier(0.3, 0.6, 0.3, 1) forwards;
	pointer-events: none;
	z-index: 0;
}

@keyframes marketFill {
	from {
		width: 0;
	}
	to {
		width: 100%;
	}
}

/* Плавное появление цены + иконки после анализа */
.dc-market-vals.reveal {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	animation: priceReveal 0.45s ease;
}

@keyframes priceReveal {
	from {
		opacity: 0;
		transform: translateY(5px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ── Средняя цена по модели (сразу после USB) ── */
.dc-market.hidden {
	display: none;
}

.dc-market {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 6px 10px;
	padding: 9px 12px;
	background: var(--accent-light);
	border-radius: var(--radius-sm);
	flex-shrink: 0;
	position: relative;
	overflow: hidden;
}

.dc-market > * {
	position: relative;
	z-index: 1;
}

.dc-market:empty {
	display: none;
}

.dc-market-label {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	font-size: 11px;
	font-weight: 600;
	color: var(--text-secondary);
	white-space: nowrap;
}

.avito-logo {
	height: 16px;
	width: auto;
	display: inline-block;
}

.dc-market-vals {
	font-size: 13px;
	color: var(--text-primary);
	text-align: right;
}
.dc-market-vals b {
	font-weight: 700;
}

/* ── Характеристики: 2×2 сетка в аккуратной панели ──────────────── */
.dc-specs {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 9px 14px;
	padding: 11px 12px;
	background: var(--bg);
	border-radius: var(--radius-sm);
}

.dc-spec {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}
.dc-spec .dc-val {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.dc-key {
	font-size: 10px;
	color: var(--text-muted);
	text-transform: uppercase;
	letter-spacing: 0.04em;
	font-weight: 600;
}

/* В метке «Цвет» иконка чуть меньше под мелкий текст */
.dc-color-row .dc-key {
	display: inline-flex;
	align-items: center;
	gap: 5px;
}
.dc-color-row .dc-key .ic {
	width: 13px;
	height: 13px;
}

.dc-val {
	font-size: 12px;
	font-weight: 600;
	color: var(--text-primary);
}

/* ── Статусы: 3 строки ───────────────────────── */
.dc-statuses {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.dc-status-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	font-size: 12px;
	padding: 7px 10px;
	background: var(--bg);
	border-radius: 8px;
}

.dc-status-label {
	color: var(--text-secondary);
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
}

/* Вертикальный разделитель между иконкой и текстом */
.dc-sep {
	display: inline-block;
	width: 1px;
	height: 13px;
	background: rgba(0, 0, 0, 0.18);
	flex-shrink: 0;
	vertical-align: middle;
}

/* Правая часть строки статуса — прижата вправо, иконка идёт ПОСЛЕ текста,
   поэтому все галочки выстраиваются у правого края друг под другом. */
.dc-status-row:not(.dc-batt-hint) > span:last-child {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	white-space: nowrap;
}

/* Подсказка про здоровье АКБ — на всю ширину, текст переносится */
.dc-batt-hint > span {
	white-space: normal;
}

/* Значение АКБ (проценты + циклы) — одной группой справа, без разъезда */
.dc-batt-val {
	white-space: nowrap;
	display: inline-flex;
	align-items: center;
	gap: 5px;
}
.dc-batt-val > span {
	display: inline-flex;
	align-items: center;
	gap: 5px;
}

/* Ручной ввод здоровья АКБ (когда USB его не отдаёт) */
.dc-batt-manual {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 12px;
	color: var(--text-secondary);
}

.batt-health-input {
	width: 48px;
	padding: 2px 6px;
	border: 1.5px solid var(--border);
	border-radius: 6px;
	font-size: 12px;
	font-weight: 600;
	text-align: center;
	color: var(--text-primary);
	outline: none;
	-moz-appearance: textfield;
}

.batt-health-input:focus {
	border-color: var(--accent);
}
.batt-health-input::-webkit-outer-spin-button,
.batt-health-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.dc-batt-hint {
	padding: 0 8px;
}
.status-muted {
	color: var(--text-muted);
	font-size: 10px;
	line-height: 1.3;
}

/* ── Цветовая строка ────────────────────────── */
/* ── Пробив IMEI ─────────────────────────────── */
.dc-imei {
	flex-shrink: 0;
}

.imei-check-btn {
	width: 100%;
	padding: 9px;
	background: var(--surface);
	border: 1.5px dashed var(--border);
	border-radius: var(--radius-sm);
	font-size: 13px;
	font-weight: 600;
	color: var(--text-secondary);
	cursor: pointer;
	transition: all 0.15s;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
}

.imei-check-btn:hover:not(:disabled) {
	border-color: var(--accent);
	color: var(--accent);
	background: var(--accent-light);
	border-style: solid;
}

.imei-check-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

/* Загрузка: зелёная полоса заполняется за ~28с (как «устанавливается») */
.imei-check-btn.loading {
	position: relative;
	overflow: hidden;
	cursor: progress;
	opacity: 1;
	border-style: solid;
	border-color: var(--good);
	color: var(--good);
	background: var(--good-bg);
}

.imei-check-btn.loading::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 0;
	background: rgba(26, 122, 74, 0.22);
	animation: imeiFill 28s cubic-bezier(0.1, 0.6, 0.2, 1) forwards;
}

.imei-check-btn.loading::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 2px;
	background: linear-gradient(90deg, transparent, var(--good), transparent);
	background-size: 50% 100%;
	animation: imeiSweep 1.1s linear infinite;
}

.imei-loading-txt {
	position: relative;
	z-index: 1;
}

@keyframes imeiFill {
	from {
		width: 0;
	}
	to {
		width: 95%;
	}
}

@keyframes imeiSweep {
	0% {
		background-position: -50% 0;
	}
	100% {
		background-position: 150% 0;
	}
}

.imei-badge a {
	color: var(--accent);
	text-decoration: underline;
	font-weight: 600;
}

/* ── Чекбокс в настройках ────────────────────── */
.form-check {
	display: flex;
	align-items: center;
	gap: 9px;
	cursor: pointer;
	font-size: 14px;
	font-weight: 600;
	color: var(--text-primary);
	user-select: none;
}

.form-check input[type="checkbox"] {
	width: 18px;
	height: 18px;
	accent-color: var(--accent);
	cursor: pointer;
}

.imei-price {
	font-size: 11px;
	color: var(--text-muted);
	font-weight: 500;
}

.imei-result {
	margin-top: 8px;
	padding: 10px;
	border: 1px solid var(--border);
	border-left: 3px solid var(--good);
	border-radius: var(--radius-sm);
	background: var(--bg);
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.imei-result.hidden {
	display: none;
}

.imei-badge {
	font-size: 10px;
	font-weight: 700;
	color: var(--good);
	text-transform: uppercase;
	letter-spacing: 0.04em;
	margin-bottom: 2px;
}

.imei-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	font-size: 12px;
	color: var(--text-secondary);
}

.imei-row > span:first-child {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}
.imei-row b {
	color: var(--text-primary);
	font-weight: 600;
	text-align: right;
}
.imei-row small {
	color: var(--text-muted);
	font-weight: 500;
}

/* ── Подсказка про пароль ────────────────────── */
.dc-passcode-hint {
	font-size: 11px;
	line-height: 1.4;
	color: var(--warn);
	background: var(--warn-bg);
	border-radius: var(--radius-sm);
	padding: 7px 10px;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	gap: 8px;
}

.dc-passcode-hint .dc-sep {
	height: 22px;
}
.dc-passcode-hint.hidden {
	display: none;
}

/* ── Технические детали (мелкий серый список) ── */
.dc-tech {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 10px;
	padding-top: 6px;
	border-top: 1px dashed var(--border);
	flex-shrink: 0;
}

.dc-tech:empty {
	display: none;
}

.dc-tech-item {
	font-size: 10px;
	color: var(--text-muted);
	font-family: "SF Mono", "Menlo", monospace;
	white-space: nowrap;
}

.dc-color-row {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
}

.dc-color-swatches {
	display: flex;
	gap: 4px;
	flex-wrap: wrap;
	align-items: center;
}

.dc-swatch {
	width: 24px;
	height: 24px;
	border-radius: 50%;
	border: 2px solid transparent;
	cursor: pointer;
	padding: 0;
	transition:
		border-color 0.15s,
		transform 0.15s;
	display: flex;
	align-items: center;
	justify-content: center;
	background: none;
}

.dc-swatch:hover {
	transform: scale(1.15);
}
.dc-swatch.active {
	border-color: var(--accent);
	transform: scale(1.1);
}

.dc-swatch-circle {
	width: 18px;
	height: 18px;
	border-radius: 50%;
	display: block;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

/* ── Аккордеон ───────────────────────────────── */
.checks-accordion {
	flex-shrink: 0;
}

.checks-toggle {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 8px 10px;
	background: var(--bg);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	font-size: 12px;
	font-weight: 500;
	color: var(--text-secondary);
	cursor: pointer;
	transition: all 0.15s;
}

.checks-toggle:hover {
	background: var(--accent-light);
	color: var(--text-primary);
	border-color: #999;
}

.toggle-arrow {
	font-size: 10px;
	flex-shrink: 0;
	transition: transform 0.2s ease;
}
.toggle-arrow.ic {
	width: 16px;
	height: 16px;
}
.toggle-arrow.open {
	transform: rotate(90deg);
}
.checks-body {
	padding-top: 8px;
}
.checks-body.hidden {
	display: none;
}
.checks-body .check-item {
	padding: 6px 10px;
}
.checks-body .check-label {
	font-size: 12px;
}
.checks-body .check-badge {
	font-size: 11px;
	padding: 1px 6px;
}

/* ── Загрузка фото (компактная) ─────────────── */
.upload-zone-sm {
	border: 2px dashed var(--border);
	border-radius: var(--radius-sm);
	padding: 12px 14px;
	cursor: pointer;
	transition: all 0.15s;
	background: var(--bg);
	flex-shrink: 0;
	display: flex;
	align-items: center;
	gap: 12px;
}

.upload-zone-sm:hover,
.upload-zone-sm.dragover {
	border-color: var(--accent);
	background: var(--accent-light);
}

/* Заблокировано до считывания телефона по кабелю */
.upload-zone-sm.locked {
	opacity: 0.6;
	cursor: not-allowed;
	border-style: solid;
}

.upload-zone-sm.locked:hover {
	border-color: var(--border);
	background: var(--bg);
}

.upload-zone-sm .upload-icon {
	font-size: 20px;
	margin: 0;
	flex-shrink: 0;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--surface);
	border-radius: 10px;
	box-shadow: var(--shadow);
	color: var(--text-primary);
}

.upload-zone-sm .upload-icon .ic {
	width: 21px;
	height: 21px;
}

.upload-text-sm {
	font-size: 13px;
	font-weight: 600;
	color: var(--text-primary);
	line-height: 1.3;
}

.upload-hint-sm {
	font-size: 10px;
	color: var(--text-muted);
	margin-top: 2px;
}

/* ── Превью фото ─────────────────────────────── */
.eval-card .photos-grid {
	margin-top: 0;
	gap: 6px;
}
.eval-card .photos-grid:empty {
	display: none;
}

/* ── Результат ИИ: однострочный ─────────────── */
/* ── Карточка сообщения ИИ — аватарка внутри бабла ── */
.ai-msg {
	flex-shrink: 0;
}
.ai-msg.hidden {
	display: none;
}

.ai-bubble {
	background: var(--accent-light);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	padding: 12px 14px;
}

.ai-bubble-head {
	display: flex;
	align-items: center;
	gap: 10px;
	padding-bottom: 10px;
	border-bottom: 1px solid var(--border);
	margin-bottom: 10px;
}

.ai-avatar {
	width: 38px;
	height: 38px;
	border-radius: 10px;
	background: #fff;
	border: 1px solid var(--border);
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.ai-avatar img {
	width: 30px;
	height: 30px;
	display: block;
}

.ai-name-block {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.ai-name {
	font-size: 13px;
	font-weight: 700;
	color: var(--text-primary);
}

.ai-grade-label {
	font-size: 11px;
	color: var(--text-secondary);
	font-weight: 500;
}

.ai-grade-label b {
	display: inline-block;
	background: var(--accent);
	color: #fff;
	padding: 1px 9px;
	border-radius: 99px;
	font-weight: 800;
	letter-spacing: 0.04em;
	margin-left: 4px;
	vertical-align: 1px;
}

.ai-bubble-text {
	font-size: 12.5px;
	color: var(--text-primary);
	line-height: 1.5;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

/* Дефекты — чистый список без шумных заливок и палочек */
.ai-defects-section {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.ai-defects-title {
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--text-muted);
	font-weight: 700;
}
.ai-defects-title b {
	color: var(--bad);
	font-weight: 800;
}

.ai-defects-list {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.ai-defect-item {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: 12.5px;
	color: var(--text-primary);
	line-height: 1.45;
}

/* Маркер — маленькая красная точка вместо ✗ */
.ai-bullet {
	flex-shrink: 0;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--bad);
	margin-top: 7px;
}

/* Палочка-разделитель больше не нужна */
.ai-sep {
	display: none;
}

/* Если дефектов нет — компактная зелёная пилюля с галочкой */
.ai-no-defects {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 10px 5px 9px;
	background: var(--good-bg);
	border-radius: 99px;
	color: var(--good);
	font-weight: 600;
	font-size: 12px;
	align-self: flex-start;
}
.ai-no-defects .ic-done {
	width: 14px;
	height: 14px;
}

/* Разделительная полоса — чистый 1px background-line, чтобы flex-gap родителя
   давал точно одинаковое расстояние сверху и снизу */
.ai-divider {
	height: 1px;
	background: var(--border);
	border: none;
	margin: 0;
	width: 100%;
}

/* Ревью — белая плашка с акцентной чипой для жирного слова-вердикта */
.ai-review {
	padding: 11px 13px;
	background: #fff;
	border-radius: 10px;
	color: var(--text-primary);
	line-height: 1.55;
	font-size: 13px;
}

/* Слово-вердикт (из **markdown**) превращаем в маленькую чёрную пилюлю */
.ai-review b {
	display: inline-block;
	background: var(--accent);
	color: #fff;
	padding: 1px 8px;
	border-radius: 5px;
	font-weight: 700;
	font-size: 12px;
	letter-spacing: 0.01em;
	margin: 0 2px;
}

.ai-note {
	margin-top: 10px;
	font-size: 12px;
	color: var(--text-secondary);
	background: var(--bg);
	border-radius: 6px;
	padding: 6px 9px;
	line-height: 1.4;
}

/* Подсказка — мягкая жёлтая плашка с иконкой «внимание» */
.ai-tip {
	margin-top: -1px; /* подтягиваем ближе к разделителю */
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	background: rgba(245, 200, 50, 0.12);
	border: 1px solid rgba(200, 145, 0, 0.28);
	border-radius: 10px;
	font-size: 12px;
	font-style: italic;
	color: var(--text-secondary);
	line-height: 1.45;
}

.ai-tip .ic-attention {
	color: rgba(200, 145, 0, 0.7);
	width: 18px;
	height: 18px;
	flex-shrink: 0;
}

.ai-tip-text {
	flex: 1;
	min-width: 0;
}

/* ── Верх карточки результата: цена слева + рыночная справа ── */
.ri-top {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px;
	padding-bottom: 10px;
	border-bottom: 1px solid var(--border);
}

.ri-price-block,
.ri-market-block {
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.ri-market-block {
	align-items: flex-end;
}

.ri-price-label,
.ri-market-label {
	font-size: 10px;
	color: var(--text-muted);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	font-weight: 700;
}

.ri-price {
	font-size: 26px;
	font-weight: 800;
	letter-spacing: -0.02em;
	color: var(--text-primary);
	line-height: 1;
}

.ri-market {
	font-size: 17px;
	font-weight: 700;
	color: var(--text-secondary);
	line-height: 1;
}

/* Аватарка плавно появляется (вызывается классом .appear на каждом showAiResult) */
.ai-avatar.appear {
	animation: avatarIn 0.4s ease both;
}

@keyframes avatarIn {
	from {
		opacity: 0;
		transform: scale(0.7);
	}
	to {
		opacity: 1;
		transform: scale(1);
	}
}

/* Сообщение тоже плавно проявляется (после «набора») */
.ai-bubble-text.reveal {
	animation: priceReveal 0.4s ease;
}

/* «ИИ думает и набирает» — три прыгающие точки */
.typing-dots {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 4px 0;
}

.typing-dots span {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--text-muted);
	animation: typingDot 1s ease-in-out infinite;
}

.typing-dots span:nth-child(2) {
	animation-delay: 0.15s;
}
.typing-dots span:nth-child(3) {
	animation-delay: 0.3s;
}

@keyframes typingDot {
	0%,
	60%,
	100% {
		opacity: 0.3;
		transform: translateY(0);
	}
	30% {
		opacity: 1;
		transform: translateY(-3px);
	}
}

/* AI-секция внутри карточки результата — отделена от цены тонкой линией */
.result-inline .ai-msg {
	padding-bottom: 12px;
	border-bottom: 1px solid var(--border);
}

/* ── Строка оценки корпуса ───────────────────── */
.grade-row-sm {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
}

.grade-row-sm .dc-key {
	white-space: nowrap;
}

.grade-selector-sm {
	flex: 1;
	display: flex;
	gap: 4px;
}

.grade-selector-sm .grade-btn {
	flex: 1;
	padding: 6px 2px;
	min-width: 0;
}

.grade-selector-sm .grade-letter {
	font-size: 15px;
}
.grade-selector-sm .grade-desc {
	font-size: 9px;
}

.grade-ai-hint {
	font-size: 10px;
	color: var(--text-muted);
	white-space: nowrap;
	flex-shrink: 0;
}

.grade-ai-hint.hidden {
	display: none;
}

/* ── Кнопка Оценить (компактнее в карточке) ─── */
.eval-card .evaluate-btn {
	padding: 11px;
	font-size: 14px;
	flex-shrink: 0;
}

/* ── Инлайн результат ───────────────────────── */
.result-inline {
	border: 1.5px solid var(--accent);
	border-radius: var(--radius);
	padding: 14px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	flex-shrink: 0;
	box-shadow: var(--shadow-md);
}

.result-inline.hidden {
	display: none;
}

.ri-top {
	display: flex;
	align-items: center;
	gap: 10px;
	padding-bottom: 10px;
	border-bottom: 1px solid var(--border);
}

.ri-price {
	letter-spacing: -0.02em;
}

.ri-grade {
	width: 42px;
	height: 42px;
	background: var(--accent);
	color: white;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 20px;
	font-weight: 800;
	flex-shrink: 0;
}

.ri-price {
	flex: 1;
	font-size: 20px;
	font-weight: 800;
	color: var(--text-primary);
}

.ri-source {
	font-size: 10px;
	padding: 2px 7px;
	border-radius: 99px;
	background: var(--bg);
	color: var(--text-muted);
	border: 1px solid var(--border);
	white-space: nowrap;
	text-align: center;
}

.ri-avito {
	font-size: 11px;
	color: var(--text-secondary);
	background: var(--bg);
	padding: 5px 8px;
	border-radius: var(--radius-sm);
}

.ri-breakdown {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.ri-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 12px;
	color: var(--text-secondary);
	padding: 3px 0;
}

.ri-total {
	font-size: 13px !important;
	font-weight: 700;
	color: var(--text-primary) !important;
	padding-top: 6px !important;
	border-top: 1px solid var(--border);
	margin-top: 2px;
}

.ri-comment {
	font-size: 12px;
	color: var(--text-secondary);
	background: var(--bg);
	padding: 7px 8px;
	border-radius: var(--radius-sm);
	border-left: 2px solid var(--border);
	line-height: 1.4;
}

.ri-comment:empty {
	display: none;
}

.ri-actions {
	display: flex;
	gap: 6px;
}
.ri-actions .action-btn {
	padding: 8px;
	font-size: 13px;
}

/* ── Корректировка видимости страниц ─────────── */
/* ID-селектор имеет выше специфичность чем .page.hidden, */
/* поэтому нужно явно переопределить display для скрытого состояния */
#page-evaluate.hidden {
	display: none;
}

/* ═════════════ ЛОК API-КЛЮЧЕЙ ═════════════ */
.input[readonly] {
	background: var(--bg);
	color: var(--text-muted);
	cursor: not-allowed;
	border-style: dashed;
}
.lock-hint {
	display: inline-block;
	margin-left: 6px;
	padding: 1px 7px;
	border-radius: 6px;
	font-size: 11px;
	background: rgba(200, 145, 0, 0.1);
	color: #8a6a00;
	border: 1px solid rgba(200, 145, 0, 0.25);
}
.lock-hint.unlocked {
	background: rgba(46, 160, 67, 0.1);
	color: #1a7f37;
	border-color: rgba(46, 160, 67, 0.3);
}

/* ─── Плашка-переключатель «Разблокировать / Заблокировать» ─── */
.lock-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 14px;
	margin-bottom: 20px;
	background: rgba(200, 145, 0, 0.07);
	border: 1px solid rgba(200, 145, 0, 0.28);
	border-radius: 10px;
	transition: all 0.2s;
}
.lock-bar.unlocked {
	background: rgba(46, 160, 67, 0.07);
	border-color: rgba(46, 160, 67, 0.32);
}
.lock-bar-info {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: #8a6a00;
	font-weight: 500;
	min-width: 0;
}
.lock-bar.unlocked .lock-bar-info {
	color: #1a7f37;
}
.lock-bar-icon {
	font-size: 14px;
	flex-shrink: 0;
}
.lock-bar-text {
	overflow: hidden;
	text-overflow: ellipsis;
}
.lock-btn {
	flex-shrink: 0;
	padding: 7px 14px;
	background: #ffffff;
	border: 1px solid rgba(200, 145, 0, 0.45);
	border-radius: 8px;
	font-size: 13px;
	font-weight: 500;
	color: #8a6a00;
	cursor: pointer;
	font-family: inherit;
	transition: all 0.15s;
}
.lock-btn:hover {
	background: #8a6a00;
	color: #fff;
	border-color: #8a6a00;
}
.lock-bar.unlocked .lock-btn {
	border-color: rgba(46, 160, 67, 0.45);
	color: #1a7f37;
}
.lock-bar.unlocked .lock-btn:hover {
	background: #1a7f37;
	color: #fff;
	border-color: #1a7f37;
}

/* ─── Кастомный диалог пароля (заменяет prompt() для Electron) ─── */
.pwd-overlay {
	position: fixed;
	inset: 0;
	z-index: 100000;
	background: rgba(10, 10, 10, 0.55);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	animation: pwdFadeIn 0.2s ease;
}
.pwd-overlay.hidden { display: none !important; }
@keyframes pwdFadeIn {
	from { opacity: 0; }
	to   { opacity: 1; }
}
.pwd-card {
	background: white;
	border-radius: 14px;
	padding: 28px;
	width: 100%;
	max-width: 360px;
	box-shadow: 0 30px 80px rgba(0,0,0,0.4);
	animation: pwdPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes pwdPop {
	from { transform: scale(0.92); opacity: 0; }
	to   { transform: scale(1);    opacity: 1; }
}
.pwd-title {
	font-size: 18px;
	font-weight: 700;
	margin-bottom: 6px;
	color: #0a0a0a;
}
.pwd-sub {
	font-size: 13px;
	color: #525252;
	margin-bottom: 18px;
}
.pwd-input {
	width: 100%;
	padding: 12px 14px;
	background: #fafaf9;
	border: 1px solid #ededed;
	border-radius: 10px;
	font-size: 16px;
	font-family: inherit;
	letter-spacing: 0.2em;
	color: #0a0a0a;
	transition: all 0.15s;
	margin-bottom: 12px;
	box-sizing: border-box;
}
.pwd-input:focus {
	outline: none;
	border-color: #0a0a0a;
	background: white;
	box-shadow: 0 0 0 4px rgba(0,0,0,0.05);
}
.pwd-error {
	padding: 9px 12px;
	background: rgba(196, 56, 56, 0.08);
	border: 1px solid rgba(196, 56, 56, 0.25);
	border-radius: 8px;
	font-size: 12.5px;
	color: #c43838;
	margin-bottom: 12px;
}
.pwd-error.hidden { display: none; }
.pwd-buttons {
	display: flex;
	gap: 10px;
	justify-content: flex-end;
}
.pwd-btn {
	padding: 9px 18px;
	border-radius: 8px;
	font-size: 13.5px;
	font-weight: 500;
	font-family: inherit;
	cursor: pointer;
	transition: all 0.15s;
	border: 1px solid transparent;
}
.pwd-btn-cancel {
	background: #fafaf9;
	color: #525252;
	border-color: #ededed;
}
.pwd-btn-cancel:hover {
	background: white;
	color: #0a0a0a;
	border-color: #0a0a0a;
}
.pwd-btn-ok {
	background: #0a0a0a;
	color: white;
}
.pwd-btn-ok:hover {
	transform: translateY(-1px);
	box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

/* ═════════════ КАРТОЧКА В ИСТОРИИ ═════════════ */
.history-list-card {
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding: 14px;
}
.history-card {
	display: flex;
	gap: 16px;
	padding: 14px;
	border: 1px solid var(--border);
	border-radius: 12px;
	background: var(--bg-card);
	transition: box-shadow 0.15s;
}
.history-card:hover {
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}
.hc-img {
	flex: 0 0 auto;
	width: 80px;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding-top: 4px;
}
.hc-img svg {
	width: 70px;
	height: auto;
}
.hc-info {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.hc-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	border-bottom: 1px solid var(--border);
	padding-bottom: 8px;
}
.hc-title {
	font-size: 16px;
	font-weight: 600;
	color: var(--text-primary);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.hc-grade-pill {
	flex: 0 0 auto;
	padding: 3px 10px;
	border-radius: 999px;
	background: rgba(0, 122, 255, 0.1);
	color: #0066cc;
	font-size: 12px;
	border: 1px solid rgba(0, 122, 255, 0.25);
}
.hc-grade-pill b {
	font-weight: 700;
}
.hc-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}
.hc-table th,
.hc-table td {
	padding: 6px 10px;
	text-align: left;
	vertical-align: top;
	border-bottom: 1px solid var(--border);
}
.hc-table tr:last-child th,
.hc-table tr:last-child td {
	border-bottom: none;
}
.hc-table th {
	width: 110px;
	color: var(--text-muted);
	font-weight: 500;
	font-size: 11px;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	background: var(--bg);
}
.hc-table td {
	color: var(--text-primary);
	word-break: break-word;
}
.hc-ai-summary {
	padding: 8px 10px;
	background: rgba(245, 200, 50, 0.08);
	border: 1px solid rgba(200, 145, 0, 0.22);
	border-radius: 8px;
	font-size: 12px;
	font-style: italic;
	color: var(--text-secondary);
	line-height: 1.45;
}
.hc-actions {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
}
.hc-btn {
	padding: 6px 14px;
	border-radius: 8px;
	font-size: 13px;
	cursor: pointer;
	border: 1px solid var(--border);
	background: var(--bg-card);
	color: var(--text-primary);
	transition: all 0.15s;
}
.hc-btn:hover {
	background: var(--bg);
}
.hc-btn-danger {
	color: #c93030;
	border-color: rgba(201, 48, 48, 0.3);
}
.hc-btn-danger:hover {
	background: rgba(201, 48, 48, 0.08);
	border-color: rgba(201, 48, 48, 0.5);
}

/* ═════════════ ЛОГОТИП AVITO В ЗАГОЛОВКЕ ═════════════ */
.inline-avito-logo {
	height: 18px;
	width: auto;
	vertical-align: -3px;
	margin-left: 4px;
}

/* ═════════════ КНОПКА «АНАЛИЗ РЫНКА» С ИКОНКОЙ ═════════════ */
.scrape-btn .ic {
	width: 16px;
	height: 16px;
	margin-right: 2px;
}

/* ═════════════ РАЗДЕЛ ПОСТАВЩИКОВ ═════════════ */
.suppliers-card .suppliers-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	padding-bottom: 14px;
	margin-bottom: 4px;
	border-bottom: 1px solid var(--border);
}
.suppliers-title {
	font-size: 15px;
	font-weight: 600;
	color: var(--text-primary);
}
.suppliers-sub {
	font-size: 12px;
	color: var(--text-muted);
	margin-top: 2px;
}
.suppliers-btn {
	padding: 8px 14px;
	border-radius: 8px;
	border: 1px solid var(--border);
	background: var(--bg-card);
	color: var(--text-secondary);
	font-size: 13px;
	cursor: pointer;
	transition: all 0.15s;
}
.suppliers-btn:disabled {
	cursor: not-allowed;
	opacity: 0.55;
}
.suppliers-btn:not(:disabled):hover {
	background: var(--bg);
	border-color: var(--text-muted);
	color: var(--text-primary);
}

/* ═══════════════════════════════════════════════════════════════
   СПЛЕШ-ЭКРАН (Yoki by chudo_boy) — показывается при старте
   ═══════════════════════════════════════════════════════════════ */
.splash {
	position: fixed;
	inset: 0;
	z-index: 9999;
	background: var(--bg, #ffffff);
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	opacity: 1;
	transition: opacity 0.45s ease;
}
.splash.fade-out {
	opacity: 0;
	pointer-events: none;
}
.splash-inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 18px;
	animation: splashPop 0.7s ease;
}
.splash-logo {
	width: 140px;
	height: 140px;
	display: flex;
	align-items: center;
	justify-content: center;
}
.splash-logo svg {
	width: 100%;
	height: 100%;
}
.splash-logo img {
	width: 100%;
	height: auto;
}
.splash-wordmark {
	font-size: 38px;
	font-weight: 700;
	letter-spacing: 1.2px;
	color: var(--text-primary, #111);
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.splash-tagline {
	font-size: 13px;
	color: var(--text-muted, #888);
	letter-spacing: 0.4px;
}
.splash-credit {
	position: absolute;
	bottom: 32px;
	left: 0;
	right: 0;
	text-align: center;
	font-size: 12px;
	color: var(--text-muted, #999);
	letter-spacing: 0.6px;
	font-style: italic;
}
.splash-credit b {
	font-style: normal;
	font-weight: 600;
	color: var(--text-secondary, #555);
}
@keyframes splashPop {
	0%   { transform: scale(0.85); opacity: 0; }
	60%  { transform: scale(1.03); opacity: 1; }
	100% { transform: scale(1);    opacity: 1; }
}

/* ═══════════════════════════════════════════════════════════════
   ФУТЕР АВТОРСТВА — Yoki · chudo_boy · 2026
   ═══════════════════════════════════════════════════════════════ */
.app-footer {
	padding: 14px 24px;
	text-align: center;
	font-size: 11px;
	color: var(--text-muted, #aaa);
	letter-spacing: 0.4px;
	border-top: 1px solid var(--border, #eee);
	margin-top: 32px;
	background: var(--bg, transparent);
}
.app-footer b {
	color: var(--text-secondary, #555);
	font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════════
   ПРЕДУПРЕЖДЕНИЕ ПРО iCloud — заметная красная плашка
   ═══════════════════════════════════════════════════════════════ */
.icloud-warn {
	display: flex;
	gap: 12px;
	padding: 12px 14px;
	margin: 12px 0;
	background: rgba(201, 48, 48, 0.08);
	border: 1px solid rgba(201, 48, 48, 0.32);
	border-radius: 10px;
	align-items: flex-start;
}
.icloud-warn.hidden {
	display: none;
}
.icloud-warn-icon {
	flex: 0 0 auto;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: rgba(201, 48, 48, 0.15);
	display: flex;
	align-items: center;
	justify-content: center;
	color: #c93030;
}
.icloud-warn-icon .ic {
	width: 14px;
	height: 14px;
}
.icloud-warn-body {
	flex: 1 1 auto;
	min-width: 0;
}
.icloud-warn-title {
	font-size: 13px;
	font-weight: 700;
	color: #c93030;
	margin-bottom: 4px;
	letter-spacing: 0.2px;
}
.icloud-warn-text {
	font-size: 12px;
	color: var(--text-secondary, #555);
	line-height: 1.5;
}
.icloud-warn-text b {
	color: var(--text-primary, #111);
	font-weight: 600;
}


/* ═══════════════════════════════════════════════════════════════
   ЛИЦЕНЗИОННЫЕ МОДАЛКИ — активация и «подписка закончилась»
   ═══════════════════════════════════════════════════════════════ */
.lic-overlay {
	position: fixed;
	inset: 0;
	z-index: 99999;
	background: rgba(10, 10, 10, 0.78);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	animation: licFadeIn 0.3s ease;
}
.lic-overlay.hidden {
	display: none !important;
}
@keyframes licFadeIn {
	from { opacity: 0; }
	to   { opacity: 1; }
}

.lic-card {
	background: #ffffff;
	border-radius: 18px;
	padding: 36px;
	max-width: 460px;
	width: 100%;
	box-shadow: 0 40px 100px rgba(0,0,0,0.45);
	animation: licPop 0.5s cubic-bezier(0.16, 1, 0.3, 1);
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}
@keyframes licPop {
	from { transform: scale(0.92); opacity: 0; }
	to   { transform: scale(1);    opacity: 1; }
}

.lic-card-head {
	display: flex;
	gap: 14px;
	align-items: flex-start;
	margin-bottom: 26px;
}
.lic-logo {
	width: 44px;
	height: 44px;
	flex-shrink: 0;
}
.lic-card-title {
	font-size: 22px;
	font-weight: 700;
	letter-spacing: -0.025em;
	color: #0a0a0a;
	margin-bottom: 4px;
	line-height: 1.2;
}
.lic-card-sub {
	font-size: 13.5px;
	color: #525252;
	line-height: 1.5;
}

.lic-form {
	display: flex;
	flex-direction: column;
	gap: 16px;
}
.lic-label {
	display: flex;
	flex-direction: column;
	gap: 6px;
	font-size: 12.5px;
	font-weight: 500;
	color: #525252;
}
.lic-label input {
	padding: 12px 14px;
	background: #fafaf9;
	border: 1px solid #ededed;
	border-radius: 10px;
	font-size: 14.5px;
	font-family: inherit;
	color: #0a0a0a;
	transition: all 0.15s;
}
.lic-label input:focus {
	outline: none;
	border-color: #0a0a0a;
	background: white;
	box-shadow: 0 0 0 4px rgba(0,0,0,0.05);
}
.lic-label input[id="licActivateKey"] {
	font-family: 'SF Mono', Menlo, Consolas, monospace;
	font-weight: 600;
	letter-spacing: 0.06em;
}

.lic-error {
	padding: 11px 14px;
	background: rgba(196, 56, 56, 0.08);
	border: 1px solid rgba(196, 56, 56, 0.25);
	border-radius: 10px;
	font-size: 13px;
	color: #c43838;
	line-height: 1.4;
}

.lic-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 14px 22px;
	background: #0a0a0a;
	color: white;
	border: none;
	border-radius: 999px;
	font-size: 14.5px;
	font-weight: 600;
	font-family: inherit;
	cursor: pointer;
	transition: all 0.2s;
	text-decoration: none;
}
.lic-btn:hover {
	transform: translateY(-1px);
	box-shadow: 0 10px 22px rgba(0,0,0,0.2);
}

.lic-foot {
	text-align: center;
	font-size: 12.5px;
	color: #8a8a8a;
	margin-top: 4px;
	line-height: 1.5;
}
.lic-foot a {
	color: #0a0a0a;
	font-weight: 500;
	text-decoration: underline;
	text-decoration-color: #d4d4d4;
	text-underline-offset: 2px;
}
.lic-foot a:hover {
	text-decoration-color: #0a0a0a;
}

/* ─── Карточка «истекло» ─── */
.lic-card-expired {
	text-align: center;
	padding: 40px 36px;
}
.lic-card-expired .lic-card-title {
	margin: 0 0 8px;
}
.lic-card-expired .lic-card-sub {
	margin-bottom: 24px;
	max-width: 320px;
	margin-left: auto;
	margin-right: auto;
}
.lic-expired-icon {
	width: 64px;
	height: 64px;
	margin: 0 auto 20px;
	border-radius: 50%;
	background: rgba(196, 56, 56, 0.12);
	color: #c43838;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 18px rgba(196, 56, 56, 0.20);
}

.lic-expired-details {
	background: #fafaf9;
	border: 1px solid #ededed;
	border-radius: 12px;
	padding: 14px 18px;
	margin-bottom: 24px;
	text-align: left;
}
.lic-expired-details > div {
	display: flex;
	justify-content: space-between;
	padding: 6px 0;
	border-bottom: 1px solid #f0f0ee;
	font-size: 13px;
}
.lic-expired-details > div:last-child { border-bottom: none; }
.lic-expired-details span {
	color: #8a8a8a;
}
.lic-expired-details b {
	color: #0a0a0a;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}

.lic-card-expired .lic-btn {
	width: 100%;
	margin-bottom: 14px;
}


/* ═══════════════════════════════════════════════════════════════
   АДАПТАЦИЯ ПОД НАТИВНЫЕ ОКНА ELECTRON
   ── на macOS traffic lights (🔴🟡🟢) сидят поверх контента
      из-за titleBarStyle: hiddenInset → освобождаем под них место
   ── шапку делаем draggable, чтобы окно можно было двигать
   ── интерактивные элементы (кнопки, лого-ссылка) — non-drag
   ═══════════════════════════════════════════════════════════════ */

/* Под Electron не нужно ничего особенного — теперь титлбар
   стандартный (макос/винда), traffic lights и кнопки окна
   живут в своей системной зоне сверху, наша шапка ниже. */

/* Чтобы логотип внутри шапки не давил на traffic lights —
   на маке прижимаем его к началу освобождённой области */
body.platform-darwin.in-electron .header .logo {
	margin-left: 0;
}

/* Windows — нативная title-bar сверху, поверх контента ничего не лезет.
   Дополнительной правки не нужно, кроме draggable-региона (уже выше). */
