/* Дополнения к style.css («Сборка заказов») для отчёта производства */
.topbar nav a.active { background: var(--border); }
.nav-badge { display: inline-block; min-width: 18px; padding: 1px 6px; margin-left: 4px; border-radius: 999px;
  background: var(--yellow); color: #fff; font-size: 11px; font-weight: 700; text-align: center; }

/* «Задания», «Инвентаризация» - по содержимому, по центру экрана (решение 11.11.2026) */
.container.container-mid { max-width: 1400px; }
.inv-center { max-width: 1100px; margin: 0 auto; }
body.report-page { height: 100vh; display: flex; flex-direction: column; overflow: hidden; }
body.report-page .container { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 12px 16px; max-width: none; width: 100%; margin: 0; }
.report-card { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 12px 14px; margin-bottom: 0; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.toolbar .left, .toolbar .right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.period-label { font-size: 14px; color: var(--muted); }
.period-label b { color: var(--text); }

/* вкладки листов - как ярлыки листов Excel */
.sheet-tabs { display: flex; gap: 2px; flex-wrap: wrap; border-bottom: 2px solid var(--accent); margin-bottom: 10px; }
.sheet-tab { padding: 8px 14px; border-radius: 8px 8px 0 0; background: var(--bg); color: var(--text); font-size: 14px;
  border: 1px solid var(--border); border-bottom: none; white-space: nowrap; }
.sheet-tab:hover { background: var(--border); text-decoration: none; }
.sheet-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 600; }
.sheet-tab .nav-badge { margin-left: 6px; }

#gridWrap { flex: 1; min-height: 0; position: relative; overflow: hidden; }
#grid .jexcel_content { box-shadow: none; }
#grid .jexcel > tbody > tr > td { font-size: 13px; padding: 3px 6px; white-space: nowrap; }
#grid .jexcel > thead > tr > td { font-size: 12px; padding: 4px 4px; line-height: 1.25; }
#grid td.c-label { font-weight: 500; text-align: left !important; }
#grid td.c-section { font-weight: 700; }
#grid td.c-num { text-align: right !important; font-variant-numeric: tabular-nums; }
#grid td.c-num.c-day { text-align: center !important; }   /* значения за день - по центру, остатки - справа */
#grid td.c-sum { background: #f8fafc; font-weight: 600; }
#grid td.c-balance { background: #eef2ff; font-weight: 700; }
#grid td.c-today { box-shadow: inset 2px 0 0 var(--accent), inset -2px 0 0 var(--accent); }
#grid td.c-future { background: #fafafa; }
#grid td.c-pending { background: #fef9c3 !important; }
#grid td.c-inv { background: #fecaca !important; color: #991b1b; font-weight: 600; }
#grid td.c-auto { color: #1d4ed8; font-style: italic; }
#grid td.c-note { position: relative; }
#grid td.c-note::after { content: ""; position: absolute; top: 0; right: 0; border-style: solid; border-width: 0 7px 7px 0;
  border-color: transparent var(--red) transparent transparent; }
#grid td.c-multi:not(.c-pending) { color: #0f5132; }
#grid td.c-neg { color: var(--red); }
#grid thead td.h-today { background: var(--accent) !important; color: #fff; }
#grid thead td.h-weekend { color: var(--red); }

