/* Épicerie — вид для ПК (ширина от 900px, включая «версию для ПК» на телефоне).
   Разметку строит app.js (deskShell и *Desk-функции); телефонная вёрстка в styles.css не меняется. */

.av.s36 { width: 36px; height: 36px; font-size: 13px; }
.av.s24 { width: 24px; height: 24px; font-size: 10px; }

/* ---------------------------------------------------------------- каркас: меню слева */
.dshell { display: flex; min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; flex: none; width: 248px;
  display: flex; flex-direction: column; gap: 8px;
  padding: 20px 14px; background: var(--surface);
}
.side-brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 20px; }
.side-brand .mark {
  width: 40px; height: 40px; flex: none; border-radius: 12px;
  background: var(--accent); color: var(--on-accent);
  display: flex; align-items: center; justify-content: center;
}
.side-brand .mark svg { width: 26px; height: 26px; stroke-width: 1.6; }
.side-name b { display: block; font-size: 18px; line-height: 1.2; }
.side-name span { font-size: 12px; color: var(--text-2); }
.side-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 12px;
  border-radius: 12px; color: var(--text-2); font-weight: 500; font-size: 15px; text-align: left;
  transition: background-color .12s ease-out, color .12s ease-out;
}
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.on { background: var(--bg); color: var(--accent-ink); box-shadow: var(--shadow); font-weight: 600; }
.nav-count {
  margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
  background: var(--accent); color: var(--on-accent);
  font-size: 12px; font-weight: 700; font-style: normal; line-height: 20px; text-align: center;
}
.side-foot { display: flex; flex-direction: column; gap: 12px; }
.side .seg { display: flex; background: var(--surface-2); }
.side .seg button { flex: 1; }
.side-me {
  display: flex; align-items: center; gap: 10px; min-width: 0; padding: 8px;
  border-radius: 12px; text-align: left; font-weight: 600; font-size: 14px;
}
.side-me:hover { background: var(--surface-2); }
.side-me span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.dmain { flex: 1; min-width: 0; padding: 0 32px 48px; }
.dhead {
  position: sticky; top: 0; z-index: 10; background: var(--bg);
  display: flex; align-items: center; gap: 8px; padding: 24px 0 16px;
}
.dhead h1 { font-size: 28px; font-weight: 700; }
/* страница по центру: на широком мониторе пустое место поровну слева и справа, а не всё справа */
.dpage { margin: 0 auto; max-width: 1240px; }
.page-planning { max-width: 1640px; }
.page-people, .page-admin { max-width: 1440px; }
.page-mine, .page-profile, .page-person { max-width: 1200px; }
.page-edit, .page-password, .page-del, .page-ann { max-width: 680px; }

.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 32px; align-items: start; }
.cols .col > :first-child { margin-top: 0; }

