: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-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.car-title { font-size: 21px; font-weight: 700; margin: 2px 0; }
.ring {
	--deg: 0deg;
	flex: none; width: 84px; height: 84px; border-radius: 50%;
	background: conic-gradient(var(--accent) var(--deg), var(--line) 0);
	display: grid; place-items: center; position: relative;
}
.ring::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: var(--card); }
.ring span { position: relative; font-weight: 700; font-size: 18px; }
.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 шагов из 9 */
.prog-1.ring { --deg: 40deg; }  .prog-1 i { width: 11.1%; }
.prog-2.ring { --deg: 80deg; }  .prog-2 i { width: 22.2%; }
.prog-3.ring { --deg: 120deg; } .prog-3 i { width: 33.3%; }
.prog-4.ring { --deg: 160deg; } .prog-4 i { width: 44.4%; }
.prog-5.ring { --deg: 200deg; } .prog-5 i { width: 55.5%; }
.prog-6.ring { --deg: 240deg; } .prog-6 i { width: 66.6%; }
.prog-7.ring { --deg: 280deg; } .prog-7 i { width: 77.7%; }
.prog-8.ring { --deg: 320deg; } .prog-8 i { width: 88.8%; }
.prog-9.ring { --deg: 360deg; } .prog-9 i { width: 100%; }

/* архив документов */
.doc-row { display: grid; grid-template-columns: 24px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.doc-row:first-of-type { border-top: 0; }
.doc-mark { color: var(--muted); font-size: 18px; line-height: 1.2; }
.doc-mark.ok { color: var(--accent); }
.doc-title { font-weight: 600; }
.doc-link { display: block; margin-top: 4px; word-break: break-word; }
.doc-note { padding: 0 0 8px; }
.tile { text-decoration: none; }
