/* Светлая рабочая раскладка в духе привычных учётных программ: ссылки слева, таблицы и крупные шрифты. */
:root {
  color-scheme: light;
  --bg: #f0f0f0; --surface: #ffffff; --text: #111111; --muted: #5f6368; --line: #c9c9c9; --link: #0b3fa8; --current: #e0120f;
  --select: #0a78d7; --select-text: #ffffff; --in-stock: #eefbe8; --no-stock: #d4150f; --check: #edf4fd; --win: #e6e6e6; --win-line: #a9a9a9;
  --accent: #0a78d7; --accent-text: #ffffff; --warn: #c2410c; --warn-soft: #fdeee6; --danger: #c81e1e; --info: #0b3fa8;
}
html { --soft-line: #e4e4e4; --win-hover: #dcdcdc; --row-hover: #eaf3fc; }
html[data-theme="night"] {
  color-scheme: dark;
  --bg: #15191e; --surface: #1f252c; --text: #e9edf1; --muted: #9ba6b1; --line: #3a434d; --link: #86b7ff; --current: #ff7a70;
  --select: #2f7fd1; --in-stock: #1f2f26; --no-stock: #ff7a70; --check: #1a2430; --win: #2b333c; --win-line: #4a5560; --win-hover: #36404a;
  --accent: #2f7fd1; --warn: #f5a273; --warn-soft: #3c2a20; --danger: #ff7a70; --info: #86b7ff; --soft-line: #2e363f; --row-hover: #27313b;
}
html[data-theme="warm"] {
  --bg: #f6efe4; --surface: #fffaf2; --line: #dfd2bf; --link: #8a4b10; --current: #c8321a; --select: #c46a1f; --in-stock: #fbf2dc;
  --check: #fdf4e3; --win: #eadfcd; --win-line: #bda98d; --win-hover: #e0d2bb; --accent: #c46a1f; --info: #8a4b10; --soft-line: #eee3d2; --row-hover: #f8ecd8;
}
html[data-theme="mint"] {
  --bg: #e9f4f0; --surface: #fbfefd; --line: #c4dcd3; --link: #0d6a56; --current: #d0342c; --select: #14866d; --in-stock: #e4f6ee;
  --check: #eaf7f3; --win: #d8eae3; --win-line: #9fc4b7; --win-hover: #c9e0d7; --accent: #14866d; --info: #0d6a56; --soft-line: #dcece6; --row-hover: #dff3ec;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.4 "Segoe UI", -apple-system, Roboto, Arial, sans-serif; }
h1 { font-size: 22px; margin: 0 0 14px; }
h2 { font-size: 15px; margin: 18px 0 8px; }
.card h2:first-child, .modal h2 { margin-top: 0; }
small { color: var(--muted); }
.muted { color: var(--muted); }
.empty { padding: 28px; text-align: center; }
.warn { color: var(--warn); }
.nowrap { white-space: nowrap; }

button, .button, input, select { font: inherit; color: inherit; }
button, .button { border: 1px solid transparent; border-radius: 3px; padding: 7px 12px; cursor: pointer; background: none; display: inline-block; }
button:disabled { opacity: .55; cursor: default; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--select); outline-offset: 1px; }
.primary { background: var(--accent); color: var(--accent-text); font-weight: 600; }
.danger { background: var(--danger); color: #fff; font-weight: 600; }
.ghost, .win { background: var(--win); border-color: var(--win-line); }
.ghost:hover, .win:hover { background: var(--win-hover); }
.win.add { font-weight: 600; }
.link { color: var(--link); padding: 1px 5px; }
.link:hover { text-decoration: underline; }
input, select { border: 1px solid var(--win-line); border-radius: 2px; padding: 6px 8px; background: var(--surface); min-width: 0; }
input.short { width: 76px; text-align: right; }
label { display: block; margin-bottom: 10px; font-size: 13px; color: var(--muted); }
label input { display: block; width: 100%; margin-top: 3px; font-size: 14px; color: var(--text); }
label.inline { display: inline-flex; align-items: center; gap: 5px; margin: 0; color: var(--text); }
label.inline input { display: inline-block; width: auto; margin: 0; }
label.check { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; color: var(--text); font-size: 14px; }
.toolbar label.check { margin: 0; }
label.check input { width: auto; margin: 0; }
label.button { margin: 0; color: var(--text); font-size: 14px; }

.row { display: flex; align-items: center; gap: 8px; }
.wrap { flex-wrap: wrap; }
.end { justify-content: flex-end; margin-top: 8px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; padding: 6px 8px; background: var(--win); border: 1px solid var(--line); }
.toolbar > input:not([type]) { flex: 1 1 200px; }

/* Каркас: ссылки и сводка слева, рабочая область справа */
.shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); height: 100vh; }
.side { background: var(--surface); border-right: 1px solid var(--line); overflow-y: auto; display: flex; flex-direction: column; padding: 8px 10px; }
.side-top { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; padding-bottom: 6px; border-bottom: 1px solid var(--line); font-size: 13px; }
.side-top strong { min-width: 0; overflow-wrap: anywhere; }
.side-top span { white-space: nowrap; }
.side nav h3 { margin: 9px 0 1px; font-size: 16px; font-weight: 700; }
.side nav button { display: block; width: 100%; text-align: left; padding: 1px 0 1px 16px; color: var(--link); font-size: 16px; border-radius: 0; }
.side nav button:hover { text-decoration: underline; }
.side nav button.active { color: var(--current); font-weight: 700; }
.side nav button.has-alerts { color: var(--current); font-weight: 700; background: var(--warn-soft); }
.report-tabs .count { background: var(--danger); color: #fff; border-radius: 9px; padding: 0 7px; font-size: 12px; font-weight: 700; }
.alert-list { display: grid; gap: 4px; max-width: 900px; }
.alert-list article { background: var(--surface); border: 1px solid var(--line); padding: 7px 10px; }
.alert-list article.unread { background: var(--warn-soft); border-color: var(--warn); }
.alert-list header { display: flex; gap: 10px; align-items: baseline; font-size: 13px; }
.alert-list header span { color: var(--muted); }
.alert-list header time { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }
.alert-list p { margin: 3px 0 0; overflow-wrap: anywhere; }
.sale-edit { margin-bottom: 10px; }
.sale-edit label select { display: block; width: 100%; margin-top: 3px; color: var(--text); }
.sale-edit-total { text-align: right; font-size: 16px; }
.panel { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 13px; }
.panel-who { font-weight: 700; }
.panel-shift { color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.panel-items { margin-bottom: 8px; }
.panel-items > div { overflow-wrap: anywhere; }
.panel-sum { display: flex; justify-content: space-between; gap: 8px; font-weight: 600; }
.panel-sum b { font-variant-numeric: tabular-nums; white-space: nowrap; }

main { padding: 10px; overflow-y: auto; min-width: 0; }
main.fill { padding: 6px; overflow: hidden; }

.center { min-height: 70vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); padding: 14px; }
.login { width: 100%; max-width: 360px; }
.login button { width: 100%; }
.narrow { max-width: 420px; }

table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); font-size: 14px; }
th { text-align: left; font-size: 13px; font-weight: 400; background: var(--win); }
th, td { padding: 4px 8px; border-bottom: 1px solid var(--soft-line); vertical-align: top; }
tbody tr:hover td { background: var(--row-hover); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.num.warn { font-weight: 600; }
.actions { white-space: nowrap; text-align: right; }
tr.returned td { color: var(--muted); }
tr.returned td:not(:last-child) { text-decoration: line-through; }

/* Продажа: чек в центре, товары справа */
.sale { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 8px; height: 100%; }
section.check, .catalog { display: flex; flex-direction: column; min-height: 0; gap: 6px; }
.notice { background: var(--warn-soft); border: 1px solid var(--warn); padding: 5px 8px; }
.check-list, .catalog-list { flex: 1; min-height: 120px; overflow-y: auto; border: 1px solid var(--win-line); background: var(--surface); }
.check-list { background: var(--check); }
.big-table { border: 0; background: none; font-size: 21px; font-weight: 600; line-height: 1.25; }
.big-table th { font-size: 21px; font-weight: 700; background: var(--surface); position: sticky; top: 0; z-index: 1; border-bottom: 1px solid var(--line); }
.big-table td { border-bottom: 0; padding: 3px 8px; cursor: default; }
.big-table tbody tr:hover td { background: none; }
#results tr.in-stock td { background: var(--in-stock); }
#results tr.no-stock td { background: var(--surface); color: var(--no-stock); }
#results tr { user-select: none; }
.big-table tr.selected td, .big-table tbody tr.selected:hover td, #results tr.selected td { background: var(--select); color: var(--select-text); }
.check-buttons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
#c-edit { grid-column: span 3; }
.check-buttons .win { padding: 5px 4px; font-size: 13px; }
.total { display: flex; justify-content: flex-end; align-items: flex-start; background: var(--win); border: 1px solid var(--win-line); padding: 2px 8px; }
.total strong { color: var(--danger); font-size: 58px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.sell { background: var(--win); border: 2px solid var(--muted); font-size: 20px; font-weight: 700; padding: 9px; }
.sell:hover { background: var(--win-hover); }
.catalog-info { min-height: 62px; color: var(--info); font-size: 21px; font-weight: 600; line-height: 1.3; }
.search { display: flex; align-items: center; gap: 12px; margin: 0; font-size: 21px; font-weight: 600; color: var(--text); }
.search input { flex: 1; margin: 0; padding: 7px 10px; font-size: 18px; }

/* Сумма в кассе */
.till { max-width: 460px; display: grid; gap: 10px; }
.till-sum { background: var(--surface); border: 1px solid var(--line); padding: 12px 14px; }
.till-sum span { display: block; color: var(--muted); }
.till-sum strong { color: var(--danger); font-size: 38px; font-variant-numeric: tabular-nums; }

.results { display: grid; gap: 3px; }
.result { display: flex; justify-content: space-between; gap: 12px; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); padding: 6px 10px; }
.result:hover { border-color: var(--select); }
.results.small { margin: -4px 0 10px; }
table.cart { border: 0; margin-bottom: 10px; background: none; }
table.cart td, table.cart th { padding: 4px; }

.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(185px, 1fr)); gap: 8px; margin-bottom: 12px; }
.stat { background: var(--surface); border: 1px solid var(--line); padding: 8px 12px; }
.stat span { display: block; font-size: 12px; color: var(--muted); }
.stat strong { font-size: 19px; font-variant-numeric: tabular-nums; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 12px; align-items: start; }
.live { font-size: 12px; font-weight: 400; color: var(--select); margin-left: 6px; }
.feed { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); font-size: 14px; }
.feed li { padding: 6px 8px; border-bottom: 1px solid var(--soft-line); }
.feed li.alert { background: var(--warn-soft); }
.feed time { color: var(--muted); font-variant-numeric: tabular-nums; }

