

@font-face {
  font-family: "Playfair Display";
  font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/playfair-display-cyrillic-600-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Playfair Display";
  font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/playfair-display-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC,
                 U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Onest";
  font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("../fonts/onest-cyrillic-wght-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+20BD, U+2116;
}
@font-face {
  font-family: "Onest";
  font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("../fonts/onest-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC,
                 U+20BD, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink:      #0f2143;
  --ink-soft: #3c5378;
  --paper:    #e6eef8;
  --line:     #e2e9f3;
  --edge:     rgba(15, 33, 67, .06);
  --fill:     rgba(148, 163, 184, .13);
  --fill-focus: rgba(148, 163, 184, .24);
  --accent:   #1d4e89;
  --accent-2: #2f6cb3;
  --accent-fill: var(--accent);
  --accent-rgb: 59, 130, 246;
  --ink-rgb: 15, 33, 67;

  --muted:    #4e678e;
  --ok:       #277547;
  --warn:     #8f5a0f;
  --danger:   #c25b5b;
  --xlsx:     #1e6b43;
  --csv:      #2f5f9e;
  --warn-bg:  #fbf3e6;

  --serif: "Playfair Display", "New York", Georgia, "Times New Roman", serif;
  --sans: "Onest", "Golos Text", -apple-system, system-ui, "Segoe UI", Roboto, sans-serif;
  --flake-rgb: 108, 148, 208;

  --ease: cubic-bezier(.22, .61, .36, 1);
  --fast: .16s;
  --base: .24s;
  --slow: .36s;

  --radius: 20px;
  --shadow-card: 0 1px 3px rgba(15, 33, 67, .07), 0 6px 16px rgba(15, 33, 67, .09);
  --grad-accent: linear-gradient(180deg, #2a62a6, var(--accent));
}

html.dark {
  --ink:      #e5e7eb;
  --ink-soft: #cbd5e1;
  --muted:    #9ca3af;

  --faint:    #8b93a1;
  --accent:   #3b82f6;
  --accent-2: #60a5fa;

  --accent-fill: #2f6fdb;
  --accent-rgb: 59, 130, 246;
  --ink-rgb: 0, 0, 0;
  --ok:       #22c55e;
  --warn:     #f59e0b;
  --xlsx:     #22794c;
  --csv:      #3468ad;
  --warn-bg:  rgba(245, 158, 11, .10);
  --busy:     #3b82f6;
  --violet:   #8b5cf6;
  --danger:   #ef4444;
  --paper:    #0b1220;
  --paper-2:  #0e172a;

  --surface:  #161f33;
  --surface-2:#1e2942;
  --surface-3:#26334f;
  --line:     rgba(255, 255, 255, .07);
  --edge:     transparent;
  --fill:     var(--surface-2);
  --fill-focus: var(--surface-3);
  --flake-rgb: 200, 220, 255;
  --shadow-card: 0 8px 24px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .05);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html { -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.5;

  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

#bg {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(1100px 520px at 50% -10%, rgba(255, 255, 255, .7), transparent 60%),
    radial-gradient(900px 500px at 88% 6%, rgba(170, 200, 235, .42), transparent 64%),
    linear-gradient(180deg, #cbdcef 0%, #d9e6f4 42%, #e6eef8 100%);
}

html.dark #bg {
  background:
    radial-gradient(760px 420px at 50% 0%, rgba(59, 130, 246, .10), transparent 62%),
    linear-gradient(180deg, var(--paper-2) 0%, var(--paper) 42%);
}
body::before, body::after {
  content: ""; display: none; position: fixed; left: 0; pointer-events: none; z-index: -1;
}
html.dark body::before, html.dark body::after { display: block; }

body::before {
  top: -320px; height: calc(100vh + 320px); width: 100%;
  background:
    radial-gradient(1.6px 1.6px at 44px 58px,  rgba(var(--flake-rgb), .5) 55%, transparent),
    radial-gradient(1.8px 1.8px at 250px 96px, rgba(var(--flake-rgb), .4) 55%, transparent),
    radial-gradient(1.4px 1.4px at 214px 288px, rgba(var(--flake-rgb), .35) 55%, transparent);
  background-size: 340px 340px; opacity: .16; animation: snow 30s linear infinite;
}
@keyframes snow { from { transform: translateY(-320px); } to { transform: translateY(0); } }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.view.on { animation: viewIn var(--fast) ease-out both; }
@keyframes viewIn { from { opacity: .55; } }

.wrap {
  max-width: 560px; margin: 0 auto;
  padding-left:  max(20px, env(safe-area-inset-left));
  padding-right: max(20px, env(safe-area-inset-right));
}
body { padding-bottom: env(safe-area-inset-bottom); }

@media (max-width: 360px) {
  .wrap { padding-left: max(14px, env(safe-area-inset-left));
          padding-right: max(14px, env(safe-area-inset-right)); }
  .card { padding: 16px; }
}

.card {
  background: rgba(255, 255, 255, .82);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-card);
}

html.dark .card {
  background: var(--surface);
  border-color: var(--edge);
}

.muted-note { font-size: 12.5px; color: var(--muted); }
.loading { opacity: .5; transition: opacity var(--fast); }
.loading .slot, .loading .wg-grid { pointer-events: none; }

#themeBtn {
  width: 40px; height: 40px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--edge); border-radius: 50%;
  background: rgba(255, 255, 255, .9);
  font-size: 16px; line-height: 1; cursor: pointer;
  box-shadow: 0 2px 5px rgba(15, 33, 67, .1);
  transition: transform var(--fast) var(--ease), box-shadow var(--base) var(--ease);
}
#themeBtn:active { transform: scale(.9); }
html.dark #themeBtn {
  background: linear-gradient(180deg, rgba(35, 58, 99, .78), rgba(24, 42, 74, .78));
}

