@font-face { font-family: 'Onest'; font-weight: 100 900; font-display: swap; src: url(/fonts/onest-cyrillic-wght-normal.woff2) format('woff2-variations'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Onest'; font-weight: 100 900; font-display: swap; src: url(/fonts/onest-latin-wght-normal.woff2) format('woff2-variations'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Onest'; font-weight: 100 900; font-display: swap; src: url(/fonts/onest-cyrillic-ext-wght-normal.woff2) format('woff2-variations'); unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F; }
@font-face { font-family: 'Unbounded'; font-weight: 700; font-display: swap; src: url(/fonts/unbounded-cyrillic-700-normal.woff2) format('woff2'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Unbounded'; font-weight: 700; font-display: swap; src: url(/fonts/unbounded-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+2000-206F; }

:root {
  --bg: #F4F1EA; --surface: #FFFFFF; --surface2: #EDE8DD; --border: #E3DDD0; --control: #D9D2C3;
  --text: #14161A; --muted: #4A4F57; --accent: #F2C230; --accent-soft: #FFF6D6;
  --good: #1E9E4A; --good-bg: #DDF3E3; --good-text: #11602C; --warn-bg: #FFF1CC; --warn-text: #7A5A00;
  --bad: #D8391B; --bad-bg: #FDEBE2; --bad-text: #8A2410; --info-bg: #E3EEFB; --info-text: #1D4F91;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: Onest, system-ui, sans-serif; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--text); outline-offset: 2px; }

.logo { display: flex; align-items: center; gap: 10px; font-family: Unbounded, sans-serif; font-weight: 700; font-size: 18px; letter-spacing: -.5px; }
.logo small { font-family: Onest, sans-serif; font-weight: 600; font-size: 14px; color: #8A8F98; letter-spacing: 0; }

/* вхід */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 20px; }
.login form { width: 100%; max-width: 380px; background: var(--surface); border: 2px solid var(--text); border-radius: 28px; padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.login h1 { font-family: Unbounded, sans-serif; font-size: 24px; margin: 6px 0 4px; letter-spacing: -.5px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 700; color: var(--muted); }
.input { height: 52px; padding: 0 14px; border-radius: 14px; background: var(--bg); border: 1px solid var(--control); font-size: 16px; color: var(--text); outline: none; width: 100%; }
.input:focus { border-color: var(--text); box-shadow: 0 0 0 3px rgba(242,194,48,.55); }
textarea.input { height: auto; min-height: 76px; padding: 12px 14px; resize: vertical; line-height: 1.4; }
.btn { height: 48px; padding: 0 18px; border-radius: 14px; border: 0; background: var(--surface2); font-weight: 700; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; text-decoration: none; transition: transform .1s, filter .15s; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--accent); color: #14161A; }
.btn-dark { background: var(--text); color: #F4F1EA; }
.btn-lg { height: 60px; font-size: 17px; border-radius: 18px; width: 100%; }
.btn-ghost { background: transparent; border: 1px solid var(--border); }
.btn[disabled] { opacity: .55; cursor: progress; }
.col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.input.code { font-size: 22px; letter-spacing: 4px; font-weight: 700; }
.err { color: var(--bad); font-weight: 700; font-size: 14px; }

/* шапка */
.top { position: sticky; top: 0; z-index: 20; background: #14161A; color: #F4F1EA; border-bottom: 3px solid var(--accent); }
.top-in { max-width: 1100px; margin: 0 auto; height: 60px; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.top-r { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.top .btn { height: 38px; padding: 0 12px; background: #26292F; color: #F4F1EA; font-size: 14px; }
.top .me { color: #C4C8CF; font-weight: 600; }
@media (max-width: 560px) { .top .me, .top .lbl, .logo small { display: none; } .top-in { padding: 0 12px; } }

.wrap { max-width: 1100px; margin: 0 auto; padding: 16px 16px 80px; }
.tabs { display: flex; gap: 6px; overflow-x: auto; padding: 4px; background: var(--surface2); border-radius: 16px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: 0 0 auto; height: 42px; padding: 0 14px; border: 0; border-radius: 12px; background: transparent; font-weight: 700; font-size: 15px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.tab[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.count { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--control); color: var(--text); font-size: 12px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.count.hot { background: var(--bad); color: #fff; }
.count.new { background: var(--accent); }
.bar { display: flex; gap: 8px; margin: 12px 0 14px; flex-wrap: wrap; }
.bar .input { flex: 1 1 220px; height: 46px; }
.bar select.input { flex: 0 1 200px; }

/* картки заявок */
.list { display: grid; gap: 12px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.card.is-new { border: 2px solid var(--accent); box-shadow: 0 6px 20px rgba(242,194,48,.18); }
.card.flash { animation: flash 1.6s ease-out; }
@keyframes flash { from { background: var(--accent-soft); } to { background: var(--surface); } }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.chip { height: 26px; padding: 0 10px; border-radius: 999px; font-size: 13px; font-weight: 800; display: inline-flex; align-items: center; gap: 6px; background: var(--surface2); color: var(--muted); white-space: nowrap; }
.st-new { background: var(--accent); color: #14161A; }
.st-in_work { background: var(--info-bg); color: var(--info-text); }
.st-no_answer, .st-callback { background: var(--warn-bg); color: var(--warn-text); }
.st-agreed { background: var(--good-bg); color: var(--good-text); }
.st-refused { background: var(--bad-bg); color: var(--bad-text); }
.st-spam { background: var(--surface2); color: #8A8F98; }
.due { background: var(--bad); color: #fff; }
.meta { font-size: 13px; color: var(--muted); }
.who { font-weight: 800; font-size: 18px; }
.who.empty { color: #8A8F98; font-weight: 600; }
.contacts { display: flex; flex-wrap: wrap; gap: 8px; }
.contact { height: 48px; padding: 0 14px; border-radius: 14px; background: var(--bg); border: 1px solid var(--border); display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; text-decoration: none; }
.contact.email { font-size: 15px; font-weight: 700; }
.contact svg { flex-shrink: 0; }
.copy { width: 48px; padding: 0; }
.hot { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.hot .btn { height: 52px; justify-content: flex-start; padding: 0 14px; border: 1px solid var(--border); background: var(--surface); }
.hot .b-agreed { background: var(--good); color: #fff; border-color: var(--good); }
.hot .b-agreed:hover { filter: brightness(1.05); }
.sheet { background: var(--bg); border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.sheet-t { font-weight: 800; font-size: 15px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pick { height: 40px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--control); background: var(--surface); font-weight: 700; font-size: 14px; }
.pick[aria-pressed="true"] { background: var(--text); color: #F4F1EA; border-color: var(--text); }
.links { display: flex; gap: 14px; flex-wrap: wrap; font-size: 14px; font-weight: 700; }
.linkbtn { background: none; border: 0; padding: 6px 0; color: var(--muted); font-weight: 700; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
.hist { border-top: 1px dashed var(--border); padding-top: 10px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.hist-i { display: grid; grid-template-columns: 110px 1fr; gap: 8px; color: var(--muted); }
.hist-i b { color: var(--text); }
.hist-note { color: var(--text); background: var(--bg); border-radius: 10px; padding: 6px 10px; margin-top: 2px; white-space: pre-wrap; }
.empty-st { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty-st b { display: block; font-family: Unbounded, sans-serif; font-size: 20px; color: var(--text); margin-bottom: 6px; }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 50; background: #14161A; color: #F4F1EA; border-radius: 16px; padding: 12px 18px; font-weight: 700; font-size: 15px; box-shadow: 0 12px 32px rgba(0,0,0,.3); max-width: calc(100% - 32px); }
.offline { background: var(--warn-bg); color: var(--warn-text); border-radius: 14px; padding: 10px 14px; font-weight: 700; font-size: 14px; margin-bottom: 12px; }
@media (min-width: 900px) {
  .card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); column-gap: 24px; }
  .card > .head, .card > .hist, .card > .links-row { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