/* ---------------------------------------------------------------- график: неделя таблицей (подразделения × дни) */
.ptools { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.weeknav { display: flex; align-items: center; gap: 8px; }
.weeknav .label { min-width: 300px; font-size: 20px; font-weight: 700; text-align: center; }

.wgrid { display: grid; grid-template-columns: minmax(140px, 200px) repeat(7, minmax(0, 1fr)); gap: 6px; }
.wh { display: flex; align-items: baseline; gap: 8px; padding: 8px 10px; border-radius: 12px; color: var(--text-2); font-size: 14px; }
.wh b { font-size: 20px; color: var(--text); }
.wh.today { background: var(--accent-soft); }
.wh.today b, .wh.today span { color: var(--accent-ink); }
.wh.past { opacity: .6; }
.wact {
  display: flex; flex-direction: column; justify-content: center; min-height: 96px;
  padding: 10px 12px; border-radius: 12px; background: var(--surface);
}
.wact b { font-size: 15px; line-height: 1.3; }
.wact span { margin-top: 2px; font-size: 12px; color: var(--text-2); }

.wcell {
  --rowbg: var(--surface);
  position: relative; display: flex; flex-direction: column; gap: 4px; min-width: 0; min-height: 96px; padding: 10px;
  border-radius: 12px; background-color: var(--rowbg); text-align: left;
  transition: background-color .12s ease-out, box-shadow .12s ease-out;
}
button.wcell:hover { --rowbg: var(--surface-2); }
.wcell.today { --rowbg: var(--accent-soft); }
.wcell.past { opacity: .55; }
.wcell.closed {
  --rowbg: transparent; align-items: center; justify-content: center; color: var(--text-3); font-size: 12px;
  background-image: repeating-linear-gradient(135deg, transparent 0 8px, var(--surface) 8px 10px);
}
.wcell.mine { box-shadow: inset 0 0 0 2px var(--ok); }
.wcell.sel { box-shadow: inset 0 0 0 2px var(--accent); }
.wcell .who, .mcell .who { display: flex; align-items: center; }
.wcell .avstack .av, .mcell .avstack .av { box-shadow: 0 0 0 2px var(--rowbg, var(--surface)); }
.wcell .count { margin-left: 6px; font-size: 15px; }
.wcell .split { font-size: 12px; line-height: 1.3; color: var(--text-2); }
.wcell .empty-cell {
  flex: 1; display: flex; align-items: center; justify-content: center;
  color: var(--accent); opacity: 0; transition: opacity .12s ease-out;
}
button.wcell:hover .empty-cell, button.wcell:focus-visible .empty-cell { opacity: 1; }
.wcell.closed .empty-cell { opacity: 1; color: var(--text-3); }
.wcell { overflow: hidden; }
.mine-tag {
  display: inline-flex; align-items: center; gap: 3px; align-self: flex-start; margin-top: auto; max-width: 100%;
  height: 22px; padding: 0 7px; border-radius: 11px; white-space: nowrap;
  background: var(--ok-soft); color: var(--ok); font-size: 11px; font-weight: 600;
}
.mine-tag svg { width: 12px; height: 12px; flex: none; }
.legend i.hatch {
  background-image: repeating-linear-gradient(135deg, transparent 0 3px, var(--surface-2) 3px 5px);
  box-shadow: inset 0 0 0 1px var(--surface-2);
}

/* ---------------------------------------------------------------- график: месяц крупно */
.desk .month .grid { gap: 6px; }
.desk .month .wdh { font-size: 13px; }
.desk .mcell {
  --rowbg: var(--surface);
  aspect-ratio: auto; min-height: 112px; align-items: flex-start; justify-content: flex-start;
  gap: 6px; padding: 10px; text-align: left;
}
.desk .mcell.today { --rowbg: var(--accent-soft); }
.desk .mcell .dn { font-size: 16px; }
.desk .mcell .count { margin-left: 6px; font-size: 14px; }
.desk button.mcell:hover { background: var(--surface-2); }
.desk .mcell.sel { box-shadow: inset 0 0 0 2px var(--accent); }

/* ---------------------------------------------------------------- панель дня: справа, а не шторкой снизу */
.desk .sheet {
  left: auto; top: 0; right: 0; bottom: 0; margin: 0;
  width: min(440px, 92vw); max-width: none; max-height: none;
  border-radius: 20px 0 0 20px; padding: 24px 24px 32px;
  transform: translateX(100%);
  box-shadow: -8px 0 32px rgba(40, 28, 16, .12);
}
.desk .sheet.show { transform: none; }
.desk .sheet .grip { display: none; }
.desk .scrim { background: rgba(24, 18, 12, .16); }
:root[data-theme="dark"].desk .scrim { background: rgba(0, 0, 0, .4); }
.desk .toast { bottom: 32px; }

/* ---------------------------------------------------------------- волонтёры таблицей */
.people-tools { justify-content: flex-start; }
.people-tools .search { flex: 1 1 280px; max-width: 420px; }
.people-tools select.input { width: auto; min-width: 190px; }
.ptable { --pcols: minmax(220px, 1.6fr) minmax(130px, 1fr) minmax(150px, 1.2fr) 168px; display: flex; flex-direction: column; }
.ptable.admin { --pcols: minmax(210px, 1.5fr) minmax(110px, 1fr) minmax(130px, 1fr) 168px 140px minmax(170px, 1.2fr); }
.prow {
  display: grid; grid-template-columns: var(--pcols); gap: 16px; align-items: center;
  width: 100%; padding: 10px 12px; border-radius: 12px; text-align: left; font-size: 14px;
}
.prow > span { min-width: 0; }
button.prow:hover { background: var(--surface); }
.phead { padding-top: 4px; padding-bottom: 8px; color: var(--text-3); font-size: 13px; font-weight: 600; }
.pname { display: flex; align-items: center; gap: 12px; }
.pname b { margin-right: 6px; font-size: 15px; font-weight: 600; }
.tag {
  display: inline-block; margin-right: 4px; padding: 1px 8px; border-radius: 10px;
  background: var(--surface-2); color: var(--text-2); font-size: 11px; font-weight: 600; font-style: normal; vertical-align: 1px;
}
.tag.accent { background: var(--accent-soft); color: var(--accent-ink); }
.dots { display: flex; gap: 3px; }
.dots i {
  width: 21px; height: 21px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface); color: var(--text-3); font-size: 10px; font-weight: 700; font-style: normal;
}
.dots i.on { background: var(--ok-soft); color: var(--ok); }
.ellip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------------------------------------------------------- вход на ПК: панель с графиком слева, форма справа */
.auth-desk { display: grid; grid-template-columns: minmax(440px, 44%) minmax(0, 1fr); min-height: 100vh; }
.auth-art {
  display: flex; flex-direction: column; gap: 32px; padding: 40px 56px;
  background: var(--accent); color: var(--on-accent);
}
.art-top { display: flex; align-items: center; gap: 14px; }
.art-top .mark {
  width: 48px; height: 48px; flex: none; border-radius: 14px;
  background: rgba(255, 255, 255, .16); display: flex; align-items: center; justify-content: center;
}
.art-top .mark svg { width: 30px; height: 30px; stroke-width: 1.6; }
.art-top b { display: block; font-size: 20px; line-height: 1.2; }
.art-top span { font-size: 13px; opacity: .8; }
.art-main { flex: 1; display: flex; flex-direction: column; justify-content: center; max-width: 500px; }
.art-main h1 { font-size: clamp(34px, 3vw, 50px); font-weight: 700; line-height: 1.1; letter-spacing: -.02em; }
.art-main p { max-width: 36ch; margin: 16px 0 0; font-size: 18px; line-height: 1.5; opacity: .9; }
.art-card {
  width: 100%; max-width: 420px; margin-top: 36px; padding: 14px;
  border-radius: 20px; background: var(--bg); color: var(--text);
  box-shadow: 0 24px 48px rgba(60, 24, 4, .28);
}
.ac-head { display: flex; justify-content: space-between; align-items: baseline; padding: 2px 6px 6px; }
.ac-head b { font-size: 15px; }
.ac-head span { font-size: 13px; color: var(--text-2); }
.ac-row {
  --rowbg: var(--surface);
  display: flex; align-items: center; gap: 12px; min-height: 52px; margin-top: 6px; padding: 6px 10px;
  border-radius: 12px; background: var(--rowbg);
}
.ac-row.today { --rowbg: var(--accent-soft); }
.ac-date { width: 40px; flex: none; text-align: center; line-height: 1.15; }
.ac-date i { display: block; font-size: 11px; font-style: normal; color: var(--text-2); }
.ac-date b { font-size: 18px; }
.ac-row.today .ac-date i, .ac-row.today .ac-date b { color: var(--accent-ink); }
.ac-row .count { margin-left: 6px; font-size: 15px; }
.ac-empty { font-size: 13px; color: var(--text-3); }
.ac-row .mine-tag { margin: 0 0 0 auto; align-self: center; }
.ac-plus {
  width: 30px; height: 30px; margin-left: auto; flex: none; border-radius: 50%;
  background: var(--bg); color: var(--accent); display: flex; align-items: center; justify-content: center;
}
.art-foot { font-size: 12px; opacity: .75; }

