/* Интерфейс сервиса аудитов. Цвета и шрифты брендбука WELCS (как в презентациях): жёлтый, графит, Comfortaa + Manrope. */
:root {
  --yellow: #EEC52B;
  --yellow-600: #D9AE0F;
  --yellow-100: #FBF1CC;
  --yellow-50: #FDF8E7;
  --ink: #1F1E21;
  --ink-2: #3A3A3E;
  --grey: #6E6D73;
  --grey-2: #A3A2A8;
  --line: #E9E7E1;
  --bg: #F6F5F1;
  --card: #FFFFFF;
  --green: #1F8A4C;
  --green-bg: #E3F4EA;
  --red: #C0352B;
  --red-bg: #FBE7E5;
  --blue: #2F5BD3;
  --blue-bg: #E7EDFC;
  --orange: #B5650D;
  --orange-bg: #FCEFDC;
  --booking: #003580;
  --airbnb: #FF385C;
  --escapada: #5B8C2A;
  --radius: 16px;
  --radius-s: 10px;
  --shadow: 0 1px 2px rgba(31, 30, 33, .04), 0 4px 16px rgba(31, 30, 33, .05);
  --shadow-l: 0 12px 40px rgba(31, 30, 33, .12);
  --side: 248px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 Manrope, system-ui, -apple-system, sans-serif; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
h1 { font: 800 28px/1.2 Manrope, sans-serif; letter-spacing: -.025em; }
h2 { font: 700 17px/1.3 Manrope, sans-serif; }
h3 { font: 700 15px/1.3 Manrope, sans-serif; }
a { color: inherit; }
p { margin: 0; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.muted { color: var(--grey); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.boot { min-height: 100vh; display: grid; place-items: center; }

/* ------------------------------------------------------------ каркас */
.shell { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; background: linear-gradient(90deg, var(--ink) var(--side), var(--bg) var(--side)); }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px; padding: 20px 14px; background: var(--ink); color: #fff; }
.logo { display: flex; align-items: center; gap: 10px; padding: 4px 10px 22px; text-decoration: none; }
.logo-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--yellow); display: grid; place-items: center; color: var(--ink); flex: none; }
.logo-mark svg { width: 20px; height: 20px; stroke-width: 2.6; }
.logo b { font: 700 17px Comfortaa, sans-serif; letter-spacing: .02em; display: block; }
.logo div span { font-size: 12px; color: rgba(255, 255, 255, .55); }
.nav { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: rgba(255, 255, 255, .72); text-decoration: none; font-weight: 600; transition: background .15s, color .15s; }
.nav:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav.on { background: rgba(238, 197, 43, .14); color: var(--yellow); }
.nav .count { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--yellow); color: var(--ink); font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.side-foot { margin-top: auto; padding: 14px 10px 0; border-top: 1px solid rgba(255, 255, 255, .08); display: flex; align-items: center; gap: 10px; }
.side-foot .who { min-width: 0; flex: 1; }
.side-foot .who b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-foot .who span { font-size: 12px; color: rgba(255, 255, 255, .5); }
.icon-btn { width: 34px; height: 34px; border-radius: 9px; border: 0; background: transparent; color: inherit; display: grid; place-items: center; cursor: pointer; }
.side .icon-btn { color: rgba(255, 255, 255, .6); }
.side .icon-btn:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.main { min-width: 0; padding: 32px 40px 80px; }
.page { max-width: 1080px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head p { margin-top: 6px; }
.crumb { display: inline-flex; align-items: center; gap: 6px; color: var(--grey); text-decoration: none; font-weight: 600; font-size: 13px; margin-bottom: 12px; }
.crumb:hover { color: var(--ink); }
.crumb svg { width: 16px; height: 16px; }

.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--yellow); color: var(--ink); font-weight: 800; font-size: 12px; display: grid; place-items: center; flex: none; }
.avatar.s { width: 24px; height: 24px; font-size: 10px; }

