:root {
  color-scheme: dark;
  --green: #2dbe64;
  --green-bright: #46d47a;
  --green-soft: rgba(45, 190, 100, 0.14);
  --page: #0c0f0d;
  --surface: #141815;
  --surface-2: #1a201c;
  --line: #283129;
  --text: #f6f8f6;
  --muted: #929b94;
  --danger: #ff7373;
  --warning: #f1c75b;
}

* { box-sizing: border-box; }
html { background: var(--page); }
body { min-width: 320px; min-height: 100vh; min-height: 100dvh; margin: 0; background: var(--page); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button { color: inherit; cursor: pointer; }
input, select, textarea { color: var(--text); }
[hidden] { display: none !important; }
.booting #auth-screen, .booting #app-shell { display: none !important; }
.boot-splash { display: none; }
.booting .boot-splash { min-height: 100dvh; display: grid; place-items: center; color: var(--text); font-size: 23px; font-weight: 900; letter-spacing: -.04em; }
.boot-splash b { color: var(--green); }

.auth-screen { min-height: 100dvh; display: grid; place-items: center; padding: max(24px, env(safe-area-inset-top)) 18px max(24px, env(safe-area-inset-bottom)); }
.auth-card { width: min(100%, 420px); padding: 24px 20px 22px; border: 1px solid var(--line); border-radius: 26px; background: linear-gradient(155deg, #171c18, #101411); box-shadow: 0 24px 80px #0008; }
.eyebrow { margin: 0 0 6px; color: var(--green-bright); font-size: 11px; font-weight: 800; letter-spacing: .14em; }
.auth-card h1 { margin: 0 0 27px; font-size: clamp(30px, 9vw, 42px); letter-spacing: -.055em; line-height: 1; }
.auth-card h1 b { color: var(--green); }
.auth-lead { margin: 9px 0 25px; color: var(--muted); font-size: 15px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 13px; background: #090c0a; }
.auth-tabs button { min-height: 42px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-size: 14px; font-weight: 750; }
.auth-tabs button.is-active { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.auth-form { display: grid; gap: 15px; margin-top: 20px; }
.auth-form label { display: grid; gap: 7px; }
.auth-form label > span { color: #b7beb8; font-size: 12px; font-weight: 700; }
.auth-form input { width: 100%; min-width: 0; border: 1px solid var(--line); outline: 0; background: #0d110e; color: var(--text); }
.auth-form input { height: 49px; padding: 0 14px; border-radius: 13px; font-size: 16px; }
.auth-form input:focus, .modal input:focus, .modal select:focus, .modal textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(45,190,100,.1); }
.name-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.primary-button { min-height: 50px; margin-top: 4px; border: 0; border-radius: 14px; background: var(--green); color: #07120a; font-weight: 850; }
.primary-button:disabled { opacity: .55; cursor: wait; }
.form-hint { margin: -2px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.form-message { min-height: 18px; margin: 13px 2px 0; color: var(--danger); font-size: 13px; line-height: 1.4; }
.form-message.is-success { color: var(--green-bright); }

.app-shell { min-height: 100dvh; }
.topbar { --brand-size: 16px; position: sticky; z-index: 20; top: 0; height: calc(58px + env(safe-area-inset-top)); display: flex; align-items: center; gap: 8px; padding: env(safe-area-inset-top) 14px 0; border-bottom: 1px solid rgba(255,255,255,.06); background: rgba(12,15,13,.88); backdrop-filter: blur(18px); }
.offline-badge { align-self: center; padding: 7px 9px; border-radius: 9px; background: #3a2e12; color: var(--warning); font-size: 11px; font-weight: 850; }
.menu-button, .brand-button, .round-button { border: 0; background: transparent; }
.menu-button { width: 42px; height: 42px; flex: 0 0 42px; display: grid; place-content: center; gap: 5px; padding: 0; border-radius: 12px; }
.menu-button span { width: 19px; height: 2px; display: block; border-radius: 2px; background: var(--text); }
.brand-button { height: 42px; flex: 0 0 auto; display: flex; align-items: center; gap: 5px; padding: 0 2px; white-space: nowrap; font-size: var(--brand-size); font-weight: 900; line-height: 1; letter-spacing: -.03em; }
.brand-divider { width: 6px; flex: 0 0 6px; color: var(--green); font-size: var(--brand-size); font-weight: 900; line-height: 1; letter-spacing: -.03em; text-align: center; }
.header-page-title { min-width: 0; flex: 1 1 auto; margin-left: 0; overflow: hidden; color: var(--text); font-size: var(--brand-size); font-weight: 900; line-height: 1; letter-spacing: -.03em; text-overflow: ellipsis; white-space: nowrap; }
.offline-badge { margin-left: auto; }
.page { width: min(100%, 760px); min-height: calc(100dvh - 58px); margin: 0 auto; padding: 32px 18px max(36px, calc(env(safe-area-inset-bottom) + 20px)); }
.page-home { padding-top: 18px; background: var(--page); }
.data-freshness-widget { max-width: 580px; margin: 0 0 13px; padding: 12px 14px; border: 1px solid rgba(241,199,91,.5); border-radius: 15px; background: rgba(241,199,91,.1); color: #ffd46d; font-size: 13px; font-weight: 800; line-height: 1.4; }
.weather-widget { max-width: 580px; padding: 15px 12px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); }
.weather-widget-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 2px 12px; }
.weather-widget-head strong { font-size: 15px; }
.weather-widget-head small { color: var(--muted); font-size: 10px; }
.weather-widget .content-message { margin: 5px 2px; }
.weather-slots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; align-items: stretch; }
.weather-slot { display: grid; grid-template-rows: 17px 31px 28px minmax(26px, 1fr); justify-items: center; align-items: center; gap: 3px; min-height: 120px; padding: 9px 3px; border: 1px solid var(--line); border-radius: 12px; background: #0f1410; text-align: center; }
.weather-slot time { color: var(--muted); font-size: 11px; font-weight: 800; white-space: nowrap; }
.weather-slot .weather-icon { font-size: 25px; line-height: 1.1; }
.weather-slot strong { font-size: 19px; line-height: 1; }
.weather-slot small { color: var(--muted); font-size: 10px; line-height: 1.2; }
.page-heading h1 { margin: 0; font-size: clamp(34px, 10vw, 54px); line-height: 1; letter-spacing: -.055em; }
.search-box { height: 50px; display: flex; align-items: center; gap: 10px; margin-top: 0; padding: 0 14px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.search-box > span { color: var(--green-bright); font-size: 22px; }
.search-box input { width: 100%; min-width: 0; height: 46px; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 16px; }
.people-list { display: grid; gap: 10px; margin-top: 17px; }
.person-card { display: block; min-height: 76px; padding: 14px 15px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.person-card > div { min-width: 0; display: grid; gap: 5px; }
.person-card .person-details { flex: 1 1 auto; }
.person-card strong { font-size: 16px; overflow-wrap: anywhere; }
.person-card span { color: var(--muted); font-size: 13px; }
.person-name-row { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.person-card .person-contact-row { min-width: 0; display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.person-card .person-contact-info { min-width: 0; display: grid; justify-items: start; gap: 5px; }
.person-card .active-tag { width: fit-content; justify-self: start; padding: 3px 6px; border: 1px solid rgba(241,199,91,.68); border-radius: 6px; color: var(--warning); font-size: 10px; font-weight: 850; line-height: 1; }
.phone-copy { width: fit-content; max-width: 100%; padding: 0; border: 0; background: transparent; color: var(--green-bright); font-size: 13px; line-height: 1.35; text-align: left; overflow-wrap: anywhere; }
.phone-copy.is-copied { color: var(--text); }
.person-phone-missing { color: var(--muted); font-size: 13px; }
.person-actions { flex: 0 0 auto; display: flex !important; align-items: center; gap: 5px !important; margin-left: auto; }
.call-button { flex: 0 0 auto; display: grid; place-items: center; min-height: 39px; padding: 0 11px; border: 1px solid rgba(45,190,100,.4); border-radius: 11px; background: var(--green-soft); color: var(--green-bright); font-size: 12px; font-weight: 800; text-decoration: none; }
#page-help { padding-top: 16px; }
.contact-section { margin-top: 18px; }
.contact-section:first-child { margin-top: 0; }
.contact-section h2 { margin: 0; font-size: 19px; }
.contact-section .people-list { margin-top: 12px; }
body.chat-page-active { height: var(--chat-viewport-height, 100dvh); overflow: hidden; }
.chat-page-active .app-shell { height: var(--chat-viewport-height, 100dvh); overflow: hidden; }
.page-chat { position: fixed; z-index: 5; top: calc(var(--chat-viewport-top, 0px) + 58px + env(safe-area-inset-top)); left: 50%; width: min(100%, 760px); height: calc(var(--chat-viewport-height, 100dvh) - 58px - env(safe-area-inset-top)); min-height: 0; display: flex; flex-direction: column; margin: 0; padding-top: 12px; padding-bottom: max(10px, env(safe-area-inset-bottom)); overflow: hidden; background: var(--page); transform: translateX(-50%); }
.chat-list-view, .chat-thread-view { min-height: 0; flex: 1 1 auto; }
.chat-list-view { overflow-y: auto; }
.chat-thread-view { display: flex; flex-direction: column; }
.chat-search { margin-bottom: 12px; }
.chat-conversation-list, .chat-people-list { display: grid; gap: 7px; }
.conversation-card { width: 100%; min-height: 69px; display: flex; align-items: center; gap: 11px; padding: 10px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); text-align: left; }
.conversation-emblem { width: 43px; height: 43px; flex: 0 0 43px; display: grid; place-items: center; border-radius: 50%; background: #273229; color: var(--green-bright); font-size: 21px; font-weight: 900; }
.conversation-emblem.is-pinned { background: var(--green-soft); }
.conversation-main { min-width: 0; flex: 1; display: grid; gap: 4px; }
.conversation-main strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.conversation-main small { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.conversation-side { min-width: 25px; align-self: stretch; display: grid; align-content: space-between; justify-items: end; }
.conversation-side time { color: var(--muted); font-size: 10px; }
.conversation-unread { color: var(--green-bright); font-size: 16px; font-style: normal; line-height: 1; }
.chat-thread-head { min-height: 46px; display: flex; align-items: center; gap: 9px; border-bottom: 1px solid var(--line); }
.chat-thread-head button { width: 36px; height: 36px; border: 0; border-radius: 10px; background: var(--surface); color: var(--green-bright); font-size: 28px; line-height: 1; }
.chat-thread-head strong { min-width: 0; overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.chat-thread-head span { margin-left: auto; color: var(--muted); font-size: 11px; white-space: nowrap; }
.chat-day-separator { justify-self: center; margin: 8px 0 3px; padding: 5px 10px; border-radius: 20px; background: #253027; color: #dce8de; font-size: 11px; font-weight: 800; }
.chat-bubble img { cursor: zoom-in; }
.open-media-button { margin-top: 7px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); color: var(--green-bright); font-size: 12px; }
.chat-media-viewer { position: fixed; z-index: 90; inset: 0; display: grid; place-items: center; padding: 54px 12px 16px; background: rgba(0,0,0,.94); }
.chat-media-viewer > button { position: absolute; top: max(10px, env(safe-area-inset-top)); right: 12px; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); font-size: 25px; }
.chat-media-viewer img, .chat-media-viewer video { max-width: 100%; max-height: calc(100dvh - 80px); object-fit: contain; }
.chat-media-viewer > div { max-width: 100%; max-height: 100%; }
.chat-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; flex: 0 0 auto; margin-top: 0; padding: 4px; border-radius: 14px; background: #090c0a; }
.chat-tabs button { min-height: 42px; border: 0; border-radius: 11px; background: transparent; color: var(--muted); font-size: 14px; font-weight: 800; }
.chat-tabs button.is-active { background: var(--surface-2); color: var(--text); }
.chat-tabs button span { color: var(--green); }
.load-older { width: fit-content; min-height: 35px; margin-top: 12px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--muted); font-size: 12px; }
.chat-messages { display: grid; align-content: start; gap: 10px; flex: 1 1 auto; min-height: 0; margin-top: 13px; padding: 2px 0 10px; overflow-y: auto; }
.chat-bubble { width: fit-content; max-width: min(90%, 540px); justify-self: start; padding: 12px 13px; border: 1px solid var(--line); border-radius: 15px 15px 15px 4px; background: var(--surface); }
.chat-bubble.is-own { justify-self: end; margin-left: auto; border-color: rgba(45,190,100,.28); border-radius: 15px 15px 4px 15px; background: #17251a; }
.chat-bubble-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 7px; }
.chat-bubble-head strong { font-size: 13px; }
.chat-bubble-head small { color: var(--green-bright); font-size: 11px; }
.chat-bubble p { margin: 7px 0; font-size: 14px; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-bubble img, .chat-bubble video { display: block; max-width: 100%; max-height: 310px; margin-top: 9px; border-radius: 9px; }
.chat-bubble time { display: block; margin-top: 7px; color: var(--muted); font-size: 10px; text-align: right; }
.chat-composer { display: grid; grid-template-columns: minmax(0, 1fr) 42px 42px; gap: 7px; align-items: end; flex: 0 0 auto; margin-top: 8px; padding: 8px; border: 1px solid var(--line); border-radius: 15px; background: #101411; }
.chat-composer textarea { min-width: 0; min-height: 44px; max-height: 96px; padding: 10px; border: 0; outline: 0; resize: none; background: transparent; color: var(--text); font-size: 16px; }

.return-form { display: grid; gap: 12px; max-width: 580px; }
.return-form label { display: grid; gap: 7px; }
.return-form label > span { color: #b7beb8; font-size: 12px; font-weight: 700; }
.return-form input, .return-form textarea { width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 13px; outline: 0; background: #0d110e; color: var(--text); }
.return-form input:not([type=file]) { height: 49px; padding: 0 14px; font-size: 16px; }
.return-form textarea { min-height: 112px; padding: 12px 14px; resize: vertical; font-size: 16px; }
.return-form input:focus, .return-form textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(45,190,100,.1); }
.return-photo { cursor: pointer; }
.return-photo-picker { min-height: 86px; display: grid; place-content: center; gap: 6px; padding: 14px; border: 1px dashed #48504a; border-radius: 13px; background: #202522; text-align: center; transition: border-color .16s ease, background .16s ease; }
.return-photo-picker strong { color: #e7ebe7; font-size: 14px; }
.return-photo-picker small { color: var(--muted); font-size: 11px; font-weight: 600; line-height: 1.35; }
.return-photo:hover .return-photo-picker, .return-photo:focus-within .return-photo-picker, .return-photo-picker.has-file { border-color: rgba(45,190,100,.62); background: #202b23; }
.return-form .form-hint { margin-top: 0; }
.return-form .form-message { margin: 0; min-height: 0; }
.return-form .form-message:empty { display: none; }
.return-form .primary-button { margin-top: 0; }
.chat-composer .primary-action { min-height: 42px; padding: 0 10px; border-radius: 10px; font-size: 12px; font-weight: 850; }
.chat-composer .primary-action:disabled { opacity: .55; }
.chat-composer .send-button { display: grid; place-items: center; width: 42px; min-height: 42px; padding: 0; }
.send-button svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.attach-button { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 10px; font-size: 26px; cursor: pointer; }
.chat-file-name { grid-column: 1 / -1; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.notification-setup { position: fixed; z-index: 45; right: 14px; bottom: max(14px, env(safe-area-inset-bottom)); left: 14px; max-width: 430px; margin: 0 auto; padding: 16px; border: 1px solid rgba(45,190,100,.4); border-radius: 17px; background: #18221a; box-shadow: 0 18px 55px #000b; }
.notification-setup strong { font-size: 16px; }
.notification-setup p { margin: 8px 0 12px; color: var(--muted); font-size: 13px; line-height: 1.4; }
.notification-setup .notification-setup-error { color: var(--danger); }
.notification-setup > div { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.notification-setup.is-info > div { grid-template-columns: 1fr; }
.notification-setup button { min-height: 42px; margin: 0; border-radius: 10px; }
.zone-tabs { display: flex; gap: 7px; margin: 0 -18px 0; padding: 0 18px 4px; overflow-x: auto; scrollbar-width: none; }
.zone-tabs::-webkit-scrollbar { display: none; }
.zone-tabs button { min-height: 42px; flex: 0 0 auto; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--muted); font-size: 13px; font-weight: 800; }
.zone-tabs button.is-active { border-color: rgba(45,190,100,.48); background: var(--green-soft); color: var(--green-bright); }
.domophone-list { display: grid; gap: 10px; margin-top: 18px; }
.address-group { overflow: hidden; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); transition: border-color .2s ease; }
.address-group.is-open { border-color: rgba(45,190,100,.36); }
.address-toggle { width: 100%; min-height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 16px; border: 0; background: transparent; text-align: left; }
.address-heading { min-width: 0; display: block; }
.address-heading strong { font-size: 16px; line-height: 1.25; }
.address-arrow { position: relative; width: 31px; height: 31px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: #0c100d; transition: transform .2s ease; }
.address-arrow::before { width: 7px; height: 7px; margin-top: -4px; border-right: 2px solid var(--green-bright); border-bottom: 2px solid var(--green-bright); content: ""; transform: rotate(45deg); }
.address-toggle[aria-expanded="true"] .address-arrow { transform: rotate(180deg); }
.address-panel { display: grid; border-top: 1px solid var(--line); }
.domophone-entry { padding: 16px; border-bottom: 1px solid rgba(255,255,255,.06); background: #111512; }
.domophone-entry:last-child { border-bottom: 0; }
.domophone-entry h2 { margin: 0 0 9px; color: #c9d0ca; font-size: 13px; line-height: 1.25; }
.code-row { display: flex; align-items: center; gap: 12px; }
.code-row code { color: var(--green-bright); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 21px; font-weight: 850; letter-spacing: .04em; overflow-wrap: anywhere; }
.domophone-entry.needs-check { box-shadow: inset 3px 0 0 var(--warning); }
.domophone-note { margin: 13px 0 0; color: #bcc3bd; font-size: 13px; line-height: 1.45; }
.content-message { min-height: 0; margin-top: 14px; color: var(--muted); font-size: 13px; }
.content-message:empty { display: none; }
.domophone-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 22px; }
.domophone-actions button { min-height: 50px; padding: 0 12px; border-radius: 14px; font-size: 13px; font-weight: 850; }
.page-schedule { width: min(100%, 920px); padding-top: 18px; }
.schedule-head { display: grid; gap: 4px; margin-bottom: 14px; }
.schedule-head strong { font-size: 18px; }
.schedule-head small { color: var(--muted); font-size: 12px; }
.schedule-list { display: grid; gap: 11px; margin-top: 16px; }
.schedule-card { min-width: 0; overflow: hidden; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.schedule-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.schedule-card-head strong { min-width: 0; font-size: 15px; overflow-wrap: anywhere; }
.schedule-card-head a { flex: 0 0 auto; color: var(--green-bright); font-size: 11px; text-decoration: none; }
.schedule-week-strip { display: grid; grid-template-columns: repeat(7, minmax(68px, 1fr)); gap: 5px; overflow-x: auto; padding-bottom: 3px; scrollbar-width: thin; }
.schedule-day { min-height: 72px; display: grid; align-content: center; justify-items: center; gap: 7px; padding: 7px 4px; border: 1px solid var(--line); border-radius: 10px; background: #0f1410; text-align: center; }
.schedule-day small { color: var(--muted); font-size: 10px; font-weight: 850; }
.schedule-day span { font-size: 11px; font-weight: 800; line-height: 1.2; white-space: pre-line; }
.schedule-day.is-work { border-color: rgba(45,190,100,.42); background: rgba(45,190,100,.1); }
.schedule-day.is-off { border-color: rgba(241,199,91,.52); background: rgba(241,199,91,.1); color: #ffe08b; }
.schedule-day.is-leave { border-color: rgba(83,190,222,.52); background: rgba(83,190,222,.1); color: #9ee8ff; }
.schedule-day.is-absence { border-color: rgba(255,115,115,.55); background: rgba(255,115,115,.1); color: #ffaaaa; }
.schedule-day.is-note { border-color: #455047; }
.schedule-note { margin: 10px 0 0; color: var(--muted); font-size: 11px; line-height: 1.4; }
.stats-page { padding-bottom: max(30px, env(safe-area-inset-bottom)); }
.stats-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.stats-controls label { display: grid; gap: 6px; min-width: 0; color: var(--muted); font-size: 12px; font-weight: 700; }
.stats-controls .stats-wide { grid-column: 1 / -1; }
.stats-controls input, .stats-controls select { width: 100%; min-width: 0; height: 43px; padding: 0 11px; border: 1px solid var(--line); border-radius: 11px; outline: 0; background: var(--surface); color: var(--text); font-size: 14px; }
.stats-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 15px; }
#orders-summary .stat-card:last-child { grid-column: 1 / -1; }
.stat-card { display: grid; gap: 5px; padding: 13px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.stat-card strong { color: var(--green-bright); font-size: 24px; line-height: 1; }
.stat-card span { color: var(--muted); font-size: 12px; }
.stats-chart { display: flex; align-items: end; gap: 7px; min-height: 154px; margin-top: 15px; padding: 10px 8px 6px; overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.stat-bar-column { height: 130px; min-width: 34px; flex: 1 0 34px; display: flex; flex-direction: column; align-items: center; justify-content: end; gap: 4px; }
.stat-bar-column strong { color: var(--text); font-size: 10px; white-space: nowrap; }
.stat-bar-column .stat-bar { width: min(100%, 22px); min-height: 3px; max-height: 96px; border-radius: 5px 5px 2px 2px; background: var(--green); }
.stat-bar-column span { color: var(--muted); font-size: 10px; white-space: nowrap; }
.stats-list { display: grid; gap: 8px; margin-top: 15px; }
.stats-export { min-height: 36px; margin-top: 12px; padding: 0 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--green-bright); font-size: 12px; font-weight: 800; }
.stats-row, .complaint-row { padding: 12px 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.stats-row { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.stats-row strong { font-size: 13px; overflow-wrap: anywhere; }
.stats-row span { color: var(--muted); font-size: 12px; text-align: right; white-space: nowrap; }
.complaint-row summary { font-size: 13px; font-weight: 800; cursor: pointer; }
.complaint-row small { display: block; margin-top: 8px; color: var(--green-bright); font-size: 11px; }
.complaint-row p { margin: 11px 0 0; color: var(--text); font-size: 13px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.complaint-row .complaint-response { color: var(--muted); }
.statistics-style-original .stats-page { width: min(100%, 1180px); }
.statistics-style-original .stats-controls { padding: 16px; border: 1px solid #2a342a; border-radius: 8px; background: #141914; box-shadow: 0 20px 60px rgba(0,0,0,.2); }
.statistics-style-original .stats-controls label { color: #a9b5a6; }
.statistics-style-original .stats-controls input,
.statistics-style-original .stats-controls select { height: 44px; border-color: #3d4d3c; border-radius: 8px; background-color: #0f140f; }
.statistics-style-original .stats-summary { gap: 12px; margin-top: 16px; }
.statistics-style-original .stat-card { min-height: 96px; align-content: center; gap: 10px; padding: 18px; border-color: #2a342a; border-radius: 8px; background: #141914; }
.statistics-style-original .stat-card strong { order: 2; color: #f1f5ed; font-size: 30px; }
.statistics-style-original .stat-card span { order: 1; color: #a9b5a6; font-size: 13px; }
.statistics-style-original .stats-chart { min-height: 210px; gap: 10px; margin-top: 16px; padding: 20px 14px 10px; border-color: #2a342a; border-radius: 8px; background: #141914; box-shadow: 0 20px 60px rgba(0,0,0,.2); }
.statistics-style-original .stat-bar-column { height: 170px; min-width: 42px; flex-basis: 42px; }
.statistics-style-original .stat-bar-column .stat-bar { width: min(100%, 28px); max-height: 130px; border-radius: 3px 3px 0 0; background: #83d65c; }
.statistics-style-original .stats-export { min-height: 40px; border-color: #3d4d3c; border-radius: 8px; background: #101510; color: #b6f082; }
.statistics-style-original .stats-list { gap: 8px; margin-top: 16px; }
.statistics-style-original .stats-row,
.statistics-style-original .complaint-row { padding: 14px 16px; border-color: #2a342a; border-radius: 8px; background: #101510; }
.statistics-style-original .stats-row strong { color: #d7ead2; }
.statistics-style-original .complaint-row small { color: #b6f082; }
.secondary-action { border: 1px solid var(--line); background: var(--surface); color: #d8ddd8; }
.primary-action { border: 0; background: var(--green); color: #07120a; }

.modal-open { overflow: hidden; }
.modal-backdrop { position: fixed; z-index: 60; inset: 0; display: grid; place-items: end center; padding-top: 20px; background: rgba(0,0,0,.72); backdrop-filter: blur(4px); }
.modal { width: min(100%, 520px); max-height: calc(100dvh - 20px); overflow-y: auto; padding: 22px 18px max(24px, calc(env(safe-area-inset-bottom) + 12px)); border: 1px solid var(--line); border-bottom: 0; border-radius: 24px 24px 0 0; background: #111512; box-shadow: 0 -20px 70px #0009; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.modal-head h2 { margin: 0; font-size: 25px; letter-spacing: -.04em; }
.modal-close { width: 39px; height: 39px; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--muted); font-size: 24px; }
.modal form { display: grid; gap: 15px; }
.modal .form-message:empty { display: none; }
.modal .form-message { min-height: 0; margin: 0; }
.modal .modal-hint + .primary-button { margin-top: 0; }
#report-modal .modal-head, #add-code-modal .modal-head { margin-bottom: 14px; }
#report-modal .modal form, #add-code-modal .modal form { gap: 11px; }
.modal label { display: grid; gap: 7px; }
.modal label > span { color: #b7beb8; font-size: 12px; font-weight: 700; }
.modal input, .modal select, .modal textarea { width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 13px; outline: 0; background: #0d110e; }
.modal input, .modal select { height: 49px; padding: 0 34px 0 13px; }
.modal select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2346d47a' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-position: right 14px center; background-repeat: no-repeat; }
.modal textarea { min-height: 86px; padding: 12px 13px; resize: vertical; }
.modal-hint { margin: -2px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }

.menu-backdrop { position: fixed; z-index: 39; inset: 0; background: rgba(0,0,0,.62); backdrop-filter: blur(3px); }
.drawer { position: fixed; z-index: 40; inset: 0 auto 0 0; width: min(86vw, 340px); display: flex; flex-direction: column; padding: max(22px, calc(env(safe-area-inset-top) + 12px)) 16px max(22px, calc(env(safe-area-inset-bottom) + 12px)); border-right: 1px solid var(--line); background: #101411; box-shadow: 24px 0 60px #0009; transform: translateX(-105%); transition: transform .24s ease; }
.drawer.is-open { transform: translateX(0); }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 5px 4px 23px; }
.drawer-head strong { font-size: 20px; }
.round-button { position: relative; width: 38px; height: 38px; flex: 0 0 auto; padding: 0; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); }
.round-button::before, .round-button::after { position: absolute; top: 50%; left: 50%; width: 14px; height: 2px; border-radius: 2px; background: currentColor; content: ""; transform-origin: center; }
.round-button::before { transform: translate(-50%, -50%) rotate(45deg); }
.round-button::after { transform: translate(-50%, -50%) rotate(-45deg); }
.drawer-nav { min-height: 0; flex: 1 1 auto; display: grid; align-content: start; gap: 3px; overflow-y: auto; overscroll-behavior: contain; padding-bottom: 12px; }
.drawer-nav button { display: grid; gap: 3px; padding: 11px 15px; border: 1px solid transparent; border-radius: 14px; background: transparent; text-align: left; }
.drawer-nav button span { font-size: 16px; font-weight: 800; }
.drawer-nav button i { color: var(--muted); font-size: 12px; font-style: normal; }
.drawer-nav button.is-active { border-color: rgba(45,190,100,.32); background: var(--green-soft); }
.drawer-spacer { flex: 0 0 12px; }
.install-button, .logout-button { min-height: 46px; border-radius: 13px; font-weight: 750; }
.install-button { margin-bottom: 8px; border: 0; background: var(--green); color: #07120a; }
.logout-button { border: 1px solid var(--line); background: transparent; color: var(--muted); }
.settings-modal { display: grid; gap: 16px; }
.settings-modal .modal-head { margin-bottom: 0; }
.settings-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.settings-row > div { min-width: 0; flex: 1; }
.settings-row strong { font-size: 14px; }
.settings-row p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.settings-row button { min-height: 38px; padding: 0 10px; border-radius: 9px; font-size: 12px; font-weight: 800; }
.settings-switch { position: relative; width: 48px; height: 28px; flex: 0 0 48px; cursor: pointer; }
.settings-switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.settings-switch i { position: absolute; inset: 0; border: 1px solid var(--line); border-radius: 999px; background: #0b0f0c; transition: border-color .16s ease, background .16s ease; }
.settings-switch i::after { position: absolute; top: 4px; left: 4px; width: 18px; height: 18px; border-radius: 50%; background: var(--muted); content: ""; transition: transform .16s ease, background .16s ease; }
.settings-switch input:checked + i { border-color: rgba(45,190,100,.6); background: var(--green-soft); }
.settings-switch input:checked + i::after { transform: translateX(20px); background: var(--green-bright); }
.settings-switch input:focus-visible + i { box-shadow: 0 0 0 3px rgba(45,190,100,.16); }
.settings-version { margin: 0 2px; color: var(--muted); font-size: 12px; }
.settings-version strong { color: var(--text); }
.settings-logout { min-height: 44px; border: 1px solid rgba(255,115,115,.34); border-radius: 11px; background: rgba(255,115,115,.08); color: #ffaaaa; font-weight: 800; }

@media (max-width: 370px) { .auth-card { padding-inline: 16px; border-radius: 22px; } .name-grid { grid-template-columns: 1fr; } .page { padding-inline: 14px; } }
@media (max-width: 400px) { .topbar { --brand-size: 14px; gap: 5px; padding-inline: 9px; } .menu-button { width: 36px; flex-basis: 36px; } .offline-badge { font-size: 10px; padding: 6px; } .person-card { flex-wrap: wrap; } }
@media (min-width: 700px) { .auth-card { padding: 30px; } .page { padding-top: 48px; } .modal-backdrop { place-items: center; padding: 24px; } .modal { max-height: calc(100dvh - 48px); border-bottom: 1px solid var(--line); border-radius: 24px; } }
@media (min-width: 900px) {
  .admin-preview .page:not(.page-chat) { width: min(100%, 1180px); }
  .admin-preview #page-couriers .people-list, .admin-preview #page-domophones .domophone-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-preview #page-help { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  .admin-preview #page-help .contact-section { margin-top: 0; }
  .admin-preview .page-chat { width: min(100%, 980px); }
}
.admin-preview #settings-button, .admin-preview #install-button, .admin-preview .notification-setup { display: none !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; } }
