:root {
  --orange: #ef6b35;
  --orange-dark: #d65323;
  --orange-soft: #fff2eb;
  --ink: #172235;
  --muted: #69778c;
  --subtle: #95a0b1;
  --line: #dfe5ed;
  --line-strong: #ccd5e1;
  --surface: #ffffff;
  --surface-soft: #f7f9fc;
  --background: #f2f5f8;
  --success: #17865f;
  --success-soft: #eaf8f2;
  --danger: #c94157;
  --danger-soft: #fff0f3;
  --warning: #a8640a;
  --warning-soft: #fff6df;
  --shadow: 0 16px 45px rgba(29, 42, 62, .1);
  --sidebar: 246px;
  color: var(--ink);
  background: var(--background);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { width: 100%; min-width: 320px; min-height: 100%; margin: 0; }
body { min-height: 100dvh; overflow-x: hidden; background: var(--background); }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid rgba(239, 107, 53, .25); outline-offset: 2px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 1000; display: flex; width: var(--sidebar); padding: 24px 18px;
  flex-direction: column; border-right: 1px solid var(--line); background: rgba(255, 255, 255, .97);
  box-shadow: 7px 0 32px rgba(30, 45, 65, .04);
}
.brand, .login-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { display: grid; width: 43px; height: 43px; flex: 0 0 43px; place-items: center; border-radius: 13px; color: #fff; background: linear-gradient(145deg, #fa8351, #df5929); box-shadow: 0 10px 24px rgba(225, 91, 43, .25); font-size: .75rem; font-weight: 850; letter-spacing: -.02em; }
.brand strong, .brand small, .login-brand strong, .login-brand small { display: block; }
.brand strong, .login-brand strong { color: #101a2b; font-size: .98rem; letter-spacing: -.02em; }
.brand small, .login-brand small { margin-top: 3px; color: var(--muted); font-size: .72rem; }
.main-nav { display: grid; gap: 6px; margin-top: 38px; }
.nav-link { display: flex; min-height: 44px; padding: 0 13px; align-items: center; gap: 11px; border: 1px solid transparent; border-radius: 11px; color: #657489; text-decoration: none; font-size: .89rem; font-weight: 680; transition: .18s ease; }
.nav-link span { width: 22px; color: #8b98a9; text-align: center; font-size: 1.13rem; }
.nav-link:hover { color: var(--ink); background: var(--surface-soft); }
.nav-link.active { color: var(--orange-dark); border-color: #f4c8b6; background: linear-gradient(100deg, #fff0e9, #fff9f6); box-shadow: inset 3px 0 var(--orange); }
.nav-link.active span { color: var(--orange); }
.sidebar-foot { display: grid; gap: 14px; margin-top: auto; padding: 16px 12px 2px; border-top: 1px solid var(--line); }
.connection-summary { display: flex; align-items: flex-start; gap: 9px; color: var(--muted); font-size: .76rem; line-height: 1.45; }
.status-dot { width: 9px; height: 9px; flex: 0 0 9px; margin-top: 4px; border-radius: 50%; background: #b9c1cc; box-shadow: 0 0 0 4px rgba(185, 193, 204, .14); }
.status-dot.online { background: var(--success); box-shadow: 0 0 0 4px rgba(23, 134, 95, .12); }
.status-dot.warning { background: #d59123; box-shadow: 0 0 0 4px rgba(213, 145, 35, .12); }
.text-button { width: max-content; padding: 0; border: 0; color: var(--orange-dark); background: none; cursor: pointer; font-size: .78rem; font-weight: 750; }

.app-shell { min-height: 100dvh; margin-left: var(--sidebar); }
.topbar { display: flex; min-height: 78px; padding: 13px clamp(18px, 2.5vw, 36px); align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .95); }
.page-heading { min-width: 0; }
.eyebrow { margin: 0 0 5px; color: var(--orange-dark); font-size: .69rem; font-weight: 850; letter-spacing: .13em; }
.page-heading h1 { margin: 0; color: #101a2b; font-size: clamp(1.22rem, 2vw, 1.5rem); line-height: 1.15; letter-spacing: -.035em; }
.top-actions { display: flex; align-items: center; gap: 16px; }
.sync-copy { display: grid; min-width: 125px; gap: 2px; color: var(--muted); text-align: right; font-size: .72rem; }
.sync-copy strong { color: #3e4b60; font-size: .76rem; }
.button { display: inline-flex; min-height: 41px; padding: 0 16px; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line-strong); border-radius: 10px; color: #415066; background: #fff; cursor: pointer; font-size: .84rem; font-weight: 750; text-decoration: none; transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease; }
.button:hover { border-color: #b8c3d1; background: #fafbfd; }
.button:active { transform: translateY(1px); }
.button:disabled { opacity: .55; cursor: wait; transform: none; }
.button.primary { border-color: var(--orange); color: #fff; background: linear-gradient(120deg, #f47743, #e25828); box-shadow: 0 9px 22px rgba(220, 82, 34, .23); }
.button.primary:hover { background: linear-gradient(120deg, #f57d49, #d94f20); }
.button.ghost { min-height: 36px; padding-inline: 12px; background: #fff; font-size: .78rem; }
.icon-button { display: grid; width: 37px; height: 37px; padding: 0; place-items: center; border: 1px solid var(--line); border-radius: 10px; color: #657489; background: #fff; cursor: pointer; font-size: 1.2rem; }
.mobile-menu-button { display: none; }
.main-content { min-height: calc(100dvh - 78px); }

/* Workspace hartă */
body[data-page="map"] .topbar { min-height: 68px; padding-block: 10px; }
body[data-page="map"] .main-content { min-height: calc(100dvh - 68px); }
.map-workspace { position: relative; height: calc(100dvh - 68px); min-height: 560px; overflow: hidden; background: #dce4ea; }
.orders-panel { position: absolute; z-index: 650; top: 16px; bottom: 16px; left: 16px; display: flex; width: 356px; min-width: 0; min-height: 0; padding: 19px 14px 10px; flex-direction: column; border: 1px solid rgba(201, 211, 223, .95); border-radius: 15px; background: rgba(255, 255, 255, .98); box-shadow: 0 16px 42px rgba(25, 39, 59, .18); backdrop-filter: blur(10px); }
.panel-head, .card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.panel-head h2, .card h2, .page-intro h2 { margin: 0; color: #142036; font-size: 1.15rem; letter-spacing: -.025em; }
.panel-head h2 { font-size: 1.25rem; }
.panel-subtitle { margin: 5px 0 0; color: var(--muted); font-size: .74rem; }
.panel-subtitle strong { color: var(--ink); }
.panel-close { display: none; }
.search-row { display: flex; gap: 0; margin-top: 15px; box-shadow: 0 5px 16px rgba(28, 42, 61, .08); }
input, select { min-width: 0; min-height: 41px; padding: 0 12px; border: 1px solid #d7dfe9; border-radius: 9px; color: var(--ink); background: #fbfcfe; font-size: .84rem; }
input::placeholder { color: #9aa5b4; }
input:focus, select:focus { border-color: #ec8a64; outline: 0; box-shadow: 0 0 0 3px rgba(239, 107, 53, .11); background: #fff; }
.search-row input { flex: 1; min-height: 43px; border-radius: 10px 0 0 10px; background: #fff; }
.search-button { min-width: 45px; padding: 0; border-color: var(--orange); border-radius: 0 10px 10px 0; color: #fff; background: var(--orange); font-size: 1.15rem; }
.search-button:hover { border-color: var(--orange-dark); color: #fff; background: var(--orange-dark); }
.filters { margin-top: 12px; border: 1px solid var(--line); border-radius: 11px; background: #fafbfd; }
.filters summary { display: flex; min-height: 39px; padding: 0 12px; align-items: center; justify-content: space-between; color: #4f5e73; cursor: pointer; font-size: .8rem; font-weight: 750; }
.filters summary::marker { color: var(--orange); }
.filters[open] summary { border-bottom: 1px solid var(--line); }
.filter-grid { display: grid; padding: 12px; grid-template-columns: 1fr 1fr; gap: 10px; }
label { display: grid; gap: 6px; }
label > span { color: #56657a; font-size: .77rem; font-weight: 720; }
.filter-grid input, .filter-grid select { width: 100%; min-height: 37px; padding-inline: 9px; font-size: .76rem; }
.filter-grid .wide { grid-column: 1 / -1; }
.reset-filters { margin: 0 12px 12px auto; }
.orders-summary { display: flex; min-height: 42px; padding: 0 2px; align-items: center; gap: 5px; color: var(--muted); font-size: .75rem; }
.orders-summary strong { color: var(--ink); }
.warning-count { margin-left: auto; color: var(--warning); font-weight: 700; }
.orders-list { display: grid; min-height: 0; margin-inline: -14px; padding: 0 4px 8px 14px; align-content: start; gap: 0; flex: 1; overflow-y: auto; scrollbar-gutter: stable; }
.order-item { display: grid; width: 100%; padding: 10px 10px 10px 4px; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 9px; border: 0; border-bottom: 1px solid #edf0f4; border-radius: 0; color: inherit; background: transparent; cursor: pointer; text-align: left; transition: .16s ease; }
.order-item:hover { background: #f7f9fc; }
.order-item.selected { background: #fff2eb; box-shadow: inset 3px 0 var(--orange); }
.order-marker-preview { display: grid; width: 32px; height: 32px; place-items: center; overflow: hidden; border-radius: 9px; background: #f2f5f8; }
.order-marker-preview img { display: block; max-width: 22px; max-height: 22px; object-fit: contain; }
.neutral-pin { display: grid; width: 18px; height: 22px; place-items: center; border: 2px solid #fff; border-radius: 50% 50% 50% 3px; color: #fff; background: #67768a; box-shadow: 0 2px 5px rgba(20, 33, 50, .25); transform: rotate(-45deg); }
.neutral-pin::after { content: "•"; transform: rotate(45deg); }
.order-copy { min-width: 0; }
.order-copy strong, .order-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-copy strong { color: #223049; font-size: .85rem; }
.order-copy span { margin-top: 4px; color: var(--muted); font-size: .74rem; }
.order-meta { display: grid; justify-items: end; gap: 5px; color: #718096; font-size: .69rem; white-space: nowrap; }
.mini-warning { padding: 3px 6px; border-radius: 99px; color: var(--warning); background: var(--warning-soft); font-size: .65rem; font-weight: 800; }
.empty-state { display: grid; min-height: 170px; padding: 28px; place-items: center; align-content: center; gap: 12px; color: var(--muted); text-align: center; }
.empty-state strong { font-size: .88rem; }
.empty-state p { max-width: 360px; margin: 0; font-size: .78rem; line-height: 1.55; }
.spinner { width: 27px; height: 27px; border: 3px solid #e4e9f0; border-top-color: var(--orange); border-radius: 50%; animation: spin .75s linear infinite; }
.spinner.small { width: 20px; height: 20px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }

.map-card { position: absolute; inset: 0; min-width: 0; min-height: 0; background: #dce4ea; }
.map { width: 100%; height: 100%; }
.leaflet-control-attribution { font-size: .66rem !important; }
.leaflet-popup-content-wrapper { border-radius: 12px; box-shadow: 0 10px 30px rgba(23, 34, 53, .18); }
.leaflet-popup-content { margin: 14px 16px; }
.order-popup { width: min(320px, calc(100vw - 80px)); color: var(--ink); }
.order-popup-scroll { max-height: min(460px, 62vh); padding-right: 4px; overflow-y: auto; scrollbar-gutter: stable; }
.order-popup-title { margin: 0 25px 11px 0; color: #17243a; font-size: 1rem; line-height: 1.3; }
.order-popup-status { display: flex; min-height: 40px; padding: 8px 10px; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); }
.order-popup-status img { display: block; max-width: 24px; max-height: 24px; object-fit: contain; }
.order-popup-status .neutral-pin { flex: 0 0 auto; transform: rotate(-45deg) scale(.82); }
.order-popup-status strong { color: #26354b; font-size: .8rem; }
.order-popup-fields { display: grid; margin-top: 10px; }
.order-popup-field { padding: 8px 1px; border-bottom: 1px solid #edf0f4; }
.order-popup-field:last-child { border-bottom: 0; }
.order-popup-field > span, .order-popup-field > strong, .order-popup-field > a { display: block; }
.order-popup-field > span { margin-bottom: 3px; color: var(--muted); font-size: .67rem; font-weight: 700; }
.order-popup-field > strong, .order-popup-field > a { overflow-wrap: anywhere; color: #27364d; font-size: .78rem; line-height: 1.42; text-decoration: none; white-space: pre-wrap; }
.order-popup-field > a { color: var(--orange-dark); font-weight: 760; }
.order-popup .warning-box { margin-top: 10px; }
.custom-map-icon { border: 0; background: transparent; }
.custom-map-icon img { display: block; filter: drop-shadow(0 3px 3px rgba(21, 31, 45, .3)); object-fit: contain; }
.map-neutral-pin { width: 20px; height: 25px; }
.map-tools { position: absolute; z-index: 500; top: 16px; right: 16px; display: flex; gap: 8px; }
.map-tool { min-height: 38px; padding-inline: 12px; box-shadow: 0 5px 18px rgba(28, 42, 61, .14); font-size: .75rem; }
#show-orders { display: none; }
.sync-banner { position: absolute; z-index: 510; right: 14px; bottom: 24px; display: flex; width: min(370px, calc(100% - 28px)); padding: 13px 15px; align-items: center; gap: 12px; border: 1px solid #f1bca6; border-radius: 12px; background: rgba(255, 255, 255, .97); box-shadow: var(--shadow); }
.sync-banner[hidden] { display: none; }
.sync-banner strong, .sync-banner span { display: block; }
.sync-banner strong { color: #2b374b; font-size: .79rem; }
.sync-banner span { margin-top: 3px; color: var(--muted); font-size: .71rem; }
.sync-banner.error { border-color: #efbdc6; }
.sync-banner.error .spinner { display: none; }
.sync-banner.error strong { color: var(--danger); }
.warning-box { padding: 11px 12px; border: 1px solid #edd8a8; border-radius: 10px; color: #7a5717; background: var(--warning-soft); font-size: .76rem; line-height: 1.5; }

/* Pagini secundare */
.content-page { max-width: 1220px; padding: 28px clamp(18px, 3vw, 42px) 60px; }
.page-intro { display: flex; margin-bottom: 20px; align-items: center; justify-content: space-between; gap: 18px; }
.page-intro p:not(.eyebrow), .card-copy { max-width: 680px; margin: 8px 0 0; color: var(--muted); font-size: .84rem; line-height: 1.6; }
.card, .table-card { border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 12px 35px rgba(31, 45, 63, .07); }
.table-card { overflow: hidden; }
.history-list { display: grid; }
.danger-outline { border-color: #efc1c9; color: var(--danger); background: #fff; }
.danger-outline:hover { border-color: #df8e9c; color: #a82d41; background: var(--danger-soft); }
.history-row { display: grid; padding: 17px 20px; grid-template-columns: 150px minmax(170px, 1.3fr) minmax(180px, 1fr) 90px; align-items: center; gap: 18px; border-bottom: 1px solid var(--line); }
.history-row:last-child { border-bottom: 0; }
.history-time strong, .history-main strong { display: block; color: #26354b; font-size: .82rem; }
.history-time span, .history-main span, .history-device { display: block; margin-top: 4px; color: var(--muted); font-size: .73rem; line-height: 1.4; }
.state-pill, .pill { display: inline-flex; width: max-content; padding: 5px 9px; align-items: center; border-radius: 99px; color: #56657a; background: #eef2f6; font-size: .68rem; font-weight: 800; }
.state-pill.succeeded { color: var(--success); background: var(--success-soft); }
.state-pill.failed { color: var(--danger); background: var(--danger-soft); }
.state-pill.leased, .state-pill.uploading, .state-pill.queued { color: var(--warning); background: var(--warning-soft); }
.attempt-details { grid-column: 1 / -1; padding: 10px 12px; border-radius: 9px; color: var(--muted); background: #f7f9fb; font-size: .72rem; line-height: 1.55; }
.attempt-details summary { cursor: pointer; font-weight: 750; }
.attempt-details ul { margin: 9px 0 0; padding-left: 18px; }

.settings-page { max-width: 1280px; }
.settings-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
.settings-card, .enrollment-card, .devices-card { padding: 24px; }
.pill { color: var(--orange-dark); background: var(--orange-soft); }
.settings-form { display: grid; gap: 17px; margin-top: 22px; }
.settings-form input { width: 100%; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; align-items: end; gap: 14px; }
.input-suffix { display: flex; align-items: center; }
.input-suffix input { border-radius: 9px 0 0 9px; }
.input-suffix b { display: grid; min-height: 41px; padding: 0 12px; place-items: center; border: 1px solid #d7dfe9; border-left: 0; border-radius: 0 9px 9px 0; color: var(--muted); background: #f4f6f9; font-size: .72rem; }
.switch-label { display: grid; min-height: 41px; padding: 0 12px; grid-template-columns: 1fr auto; align-items: center; border: 1px solid var(--line); border-radius: 9px; background: #fafbfd; cursor: pointer; }
.switch-label input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.switch-label i { position: relative; width: 36px; height: 20px; border-radius: 99px; background: #c8d0dc; transition: .16s ease; }
.switch-label i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(20, 31, 48, .22); transition: .16s ease; }
.switch-label input:checked + i { background: var(--orange); }
.switch-label input:checked + i::after { left: 19px; }
.form-actions { display: flex; min-height: 41px; align-items: center; justify-content: flex-end; gap: 12px; color: var(--success); font-size: .75rem; }
.enrollment-card h2 { margin-top: 0; }
.enrollment-card > p:not(.eyebrow) { color: var(--muted); font-size: .82rem; line-height: 1.65; }
.security-note { display: flex; margin-top: 20px; padding: 13px; align-items: flex-start; gap: 10px; border: 1px solid #efc6b5; border-radius: 11px; color: #7d4a34; background: #fff7f3; font-size: .75rem; line-height: 1.55; }
.security-note > span:first-child { color: var(--orange); font-size: 1.1rem; }
.devices-card { margin-top: 18px; }
.devices-list { display: grid; gap: 9px; margin-top: 18px; }
.device-row { display: grid; padding: 14px; grid-template-columns: minmax(190px, 1.15fr) minmax(160px, .8fr) minmax(210px, 1.1fr) auto; align-items: center; gap: 15px; border: 1px solid var(--line); border-radius: 11px; background: #fbfcfe; }
.device-identity { display: flex; min-width: 0; align-items: center; gap: 10px; }
.device-avatar { display: grid; width: 38px; height: 38px; flex: 0 0 38px; place-items: center; border-radius: 10px; color: var(--orange-dark); background: var(--orange-soft); font-weight: 850; }
.device-copy { min-width: 0; }
.device-copy strong { display: block; overflow: hidden; color: var(--ink); font-size: .82rem; text-overflow: ellipsis; white-space: nowrap; }
.device-copy span { display: block; margin-top: 4px; color: var(--muted); font-size: .7rem; }
.device-state { display: flex; flex-wrap: wrap; gap: 5px; }
.device-dates { color: var(--muted); font-size: .71rem; line-height: 1.5; }
.device-error { grid-column: 1 / -1; padding: 8px 10px; border-radius: 8px; color: var(--danger); background: var(--danger-soft); font-size: .72rem; }
.device-actions { display: flex; gap: 6px; }
.device-actions .button { min-height: 34px; padding: 0 10px; font-size: .7rem; }
.device-actions .danger { border-color: #efc1c9; color: var(--danger); background: #fff6f7; }
code { padding: 2px 5px; border-radius: 5px; color: #92502f; background: var(--orange-soft); font-size: .82em; }

/* Login */
.login-page { display: grid; min-height: 100dvh; padding: 38px 18px; place-items: center; background: radial-gradient(circle at 80% 0%, rgba(239, 107, 53, .11), transparent 29%), #f3f5f8; }
.login-shell { width: min(440px, 100%); }
.login-brand { width: max-content; margin: 0 auto 22px; }
.login-card { padding: 39px 34px 31px; border: 1px solid #d9e0e9; border-radius: 18px; background: #fff; box-shadow: 0 24px 55px rgba(28, 42, 62, .1); }
.login-card h1 { margin: 12px 0 8px; color: #101a2b; font-size: 1.8rem; letter-spacing: -.04em; }
.login-card > p:not(.eyebrow) { margin: 0 0 22px; color: var(--muted); font-size: .84rem; line-height: 1.55; }
.login-card form { display: grid; gap: 16px; }
.login-card input { width: 100%; min-height: 46px; }
.login-submit { width: 100%; margin-top: 4px; }
.form-error { margin: 0 0 17px; padding: 11px 12px; border: 1px solid #efc3cb; border-radius: 9px; color: var(--danger); background: var(--danger-soft); font-size: .78rem; }
.login-footnote { color: var(--muted); text-align: center; font-size: .7rem; }

.toast-region { position: fixed; z-index: 2000; right: 18px; bottom: 18px; display: grid; width: min(360px, calc(100% - 36px)); gap: 8px; pointer-events: none; }
.toast { padding: 13px 15px; border: 1px solid var(--line-strong); border-radius: 11px; color: #344258; background: rgba(255, 255, 255, .98); box-shadow: var(--shadow); font-size: .78rem; line-height: 1.45; animation: toast-in .2s ease; }
.toast.error { border-color: #edbac3; color: var(--danger); }
.toast.success { border-color: #b8dece; color: var(--success); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
.sidebar-backdrop { display: none; }

@media (max-width: 1050px) {
  :root { --sidebar: 224px; }
  .map-workspace { grid-template-columns: 350px minmax(0, 1fr); }
  .settings-grid { grid-template-columns: 1fr; }
  .device-row { grid-template-columns: minmax(190px, 1fr) minmax(150px, .75fr) auto; }
  .device-dates { grid-column: 1 / 3; }
}

@media (max-width: 820px) {
  .sidebar { width: min(285px, calc(100% - 42px)); transform: translateX(-105%); transition: transform .2s ease; }
  body.menu-open .sidebar { transform: translateX(0); }
  .sidebar-backdrop { position: fixed; inset: 0; z-index: 950; background: rgba(22, 32, 48, .28); backdrop-filter: blur(2px); }
  body.menu-open .sidebar-backdrop { display: block; }
  .app-shell { margin-left: 0; }
  .mobile-menu-button { display: grid; flex: 0 0 auto; }
  .page-heading { margin-right: auto; }
  .map-workspace { grid-template-columns: 1fr; }
  .orders-panel { position: absolute; inset: 0 auto 0 0; width: min(390px, 92%); border-right: 0; transform: translateX(-105%); transition: transform .2s ease; }
  .orders-panel.open { transform: translateX(0); }
  .panel-close { display: grid; }
  #show-orders { display: inline-flex; }
  .map-card { grid-column: 1; }
  .history-row { grid-template-columns: 130px 1fr 85px; }
  .history-device { grid-column: 2; }
  .attempt-details { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  .topbar { min-height: 70px; padding: 10px 13px; gap: 10px; }
  .page-heading .eyebrow { display: none; }
  .page-heading h1 { font-size: 1.05rem; }
  .sync-copy { display: none; }
  .sync-button { min-height: 39px; padding: 0 11px; font-size: .76rem; }
  .main-content { min-height: calc(100dvh - 70px); }
  .map-workspace { height: calc(100dvh - 70px); min-height: 480px; }
  .map-tools { top: 10px; right: 10px; left: 10px; justify-content: space-between; }
  .map-tool { min-height: 37px; padding: 0 10px; }
  .sync-banner { right: 10px; bottom: 18px; width: calc(100% - 20px); }
  .content-page { padding: 20px 13px 45px; }
  .page-intro { align-items: stretch; flex-direction: column; }
  .page-intro .button { width: 100%; }
  .settings-card, .enrollment-card, .devices-card { padding: 18px; }
  .form-row { grid-template-columns: 1fr; }
  .form-actions { flex-direction: column; align-items: stretch; }
  .history-row { padding: 14px; grid-template-columns: 1fr auto; gap: 10px; }
  .history-device { grid-column: 1; }
  .device-row { grid-template-columns: 1fr; }
  .device-dates, .device-error { grid-column: 1; }
  .device-actions .button { flex: 1; }
  .login-card { padding: 32px 23px 26px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
