/* KamaCoffee Mini App v2 — тёмный «бенто»-интерфейс.
   Один тёмный вид (как в референсах), яркие плитки, крупные цифры Unbounded, текст Manrope.
   Цвета графика (фиолетовый/оранжевый) проверены валидатором dataviz на поверхности #17171b. */
:root {
  color-scheme: dark;
  --bg: #0b0b0d;
  --surface: #17171b;
  --surface-2: #222228;
  --surface-3: #2c2c34;
  --text: #f6f6f8;
  --text-2: #b9b9c4;
  --text-3: #8d8d9a;
  --line: #2a2a31;
  --ink: #0b0b0d;            /* текст на ярких плитках */

  --violet: #7a5cf5;
  --violet-soft: #2a2250;
  --yellow: #ffc83a;
  --blue: #3aa0ff;
  --lime: #b9f53b;
  --orange: #ff5b2e;
  --orange-soft: #3d1c12;
  --teal: #2fd6c3;

  --series-1: #9085e9;
  --series-2: #d95926;
  --grid: #2a2a31;

  --display: "Unbounded", "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r-lg: 28px;
  --r-md: 22px;
  --r-sm: 14px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); }
body {
  color: var(--text);
  font: 500 16px/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
[hidden] { display: none !important; }
svg.ic { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

#app { max-width: 560px; margin: 0 auto; min-height: 100vh; padding: 0 16px calc(112px + env(safe-area-inset-bottom)); }

/* ---- шапка */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 0 4px; }
.brand-mark { width: 44px; height: 44px; border-radius: 50%; background: var(--text); color: var(--ink); display: grid; place-items: center; flex: none; }
.who { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px 0 6px; border-radius: 999px; background: var(--surface); color: var(--text-2); font-size: 14px; font-weight: 600; }
.who .av { width: 32px; height: 32px; border-radius: 50%; background: var(--violet); color: #fff; display: grid; place-items: center; font: 600 13px/1 var(--display); }
.top-right { display: flex; align-items: center; gap: 8px; }
.lang { display: inline-flex; align-items: center; gap: 2px; min-height: 44px; padding: 4px; border: 0; border-radius: 999px; background: var(--surface); font: 700 12px/1 var(--body); letter-spacing: .04em; color: var(--text-3); }
.lang span { display: grid; place-items: center; min-width: 36px; height: 36px; border-radius: 999px; transition: background .15s, color .15s; }
.lang span.on { background: var(--text); color: var(--ink); }
.lang:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.hello { font: 400 30px/1.15 var(--display); letter-spacing: -.02em; margin: 14px 0 18px; }
.hello span { color: var(--text-3); font-weight: 300; }

.page-head { display: flex; align-items: center; gap: 12px; padding: 16px 0 10px; }
.round { width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--surface); color: var(--text); display: grid; place-items: center; flex: none; transition: background .15s; }
.round:active { background: var(--surface-3); }
.round:disabled { opacity: .3; }
.page-title { font: 500 22px/1.2 var(--display); letter-spacing: -.02em; margin: 0; }

h2.section { font: 600 12px/1 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); margin: 28px 0 12px; }

/* ---- карточки */
.card { background: var(--surface); border-radius: var(--r-lg); }
.card.pad { padding: 18px; }
.empty { color: var(--text-3); text-align: center; padding: 24px 14px; font-size: 14px; }

