:root {
	--bg: #0b0b0b;
	--card: #151515;
	--card2: #1d1d1d;
	--line: #2a2a2a;
	--text: #fff;
	--muted: #a8a8a8;
	--accent: #ffbd27;
	--ok: #2f9e44;
	--err: #cf3434;
	--r: 20px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
	background: var(--bg);
	color: var(--text);
	font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
	padding-bottom: calc(76px + env(safe-area-inset-bottom));
}
a { color: var(--accent); text-decoration: none; }
h1, h2 { margin: 0 0 12px; line-height: 1.2; }
h1 { font-size: 24px; }
h2 { font-size: 17px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.accent { color: var(--accent); }
.ok { color: var(--ok); }

.logo { display: inline-flex; align-items: center; }
.logo img { display: block; height: 36px; width: auto; }
.logo.big { display: flex; justify-content: center; margin-bottom: 28px; }
.logo.big img { height: 56px; }

.top {
	display: flex; align-items: center; justify-content: space-between;
	padding: 14px 18px; border-bottom: 1px solid var(--line);
	position: sticky; top: 0; background: rgba(11, 11, 11, .92); backdrop-filter: blur(8px); z-index: 5;
}
.top-nav { display: none; gap: 22px; }
.top-nav a { color: var(--muted); }
.top-nav a.active, .top-nav a:hover { color: var(--text); }
.top-nav { align-items: center; }
.fav { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fav-main { flex: 1; min-width: 0; color: inherit; text-decoration: none; }
.fav form { margin: 0; flex-shrink: 0; }
.top-logout { margin: 0; }
.top-logout button { background: none; border: 0; padding: 0; font: inherit; color: var(--muted); cursor: pointer; }
.top-logout button:hover { color: var(--text); }

.wrap { max-width: 720px; margin: 0 auto; padding: 18px 16px 24px; }

.bottom-nav {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
	display: grid; grid-template-columns: repeat(5, 1fr);
	background: #111; border-top: 1px solid var(--line);
	padding: 8px 4px calc(8px + env(safe-area-inset-bottom));
}
.bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--muted); font-size: 11px; }
.bottom-nav a.active { color: var(--accent); }
.bottom-nav .ico { font-size: 18px; line-height: 1; }

@media (min-width: 768px) {
	body { padding-bottom: 0; }
	.top-nav { display: flex; }
	.bottom-nav { display: none; }
	.wrap { padding-top: 32px; }
}

.card { background: var(--card); border-radius: var(--r); padding: 18px; margin-bottom: 14px; }
.card.center { text-align: center; }
.hello { font-size: 22px; margin-bottom: 16px; }
.page-title { margin-bottom: 4px; }
.back { display: inline-block; color: var(--muted); margin-bottom: 12px; }

.btn, .btn-ghost {
	display: inline-flex; align-items: center; justify-content: center;
	height: 50px; padding: 0 22px; border-radius: 40px; border: 0;
	font: inherit; font-weight: 600; cursor: pointer;
}
.btn { background: var(--accent); color: #111; }
.btn:hover { filter: brightness(1.06); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--muted); }
.btn.sm, .btn-ghost.sm { height: 40px; padding: 0 16px; font-size: 14px; }
.wide { display: flex; width: 100%; margin-bottom: 14px; }

