/* Be Happy Workspace — оболочка
   Палитра и радиусы взяты с лендинга behappy.exchange, чтобы система выглядела частью бренда.
   Стиль — плотная приборная панель: много данных на экране, минимум украшений. */

:root {
  color-scheme: light;

  --bg:         #f8f9fc;
  --surface:    #ffffff;
  --surface-2:  #f1f3f9;
  --surface-3:  #e9edf5;
  --border:     #e4e8f0;
  --border-str: #d3d9e6;

  --text:       #111827;
  --text-dim:   #5c657d;
  --text-faint: #9ba3b8;

  --brand:      #7c3aed;
  --brand-hi:   #6d28d9;
  --brand-soft: #f3f0ff;
  --on-brand:   #ffffff;

  --ok:         #0f9d6f;
  --ok-soft:    #ecfdf5;
  --warn:       #b45309;
  --warn-soft:  #fffbeb;
  --danger:     #dc2626;
  --danger-soft:#fef2f2;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-full: 9999px;

  --sh-xs: 0 1px 2px rgba(17, 24, 39, .05);
  --sh-sm: 0 2px 8px rgba(17, 24, 39, .07);
  --sh-md: 0 8px 28px rgba(17, 24, 39, .12);

  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, 'SF Mono', 'Cascadia Mono', Consolas, monospace;

  --sidebar: 232px;
  --topbar: 56px;
  --ease: cubic-bezier(.4, 0, .2, 1);
}

:root[data-theme="dark"] {
  color-scheme: dark;

  --bg:         #0e1016;
  --surface:    #161923;
  --surface-2:  #1d212c;
  --surface-3:  #262b38;
  --border:     #2a2f3d;
  --border-str: #3a4152;

  --text:       #e9ebf2;
  --text-dim:   #a2abc0;
  --text-faint: #6f7994;

  --brand:      #a78bfa;
  --brand-hi:   #c4b5fd;
  --brand-soft: #241d3d;
  --on-brand:   #1a1330;

  --ok:         #34d399;
  --ok-soft:    #0d2c22;
  --warn:       #fbbf24;
  --warn-soft:  #2e2410;
  --danger:     #f87171;
  --danger-soft:#2d1516;

  --sh-xs: 0 1px 2px rgba(0, 0, 0, .4);
  --sh-sm: 0 2px 8px rgba(0, 0, 0, .45);
  --sh-md: 0 8px 28px rgba(0, 0, 0, .55);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font: 400 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); }

/* ---------- каркас ---------- */

.app { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100dvh; }

.side {
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100dvh;
}

.side__brand {
  display: flex; align-items: center; gap: 10px;
  height: var(--topbar); padding: 0 16px;
  border-bottom: 1px solid var(--border);
  font-weight: 650; letter-spacing: -.01em;
}
.side__mark {
  width: 26px; height: 26px; border-radius: var(--r-sm);
  background: linear-gradient(135deg, var(--brand), var(--brand-hi));
  color: #fff; display: grid; place-items: center;
  font-size: 12px; font-weight: 700; flex: none;
}

.side__nav { padding: 12px 8px; overflow-y: auto; flex: 1; }
.side__group { padding: 14px 12px 6px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-faint); }

.navlink {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: var(--r-sm);
  color: var(--text-dim); font-weight: 500;
  transition: background .15s var(--ease), color .15s var(--ease);
}
.navlink:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.navlink[aria-current="page"] { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.navlink svg { width: 17px; height: 17px; flex: none; }
.navlink__badge { margin-left: auto; font-size: 11px; color: var(--text-faint); }

.side__foot { padding: 12px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 30px; height: 30px; border-radius: var(--r-full); flex: none;
  background: var(--surface-3); color: var(--text-dim);
  display: grid; place-items: center; font-size: 12px; font-weight: 600;
}
.side__who { min-width: 0; line-height: 1.25; }
.side__who b { display: block; font-weight: 600; font-size: 13px; }
.side__who span { font-size: 11px; color: var(--text-faint); }

/* ---------- верхняя полоса ---------- */

.main { min-width: 0; display: flex; flex-direction: column; }

.top {
  height: var(--topbar); flex: none;
  display: flex; align-items: center; gap: 12px; padding: 0 20px;
  background: var(--surface); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 20;
}
.top__search { position: relative; flex: 1; max-width: 460px; }
.top__search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-faint); pointer-events: none; }
.top__search input {
  width: 100%; height: 36px; padding: 0 12px 0 34px;
  background: var(--surface-2); border: 1px solid transparent; border-radius: var(--r-sm);
  transition: border-color .15s var(--ease), background .15s var(--ease);
}
.top__search input:focus { background: var(--surface); border-color: var(--brand); outline: none; }

