/* Eco CRM — рабочее место администратора за ноутбуком. Цвета бренда Eco Cosmetology. */
:root {
  --bg: #f3f6f4;
  --panel: #ffffff;
  --ink: #15281e;
  --muted: #5f7468;
  --line: #e1e9e4;
  --side: #0f2b1f;
  --side-ink: #cfe4d7;
  --accent: #1f7a4d;
  --accent-dark: #17603c;
  --accent-soft: #e2f3e9;
  --ok: #1d8a52;
  --ok-soft: #dff5e8;
  --warn: #9a5a08;
  --warn-soft: #fff1d6;
  --bad: #b3261e;
  --bad-soft: #fde4e1;
  --info: #3b5bab;
  --info-soft: #e5ecfb;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 40, 28, .06), 0 6px 18px rgba(16, 40, 28, .05);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
h1 { font-size: 26px; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 18px; margin: 0; }
h3 { font-size: 15px; margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }

.boot { display: grid; place-items: center; height: 100vh; }
.boot-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; transform: scale(.7); } }

/* вход */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(900px 500px at 15% 0%, #dff2e6 0, transparent 60%), radial-gradient(700px 500px at 100% 100%, #e8f0ea 0, transparent 60%), var(--bg); }
.login-card { width: 100%; max-width: 380px; background: var(--panel); border-radius: 20px; padding: 32px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 16px; }
.login-card .brand { color: var(--ink); padding: 0; margin-bottom: 4px; }
.login-card .brand small { color: var(--muted); }
.login-note { font-size: 12.5px; color: var(--muted); text-align: center; margin: 0; }

/* каркас */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.side { background: var(--side); color: var(--side-ink); display: flex; flex-direction: column; padding: 18px 12px; gap: 6px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; color: #fff; }
.brand img { width: 38px; height: 38px; border-radius: 11px; background: var(--accent); padding: 5px; }
.brand b { display: block; font-size: 15px; line-height: 1.2; }
.brand small { color: var(--side-ink); font-size: 12px; }
.nav { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; color: var(--side-ink); padding: 10px 12px; border-radius: 10px; text-align: left; }
.nav svg { width: 18px; height: 18px; flex: none; }
.nav:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav.on { background: rgba(255, 255, 255, .12); color: #fff; font-weight: 600; }
.nav .count { margin-left: auto; background: var(--bad); color: #fff; border-radius: 99px; font-size: 11px; padding: 1px 7px; font-weight: 700; }
.side-foot { margin-top: auto; border-top: 1px solid rgba(255, 255, 255, .1); padding: 12px 8px 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.side-foot b { color: #fff; font-size: 13px; }
.side-foot button { border: 1px solid rgba(255, 255, 255, .2); background: none; color: var(--side-ink); border-radius: 8px; padding: 5px 10px; font-size: 12px; }
.main { padding: 22px 26px 40px; min-width: 0; }
.top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.days { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* элементы */
.btn { border: 1px solid var(--line); background: var(--panel); border-radius: 10px; padding: 9px 14px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn:hover { border-color: #c9d8cf; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-dark); }
.btn.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.danger { color: var(--bad); border-color: #f1c2bd; background: #fff; }
.btn.block { width: 100%; }
.btn.sm { padding: 6px 10px; font-size: 13px; }
.btn.icon { width: 38px; padding: 9px 0; }
.btn:disabled { opacity: .55; cursor: default; }
.link { border: 0; background: none; color: var(--accent); font-weight: 600; padding: 0; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-weight: 600; font-size: 13px; }
.input { width: 100%; border: 1px solid #cfdcd4; background: #fff; border-radius: 10px; padding: 10px 12px; outline: none; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea.input { resize: vertical; min-height: 64px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.chip { display: inline-flex; align-items: center; gap: 5px; border-radius: 99px; padding: 2px 9px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.bad { background: var(--bad-soft); color: var(--bad); }
.chip.info { background: var(--info-soft); color: var(--info); }
.chip.off { background: #eef1ef; color: var(--muted); }
.err { color: var(--bad); font-size: 13px; margin: 0; }

/* полоса синхронизации */
.syncbar { display: flex; align-items: center; gap: 18px; padding: 12px 16px; margin-bottom: 16px; flex-wrap: wrap; }
.syncbar .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); flex: none; }
.syncbar .dot.bad { background: var(--bad); }
.syncbar b { font-weight: 600; }
.syncbar .bad { color: var(--bad); font-weight: 700; }
.syncbar .grow { flex: 1; }

/* расписание */
.work { display: grid; grid-template-columns: 1fr 340px; gap: 16px; align-items: start; }
.cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; align-items: start; }
.col { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.col-head { display: flex; align-items: center; gap: 10px; }
.ava { width: 38px; height: 38px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 13px; overflow: hidden; }
.ava img { width: 100%; height: 100%; object-fit: cover; }
.col-head b { display: block; font-size: 14px; }
.col-empty { border: 1px dashed var(--line); border-radius: 12px; padding: 14px; text-align: center; color: var(--muted); font-size: 13px; }
.rec { border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; display: flex; flex-direction: column; gap: 4px; background: #fbfdfc; }
.rec.bad { border-color: #f3c8c3; background: #fffafa; }
.rec.bot { border-style: dashed; }
.rec-time { font-weight: 700; font-variant-numeric: tabular-nums; display: flex; justify-content: space-between; gap: 6px; }
.rec-name { font-weight: 700; font-size: 15px; }
.rec-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }

/* форма */
.form { padding: 18px; display: flex; flex-direction: column; gap: 14px; position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; max-height: 210px; overflow: auto; padding: 2px; }
.svc { border: 1px solid #cfdcd4; background: #fff; border-radius: 99px; padding: 6px 12px; font-size: 13px; text-align: left; }
.svc.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.svc small { opacity: .7; }
.summary { background: var(--accent-soft); border-radius: 10px; padding: 9px 12px; font-size: 13px; }
.known { background: var(--info-soft); color: var(--info); border-radius: 10px; padding: 8px 12px; font-size: 13px; }
.times { display: flex; flex-wrap: wrap; gap: 6px; }
.time { border: 1px solid #cfdcd4; background: #fff; border-radius: 8px; padding: 5px 9px; font-variant-numeric: tabular-nums; font-size: 13px; }
.time.on { background: var(--accent); border-color: var(--accent); color: #fff; }

/* таблицы и списки */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.table td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr.click:hover td { background: #f6faf7; cursor: pointer; }
.split { display: grid; grid-template-columns: 1fr 380px; gap: 16px; align-items: start; }
.card { padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.list-item { border-top: 1px solid var(--line); padding: 10px 0; }
.list-item:first-of-type { border-top: 0; }
.master { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.svc-line { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; border-top: 1px solid var(--line); padding-top: 6px; }
.empty { text-align: center; color: var(--muted); padding: 40px 20px; }

/* окно и уведомление */
.backdrop { position: fixed; inset: 0; background: rgba(15, 43, 31, .35); display: grid; place-items: center; padding: 20px; z-index: 50; }
.modal { background: #fff; border-radius: 16px; padding: 22px; width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 20px 50px rgba(0, 0, 0, .2); }
.modal .row { display: flex; gap: 10px; justify-content: flex-end; }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: #15281e; color: #fff; padding: 11px 18px; border-radius: 12px; z-index: 60; max-width: 90vw; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.toast.bad { background: var(--bad); }

@media (max-width: 1180px) { .work, .split { grid-template-columns: 1fr; } .form { position: static; max-height: none; } }
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; }
  .brand { padding-bottom: 6px; width: 100%; }
  .side-foot { width: 100%; }
  .main { padding: 16px; }
}
.days .input { width: auto; padding: 8px 10px; }
