/* Личный кабинет лоток OS. Цвета и шрифты — по брендбуку, как на сайте. */
@font-face { font-family: Unbounded; src: url(/fonts/unbounded-cyrillic.woff2) format('woff2'); font-weight: 200 900; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Unbounded; src: url(/fonts/unbounded-latin.woff2) format('woff2'); font-weight: 200 900; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: Manrope; src: url(/fonts/manrope-cyrillic.woff2) format('woff2'); font-weight: 200 800; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Manrope; src: url(/fonts/manrope-latin.woff2) format('woff2'); font-weight: 200 800; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122; }

:root {
  --orange: #f26b1d;
  --orange-dark: #b4500f;
  --graphite: #16181d;
  --paper: #f4f2ee;
  --gray: #5b5f66;
  --line: #e2ded6;
  --green: #1f8a4c;
  --red: #b3261e;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--paper); color: var(--graphite); font: 16px/1.5 Manrope, system-ui, sans-serif; }
h1, h2, .word, .display { font-family: Unbounded, system-ui, sans-serif; }
h1 { font-size: clamp(26px, 5vw, 36px); line-height: 1.15; margin: 0; font-weight: 800; }
h2 { font-size: 20px; line-height: 1.25; margin: 0; font-weight: 700; }
p { margin: 0; }
a { color: var(--orange-dark); }
.muted { color: var(--gray); }
.center { text-align: center; padding: 48px 16px; }
[hidden] { display: none !important; }

.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 64px; padding: 0 max(16px, calc((100vw - 1040px) / 2)); background: var(--graphite); color: #fff; }
.logo { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.word { font-weight: 800; font-size: 20px; letter-spacing: -0.01em; }
.word sup { color: var(--orange); font-size: 10px; margin-left: 2px; }
.who { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 15px; }
.who span { color: #ffffffb3; max-width: 40vw; overflow: hidden; text-overflow: ellipsis; }

main { max-width: 1040px; margin: 0 auto; padding: 32px 16px 64px; }
.head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border: 0; border-radius: 14px; font: 700 16px Manrope, system-ui, sans-serif; cursor: pointer; text-decoration: none; transition: transform 0.1s, background 0.15s, opacity 0.15s; }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn.primary { background: var(--orange); color: var(--graphite); }
.btn.primary:hover:not(:disabled) { background: #ff7d33; }
.btn.dark { background: var(--graphite); color: #fff; }
.btn.outline { background: transparent; color: var(--graphite); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.outline:hover { box-shadow: inset 0 0 0 1.5px var(--graphite); }
.btn.ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px #ffffff40; }
.btn.small { min-height: 38px; padding: 0 14px; font-size: 14px; border-radius: 11px; }
.btn.danger { background: transparent; color: var(--red); box-shadow: inset 0 0 0 1.5px #b3261e55; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

.card { background: #fff; border-radius: 24px; padding: 24px; }
.grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.machine { display: flex; flex-direction: column; gap: 16px; }
.machine .row { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.machine .num { font-size: 14px; color: var(--gray); font-weight: 600; }
.machine dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; margin: 0; font-size: 15px; }
.machine dt { color: var(--gray); }
.machine dd { margin: 0; font-weight: 600; text-align: right; }
.machine .actions { display: flex; gap: 8px; margin-top: auto; }
.machine .actions .btn { flex: 1; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.badge::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.badge.on { background: #1f8a4c1a; color: var(--green); }
.badge.off { background: #5b5f661a; color: var(--gray); }
.badge.warn { background: #f26b1d1f; color: var(--orange-dark); }

.empty { text-align: center; padding: 56px 24px; }
.empty p { margin: 12px auto 24px; max-width: 420px; color: var(--gray); }

.login { max-width: 420px; margin: 8vh auto 0; }
.login h1 { margin-bottom: 8px; }
form { display: grid; gap: 14px; margin-top: 24px; }
label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--gray); }
input { width: 100%; min-height: 52px; padding: 0 16px; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; color: var(--graphite); font: 600 16px Manrope, system-ui, sans-serif; }
input:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px #f26b1d40; }
.hint { font-size: 14px; color: var(--gray); }
.error { color: var(--red); font-weight: 600; font-size: 15px; min-height: 22px; }

dialog { width: min(480px, calc(100vw - 32px)); border: 0; border-radius: 24px; padding: 28px; color: var(--graphite); }
dialog::backdrop { background: #16181dcc; }
dialog h2 { margin-bottom: 8px; }
.people { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.people li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-radius: 14px; background: var(--paper); font-weight: 600; }
.people small { color: var(--gray); font-weight: 600; }
.dialog-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px; }

@media (max-width: 520px) {
  .card { padding: 20px; border-radius: 20px; }
  .head .btn { width: 100%; }
}