.rateStrip { display: flex; gap: 14px; margin-left: auto; align-items: center; }
.rateChip { display: flex; align-items: baseline; gap: 6px; font-size: 13px; white-space: nowrap; }
.rateChip b { font-weight: 600; }
.rateChip .lbl { color: var(--text-faint); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }

.iconbtn {
  width: 34px; height: 34px; display: grid; place-items: center;
  background: transparent; border: 1px solid var(--border); border-radius: var(--r-sm);
  color: var(--text-dim); cursor: pointer;
  transition: background .15s var(--ease), color .15s var(--ease);
}
.iconbtn:hover { background: var(--surface-2); color: var(--text); }
.iconbtn svg { width: 17px; height: 17px; }

/* ---------- содержимое ---------- */

.page { padding: 24px; max-width: 1440px; width: 100%; }
.page__head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page__head h1 { margin: 0; font-size: 22px; font-weight: 650; letter-spacing: -.02em; }
.page__head p { margin: 4px 0 0; color: var(--text-dim); font-size: 13px; }
.page__actions { margin-left: auto; display: flex; gap: 8px; }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); box-shadow: var(--sh-xs);
}
.card__head { padding: 14px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.card__head h2 { margin: 0; font-size: 14px; font-weight: 600; }
.card__body { padding: 16px; }

.grid { display: grid; gap: 16px; }
.grid--tiles { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

/* плитки показателей */
.tile {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 14px 16px; display: block;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
a.tile:hover { border-color: var(--border-str); box-shadow: var(--sh-sm); text-decoration: none; }
.tile__label { font-size: 12px; color: var(--text-dim); }
.tile__value { font-size: 26px; font-weight: 650; letter-spacing: -.02em; margin-top: 4px; }
.tile__hint { font-size: 12px; color: var(--text-faint); margin-top: 2px; }

/* курс */
.rateCard { display: flex; flex-direction: column; gap: 10px; }
.rateRow { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.rateRow:last-child { border-bottom: 0; }
.rateRow__pair { width: 84px; font-weight: 600; }
.rateRow__val { font-size: 18px; font-weight: 600; }
.rateRow__sub { font-size: 11px; color: var(--text-faint); }
.rateRow__own { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.rateRow input[type="number"] { width: 96px; text-align: right; }

.delta { font-size: 12px; font-weight: 600; }
.delta--up { color: var(--ok); }
.delta--down { color: var(--danger); }
.delta--flat { color: var(--text-faint); }

/* ---------- таблицы ---------- */

.tablewrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
table.t th, table.t td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--border); }
table.t thead th {
  position: sticky; top: 0; z-index: 1;
  background: var(--surface-2); color: var(--text-dim);
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em;
  white-space: nowrap;
}
table.t tbody tr { transition: background .12s var(--ease); }
table.t tbody tr:hover { background: var(--surface-2); }
table.t td.right, table.t th.right { text-align: right; }
table.t .sortable { cursor: pointer; user-select: none; }
table.t .sortable:hover { color: var(--text); }
table.t th[aria-sort="ascending"]::after  { content: " ↑"; color: var(--brand); }
table.t th[aria-sort="descending"]::after { content: " ↓"; color: var(--brand); }

/* ---------- фильтры ---------- */

.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 12px; border-radius: var(--r-full);
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-dim); font-size: 12.5px; font-weight: 500; cursor: pointer;
  transition: background .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease);
}
.chip:hover { border-color: var(--border-str); color: var(--text); }
.chip[aria-pressed="true"] { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }
.chip__n { font-size: 11px; color: var(--text-faint); }
.chip[aria-pressed="true"] .chip__n { color: var(--brand); }

/* ---------- формы и кнопки ---------- */

input[type="text"], input[type="password"], input[type="number"], input[type="date"], select, textarea {
  height: 36px; padding: 0 10px; width: 100%;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border-str); border-radius: var(--r-sm);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