.auth-pane { position: relative; display: flex; justify-content: center; padding: 88px 48px 48px; overflow-y: auto; }
.auth-lang { position: absolute; top: 24px; right: 32px; }
.auth-box { width: 100%; max-width: 440px; margin: auto 0; }
.auth-title { font-size: 34px; font-weight: 700; letter-spacing: -.01em; }
.auth-sub { margin: 8px 0 28px; font-size: 16px; color: var(--text-2); }
.auth-box .input { height: 52px; }
.auth-box .btn:not(.sm) { height: 52px; }
.auth-box .seg.full button { height: 40px; font-size: 15px; }
.auth-box h2 { font-size: 28px; }

/* ---------------------------------------------------------------- узкий ПК и телефон в «версии для ПК»: меню значками */
@media (max-width: 1279px) {
  .side { width: 76px; padding: 20px 12px; align-items: center; }
  .side-name, .nav-item span, .side-me span, .side-lang { display: none; }
  .side-brand { padding: 4px 0 20px; }
  .nav-item { width: 48px; justify-content: center; padding: 0; }
  .nav-count { position: absolute; top: 3px; right: 1px; min-width: 18px; height: 18px; padding: 0 5px; font-size: 11px; line-height: 18px; }
  .side-me { padding: 4px; }
  .dmain { padding: 0 24px 40px; }
  .weeknav .label { min-width: 0; font-size: 18px; }
  .wgrid { grid-template-columns: minmax(110px, 150px) repeat(7, minmax(0, 1fr)); }
  .wcell .avstack .av:nth-child(n+3) { display: none; }
  .wcell .count { margin-left: 4px; font-size: 14px; }
  .mine-tag svg { display: none; }
  .auth-desk { grid-template-columns: minmax(400px, 46%) minmax(0, 1fr); }
  .auth-art { padding: 32px 36px; }
  .auth-pane { padding: 80px 32px 40px; }
}