#offline {
  margin: 0 0 14px;
  padding: 11px 14px;
  background: var(--warn-bg);
  border: 1px solid rgba(201, 138, 46, .35);
  border-radius: 12px;
  color: var(--warn);
  font-size: 13px; font-weight: 600; line-height: 1.4;
}
#offline[hidden] { display: none; }

#toast {
  position: fixed; left: 50%; pointer-events: none;
  top: calc(14px + env(safe-area-inset-top));
  transform: translateX(-50%) translateY(-16px) scale(.97);
  padding: 13px 20px;
  background: #ffffff;
  color: var(--ink);
  border: 1px solid var(--edge);
  font-family: var(--sans);
  font-size: 13.5px; font-weight: 600; line-height: 1.35;
  border-radius: 16px;
  box-shadow: 0 10px 34px rgba(15, 33, 67, .28);
  opacity: 0; pointer-events: none;
  transition: transform var(--slow) cubic-bezier(.22, .8, .36, 1), opacity var(--slow) var(--ease);
  z-index: 40; max-width: min(92vw, 460px); text-align: center;
}
#toast.show { transform: translateX(-50%) translateY(0) scale(1); opacity: 1; }
html.dark #toast {
  background: #16233c;
  color: var(--ink);
  border-color: rgba(150, 180, 224, .26);
  box-shadow: 0 10px 34px rgba(0, 0, 0, .6);
}

.bf-more {
  display: block; width: 100%; margin: 4px 0 0; padding: 10px;
  font-family: var(--sans); font-size: 12.5px; font-weight: 600;
  color: var(--accent-2); background: transparent;
  border: 1px dashed var(--line); border-radius: 12px; cursor: pointer;
  transition: border-color var(--fast), color var(--fast);
}
.bf-more.on { border-style: solid; }

.field {
  width: 100%;
  padding: 12px 16px;
  font-size: 16px;
  font-weight: 500;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--fill);
  border: 1px solid transparent;
  border-radius: 12px;
  outline: none;
  margin-bottom: 10px;
  transition: border-color var(--base), box-shadow var(--base);
}
body.no-scroll { position: fixed; left: 0; right: 0; width: 100%; overflow: hidden; }

.field::placeholder { color: var(--faint, var(--muted)); font-weight: 400; }
.field:focus { background: var(--fill-focus); }
html.dark .field::placeholder { color: var(--faint); }

.bf-extra { margin-top: 10px; animation: fade var(--base) var(--ease) both; }
.bf-extra > label,
.bf-extra .bf-row > label {
  display: block; margin: 10px 0 6px;
  font-size: 11px; font-weight: 700; letter-spacing: .4px;
  text-transform: uppercase; color: var(--muted);
}
.bf-extra .bf-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 10px;
}
.bf-extra .bf-row > label { margin: 0; }
.bf-extra .bf-row > .chips-mini { margin-bottom: 0; }
.bf-extra .bf-num { width: 72px; margin: 0; text-align: center; }