textarea { height: auto; padding: 8px 10px; min-height: 76px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
input:disabled, select:disabled, textarea:disabled { opacity: .5; cursor: not-allowed; }

label.field { display: block; margin-bottom: 12px; }
label.field > span { display: block; font-size: 12px; font-weight: 500; color: var(--text-dim); margin-bottom: 5px; }
.hint { font-size: 12px; color: var(--text-faint); margin-top: 4px; }
.err { font-size: 12.5px; color: var(--danger); margin-top: 5px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 15px; border-radius: var(--r-sm);
  background: var(--surface); border: 1px solid var(--border-str);
  color: var(--text); font-weight: 550; cursor: pointer; white-space: nowrap;
  transition: background .15s var(--ease), border-color .15s var(--ease), opacity .15s var(--ease);
}
.btn:hover:not(:disabled) { background: var(--surface-2); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; }
.btn--primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.btn--primary:hover:not(:disabled) { background: var(--brand-hi); border-color: var(--brand-hi); }
.btn--sm { height: 30px; padding: 0 11px; font-size: 13px; }
.btn--danger { color: var(--danger); border-color: var(--danger); background: transparent; }
.btn--danger:hover:not(:disabled) { background: var(--danger-soft); }

/* Разрушающее действие в строке таблицы: тихое по умолчанию, красное при наведении */
.btn--quiet { border-color: transparent; background: transparent; color: var(--text-faint); font-weight: 500; }
.btn--quiet:hover:not(:disabled) { background: var(--danger-soft); color: var(--danger); }

/* ---------- ярлыки ---------- */

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: var(--r-full);
  font-size: 11.5px; font-weight: 600; white-space: nowrap;
  background: var(--surface-2); color: var(--text-dim);
}
.badge--ok    { background: var(--ok-soft);    color: var(--ok); }
.badge--warn  { background: var(--warn-soft);  color: var(--warn); }
.badge--brand { background: var(--brand-soft); color: var(--brand); }

.tag {
  display: inline-block; padding: 1px 7px; margin: 1px 2px 1px 0;
  border-radius: var(--r-sm); background: var(--surface-2);
  color: var(--text-dim); font-size: 11.5px;
}

/* ---------- вход ---------- */

.login { min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.login__box { width: 100%; max-width: 360px; }
.login__mark {
  width: 44px; height: 44px; border-radius: var(--r-md); margin: 0 auto 16px;
  background: linear-gradient(135deg, var(--brand), var(--brand-hi));
  color: #fff; display: grid; place-items: center; font-weight: 700;
}
.login h1 { font-size: 19px; text-align: center; margin: 0 0 4px; font-weight: 650; }
.login .sub { text-align: center; color: var(--text-dim); font-size: 13px; margin: 0 0 22px; }

/* ---------- состояния ---------- */

.empty { padding: 44px 20px; text-align: center; color: var(--text-dim); }
.empty h3 { margin: 0 0 6px; font-size: 15px; color: var(--text); font-weight: 600; }
.empty p { margin: 0 0 14px; font-size: 13px; }

.skel { background: var(--surface-2); border-radius: var(--r-sm); animation: pulse 1.4s var(--ease) infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }

.note { display: flex; gap: 9px; padding: 10px 13px; border-radius: var(--r-sm); font-size: 13px; align-items: flex-start; }
.note--info { background: var(--brand-soft); color: var(--brand); }
.note--warn { background: var(--warn-soft); color: var(--warn); }
.note svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }

.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%);
  background: var(--text); color: var(--bg);
  padding: 10px 18px; border-radius: var(--r-full); box-shadow: var(--sh-md);
  font-size: 13px; font-weight: 500; z-index: 100;
  animation: toastIn .2s var(--ease);
}
.toast--err { background: var(--danger); color: #fff; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 10px); } }

.embed { width: 100%; height: 620px; border: 0; border-radius: var(--r-md); background: var(--surface-2); }

/* ---------- боковая панель форм ---------- */

.drawerScrim { position: fixed; inset: 0; background: rgba(10, 12, 18, .55); z-index: 60; animation: fade .16s var(--ease); }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100%);
  background: var(--surface); border-left: 1px solid var(--border);
  box-shadow: var(--sh-md); z-index: 61;
  display: flex; flex-direction: column;
  animation: slideIn .2s var(--ease);
}
.drawer--wide { width: min(1100px, 100%); }

.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.dot--ok { background: var(--ok); }
.dot--bad { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }

.drawer__head {
  display: flex; align-items: center; gap: 12px; padding: 14px 18px;
  border-bottom: 1px solid var(--border); flex: none;
}
.drawer__head h2 { margin: 0; font-size: 15px; font-weight: 600; }
.drawer__head .iconbtn { margin-left: auto; border: 0; font-size: 15px; }
.drawer__body { padding: 18px; overflow-y: auto; flex: 1; }
.drawer__foot { display: flex; gap: 8px; padding-top: 6px; }
.drawer__foot .btn { flex: 1; }
.drawer__foot .btn--quiet { flex: 0 0 auto; }

