:root {
  color-scheme: light dark;
  --bg: var(--tg-theme-bg-color, #f3f6f7);
  --surface: var(--tg-theme-secondary-bg-color, #ffffff);
  --surface-raised: #ffffff;
  --surface-soft: #edf2f3;
  --text: var(--tg-theme-text-color, #16242c);
  --muted: var(--tg-theme-hint-color, #72818a);
  --accent: var(--tg-theme-button-color, #176b78);
  --accent-text: var(--tg-theme-button-text-color, #ffffff);
  --accent-soft: #dff1f2;
  --navy: #123b52;
  --green: #23835f;
  --green-soft: #e3f4eb;
  --orange: #b86b1b;
  --orange-soft: #fff0db;
  --red: var(--tg-theme-destructive-text-color, #c94747);
  --red-soft: #fce8e8;
  --wine: #991f36;
  --wine-dark: #641020;
  --wine-light: #d64b5f;
  --line: rgba(41, 63, 74, 0.13);
  --shadow: 0 12px 34px rgba(18, 39, 49, 0.09);
  --radius: 18px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
}

body {
  min-width: 320px;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

button, input, select, textarea { font: inherit; }
button { color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:active { transform: scale(.985); }
.icon-svg { display: inline-block; flex: 0 0 auto; vertical-align: middle; }

.app-shell {
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: calc(82px + env(safe-area-inset-bottom));
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  min-height: 74px;
  align-items: center;
  justify-content: space-between;
  padding: calc(10px + env(safe-area-inset-top)) 17px 10px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(18px);
}

.eyebrow {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

h1 { margin: 0; font-size: 22px; line-height: 1.05; letter-spacing: -.03em; }
h2 { margin: 0; font-size: 22px; letter-spacing: -.025em; }
h3 { margin: 0; font-size: 17px; letter-spacing: -.015em; }
p { line-height: 1.42; }

.user-badge {
  max-width: 47%;
  padding: 8px 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.content { width: min(100%, 1080px); margin: 0 auto; padding: 16px 13px 34px; }
.loading-state, .empty-state, .access-state { padding: 70px 24px; text-align: center; }
.loading-state p, .empty-state p, .access-state p { color: var(--muted); }
.brand-mark {
  display: grid;
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  place-items: center;
  border-radius: 20px;
  background: var(--navy);
  box-shadow: var(--shadow);
  color: #fff;
  font-size: 28px;
  font-weight: 850;
}

.hero {
  position: relative;
  min-height: 158px;
  overflow: hidden;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 25px;
  background: radial-gradient(circle at 78% 30%, rgba(33, 144, 154, .34), transparent 43%), linear-gradient(135deg, #102f3e 0%, #0f4c55 48%, #102631 100%);
  box-shadow: 0 18px 42px rgba(12, 48, 58, .22);
  color: #fff;
}
.hero::before { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8, 31, 40, .94) 0%, rgba(8, 31, 40, .64) 48%, rgba(8, 31, 40, .04) 78%); content: ""; }
.hero::after { position: absolute; width: 210px; height: 210px; top: -115px; right: -48px; border: 1px solid rgba(255,255,255,.08); border-radius: 50%; content: ""; }
.hero-copy { position: relative; z-index: 3; width: 57%; }
.hero-label { margin: 0 0 8px; opacity: .68; font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.hero-value { margin: 0; font-size: clamp(29px, 8vw, 40px); font-weight: 880; letter-spacing: -.045em; white-space: nowrap; }
.hero-meta { display: flex; align-items: baseline; gap: 7px; margin-top: 19px; text-align: left; }
.hero-meta strong { display: block; font-size: 22px; }
.hero-meta span { display: block; max-width: 82px; opacity: .7; font-size: 10px; line-height: 1.15; }
.hero-car-stage { position: absolute; z-index: 2; right: -8%; bottom: -4%; width: 76%; height: 100%; pointer-events: none; transition: transform .22s ease, opacity .22s ease; animation: hero-car-in .6s cubic-bezier(.2,.8,.2,1) both; }
.hero-car-stage::before { position: absolute; z-index: 0; width: 88%; height: 52%; right: 0; bottom: 17%; border-radius: 50%; background: radial-gradient(ellipse, rgba(127, 219, 221, .15) 0%, rgba(28, 111, 119, .09) 42%, transparent 72%); filter: blur(15px); content: ""; }
.hero-car-stage::after { position: absolute; z-index: 1; width: 79%; height: 13%; right: 3%; bottom: 7%; transform: perspective(80px) rotateX(58deg) skewX(-7deg); border-radius: 50%; background: rgba(1, 9, 13, .78); box-shadow: 0 6px 12px rgba(0, 0, 0, .34); filter: blur(7px); content: ""; }
.hero-car-stage.is-changing { transform: translateX(9px) scale(.985); opacity: 0; }
.hero-car { position: absolute; z-index: 2; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: right bottom; filter: blur(.12px) brightness(.96) saturate(.88) contrast(.98) drop-shadow(0 2px 1px rgba(0, 0, 0, .5)) drop-shadow(0 12px 11px rgba(0, 0, 0, .34)); }
.hero-car-name { position: absolute; right: 13px; bottom: 9px; z-index: 3; max-width: 39%; overflow: hidden; color: rgba(255,255,255,.38); font-size: 7px; font-weight: 800; letter-spacing: .06em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
@keyframes hero-car-in { from { transform: translateX(18px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

.quick-actions { display: grid; grid-template-columns: 1.15fr 1fr; gap: 9px; margin: 11px 0 20px; }
.quick-actions.single { grid-template-columns: 1fr; }
.quick-btn {
  display: flex;
  min-height: 56px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px;
  border: 0;
  border-radius: 16px;
  background: var(--accent);
  box-shadow: 0 9px 20px color-mix(in srgb, var(--accent) 20%, transparent);
  color: var(--accent-text);
  font-size: 14px;
  font-weight: 800;
}
.quick-btn.secondary { border: 1px solid var(--line); background: var(--surface); box-shadow: none; color: var(--text); }

.section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 23px 2px 11px; }
.section-head.compact-head { margin-top: 19px; }
.section-head p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.link-btn { min-height: 38px; padding: 7px 5px; border: 0; background: transparent; color: var(--accent); font-size: 13px; font-weight: 800; }

.period-tabs, .filter-tabs {
  display: inline-flex;
  padding: 3px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--text) 6%, transparent);
}
.period-tabs button, .filter-tabs button {
  min-height: 34px;
  padding: 6px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}
.period-tabs button.active, .filter-tabs button.active { background: var(--surface); box-shadow: 0 2px 8px rgba(0,0,0,.06); color: var(--text); }

.metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.metric { min-height: 108px; padding: 15px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
button.metric { width: 100%; color: inherit; text-align: left; }
.metric span { display: block; color: var(--muted); font-size: 11px; }
.metric strong { display: block; margin: 8px 0 9px; font-size: 20px; letter-spacing: -.025em; }
.metric small { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 10px; }
.metric.interactive { box-shadow: 0 5px 16px rgba(18, 39, 49, .045); }
.metric.interactive small b { display: inline-flex; margin-left: auto; }
.metric.debt strong, .debt-text { color: var(--orange) !important; }
.metric.profit strong, .profit-text strong { color: var(--green); }

.finance-page-title { justify-content: flex-start; }
.finance-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 11px; padding: 4px; border-radius: 14px; background: color-mix(in srgb, var(--text) 7%, transparent); }
.finance-tabs button { min-height: 42px; border: 0; border-radius: 11px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 850; }
.finance-tabs button.active { background: var(--surface); box-shadow: 0 3px 11px rgba(18, 39, 49, .08); color: var(--text); }
.finance-summary { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--line); }
.finance-summary > div { min-width: 0; padding: 14px 11px; background: var(--surface); }
.finance-summary span, .finance-summary strong { display: block; }
.finance-summary span { min-height: 28px; color: var(--muted); font-size: 9px; line-height: 1.35; }
.finance-summary strong { margin-top: 5px; overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.finance-summary.profit > div:first-child strong { color: var(--green); }
.finance-summary.debt > div:first-child strong { color: var(--orange); }
.finance-list { display: grid; gap: 10px; }
.finance-list > .empty-panel { grid-column: 1 / -1; }
.finance-order-card { overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: 0 5px 17px rgba(18, 39, 49, .04); }
.finance-order-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 14px; }
.finance-order-head > div { min-width: 0; }
.finance-order-head span, .finance-order-head strong, .finance-order-head small { display: block; }
.finance-order-head > div > span { color: var(--muted); font-size: 9px; font-weight: 850; text-transform: uppercase; }
.finance-order-head > div > strong { margin-top: 5px; overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.finance-order-head > div > small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.finance-values { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.finance-values > div { min-width: 0; padding: 10px; border-right: 1px solid var(--line); }
.finance-values > div:last-child { border-right: 0; }
.finance-values span, .finance-values strong { display: block; }
.finance-values span { color: var(--muted); font-size: 9px; }
.finance-values strong { margin-top: 4px; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.finance-values .profit strong { color: var(--green); }
.finance-values .debt strong { color: var(--orange); }
.finance-position-summary { display: flex; gap: 7px; padding: 11px 13px 4px; }
.finance-position-summary span { padding: 5px 7px; border-radius: 8px; background: var(--surface-soft); color: var(--muted); font-size: 9px; font-weight: 750; }
.finance-items { padding: 5px 13px 9px; }
.finance-item { display: grid; grid-template-columns: 25px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.finance-item:last-of-type { border-bottom: 0; }
.finance-item-kind { display: grid; width: 25px; height: 25px; place-items: center; border-radius: 8px; background: var(--accent-soft); color: var(--accent); font-size: 9px; font-weight: 900; }
.finance-item-kind.part { background: var(--orange-soft); color: var(--orange); }
.finance-item strong, .finance-item small { display: block; }
.finance-item strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.finance-item small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.finance-item > b { font-size: 10px; white-space: nowrap; }
.finance-more { display: block; padding-top: 6px; color: var(--muted); font-size: 9px; }
.finance-open-btn { display: flex; width: 100%; min-height: 43px; align-items: center; justify-content: center; gap: 5px; border: 0; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--accent) 6%, var(--surface)); color: var(--accent); font-size: 11px; font-weight: 850; }

.attention-list { display: grid; gap: 8px; }
.attention-card {
  display: grid;
  width: 100%;
  min-height: 65px;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  border: 1px solid color-mix(in srgb, var(--orange) 28%, transparent);
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 90%, var(--orange-soft));
  text-align: left;
}
.attention-icon { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 12px; background: var(--orange-soft); color: var(--orange); }
.attention-card strong, .attention-card small { display: block; }
.attention-card small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.all-good { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid color-mix(in srgb, var(--green) 24%, transparent); border-radius: 16px; background: var(--green-soft); color: var(--green); }
.all-good strong, .all-good span { display: block; }
.all-good span { margin-top: 2px; color: color-mix(in srgb, var(--green) 65%, var(--text)); font-size: 11px; }

.board-summary { display: grid; grid-auto-columns: minmax(108px, 30vw); grid-auto-flow: column; gap: 8px; margin: 0 -13px 14px; padding: 1px 13px 5px; overflow-x: auto; scrollbar-width: none; }
.board-summary::-webkit-scrollbar { display: none; }
.board-summary > div { position: relative; min-height: 82px; overflow: hidden; padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 0 5px 15px rgba(18,39,49,.04); }
.board-summary > div::after { position: absolute; width: 44px; height: 44px; right: -17px; bottom: -19px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 12%, transparent); content: ""; }
.board-summary span, .board-summary strong, .board-summary small { display: block; }
.board-summary span { color: var(--muted); font-size: 9px; }
.board-summary strong { margin-top: 6px; font-size: 21px; }
.board-summary small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.board-summary .attention strong { color: var(--red); }
.board-summary .approval strong { color: var(--orange); }
.board-summary .ready strong { color: var(--green); }
.kanban { display: grid; grid-auto-columns: minmax(260px, 82vw); grid-auto-flow: column; gap: 11px; margin: 0 -13px; padding: 0 13px 13px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-left: 13px; scrollbar-width: none; }
.kanban::-webkit-scrollbar { display: none; }
.kanban-column { position: relative; min-height: 174px; overflow: hidden; padding: 10px; border: 1px solid var(--line); border-top: 3px solid #5b93ac; border-radius: 19px; background: color-mix(in srgb, var(--surface) 78%, var(--bg)); box-shadow: 0 8px 24px rgba(18, 39, 49, .055); scroll-snap-align: start; }
.kanban-column.status-column-approval { border-top-color: #b68c28; }
.kanban-column.status-column-in_progress { border-top-color: #d17b25; }
.kanban-column.status-column-ready { border-top-color: var(--green); }
.kanban-column > header { display: flex; min-height: 46px; align-items: center; gap: 8px; padding: 2px 3px 10px; }
.kanban-column > header > div { min-width: 0; flex: 1; }
.kanban-column > header strong, .kanban-column > header small { display: block; }
.kanban-column > header strong { font-size: 13px; }
.kanban-column > header small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.kanban-column > header b { display: grid; min-width: 24px; height: 24px; place-items: center; border-radius: 8px; background: var(--surface); font-size: 11px; }
.column-dot { width: 8px; height: 8px; border-radius: 50%; background: #5b93ac; }
.status-column-approval .column-dot { background: #b68c28; }
.status-column-in_progress .column-dot { background: #d17b25; }
.status-column-ready .column-dot { background: var(--green); }
.kanban-cards { display: grid; gap: 8px; }
.column-empty { display: grid; min-height: 104px; place-items: center; align-content: center; gap: 8px; border: 1px dashed var(--line); border-radius: 14px; color: var(--muted); font-size: 10px; text-align: center; }
.column-empty svg { opacity: .22; }

.card-list { display: grid; gap: 9px; }
.order-card { width: 100%; padding: 14px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); box-shadow: 0 4px 14px rgba(18, 39, 49, .035); text-align: left; }
.compact-card { padding: 12px; border-radius: 15px; }
.kanban-column .compact-card { border-left: 3px solid color-mix(in srgb, #5b93ac 58%, var(--line)); box-shadow: 0 6px 16px rgba(18, 39, 49, .055); }
.status-column-approval .compact-card { border-left-color: color-mix(in srgb, #b68c28 64%, var(--line)); }
.status-column-in_progress .compact-card { border-left-color: color-mix(in srgb, #d17b25 64%, var(--line)); }
.status-column-ready .compact-card { border-left-color: color-mix(in srgb, var(--green) 64%, var(--line)); }
.order-top, .order-bottom { display: flex; align-items: center; justify-content: space-between; gap: 9px; }
.order-number { color: var(--muted); font-size: 11px; font-weight: 850; }
.status { display: inline-flex; align-items: center; padding: 5px 8px; border-radius: 999px; background: var(--accent-soft); color: color-mix(in srgb, var(--accent) 85%, #15445a); font-size: 10px; font-weight: 850; white-space: nowrap; }
.status.approval { background: #f5eedb; color: #8b6a19; }
.status.ready { background: var(--green-soft); color: var(--green); }
.status.closed { background: rgba(98,112,122,.12); color: var(--muted); }
.status.in-progress { background: var(--orange-soft); color: var(--orange); }
.status.canceled { background: var(--red-soft); color: var(--red); }
.order-title { margin: 10px 0 2px; overflow: hidden; font-size: 16px; font-weight: 880; text-overflow: ellipsis; white-space: nowrap; }
.order-title span { color: var(--muted); font-weight: 650; }
.order-subtitle { margin: 0 0 8px; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.mechanic-line { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 11px; font-weight: 700; }
.mechanic-line.unassigned { color: var(--orange); }
.signal-row { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.signal { display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px; border-radius: 7px; background: var(--orange-soft); color: var(--orange); font-size: 9px; font-weight: 800; }
.signal.danger { background: var(--red-soft); color: var(--red); }
.order-bottom { margin-top: 11px; padding-top: 9px; border-top: 1px solid var(--line); }
.order-bottom span { color: var(--muted); font-size: 10px; }
.order-bottom strong { font-size: 13px; }

.page-title { display: flex; align-items: center; justify-content: space-between; gap: 11px; margin: 2px 0 16px; }
.page-title > div { min-width: 0; }
.page-title h2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.back-btn, .round-action { display: grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.back-btn { font-size: 23px; }
.round-action { background: var(--accent); color: var(--accent-text); }
.search-box { position: relative; display: flex; align-items: center; margin-bottom: 10px; }
.search-box > svg { position: absolute; left: 14px; z-index: 1; color: var(--muted); }
.search-box input { width: 100%; height: 47px; padding: 0 14px 0 43px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); color: var(--text); outline: none; }
.search-box input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 13%, transparent); }
.orders-tools { display: flex; align-items: center; justify-content: space-between; margin-bottom: 13px; }

.order-page-title { justify-content: flex-start; }
.detail-head { padding: 17px; border-radius: 20px; background: var(--navy); color: #fff; }
.detail-status-row { display: flex; align-items: center; justify-content: space-between; }
.detail-status-row > span:last-child { opacity: .62; font-size: 10px; }
.detail-primary { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: 16px; }
.detail-primary p { margin: 0 0 7px; opacity: .78; font-size: 12px; }
.detail-primary .mechanic-line { color: rgba(255,255,255,.7); }
.detail-money { flex: 0 0 auto; text-align: right; }
.detail-money strong, .detail-money small { display: block; }
.detail-money strong { font-size: 23px; }
.detail-money small { margin-top: 4px; font-size: 10px; }

.detail-tabs { position: sticky; top: calc(74px + env(safe-area-inset-top)); z-index: 20; display: flex; gap: 4px; margin: 10px -13px 0; padding: 5px 13px; overflow-x: auto; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(18px); scrollbar-width: none; }
.detail-tabs::-webkit-scrollbar { display: none; }
.detail-tabs button { display: flex; min-height: 39px; align-items: center; gap: 5px; padding: 7px 11px; border: 0; border-radius: 11px; background: transparent; color: var(--muted); font-size: 11px; font-weight: 800; white-space: nowrap; }
.detail-tabs button.active { background: var(--surface); box-shadow: 0 3px 10px rgba(0,0,0,.06); color: var(--text); }
.detail-tabs b { display: grid; min-width: 18px; height: 18px; place-items: center; border-radius: 6px; background: var(--orange-soft); color: var(--orange); font-size: 9px; }
.detail-section { padding-bottom: 12px; }
.detail-alerts { display: grid; gap: 7px; margin-top: 13px; }
.detail-alert { display: flex; min-height: 45px; align-items: center; gap: 9px; padding: 10px 12px; border-radius: 13px; background: var(--orange-soft); color: var(--orange); font-size: 12px; }
.detail-alert.danger { background: var(--red-soft); color: var(--red); }

.assignee-card { display: flex; align-items: center; gap: 11px; padding: 13px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.assignee-card.empty { border-style: dashed; }
.assignee-card strong, .assignee-card small { display: block; }
.assignee-card small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.avatar { display: grid; width: 43px; height: 43px; flex: 0 0 auto; place-items: center; border-radius: 14px; background: var(--accent-soft); color: var(--accent); font-weight: 850; }
.avatar.small { width: 39px; height: 39px; border-radius: 12px; }

.info-card, .note-card { margin: 8px 0; padding: 15px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); }
.info-row { display: grid; grid-template-columns: 104px 1fr; gap: 11px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.info-row:last-child { border-bottom: 0; }
.info-row span { color: var(--muted); }
.info-row strong { font-weight: 720; text-align: right; overflow-wrap: anywhere; }
.phone-info-row { align-items: center; }
.call-client-btn { display: inline-flex; min-height: 39px; align-items: center; justify-self: end; gap: 8px; padding: 6px 10px; border-radius: 12px; background: var(--green-soft); color: var(--green); text-decoration: none; }
.call-client-btn > span, .call-client-btn strong, .call-client-btn small { display: block; }
.call-client-btn strong { font-size: 12px; text-align: left; }
.call-client-btn small { margin-top: 1px; color: color-mix(in srgb, var(--green) 72%, var(--text)); font-size: 9px; font-weight: 750; text-align: left; }
.note-card small { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.note-card p { margin: 5px 0 15px; white-space: pre-wrap; }
.note-card p:last-child { margin-bottom: 0; }

.tool-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin-top: 13px; }
.tool-btn { min-height: 83px; padding: 11px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); text-align: left; }
.tool-btn > svg { color: var(--accent); }
.tool-btn span, .tool-btn strong, .tool-btn small { display: block; }
.tool-btn span { margin-top: 8px; }
.tool-btn strong { font-size: 12px; }
.tool-btn small { margin-top: 2px; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }

.line-item { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto auto; align-items: center; gap: 9px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.line-item:last-child { border-bottom: 0; }
.item-icon { display: grid; width: 33px; height: 33px; place-items: center; border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
.line-item small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.line-item > strong { font-size: 12px; white-space: nowrap; }
.edit-btn { display: grid; width: 32px; height: 32px; place-items: center; border: 0; border-radius: 10px; background: var(--surface-soft); color: var(--muted); }
.item-actions { display: flex; gap: 5px; }
.delete-btn { display: grid; width: 32px; height: 32px; place-items: center; border: 0; border-radius: 10px; background: var(--red-soft); color: var(--red); }
.totals { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.total-row { display: flex; justify-content: space-between; padding: 5px 0; color: var(--muted); font-size: 13px; }
.total-row.grand { color: var(--text); font-size: 17px; font-weight: 850; }

.diagnostic-cta { display: grid; width: 100%; min-height: 70px; grid-template-columns: 42px 1fr auto; align-items: center; gap: 10px; margin-top: 13px; padding: 12px; border: 1px solid color-mix(in srgb, var(--green) 28%, transparent); border-radius: 17px; background: var(--green-soft); color: var(--green); text-align: left; }
.diagnostic-cta > svg:first-child { margin: auto; }
.diagnostic-cta strong, .diagnostic-cta small { display: block; }
.diagnostic-cta small { margin-top: 3px; color: color-mix(in srgb, var(--green) 65%, var(--text)); font-size: 10px; }
.diagnostics-list { display: grid; gap: 8px; }
.diagnostic-card { padding: 14px; border: 1px solid color-mix(in srgb, var(--green) 20%, transparent); border-radius: 16px; background: color-mix(in srgb, var(--surface) 91%, var(--green-soft)); }
.diagnostic-card p { margin: 10px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.diagnostic-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.diagnostic-meta strong { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.diagnostic-meta span { color: var(--muted); font-size: 10px; white-space: nowrap; }
.diagnostic-sharing { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--line); }
.published-text { color: var(--green); font-weight: 800; }
.empty-panel { display: flex; min-height: 118px; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 20px; border: 1px dashed var(--line); border-radius: 17px; color: var(--muted); text-align: center; }
.empty-panel strong { color: var(--text); }
.empty-panel span { font-size: 11px; }

.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.photo-cell { position: relative; aspect-ratio: 1; overflow: hidden; padding: 0; border: 0; border-radius: 13px; background: var(--surface-soft); }
.photo-cell img { width: 100%; height: 100%; object-fit: cover; }
.photo-loader { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; flex-direction: column; gap: 4px; color: var(--muted); }
.photo-loader small { font-size: 9px; }
.video-cell { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 4px; color: var(--accent); }
.video-cell > small { color: var(--muted); font-size: 9px; }
.video-cell > span { position: absolute; right: 7px; bottom: 7px; display: grid; width: 25px; height: 25px; place-items: center; border-radius: 9px; background: var(--accent); color: var(--accent-text); font-size: 9px; }
.photo-empty { display: grid; min-height: 88px; grid-column: 1 / -1; place-items: center; border: 1px dashed var(--line); border-radius: 14px; color: var(--muted); font-size: 11px; }
.diagnostic-photos { margin-top: 10px; }
.inspection-status { display: grid; grid-template-columns: 43px minmax(0, 1fr); align-items: center; gap: 11px; padding: 13px; border: 1px solid color-mix(in srgb, var(--orange) 28%, var(--line)); border-radius: 17px; background: color-mix(in srgb, var(--surface) 86%, var(--orange-soft)); }
.inspection-status > span { display: grid; width: 43px; height: 43px; place-items: center; border-radius: 13px; background: var(--orange-soft); color: var(--orange); }
.inspection-status strong, .inspection-status small { display: block; }
.inspection-status small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.inspection-status.complete { border-color: color-mix(in srgb, var(--green) 28%, var(--line)); background: color-mix(in srgb, var(--surface) 88%, var(--green-soft)); }
.inspection-status.complete > span { background: var(--green-soft); color: var(--green); }
.inspection-tools { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.inspection-tools .tool-btn { min-width: 0; padding: 11px 8px; }
.inspection-tools .tool-btn > span { min-width: 0; }
.inspection-tools .tool-btn strong, .inspection-tools .tool-btn small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.section-actions { display: flex; align-items: center; gap: 5px; }
.vehicle-map { display: grid; grid-template-columns: minmax(0, 1fr) minmax(92px, .7fr) minmax(0, 1fr); gap: 7px; padding: 11px; border: 1px solid var(--line); border-radius: 21px; background: var(--surface); box-shadow: 0 7px 22px rgba(18, 39, 49, .04); }
.vehicle-side, .vehicle-center { display: grid; gap: 5px; }
.vehicle-center { padding: 6px; border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line)); border-radius: 34px 34px 27px 27px; background: color-mix(in srgb, var(--surface-soft) 78%, transparent); }
.vehicle-zone { position: relative; display: flex; min-width: 0; min-height: 40px; align-items: center; justify-content: center; padding: 6px 5px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-soft); color: var(--muted); font-size: 8px; font-weight: 780; line-height: 1.2; text-align: center; }
.vehicle-zone:disabled { cursor: default; }
.vehicle-zone:disabled:active { transform: none; }
.vehicle-center .vehicle-zone { border-radius: 18px; background: var(--surface); }
.vehicle-zone.marked { border-color: color-mix(in srgb, var(--red) 44%, var(--line)); background: color-mix(in srgb, var(--surface) 80%, var(--red-soft)); color: var(--red); }
.vehicle-zone b { position: absolute; top: -5px; right: -4px; display: grid; width: 19px; height: 19px; place-items: center; border: 2px solid var(--surface); border-radius: 50%; background: var(--red); color: #fff; font-size: 8px; }
.inspection-damages { display: grid; gap: 9px; }
.inspection-damage-card, .client-damage-card { overflow: hidden; padding: 13px; border: 1px solid var(--line); border-left: 4px solid var(--orange); border-radius: 16px; background: var(--surface); }
.inspection-damage-card.severity-minor { border-left-color: var(--green); }
.inspection-damage-card.severity-severe { border-left-color: var(--red); }
.damage-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.damage-card-head span, .damage-card-head strong { display: block; }
.damage-card-head span { color: var(--muted); font-size: 9px; }
.damage-card-head strong { margin-top: 4px; font-size: 14px; }
.damage-card-head > b { flex: 0 0 auto; padding: 5px 7px; border-radius: 8px; background: var(--orange-soft); color: var(--orange); font-size: 8px; }
.severity-minor .damage-card-head > b { background: var(--green-soft); color: var(--green); }
.severity-severe .damage-card-head > b { background: var(--red-soft); color: var(--red); }
.inspection-damage-card > p, .client-damage-card > p { margin: 10px 0; color: var(--muted); font-size: 11px; white-space: pre-wrap; }
.damage-audit { display: flex; align-items: center; justify-content: space-between; gap: 7px; margin: 11px -13px -13px; padding: 8px 13px; border-top: 1px solid var(--line); background: var(--surface-soft); color: var(--muted); font-size: 8px; }
.damage-audit span:first-child { color: var(--accent); font-weight: 800; }
.inspection-completeness { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.inspection-completeness > span { display: inline-flex; align-items: center; gap: 4px; padding: 6px 8px; border-radius: 9px; background: var(--green-soft); color: var(--green); font-size: 9px; font-weight: 750; }
.inspection-completeness > p { margin: 2px; }
.inspection-note { margin-top: 10px; }
.inspection-complete-btn { margin-top: 18px; }
.client-inspection-card { padding: 13px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.client-inspection-note small { color: var(--muted); font-size: 9px; }
.client-inspection-note p { margin: 5px 0 12px; font-size: 11px; }
.client-inspection-subhead { margin: 13px 1px 8px; color: var(--muted); font-size: 9px; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.client-damage-card > div:first-child span, .client-damage-card > div:first-child strong { display: block; }
.client-damage-card > div:first-child span { color: var(--muted); font-size: 9px; }
.client-damage-card > div:first-child strong { margin-top: 3px; font-size: 13px; }
.document-panel { display: grid; overflow: hidden; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); }
.document-panel button, .document-action { display: grid; width: 100%; min-height: 62px; grid-template-columns: 32px 1fr auto; align-items: center; gap: 9px; padding: 11px 13px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; }
.document-panel button:last-child, .document-action:last-of-type { border-bottom: 0; }
.document-panel strong, .document-panel small, .document-action strong, .document-action small { display: block; }
.document-panel small, .document-action small { margin-top: 2px; color: var(--muted); font-size: 10px; }

.timeline { position: relative; display: grid; gap: 0; padding-left: 2px; }
.timeline::before { position: absolute; top: 20px; bottom: 20px; left: 19px; width: 1px; background: var(--line); content: ""; }
.timeline-event { position: relative; z-index: 1; display: grid; grid-template-columns: 36px 1fr; gap: 10px; padding: 9px 0; }
.timeline-dot { display: grid; width: 36px; height: 36px; place-items: center; border: 4px solid var(--bg); border-radius: 50%; background: var(--accent-soft); color: var(--accent); }
.timeline-event > div { padding: 8px 11px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.timeline-event p { margin: 5px 0; white-space: pre-wrap; color: var(--muted); font-size: 11px; }
.timeline-event small { color: var(--muted); font-size: 9px; }

.command-bar { position: sticky; bottom: calc(68px + env(safe-area-inset-bottom)); z-index: 19; margin: 18px -5px -20px; padding: 8px 5px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(15px); }
.action-btn { display: flex; width: 100%; min-height: 50px; align-items: center; justify-content: center; gap: 7px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); font-size: 13px; font-weight: 850; }
.action-btn.primary { border-color: var(--accent); background: var(--accent); color: var(--accent-text); }

.employee { display: flex; align-items: center; gap: 11px; padding: 13px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.employee-info { min-width: 0; flex: 1; }
.employee-info strong, .employee-info small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.employee-info small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.role-select { max-width: 165px; margin-top: 7px; padding: 6px 7px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); color: var(--text); font-size: 11px; }
.switch-btn { min-height: 36px; padding: 7px 9px; border: 0; border-radius: 10px; background: var(--accent-soft); color: var(--accent); font-size: 10px; font-weight: 850; }
.switch-btn.block { background: var(--red-soft); color: var(--red); }
.employee-link-btn { min-height: 28px; margin-top: 3px; padding: 3px 0; font-size: 10px; }
.client-invite-action { margin-top: 10px; border-top: 1px solid var(--line); border-radius: 0; }

.client-home-hero { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; padding: 18px; border: 0; border-radius: 21px; background: linear-gradient(135deg, var(--navy), #176b78); box-shadow: var(--shadow); color: #fff; text-align: left; }
.client-home-hero > div > small, .client-home-hero > div > strong, .client-home-hero > div > span { display: block; }
.client-home-hero > div > small, .client-home-hero > div > span { opacity: .72; font-size: 10px; }
.client-home-hero > div > strong { margin: 6px 0; font-size: 17px; }
.client-home-hero > b { display: flex; align-items: center; gap: 3px; font-size: 11px; white-space: nowrap; }
.client-home-hero.attention { background: linear-gradient(135deg, #8f5215, #d1842e); }
.client-order-hero { position: relative; min-height: 194px; overflow: hidden; margin: -2px 0 11px; border-radius: 23px; background: linear-gradient(135deg, #123b52, #176b78); box-shadow: 0 14px 32px rgba(18,59,82,.18); color: #fff; }
.client-order-hero-media, .client-order-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.client-order-hero-media { display: grid; place-items: center; color: rgba(255,255,255,.72); }
.client-order-hero-fallback { position: absolute; right: -2px; bottom: -7px; color: rgba(255,255,255,.18); transform: scale(1.35); }
.client-order-hero-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7,24,32,.93) 0%, rgba(7,24,32,.68) 53%, rgba(7,24,32,.15) 100%), linear-gradient(0deg, rgba(7,24,32,.55), transparent 60%); }
.client-order-back { position: absolute; top: 12px; left: 12px; z-index: 3; display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid rgba(255,255,255,.22); border-radius: 12px; background: rgba(8,25,34,.44); color: #fff; font-size: 23px; backdrop-filter: blur(10px); }
.client-order-hero-copy { position: absolute; right: 16px; bottom: 16px; left: 16px; z-index: 2; }
.client-order-hero-copy p { margin: 0 0 6px; color: rgba(255,255,255,.64); font-size: 9px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.client-order-hero-copy h2 { max-width: 72%; font-size: 25px; }
.client-order-hero-copy > strong { display: block; max-width: 72%; margin-top: 3px; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.client-order-hero-copy > span { display: inline-flex; margin-top: 10px; padding: 5px 8px; border: 1px solid rgba(255,255,255,.2); border-radius: 999px; background: rgba(255,255,255,.15); font-size: 9px; font-weight: 850; backdrop-filter: blur(8px); }
.client-order-card { display: grid; width: 100%; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 15px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); text-align: left; }
.client-order-card.needs-action { border-color: color-mix(in srgb, var(--orange) 45%, var(--line)); background: color-mix(in srgb, var(--surface) 88%, var(--orange-soft)); }
.client-order-card > div:last-child { text-align: right; }
.client-order-card strong, .client-order-card small, .client-order-card span { display: block; }
.client-order-card > div:first-child > strong { margin: 5px 0; font-size: 15px; }
.client-order-card small, .client-order-card span { color: var(--muted); font-size: 10px; }
.client-status-card { padding: 17px; border-radius: 20px; background: var(--navy); color: #fff; }
.client-status-card > div:first-child > span, .client-status-card > div:first-child > strong, .client-status-card > div:first-child > small { display: block; }
.client-status-card > div:first-child > span, .client-status-card > div:first-child > small { opacity: .68; font-size: 10px; }
.client-status-card > div:first-child > strong { margin: 4px 0; font-size: 24px; }
.client-progress { display: grid; grid-template-columns: repeat(5, 1fr); margin-top: 18px; }
.client-progress-step { position: relative; display: flex; align-items: center; flex-direction: column; gap: 5px; opacity: .45; text-align: center; }
.client-progress-step::before { position: absolute; top: 10px; right: 50%; left: -50%; height: 2px; background: rgba(255,255,255,.25); content: ""; }
.client-progress-step:first-child::before { display: none; }
.client-progress-step span { position: relative; z-index: 1; display: grid; width: 22px; height: 22px; place-items: center; border: 2px solid rgba(255,255,255,.45); border-radius: 50%; font-size: 9px; font-weight: 850; }
.client-progress-step small { font-size: 8px; }
.client-progress-step.done { opacity: 1; }
.client-progress-step.done::before { background: #61d7b2; }
.client-progress-step.done span { border-color: #61d7b2; background: #23835f; }
.client-progress-step.current span { box-shadow: 0 0 0 4px rgba(97,215,178,.2); }
.client-next-step { margin-top: 17px; padding: 12px 13px; border-radius: 13px; background: rgba(255,255,255,.1); }
.client-next-step strong, .client-next-step span { display: block; }
.client-next-step strong { font-size: 12px; }
.client-next-step span { margin-top: 4px; opacity: .75; font-size: 10px; line-height: 1.4; }
.client-approval-card { margin: 12px 0 20px; padding: 15px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.client-approval-card.pending { border-color: color-mix(in srgb, var(--orange) 40%, var(--line)); background: color-mix(in srgb, var(--surface) 88%, var(--orange-soft)); }
.client-approval-card.approved { border-color: color-mix(in srgb, var(--green) 35%, var(--line)); background: color-mix(in srgb, var(--surface) 90%, var(--green-soft)); }
.client-approval-card.question { border-color: color-mix(in srgb, var(--orange) 35%, var(--line)); }
.approval-head { display: grid; grid-template-columns: 37px minmax(0, 1fr) auto; align-items: center; gap: 9px; }
.approval-head > span { display: grid; width: 37px; height: 37px; place-items: center; border-radius: 12px; background: var(--accent-soft); color: var(--accent); }
.approval-head small, .approval-head strong { display: block; }
.approval-head small { color: var(--muted); font-size: 9px; }
.approval-head strong { margin-top: 2px; font-size: 13px; }
.approval-head b { font-size: 15px; }
.client-approval-card > p { margin: 12px 0; color: var(--muted); font-size: 11px; }
.approval-actions { display: grid; grid-template-columns: 1.35fr 1fr; gap: 8px; }
.approval-actions button { min-height: 45px; border-radius: 13px; font-size: 11px; font-weight: 850; }
.approval-confirm { display: flex; align-items: center; justify-content: center; gap: 6px; border: 0; background: var(--green); color: #fff; }
.approval-question { border: 1px solid var(--line); background: var(--surface); }
.approval-note { display: block; margin-top: 10px; color: var(--muted); font-size: 9px; }
.approval-modal-total { display: flex; align-items: center; justify-content: space-between; padding: 13px; border-radius: 13px; background: var(--surface-soft); }
.approval-modal-total span { color: var(--muted); font-size: 11px; }
.approval-modal-total strong { font-size: 20px; }
.client-documents { padding: 3px; }
.client-documents .document-action { border-radius: 14px; }
.client-timeline .timeline-event > div { background: var(--surface); }
.client-contact-card { display: grid; gap: 9px; margin: 12px 0 16px; padding: 13px; border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line)); border-radius: 18px; background: linear-gradient(145deg, color-mix(in srgb, var(--surface) 92%, var(--accent-soft)), var(--surface)); }
.client-contact-card.compact { margin: 22px 0; }
.client-contact-copy > span, .client-contact-copy > strong, .client-contact-copy > small { display: block; }
.client-contact-copy > span { color: var(--accent); font-size: 9px; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.client-contact-copy > strong { margin-top: 3px; font-size: 14px; }
.client-contact-copy > small { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.client-master-call { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 9px; min-height: 56px; padding: 9px 11px; border-radius: 15px; background: var(--accent); color: #fff; text-decoration: none; box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 25%, transparent); }
.client-master-call > svg { padding: 8px; box-sizing: content-box; border-radius: 11px; background: rgba(255, 255, 255, .14); }
.client-master-call span, .client-master-call strong, .client-master-call small { display: block; }
.client-master-call strong { font-size: 12px; }
.client-master-call small { margin-top: 2px; color: rgba(255, 255, 255, .78); font-size: 9px; }
.client-master-call b { font-size: 10px; }
.client-service-call { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 5px 3px 0; color: var(--muted); font-size: 9px; text-decoration: none; }
.client-service-call b { color: var(--text); font-size: 10px; }

.template-list { display: grid; gap: 7px; }
.template-row { display: grid; grid-template-columns: 34px 1fr 32px; align-items: center; gap: 9px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.template-row strong, .template-row small { display: block; }
.template-row small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.template-row > button { display: grid; width: 30px; height: 30px; place-items: center; border: 0; border-radius: 9px; background: var(--surface-soft); color: var(--muted); font-size: 19px; }
.install-card { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px; border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--line)); border-radius: 18px; background: color-mix(in srgb, var(--surface) 88%, var(--accent-soft)); }
.install-card > img { width: 58px; height: 58px; border-radius: 17px; background: var(--navy); object-fit: cover; }
.install-card strong, .install-card small { display: block; }
.install-card strong { font-size: 14px; }
.install-card small { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.35; }
.install-card > button { display: flex; min-height: 38px; align-items: center; gap: 5px; padding: 8px 10px; border: 0; border-radius: 11px; background: var(--accent); color: var(--accent-text); font-size: 10px; font-weight: 850; }
.install-card > button:disabled { background: var(--surface-soft); color: var(--muted); }
.install-card.installed { border-color: color-mix(in srgb, var(--green) 30%, var(--line)); background: color-mix(in srgb, var(--surface) 88%, var(--green-soft)); }
.install-done { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 12px; background: var(--green-soft); color: var(--green); }
.community-card { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; gap: 11px; overflow: hidden; padding: 13px; border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line)); border-radius: 19px; background: linear-gradient(135deg, color-mix(in srgb, var(--navy) 94%, #000), color-mix(in srgb, var(--accent) 82%, var(--navy))); box-shadow: 0 12px 28px rgba(18, 59, 82, .16); color: #fff; }
.community-card.client-community { margin: 12px 0 20px; }
.community-card.compact { margin-top: 19px; }
.community-card > img { width: 56px; height: 56px; border: 2px solid rgba(255,255,255,.22); border-radius: 17px; background: #102c3d; object-fit: cover; }
.community-card > div { min-width: 0; }
.community-card span, .community-card strong, .community-card small { display: block; }
.community-card span { opacity: .66; font-size: 8px; font-weight: 850; letter-spacing: .05em; text-transform: uppercase; }
.community-card strong { margin-top: 4px; font-size: 14px; line-height: 1.2; }
.community-card small { margin-top: 4px; opacity: .72; font-size: 9px; line-height: 1.35; }
.community-card > button { display: flex; min-height: 39px; align-items: center; gap: 5px; padding: 8px 10px; border: 1px solid rgba(255,255,255,.2); border-radius: 12px; background: rgba(255,255,255,.15); color: #fff; font-size: 10px; font-weight: 850; backdrop-filter: blur(8px); }
.steps { margin: 0; padding-left: 22px; }
.steps li { margin: 8px 0; padding-left: 4px; color: var(--muted); font-size: 13px; }

.bottom-nav {
  --nav-count: 5;
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: repeat(var(--nav-count), 1fr);
  height: calc(67px + env(safe-area-inset-bottom));
  padding: 5px 8px env(safe-area-inset-bottom);
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(20px);
}
.nav-item, .nav-new { border: 0; background: transparent; }
.nav-item { display: flex; min-width: 54px; align-items: center; justify-content: center; flex-direction: column; gap: 2px; color: var(--muted); }
.nav-item span { display: grid; height: 25px; place-items: center; }
.nav-item small { font-size: 9px; font-weight: 800; }
.nav-item.active { color: var(--accent); }
.nav-new { position: relative; display: grid; width: 52px; height: 52px; overflow: hidden; margin: -13px auto 0; place-items: center; border: 1px solid rgba(255,255,255,.2); border-radius: 17px; background: linear-gradient(145deg, var(--wine-light) 0%, var(--wine) 42%, var(--wine-dark) 100%); box-shadow: 0 10px 25px rgba(119, 18, 38, .38), inset 0 1px 0 rgba(255,255,255,.2); color: #fff; }
.nav-new::before { position: absolute; inset: 0; background: radial-gradient(circle at 28% 20%, rgba(255,255,255,.28), transparent 31%); content: ""; }
.nav-new::after { position: absolute; width: 22px; height: 90px; top: -20px; left: -38px; transform: rotate(23deg); background: linear-gradient(90deg, transparent, rgba(255,255,255,.28), transparent); content: ""; animation: wine-shimmer 4.8s ease-in-out infinite; }
.nav-new span { position: relative; z-index: 2; filter: drop-shadow(0 1px 2px rgba(61,5,17,.35)); }
@keyframes wine-shimmer { 0%, 66% { transform: translateX(0) rotate(23deg); opacity: 0; } 72% { opacity: 1; } 88%, 100% { transform: translateX(118px) rotate(23deg); opacity: 0; } }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-end; justify-content: center; background: rgba(8, 19, 25, .52); backdrop-filter: blur(4px); }
.modal { width: min(100%, 680px); max-height: min(92dvh, 920px); overflow-y: auto; padding: 9px 16px calc(21px + env(safe-area-inset-bottom)); border-radius: 24px 24px 0 0; background: var(--surface-raised); color: var(--text); box-shadow: 0 -18px 50px rgba(0,0,0,.2); }
.modal-handle { width: 40px; height: 4px; margin: 2px auto 14px; border-radius: 8px; background: var(--line); }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 15px; }
.modal-close { width: 36px; height: 36px; border: 0; border-radius: 11px; background: var(--surface-soft); color: var(--text); font-size: 20px; }
.form-section { margin: 16px 0 8px; color: var(--muted); font-size: 10px; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.field { display: block; margin: 10px 0; }
.field span { display: block; margin: 0 0 6px 2px; color: var(--muted); font-size: 12px; font-weight: 750; }
.field input, .field select, .field textarea { width: 100%; min-height: 48px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 13px; background: var(--bg); color: var(--text); outline: none; }
.field textarea { min-height: 88px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.field-caption { display: block; margin: 13px 2px 7px; color: var(--muted); font-size: 11px; font-weight: 750; }
.check-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.compact-check { min-width: 0; min-height: 41px; margin: 0; padding: 8px; border: 1px solid var(--line); border-radius: 11px; background: var(--bg); }
.compact-check span { min-width: 0; font-size: 10px; line-height: 1.25; }
.addendum-notice { display: grid; grid-template-columns: 33px minmax(0, 1fr); align-items: center; gap: 9px; padding: 10px; border: 1px solid color-mix(in srgb, var(--orange) 28%, var(--line)); border-radius: 13px; background: var(--orange-soft); color: var(--orange); }
.addendum-notice strong, .addendum-notice small { display: block; }
.addendum-notice strong { font-size: 11px; }
.addendum-notice small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.submit-btn { width: 100%; min-height: 52px; margin-top: 11px; border: 0; border-radius: 15px; background: var(--accent); color: var(--accent-text); font-weight: 850; }
.submit-btn.danger { background: var(--red); color: #fff; }
.submit-btn:disabled { opacity: .55; }
.hint { color: var(--muted); font-size: 11px; }
.delete-warning { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid color-mix(in srgb, var(--red) 24%, transparent); border-radius: 15px; background: var(--red-soft); color: var(--red); }
.delete-warning > svg { flex: 0 0 auto; }
.delete-warning strong, .delete-warning span { display: block; }
.delete-warning span { margin-top: 4px; font-size: 11px; }
.invite-qr-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 13px; background: var(--surface-soft); }
.invite-qr-tabs button { min-height: 39px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 800; }
.invite-qr-tabs button.active { background: var(--surface); box-shadow: 0 3px 10px rgba(18, 39, 49, .08); color: var(--accent); }
.invite-qr-panel { display: none; margin-top: 9px; padding: 14px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); text-align: center; }
.invite-qr-panel.active { display: block; }
.invite-qr-panel img { display: block; width: min(220px, 75vw); height: auto; margin: 0 auto 10px; border: 8px solid #fff; border-radius: 13px; image-rendering: pixelated; }
.invite-qr-panel strong, .invite-qr-panel small { display: block; }
.invite-qr-panel small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.check-field { display: flex; min-height: 46px; align-items: center; gap: 9px; margin: 10px 0; }
.check-field input { width: 20px; height: 20px; accent-color: var(--accent); }
.check-field span { font-size: 12px; }
.photo-input { display: flex; min-height: 68px; align-items: center; gap: 12px; margin: 12px 0; padding: 13px; border: 1px dashed color-mix(in srgb, var(--accent) 42%, var(--line)); border-radius: 15px; background: var(--accent-soft); color: var(--accent); }
.photo-input input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.photo-input strong, .photo-input small { display: block; }
.photo-input small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.template-chips { display: flex; gap: 7px; margin: 0 -16px 13px; padding: 0 16px 5px; overflow-x: auto; scrollbar-width: none; }
.template-chips button { flex: 0 0 auto; min-height: 48px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); text-align: left; }
.template-chips button.active { border-color: var(--accent); background: var(--accent-soft); }
.template-chips small { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; }
.document-action { margin-bottom: 2px; border-radius: 13px; background: var(--bg); }

.lightbox { position: fixed; inset: 0; z-index: 110; display: grid; place-items: center; padding: 16px; background: rgba(5, 12, 16, .92); }
.lightbox img { max-width: 100%; max-height: 88dvh; border-radius: 12px; object-fit: contain; }
.lightbox video { width: min(100%, 900px); max-height: 88dvh; border-radius: 12px; background: #000; }
.lightbox button { position: absolute; top: calc(12px + env(safe-area-inset-top)); right: 13px; z-index: 1; width: 42px; height: 42px; border: 0; border-radius: 14px; background: rgba(255,255,255,.16); color: #fff; font-size: 24px; }

.toast { position: fixed; right: 14px; bottom: calc(78px + env(safe-area-inset-bottom)); left: 14px; z-index: 200; max-width: 520px; margin: auto; padding: 12px 14px; transform: translateY(30px); border-radius: 13px; background: #162832; box-shadow: var(--shadow); color: #fff; font-size: 12px; font-weight: 750; opacity: 0; pointer-events: none; transition: .2s ease; }
.toast.show { transform: translateY(0); opacity: 1; }
.toast.error { background: #9f3939; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

.skeleton-page { display: grid; gap: 11px; }
.skeleton { overflow: hidden; border-radius: 17px; background: color-mix(in srgb, var(--text) 7%, transparent); animation: pulse 1.2s ease-in-out infinite alternate; }
.hero-skeleton { height: 128px; }
.skeleton-row { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.skeleton-row > div { height: 58px; }
.card-skeleton { height: 118px; }
@keyframes pulse { to { opacity: .45; } }

@media (min-width: 720px) {
  .content { padding: 23px 21px 40px; }
  .metrics { grid-template-columns: repeat(4, 1fr); }
  .board-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-flow: row; margin: 0 0 14px; padding: 0; }
  .kanban { grid-auto-columns: minmax(245px, 1fr); margin: 0; padding: 0 0 10px; }
  .photo-grid { grid-template-columns: repeat(4, 1fr); }
  .finance-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bottom-nav { right: auto; left: 50%; width: min(100%, 820px); transform: translateX(-50%); border-right: 1px solid var(--line); border-left: 1px solid var(--line); border-radius: 20px 20px 0 0; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --surface-raised: var(--surface);
    --surface-soft: color-mix(in srgb, var(--text) 8%, var(--surface));
    --accent-soft: color-mix(in srgb, var(--accent) 22%, transparent);
    --green-soft: rgba(35, 131, 95, .18);
    --orange-soft: rgba(184, 107, 27, .18);
    --red-soft: rgba(201, 71, 71, .18);
    --navy: #143d53;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