.bf-count { display: flex; align-items: center; gap: 8px; }
.bf-count .cnt-btn {
  width: 32px; height: 32px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--edge); border-radius: 50%;
  background: var(--surface); color: var(--ink);
  font-size: 18px; line-height: 1; cursor: pointer;
  transition: transform var(--fast), border-color var(--base), color var(--base);
}
.bf-count .cnt-btn:hover { border-color: var(--accent-2); color: var(--accent); }
.bf-count .cnt-btn:active { transform: scale(.9); }
.bf-count .cnt-btn:disabled { opacity: .35; pointer-events: none; }
.bf-count .bf-num {
  width: 46px; pointer-events: none; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.bf-extra .bf-row[hidden], .book-form .bf-row[hidden] { display: none; }
.bf-extra .chips-mini[hidden] { display: none; }

.bf-total {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin: 12px 0 10px; padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 13px; color: var(--muted);
}
.bf-total b {
  font-size: 17px; font-weight: 700; color: var(--ink);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}

.day .load {
  position: absolute; left: 22%; right: 22%; bottom: 5px;
  height: 3px; border-radius: 2px;
  background: rgba(148, 163, 184, .25);
  overflow: hidden;
}
.day .load i {
  display: block; height: 100%;
  width: var(--busy, 0%);
  background: var(--inst-c, var(--accent-fill));
  border-radius: 2px;
}

.day.full .dnum { opacity: .45; }
.day.full .load i { background: var(--muted); }
.day.sel .load { background: color-mix(in srgb, currentColor 28%, transparent); }
.day.sel .load i { background: currentColor; }

.quick {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin: 12px 0 0;
}
.quick button {
  flex: 1 1 auto; min-width: 62px;
  padding: 8px 10px;
  font-family: var(--sans); font-size: 12.5px; font-weight: 600;
  color: var(--muted); background: transparent;
  border: 1px solid var(--edge); border-radius: 999px;
  cursor: pointer; white-space: nowrap;
  transition: color var(--fast), border-color var(--fast), background var(--fast);
}
.quick button:active { transform: scale(.96); }
.quick button.on {
  color: #fff; background: var(--inst-c, var(--accent-fill)); border-color: transparent;
}
html.dark .quick button.on { background: var(--inst-c, var(--accent-strong, #2f6cb3)); }

.slot.booking { cursor: pointer; }
.slot.booking .sl-name {
  flex: 1 1 auto; min-width: 0; font-size: 15px; font-weight: 700;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.slot .note-dot {
  flex-shrink: 0; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-2); font-size: 0; line-height: 0;
}

.slot .chev {
  flex-shrink: 0; width: 14px; text-align: center;
  color: var(--muted); user-select: none; pointer-events: none;
}
.slot .chev::after {
  content: "⌄"; display: block; font-size: 15px; line-height: 1;
  transition: transform var(--base);
}
.slot.open .chev { color: var(--accent-2); }
.slot.open .chev::after { transform: rotate(180deg); }

.client-info {
  position: relative; margin: 0 0 8px; padding: 14px 14px 14px 18px;
  border: none; border-radius: 0 0 14px 14px;
  background: rgba(255, 255, 255, .5);
  box-shadow: inset 0 1px 0 var(--line);
  animation: ciIn .18s ease-out both;
}
@keyframes ciIn { from { opacity: 0; } to { opacity: 1; } }
html.dark .client-info { background: var(--surface-2); }
.client-info::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 12px;
  width: 3px; border-radius: 0 0 3px 0; background: var(--busy, var(--accent));
}
.slot.open { margin-bottom: 0; border-radius: 14px 14px 0 0; }
.slot.open::before { top: 12px; bottom: 0; border-radius: 0 3px 0 0; }
.slot.open .act.cancel { display: none; }
.client-info .ci-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.client-info .ci-ava {
  flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-fill); color: var(--paper); font-weight: 700; font-size: 15px; letter-spacing: .5px;
}
.client-info .ci-who { min-width: 0; }
.client-info .ci-name { font-size: 17px; font-weight: 700; letter-spacing: -.2px; color: var(--ink); }
.client-info .ci-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.client-info .ci-tag {
  padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600;
  color: var(--muted); background: rgba(148, 163, 184, .14);
}
.client-info .ci-tag.ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); }
.client-info .ci-tag.warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); }
.client-info .ci-tag.bad { color: var(--danger); background: color-mix(in srgb, var(--danger) 14%, transparent); }
.client-info .ci-acts { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-bottom: 4px; }
.client-info .ci-acts .btn {
  width: auto; min-height: 44px; padding: 0 16px; font-size: 14px; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.client-info .ci-acts .btn.ghost { background: var(--fill); color: var(--ink); box-shadow: none; }
@media (max-width: 480px) {
  .client-info .ci-acts { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
  .client-info .ci-acts .btn { padding: 0 12px; }
  .client-info .ci-acts .btn.ghost {
    padding: 0; background: none; color: var(--accent-2);
    font-size: 13.5px; font-weight: 600;
  }
}
.client-info .ci-cap {
  display: flex; align-items: baseline; gap: 10px;
  margin: 14px 0 6px; font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--muted);
}
.client-info .ci-cap .ci-edit {
  border: none; background: transparent; padding: 0; cursor: pointer;
  font-family: var(--sans); font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--accent-2);
}
.client-info .ci-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.client-info .ci-cell {
  min-width: 0; padding: 8px 10px; border-radius: 10px; background: rgba(148, 163, 184, .08);
}
html.dark .client-info .ci-cell { background: var(--surface-3); }
.client-info .ci-cell small { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.client-info .ci-cell b { display: block; font-size: 13px; font-weight: 600; color: var(--ink); line-height: 1.3; overflow-wrap: anywhere; }
.client-info .ci-price { display: grid; padding: 0 2px; }
.client-info .ci-line {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; color: var(--ink);
}
.client-info .ci-line span { min-width: 0; display: grid; gap: 1px; }
.client-info .ci-line i { font-style: normal; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.client-info .ci-line b { font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.client-info .ci-line.muted { color: var(--muted); font-size: 12px; }
.client-info .ci-line.total { border-bottom: 0; padding: 12px 0 4px; font-size: 15px; font-weight: 700; }
.client-info .ci-line.total b { font-size: 17px; font-weight: 800; }
.client-info .ci-line.ok { border-bottom: 0; padding: 2px 0; font-size: 13px; color: var(--ok); }
.client-info .ci-line.due { border-bottom: 0; padding: 4px 0 2px; font-size: 14px; font-weight: 700; }
.client-info .ci-line.due b { font-size: 17px; font-weight: 800; }
.client-info .ci-quote {
  margin: 0; padding: 10px 14px; border-radius: 0 10px 10px 0;
  border-left: 3px solid var(--accent-2); background: color-mix(in srgb, var(--accent-2) 10%, transparent);
  font-size: 14px; line-height: 1.45; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere;
}
.client-info .ci-quote[hidden] { display: none; }
.client-info .ci-editor[hidden] { display: none; }
.client-info .ci-text {
  width: 100%; padding: 12px 14px; resize: vertical;
  font-family: var(--sans); font-size: 16px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; outline: none;
}
html.dark .client-info .ci-text { background: var(--paper); }
.client-info .ci-text:focus { border-color: var(--accent-2); }
.client-info .ci-editor-acts { display: flex; gap: 8px; }
.client-info .ci-editor-acts[hidden] { display: none; }
.client-info .ci-save, .client-info .ci-edit-cancel, .client-info .ci-cancel {
  height: 44px; padding: 0 18px;
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  border: none; border-radius: 999px; cursor: pointer; line-height: 1.15;
  font-family: var(--sans); font-size: 13px; font-weight: 600;
  transition: background var(--base), color var(--base), transform var(--fast);
}
.client-info .ci-save { background: var(--accent-fill); color: var(--paper); }
.client-info .ci-edit-cancel { background: var(--fill); color: var(--muted); }
.client-info .ci-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.client-info .ci-cancel {
  position: relative; overflow: hidden; margin-left: auto;
  background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger);
}
.client-info .ci-cancel[hidden] { display: none; }
.client-info .ci-attend { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 14px; }
.client-info .ci-attend button {
  min-height: 40px; padding: 0 10px; cursor: pointer;
  font-family: var(--sans); font-size: 13px; font-weight: 600;
  color: var(--muted); background: transparent;
  border: 1px solid var(--line); border-radius: 10px;
  transition: color var(--fast), border-color var(--fast), background var(--fast);
}
.client-info .ci-attend button.on { color: #fff; background: var(--accent-fill); border-color: transparent; }
html.dark .client-info .ci-attend button.on { color: var(--paper); }
.client-info .ci-attend button[data-on="1"].on { color: #fff; background: var(--danger); }
@media (hover: hover) { .client-info .ci-attend button:not(.on):hover { border-color: var(--accent-2); color: var(--ink); } }
.client-info .ci-cancel small {
  font-size: 9px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; opacity: .7;
}
.client-info .ci-cancel.holding { color: #fff; animation: fillCxl var(--hold, .6s) linear forwards; }
.client-info .ci-save:active, .client-info .ci-cancel:active { transform: scale(.96); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

.acc-form { margin: 4px 0 8px; padding: 0 4px; display: grid; gap: 8px; }
.acc-form[hidden] { display: none; }
.acc-form .field { margin-bottom: 0; }
.acc-form .btn { min-height: 44px; }
.acc-err { font-size: 12.5px; color: var(--danger); }
.acc-err[hidden] { display: none; }

.acc-form button {
  justify-self: start;
  padding: 9px 16px;
  font-family: var(--sans); font-size: 13px; font-weight: 600;
  color: #fff; background: var(--accent-fill);
  border: none; border-radius: 10px; cursor: pointer;
}
html.dark .acc-form button { color: #14161c; }
.acc-err { color: var(--warn); font-weight: 600; }
.acc-err[hidden] { display: none; }

.seg { display: flex; gap: 6px; margin-bottom: 10px; }
.seg-btn {
  flex: 1; padding: 8px 4px;
  font-family: var(--sans); font-size: 12px; font-weight: 600;
  color: var(--muted);
  background: rgba(255, 255, 255, .7);
  border: 1px solid var(--edge); border-radius: 999px;
  cursor: pointer; transition: background var(--base), color var(--base), transform var(--fast);
}
.seg-btn:active { transform: scale(.96); }
.seg-btn.on {
  color: #fff; background: var(--accent-fill);
  border-color: transparent;
}
html.dark .seg-btn { background: var(--surface-2); }
html.dark .seg-btn.on { background: var(--accent-fill); color: var(--paper); }

html.dark .field.search,
.field.search {
  padding: 12px 16px 12px 44px;
  font-size: 15px;
  margin-bottom: 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.6-3.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 15px center;
  background-size: 18px 18px;
}
.field.search::-webkit-search-cancel-button { margin-left: 6px; }

html.dark select.field,
select.field {
  appearance: none; -webkit-appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px 16px;
}
.btn.cl-dl.busy { opacity: .6; pointer-events: none; }

.cl-list { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.cl-row {
  display: block; width: 100%; text-align: left;
  padding: 11px 13px;
  background: rgba(148, 163, 184, .07);
  border: 1px solid transparent; border-radius: 12px;
  cursor: pointer; user-select: none;
  font-family: var(--sans); color: var(--ink);
  transition: border-color var(--fast), background var(--fast);
}
.cl-row:hover { border-color: var(--line); background: rgba(148, 163, 184, .12); }
.cl-row:active { transform: scale(.995); }
.cl-head {
  display: flex; align-items: baseline; gap: 8px;
  font-size: 14.5px; font-weight: 600;
}
.cl-head b { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-when {
  margin-left: auto; flex-shrink: 0;
  font-size: 12px; font-weight: 500; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.cl-line {
  display: flex; align-items: baseline; gap: 2px 10px; flex-wrap: wrap; margin-top: 2px;
  font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums;
}
.cl-line .cl-nums { margin-left: auto; white-space: nowrap; }
.cl-phone { color: var(--accent-2); text-decoration: none; }
.cl-nums { color: var(--muted); }
.cl-why { display: block; margin-top: 4px; font-size: 12px; line-height: 1.35; color: var(--muted); overflow-wrap: anywhere; }
.cl-line .cl-st { align-self: center; }
.cl-tg {
  flex-shrink: 0; font-size: 10px; font-weight: 700; letter-spacing: .3px;
  color: var(--muted); background: rgba(148, 163, 184, .16);
  border-radius: 6px; padding: 2px 6px; align-self: center;
}
.cl-note {
  margin-top: 6px; padding-left: 8px; font-size: 12px; color: var(--ink);
  border-left: 2px solid color-mix(in srgb, var(--accent-2) 55%, transparent);
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}

.cl-stats { margin: 10px 0 0; font-size: 12.5px; }
.cl-picks {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px;
  margin-top: 10px; padding: 4px; border-radius: 14px; background: var(--fill);
}
.cl-picks .chip {
  min-width: 0; min-height: 38px; padding: 0 6px; border: none; border-radius: 10px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: transparent; color: var(--muted);
  font-family: var(--sans); font-size: 12.5px; font-weight: 600; white-space: nowrap;
  transition: color var(--fast), background var(--fast);
}
.cl-picks .chip.on { color: var(--paper); background: var(--accent-fill); }
.cl-sort-wrap {
  display: block; margin: 12px 0 0;
  font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--muted);
}
.cl-sort-wrap .cl-sort { display: block; width: 100%; margin: 6px 0 0; padding: 10px 14px; font-size: 14px; }
@media (max-width: 430px) {
  .cl-picks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.cl-more {
  width: 100%; margin-top: 10px; padding: 12px; border-radius: 12px; cursor: pointer;
  border: 1px dashed var(--line); background: transparent;
  font-family: var(--sans); font-size: 13px; font-weight: 600; color: var(--accent-2);
}
.cl-more[hidden] { display: none; }
.cl-more:hover { border-color: var(--accent-2); }

.cl-period-seg { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 6px 0 12px; }
.cl-period-seg.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cl-period-range { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin: -4px 0 12px; }
.cl-period-range[hidden] { display: none; }
.cl-period-range .im-fld { margin-top: 0; min-width: 0; }
.cl-period-range .field { margin: 6px 0 0; min-width: 0; max-width: 100%; box-sizing: border-box; padding-right: 10px; }
.cl-period-range .field::-webkit-calendar-picker-indicator { margin: 0; }
@media (max-width: 360px) { .cl-period-range { grid-template-columns: minmax(0, 1fr); } }
.cl-export-hint { margin: 0 0 10px; }
.cl-export-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cl-export-acts .btn { width: 100%; min-height: 48px; font-size: 14px; }
.cl-export-acts .btn.xlsx { background: var(--xlsx); color: #fff; }
.cl-export-acts .btn.csv { background: var(--csv); color: #fff; }
.cl-db-link {
  display: block; margin-top: 14px; text-align: center;
  font-size: 12.5px; font-weight: 600; color: var(--muted); text-decoration: none;
}
.cl-db-link:hover { color: var(--accent-2); }
.btn.cl-dl {
  width: auto; min-height: 38px; display: inline-flex; align-items: center; justify-content: center;
  padding: 0 14px; text-decoration: none; text-align: center; font-size: 13px; white-space: nowrap;
}
.btn.cl-dl.busy { opacity: .6; pointer-events: none; }

.cl-sheet { position: fixed; inset: 0; z-index: 70; }
.cl-sheet[hidden] { display: none; }
.cl-sheet-veil {
  position: absolute; inset: 0; background: rgba(9, 14, 26, .55);
  opacity: 0; transition: opacity .22s var(--ease);
}
.cl-sheet.open .cl-sheet-veil { opacity: 1; }
.cl-sheet-card {
  position: absolute; left: 50%; bottom: 0; width: min(520px, 100%);
  transform: translate(-50%, 12px); opacity: 0;
  max-height: 88dvh; overflow-y: auto;
  padding: 10px 18px calc(20px + env(safe-area-inset-bottom));
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--edge); border-bottom: none;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -12px 40px rgba(9, 14, 26, .45);
  transition: transform .24s var(--ease), opacity .24s var(--ease);
}
.cl-sheet.open .cl-sheet-card { transform: translate(-50%, 0); opacity: 1; }
.cl-sheet-grip {
  width: 40px; height: 4px; margin: 0 auto 12px; border-radius: 4px;
  background: color-mix(in srgb, var(--muted) 45%, transparent);
}
.cl-sheet-x {
  position: absolute; top: 10px; right: 12px;
  width: 36px; height: 36px; border: 0; border-radius: 50%; cursor: pointer;
  background: transparent; color: var(--muted); font-size: 22px; line-height: 1;
}
.cl-sheet-x:hover { color: var(--ink); }
.cl-sheet-card h4 {
  margin: 0 40px 8px 0; font-family: var(--serif);
  font-size: 20px; font-weight: 600; line-height: 1.15;
}
.cl-sheet-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.cl-sheet-tags:empty { display: none; }
.cl-tag {
  padding: 4px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600;
  color: var(--muted); background: rgba(148, 163, 184, .12);
}
.cl-tag.good { color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); }
.cl-tag.warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); }
.cl-tag.bad { color: var(--danger); background: color-mix(in srgb, var(--danger) 14%, transparent); }
.cl-sheet .btn.ghost {
  background: transparent; color: var(--accent-2);
  border: 1px solid var(--edge);
}
.cl-sheet .btn.ghost:hover { border-color: var(--accent-2); }
.cl-sheet-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cl-sheet-acts .btn {
  min-width: 0; min-height: 48px; padding: 0 12px; text-decoration: none; white-space: nowrap;
  display: inline-flex; align-items: center; justify-content: center; font-size: 14px;
}
.cl-sheet-nums {
  display: flex; gap: 8px; margin: 14px 0 16px;
}
.cl-sheet-nums span {
  flex: 1; display: flex; flex-direction: column; gap: 2px;
  padding: 10px; border-radius: 12px; background: rgba(148, 163, 184, .08);
  font-size: 11.5px; color: var(--muted); text-align: center;
}
.cl-sheet-nums b {
  font-size: 16px; color: var(--ink); font-variant-numeric: tabular-nums;
}
.cl-sheet-label {
  display: block; margin-bottom: 6px;
  font-size: 12px; font-weight: 600; color: var(--muted);
}
.cl-text {
  width: 100%; min-height: 96px; resize: vertical; margin-bottom: 12px;
  font-family: var(--sans); font-size: 15px; line-height: 1.45;
}
.cl-sheet-save { display: grid; gap: 8px; justify-items: center; }
.cl-sheet-save .btn { width: 100%; min-height: 48px; }
.cl-sheet-wipe {
  border: none; background: transparent; cursor: pointer; padding: 6px 10px;
  font-family: var(--sans); font-size: 13px; font-weight: 600; color: var(--danger);
}
.cl-sheet-wipe[hidden] { display: none; }
@media (min-width: 1000px) {
  .cl-sheet-card {
    bottom: auto; top: 50%;
    transform: translate(-50%, calc(-50% + 12px));
    max-height: 84dvh; border: 1px solid var(--edge); border-radius: 20px;
    box-shadow: 0 24px 60px rgba(9, 14, 26, .5);
    padding-top: 18px;
  }
  .cl-sheet.open .cl-sheet-card { transform: translate(-50%, -50%); }
  .cl-sheet-grip { display: none; }
}

.cl-sheet .btn.cl-sheet-wipe {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 40%, transparent);
}
.cl-sheet-wipe[hidden] { display: none; }

.slot.booking.span::before { width: 5px; }
.slot.booking.span .t { width: auto; min-width: 48px; line-height: 1.15; }
.slot.booking.span .t small {
  display: block; font-size: 10.5px; font-weight: 600; color: var(--muted);
}
.slot .sl-hours {
  margin-left: 8px; padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 700; color: var(--accent-2);
  background: color-mix(in srgb, var(--accent-2) 14%, transparent);
  white-space: nowrap;
}

html body [data-req], html.dark body [data-req] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Ctext x='1' y='11' font-size='14' font-weight='700' font-family='Arial' fill='%23d9534f'%3E*%3C/text%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px top 9px;
  background-size: 11px 11px;
  padding-right: 34px;
}

@media (max-width: 999px) {
  .acc-form button { min-height: 46px; padding: 12px 20px; font-size: 14px; }

  .site-links { gap: 4px; }
  .site-links a {
    display: inline-flex; align-items: center; min-height: 44px;
    padding: 0 4px; font-size: 14px;
  }

  .cl-row { padding: 12px 13px; }
  .cl-head b { font-size: 15px; }
  .cl-phone { font-size: 13px; }
  .cl-picks .chip { white-space: normal; line-height: 1.15; text-align: center; padding: 4px 6px; }
  .btn.cl-dl { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; }
  .field.search, select.field { min-height: 46px; }
}

.sw-note {
  position: fixed; z-index: 60; left: 12px; right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: 460px; margin: 0 auto; padding: 12px 12px 12px 16px;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--edge); border-radius: 16px;
  box-shadow: 0 12px 34px rgba(15, 33, 67, .26);
  font-family: var(--sans); font-size: 13.5px; font-weight: 600;
  opacity: 0; transform: translateY(14px);
  transition: opacity var(--base) var(--ease), transform var(--base) var(--ease);
}
.sw-note.show { opacity: 1; transform: none; }
.sw-note button {
  flex-shrink: 0; min-height: 38px; padding: 0 16px;
  border: 0; border-radius: 11px; cursor: pointer;
  background: var(--ink); color: var(--surface);
  font-family: var(--sans); font-size: 13.5px; font-weight: 700;
}
.sw-note button:disabled { opacity: .6; pointer-events: none; }

.tray-group {
  display: grid; gap: 2px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line);
}
.tray-cap {
  margin: 0 0 6px 14px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--muted);
}
.tray-who { padding: 2px 14px 10px; }
.tray-who b { display: block; font-size: 14px; color: var(--ink); overflow-wrap: anywhere; }
.tray-who span { display: block; margin-top: 1px; font-size: 12px; color: var(--muted); }
.tray-who span:empty { display: none; }
.tray-row {
  display: flex; align-items: center; gap: 10px;
  min-height: 42px; padding: 0 14px; border: none; border-radius: 12px;
  background: transparent; color: var(--ink); text-decoration: none; text-align: left; cursor: pointer;
  font-family: var(--sans); font-size: 13.5px; font-weight: 600;
  transition: background var(--fast), color var(--fast), transform var(--fast);
}
.tray-row svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--muted); }
.tray-row[hidden] { display: none; }
.tray-row:active { transform: scale(.98); }
.tray-row:disabled { opacity: .6; pointer-events: none; }
@media (hover: hover) { .tray-row:hover { background: var(--fill); } }
.tray-out { color: var(--danger); }
.tray-out svg { color: var(--danger); }
.dr-install[hidden] { display: none; }
.dr-bell[hidden] { display: none; }
.dr-bell.on, .dr-bell.on svg { color: var(--accent-2); }
@media (max-width: 999px) { .tray-row { min-height: 46px; font-size: 14px; } }

.tip-note {
  position: fixed; z-index: 60; left: 12px; right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  max-width: 460px; margin: 0 auto; padding: 14px 16px 12px;
  display: grid; gap: 10px; justify-items: start;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--edge); border-radius: 16px;
  box-shadow: 0 12px 34px rgba(15, 33, 67, .26);
  font-family: var(--sans); font-size: 13.5px; line-height: 1.45; font-weight: 500;
  opacity: 0; transform: translateY(14px);
  transition: opacity var(--base) var(--ease), transform var(--base) var(--ease);
}
.tip-note.show { opacity: 1; transform: none; }
.tip-note b { font-weight: 700; }
.tip-note button {
  align-self: end; min-height: 36px; padding: 0 16px;
  border: 0; border-radius: 11px; cursor: pointer;
  background: var(--ink); color: var(--surface);
  font-family: var(--sans); font-size: 13px; font-weight: 700;
}

.side-stick.dragging, #drawer.dragging { transition: none !important; visibility: visible; }
.cl-sheet-card.dragging { transition: none !important; }

#ptr {
  position: fixed; left: 0; right: 0; top: 0; z-index: 45; pointer-events: none;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  height: 0; overflow: hidden;
  font-family: var(--sans); font-size: 12.5px; font-weight: 600; color: var(--muted);
  transition: height .18s var(--ease);
}
#ptr.show { height: min(var(--pull, 0px), 96px); }
#ptr i {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--line); border-top-color: var(--accent-2);
  transform: rotate(calc(var(--pull, 0px) * 2.5deg));
  transition: transform .1s linear;
}
#ptr.ready i { border-color: var(--accent-2); }
#ptr.ready span { color: var(--ink); }
#ptr.busy i { animation: ptr-spin .8s linear infinite; }
@keyframes ptr-spin { to { transform: rotate(360deg); } }

.quick button, .cl-picks .chip, .cl-sheet .btn.ghost { background: var(--fill); }
.lg-free::before { border-color: var(--line); background: var(--fill); }

@keyframes fillCxl { from { background: color-mix(in srgb, var(--danger) 15%, transparent); } to { background: var(--danger); } }