.modal-back { position: fixed; inset: 0; background: rgba(0, 0, 0, .4); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; overflow-y: auto; z-index: 20; }
.modal { background: var(--surface); border: 1px solid var(--win-line); padding: 18px; width: 100%; max-width: 430px; }
.modal.wide { max-width: 800px; }
.qty-modal h2 { color: var(--info); font-size: 24px; margin-bottom: 18px; }
.qty-modal label { display: grid; grid-template-columns: 1fr 170px; align-items: center; color: var(--text); font-size: 14px; }
.qty-modal label input { margin: 0; text-align: right; }
.qty-modal label:first-of-type { color: var(--info); font-size: 22px; font-weight: 700; }
.qty-modal label:first-of-type input { font-size: 22px; font-weight: 700; border: 2px solid var(--select); }
.qty-modal input[readonly] { background: var(--bg); color: var(--muted); }
.qty-modal .row .primary, .pay-modal .row .primary { min-width: 90px; }
.pay-modal { max-width: 560px; }
.pay-modal h2 { margin-bottom: 14px; }
.pay-modal label { display: grid; grid-template-columns: 170px 1fr 74px; gap: 8px; align-items: center; margin-bottom: 8px; color: var(--info); font-size: 24px; font-weight: 700; }
.pay-modal label input { margin: 0; font-size: 26px; font-weight: 600; padding: 7px 10px; color: var(--text); grid-column: 2; }
.pay-modal input[readonly] { background: var(--bg); }
.pay-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; }
.pay-buttons .win { padding: 7px 0; font-size: 15px; }
.report-tabs { display: flex; flex-wrap: wrap; gap: 3px; margin-bottom: 8px; border-bottom: 1px solid var(--win-line); }
.report-tabs button { background: var(--win); border: 1px solid var(--win-line); border-bottom: 0; border-radius: 3px 3px 0 0; padding: 7px 13px; }
.report-tabs button.active { background: var(--surface); font-weight: 700; color: var(--current); }
html[data-sale-size="large"] .big-table, html[data-sale-size="large"] .big-table th, html[data-sale-size="large"] .catalog-info { font-size: 26px; }
html[data-sale-size="huge"] .big-table, html[data-sale-size="huge"] .big-table th, html[data-sale-size="huge"] .catalog-info { font-size: 32px; }
.stat small { display: block; }
.card label select { display: block; width: 100%; margin-top: 3px; color: var(--text); }
.card p { margin: 0 0 10px; }
.help { max-width: 820px; display: grid; gap: 6px; }
.help p { margin: 0 0 4px; }
.help input { width: 100%; font-size: 15px; margin-bottom: 4px; }
.help details { background: var(--surface); border: 1px solid var(--line); padding: 8px 12px; }
.help summary { cursor: pointer; font-weight: 700; font-size: 15px; }
.help ul { margin: 8px 0 4px; padding-left: 20px; }
.help li { margin-bottom: 5px; }
tr.stock-out td { color: var(--no-stock); font-weight: 600; }
.modal-error { color: var(--danger); font-size: 14px; min-height: 20px; margin-bottom: 4px; }
#toast { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); background: #222; color: #fff; padding: 9px 15px; border-radius: 3px; opacity: 0; pointer-events: none; transition: opacity .15s; z-index: 30; max-width: calc(100vw - 32px); }
#toast.show { opacity: 1; }
#toast.error { background: var(--danger); }