/* ------------------------------------------------------------ элементы */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.card + .card, .stack > * + * { margin-top: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.card-head .sub { font-size: 13px; color: var(--grey); margin-top: 2px; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.grid-2 > * + *, .grid-2 > .card + .card { margin-top: 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px; border: 1px solid transparent; border-radius: 12px; font: 700 14px Manrope, sans-serif; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, box-shadow .15s, transform .05s; background: var(--ink); color: #fff; }
.btn:hover { background: #000; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--yellow); color: var(--ink); box-shadow: 0 1px 0 var(--yellow-600) inset; }
.btn.primary:hover { background: #F2CD3D; box-shadow: 0 4px 14px rgba(238, 197, 43, .45); }
.btn.ghost { background: var(--card); color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: var(--bg); }
.btn.quiet { background: transparent; color: var(--ink-2); padding: 0 10px; }
.btn.quiet:hover { background: rgba(31, 30, 33, .05); }
.btn.s { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn:disabled { opacity: .45; cursor: default; box-shadow: none; transform: none; }
.btn svg { width: 17px; height: 17px; }

.field { display: block; }
.field + .field { margin-top: 16px; }
.field > span { display: block; font-weight: 700; font-size: 13px; margin-bottom: 6px; }
.hint { font-size: 12px; color: var(--grey); margin-top: 6px; }
input, select, textarea { width: 100%; height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; font: 500 15px Manrope, sans-serif; color: var(--ink); background: #fff; outline: none; transition: border-color .15s, box-shadow .15s; }
textarea { height: auto; padding: 12px 14px; resize: vertical; line-height: 1.55; }
input:focus, select:focus, textarea:focus { border-color: var(--yellow-600); box-shadow: 0 0 0 4px rgba(238, 197, 43, .22); }
select { appearance: none; padding-right: 36px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%236E6D73' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 14px center; }
.input-icon { position: relative; }
.input-icon svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--grey-2); pointer-events: none; }
.input-icon input { padding-left: 42px; }
.form-row { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 16px; margin-top: 16px; }
.form-row .field + .field { margin-top: 0; }

.seg { display: inline-flex; padding: 4px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); gap: 2px; }
.seg button { height: 34px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; font: 700 13px Manrope, sans-serif; color: var(--grey); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.seg.full { display: flex; }
.seg.full button { flex: 1; justify-content: center; }

.stepper { display: flex; align-items: center; height: 44px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.stepper button { width: 44px; height: 100%; border: 0; background: transparent; font-size: 20px; cursor: pointer; color: var(--ink-2); }
.stepper button:hover { background: var(--bg); }
.stepper input { border: 0; border-radius: 0; text-align: center; font-weight: 700; height: 100%; padding: 0; box-shadow: none !important; -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }

.pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 13px; font-size: 12px; font-weight: 700; white-space: nowrap; background: var(--bg); color: var(--ink-2); }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.collecting, .pill.building { background: var(--blue-bg); color: var(--blue); }
.pill.collecting .dot, .pill.building .dot { animation: pulse 1.4s ease-in-out infinite; }
.pill.summary_ready { background: var(--yellow-100); color: #7A5D00; }
.pill.done { background: var(--green-bg); color: var(--green); }
.pill.failed { background: var(--red-bg); color: var(--red); }
.pill.review { background: var(--orange-bg); color: var(--orange); }
.pill.due { background: var(--yellow-50); color: #7A5D00; border: 1px dashed var(--yellow-600); }
.plat { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--ink-2); }
.plat i { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; color: #fff; font: 800 11px Manrope, sans-serif; font-style: normal; }
.plat.booking i { background: var(--booking); }
.plat.airbnb i { background: var(--airbnb); }
.plat.escapadarural i { background: var(--escapada); }
@keyframes pulse { 50% { opacity: .35; } }

.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; background: var(--yellow-50); border: 1px solid var(--yellow-100); font-size: 14px; }
.notice svg { margin-top: 2px; color: var(--yellow-600); }
.notice.error { background: var(--red-bg); border-color: #F4CFCB; color: #7E221B; }
.notice.error svg { color: var(--red); }
.notice.ok { background: var(--green-bg); border-color: #C9E8D5; color: #14532F; }
.notice.ok svg { color: var(--green); }
.err { color: var(--red); font-size: 13px; font-weight: 600; }
.err:empty { display: none; }

.spinner { width: 18px; height: 18px; border: 2.5px solid var(--yellow-100); border-top-color: var(--ink); border-radius: 50%; display: inline-block; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.empty { text-align: center; padding: 48px 16px; color: var(--grey); }
.empty .big { width: 56px; height: 56px; border-radius: 16px; background: var(--yellow-50); color: var(--yellow-600); display: grid; place-items: center; margin: 0 auto 14px; }
.empty .big svg { width: 26px; height: 26px; }
.empty h3 { color: var(--ink); margin-bottom: 4px; }

/* ------------------------------------------------------------ вход */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-art { position: relative; overflow: hidden; background: var(--yellow); padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.login-art::after { content: ""; position: absolute; right: -120px; bottom: -120px; width: 420px; height: 420px; border-radius: 50%; border: 70px solid rgba(255, 255, 255, .22); }
.login-art::before { content: ""; position: absolute; right: 140px; top: -90px; width: 220px; height: 220px; border-radius: 50%; background: rgba(255, 255, 255, .18); }
.login-art .logo b { color: var(--ink); }
.login-art .logo div span { color: rgba(31, 30, 33, .6); }
.login-art .logo-mark { background: var(--ink); color: var(--yellow); }
.login-art h1 { font-size: 42px; letter-spacing: -.03em; max-width: 480px; position: relative; z-index: 1; }
.login-art ul { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; position: relative; z-index: 1; font-weight: 600; }
.login-art li { display: flex; gap: 10px; align-items: center; }
.login-art li svg { width: 22px; height: 22px; padding: 4px; border-radius: 50%; background: var(--ink); color: var(--yellow); stroke-width: 3; }
.login-form { display: grid; place-items: center; padding: 32px 24px; }
.login-form form { width: 100%; max-width: 360px; }
.login-form h2 { font: 800 26px Manrope, sans-serif; letter-spacing: -.02em; margin-bottom: 6px; }
.login-form .btn { width: 100%; margin-top: 22px; height: 48px; }

/* ------------------------------------------------------------ список */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); text-decoration: none; display: block; }
a.kpi:hover { border-color: var(--yellow); }
.kpi .label { font-size: 12px; font-weight: 700; color: var(--grey); text-transform: uppercase; letter-spacing: .06em; display: flex; align-items: center; gap: 6px; }
.kpi .label svg { width: 15px; height: 15px; }
.kpi .value { font: 800 26px/1.2 Manrope, sans-serif; margin-top: 8px; letter-spacing: -.02em; }
.kpi .value small { font-size: 14px; font-weight: 600; color: var(--grey); letter-spacing: 0; }
.bar { height: 6px; border-radius: 3px; background: var(--bg); overflow: hidden; margin-top: 10px; }
.bar > i { display: block; height: 100%; border-radius: 3px; background: var(--yellow); }
.bar.warn > i { background: var(--orange); }
.bar.over > i { background: var(--red); }

.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 4px; }
.filters .input-icon { flex: 1 1 260px; }
.filters select { width: auto; min-width: 150px; }
.toggle { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: #fff; font-weight: 700; font-size: 13px; cursor: pointer; color: var(--ink-2); }
.toggle.on { background: var(--yellow-50); border-color: var(--yellow-600); color: var(--ink); }

.list { margin: 0 -24px -24px; }
.item { display: grid; grid-template-columns: 44px minmax(0, 1fr) 150px 120px 150px 18px; gap: 16px; align-items: center; padding: 14px 24px; border-top: 1px solid var(--line); cursor: pointer; text-decoration: none; transition: background .12s; }
.item:hover { background: #FCFBF8; }
.item .thumb { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: #fff; font: 800 15px Manrope, sans-serif; }
.item .thumb.booking { background: var(--booking); }
.item .thumb.airbnb { background: var(--airbnb); }
.item .thumb.escapadarural { background: var(--escapada); }
.item .thumb.none { background: var(--grey-2); }
.item .t { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .u { font-size: 13px; color: var(--grey); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .tags { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.item .by { display: flex; align-items: center; gap: 8px; font-size: 13px; min-width: 0; }
.item .by span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .when { font-size: 13px; color: var(--grey); }
.item .st { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.item .chev { color: var(--grey-2); }
.rating { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--ink-2); }
.rating svg { width: 13px; height: 13px; fill: var(--yellow); stroke: var(--yellow-600); stroke-width: 1.5; }

/* ------------------------------------------------------------ новый аудит */
.detect { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 13px; min-height: 22px; }
.estimate { display: flex; gap: 18px; flex-wrap: wrap; padding: 14px 16px; border-radius: 12px; background: var(--bg); font-size: 13px; color: var(--ink-2); margin-top: 20px; }
.estimate span { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.estimate svg { width: 16px; height: 16px; color: var(--grey); }
.how { counter-reset: s; display: grid; gap: 14px; }
.how li { list-style: none; display: grid; grid-template-columns: 30px 1fr; gap: 12px; font-size: 14px; }
.how li::before { counter-increment: s; content: counter(s); width: 30px; height: 30px; border-radius: 50%; background: var(--yellow-50); border: 1px solid var(--yellow-100); display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.how ol { padding: 0; margin: 0; }
.how b { display: block; }

/* ------------------------------------------------------------ страница аудита */
.hero { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.hero h1 { font-size: 28px; word-break: break-word; }
.hero .meta { display: flex; gap: 8px 16px; flex-wrap: wrap; align-items: center; margin-top: 10px; font-size: 13px; color: var(--grey); }
.hero .meta span { display: inline-flex; align-items: center; gap: 6px; }
.hero .meta svg { width: 15px; height: 15px; }
.hero .meta span.avatar { display: grid; }
.hero .meta a { color: var(--grey); text-decoration: none; border-bottom: 1px dotted var(--grey-2); }
.hero .acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-start; }
.hero .acts:empty { display: none; }

.progress-card { overflow: hidden; position: relative; }
.progress-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: linear-gradient(90deg, var(--yellow) 0 var(--p, 0%), var(--bg) var(--p, 0%)); transition: --p .4s; }
.eta { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.eta b { font: 800 30px/1 Manrope, sans-serif; letter-spacing: -.02em; }
.steps { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 2px; }
.steps li { display: grid; grid-template-columns: 28px 1fr auto; gap: 12px; align-items: center; padding: 9px 0; position: relative; }
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 13px; top: 34px; bottom: -12px; width: 2px; background: var(--line); }
.steps li.done:not(:last-child)::after, .steps li.warn:not(:last-child)::after { background: var(--yellow); }
.steps .mk { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--bg); border: 2px solid var(--line); color: var(--grey-2); position: relative; z-index: 1; }
.steps .mk svg { width: 14px; height: 14px; stroke-width: 3; }
.steps li.done .mk { background: var(--yellow); border-color: var(--yellow); color: var(--ink); }
.steps li.warn .mk { background: var(--orange-bg); border-color: var(--orange); color: var(--orange); }
.steps li.error .mk { background: var(--red-bg); border-color: var(--red); color: var(--red); }
.steps li.active .mk { border-color: var(--ink); background: #fff; }
.steps li.active .mk::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--ink); animation: pulse 1.2s ease-in-out infinite; }
.steps li.pending { color: var(--grey); }
.steps li.active .lb { font-weight: 800; }
.steps .lb { font-weight: 600; }
.steps .dt { font-size: 12px; font-weight: 700; color: var(--grey); background: var(--bg); padding: 2px 8px; border-radius: 8px; }

.cmp { width: 100%; border-collapse: collapse; font-size: 14px; }
.cmp th { text-align: left; font-size: 12px; font-weight: 700; color: var(--grey); text-transform: uppercase; letter-spacing: .05em; padding: 0 0 10px; }
.cmp td { padding: 11px 0; border-top: 1px solid var(--line); vertical-align: middle; }
.cmp td.n, .cmp th.n { text-align: right; padding-left: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.delta { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; font-weight: 800; padding: 2px 8px; border-radius: 8px; background: var(--bg); color: var(--grey); }
.delta.up { background: var(--green-bg); color: var(--green); }
.delta.down { background: var(--red-bg); color: var(--red); }
.delta svg { width: 12px; height: 12px; stroke-width: 3; }

.editor-tabs { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.findings { min-height: 460px; font: 13.5px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: #FDFCFA; }
.md { font-size: 14.5px; line-height: 1.65; max-height: 640px; overflow: auto; padding: 4px 4px 4px 0; }
.md h1, .md h2, .md h3 { font-family: Manrope, sans-serif; margin: 20px 0 8px; }
.md h1 { font-size: 20px; } .md h2 { font-size: 17px; } .md h3 { font-size: 15px; }
.md > :first-child { margin-top: 0; }
.md p, .md ul, .md ol, .md table { margin: 0 0 10px; }
.md ul, .md ol { padding-left: 22px; }
.md table { border-collapse: collapse; width: 100%; font-size: 13px; display: block; overflow-x: auto; }
.md th, .md td { border: 1px solid var(--line); padding: 6px 8px; text-align: left; }
.md th { background: var(--bg); }
.md code { background: var(--bg); padding: 1px 5px; border-radius: 5px; font-size: 13px; }
.actionbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.actionbar .grow { flex: 1; }

.pdf-card { display: flex; align-items: center; gap: 16px; padding: 20px 24px; background: linear-gradient(135deg, var(--ink) 0%, #2E2C31 100%); color: #fff; border: 0; }
.pdf-card .ic { width: 48px; height: 48px; border-radius: 14px; background: var(--yellow); color: var(--ink); display: grid; place-items: center; flex: none; }
.pdf-card .ic svg { width: 24px; height: 24px; }
.pdf-card .tx { flex: 1; min-width: 0; }
.pdf-card .tx span { color: rgba(255, 255, 255, .6); font-size: 13px; }

.review-box { border-left: 4px solid var(--orange); }
.review-box.done { border-left-color: var(--green); }
.quote { padding: 12px 14px; border-radius: 12px; background: var(--bg); font-size: 14px; white-space: pre-wrap; margin-top: 8px; }
.quote .by { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--grey); margin-bottom: 6px; }

.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.timeline a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin: 0 -10px; border-radius: 10px; text-decoration: none; font-size: 14px; }
.timeline a:hover { background: var(--bg); }
.timeline a.cur { background: var(--yellow-50); font-weight: 700; }
.timeline .when { color: var(--grey); font-size: 13px; margin-left: auto; }

.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.fact { padding: 12px 14px; border-radius: 12px; background: var(--bg); }
.fact span { font-size: 12px; color: var(--grey); font-weight: 600; }
.fact b { display: block; font-size: 18px; margin-top: 2px; }

/* ------------------------------------------------------------ расходы */
.chart { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 14px; align-items: end; padding-top: 12px; }
.col { display: flex; flex-direction: column; align-items: center; gap: 8px; justify-content: flex-end; text-decoration: none; }
.col:hover .b { filter: brightness(.95); }
.col .v { font-size: 12px; font-weight: 800; }
.col .b { width: 100%; max-width: 54px; border-radius: 10px 10px 4px 4px; background: var(--yellow-100); min-height: 4px; }
.col.over .b { background: #F1B7B1; }
.col.cur.over .b { background: var(--red); }
.col.cur .b { background: var(--yellow); }
.col .m { font-size: 12px; color: var(--grey); font-weight: 600; }
.people { display: grid; gap: 14px; }
.person { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.person .bar { margin-top: 6px; }
.person .nm { font-weight: 700; font-size: 14px; display: flex; justify-content: space-between; gap: 8px; }
.person .nm span { font-weight: 600; color: var(--grey); font-size: 13px; }
.person .sum { font-weight: 800; font-variant-numeric: tabular-nums; }
.big-num { font: 800 40px/1 Manrope, sans-serif; letter-spacing: -.03em; }
.big-num small { font-size: 18px; color: var(--grey); font-weight: 600; letter-spacing: 0; }

/* ------------------------------------------------------------ модальное окно и уведомления */
.modal-bg { position: fixed; inset: 0; background: rgba(31, 30, 33, .45); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 16px; z-index: 20; animation: fade .15s; }
.modal { width: 100%; max-width: 480px; background: #fff; border-radius: 20px; box-shadow: var(--shadow-l); padding: 24px; animation: rise .2s ease-out; }
.modal h2 { font-size: 19px; margin-bottom: 6px; }
.modal .actionbar { border: 0; padding-top: 4px; justify-content: flex-end; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 600; font-size: 14px; box-shadow: var(--shadow-l); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 30; max-width: calc(100vw - 32px); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ------------------------------------------------------------ телефоны и планшеты */
@media (max-width: 1100px) {
  .item { grid-template-columns: 44px minmax(0, 1fr) 130px 18px; }
  .item .by, .item .when { display: none; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; background: var(--bg); }
  .side { position: sticky; z-index: 10; height: auto; flex-direction: row; align-items: center; padding: 10px 12px; gap: 2px; overflow-x: auto; }
  .logo { padding: 0 8px 0 2px; }
  .logo div { display: none; }
  .nav { padding: 8px 10px; font-size: 13px; gap: 6px; flex: none; }
  .nav svg { width: 16px; height: 16px; }
  .side-foot { margin: 0 0 0 auto; padding: 0 0 0 8px; border: 0; }
  .side-foot .who, .side-foot .avatar { display: none; }
  .main { padding: 20px 16px 64px; }
  .grid-2, .login { grid-template-columns: minmax(0, 1fr); }
  .login-art { padding: 28px 24px; min-height: 0; }
  .login-art h1 { font-size: 28px; margin-top: 28px; }
  .login-art ul { display: none; }
  .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  h1 { font-size: 22px; }
  .hero h1 { font-size: 22px; }
  .card { padding: 18px; }
  .list { margin: 0 -18px -18px; }
  .item { grid-template-columns: 40px minmax(0, 1fr); padding: 12px 18px; gap: 12px; }
  .item .thumb { width: 40px; height: 40px; }
  .item .st { grid-column: 2; flex-direction: row; flex-wrap: wrap; }
  .item .chev { display: none; }
  .kpi .value { font-size: 22px; }
  .filters select, .filters .toggle { flex: 1 1 140px; }
  .hero .acts, .hero .acts .btn { width: 100%; }
  .facts { grid-template-columns: 1fr 1fr; }
  .pdf-card { flex-wrap: wrap; }
  .progress-card .card-head > .spinner { display: none; }
  .pdf-card .tx { flex-basis: calc(100% - 64px); }
  .pdf-card .btn { width: 100%; }
  .cmp { font-size: 13px; }
  .cmp th { font-size: 10px; }
  .chart { gap: 6px; }
  .nav span.tx { display: none; }
  .nav .count { margin-left: 2px; }
}
.warn-text { color: var(--orange); font-weight: 600; }