/* ---- бенто-плитки */
.bento { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile-btn { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; gap: 18px; min-height: 148px; padding: 16px; border: 0; text-align: left; color: var(--ink); border-radius: var(--r-lg); transition: transform .15s ease, filter .15s ease; isolation: isolate; }
.tile-btn:active { transform: scale(.975); filter: brightness(.95); }
.tile-btn::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: repeating-radial-gradient(circle at 105% -5%, transparent 0 11px, rgba(0, 0, 0, .09) 11px 12px); -webkit-mask-image: radial-gradient(circle at 105% -5%, #000 0 58%, transparent 78%); mask-image: radial-gradient(circle at 105% -5%, #000 0 58%, transparent 78%); }
.tile-btn .badge-ic { width: 44px; height: 44px; border-radius: 50%; background: rgba(11, 11, 13, .16); display: grid; place-items: center; }
.tile-btn .big { font: 500 22px/1.15 var(--display); letter-spacing: -.02em; }
.tile-btn .lbl { display: inline-block; font-weight: 700; font-size: 14.5px; line-height: 1.25; opacity: .8; margin-top: 6px; }
.tile-btn.violet { background: var(--violet); color: #fff; }
.tile-btn.violet .badge-ic { background: rgba(255, 255, 255, .18); }
.tile-btn.violet::after { background: repeating-radial-gradient(circle at 105% -5%, transparent 0 11px, rgba(255, 255, 255, .13) 11px 12px); }
.tile-btn.yellow { background: var(--yellow); border-top-right-radius: 112px; }
.tile-btn.blue { background: var(--blue); }
.tile-btn.lime { background: var(--lime); border-radius: 999px; align-items: center; justify-content: center; text-align: center; gap: 8px; aspect-ratio: 1; min-height: 0; }
.tile-btn.lime::after { display: none; }
.tile-btn.orange { background: var(--orange); }
.tile-btn.wide { grid-column: 1 / -1; min-height: 0; flex-direction: row; align-items: center; justify-content: flex-start; gap: 14px; padding: 18px 16px; }
.tile-btn.wide .big { font-size: 17px; }
.tile-btn.wide .lbl { margin-top: 2px; }

/* ---- планы */
.plan-row { display: flex; align-items: center; gap: 14px; padding: 14px 18px; }
.plan-row + .plan-row { border-top: 1px solid var(--line); }
.plan-when { min-width: 98px; }
.plan-day { font-size: 12.5px; color: var(--text-3); font-weight: 600; }
.plan-time { font: 400 20px/1.2 var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.plan-what { min-width: 0; }
.plan-loc { font-weight: 700; font-size: 15px; }
.plan-staff { color: var(--text-3); font-size: 13.5px; }

/* ---- чипы и пилюли */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 8px 18px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); font-size: 15px; font-weight: 600; color: var(--text-2); transition: background .15s, color .15s, border-color .15s; }
.chip[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--ink); }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px 2px; scrollbar-width: none; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chips.scroll .chip { flex: none; }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 5px; border-radius: 999px; background: var(--surface); }
.seg button { min-height: 44px; border: 0; border-radius: 999px; background: none; font-size: 14.5px; font-weight: 700; color: var(--text-3); padding: 6px 8px; transition: background .15s, color .15s; }
.seg button[aria-pressed="true"] { background: var(--text); color: var(--ink); }
.card .seg { background: var(--surface-2); }

