body { background: #f3f4f8; --navy: #111827; --accent: #c8f169; }
[hidden] { display: none !important; }
.logo { font-family: var(--font-head); font-weight: 700; font-size: 1.5rem; margin: 0; }
.logo span { color: var(--accent); }
.wide { width: 100%; }
.err { color: #b3261e; font-size: .875rem; min-height: 1.3em; }

.login { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; background: radial-gradient(circle at 20% 10%, #1f2a44, var(--navy) 60%); }
.login-card { width: min(100%, 400px); display: grid; gap: 1rem; padding: 2rem; border-radius: 22px; background: #fff; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .6); }
.login-card .logo { color: var(--navy); }
.login-card .logo span { color: #78933f; }
.login-card h1 { font-size: 2rem; }
.hint { font-size: .875rem; color: var(--muted); }
.hint b { color: var(--ink); }
.field { display: grid; gap: .35rem; }
.field label { font-size: .875rem; font-weight: 600; }
.field input { min-height: 46px; padding: .6rem .9rem; border: 1px solid #d5d8e0; border-radius: 10px; transition: var(--ease); }
.field input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(200, 241, 105, .7); }

.bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem clamp(1rem, 4vw, 2rem); background: var(--navy); color: #fff; }
.bar-right { display: flex; align-items: center; gap: 1rem; }
.who { font-size: .875rem; opacity: .75; }
.btn-line-light { background: transparent; border-color: rgba(255, 255, 255, .4); color: #fff; min-height: 40px; padding: .4rem 1.1rem; }
.main { padding: 2rem 0 3rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
.main h1 { font-size: clamp(1.9rem, 4vw, 2.5rem); }

.kpis { display: grid; gap: 1rem; grid-template-columns: repeat(4, 1fr); }
.kpi { padding: 1.2rem 1.3rem; border-radius: 16px; background: #fff; border: 1px solid #e6e8ef; transition: var(--ease); }
.kpi:hover { transform: translateY(-4px); box-shadow: 0 20px 36px -22px rgba(17, 24, 39, .5); }
.kpi small { display: block; font-size: .8125rem; color: var(--muted); }
.kpi b { display: block; margin-top: .3rem; font-family: var(--font-head); font-size: 1.9rem; line-height: 1.1; }

.panel { padding: 1.4rem; border-radius: 18px; background: #fff; border: 1px solid #e6e8ef; }
.panel h2 { font-size: 1.4rem; }
.panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.controls { display: flex; flex-wrap: wrap; gap: .6rem; }
.controls input, .controls select { min-height: 44px; padding: .5rem .9rem; border: 1px solid #d5d8e0; border-radius: 10px; background: #fff; }
.controls .btn { min-height: 44px; border-radius: 10px; }

.chart { margin-top: 1rem; }
.chart svg { width: 100%; height: auto; }
.chart .bar-rect { fill: #111827; transition: var(--ease); }
.chart .bar-rect:hover { fill: #78933f; }
.chart text { font-family: var(--font-text); font-size: 12px; fill: #6b7280; }
.chart .val { fill: #111827; font-weight: 600; }

.table-wrap { overflow-x: auto; border-radius: 12px; border: 1px solid #eceef4; }
table { width: 100%; border-collapse: collapse; min-width: 700px; font-size: .9375rem; }
th, td { padding: .8rem 1rem; text-align: left; border-bottom: 1px solid #eceef4; }
th { background: #f8f9fc; font-size: .8125rem; color: var(--muted); font-weight: 600; white-space: nowrap; }
th button { border: 0; background: none; padding: 0; font-weight: 600; color: inherit; }
th button:hover { color: var(--ink); }
th button[data-dir="asc"]::after { content: ' ↑'; }
th button[data-dir="desc"]::after { content: ' ↓'; }
.num { text-align: right; }
tbody tr { transition: var(--ease); }
tbody tr:hover { background: #fafbfd; }
td select { min-height: 38px; padding: .2rem .5rem; border-radius: 999px; border: 1px solid transparent; font-weight: 600; font-size: .8125rem; }
.s-Нове { background: #e0ecff; color: #1d4ed8; }
.s-Вобробці { background: #fff1cc; color: #8a5a00; }
.s-Відправлено { background: #dcf5d0; color: #2f6b1f; }
.s-Скасовано { background: #fde1de; color: #b3261e; }
.empty { padding: 2rem; text-align: center; color: var(--muted); }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1rem; font-size: .875rem; color: var(--muted); }
.pager .btn { min-height: 40px; padding: .4rem 1rem; }

@media (max-width: 760px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .who { display: none; }
  .controls { width: 100%; }
  .controls input { flex: 1 1 100%; }
  .controls select, .controls .btn { flex: 1; }
}

.prod { display: inline-flex; align-items: center; gap: .65rem; white-space: nowrap; }
.thumb { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; flex: none; }
.thumb svg { width: 72%; height: 72%; }