@media (max-width: 1100px) {
  .big-table, .big-table th, .catalog-info, .search { font-size: 17px; }
  .total strong { font-size: 42px; }
  .sell { font-size: 16px; }
}
@media (max-width: 800px) {
  .shell { display: block; height: auto; }
  .side { border-right: 0; border-bottom: 1px solid var(--line); }
  .side nav { display: grid; grid-template-columns: 1fr 1fr; gap: 0 8px; }
  .side nav h3 { grid-column: 1 / -1; }
  .side nav button { padding: 4px 0; }
  main.fill { overflow: visible; }
  .sale { grid-template-columns: minmax(0, 1fr); height: auto; }
  .catalog { order: -1; }
  .catalog-list { max-height: 42vh; }
  .grid2 { grid-template-columns: minmax(0, 1fr); }
  main table:not(.big-table) { display: block; overflow-x: auto; }
}

/* Дашборды отчётов */
html { --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --st-good: #0ca30c; --st-warn: #fab219; --st-bad: #d03b3b; --up: #0a7f0a; --down: #c81e1e; }
html[data-theme="night"] { --s1: #3987e5; --s2: #d95926; --s3: #199e70; --up: #5ad65a; --down: #ff7a70; }
.stat-note { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }
.stat-note b { font-weight: 700; }
.stat-note b.up { color: var(--up); }
.stat-note b.down { color: var(--down); }
.stat strong { overflow-wrap: anywhere; }
.dash { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 12px; margin-bottom: 14px; align-items: start; }
.dash-alert { margin-bottom: 12px; }
.dash-card { min-width: 0; }
.dash-card.wide { grid-column: 1 / -1; }
.dash-card header { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.dash-card header h2 { margin: 0; font-size: 15px; }
.card .dash-note { margin: -4px 0 8px; font-size: 12px; }
.dash-card table { margin-top: 12px; }
.viz { width: 100%; min-width: 0; overflow: hidden; }
.viz svg { display: block; }
.viz-grid { stroke: var(--soft-line); stroke-width: 1; }
.viz-axis { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.viz-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.viz-line.s1 { stroke: var(--s1); }
.viz-line.s2 { stroke: var(--s2); }
.viz-area { stroke: none; opacity: .1; }
.viz-area.s1, .viz-bar.s1, .viz-dot.s1 { fill: var(--s1); }
.viz-bar.s2, .viz-dot.s2 { fill: var(--s2); }
.viz-dot { stroke: var(--surface); stroke-width: 2; }
.viz-cross { stroke: var(--muted); stroke-width: 1; }
.viz-hit { fill: transparent; }
g[data-tip] { outline: none; }
g[data-tip]:not([data-cx]):hover .viz-hit, g[data-tip]:not([data-cx]):focus .viz-hit { fill: var(--row-hover); }
g[data-tip]:hover .viz-bar { opacity: .85; }
.viz-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0 0 8px; font-size: 13px; color: var(--muted); }
.viz-legend b { color: var(--text); font-variant-numeric: tabular-nums; }
.viz-legend i { display: inline-flex; align-items: center; justify-content: center; width: 12px; height: 12px; margin-right: 5px; border-radius: 3px; font-style: normal; font-size: 10px; font-weight: 700; line-height: 1; vertical-align: -1px; color: #fff; }
.viz-legend i.st-warn { color: #111; }
.s1 { background: var(--s1); }
.s2 { background: var(--s2); }
.s3 { background: var(--s3); }
.st-good { background: var(--st-good); }
.st-warn { background: var(--st-warn); }
.st-bad { background: var(--st-bad); }
.share { display: flex; gap: 2px; height: 22px; margin: 4px 0 10px; }
.share i { display: block; min-width: 3px; }
.share i:first-child { border-radius: 4px 0 0 4px; }
.share i:last-child { border-radius: 0 4px 4px 0; }
.share i:only-child { border-radius: 4px; }
.hbars { display: grid; gap: 7px; }
.hbar { display: grid; grid-template-columns: minmax(0, 34%) minmax(30px, 1fr) auto; gap: 8px; align-items: center; font-size: 13px; }
.hbar-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-track { display: block; }
.hbar-fill { display: block; height: 14px; border-radius: 0 4px 4px 0; }
.hbar-val { font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
#viz-tip { position: fixed; z-index: 50; pointer-events: none; padding: 6px 10px; font-size: 13px; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 4px; box-shadow: 0 2px 8px rgba(0, 0, 0, .18); white-space: nowrap; }
#viz-tip[hidden] { display: none; }
.viz-tip-title { color: var(--muted); font-size: 12px; margin-bottom: 2px; }
#viz-tip i { display: inline-block; width: 10px; height: 2px; margin-right: 6px; vertical-align: 4px; }
#viz-tip b { font-variant-numeric: tabular-nums; }
@media (max-width: 700px) { .dash { grid-template-columns: minmax(0, 1fr); } }

/* Отчёты о работе */
.work-feed { display: grid; gap: 8px; margin-bottom: 14px; max-width: 860px; }
.work-card { display: flex; gap: 12px; background: var(--surface); border: 1px solid var(--line); padding: 12px; }
.work-card.removed { opacity: .55; }
.work-card.removed strong { text-decoration: line-through; }
.work-avatar { flex: none; width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--select); color: var(--select-text); font-weight: 700; }
.work-body { flex: 1; min-width: 0; }
.work-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px; align-items: baseline; }
.work-head strong { font-size: 15px; overflow-wrap: anywhere; }
.work-meta { font-size: 12px; color: var(--muted); margin-top: 1px; }
.work-note, .work-review { margin: 7px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.work-review { padding: 5px 8px; background: var(--row-hover); font-size: 13px; }
.work-status { font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 9px; white-space: nowrap; background: var(--win); color: var(--text); }
.work-status.ok { background: #0ca30c; color: #fff; }
.work-status.rework { background: #fab219; color: #111; }
.work-status.removed { background: var(--line); }
.work-photos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.work-photos button { padding: 0; border: 1px solid var(--line); background: none; cursor: zoom-in; line-height: 0; }
.work-photos img { width: 104px; height: 78px; object-fit: cover; display: block; }
.work-bonus { margin-top: 7px; font-weight: 700; font-variant-numeric: tabular-nums; }
.work-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.work-actions:empty { display: none; }
.work-ok { font-weight: 700; }
.danger-link { color: var(--danger); }
.work-progress { margin-bottom: 12px; max-width: 860px; }
.work-progress-text { margin-bottom: 2px; }
.work-progress .share { background: var(--soft-line); border-radius: 4px; height: 14px; }
.work-progress .share i { border-radius: 4px; min-width: 0; }
.task-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-bottom: 16px; }
.task-card { display: flex; flex-direction: column; gap: 6px; background: var(--surface); border: 1px solid var(--line); padding: 12px; }
.task-card.done { border-color: #0ca30c; }
.task-card.other { border-style: dashed; }
.task-card button { margin-top: auto; }
.task-title { display: flex; gap: 8px; align-items: flex-start; }
.task-title strong { overflow-wrap: anywhere; }
.task-mark { flex: none; width: 20px; height: 20px; border: 1px solid var(--win-line); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.task-card.done .task-mark { background: #0ca30c; border-color: #0ca30c; color: #fff; }
.task-info { display: flex; flex-wrap: wrap; gap: 4px; }
.task-info:empty { display: none; }
.task-chip { font-size: 12px; padding: 0 7px; border-radius: 9px; background: var(--row-hover); }
.task-done { font-size: 13px; }
.modal textarea { display: block; width: 100%; margin-top: 3px; font: inherit; color: inherit; background: var(--surface); border: 1px solid var(--win-line); padding: 6px; resize: vertical; }
.work-photo-add { display: inline-block; padding: 6px 12px; cursor: pointer; }
.work-photo-field { margin: 6px 0; }
.work-photo-preview { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.work-photo-preview:empty { display: none; }
.work-photo-preview button { position: relative; padding: 0; border: 1px solid var(--line); background: none; line-height: 0; cursor: pointer; }
.work-photo-preview img { width: 76px; height: 76px; object-fit: cover; }
.work-photo-preview span { position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; line-height: 18px; background: rgba(0, 0, 0, .65); color: #fff; border-radius: 50%; font-size: 13px; }
.photo-view { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .85); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 16px; cursor: zoom-out; }
.photo-view img { max-width: 100%; max-height: calc(100vh - 90px); object-fit: contain; }

.panel-note { margin-bottom: 8px; padding: 6px 8px; background: var(--warn-soft); border: 1px solid var(--warn); font-size: 13px; }
.panel-note div { margin-top: 2px; white-space: pre-wrap; overflow-wrap: anywhere; }
.note-modal .muted { color: var(--text); font-size: 16px; white-space: pre-wrap; overflow-wrap: anywhere; }
#note-form textarea { display: block; width: 100%; margin-bottom: 8px; font: inherit; color: inherit; background: var(--surface); border: 1px solid var(--win-line); padding: 6px; resize: vertical; }
.task-details { margin: 0; font-size: 13px; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; }
.work-modal > .muted { white-space: pre-wrap; overflow-wrap: anywhere; }
.shift-tasks { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 12px; align-items: start; }
.shift-tasks-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.shift-tasks-head h2 { margin: 0; font-size: 15px; }
.task-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.task-list li { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.task-list li.done .task-mark { background: #0ca30c; border-color: #0ca30c; color: #fff; }
.task-list .muted { font-size: 13px; }
@media (max-width: 700px) { .shift-tasks { grid-template-columns: minmax(0, 1fr); } }
.panel-shift-button { display: block; width: 100%; margin-top: 8px; padding: 6px; font-weight: 700; }
.close-warn { margin-bottom: 10px; padding: 7px 10px; background: var(--warn-soft); border: 1px solid var(--warn); font-size: 14px; }
.close-warn p { margin: 0 0 5px; }
.close-warn p:last-child, .close-warn ul:last-child { margin-bottom: 0; }
.close-warn ul { margin: 0; padding-left: 18px; }
.stage-title { margin: 14px 0 6px; font-size: 15px; }
.task-card.doing { border-color: var(--select); }
.task-card.doing .task-mark { background: var(--select); border-color: var(--select); color: var(--select-text); font-size: 9px; }
.task-card button.link { margin-top: 0; align-self: center; }
.task-chip.must { font-weight: 700; }
.task-list li.doing .task-mark { background: var(--select); border-color: var(--select); color: var(--select-text); font-size: 9px; }
.task-list li.late .task-mark { background: #d03b3b; border-color: #d03b3b; color: #fff; }
