/* Cosmo Mini App — фирменный стиль «океан»: синяя hero-карточка с засветом + светлые карточки.
   Цвета поверхностей берутся из themeParams Telegram (--tg-theme-*), поэтому тёмная тема работает сама. */
:root {
  --page: var(--tg-theme-secondary-bg-color, #f2f4f8);
  --card: var(--tg-theme-section-bg-color, var(--tg-theme-bg-color, #ffffff));
  --text: var(--tg-theme-text-color, #0f172a);
  --sub: color-mix(in srgb, var(--text) 58%, var(--card));       /* подписи: контраст лучше, чем hint */
  --line: color-mix(in srgb, var(--text) 9%, transparent);
  --fill: color-mix(in srgb, var(--text) 5%, var(--card));        /* светлая плашка внутри карточки */
  --fill-2: color-mix(in srgb, var(--text) 9%, var(--card));

  --ocean-900: #0a1a40;
  --ocean-800: #0b1f4d;
  --ocean-700: #102a6b;
  --brand: #1d4fd8;
  --brand-ink: #1d4fd8;                                           /* синий текст/обводки на светлом */
  --on-brand: #ffffff;
  --teal: #3dd6c6;
  --yellow: #f7c948;
  --good: #16a34a;
  --bad: #e5484d;

  --r-xl: 24px;
  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 12px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 10px 28px -14px rgba(15, 23, 42, .18);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --safe-b: env(safe-area-inset-bottom, 0px);
  font-synthesis: none;
}
body.dark {
  color-scheme: dark;
  --page: var(--tg-theme-secondary-bg-color, #0f1218);
  --card: var(--tg-theme-section-bg-color, var(--tg-theme-bg-color, #1a1e26));
  --text: var(--tg-theme-text-color, #f1f5f9);
  --sub: color-mix(in srgb, var(--text) 62%, var(--card));
  --line: color-mix(in srgb, var(--text) 12%, transparent);
  --fill: color-mix(in srgb, var(--text) 7%, var(--card));
  --fill-2: color-mix(in srgb, var(--text) 12%, var(--card));
  --brand-ink: #7ea2ff;
  --good: #3fcf8e;
  --bad: #ff6b6b;
  --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 10px 28px -16px rgba(0, 0, 0, .6);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--page); color: var(--text);
  font: 15px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased; }
#app { padding: 12px 14px calc(96px + var(--safe-b)); max-width: 560px; margin: 0 auto; }
h1 { font-size: 24px; line-height: 1.15; margin: 0; letter-spacing: -.3px; }
h2 { font-size: 17px; margin: 22px 4px 10px; letter-spacing: -.2px; }
.muted { color: var(--sub); font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.loader { padding: 40px 0; text-align: center; color: var(--sub); }
a { color: var(--brand-ink); }

:focus-visible { outline: 2px solid var(--brand-ink); outline-offset: 2px; }

/* ---------------------------------------------------------------- базовые элементы */
.card { background: var(--card); border-radius: var(--r-lg); padding: 16px; margin: 10px 0; box-shadow: var(--shadow); }
.card.flat { box-shadow: none; }
.card > h2:first-child, .card > .card-title:first-child { margin-top: 0; }
.card-title { font-size: 16px; font-weight: 650; margin: 0 0 10px; }
.label { color: var(--sub); font-size: 13px; }

button, .btn { font: inherit; border: 0; border-radius: var(--r-md); padding: 12px 16px; cursor: pointer;
  background: var(--brand); color: var(--on-brand); min-height: 46px; font-weight: 600;
  transition: transform .15s var(--ease), background-color .15s, opacity .15s, box-shadow .15s; }
button:active { transform: scale(.98); }
button.ghost { background: var(--fill-2); color: var(--text); font-weight: 500; }
button.small { padding: 7px 12px; min-height: 36px; font-size: 14px; border-radius: var(--r-sm); }
button.danger { background: color-mix(in srgb, var(--bad) 12%, var(--card)); color: var(--bad); }
button.link { background: none; color: var(--brand-ink); padding: 4px 2px; min-height: 0; font-weight: 500; }
button:disabled { opacity: .5; cursor: default; }

input, select, textarea { font: inherit; width: 100%; padding: 12px 14px; border-radius: var(--r-sm);
  border: 1px solid transparent; background: var(--fill); color: var(--text); min-height: 46px;
  transition: border-color .15s, background-color .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand-ink); background: var(--card); }
input:disabled { opacity: .45; }
input[type=checkbox] { width: 22px; height: 22px; min-height: 0; accent-color: var(--brand); padding: 0; }
input[type=date], input[type=time] { min-height: 46px; }
label { display: block; margin: 12px 2px 6px; font-size: 13px; color: var(--sub); }
.row { display: flex; gap: 8px; align-items: center; }
.row > * { flex: 1; }

/* ---------------------------------------------------------------- вкладки мастера */
.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 16px; position: sticky; top: 8px; z-index: 5;
  margin-bottom: 12px; background: color-mix(in srgb, var(--fill-2) 85%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4); }
.tabs button { flex: 1; background: transparent; color: var(--sub); min-height: 38px; padding: 6px; border-radius: 12px; font-weight: 550; }
.tabs button.tab-admin { flex: none; width: 40px; padding: 6px 0; }
.tabs button.on { background: var(--card); color: var(--text); box-shadow: 0 1px 3px rgba(15, 23, 42, .14); }

/* ---------------------------------------------------------------- HERO «океан» с засветом */
.hero-card { position: relative; overflow: hidden; isolation: isolate; color: #fff; border-radius: var(--r-xl);
  padding: 20px 20px 18px; margin: 0 0 12px;
  background:
    radial-gradient(140% 110% at 100% 0%, #2a63f0 0%, #1d4fd8 18%, rgba(29, 79, 216, .55) 34%, rgba(16, 42, 107, 0) 62%),
    linear-gradient(165deg, var(--ocean-700) 0%, var(--ocean-800) 55%, var(--ocean-900) 100%);
  box-shadow: 0 18px 40px -20px rgba(11, 31, 77, .75), inset 0 1px 0 rgba(255, 255, 255, .08); }
/* мягкий блик — «солнце сквозь толщу воды» */
.hero-card::before { content: ""; position: absolute; z-index: -1; pointer-events: none;
  top: -55%; right: -30%; width: 95%; height: 140%;
  background: radial-gradient(closest-side, rgba(196, 222, 255, .55), rgba(120, 165, 255, .22) 42%, rgba(60, 110, 255, 0) 78%);
  filter: blur(14px); }
/* лучи: конический градиент из угла, сильно размыт */
.hero-card::after { content: ""; position: absolute; z-index: -1; pointer-events: none;
  top: -40%; right: -20%; width: 120%; height: 190%;
  background: conic-gradient(from 198deg at 88% 6%,
    rgba(255, 255, 255, 0) 0deg, rgba(210, 228, 255, .13) 8deg, rgba(255, 255, 255, 0) 17deg,
    rgba(210, 228, 255, .10) 26deg, rgba(255, 255, 255, 0) 36deg,
    rgba(210, 228, 255, .07) 47deg, rgba(255, 255, 255, 0) 60deg, rgba(255, 255, 255, 0) 360deg);
  filter: blur(12px); mix-blend-mode: screen; transform-origin: 88% 6%;
  animation: rays 14s ease-in-out infinite alternate; }
@keyframes rays { from { transform: rotate(-2.5deg); opacity: .85; } to { transform: rotate(2.5deg); opacity: 1; } }
.hero-card .eyebrow { font-size: 14px; font-weight: 600; color: rgba(255, 255, 255, .82); display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.hero-card .big { font-size: 44px; font-weight: 750; line-height: 1.05; letter-spacing: -1px; margin: 8px 0 6px;
  font-variant-numeric: tabular-nums; text-shadow: 0 2px 18px rgba(0, 20, 80, .35); white-space: nowrap; }
.hero-card .big.neg { color: #ffb4b4; }
.hero-card .big small { font-size: .55em; font-weight: 650; opacity: .8; margin-left: 4px; }
.hero-card .sub { font-size: 14px; color: rgba(255, 255, 255, .72); font-weight: 500; }
.hero-card .brand-tag { position: absolute; top: 18px; right: 18px; font-size: 12px; font-weight: 650; letter-spacing: .2px; color: rgba(255, 255, 255, .7); }
.hero-card .sub b { color: #fff; font-weight: 650; }
.hero-stats { display: flex; gap: 22px; margin-top: 14px; }
.hero-stats .v { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
.hero-stats .l { font-size: 12px; color: rgba(255, 255, 255, .66); margin-top: 2px; }
.hero-bar { display: flex; gap: 3px; height: 10px; border-radius: 6px; margin: 18px 0 10px; overflow: hidden;
  background: rgba(255, 255, 255, .14); }
.hero-bar i { display: block; height: 100%; border-radius: 6px; transform-origin: left; animation: grow .7s var(--ease) both; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.legend .dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.hero-card .legend { color: rgba(255, 255, 255, .88); font-weight: 500; }
.hero-card .legend b { font-variant-numeric: tabular-nums; font-weight: 650; color: #fff; }
.hero-card .skeleton { height: 44px; width: 62%; border-radius: 10px; margin: 10px 0; background: rgba(255, 255, 255, .12); animation: pulse 1.2s ease-in-out infinite; }
.hero-card .ghostbtn { background: rgba(255, 255, 255, .14); color: #fff; min-height: 32px; padding: 4px 10px; font-size: 13px; font-weight: 550; border-radius: 10px; }
@keyframes pulse { 50% { opacity: .5; } }
@keyframes grow { from { transform: scaleX(0); } }

/* ---------------------------------------------------------------- переключатель месяца */
.monthbar { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--card); border-radius: var(--r-lg); padding: 8px 8px 8px 16px; margin: 10px 0; box-shadow: var(--shadow); }
.monthbar .ml { font-size: 15px; font-weight: 600; color: var(--sub); }
.mplate { display: flex; align-items: center; background: var(--fill); border-radius: 14px; padding: 3px; min-width: 210px; }
.mplate button { background: transparent; color: var(--text); min-height: 40px; width: 40px; padding: 0; font-size: 22px; line-height: 1; font-weight: 400; }
.mplate b { flex: 1; text-align: center; font-weight: 600; font-size: 15px; white-space: nowrap; }

/* ---------------------------------------------------------------- KPI */
.kpi { background: var(--card); border-radius: var(--r-lg); padding: 16px; box-shadow: var(--shadow); min-width: 0; }
.kpi .label { font-size: 13px; }
.kpi .value { font-size: 26px; font-weight: 700; letter-spacing: -.4px; margin-top: 4px; font-variant-numeric: tabular-nums; line-height: 1.15; }
.kpi .value.xl { font-size: 32px; }
.kpi .value small { font-size: .6em; font-weight: 600; color: var(--sub); margin-left: 3px; }
.kpi .note { color: var(--sub); font-size: 13px; margin-top: 4px; }
.kpi .note b { color: var(--text); font-weight: 600; }
.kpi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0; }
.kpi-grid > .kpi.wide { grid-column: 1 / -1; }
.kv { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0 0; margin-top: 12px; border-top: 1px solid var(--line); font-size: 14px; }
.kv + .kv { margin-top: 0; }
.kv span:first-child { color: var(--sub); }
.kv span:last-child { font-variant-numeric: tabular-nums; font-weight: 550; text-align: right; }
.pos { color: var(--good); } .neg { color: var(--bad); }

/* кликабельная карточка «Расходы» */
.kpi-btn { display: block; width: 100%; text-align: left; color: var(--text); background: var(--card); font-weight: 400;
  border-radius: var(--r-lg); padding: 16px; box-shadow: var(--shadow); position: relative; min-height: 0; }
.kpi-btn:active { transform: scale(.985); }
.kpi-btn .chev { position: absolute; right: 14px; top: 16px; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; background: var(--fill-2); color: var(--sub); font-size: 20px; line-height: 1; }
.kpi-btn .cta { color: var(--brand-ink); font-size: 14px; font-weight: 600; margin-top: 10px; }
.segbar { display: flex; gap: 2px; height: 8px; border-radius: 5px; overflow: hidden; background: var(--fill-2); margin-top: 12px; }
.segbar i { display: block; height: 100%; transform-origin: left; animation: grow .7s var(--ease) both; }
.kpi-btn .legend, .exp-sum .legend { margin-top: 10px; color: var(--sub); font-size: 12.5px; }
.legend b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }

.meter { height: 8px; border-radius: 5px; background: var(--fill-2); overflow: hidden; margin-top: 10px; }
.meter > i { display: block; height: 100%; border-radius: 5px; background: var(--teal); transform-origin: left; animation: grow .7s var(--ease) both; }
.meter.blue > i { background: var(--brand); }

/* ---------------------------------------------------------------- выручка по услугам */
.mlist .item { padding: 12px 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.mlist .item:first-child { padding-top: 2px; }
.mlist .item:last-child { border-bottom: 0; padding-bottom: 0; }
.mlist .head { display: flex; justify-content: space-between; gap: 10px; font-weight: 550; }
.mlist .head span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mlist .head span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
.mlist .meta { color: var(--sub); font-size: 12.5px; margin-top: 2px; font-variant-numeric: tabular-nums; }
.mlist .item[tabindex]:focus-visible { outline: 2px solid var(--brand-ink); outline-offset: 2px; border-radius: 8px; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
table.data th { color: var(--sub); font-weight: 500; font-size: 12px; }
table.data th, table.data td { padding: 8px 4px; text-align: right; border-bottom: 1px solid var(--line); }
table.data th:first-child, table.data td:first-child { text-align: left; }
details summary { cursor: pointer; color: var(--brand-ink); font-size: 14px; font-weight: 550; margin-top: 12px; }
.tablewrap { overflow-x: auto; }
.footnote { color: var(--sub); font-size: 12.5px; margin: 14px 4px; line-height: 1.45; }
.footnote button.link { font-size: 12.5px; }

/* ---------------------------------------------------------------- экран «Расходы» */
.topbar { display: flex; align-items: center; gap: 6px; margin: -4px 0 2px; min-height: 40px; }
.topbar .back { background: none; color: var(--brand-ink); padding: 8px 10px 8px 2px; min-height: 44px; font-weight: 550; font-size: 16px; }
.topbar h1 { font-size: 22px; flex: 1; }
.exp-sum .total { font-size: 38px; font-weight: 750; letter-spacing: -.8px; font-variant-numeric: tabular-nums; line-height: 1.1; margin: 6px 0 2px; }
.cats { margin-top: 14px; }
.cat-row { display: grid; grid-template-columns: 28px 1fr auto; gap: 4px 10px; align-items: center; padding: 7px 0; }
.cat-row .ico { grid-row: span 2; }
.cat-row .nm { font-size: 14px; font-weight: 550; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-row .am { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.cat-row .am small { color: var(--sub); font-weight: 500; margin-left: 6px; }
.cat-row .bar { grid-column: 2 / -1; height: 6px; border-radius: 4px; background: var(--fill-2); overflow: hidden; }
.cat-row .bar i { display: block; height: 100%; border-radius: 4px; transform-origin: left; animation: grow .7s var(--ease) both; }
.ico { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; font-size: 15px; flex: none;
  background: color-mix(in srgb, var(--c, #94a3b8) 22%, var(--card)); }
.ico.lg { width: 40px; height: 40px; border-radius: 13px; font-size: 20px; }

.day-group { margin: 18px 0 0; }
.day-head { display: flex; justify-content: space-between; align-items: baseline; padding: 0 6px 8px; font-size: 13px; font-weight: 600; color: var(--sub); }
.day-head span:first-child::first-letter { text-transform: uppercase; }
.day-head span:last-child { font-variant-numeric: tabular-nums; }
.exp-list { background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; }
.exp-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: transparent; color: var(--text);
  border-radius: 0; padding: 12px 14px; min-height: 64px; font-weight: 400; position: relative; }
.exp-row + .exp-row::before { content: ""; position: absolute; top: 0; left: 66px; right: 0; border-top: 1px solid var(--line); }
.exp-row:active { transform: none; background: var(--fill); }
.exp-row .tx { flex: 1; min-width: 0; }
.exp-row .t1 { display: block; font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.exp-row .t2 { display: block; color: var(--sub); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.exp-row .am { font-weight: 650; font-size: 16px; font-variant-numeric: tabular-nums; white-space: nowrap; }

.empty { text-align: center; padding: 34px 20px 28px; }
.empty .em { font-size: 44px; line-height: 1; }
.empty h3 { margin: 12px 0 6px; font-size: 18px; }
.empty p { margin: 0 auto 16px; color: var(--sub); max-width: 300px; font-size: 14px; }

.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 12px 14px calc(12px + var(--safe-b));
  background: linear-gradient(to top, var(--page) 62%, color-mix(in srgb, var(--page) 0%, transparent)); }
.dock button { display: block; width: 100%; max-width: 532px; margin: 0 auto; min-height: 54px; font-size: 17px; border-radius: 16px;
  box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--brand) 70%, transparent); }
.btn-plus { font-size: 22px; font-weight: 500; margin-right: 6px; line-height: 0; vertical-align: -2px; }

/* ---------------------------------------------------------------- bottom sheet */
.sheet-bg { position: fixed; inset: 0; z-index: 40; background: rgba(5, 12, 30, .45); opacity: 0; transition: opacity .22s; }
.sheet-bg.on { opacity: 1; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; margin: 0 auto; max-width: 560px;
  max-height: calc(var(--tg-viewport-stable-height, 100vh) - 24px); overflow-y: auto; overscroll-behavior: contain;
  background: var(--card); border-radius: 26px 26px 0 0; padding: 8px 16px 0;
  box-shadow: 0 -12px 40px -10px rgba(0, 0, 0, .3); transform: translateY(100%); transition: transform .28s var(--ease); }
.sheet.on { transform: none; }
.sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: var(--fill-2); margin: 0 auto 8px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sheet-head h2 { margin: 4px 0; font-size: 19px; }
.sheet-head .x { width: 36px; height: 36px; min-height: 0; padding: 0; border-radius: 50%; background: var(--fill-2); color: var(--sub); font-size: 16px; font-weight: 500; }
.amount-box { display: flex; align-items: baseline; justify-content: center; gap: 6px; margin: 14px 0 4px; padding: 14px 10px;
  border-radius: var(--r-lg); background: var(--fill); border: 1.5px solid transparent; transition: border-color .15s; }
.amount-box:focus-within { border-color: var(--brand-ink); background: var(--card); }
.amount-box.err { border-color: var(--bad); }
.amount-box input { background: transparent; border: 0; padding: 0; min-height: 0; width: auto; min-width: 2ch; max-width: 100%;
  text-align: center; font-size: 40px; font-weight: 750; letter-spacing: -1px; font-variant-numeric: tabular-nums; field-sizing: content; }
.amount-box input:focus { background: transparent; }
.amount-box input::placeholder { color: color-mix(in srgb, var(--text) 25%, var(--card)); }
.amount-box .cur { font-size: 28px; font-weight: 650; color: var(--sub); }
.sheet .sec { font-size: 13px; color: var(--sub); font-weight: 600; margin: 16px 2px 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips.err .chip { border-color: color-mix(in srgb, var(--bad) 50%, transparent); }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--fill); color: var(--text); border: 1.5px solid transparent;
  border-radius: 999px; padding: 7px 13px 7px 10px; min-height: 38px; font-size: 14px; font-weight: 500; }
.chip.on { background: color-mix(in srgb, var(--brand) 12%, var(--card)); border-color: var(--brand-ink); color: var(--text); font-weight: 600; }
.chip .e { font-size: 16px; line-height: 1; }
.date-row { display: flex; gap: 8px; align-items: center; }
.date-row .chip { flex: none; padding: 7px 14px; }
.date-row input { flex: 1; min-width: 0; min-height: 40px; padding: 8px 10px; border-radius: 999px; }
.hint-row { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--sub); margin: 6px 4px 0; }
.form-err { color: var(--bad); font-size: 14px; min-height: 20px; margin: 10px 2px 0; font-weight: 500; }
.sheet-foot { position: sticky; bottom: 0; display: flex; gap: 10px; padding: 12px 0 calc(14px + var(--safe-b)); background: var(--card); margin-top: 4px; }
.sheet-foot button { min-height: 52px; font-size: 16px; border-radius: 16px; }
.sheet-foot .save { flex: 1; }
.sheet-foot .danger { flex: none; padding: 0 18px; }
body.sheet-open { overflow: hidden; }

/* ---------------------------------------------------------------- клиент */
.client-hero { margin-bottom: 14px; padding-bottom: 20px; }
.client-hero .avatar { width: 52px; height: 52px; border-radius: 17px; display: grid; place-items: center; font-size: 26px;
  background: rgba(255, 255, 255, .14); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18); margin-bottom: 12px; }
.client-hero h1 { color: #fff; font-size: 26px; }
.client-hero .sub { margin-top: 6px; }
.client-hero .sub.prof { color: #fff; font-weight: 600; opacity: .92; }
.client-hero .sub.addr { opacity: .85; }
.client-hero .about { margin: 10px 0 0; color: rgba(255, 255, 255, .86); font-size: 14px; line-height: 1.45; white-space: pre-line; }
.client-hero .social { display: inline-block; margin-top: 10px; padding: 7px 12px; border-radius: 999px; font-size: 13px; font-weight: 600;
  color: #fff; text-decoration: none; background: rgba(255, 255, 255, .14); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); }
.client-hero .sub.prof + .sub:not(.addr) { margin-top: 12px; }
.profile-preview { margin-top: 12px; }
.profile-preview .client-hero { margin-bottom: 0; }
#profileCard textarea { resize: vertical; min-height: 76px; }
.steps { display: flex; gap: 6px; margin-top: 16px; }
.steps i { flex: 1; height: 4px; border-radius: 3px; background: rgba(255, 255, 255, .2); }
.steps i.on { background: var(--teal); }
.steps i.on:nth-child(3) { background: var(--yellow); }
.svc-list { display: grid; gap: 10px; }
.svc { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--card); color: var(--text);
  border-radius: var(--r-lg); padding: 14px 16px; box-shadow: var(--shadow); border: 2px solid transparent; font-weight: 400; min-height: 64px; }
.svc.sel { border-color: var(--brand-ink); }
.svc .nm { font-weight: 600; font-size: 15.5px; }
.svc .tx { flex: 1; min-width: 0; }
.svc .price { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; font-size: 16px; }
.svc .radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--fill-2); flex: none; display: grid; place-items: center; }
.svc.sel .radio { border-color: var(--brand-ink); background: var(--brand); box-shadow: inset 0 0 0 4px var(--card); }
.days { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; margin: 0 -14px; padding-left: 14px; padding-right: 14px;
  scrollbar-width: none; scroll-snap-type: x proximity; scroll-padding-inline: 14px; }
.days::-webkit-scrollbar { display: none; }
.day { flex: 0 0 auto; min-width: 62px; text-align: center; padding: 9px 6px 8px; border-radius: 16px; scroll-snap-align: start;
  background: var(--card); color: var(--text); box-shadow: var(--shadow); border: 2px solid transparent; font-weight: 400; min-height: 0; }
.day b { display: block; font-size: 20px; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.day small { display: block; color: var(--sub); font-size: 12px; }
.day.sel { background: var(--brand); color: #fff; border-color: var(--brand); }
.day.sel small { color: rgba(255, 255, 255, .8); }
.day.empty { opacity: .45; box-shadow: none; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.slot { padding: 10px 0; text-align: center; border-radius: 14px; background: var(--card); color: var(--text); box-shadow: var(--shadow);
  border: 2px solid transparent; font-weight: 600; min-height: 46px; font-variant-numeric: tabular-nums; font-size: 16px; }
.slot.sel { background: var(--brand); color: #fff; }
.privacy { display: flex; gap: 10px; align-items: flex-start; color: var(--sub); font-size: 13px; margin: 22px 4px 0; }
.success { text-align: center; padding: 40px 10px; }
.success .big { font-size: 52px; }
.success h1 { margin: 8px 0; }
.success p { color: var(--sub); }

/* ---------------------------------------------------------------- расписание / подключение */
.list .it { display: flex; justify-content: space-between; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.list .it:last-child { border-bottom: 0; padding-bottom: 0; }
.list .it:first-child { padding-top: 0; }
.linkbox { word-break: break-all; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; background: var(--fill);
  border-radius: 10px; padding: 10px 12px; margin-top: 6px; }
.slot-day b { display: block; margin-bottom: 4px; }
.slot-day .times { display: flex; flex-wrap: wrap; gap: 6px; }
.slot-day .times span { background: var(--fill); border-radius: 8px; padding: 3px 8px; font-size: 13px; font-variant-numeric: tabular-nums; }
.seg { display: flex; gap: 4px; padding: 4px; background: var(--fill); border-radius: 14px; }
.seg button { flex: 1; background: transparent; color: var(--sub); min-height: 38px; padding: 6px 4px; font-size: 13.5px; border-radius: 11px; font-weight: 550; }
.seg button.on { background: var(--card); color: var(--text); box-shadow: 0 1px 3px rgba(15, 23, 42, .14); }
.cost-row { display: grid; grid-template-columns: 1fr 100px; gap: 8px; align-items: center; margin: 8px 0; }
.svc-edit { display: grid; grid-template-columns: 1fr 1fr 1fr 40px; gap: 6px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.svc-edit input { padding: 8px 10px; font-size: 14px; min-height: 40px; }
.svc-edit input[data-f=name] { grid-column: 1 / -1; font-weight: 600; }
.svc-edit button { min-height: 40px; padding: 0; }
.svc-head { display: grid; grid-template-columns: 1fr 1fr 1fr 40px; gap: 6px; font-size: 11.5px; color: var(--sub); }
.svc-head span:first-child { display: none; }
.hours { display: grid; grid-template-columns: 34px 1fr 1fr 30px; gap: 8px; align-items: center; margin: 6px 0; }
.hours input[type=time] { padding: 8px; min-height: 40px; }
.hours span { font-weight: 600; font-size: 14px; }
.check { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 14.5px; margin: 4px 0; }
.status-ok { color: var(--good); } .status-err { color: var(--bad); }

/* ---------------------------------------------------------------- toast */
.toast { position: fixed; left: 50%; bottom: calc(86px + var(--safe-b)); transform: translate(-50%, 10px); z-index: 60;
  background: rgba(15, 23, 42, .92); color: #fff; padding: 11px 18px; border-radius: 14px; font-size: 14px; font-weight: 500;
  opacity: 0; transition: opacity .2s, transform .2s var(--ease); pointer-events: none; max-width: 90%; text-align: center;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .4); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* появление */
.rise { animation: rise .45s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 370px) {
  .hero-card .big { font-size: 38px; }
  .mplate { min-width: 0; }
  .kpi .value { font-size: 22px; }
  .monthbar .ml { display: none; }
  .mplate { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------------------------------------------------------------- журнал записи */
.jbar { display: flex; gap: 8px; align-items: center; margin: 4px 0 10px; }
.jbar .seg { flex: none; width: 150px; }
.jnav { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: space-between; background: var(--card); border-radius: 14px;
  box-shadow: var(--shadow); min-height: 46px; padding: 0 2px; }
.jnav b { font-size: 14.5px; font-weight: 650; text-align: center; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jnav button { background: none; color: var(--brand-ink); min-height: 44px; min-width: 40px; padding: 0 8px; font-size: 22px; font-weight: 500; }
.jstrip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 10px; }
.jstrip button { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 0 4px; min-height: 58px; border-radius: 14px;
  background: var(--card); color: var(--text); font-weight: 500; box-shadow: var(--shadow); }
.jstrip .wd { font-size: 11.5px; color: var(--sub); }
.jstrip .dn { font-size: 17px; font-weight: 650; font-variant-numeric: tabular-nums; }
.jstrip .dots { font-size: 10px; letter-spacing: 1px; color: var(--brand-ink); line-height: 1; height: 10px; }
.jstrip .off .dn { color: var(--sub); }
.jstrip .today .wd { color: var(--brand-ink); font-weight: 700; }
.jstrip .on { background: linear-gradient(160deg, var(--ocean-700), var(--brand)); color: #fff; }
.jstrip .on .wd, .jstrip .on .dots, .jstrip .on .dn { color: #fff; }
.jsum { display: flex; flex-direction: column; gap: 2px; margin: 2px 4px 8px; }
.jsum b { font-variant-numeric: tabular-nums; }
.jwarn { background: color-mix(in srgb, var(--yellow) 22%, var(--card)); border-radius: var(--r-md); padding: 10px 12px; font-size: 13.5px; margin: 0 0 8px; }
.jtl { padding: 18px 14px 14px 14px; overflow: hidden; }
.tl { position: relative; margin-left: 46px; }
.tl .hr { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line); }
.tl .hr span { position: absolute; left: -46px; width: 38px; text-align: right; top: -9px; font-size: 11.5px; color: var(--sub); font-variant-numeric: tabular-nums; }
.joff { position: absolute; left: 0; right: 0; background: repeating-linear-gradient(135deg, var(--fill) 0 6px, transparent 6px 12px); opacity: .8; }
.jfree { position: absolute; left: 4px; right: 4px; min-height: 0; padding: 4px 10px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  background: color-mix(in srgb, var(--teal) 9%, transparent); border: 1.5px dashed color-mix(in srgb, var(--teal) 65%, transparent);
  color: color-mix(in srgb, var(--teal) 55%, var(--text)); border-radius: 12px; font-size: 13.5px; font-weight: 600; text-align: left; }
.jfree small { font-weight: 500; font-size: 12px; opacity: .8; }
.jfree:active { background: color-mix(in srgb, var(--teal) 22%, transparent); }
.jblk, .jbusy { position: absolute; left: 4px; right: 4px; border-radius: 12px; padding: 4px 10px; min-height: 0; text-align: left;
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start; font-size: 13.5px; font-weight: 600;
  background: repeating-linear-gradient(135deg, var(--fill-2) 0 8px, var(--fill) 8px 16px); color: var(--sub); }
.jblk small { font-weight: 500; font-size: 12px; }
.jbusy { pointer-events: none; }
.jbk { position: absolute; left: 4px; right: 4px; min-height: 0; padding: 6px 10px 6px 12px; border-radius: 12px; text-align: left;
  display: flex; flex-direction: column; justify-content: space-between; gap: 2px; overflow: hidden; z-index: 2;
  background: color-mix(in srgb, var(--brand) 12%, var(--card)); color: var(--text); font-weight: 500; font-size: 13.5px;
  border-left: 4px solid var(--brand); box-shadow: 0 1px 2px rgba(15, 23, 42, .06); }
.jbk .t1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jbk .t1 b { font-variant-numeric: tabular-nums; }
.jbk .t2 { display: flex; gap: 6px; align-items: center; font-size: 12px; }
.jbk .pr { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--sub); }
.jbk.tight { flex-direction: row; align-items: center; padding-top: 2px; padding-bottom: 2px; }
.jbk.tight .t1 { flex: 1; }
.jbk.tight .badge, .jbk.tight .pr { display: none; }
.jbk.ok { background: color-mix(in srgb, var(--good) 11%, var(--card)); border-left-color: var(--good); }
.jbk.mark { background: color-mix(in srgb, var(--yellow) 18%, var(--card)); border-left-color: var(--yellow); }
.jbk.bad { background: var(--fill); border-left-color: var(--bad); color: var(--sub); }
.jbk.bad .t1 { text-decoration: line-through; }
.jnow { position: absolute; left: -6px; right: 0; height: 2px; background: var(--bad); z-index: 3; pointer-events: none; }
.jnow::before { content: ""; position: absolute; left: -4px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--bad); }
.badge { display: inline-block; font-size: 11.5px; font-weight: 650; padding: 2px 8px; border-radius: 999px; background: var(--fill-2); color: var(--sub); }
.badge.up { background: color-mix(in srgb, var(--brand) 14%, var(--card)); color: var(--brand-ink); }
.badge.ok { background: color-mix(in srgb, var(--good) 15%, var(--card)); color: var(--good); }
.badge.bad { background: color-mix(in srgb, var(--bad) 13%, var(--card)); color: var(--bad); }
.badge.mark { background: color-mix(in srgb, var(--yellow) 35%, var(--card)); color: color-mix(in srgb, #8a6100 80%, var(--text)); }
/* неделя */
.jweek { padding: 6px 12px; }
.wrow { display: grid; grid-template-columns: 52px 1fr 86px; gap: 10px; align-items: center; width: 100%; background: none; color: var(--text);
  padding: 12px 0; min-height: 52px; border-radius: 0; border-bottom: 1px solid var(--line); font-weight: 500; text-align: left; }
.wrow:last-child { border-bottom: 0; }
.wrow .wd { font-size: 14px; font-variant-numeric: tabular-nums; }
.wrow.today .wd b { color: var(--brand-ink); }
.wrow .wn { text-align: right; font-size: 13px; color: var(--sub); font-variant-numeric: tabular-nums; }
.wrow .wn b { color: var(--text); }
.wbar { position: relative; height: 18px; border-radius: 6px; background: var(--fill-2); overflow: hidden; }
.wbar i, .wlegend i { position: absolute; top: 0; bottom: 0; display: block; }
.wbar.off { background: repeating-linear-gradient(135deg, var(--fill-2) 0 6px, var(--fill) 6px 12px); }
.wbar .lbl { position: static; font-style: normal; font-size: 11.5px; color: var(--sub); padding-left: 8px; line-height: 18px; }
.wbar .f, .wlegend .f { background: color-mix(in srgb, var(--teal) 45%, var(--card)); }
.wbar .b, .wlegend .b { background: var(--sub); opacity: .45; }
.wbar .k, .wlegend .k { background: var(--brand); }
.wbar .k.mark { background: var(--yellow); }
.wbar .k { border-left: 1px solid var(--card); }
.wlegend { display: flex; gap: 14px; justify-content: center; margin: 4px 0 8px; }
.wlegend span { display: inline-flex; align-items: center; gap: 5px; }
.wlegend i { position: static; width: 12px; height: 8px; border-radius: 3px; }
/* док с двумя кнопками и шторки журнала */
.dock.two { display: flex; gap: 10px; justify-content: center; }
.dock.two button { margin: 0; max-width: none; width: auto; }
.dock.two button.ghost { flex: 0 0 auto; background: var(--card); color: var(--text); box-shadow: var(--shadow); font-size: 15px; }
.dock.two button:not(.ghost) { flex: 1; max-width: 340px; }
.linkcard summary { cursor: pointer; font-weight: 600; }
.chip small { margin-left: 4px; font-size: 12px; }
.bk-meta { margin: 6px 2px 4px; }
.bk-meta .when { font-size: 16px; }
.att { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.att button { background: var(--fill); color: var(--text); border: 1.5px solid transparent; min-height: 52px; font-size: 16px; }
.att .ok.on { background: color-mix(in srgb, var(--good) 14%, var(--card)); border-color: var(--good); color: var(--good); }
.att .bad.on { background: color-mix(in srgb, var(--bad) 12%, var(--card)); border-color: var(--bad); color: var(--bad); }
.sheet .link { margin-top: 6px; }
.sheet input[type=time] { flex: 1; min-width: 0; min-height: 40px; padding: 8px 10px; border-radius: 999px; }
@media (max-width: 370px) { .jbar .seg { width: 128px; } .wrow { grid-template-columns: 44px 1fr 70px; } }
#nbEnd { flex-direction: column; gap: 2px; }
body.dark .badge.mark { color: var(--yellow); }

/* ---------------------------------------------------------------- карточки услуг */
.svc-card { padding: 14px 0 16px; border-bottom: 1px solid var(--line); }
.svc-card:last-of-type { border-bottom: 0; }
.svc-top { display: grid; grid-template-columns: 1fr 44px; gap: 8px; align-items: center; }
.svc-top input { font-weight: 600; }
.svc-top button { min-height: 44px; padding: 0; }
.svc-lbl { margin: 12px 0 6px; font-size: 13px; color: var(--sub); font-weight: 600; }
.chip.q { padding: 7px 11px; min-height: 36px; font-size: 14px; }
.svc-card .chips[role=radiogroup] .chip.q { min-width: 44px; justify-content: center; }
.dur-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.dur-own { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.dur-own input { width: 76px; padding: 7px 10px; min-height: 36px; text-align: center; font-variant-numeric: tabular-nums; }
.dur-own span { font-size: 14px; color: var(--sub); }
.svc-money { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.svc-money label { margin: 0; font-size: 12.5px; color: var(--sub); }
.svc-money input { margin-top: 4px; }
.svc-hint { margin-top: 8px; font-size: 12.5px; }

/* перерыв после записи на таймлайне журнала */
.jbuf { position: absolute; left: 4px; right: 4px; border-radius: 0 0 8px 8px; pointer-events: none; overflow: hidden;
  background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--sub) 10%, transparent) 0 6px, transparent 6px 12px);
  display: flex; align-items: center; padding-left: 12px; }
.jbuf span { font-size: 10.5px; line-height: 1; color: var(--sub); font-weight: 600; }

/* ---------- запись без Telegram и приложение мастера ---------- */
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.wf-sum { display: grid; gap: 4px; }
.wf-sum .nm { font-weight: 650; font-size: 16.5px; }
.wf-sum .price { font-weight: 700; font-size: 18px; margin-top: 4px; }
.check.consent { align-items: flex-start; margin-top: 16px; font-size: 13.5px; color: var(--sub); line-height: 1.4; }
.check.consent input { flex: 0 0 auto; margin-top: 1px; }
.app-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0;
  border-top: 1px solid var(--line); font-size: 14.5px; line-height: 1.35; }
.app-row .muted { font-size: 13px; }
#appCard .row input { flex: 1; min-width: 0; }
.success .card { margin: 16px auto; max-width: 420px; }
.success a { color: var(--brand-ink); }
.privacy a { color: var(--brand-ink); }
#emForm .row button { flex: 0 0 auto; }
.tel-btn { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 12px; padding: 12px; border-radius: 14px;
  background: color-mix(in srgb, var(--good) 14%, var(--card)); color: var(--good); font-weight: 650; text-decoration: none; }

input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--text) 28%, var(--card)); font-style: italic; }
.pv-missing { font-size: 13px; color: var(--sub); margin: 8px 2px 0; }
.pv-missing b { color: var(--text); font-weight: 600; }
.powered { text-align: center; font-size: 12.5px; line-height: 1.45; color: var(--sub); margin: 22px 16px calc(10px + env(safe-area-inset-bottom)); opacity: .85; }
.powered b { font-weight: 650; color: var(--text); white-space: nowrap; }
.hero-card .avatar.initials { font-size: 22px; font-weight: 700; letter-spacing: .5px; color: #fff; }
.sprut-img { width: 100%; height: 100%; object-fit: contain; display: block; }
.hero-card .avatar.sprut { padding: 5px; }
.success .big .sprut-img { width: 72px; height: 72px; margin: 0 auto; }
.sprut-inline { width: 18px; height: 18px; vertical-align: -4px; margin-right: 3px; }

/* подсказка «проверьте Спам» на входе по почте */
.mail-hint { background: color-mix(in srgb, var(--teal) 14%, transparent); border-left: 3px solid var(--teal); border-radius: 10px; padding: 10px 12px; margin: 10px 0 4px; font-size: 14px; line-height: 1.45; }

.legal-note { font-size: 12.5px; color: var(--sub); line-height: 1.4; margin: 8px 0 0; }
.legal-note a { color: inherit; text-decoration: underline; }

/* ---------------------------------------------------------------- клиенты (мини-CRM) */
@media (max-width: 400px) { .tabs button { font-size: 13px; padding: 6px 2px; letter-spacing: -.01em; } }
.cl-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.cl-head input[type=search] { width: 100%; margin-bottom: 10px; }
.cl-actions { gap: 8px; }
.cl-seg { margin-bottom: 10px; }
.cl-due-hint { margin: 0 4px 10px; font-size: 13.5px; }
.cl-due { background: color-mix(in srgb, #f7c948 18%, var(--card)); border-radius: 14px; padding: 12px; margin: 12px 0; display: grid; gap: 10px; }
.cl-due > div:first-child { display: grid; gap: 2px; }
.cl-due .row { display: flex; flex-wrap: wrap; gap: 8px; }
.cl-due a.small-a { display: inline-flex; white-space: nowrap; align-items: center; text-decoration: none; padding: 7px 12px; min-height: 36px; font-size: 14px; border-radius: var(--r-sm); }
.cl-list { padding: 4px 0; }
.cl-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: none; color: var(--text);
  padding: 10px 14px; border-radius: 0; min-height: 56px; font-weight: 400; }
.cl-row + .cl-row { border-top: 1px solid var(--fill); }
.cl-row:active { background: var(--fill); }
.cl-ava { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 650; font-size: 14px;
  color: #fff; background: linear-gradient(135deg, #2a63f0, #3dd6c6); }
.cl-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cl-main b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-main .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chev { color: var(--sub); font-size: 22px; line-height: 1; flex: none; }
.cl-foot { margin: 4px 6px 16px; line-height: 1.45; }
.cbtns { display: grid; grid-template-columns: repeat(auto-fit, minmax(58px, 1fr)); gap: 6px; margin-top: 12px; }
.cbtn { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border-radius: 14px; min-height: 0;
  background: var(--fill); color: var(--text); text-decoration: none; font-size: 12.5px; font-weight: 600; border: 0; }
.cbtn .ci { font-size: 20px; line-height: 1; }
.cbtn.call { background: color-mix(in srgb, #22c55e 16%, var(--fill)); }
.cbtn.wa { background: color-mix(in srgb, #25d366 14%, var(--fill)); }
.cbtn.tg { background: color-mix(in srgb, #2aabee 16%, var(--fill)); }
.cbtn.max { background: color-mix(in srgb, #7b5cff 16%, var(--fill)); }
.cl-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 14px; }
.cl-stats div { background: var(--fill); border-radius: 12px; padding: 8px 4px; text-align: center; display: flex; flex-direction: column; gap: 2px; }
.cl-stats b { font-size: 14px; }
.cl-stats span { font-size: 11px; color: var(--sub); }
.cl-note { white-space: pre-wrap; background: var(--fill); border-radius: 12px; padding: 10px 12px; font-size: 14px; }
.cl-hist { display: flex; flex-direction: column; }
.cl-h { display: flex; justify-content: space-between; gap: 8px; padding: 8px 2px; font-size: 13.5px; }
.cl-h + .cl-h { border-top: 1px solid var(--fill); }
.cl-h span:last-child { flex: none; color: var(--sub); }
.cl-h.no_show span:last-child { color: var(--bad); }
.cl-h.cancelled { opacity: .55; }
.danger-link { color: var(--bad) !important; display: block; margin: 10px auto 0; }
.im-help { background: var(--fill); border-radius: 12px; padding: 10px 12px; margin: 8px 0 12px; font-size: 13.5px; }
.im-help summary { cursor: pointer; font-weight: 600; }
.im-help ul { margin: 8px 0 4px; padding-left: 18px; line-height: 1.5; }
.file-pick { display: block; }
.file-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.file-pick span { display: block; text-align: center; padding: 14px; border-radius: 14px; border: 1.5px dashed var(--brand-ink);
  color: var(--brand-ink); font-weight: 600; cursor: pointer; }
.file-pick input:focus-visible + span { outline: 2px solid var(--brand-ink); outline-offset: 2px; }
.im-map { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.im-map label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--sub); }
.im-map select { width: 100%; }
.im-sample { background: var(--fill); border-radius: 12px; padding: 4px 12px; }
.im-row { display: flex; flex-direction: column; padding: 6px 0; font-size: 13.5px; }
.im-row + .im-row { border-top: 1px solid var(--card); }
.cp-res { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.cp-item { display: flex; justify-content: space-between; align-items: center; gap: 8px; text-align: left; background: var(--fill);
  color: var(--text); padding: 10px 12px; border-radius: 12px; min-height: 0; font-weight: 400; }
.cp-item.new { color: var(--brand-ink); font-weight: 600; }
.cp-sel { display: flex; justify-content: space-between; align-items: center; background: color-mix(in srgb, #3dd6c6 18%, var(--fill));
  padding: 8px 8px 8px 12px; border-radius: 12px; }
.cp-sel .x { min-height: 0; padding: 6px 10px; }
.bk-client { display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 12px; text-align: left; background: var(--fill);
  color: var(--text); padding: 12px; border-radius: 14px; font-weight: 400; }
.bk-client b { flex: 1; }
.cp-item.new { justify-content: flex-start; gap: 4px; }

/* ---------------------------------------------------------------- вкладка «Админ» */
.ad-list { padding-bottom: 6px; }
.ad-row { display: grid; gap: 3px; padding: 12px 0; font-size: 14px; }
.ad-row + .ad-row { border-top: 1px solid var(--fill); }
.ad-row a.muted { text-decoration: none; }
.ad-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.ad-me { font-size: 11px; font-weight: 600; color: var(--brand-ink); background: var(--fill); border-radius: 6px; padding: 1px 6px; margin-left: 4px; }
.ad-nums { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.ad-link { color: var(--brand-ink); text-decoration: none; font-size: 13.5px; margin-top: 2px; }

/* «Завтра — напомнить» (Расписание) */
.remind-card summary { cursor: pointer; font-weight: 600; display: flex; justify-content: space-between; align-items: center; gap: 8px; list-style: none; }
.remind-card summary::-webkit-details-marker { display: none; }
.remind-count { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: rgba(247, 201, 72, .18); color: var(--text); white-space: nowrap; }
.remind-count.all { background: rgba(61, 214, 198, .2); }
.remind-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line, rgba(127,127,127,.18)); }
.remind-row.done .remind-who { opacity: .6; }
.remind-act { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.remind-act a.small-a { display: inline-flex; white-space: nowrap; align-items: center; text-decoration: none; padding: 7px 12px; min-height: 36px; font-size: 14px; border-radius: var(--r-sm); }
.remind-ok { color: #1fa595; font-weight: 600; font-size: 14px; }
.remind-nophone { font-size: 13px; }
/* Клиентская страница, когда онлайн-запись выключена */
.price-row { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; }
.price-row + .price-row { border-top: 1px solid var(--line, rgba(127,127,127,.18)); }