/* вход */
body.bare { padding-bottom: 0; }
.auth { max-width: 420px; margin: 0 auto; padding: 48px 16px; }
.form { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.form label { font-size: 13px; color: var(--muted); }
.form input {
	height: 52px; border-radius: 14px; border: 1px solid var(--line); background: var(--card2);
	color: var(--text); font: inherit; font-size: 17px; padding: 0 16px; outline: none;
}
.form input:focus { border-color: var(--accent); }
.code-input { letter-spacing: 10px; text-align: center; font-size: 24px !important; }
.form .btn { margin-top: 6px; }
.link-sm { display: inline-block; margin-top: 14px; font-size: 14px; }
.foot { text-align: center; font-size: 14px; margin-top: 18px; }
.flash { border-radius: 12px; padding: 10px 14px; margin: 8px 0; font-size: 14px; }
.flash.err { background: rgba(207, 52, 52, .14); color: #ff7b7b; }

/* главный экран */
.hero.has-photo { padding-top: 0; overflow: hidden; }
.hero-photo { position: relative; margin: 0 -18px 14px; background: #101010; }
.hero-photo img { display: block; width: 100%; height: 200px; object-fit: cover; }
.pct {
	display: inline-block; background: rgba(11, 11, 11, .78); color: var(--accent);
	border: 1px solid rgba(255, 189, 39, .75); font-weight: 700; font-size: 13px;
	padding: 3px 9px; border-radius: 999px; line-height: 1.3;
}
.hero-photo .pct { position: absolute; top: 12px; right: 12px; }
.hero-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.car-title { font-size: 21px; font-weight: 700; margin: 2px 0; }
.status { margin: 16px 0 14px; }
.status-now { font-weight: 600; font-size: 17px; }
.route { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.route-pt { color: var(--muted); white-space: nowrap; }
.route-pt::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--line); margin-right: 6px; vertical-align: 1px; }
.route-pt.on { color: var(--text); }
.route-pt.on::before { background: var(--accent); }
.route-line { flex: 1; height: 2px; background: var(--line); border-radius: 2px; }
.route-line.on { background: var(--accent); }

.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.tile { background: var(--card); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 4px; color: var(--text); }
.tile-title { font-size: 13px; color: var(--muted); }
.tile-val { font-weight: 700; font-size: 17px; }
.tile.soon { opacity: .6; }

.manager { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.mgr-name { font-weight: 600; }
.mgr-actions { display: flex; gap: 8px; }

.row-link { display: flex; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--line); color: var(--text); }

.empty { text-align: center; display: flex; flex-direction: column; gap: 10px; align-items: center; padding: 32px 18px; }
.empty .btn, .empty .btn-ghost { width: 100%; max-width: 320px; }
.empty-ico { font-size: 40px; color: var(--accent); }
.empty-sm p { margin: 0; }

/* заказ */
.bar-head { display: flex; justify-content: space-between; font-weight: 600; margin-bottom: 10px; }
.bar { height: 8px; border-radius: 8px; background: var(--line); overflow: hidden; margin-bottom: 10px; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 8px; width: 0; }

.timeline { list-style: none; margin: 0; padding: 0; }
.step { display: grid; grid-template-columns: 22px 1fr auto; gap: 12px; align-items: start; padding: 10px 0; position: relative; }
.step:not(:last-child)::after { content: ""; position: absolute; left: 10px; top: 32px; bottom: -8px; width: 2px; background: var(--line); }
.step.done:not(:last-child)::after { background: var(--accent); }
.dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); margin-top: 1px; position: relative; z-index: 1; background: var(--card); }
.step.done .dot { background: var(--accent); border-color: var(--accent); }
.step.done .dot::after { content: "✓"; color: #111; font-size: 12px; font-weight: 800; position: absolute; inset: 0; display: grid; place-items: center; }
.step.current .dot { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(255, 189, 39, .18); }
.step-title { font-weight: 600; }
.step:not(.done):not(.current) .step-title { color: var(--muted); }
.step-when { font-size: 13px; color: var(--muted); white-space: nowrap; }
.step.current .step-when { color: var(--accent); font-weight: 600; }

.kv { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.kv:first-of-type { border-top: 0; }
.kv span:last-child { text-align: right; }

.err-code { font-size: 48px; font-weight: 800; color: var(--accent); }

/* прогресс без inline style: prog-N — пройдено N%, с шагом 5 */
.prog-5.ring { --deg: 18deg; } .prog-5 i { width: 5%; }
.prog-10.ring { --deg: 36deg; } .prog-10 i { width: 10%; }
.prog-15.ring { --deg: 54deg; } .prog-15 i { width: 15%; }
.prog-20.ring { --deg: 72deg; } .prog-20 i { width: 20%; }
.prog-25.ring { --deg: 90deg; } .prog-25 i { width: 25%; }
.prog-30.ring { --deg: 108deg; } .prog-30 i { width: 30%; }
.prog-35.ring { --deg: 126deg; } .prog-35 i { width: 35%; }
.prog-40.ring { --deg: 144deg; } .prog-40 i { width: 40%; }
.prog-45.ring { --deg: 162deg; } .prog-45 i { width: 45%; }
.prog-50.ring { --deg: 180deg; } .prog-50 i { width: 50%; }
.prog-55.ring { --deg: 198deg; } .prog-55 i { width: 55%; }
.prog-60.ring { --deg: 216deg; } .prog-60 i { width: 60%; }
.prog-65.ring { --deg: 234deg; } .prog-65 i { width: 65%; }
.prog-70.ring { --deg: 252deg; } .prog-70 i { width: 70%; }
.prog-75.ring { --deg: 270deg; } .prog-75 i { width: 75%; }
.prog-80.ring { --deg: 288deg; } .prog-80 i { width: 80%; }
.prog-85.ring { --deg: 306deg; } .prog-85 i { width: 85%; }
.prog-90.ring { --deg: 324deg; } .prog-90 i { width: 90%; }
.prog-95.ring { --deg: 342deg; } .prog-95 i { width: 95%; }
.prog-100.ring { --deg: 360deg; } .prog-100 i { width: 100%; }

.tile { text-decoration: none; }

/* документы и видеоотчёты — отдельные карточки */
.file-grid, .media-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.file-card, .media-card {
	background: var(--card); border-radius: 16px; padding: 12px;
	display: flex; flex-direction: column; gap: 8px; color: var(--text); min-width: 0;
}
.file-card { text-decoration: none; }
.file-ico, .media-thumb {
	display: grid; place-items: center; height: 92px; border-radius: 12px;
	background: #101010; overflow: hidden; position: relative;
}
.media-thumb { height: auto; aspect-ratio: 4 / 3; }
.file-ico img, .media-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.file-glyph {
	font-family: Georgia, "Times New Roman", serif; font-weight: 700; font-size: 13px;
	color: #111; background: var(--accent); border-radius: 8px; padding: 8px 10px;
}
.file-name, .media-name {
	font-family: Georgia, "Times New Roman", serif; font-weight: 700; font-size: 16px;
	line-height: 1.25; color: var(--text);
}
.file-dl {
	margin-top: auto; display: block; text-align: center; background: var(--accent); color: #111;
	font-weight: 700; border-radius: 10px; padding: 8px 10px; text-decoration: none;
}
.play { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.play::after {
	content: "▶"; width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: #111;
	display: grid; place-items: center; font-size: 13px; padding-left: 3px;
}
.media-thumb.link { text-decoration: none; }
.wait-line { margin-top: 14px; }
@media (min-width: 720px) {
	.file-grid, .media-grid { grid-template-columns: repeat(3, 1fr); }
}