@font-face {
    font-family: Manrope;
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url('/assets/fonts/manrope-cyrillic.woff2') format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
    font-family: Manrope;
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url('/assets/fonts/manrope-latin.woff2') format('woff2');
    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;
}

:root {
    color-scheme: light;
    font-family: Manrope, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #25382e;
    background: #f5f7f4;
    font-synthesis: none;
    -webkit-font-smoothing: antialiased;
    --muted: #607066;
    --accent: #246c50;
    --border: #dce4dc;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button { font: inherit; }
p, h1, h2, h3 { margin: 0; }
.dashboard { max-width: 760px; margin: 0 auto; padding: max(24px, env(safe-area-inset-top)) 18px max(24px, env(safe-area-inset-bottom)); }
.header { margin-bottom: 22px; }
.brand { color: #496052; font-size: 14px; font-weight: 700; letter-spacing: .01em; line-height: 1.5; margin-bottom: 22px; }
.heading-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.heading-row > div { min-width: 0; }
.eyebrow { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
h1 { font-size: clamp(26px, 6.8vw, 34px); font-weight: 800; line-height: 1.2; letter-spacing: -.045em; overflow-wrap: anywhere; }
.refresh { flex: 0 0 48px; display: grid; place-items: center; height: 48px; color: #3f5b49; background: #fff; border: 1px solid var(--border); border-radius: 16px; cursor: pointer; }
.refresh svg { width: 23px; height: 23px; }
.refresh:hover { background: #edf3ec; }
.refresh:disabled { opacity: .5; cursor: wait; }
.refresh:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.connection { display: flex; align-items: center; gap: 8px; margin-top: 14px; color: var(--muted); font-size: 12px; font-weight: 500; line-height: 1.6; }
.connection-dot, .status-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.connection[data-state="fresh"] { color: var(--accent); }
.connection[data-state="stale"], .connection[data-state="error"] { color: #895618; }
.notice { color: #79501b; background: #fff3df; border: 1px solid #ead6b5; padding: 14px 16px; border-radius: 16px; font-size: 14px; line-height: 1.6; margin-bottom: 20px; overflow-wrap: anywhere; }
.overview { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 20px 0; background: #e3f0e6; border: 1px solid #cbdfce; border-radius: 22px; margin-bottom: 26px; }
.overview-item { padding: 0 20px; }
.overview-item + .overview-item { border-left: 1px solid #c2d8c6; }
.overview-label { font-size: 14px; font-weight: 600; color: #466750; }
.overview-number { color: #245a3e; font-size: 48px; font-weight: 700; letter-spacing: -.065em; line-height: 1.15; margin: 8px 0 4px; font-variant-numeric: tabular-nums; }
.overview-total { color: #4e6e57; font-size: 18px; font-weight: 500; letter-spacing: -.025em; margin-left: 8px; }
.overview-caption { color: #4e6e57; font-size: 13px; }
.machine-section { margin-bottom: 26px; }
.section-heading { display: flex; align-items: center; gap: 9px; margin-bottom: 13px; }
h2 { font-size: 17px; font-weight: 700; letter-spacing: -.03em; line-height: 1.4; }
.section-count { display: grid; place-items: center; min-width: 25px; height: 25px; padding: 0 7px; background: #e6ece5; border-radius: 9px; color: #566b5b; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.machine-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.machine-card { min-width: 0; padding: 16px; border: 1px solid var(--border); border-radius: 20px; background: #fff; --status-color: #657367; --status-tint: #edf1eb; }
.machine-card[data-tone="available"] { --status-color: #246c50; --status-tint: #dcefe1; border-color: #c1ddc7; background: #f3faf4; }
.machine-card[data-tone="running"] { --status-color: #2e6393; --status-tint: #e7f0fb; }
.machine-card[data-tone="error"] { --status-color: #aa493c; --status-tint: #fcece7; }
.machine-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 6px; margin-bottom: 12px; }
.machine-illustration { display: grid; place-items: center; width: 60px; height: 60px; flex-shrink: 0; border-radius: 18px; background: var(--status-tint); }
.machine-icon { width: 50px; height: 50px; color: var(--status-color); }
.machine-markers { display: flex; align-items: center; gap: 6px; min-width: 0; min-height: 21px; }
.status-dot { width: 8px; height: 8px; color: var(--status-color); margin: 0 4px 0 0; box-shadow: 0 0 0 4px var(--status-tint); }
.machine-floor { color: var(--muted); background: #edf1eb; border-radius: 6px; padding: 2px 4px; font-size: 11px; font-weight: 600; line-height: 1.5; white-space: nowrap; }
.machine-name { font-size: 18px; font-weight: 700; line-height: 1.35; letter-spacing: -.035em; overflow-wrap: anywhere; }
.machine-state { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 4px; }
.machine-status { color: var(--status-color); font-size: 15px; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
.machine-time { display: inline-block; max-width: 100%; color: #53675b; background: #f0f4ef; border-radius: 7px; padding: 3px 5px; font-size: 13px; font-weight: 500; line-height: 1.5; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.empty-state { grid-column: 1 / -1; border: 1px dashed #ccd8cb; border-radius: 16px; background: #f9fbf8; padding: 22px 16px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.is-stale .overview { background: #ecefea; border-color: #d7ddd4; }
.is-stale .overview-number { color: #617264; }
.is-stale .machine-card { background: #f3f5f1; border-color: #dce2d8; --status-color: #657367; --status-tint: #e7ece4; }
.footer { padding-top: 18px; border-top: 1px solid var(--border); color: var(--muted); font-size: 12px; line-height: 1.8; }
.footer p + p { margin-top: 3px; }

@media (min-width: 600px) {
    .dashboard { padding-top: 40px; }
    .machine-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .overview-item { padding-left: 26px; }
}

@media (max-width: 350px) {
    .dashboard { padding-right: 12px; padding-left: 12px; }
    .machine-grid { gap: 10px; }
    .machine-card { padding: 14px 12px; }
    .overview-item { padding: 0 15px; }
    .overview-total { font-size: 16px; margin-left: 6px; }
}

@media (max-width: 389px) {
    .machine-illustration { width: 46px; height: 54px; border-radius: 15px; }
    .machine-icon { width: 42px; height: 46px; }
}
