:root {
  --bg: #F6F7F6; --card: #FFFFFF; --ink: #17201E; --ink2: #2C3735; --muted: #5B6764; --muted2: #46524F;
  --line: #E4E8E7; --line2: #EEF1F0; --field: #DDE3E1; --accent: #0E6B5C; --accent-d: #0A4F44; --accent-l: #E7F1EF;
  --down: #9A4A0B; --hol: #6FBFAE; --soft: #FAFBFA; --chip: #F1F4F3;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: Inter, system-ui, sans-serif; font-variant-numeric: tabular-nums; }
button, input, select { font: inherit; color: inherit; }
a { color: var(--accent); } a:hover { color: var(--accent-d); }
[hidden] { display: none !important; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
main.wrap { padding-top: 28px; padding-bottom: 48px; display: flex; flex-direction: column; gap: 20px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

header#top { background: var(--card); border-bottom: 1px solid var(--line); }
.bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; min-height: 64px; }
.brand { font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
nav#nav { display: flex; flex-wrap: wrap; gap: 4px; }
nav#nav a { padding: 10px 14px; border-radius: 8px; color: var(--muted2); font-weight: 500; text-decoration: none; font-size: 14px; }
nav#nav a.on { background: var(--accent-l); color: var(--accent); font-weight: 600; }
.who { margin-left: auto; display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); }
.link { background: none; border: 0; padding: 6px; color: var(--accent); cursor: pointer; text-decoration: underline; font-size: 13px; }

.controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px 28px; }
.ctl { display: flex; flex-direction: column; gap: 6px; }
.lbl { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.seg { display: flex; flex-wrap: wrap; background: var(--card); border: 1px solid var(--field); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { min-height: 36px; padding: 0 12px; border-radius: 7px; border: 0; cursor: pointer; font-size: 14px; font-weight: 500; background: transparent; color: var(--muted2); }
.seg button.on { font-weight: 600; background: var(--ink); color: #fff; }
.row { display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; }
input[type=date], input[type=text], input[type=password], input[type=search], select, input.box {
  height: 42px; padding: 0 10px; border: 1px solid var(--field); border-radius: 10px; background: var(--card); font-size: 14px; }
select { min-width: 220px; }
.btn { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px; border-radius: 10px; border: 0; background: var(--accent); color: #fff; font-weight: 600; font-size: 14px; cursor: pointer; }
.btn:disabled { opacity: .6; cursor: default; }
.btn.ghost { background: var(--card); color: var(--ink2); border: 1px solid var(--field); font-weight: 500; }
.btn.sm { height: 34px; padding: 0 12px; font-size: 13px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.pad { padding: 16px 18px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.kpi .k-l { font-size: 13px; color: var(--muted); }
.kpi .k-v { font-size: 28px; font-weight: 700; margin-top: 4px; }
.kpi .k-s { font-size: 13px; color: var(--muted); }
.up { color: var(--accent); font-weight: 600; } .down { color: var(--down); font-weight: 600; }

.thead { display: grid; gap: 8px; padding: 12px 20px; border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.trow { display: grid; gap: 8px; align-items: center; padding: 0 20px; min-height: 44px; border: 0; border-bottom: 1px solid var(--line2); width: 100%; background: transparent; text-align: left; font-size: 14px; color: var(--ink); }
button.trow { cursor: pointer; }
button.trow.on { background: var(--accent-l); }
.r { text-align: right; } .c { text-align: center; }
.scrollx { overflow-x: auto; }
.scrolly { max-height: 460px; overflow-y: auto; }
.sect-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.sect-h b { font-size: 15px; }
.check { width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; background: #fff; border: 1.5px solid #A7B1AE; }
.on .check { background: var(--accent); border: 0; }
.check svg { visibility: hidden; } .on .check svg { visibility: visible; }

.chev { transition: transform 150ms ease; } .open > .trow .chev, .chev.open { transform: rotate(90deg); }
.catbtn { display: flex; align-items: center; gap: 10px; min-height: 44px; background: none; border: 0; padding: 0; text-align: left; font-weight: 600; font-size: 15px; cursor: pointer; }
.sub { background: var(--soft); padding: 4px 0 10px; }
.sub .trow { min-height: 46px; border: 0; font-size: 14px; color: var(--ink2); }
.num { width: 76px; height: 36px; padding: 0 10px; text-align: right; border: 1px solid #C9D0CE; border-radius: 8px; background: #fff; font-size: 14px; }
.num.send { border: 1.5px solid var(--accent); color: var(--accent); font-weight: 600; }
.num::placeholder { color: #A7B1AE; font-weight: 400; }
input[type=number] { -moz-appearance: textfield; }
input::-webkit-outer-spin-button, input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.tbtn { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--field); background: #fff; cursor: pointer; }

.daychips { display: flex; flex-wrap: wrap; gap: 8px; }
.daychip { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; border-radius: 10px; background: var(--chip); min-width: 190px; font-size: 12px; color: var(--muted); }
.daychip b { font-size: 14px; color: var(--ink); }
.daychip .part { font-weight: 600; color: var(--accent); }
.hol { font-size: 12px; font-weight: 600; color: var(--down); }
.paces { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.pace { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; }

.search { display: flex; align-items: center; gap: 10px; border: 1px solid #C9D0CE; border-radius: 10px; padding: 0 12px; min-height: 44px; }
.search input { flex: 1; min-width: 0; height: 42px; border: 0; outline: none; background: transparent; font-size: 15px; padding: 0; }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 34px; }
.chip { display: inline-flex; align-items: center; gap: 2px; padding-left: 12px; border-radius: 999px; background: var(--accent-l); color: var(--accent-d); font-size: 14px; font-weight: 600; }
.chip button { width: 32px; height: 32px; border: 0; border-radius: 999px; background: transparent; color: inherit; cursor: pointer; }
.pill { min-height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--field); background: #fff; font-size: 13px; cursor: pointer; }
.sharebar { width: 44px; height: 6px; border-radius: 3px; background: var(--line2); overflow: hidden; display: inline-block; }
.sharebar span { display: block; height: 6px; background: var(--accent); }
.chart svg { display: block; width: 100%; }
.legend { margin-left: auto; display: flex; gap: 16px; font-size: 13px; color: var(--muted2); }
.legend { flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.sw { width: 12px; height: 12px; border-radius: 2px; display: inline-block; }

.auth { max-width: 380px; margin: 60px auto; display: flex; flex-direction: column; gap: 14px; }
.auth h1 { margin: 0; font-size: 24px; }
.auth label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 500; }
.err { color: #A3260F; font-size: 14px; }
.note { font-size: 13px; color: var(--muted); line-height: 1.5; margin: 0; }
.warn { font-size: 13px; color: var(--down); }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 10px; font-size: 14px; z-index: 10; }
table.plain { width: 100%; border-collapse: collapse; font-size: 14px; }
table.plain th, table.plain td { padding: 10px 14px; border-bottom: 1px solid var(--line2); text-align: left; }
table.plain th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
@media (max-width: 640px) { .wrap { padding: 0 16px; } .who { margin-left: 0; } }
