* { box-sizing: border-box; }
body { font: 14px/1.4 system-ui, sans-serif; margin: 0; padding: 16px 20px; color: #1d2433; background: #f7f8fa; }
h1 { font-size: 20px; margin: 0 0 12px; }
.login { max-width: 320px; margin: 80px auto; background: #fff; padding: 24px; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.login label { display: block; margin: 10px 0 4px; }
.login input { width: 100%; padding: 8px; font: inherit; }
.login button { margin-top: 16px; width: 100%; padding: 9px; font: inherit; cursor: pointer; }
.err { color: #b42318; margin-top: 10px; min-height: 1.4em; }
.top { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.top .who { margin-left: auto; color: #555; }
.top button { font: inherit; padding: 4px 10px; cursor: pointer; }
.month { font-weight: 600; font-size: 16px; min-width: 150px; text-align: center; }
.badge-locked { background: #fde7e7; color: #b42318; padding: 2px 8px; border-radius: 10px; font-size: 12px; }
.scroller { overflow-x: auto; background: #fff; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
table.grid { border-collapse: collapse; }
table.grid th, table.grid td { border: 1px solid #e3e6ec; padding: 4px; text-align: center; vertical-align: top; }
table.grid th { font-weight: 500; font-size: 12px; color: #555; min-width: 104px; }
table.grid th .dn { font-size: 15px; color: #1d2433; font-weight: 600; }
.weekend { background: #fff4e0; }
.cell select { width: 100%; font: inherit; font-size: 12px; margin: 1px 0; }
.cell .half { display: flex; flex-direction: column; gap: 2px; margin-top: 2px; }
.cell .srow { display: flex; align-items: center; gap: 3px; }
.cell .srow .share { flex: none; font-size: 11px; color: #375; white-space: nowrap; text-align: right; min-width: 28px; }
.cell .srow select { flex: 1; min-width: 0; }
.cell .st { font-size: 11px; height: 14px; color: #2e7d32; }
.cell .st.bad { color: #b42318; }
.cell.filled { background: #eef6ee; }
.cell.weekend.filled { background: #f3efd9; }
h2 { font-size: 16px; margin: 20px 0 8px; }
.nav { display: flex; gap: 6px; margin-bottom: 12px; }
.nav button { font: inherit; padding: 5px 12px; cursor: pointer; border: 1px solid #c9ced8; background: #fff; border-radius: 6px; }
.nav button.on { background: #1d2433; color: #fff; }
.top a.btn { font: inherit; padding: 4px 10px; border: 1px solid #767676; border-radius: 3px; color: inherit; text-decoration: none; background: #efefef; }
.unf-total { color: #b42318; font-weight: 600; }
table.svod th, table.svod td { min-width: 0; }
table.svod th { min-width: 64px; }
table.svod td.name, table.grid th.name, table.totals td.name { text-align: left; white-space: nowrap; padding: 4px 8px; min-width: 150px; }
table.svod td.unf { font-weight: 600; }
td.cell.svod { min-width: 64px; }
td.cell.svod select { font-size: 11px; }
td.cell.svod .half { gap: 1px; }
td.cell.svod .srow .share { font-size: 10px; min-width: 24px; }
td.cell.svod .st { font-size: 10px; height: auto; }
td.cell.svod.empty { background: #ffe9e6; }
table.totals td, table.totals th { min-width: 90px; padding: 4px 8px; }
table.totals tr.sum td { font-weight: 600; background: #f0f2f6; }
table.list td, table.list th { text-align: left; padding: 4px 8px; min-width: 0; }
.addrow { display: flex; gap: 8px; margin-top: 8px; align-items: center; }
.addrow input, .addrow select { font: inherit; padding: 4px; }
td.cell.svod.empty select { background: #ffd9d4; border: 1px solid #e0a09a; }

.counter { font-weight: 600; padding: 2px 10px; border-radius: 10px; background: #fde7e7; color: #b42318; }
.counter.full { background: #e3f4e3; color: #2e7d32; }
table.week th { min-width: 130px; }
table.week td.cell { min-width: 175px; }
table.week th .daymark { font: inherit; font-size: 11px; margin-top: 4px; cursor: pointer; }
.legend { margin: 8px 0; font-size: 12px; }
.legend span { padding: 2px 8px; border-radius: 4px; }
tr.sv-under td, .legend .sv-under { background: #ffd9d4; }
tr.sv-over td, .legend .sv-over { background: #fff2b8; }
tr.sv-no_key td { background: #eceff3; color: #555; }
tr.expandable { cursor: pointer; }
tr.detail td { background: #fafafa; font-size: 12px; color: #555; }
textarea { font: inherit; font-size: 12px; }
table.list input { font: inherit; font-size: 12px; padding: 2px 4px; }

table.cal { width: 100%; table-layout: fixed; min-width: 960px; }
table.cal th { min-width: 0; }
table.cal th:last-child { width: 190px; }
table.cal td.cell .dn { text-align: left; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
table.cal td.tail > * { opacity: .5; }
table.cal td.tail .dn { font-weight: 400; }
table.cal td.wk-total button { display: block; width: 100%; margin-top: 4px; font: inherit; font-size: 11px; cursor: pointer; }
table.cal td.wk-total .counter { display: inline-block; }

.cell .st.draft { color: #8a6d00; }
.cell .st.sent { color: #1f5fbf; font-weight: 600; }
.sendbar { margin: 12px 0; }
.sendbar button { font: inherit; font-weight: 600; padding: 8px 16px; cursor: pointer; }
.sendbar button:disabled { cursor: default; font-weight: 400; }
dialog { border: 1px solid #c9ced8; border-radius: 8px; padding: 16px 20px; max-width: 640px; max-height: 85vh; }
dialog::backdrop { background: rgba(29, 36, 51, .45); }
dialog h2 { margin-top: 0; }
dialog button { font: inherit; padding: 6px 14px; cursor: pointer; }
.send-total { font-weight: 600; }
td.cell.svod .combo { width: 100%; font: inherit; font-size: 11px; line-height: 1.3; padding: 2px; cursor: pointer; border: 1px solid #c9ced8; border-radius: 3px; background: #fff; }
