/* Кабинет сотрудников: светлый, спокойный, удобный на телефоне у фотографа и на ноутбуке у администратора. */
:root {
  --bg: #f5f2ec;
  --surface: #fff;
  --line: #e4dfd5;
  --line-strong: #cfc8ba;
  --ink: #1b1a17;
  --muted: #6f6a60;
  --accent: #c98a1b;
  --accent-soft: #fbf0d9;
  --ok: #1f7a4d;
  --ok-soft: #e2f3e9;
  --warn: #9a5b00;
  --warn-soft: #fdeed2;
  --info: #2b5ea7;
  --info-soft: #e5eefb;
  --bad: #b3321f;
  --radius: 16px;
  --serif: "New York", ui-serif, "Iowan Old Style", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
h1, h2, p, figure, ul, dl, dd { margin: 0; }
ul { padding: 0; list-style: none; }
h1 { font: 500 clamp(28px, 4vw, 36px)/1.1 var(--serif); letter-spacing: -.01em; }
h2 { font-size: 16px; font-weight: 650; margin-bottom: 14px; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; }
svg { width: 1.2em; height: 1.2em; flex: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.err { color: var(--bad); font-size: 14px; }
code { font: 13px ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); }

/* Элементы управления */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); font-weight: 600; white-space: nowrap; transition: background .15s, border-color .15s, transform .1s; }
.btn:hover { border-color: var(--ink); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.primary:hover { background: #000; }
.btn.small { min-height: 34px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
.btn.big { min-height: 50px; width: 100%; font-size: 16px; }
.btn.wide { width: 100%; margin-top: 14px; }
.btn:disabled { opacity: .55; cursor: default; }
.link { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: var(--muted); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.link:hover { color: var(--ink); }
.link.danger { color: var(--bad); margin-top: 6px; }
input:not([type=checkbox]), select { width: 100%; min-height: 42px; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); font-size: 16px; }
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
label { display: grid; gap: 5px; font-size: 13px; color: var(--muted); }
label small { font-size: 12px; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 99px; background: #eeeae2; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.info { background: var(--info-soft); color: var(--info); }
.pill.off { background: #eee; color: var(--muted); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.pad { padding: 20px; }
.blank { grid-column: 1 / -1; padding: 56px 20px; text-align: center; color: var(--muted); }
.blank h2 { font: 500 24px var(--serif); color: var(--ink); margin-bottom: 6px; }
.blank .btn { margin-top: 16px; }

/* Вход */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(100%, 380px); display: grid; gap: 16px; padding: 32px; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 24px 60px -30px rgba(40, 30, 10, .35); }
.logo { font: 600 24px/1.1 var(--serif); }
.logo small { display: block; margin-top: 4px; font: 500 12px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

/* Каркас */
.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100dvh; }
.nav { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; gap: 4px; padding: 26px 14px 18px; border-right: 1px solid var(--line); }
.nav .logo { padding: 0 12px 22px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; font-weight: 550; color: var(--muted); }
.nav a svg { font-size: 18px; }
.nav a:hover { color: var(--ink); background: #ece8df; }
.nav a.on { color: var(--ink); background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.who { margin-top: auto; padding: 12px; display: grid; gap: 4px; font-size: 14px; }
.who > span { font-weight: 600; }
#view { padding: clamp(18px, 3.5vw, 40px); max-width: 1240px; width: 100%; outline: none; }
.head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 20px; margin-bottom: 24px; }
.head-tools { display: flex; gap: 10px; flex: 1; justify-content: flex-end; min-width: min(100%, 300px); }
.head-tools input { max-width: 320px; }
.back { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 8px; font-size: 14px; color: var(--muted); }
.back:hover { color: var(--ink); }
.tabs { display: inline-flex; padding: 3px; border-radius: 12px; background: #e9e5db; }
.tabs button { min-height: 36px; padding: 0 14px; border: 0; border-radius: 10px; background: none; font-weight: 600; color: var(--muted); }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }

@media (max-width: 820px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .nav { position: fixed; z-index: 10; inset: auto 0 0 0; height: auto; flex-direction: row; justify-content: space-around; gap: 0; padding: 6px 6px max(6px, env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(12px); border-right: 0; border-top: 1px solid var(--line); }
  .nav .logo, .who > span { display: none; }
  .nav a, .who .link { flex: 1; flex-direction: column; gap: 2px; padding: 6px 4px; font-size: 11px; font-weight: 600; text-decoration: none; }
  .nav a.on { box-shadow: none; background: none; color: var(--accent); }
  .who { margin: 0; padding: 0; flex: 1; display: flex; }
  .who .link svg, .nav a svg { font-size: 20px; }
  #view { padding-bottom: 96px; }
  .head-tools { flex-wrap: wrap; }
  .head-tools input { max-width: none; }
  .head-tools .btn { flex: 1; }
}

/* Съёмки */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.shoot { display: flex; gap: 14px; padding: 12px; transition: border-color .15s, box-shadow .15s; }
.shoot:hover { border-color: var(--line-strong); box-shadow: 0 10px 30px -18px rgba(40, 30, 10, .4); }
.cover { width: 84px; height: 84px; flex: none; display: grid; place-items: center; border-radius: 10px; background: #ece8df; color: var(--line-strong); overflow: hidden; font-size: 26px; }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.shoot-body { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.shoot-body strong { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shoot-body .muted { font-size: 13px; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 6px; }

.cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.cols aside { display: grid; gap: 16px; }
@media (max-width: 1040px) { .cols { grid-template-columns: minmax(0, 1fr); } .cols aside { order: -1; } }
.drop { display: grid; justify-items: center; gap: 4px; padding: 30px 20px; border: 1.5px dashed var(--line-strong); border-radius: var(--radius); background: #faf8f3; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.drop svg { font-size: 26px; color: var(--accent); margin-bottom: 4px; }
.drop strong { font-size: 16px; color: var(--ink); }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
#progress { margin-top: 14px; }
.prog { height: 6px; border-radius: 6px; background: #e9e5db; overflow: hidden; margin-bottom: 6px; }
.prog div { height: 100%; background: var(--accent); transition: width .2s; }
.alert { padding: 12px 16px; border-radius: 12px; background: #fbe9e5; color: var(--bad); font-size: 14px; }
.alert ul { margin-top: 4px; padding-left: 18px; list-style: disc; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 8px; margin: 16px 0; }
.ph { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: #ece8df; }
.ph img { width: 100%; height: 100%; object-fit: cover; }
.ph button { position: absolute; top: 6px; right: 6px; display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .92); color: var(--bad); box-shadow: 0 1px 4px rgba(0, 0, 0, .25); }
@media (hover: hover) { .ph button { opacity: 0; transition: opacity .15s; } .ph:hover button, .ph button:focus-visible { opacity: 1; } }
.ph .pill { position: absolute; left: 6px; bottom: 6px; }

.qr { width: 196px; margin: 0 auto 10px; padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.qr img { width: 100%; height: auto; }
.linkbox { display: flex; gap: 8px; margin: 14px 0 10px; }
.linkbox input { font-size: 13px; color: var(--muted); }
.share { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.share .btn:last-child { grid-column: 1 / -1; }
.btn.wa { background: #1fa855; border-color: #1fa855; color: #fff; }
.btn.tg { background: #2a8fd6; border-color: #2a8fd6; color: #fff; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 14px; }
.facts dt { color: var(--muted); }
.facts dd { text-align: right; }
.facts .bad { color: var(--bad); }

/* Заказы */
.order { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.orders .order { margin-top: 12px; }
.order-top { display: flex; justify-content: space-between; gap: 12px; font-size: 16px; font-variant-numeric: tabular-nums; }
.order .muted { font-size: 13px; }
.order-guest { display: flex; flex-direction: column; line-height: 1.35; }
.order-guest strong { font-size: 16px; }
.order-guest:hover strong { text-decoration: underline; }
.items { display: grid; gap: 8px; margin: 10px 0; }
.items li { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.items img, .stack { width: 40px; height: 40px; flex: none; border-radius: 6px; object-fit: cover; }
.stack { background: linear-gradient(135deg, #f0c36a, #c9743a); box-shadow: 3px -3px 0 -1px #fff, 4px -4px 0 0 var(--line-strong); }
.order-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* Аналитика */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin-bottom: 14px; }
.kpi { padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); display: grid; gap: 2px; }
.kpi span { color: var(--muted); font-size: 13px; }
.kpi strong { font: 500 34px/1.15 var(--serif); font-variant-numeric: tabular-nums; }
.kpi small { color: var(--muted); font-size: 13px; }
.chart { position: relative; padding-top: 22px; }
.chart-max { position: absolute; top: 0; left: 0; font-size: 12px; color: var(--muted); }
.bars { display: flex; align-items: flex-end; gap: clamp(1px, .4vw, 5px); height: 190px; border-top: 1px dashed var(--line-strong); border-bottom: 1px solid var(--line-strong); }
.bar-col { flex: 1; height: 100%; display: flex; align-items: flex-end; }
.bar-col i { display: block; width: 100%; min-height: 2px; border-radius: 4px 4px 0 0; background: var(--accent); }
.bar-col:hover i { background: var(--ink); }
.chart-x { display: flex; justify-content: space-between; margin-top: 6px; font-size: 12px; color: var(--muted); }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 14px; margin-top: 14px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12.5px; padding-bottom: 6px; }
td { padding: 8px 0; border-top: 1px solid var(--line); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; padding-left: 12px; }

/* Настройки */
.settings { display: grid; gap: 16px; max-width: 980px; }
.settings .card > .btn { margin-top: 14px; }
.settings .card > p.muted { margin-top: 14px; font-size: 13px; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px 18px; align-items: start; }
.fields.top { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.fields.top > div { display: grid; gap: 8px; align-content: start; }
.rows { display: grid; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; padding-top: 0; }
.row > input, .row > select { flex: 1 1 150px; width: auto; }
.row > .grow { flex: 2 1 200px; }
.row.dim > :not(.switch) { opacity: .5; }
.money { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.money input { width: 96px; text-align: right; font-variant-numeric: tabular-nums; }
label.inline { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.switch { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink); cursor: pointer; white-space: nowrap; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch span { position: relative; width: 38px; height: 22px; flex: none; border-radius: 99px; background: var(--line-strong); transition: background .15s; }
.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: translate .15s; }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::after { translate: 16px 0; }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Диалоги и уведомления */
.modal { width: min(calc(100% - 24px), 440px); padding: 0; border: 0; border-radius: 20px; background: var(--surface); color: var(--ink); box-shadow: 0 30px 80px -20px rgba(30, 20, 5, .5); }
.modal::backdrop { background: rgba(27, 26, 23, .45); backdrop-filter: blur(2px); }
.modal form { display: grid; gap: 14px; padding: 24px; }
.modal h2 { font: 500 24px/1.2 var(--serif); margin: 0; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
#toast { position: fixed; z-index: 100; left: 50%; bottom: 28px; translate: -50% 20px; max-width: calc(100% - 32px); padding: 11px 18px; border-radius: 12px; background: var(--ink); color: #fff; font-weight: 550; opacity: 0; pointer-events: none; transition: opacity .2s, translate .2s; }
#toast.show { opacity: 1; translate: -50% 0; }
#toast.err { background: var(--bad); }
@media (max-width: 820px) { #toast { bottom: 84px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