@keyframes fade { from { opacity: 0; } }
@keyframes slideIn { from { transform: translateX(16px); opacity: 0; } }
@media (max-width: 640px) { .drawer { width: 100%; } @keyframes slideIn { from { transform: translateY(16px); opacity: 0; } } }

/* ---------- красная зона ---------- */

.rz { border: 1px solid var(--warn); background: var(--warn-soft); border-radius: var(--r-sm); padding: 12px 14px; margin: 12px 0; }
.rz h4 { margin: 0 0 8px; font-size: 13px; font-weight: 650; color: var(--warn); display: flex; align-items: center; gap: 7px; }
.rz ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.rz li { font-size: 12.5px; line-height: 1.45; }
.rz mark { background: var(--warn); color: #fff; padding: 0 5px; border-radius: 4px; font-weight: 600; }
.rz .why { color: var(--text-dim); display: block; margin-top: 2px; }
.rz .fix { color: var(--text); display: block; margin-top: 2px; }
.rz--clean { border-color: var(--ok); background: var(--ok-soft); }
.rz--clean h4 { color: var(--ok); }

/* ---------- главная из виджетов ---------- */

.dash { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; align-items: start; }
.dash__full { grid-column: 1 / -1; }
@media (max-width: 760px) { .dash { grid-template-columns: 1fr; } }

/* строка настройки виджета */
.wrow {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.wrow:last-child { border-bottom: 0; }
.wrow--off { opacity: .5; }
.wrow__toggle { display: flex; align-items: center; gap: 10px; flex: 1; cursor: pointer; margin: 0; }
.wrow__toggle input { width: auto; height: auto; flex: none; }
.wrow__toggle b { display: block; font-size: 13px; font-weight: 600; }
.wrow__toggle i { display: block; font-style: normal; font-size: 12px; color: var(--text-faint); }
.wrow__ord { display: flex; gap: 4px; flex: none; }

.secret {
  padding: 12px 14px; border-radius: var(--r-sm);
  background: var(--surface-2); border: 1px dashed var(--border-str);
  font-size: 15px; letter-spacing: .04em; word-break: break-all; user-select: all;
}

/* ---------- проверка текста ---------- */

.verdict {
  display: grid; gap: 4px; padding: 14px 16px;
  border-radius: var(--r-md); border: 1px solid var(--border);
  background: var(--surface);
}
.verdict b { font-size: 15px; font-weight: 650; }
.verdict > span { font-size: 13px; color: var(--text-dim); }
.verdict__nums { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.verdict__nums i {
  font-style: normal; font-size: 11.5px; font-weight: 600;
  padding: 2px 8px; border-radius: var(--r-full);
  background: var(--surface-2); color: var(--text-dim);
}
.verdict__nums i.stop { background: var(--danger-soft); color: var(--danger); }
.verdict__nums i.warn { background: var(--warn-soft); color: var(--warn); }
.verdict__nums i.look { background: var(--brand-soft); color: var(--brand); }

.verdict--ok   { border-color: var(--ok);     background: var(--ok-soft); }
.verdict--ok b { color: var(--ok); }
.verdict--look { border-color: var(--brand);  background: var(--brand-soft); }
.verdict--look b { color: var(--brand); }
.verdict--warn { border-color: var(--warn);   background: var(--warn-soft); }
.verdict--warn b { color: var(--warn); }
.verdict--stop { border-color: var(--danger); background: var(--danger-soft); }
.verdict--stop b { color: var(--danger); }

.finding { border-left: 3px solid var(--border-str); padding-left: 11px; font-size: 12.5px; line-height: 1.45; }
.finding--stop { border-left-color: var(--danger); }
.finding--warn { border-left-color: var(--warn); }
.finding--look { border-left-color: var(--brand); }
.finding__top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 7px; }
.finding__top b { font-size: 13px; font-weight: 600; }
.finding__top mark { background: var(--surface-3); color: var(--text); padding: 1px 6px; border-radius: 4px; font-weight: 500; }
.finding--stop .finding__top mark { background: var(--danger); color: #fff; }
.finding__dot { width: 0; }
.finding__why { color: var(--text-dim); margin-top: 2px; }
.finding__fix { color: var(--text); margin-top: 2px; }

/* ---------- планирование: строка быстрого добавления и правка в таблице ---------- */

.quickadd {
  display: flex; gap: 8px; align-items: center;
  padding: 12px 14px; border-bottom: 1px solid var(--border);
  background: var(--surface-2); flex-wrap: wrap;
}
.quickadd input[type="text"] { flex: 1; min-width: 200px; }
.quickadd select, .quickadd input[type="date"] { width: auto; flex: none; }

table.t.plan td { padding: 4px 8px; vertical-align: middle; }
table.t.plan tbody tr:hover { background: transparent; }

.cellinput {
  height: 30px; width: 100%; padding: 0 7px;
  background: transparent; border: 1px solid transparent; border-radius: 6px;
  font-size: 13px; color: var(--text);
  transition: border-color .12s var(--ease), background .12s var(--ease);
}
.cellinput:hover { border-color: var(--border); }
.cellinput:focus { background: var(--surface); border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); outline: none; }
select.cellinput { cursor: pointer; }

/* ---------- баланс плана ---------- */

.weeks { display: flex; gap: 6px; margin-top: 12px; }
.wk {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 4px; border-radius: var(--r-sm); background: var(--surface-2);
}
.wk b { font-size: 15px; font-weight: 650; }
.wk span { font-size: 10.5px; color: var(--text-faint); }

.mix { display: grid; grid-template-columns: 88px 1fr 44px 58px; gap: 10px; align-items: center; margin-bottom: 7px; font-size: 12.5px; }
.mix__name { color: var(--text-dim); }
.mix__bar { position: relative; height: 8px; border-radius: var(--r-full); background: var(--surface-3); overflow: visible; }
.mix__bar i { position: absolute; inset: 0 auto 0 0; border-radius: var(--r-full); background: var(--brand); }
.mix__bar u {
  position: absolute; top: -3px; width: 2px; height: 14px;
  background: var(--text-faint); border-radius: 1px;
}
.mix__n { font-weight: 600; text-align: right; }
.mix__t { color: var(--text-faint); }

/* ---------- календарь контент-плана ---------- */

/* minmax(0, 1fr), а не 1fr: иначе длинный заголовок поста распирает колонку,
   потому что минимум у 1fr — ширина содержимого. */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; }
.cal__dow { background: var(--surface-2); padding: 7px 9px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--text-faint); text-align: center; }
.cal__day { background: var(--surface); min-height: 96px; min-width: 0; padding: 6px; display: flex; flex-direction: column; gap: 4px; }
.cal__day--out { background: var(--surface-2); opacity: .55; }
.cal__day--today { box-shadow: inset 0 0 0 2px var(--brand); }
.cal__num { font-size: 11.5px; color: var(--text-faint); font-variant-numeric: tabular-nums; }
.cal__day--today .cal__num { color: var(--brand); font-weight: 700; }
.cal__post {
  font-size: 11.5px; line-height: 1.3; padding: 4px 6px; border-radius: 6px; cursor: pointer;
  background: var(--surface-2); border-left: 3px solid var(--text-faint);
  text-align: left; width: 100%; border-top: 0; border-right: 0; border-bottom: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cal__post:hover { background: var(--surface-3); }
.cal__post[data-status="published"] { border-left-color: var(--ok); }
.cal__post[data-status="scheduled"] { border-left-color: var(--brand); }
.cal__post[data-status="review"]    { border-left-color: var(--warn); }
.cal__post[data-rz="1"]::after { content: " ⚠"; color: var(--warn); }
.cal__add { font-size: 16px; color: var(--text-faint); background: none; border: 0; cursor: pointer; padding: 0; text-align: left; opacity: 0; }
.cal__day:hover .cal__add { opacity: 1; }

@media (max-width: 780px) { .cal { grid-template-columns: 1fr; } .cal__dow { display: none; } .cal__day { min-height: 0; } .cal__day--out { display: none; } }

/* ---------- узкие экраны ---------- */

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: var(--sidebar); z-index: 40;
          transform: translateX(-100%); transition: transform .2s var(--ease); box-shadow: var(--sh-md); }
  .side[data-open="true"] { transform: none; }
  .scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .5); z-index: 30; }
  .page { padding: 16px; }
  .rateStrip { display: none; }
}
@media (min-width: 901px) { .burger, .scrim { display: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- инструкция ---------- */
.help p { margin: 0 0 10px; font-size: 13.5px; line-height: 1.6; }
.help p:last-child { margin-bottom: 0; }
.help b { font-weight: 600; }