/* ---- лента */
.feed { display: flex; flex-direction: column; gap: 10px; }
.event { padding: 16px; border-radius: var(--r-md); }
.event-head { display: flex; align-items: center; gap: 12px; }
.event-ico { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: var(--ink); flex: none; }
.event.clean .event-ico { background: var(--violet); color: #fff; }
.event.plan .event-ico { background: var(--yellow); }
.event.urgent .event-ico { background: var(--orange); }
.event.delivery .event-ico { background: var(--blue); }
.event-main { min-width: 0; flex: 1; }
.event-title { font-weight: 700; font-size: 15.5px; line-height: 1.3; }
.event-meta { color: var(--text-3); font-size: 13px; }
.event-body { margin: 12px 0 0 56px; font-size: 14px; color: var(--text-2); }
.event-body .row + .row { margin-top: 6px; }
.event-body b { color: var(--text); font-weight: 700; }
.tagline { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { background: var(--surface-2); border-radius: 999px; padding: 4px 11px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.tag.miss { background: var(--orange-soft); color: #ffb39c; }
.photo-btn { margin-top: 12px; min-height: 44px; padding: 8px 18px; border-radius: 999px; border: 1.5px solid var(--line); background: none; font-size: 14px; color: var(--text); font-weight: 700; display: inline-flex; align-items: center; gap: 8px; }
.photo-btn svg.ic { width: 18px; height: 18px; }
.photo { display: block; width: 100%; max-height: 380px; object-fit: cover; border-radius: 18px; margin-top: 12px; background: var(--surface-2); }

/* ---- формы */
.form { display: flex; flex-direction: column; gap: 22px; padding-top: 8px; }
.field > .label { display: block; font-weight: 700; font-size: 14.5px; margin-bottom: 10px; }
.field .help { color: var(--text-3); font-size: 13px; margin-top: 8px; }
.input, select.input, textarea.input { width: 100%; min-height: 54px; padding: 14px 18px; border-radius: 20px; border: 1.5px solid var(--line); background: var(--surface); font-size: 16px; font-weight: 600; }
select.input { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%); background-position: calc(100% - 25px) 50%, calc(100% - 19px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }
textarea.input { min-height: 110px; resize: vertical; }
.input::placeholder { color: var(--text-3); font-weight: 500; }
.input:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.chip:focus-visible, .seg button:focus-visible, .btn:focus-visible, .tile-btn:focus-visible, .tab:focus-visible, .round:focus-visible, .photo-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.input.big { font: 500 40px/1.1 var(--display); text-align: center; min-height: 92px; letter-spacing: -.02em; }

.photo-pick { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 150px; border: 1.5px dashed var(--surface-3); border-radius: var(--r-lg); background: var(--surface); color: var(--text-2); font-size: 14.5px; font-weight: 600; text-align: center; padding: 16px; cursor: pointer; }
.photo-pick .badge-ic { width: 52px; height: 52px; border-radius: 50%; background: var(--violet); color: #fff; display: grid; place-items: center; }
.photo-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.photo-preview { position: relative; }
.photo-preview img { display: block; width: 100%; max-height: 320px; object-fit: cover; border-radius: var(--r-lg); }
.photo-preview button { position: absolute; top: 12px; right: 12px; min-height: 40px; padding: 6px 16px; border: 0; border-radius: 999px; background: rgba(11, 11, 13, .78); color: #fff; font-size: 13.5px; font-weight: 700; }

.submit-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; padding: 28px 16px calc(14px + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--bg) 62%, transparent); }
.submit-bar .inner { max-width: 528px; margin: 0 auto; }
.btn { width: 100%; min-height: 58px; border: 0; border-radius: 999px; background: var(--lime); color: var(--ink); font-weight: 800; font-size: 16px; transition: filter .15s, transform .15s; }
.btn:active { transform: scale(.985); filter: brightness(.93); }
.btn:disabled { opacity: .5; }
.btn.danger { background: var(--orange); }
.btn.white { background: var(--text); }
.btn.ghost { background: none; color: var(--text-2); border: 1.5px solid var(--line); min-height: 44px; width: auto; padding: 6px 16px; font-weight: 700; font-size: 14px; }
.btn.small { min-height: 44px; width: auto; padding: 6px 18px; font-size: 14px; }

/* ---- плавающая нижняя панель */
.tabs { position: fixed; left: 0; right: 0; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 20; display: flex; justify-content: center; pointer-events: none; }
.tabs .inner { pointer-events: auto; display: flex; gap: 6px; padding: 7px; border-radius: 999px; background: rgba(34, 34, 40, .86); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); box-shadow: 0 12px 34px rgba(0, 0, 0, .55), inset 0 0 0 1px rgba(255, 255, 255, .06); }
.tab { width: 52px; height: 52px; border: 0; border-radius: 999px; background: none; color: var(--text-2); display: grid; place-items: center; transition: background .2s, color .2s; }
.tab[aria-current="page"] { background: var(--text); color: var(--ink); }

/* ---- статистика */
.glow { position: relative; overflow: hidden; border-radius: var(--r-lg); padding: 20px; background: #101015; isolation: isolate; }
.glow::before { content: ""; position: absolute; inset: 0; z-index: -1; }
.glow.violet::before { background: radial-gradient(120% 95% at 0% 0%, #5f43f0 0%, rgba(95, 67, 240, 0) 58%), radial-gradient(95% 90% at 100% 100%, #3a2bb8 0%, rgba(58, 43, 184, 0) 62%); }
.glow.magenta::before { background: radial-gradient(130% 120% at 0% 0%, #a534d6 0%, rgba(165, 52, 214, 0) 62%), radial-gradient(90% 90% at 100% 100%, #6a1f96 0%, rgba(106, 31, 150, 0) 60%); }
.glow.orange::before { background: radial-gradient(130% 120% at 100% 0%, #e05a1c 0%, rgba(224, 90, 28, 0) 62%), radial-gradient(90% 90% at 0% 100%, #8a3210 0%, rgba(138, 50, 16, 0) 60%); }
.glow.teal::before { background: radial-gradient(130% 130% at 0% 100%, #159a8b 0%, rgba(21, 154, 139, 0) 62%), radial-gradient(90% 90% at 100% 0%, #0c5a52 0%, rgba(12, 90, 82, 0) 60%); }
.k-label { font-size: 13.5px; font-weight: 600; color: rgba(255, 255, 255, .78); }
.k-value { font: 400 28px/1.1 var(--display); letter-spacing: -.03em; margin-top: 6px; white-space: nowrap; }
.k-unit { font: 600 13px/1 var(--body); color: rgba(255, 255, 255, .7); margin-left: 4px; letter-spacing: 0; }
.k-sub { font-size: 12.5px; font-weight: 600; color: rgba(255, 255, 255, .66); margin-top: 6px; }
.hero > .k-value { font-size: 68px; font-weight: 400; line-height: 1; margin-top: 10px; }
.hero-grid .k-value { font-size: 24px; font-weight: 400; }
.hero-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.hero-tag { font-size: 13px; font-weight: 700; color: rgba(255, 255, 255, .85); padding-top: 2px; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 16px; margin-top: 22px; }
.dots { height: 6px; margin-top: 10px; border-radius: 3px; background-image: radial-gradient(circle, rgba(255, 255, 255, .5) 1.1px, transparent 1.4px); background-size: 6px 6px; position: relative; }
.dots i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: #fff; min-width: 6px; }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.kpis .glow { min-height: 132px; display: flex; flex-direction: column; justify-content: flex-end; }
.kpis .glow.wide { grid-column: 1 / -1; min-height: 0; }

.chart-card { padding: 18px 14px 14px; }
.chart-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 4px; }
.chart-title { font-weight: 700; font-size: 15.5px; line-height: 1.3; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 12px 4px 4px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.legend .key { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 7px; vertical-align: -1px; }
.chart-wrap { position: relative; margin-top: 8px; }
.chart-wrap svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-wrap .axis { fill: var(--text-3); font: 600 11px var(--body); font-variant-numeric: tabular-nums; }
.chart-wrap .grid { stroke: var(--grid); stroke-width: 1; }
.chart-wrap .hit { fill: transparent; }
.chart-wrap .col.on path.seg { filter: brightness(1.25); }
.chart-wrap .col:focus { outline: none; }
.chart-wrap .col:focus-visible .hit { stroke: #fff; stroke-width: 1.5; }
.tip { position: absolute; z-index: 2; min-width: 156px; pointer-events: none; background: var(--surface-3); border-radius: 16px; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); padding: 12px 14px; font-size: 13px; }
.tip .tip-title { color: var(--text-3); font-size: 12px; font-weight: 600; margin-bottom: 6px; }
.tip .tip-row { display: flex; align-items: center; gap: 8px; }
.tip .tip-row b { font-size: 14.5px; color: var(--text); font-weight: 800; }
.tip .tip-row span { color: var(--text-2); }
.tip .tip-key { width: 12px; height: 3px; border-radius: 2px; flex: none; }
.tip .tip-total { border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 8px; padding-top: 8px; }

table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th { text-align: left; font-weight: 700; color: var(--text-3); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; padding: 8px 6px; border-bottom: 1px solid var(--line); }
table.data td { padding: 11px 6px; border-bottom: 1px solid var(--line); }
table.data tr:last-child td { border-bottom: 0; }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.table-scroll { overflow-x: auto; }

/* ---- зарплата: уборки за месяц */
.lock-note { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px 0 10px; margin-bottom: 14px; border-radius: 999px; background: var(--surface); color: var(--text-2); font-size: 13px; font-weight: 600; }
.lock-note svg.ic { width: 16px; height: 16px; }
.month-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.month-name { text-align: center; line-height: 1.3; }
.month-name b { display: block; font: 500 19px/1.2 var(--display); letter-spacing: -.02em; text-transform: capitalize; }
.pay-hero { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pay-hero .k-value { font-size: 26px; }
.people { display: flex; flex-direction: column; gap: 10px; }
.person { padding: 16px; border-radius: var(--r-md); }
.person-head { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 0; border: 0; background: none; text-align: left; border-radius: 14px; }
.person-head:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
.person-count { text-align: right; line-height: 1.2; }
.person-count b { display: block; font: 500 22px/1.1 var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.person-count span { color: var(--text-3); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.person-toggle { width: 32px; height: 32px; border-radius: 50%; background: var(--surface-2); color: var(--text-2); display: grid; place-items: center; flex: none; }
.person-toggle svg.ic { width: 18px; height: 18px; }
.person .tagline { margin: 14px 0 0; }
.person .tag { font-variant-numeric: tabular-nums; }
.day-list { margin-top: 14px; border-top: 1px solid var(--line); }
.day-row { display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.day-row:last-child { border-bottom: 0; padding-bottom: 0; }
.day-date b { display: block; font: 500 15px/1.2 var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.day-date span { color: var(--text-3); font-size: 12.5px; font-weight: 600; }
.day-items { display: flex; flex-direction: column; gap: 4px; min-width: 0; font-size: 14px; color: var(--text-2); }
.day-item { display: flex; gap: 10px; align-items: baseline; min-width: 0; }
.day-item span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.day-time { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }
.day-count { min-width: 40px; height: 32px; padding: 0 10px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); display: grid; place-items: center; font: 600 13px/1 var(--body); font-variant-numeric: tabular-nums; }
.day-count.many { background: var(--lime); color: var(--ink); }
.btn.export { margin-top: 16px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; }
.help.center { text-align: center; color: var(--text-3); font-size: 13px; margin-top: 10px; }

/* ---- календарь уборок */
.card.cal { padding: 16px 12px; }
.chips.scroll.cal-filter { margin: 0 -12px 14px; padding: 0 12px 2px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-wd { text-align: center; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); padding-bottom: 4px; }
.cal-cell { position: relative; aspect-ratio: 1; min-width: 0; border: 0; border-radius: 14px; background: var(--surface-2); color: var(--text-2); display: grid; place-items: center; padding: 0; transition: transform .12s ease, background .15s; }
.cal-cell.blank { background: none; }
.cal-cell:active { transform: scale(.94); }
.cal-cell .cal-num { font: 500 14px/1 var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.cal-cell.future { background: none; box-shadow: inset 0 0 0 1px var(--line); color: var(--text-3); }
.cal-cell.has { background: var(--lime); color: var(--ink); }
.cal-cell.today { box-shadow: inset 0 0 0 2px var(--violet); }
.cal-cell.has.today { box-shadow: inset 0 0 0 2px var(--ink), 0 0 0 2px var(--violet); }
.cal-cell.sel { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px #fff; }
.cal-cell:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.cal-count { position: absolute; top: 3px; right: 4px; font: 800 9.5px/1 var(--body); }
.cal-dots { position: absolute; bottom: 5px; left: 0; right: 0; display: flex; justify-content: center; gap: 2px; }
.cal-dots i { width: 6px; height: 6px; min-width: 0; border-radius: 50%; box-shadow: 0 0 0 1px rgba(11, 11, 13, .55); }
.cal-legend { display: flex; gap: 16px; margin-top: 14px; font-size: 12.5px; font-weight: 600; color: var(--text-3); }
.cal-key { display: inline-block; width: 12px; height: 12px; border-radius: 4px; background: var(--surface-2); margin-right: 7px; vertical-align: -2px; }
.cal-key.has { background: var(--lime); }
.cal-hint { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--text-3); font-size: 13.5px; text-align: center; }
.cal-detail { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.cal-detail .cal-hint { border: 0; margin: 0; padding: 6px 0 0; }
.cal-detail-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.cal-detail-head b { font: 500 15px/1.2 var(--display); letter-spacing: -.02em; }
.cal-detail-head span { color: var(--text-3); font-size: 13px; font-weight: 600; }
.cal-entry { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.cal-entry .avatar { width: 38px; height: 38px; font-size: 13px; }

/* ---- обзор по месяцам */
.months { overflow: hidden; }
.month-row { display: block; width: 100%; padding: 16px 18px; border: 0; background: none; text-align: left; transition: background .15s; }
.month-row + .month-row { border-top: 1px solid var(--line); }
.month-row:active { background: var(--surface-2); }
.month-row:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
.month-row-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.month-row-top b { font: 500 15px/1.2 var(--display); letter-spacing: -.02em; text-transform: capitalize; }
.month-total { font: 500 17px/1.2 var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.month-bar { height: 12px; margin-top: 10px; border-radius: 0 4px 4px 0; background: var(--surface-2); }
.month-bar i { display: block; height: 12px; border-radius: 0 4px 4px 0; background: var(--series-1); }
.month-sub { margin-top: 8px; color: var(--text-3); font-size: 13px; font-weight: 600; }

/* ---- команда */
.user-row { display: flex; align-items: center; gap: 12px; padding: 16px 18px; }
.user-row + .user-row { border-top: 1px solid var(--line); }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--violet); color: #fff; display: grid; place-items: center; font: 600 15px/1 var(--display); flex: none; }
.avatar.c1 { background: var(--yellow); color: var(--ink); }
.avatar.c2 { background: var(--blue); color: var(--ink); }
.avatar.c3 { background: var(--lime); color: var(--ink); }
.avatar.c4 { background: var(--orange); color: var(--ink); }
.user-main { min-width: 0; flex: 1; }
.user-name { font-weight: 700; }
.user-meta { color: var(--text-3); font-size: 13px; }
.user-row { flex-wrap: wrap; }
.user-actions { display: flex; gap: 8px; flex-wrap: wrap; flex-basis: 100%; padding-left: 56px; }
.badge { display: inline-block; border-radius: 999px; padding: 2px 9px; font-size: 11.5px; font-weight: 700; background: var(--surface-3); color: var(--text-2); margin-left: 8px; vertical-align: 1px; }
.badge.wait { background: var(--yellow); color: var(--ink); }

/* ---- разное */
.state { min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 12px; padding: 24px; color: var(--text-2); }
.state .badge-ic { width: 64px; height: 64px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; color: var(--text); }
.state h1 { font: 500 20px/1.25 var(--display); margin: 0; color: var(--text); }
.spinner { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--surface-3); border-top-color: var(--lime); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.dim { opacity: .5; transition: opacity .15s; }
.rise > * { animation: rise .38s cubic-bezier(.2, .7, .2, 1) both; }
.rise > *:nth-child(2) { animation-delay: .04s; }
.rise > *:nth-child(3) { animation-delay: .08s; }
.rise > *:nth-child(4) { animation-delay: .12s; }
.rise > *:nth-child(5) { animation-delay: .16s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

#toast { position: fixed; left: 50%; bottom: calc(100px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 30; max-width: min(90vw, 480px); background: var(--text); color: var(--ink); border-radius: 999px; padding: 13px 22px; font-size: 14.5px; font-weight: 700; box-shadow: 0 12px 34px rgba(0, 0, 0, .55); text-align: center; }
#toast.err { background: var(--orange); border-radius: 22px; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
@media (max-width: 350px) {
  .hello { font-size: 25px; }
  .tile-btn .big { font-size: 20px; }
  .hero > .k-value { font-size: 56px; }
}