.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 8px; }
.legend span::before { content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -2px; border: 1px solid var(--border); }
.legend .lg-pending::before { background: #fef9c3; }
.legend .lg-auto::before { background: #dbeafe; }
.legend .lg-note::before { background: linear-gradient(225deg, var(--red) 30%, #fff 30%); }
.legend .lg-today::before { background: #fff; border: 2px solid var(--accent); }

/* панель ячейки справа */
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 420px; max-width: 100%; background: var(--card);
  box-shadow: -8px 0 24px rgba(0,0,0,0.12); z-index: 1500; display: flex; flex-direction: column; }
.drawer[hidden] { display: none; }
.drawer-head { padding: 16px 18px 12px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; gap: 10px; }
.drawer-head h2 { margin: 0 0 4px; font-size: 17px; }
.drawer-body { padding: 14px 18px; overflow-y: auto; flex: 1; }
.drawer-total { font-size: 26px; font-weight: 700; margin: 4px 0 12px; }
.entry { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
.entry.st-new { border-color: #facc15; background: #fefce8; }
.entry.st-rejected { opacity: 0.6; background: #fef2f2; border-color: #fecaca; }
.entry-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.entry-qty { font-size: 18px; font-weight: 700; }
.entry-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.entry-comment { font-size: 13px; margin-top: 4px; }
.entry-actions { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.btn.ok { background: var(--green); }
.btn.ok:hover { background: #15803d; }
.section-title { font-size: 12px; text-transform: uppercase; color: var(--muted); font-weight: 600; margin: 16px 0 8px; }
.note { font-size: 13px; padding: 8px 10px; background: #fff7ed; border-radius: 8px; margin-bottom: 6px; display: flex; justify-content: space-between; gap: 8px; }
.inline-form { display: flex; gap: 6px; }
.inline-form input { flex: 1; min-width: 0; padding: 8px 10px; border: 1px solid var(--border); border-radius: 7px; font-size: 14px; }
.auto-box { background: #eff6ff; border-radius: 10px; padding: 10px 12px; font-size: 13px; }

.popover { position: absolute; z-index: 1400; background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12); padding: 14px; width: 320px; }
.popover[hidden] { display: none; }
.popover .quick { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.popover input[type=date] { padding: 7px 9px; border: 1px solid var(--border); border-radius: 7px; font-size: 14px; }
.toast { position: fixed; top: 16px; right: 16px; z-index: 3000; box-shadow: 0 2px 8px rgba(0,0,0,0.15); }
.nav-badge[hidden] { display: none; }
.btn[hidden] { display: none; }
#grid thead td.h-today { color: #fff !important; font-weight: 700; }
#grid td.c-init { background: #fffbeb; color: var(--muted); }
.seg { display: inline-flex; background: var(--bg); border: 1px solid var(--border); border-radius: 9px; padding: 3px; gap: 2px; margin-right: 12px; }
.seg-btn { border: none; background: transparent; padding: 6px 14px; border-radius: 7px; font-size: 14px; cursor: pointer; color: var(--text); }
.seg-btn.active { background: var(--accent); color: #fff; }
.balances { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; margin-top: 8px; flex-shrink: 0; }
.balances .bal { background: #eef2ff; border-radius: 6px; padding: 3px 8px; }
.balances-title { margin-top: 10px; font-size: 15px; flex-shrink: 0; }
.balances.balances-big { display: grid; gap: 8px; margin-top: 6px; font-size: 14px; }
.balances.balances-big .bal { display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 8px 12px; border-radius: 10px; min-width: 0; }
.balances.balances-big .bal-l { font-size: 13px; color: #475569; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.balances.balances-big .bal-v { font-size: 22px; line-height: 1.15; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-top: 14px; max-height: 70vh; overflow-y: auto; }
.photo-grid img { width: 100%; border-radius: 8px; display: block; }
.tasks-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 16px; }
.task-card .task-items input.plan { width: 90px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; }
.task-card select.add-item { width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 7px; margin-top: 10px; font-size: 14px; }
.task-card .note { width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 7px; }
.entry-photos { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.entry-photos img { width: 92px; height: 92px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }
.update-banner { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 10px 16px; background: #ede9fe; color: #4c1d95; font-weight: 600; }
.update-banner[hidden] { display: none; }
.topbar .brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.topbar .brand:hover { text-decoration: none; }
.brand-logo { height: 44px; width: auto; display: block; }
.topbar .brand .brand-sub { font-weight: 600; font-size: 14px; color: var(--muted); }
.photo-report { display: grid; grid-template-columns: 240px 1fr; gap: 16px; align-items: start; }
.days-list { max-height: 70vh; overflow-y: auto; }
.day-link { display: block; padding: 7px 10px; border-radius: 7px; color: var(--text); }
.day-link:hover { background: var(--bg); text-decoration: none; }
.day-link.active { background: var(--accent); color: #fff; }
.day-link.active .muted { color: #e9d5ff; }
.ph-group { border-top: 1px solid var(--border); padding: 10px 0; }
.ph-group .entry-photos img { width: 140px; height: 140px; }

/* выбор кнопками вместо точек и галочек (решение 14.10.2026): навели - серая, выбрана - фиолетовая */
label.radio-line, .form-row label.radio-line { position: relative; display: inline-flex; gap: 6px; align-items: center; margin: 0 8px 8px 0; padding: 9px 16px;
  border: 1px solid var(--border); border-radius: 10px; background: #fff; color: var(--text); font-size: 15px; line-height: 1.25;
  cursor: pointer; user-select: none; transition: background .12s, border-color .12s; }
label.radio-line input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
label.radio-line:hover { background: #e5e7eb; }
label.radio-line:has(input:checked) { background: var(--accent); border-color: var(--accent); color: #fff; }
label.radio-line:has(input:checked) .muted-note, label.radio-line:has(input:checked) span { color: #ede9fe; }
label.radio-line:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
label.radio-line:has(input:disabled) { opacity: .5; cursor: not-allowed; }
a.seg-btn { text-decoration: none; display: inline-block; } a.seg-btn:hover { text-decoration: none; background: var(--border); } a.seg-btn.active:hover { background: var(--accent); }
.shift-sum { margin-top: 4px; }
.shift-sum td { padding: 6px 8px; }
.shift-sum td.num { text-align: right; white-space: nowrap; }
.sum-block { margin-top: 10px; font-size: 14px; }
.sum-block .section-title { margin: 6px 0 4px; }

#grid td.c-comment { text-align: left !important; color: var(--text); white-space: normal; font-size: 12.5px; }
#grid td.c-deleted { background: #fdf0f4 !important; }

/* календарь в полях даты - значок крупнее (решение 14.10.2026) */
input[type=date]::-webkit-calendar-picker-indicator { width: 22px; height: 22px; padding: 2px; cursor: pointer; opacity: .8; }
input[type=date]::-webkit-calendar-picker-indicator:hover { opacity: 1; }
