:root { color-scheme:light; --ink:#17362e; --muted:#657970; --line:#dbe5df; --paper:#fff; --canvas:#f1f5f1; --green:#164b3c; --green-2:#2f755d; --mint:#e2f2e7; --sun:#eead3d; --ir:#c9772d; --rf:#26705b; --benito:#315a8a; }
* { box-sizing:border-box; }
html,body { width:100%; max-width:100%; overflow-x:clip; }
body { margin:0; font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif; color:var(--ink); background:var(--canvas); }
button,input,textarea,select { font:inherit; }button { cursor:pointer; }
[hidden] { display:none!important; }
.login-screen { min-height:100vh; display:grid; grid-template-columns:minmax(560px,1.85fr) minmax(380px,1fr); background:var(--paper); }
.login-brand-panel { position:relative; min-height:100vh; display:flex; flex-direction:column; justify-content:space-between; overflow:hidden; padding:42px clamp(42px,5vw,88px) 64px; color:white; background:linear-gradient(145deg,#092b24 0%,#164b3c 52%,#2b755d 100%); }
.login-brand-panel::after { content:""; position:absolute; width:58vw; height:58vw; right:-30vw; bottom:-37vw; border:1px solid #d6e9df2e; border-radius:50%; box-shadow:0 0 0 72px #d6e9df0d,0 0 0 144px #d6e9df0a; }
.login-brand { position:relative; z-index:2; display:flex; align-items:center; gap:15px; }.login-brand-mark { display:grid; place-items:center; width:52px; height:52px; border-radius:15px; color:var(--green); background:var(--sun); font-weight:850; letter-spacing:-1px; box-shadow:0 10px 28px #071c1755; }.login-brand strong,.login-brand small { display:block; }.login-brand strong { font-size:17px; }.login-brand small { margin-top:3px; color:#d4e7de; }
.login-brand-copy { position:relative; z-index:2; max-width:700px; }.login-brand-copy h1 { margin-bottom:20px; color:white; font-size:clamp(48px,5.6vw,88px); line-height:.94; letter-spacing:-.055em; }.login-brand-copy>p:last-child { max-width:620px; margin:0; color:#d4e7de; font-size:18px; line-height:1.6; }.eyebrow.light { color:#f4c56f; }
.solar-scene { position:absolute; inset:5% -2% auto auto; width:min(52vw,790px); height:min(66vh,720px); opacity:.96; }.solar-disc { position:absolute; right:5%; top:0; width:clamp(170px,18vw,285px); aspect-ratio:1; border-radius:50%; background:radial-gradient(circle at 34% 32%,#ffd98b,#edaa35 68%,#d88a22); box-shadow:0 0 110px #efb54a73; }.solar-pole { position:absolute; right:36%; top:24%; width:11px; height:70%; border-radius:7px; background:linear-gradient(90deg,#b8cfc5,#f1f6f3 42%,#8ba99c); transform:rotate(-2deg); transform-origin:bottom; }.solar-arm { position:absolute; right:35.5%; top:24%; width:29%; height:11px; border-radius:8px; background:linear-gradient(#eef5f2,#9bb7aa); transform:rotate(-8deg); transform-origin:right; }.solar-lamp { position:absolute; right:62%; top:17%; width:96px; height:35px; border-radius:18px 5px 14px 5px; background:#edf5f1; box-shadow:0 18px 34px #f5c05e73; transform:rotate(-8deg); }.solar-ground { position:absolute; left:1%; right:-5%; bottom:4%; height:2px; background:#d3e5dc5c; box-shadow:0 0 50px #d9ece3; }
.login-form-panel { position:relative; min-height:100vh; display:grid; place-items:center; padding:40px clamp(30px,4vw,72px); }.login-form { width:min(100%,410px); }.login-form h2 { margin:0 0 8px; font-size:clamp(30px,3vw,41px); }.login-intro { margin:0 0 25px; color:var(--muted); }.login-form>label { display:grid; gap:7px; margin-top:16px; color:var(--ink); font-weight:700; }.login-form input[type="email"],.login-form input[type="password"] { width:100%; min-height:49px; border:1px solid var(--line); border-radius:11px; padding:12px 13px; color:var(--ink); background:#fbfdfb; }.login-form input:focus { outline:3px solid #2f755d27; border-color:var(--green-2); }.login-options { display:flex; align-items:center; justify-content:space-between; gap:13px; margin:16px 0; }.check-label { color:var(--muted); font-size:14px; }.check-label input { accent-color:var(--green); }.link-button { border:0; padding:0; color:var(--green-2); background:transparent; font-weight:700; font-size:14px; }.login-submit { width:100%; min-height:49px; }.login-status { min-height:18px; margin:8px 0 0; color:var(--green-2); font-size:13px; text-align:center; }.login-help { margin:20px auto 0; max-width:360px; padding-top:16px; border-top:1px solid var(--line); color:var(--muted); font-size:12px; line-height:1.45; text-align:center; }.network-status { display:flex; justify-content:center; align-items:center; gap:7px; margin:14px 0 0; color:var(--muted); font-size:12px; }.network-status span:first-child { flex:0 0 auto; width:8px; height:8px; border-radius:50%; background:#3ca66f; }.network-status.offline span:first-child { background:var(--ir); }.login-mobile-brand { display:none; }
.language-switch { display:inline-flex; gap:2px; padding:3px; border:1px solid var(--line); border-radius:9px; background:#f5f8f5; }.language-switch button { min-width:43px; border:0; border-radius:6px; padding:6px 8px; color:var(--muted); background:transparent; font-size:12px; font-weight:800; }.language-switch button.active { color:white; background:var(--green); }.login-language { position:absolute; top:24px; right:28px; }.topbar-actions { display:flex; align-items:center; gap:16px; }
.topbar { height:70px; display:flex; align-items:center; justify-content:space-between; padding:0 28px; background:var(--paper); border-bottom:1px solid var(--line); }
#authenticated-app { min-height:100dvh; }
#authenticated-app>.topbar { position:fixed; top:0; right:0; left:0; z-index:50; width:100%; max-width:100vw; height:calc(70px + env(safe-area-inset-top)); padding-top:env(safe-area-inset-top); }
#authenticated-app>.shell { min-height:100dvh; padding-top:calc(70px + env(safe-area-inset-top)); }
.brand { display:flex; gap:11px; align-items:center; color:inherit; text-decoration:none; }.brand-mark { display:grid; place-items:center; width:40px; height:40px; border-radius:12px; background:var(--green); color:white; font-weight:800; letter-spacing:-1px; }.brand strong,.brand small { display:block; }.brand small { color:var(--muted); margin-top:2px; }
.session { display:flex; gap:8px; align-items:center; color:var(--muted); font-size:14px; }.status-dot { width:8px; height:8px; border-radius:50%; background:var(--sun); }.session button { margin-left:5px; border:1px solid var(--line); border-radius:8px; padding:6px 9px; color:var(--green); background:white; font-weight:700; }
.app-version { display:inline-flex; align-items:center; min-height:26px; padding:4px 8px; border:1px solid var(--line); border-radius:999px; color:var(--muted); background:#f8fbf9; font-size:10px; font-weight:750; letter-spacing:.03em; white-space:nowrap; }.login-version { justify-content:center; width:max-content; min-height:auto; margin:10px auto 0; border:0; background:transparent; }
.shell { min-height:calc(100vh - 70px); display:grid; grid-template-columns:220px minmax(0,1fr); }.sidebar { position:sticky; top:70px; align-self:start; height:calc(100vh - 70px); overflow-y:auto; padding:22px 15px; display:flex; flex-direction:column; gap:6px; background:var(--paper); border-right:1px solid var(--line); }.nav-item { display:flex; gap:10px; align-items:center; border:0; background:transparent; color:var(--muted); text-align:left; padding:11px 13px; border-radius:10px; font-weight:650; }.nav-item>span:first-child { width:18px; text-align:center; }.nav-item:hover,.nav-item.active { color:var(--green); background:var(--mint); }.nav-spacer { flex:1; }.role-card { padding:13px; border:1px solid var(--line); border-radius:12px; }.role-card small,.role-card strong { display:block; }.role-card small { color:var(--muted); margin-bottom:4px; }
main { width:100%; max-width:1500px; padding:38px clamp(22px,4vw,60px) 64px; }.view { display:none; }.view.active { display:block; }.page-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:22px; margin-bottom:26px; }.page-heading.compact { align-items:center; }.eyebrow { margin:0 0 7px; color:var(--green-2); text-transform:uppercase; letter-spacing:.12em; font-size:12px; font-weight:800; }h1 { font-size:clamp(31px,4vw,47px); letter-spacing:-.04em; margin:0 0 8px; line-height:1.05; }h2 { margin:0; font-size:24px; letter-spacing:-.02em; }.page-heading p:not(.eyebrow),.dialog-intro,.muted-copy,.empty-state p { color:var(--muted); margin:0; }
.primary { border:0; border-radius:10px; background:var(--green); color:white; padding:12px 17px; font-weight:750; box-shadow:0 6px 18px #12382f20; }.primary:hover { background:#235f4d; }
.locator-panel,.panel { background:var(--paper); border:1px solid var(--line); border-radius:16px; }.locator-panel { overflow:visible; }.locator-tools { display:flex; align-items:flex-end; gap:14px; padding:17px; border-bottom:1px solid var(--line); border-radius:16px 16px 0 0; background:var(--paper); }.search-field { display:grid; gap:6px; flex:1; color:var(--muted); font-size:13px; }.locator-select { display:grid; gap:6px; color:var(--muted); font-size:13px; }.locator-select select,.toolbar select { min-height:39px; border:1px solid var(--line); border-radius:9px; padding:8px 30px 8px 10px; color:var(--ink); background:#fff; }.search-field input,.toolbar input,dialog input,dialog textarea,dialog select { border:1px solid var(--line); border-radius:9px; padding:10px 11px; color:var(--ink); background:#fff; }.mode-switch { display:flex; gap:3px; padding:3px; border:1px solid var(--line); border-radius:10px; background:var(--canvas); }.mode-switch button { min-width:78px; border:0; border-radius:7px; padding:9px 12px; background:transparent; color:var(--muted); font-weight:700; }.mode-switch button.active { background:var(--green); color:white; }.locator-content { display:none; }.locator-content.active { display:block; }
.pole-row { width:100%; display:grid; grid-template-columns:minmax(170px,1.3fr) minmax(160px,1fr) minmax(190px,.9fr) auto; gap:14px; align-items:center; padding:14px 17px; border:0; border-bottom:1px solid var(--line); text-align:left; color:var(--ink); background:white; }.pole-row:last-child { border-bottom:0; }.pole-row:hover { background:#f7faf7; }.pole-identity { display:flex; gap:10px; align-items:center; }.pole-symbol { display:grid; place-items:center; width:36px; height:36px; border-radius:10px; background:var(--mint); color:var(--green); font-size:20px; }.pole-row strong,.pole-row small,.pole-reading small { display:block; }.pole-row small,.pole-reading small { color:var(--muted); margin-top:3px; }.pole-reading { display:flex; align-items:center; gap:10px; }.last-data small { margin:0 0 2px; font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; }.last-data strong,.last-data-table { color:var(--green); font-weight:850; }.open-label { padding:7px 10px; border:1px solid var(--line); border-radius:8px; color:var(--green); font-weight:700; }.system-badge { display:inline-flex; align-items:center; gap:6px; width:max-content; padding:5px 9px; border-radius:999px; background:#f1f5f2; font-size:12px; font-weight:800; }.system-badge span { width:8px; height:8px; border-radius:50%; }.system-badge.ir span { background:var(--ir); }.system-badge.rf span { background:var(--rf); }.no-results { margin:0; padding:28px; color:var(--muted); text-align:center; }
.map-canvas { width:100%; min-width:0; min-height:460px; position:relative; overflow:hidden; background:#e9f0e9; }.pole-map-icon-shell { border:0; background:transparent; }.pole-map-marker { display:grid; place-items:center; width:42px; height:42px; padding:0; border:3px solid white; border-radius:50% 50% 50% 8px; transform:rotate(-45deg); color:white; background:var(--green); box-shadow:0 5px 16px #17362e55; font-size:11px; font-weight:850; }.pole-map-marker span { transform:rotate(45deg); }.pole-map-marker.rf { background:var(--rf); }.pole-map-marker.ir { background:var(--ir); }.pole-map-marker.unknown { background:#7b8983; }.leaflet-tooltip { color:var(--ink); border:1px solid var(--line); box-shadow:0 5px 18px #17362e24; }.map-last-data { display:inline-block; margin-top:5px; color:var(--green); }
.map-legend { display:grid; gap:6px; min-width:142px; padding:10px 12px; border:1px solid var(--line); border-radius:10px; color:var(--ink); background:#fffffff2; box-shadow:0 5px 18px #17362e2b; font-size:12px; line-height:1.2; }.map-legend strong { margin-bottom:2px; color:var(--green); font-size:12px; }.map-legend span { display:flex; align-items:center; gap:7px; }.map-legend i { flex:0 0 auto; width:11px; height:11px; border:2px solid white; border-radius:50%; box-shadow:0 0 0 1px #17362e26; }.map-legend i.rf { background:var(--rf); }.map-legend i.ir { background:var(--ir); }.map-legend i.benito { background:var(--benito); }.map-legend i.unknown { background:#7b8983; }
.process-strip { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; margin-top:16px; }.process-strip>div { display:flex; align-items:center; gap:11px; padding:12px; }.process-strip>div>span { display:grid; place-items:center; width:30px; height:30px; border-radius:50%; background:var(--mint); color:var(--green); font-weight:800; }.process-strip p,.process-strip strong,.process-strip small { display:block; margin:0; }.process-strip small { color:var(--muted); margin-top:2px; }
.toolbar { display:flex; flex-wrap:wrap; align-items:flex-end; gap:12px; margin-bottom:13px; }.toolbar label { display:grid; gap:6px; color:var(--muted); font-size:13px; }.toolbar label:first-child { flex:1 1 330px; }.toolbar input { width:100%; }.table-wrap { overflow:auto; padding:0; }table { width:100%; border-collapse:collapse; }th,td { text-align:left; padding:14px 16px; border-bottom:1px solid var(--line); white-space:nowrap; }th { color:var(--muted); font-size:12px; text-transform:uppercase; letter-spacing:.07em; }tbody tr:hover { background:#f7faf7; }.table-action { border:1px solid var(--line); border-radius:8px; padding:7px 9px; color:var(--green); background:white; font-weight:700; }
.context-bar { position:static; z-index:auto; isolation:auto; box-shadow:none; }
.view>.toolbar.context-bar { margin-inline:0; padding:10px; border:1px solid var(--line); border-radius:12px; background:var(--paper); }
.metrics { display:grid; grid-template-columns:repeat(4,1fr); gap:14px; margin-bottom:18px; }.metrics article { padding:20px; background:var(--paper); border:1px solid var(--line); border-radius:16px; }.metrics span,.metrics small { display:block; color:var(--muted); }.metrics strong { display:block; font-size:35px; letter-spacing:-.04em; margin:8px 0 4px; }.metrics .warning { border-top:3px solid var(--sun); }.grid-two { display:grid; grid-template-columns:1fr 1fr; gap:16px; }.panel { padding:22px; }.empty-state { min-height:48vh; display:grid; place-items:center; align-content:center; gap:12px; text-align:center; }.empty-state.panel { min-height:360px; }.large-mark { color:#89a797; font-size:48px; font-weight:850; letter-spacing:-.05em; }.empty-state p { max-width:620px; }
.admin-tabs { display:flex; flex-wrap:wrap; gap:5px; margin-bottom:14px; padding:4px; width:max-content; max-width:100%; border:1px solid var(--line); border-radius:11px; background:#e9efea; }.admin-tabs button { border:0; border-radius:8px; padding:9px 15px; color:var(--muted); background:transparent; font-weight:750; }.admin-tabs button.active { color:white; background:var(--green); }.admin-tabs button:disabled { cursor:not-allowed; opacity:.55; }.admin-panel { padding:0; overflow:hidden; }.admin-panel-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; padding:20px 22px; border-bottom:1px solid var(--line); }.admin-panel-heading p { margin:6px 0 0; color:var(--muted); }.user-list { display:grid; }.user-row { display:grid; grid-template-columns:minmax(210px,1.5fr) minmax(130px,.7fr) minmax(110px,.6fr); align-items:center; gap:18px; padding:17px 22px; border-bottom:1px solid var(--line); }.user-row:last-child { border-bottom:0; }.user-identity { display:flex; align-items:center; gap:12px; min-width:0; }.user-avatar { display:grid; place-items:center; flex:0 0 auto; width:42px; height:42px; border-radius:50%; color:white; background:var(--green-2); font-weight:850; }.user-identity strong,.user-identity small { display:block; }.user-identity small { margin-top:3px; color:var(--muted); overflow:hidden; text-overflow:ellipsis; }.role-badge,.user-status { display:inline-flex; align-items:center; width:max-content; padding:6px 9px; border-radius:999px; font-size:12px; font-weight:800; }.role-badge { color:var(--green); background:var(--mint); }.user-status { gap:6px; color:#26705b; background:#e7f5ed; }.user-status::before { content:""; width:7px; height:7px; border-radius:50%; background:#3ca66f; }.admin-feedback { min-height:20px; margin:0; padding:0 22px 16px; color:var(--green-2); font-size:13px; }
.battery-panel-heading { align-items:end; }.admin-list-tools { display:flex; align-items:end; justify-content:flex-end; flex-wrap:wrap; gap:9px; }.compact-search { width:min(260px,100%); }.inventory-sort-field { display:grid; gap:5px; min-width:155px; color:var(--muted); font-size:12px; font-weight:750; }.inventory-sort-field select { min-height:41px; border:1px solid var(--line); border-radius:9px; padding:8px 30px 8px 10px; color:var(--ink); background:white; }.sort-direction { min-width:72px; min-height:41px; border:1px solid var(--line); border-radius:9px; padding:8px 10px; color:var(--green); background:white; font-weight:800; white-space:nowrap; }.sort-direction:hover { background:var(--mint); }.battery-table-wrap { border:0; border-radius:0; box-shadow:none; }.battery-table-wrap table { min-width:680px; }.battery-table-wrap td:first-child strong,.battery-table-wrap td:first-child small { display:block; }.battery-table-wrap td:first-child small { margin-top:3px; color:var(--muted); }.battery-table-wrap .table-action { white-space:nowrap; }.unit-input { display:flex; align-items:center; gap:8px; }.unit-input input { min-width:0; flex:1; }.unit-input span { color:var(--muted); font-weight:800; }
.user-row { grid-template-columns:minmax(210px,1.5fr) minmax(130px,.7fr) minmax(110px,.6fr) auto; }.user-role-select { width:100%; min-width:120px; }.user-status.inactive { color:#8a5429; background:#fff0df; }.user-status.inactive::before { background:var(--ir); }.user-actions { display:flex; justify-content:flex-end; gap:7px; }.user-actions button { border:1px solid var(--line); border-radius:8px; padding:8px 10px; color:var(--green); background:white; font-weight:700; }.user-actions button.danger { color:#944d2f; }.user-actions button:disabled { cursor:not-allowed; opacity:.45; }.admin-feedback.error { color:#a33b25; }
dialog { width:min(560px,calc(100% - 28px)); max-width:calc(100% - 28px); max-height:calc(100vh - 30px); overflow-x:hidden; border:0; border-radius:18px; padding:0; box-shadow:0 30px 80px #142e2866; }dialog.wide-dialog { width:min(900px,calc(100% - 28px)); }dialog::backdrop { background:#102b267a; backdrop-filter:blur(3px); }dialog form { width:100%; min-width:0; padding:28px; position:relative; }dialog h2 { font-size:28px; margin-bottom:8px; }dialog label { display:grid; gap:6px; font-weight:650; color:var(--ink); }.dialog-close { position:absolute; top:17px; right:17px; border:0; background:transparent; font-size:26px; }.dialog-actions { display:flex; justify-content:flex-end; gap:9px; margin-top:22px; }.dialog-actions.split { flex-wrap:wrap; }.dialog-actions button:not(.primary) { border:1px solid var(--line); background:white; border-radius:10px; padding:11px 15px; }.pole-summary { display:grid; grid-template-columns:1fr 1fr; gap:1px; margin-top:20px; overflow:hidden; border:1px solid var(--line); border-radius:12px; background:var(--line); }.pole-summary>div { min-height:77px; padding:13px; background:white; }.pole-summary>div.primary-data { background:var(--mint); }.pole-summary>div.primary-data strong { color:var(--green); font-size:18px; }.pole-summary small,.pole-summary strong { display:block; }.pole-summary small { color:var(--muted); margin-bottom:7px; }.pole-summary .reading-author { margin:9px 0 0; padding-top:8px; border-top:1px solid var(--line); color:var(--muted); font-size:12px; font-weight:650; }.pole-summary .reading-author strong { display:inline; color:var(--ink); font-size:12px; }.reading-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; margin-top:20px; }.full-field { margin-top:14px; }
.reading-context { position:sticky; top:0; z-index:2; display:grid; grid-template-columns:minmax(110px,1.2fr) repeat(6,minmax(72px,1fr)); gap:1px; margin:18px 0 0; padding:1px; border:1px solid var(--line); border-radius:12px; background:var(--line); box-shadow:0 8px 18px #17372f12; overflow:hidden; }.reading-context>div { min-width:0; padding:10px 9px; background:#f8fbf9; }.reading-context-title { display:flex; align-items:center; color:var(--green); font-size:11px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }.reading-context small,.reading-context strong { display:block; }.reading-context small { color:var(--muted); font-size:11px; margin-bottom:3px; }.reading-context strong { font-size:13px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }.reading-context .sensor-state strong { color:var(--green); white-space:normal; }.reading-grid>* { min-width:0; }.reader-field { min-width:0; padding:12px; border:1px solid var(--line); border-radius:12px; background:#fbfdfc; }.reader-field-heading { display:flex; align-items:center; gap:10px; min-width:0; min-height:36px; }.reader-field-heading>span { min-width:0; }.reader-field-heading strong,.reader-field-heading small { display:block; overflow-wrap:anywhere; }.reader-field-heading small { color:var(--muted); font-weight:500; margin-top:2px; }.reader-code { display:grid; place-items:center; flex:0 0 34px; height:34px; border-radius:9px; color:#fff; background:var(--green); font-size:17px; }.reader-field>select { width:100%; min-width:0; max-width:100%; }.reading-input-wrap { position:relative; display:block; width:100%; min-width:0; }.reading-input-wrap input { width:100%; min-width:0; max-width:100%; box-sizing:border-box; padding-right:40px; }.reading-unit { position:absolute; right:11px; top:50%; transform:translateY(-50%); color:var(--muted); font-size:12px; font-weight:700; pointer-events:none; }.field-help { color:var(--muted); font-size:11px; font-weight:500; line-height:1.35; }
.wide-dialog[data-system="BENITO"] .reading-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
.form-status { min-height:20px; margin:14px 0 0; color:var(--green); font-weight:650; }.form-status.error { color:#a33b25; }.history-toolbar { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin:18px 0 12px; color:var(--muted); font-size:13px; }.history-toolbar button,.history-remove { border:1px solid var(--line); border-radius:9px; background:white; padding:8px 11px; color:var(--green); font-weight:700; }.history-rows { display:grid; gap:14px; }.history-row { padding:15px; border:1px solid var(--line); border-radius:13px; background:#fbfdfc; }.history-row-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; }.history-row-head strong { color:var(--green); font-size:16px; }.history-row-grid { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:10px; }.history-row-grid>* { min-width:0; }.history-row label { min-width:0; font-size:12px; }.history-row .reading-input-wrap { width:100%; min-width:0; }.history-row input { width:100%; min-width:0; max-width:100%; box-sizing:border-box; padding:9px 34px 9px 9px; }.history-row .reading-unit { right:9px; }.history-row[data-optional="false"] .history-remove { display:none; }
.reading-alerts { display:none; margin:14px 0 0; padding:12px 14px; border:1px solid #e3a15b; border-left:5px solid #c96732; border-radius:11px; color:#743519; background:#fff4e7; }.reading-alerts.has-alerts { display:block; }.reading-alerts strong { display:block; margin-bottom:5px; }.reading-alerts p { margin:0 0 7px; font-size:13px; }.reading-alerts ul { margin:0; padding-left:19px; }.reading-alerts li+li { margin-top:4px; }.reader-field.out-of-range,.history-row label.out-of-range,.full-field.out-of-range { border-color:#d47742; background:#fff7ee; }.reader-field.out-of-range input,.history-row label.out-of-range input,.full-field.out-of-range textarea { border-color:#bf542f; box-shadow:0 0 0 2px #d4774222; }.reader-field.out-of-range .reader-code { background:#b94b2b; }
.last-data.stale,.pole-summary .stale,.table-wrap td.stale { color:#963f24; background:#fff4e7; }.stale-reading-note { display:block; margin-top:4px; color:#963f24!important; font-size:10px!important; font-weight:750; line-height:1.25; }
.reading-status { display:inline-flex!important; align-items:center; gap:5px; width:max-content; margin-top:5px!important; padding:3px 7px; border-radius:999px; font-size:10px!important; font-weight:800; line-height:1.15; }
.reading-status i { width:8px; height:8px; border-radius:50%; background:currentColor; }
.reading-status.current { color:#087a5b!important; background:#e3f5ed; }
.reading-status.due { color:#9a5918!important; background:#fff0d8; }
.reading-status.none { color:#66736d!important; background:#edf1ef; }
.sync-strip { display:flex; align-items:center; justify-content:space-between; gap:16px; margin:0 0 14px; padding:11px 14px; border:1px solid var(--line); border-radius:12px; background:#f8fbf9; }.sync-strip>div { display:flex; align-items:center; gap:10px; min-width:0; }.sync-strip p,.sync-strip strong,.sync-strip small { display:block; margin:0; }.sync-strip small { margin-top:2px; color:var(--muted); }.sync-pending-count { flex:0 0 auto; padding:5px 8px; border-radius:999px; color:var(--green); background:var(--mint); font-size:12px; font-weight:800; white-space:nowrap; }.sync-strip.pending .sync-pending-count,.sync-strip.offline .sync-pending-count { color:#8a5429; background:#fff0df; }.sync-strip button { flex:0 0 auto; border:1px solid var(--line); border-radius:9px; padding:9px 12px; color:var(--green); background:white; font-weight:750; }.sync-strip button:disabled { opacity:.6; }.sync-dot { flex:0 0 auto; width:10px; height:10px; border-radius:50%; background:#3ca66f; }.sync-strip.offline .sync-dot,.sync-strip.pending .sync-dot { background:var(--ir); }.sync-strip.syncing .sync-dot { background:var(--sun); box-shadow:0 0 0 4px #eead3d2e; }
@media (max-width:980px) { .login-screen { grid-template-columns:1fr; }.login-brand-panel { min-height:300px; padding:26px 28px 32px; }.login-brand-panel::after { display:none; }.login-brand-copy h1 { max-width:470px; font-size:44px; }.login-brand-copy>p:last-child { display:none; }.solar-scene { right:-6%; top:-5%; width:60vw; height:350px; }.solar-disc { width:155px; }.login-form-panel { min-height:auto; padding:38px 24px 52px; }.login-form { width:min(100%,440px); } }
@media (max-width:920px) { .shell { grid-template-columns:1fr; }.sidebar { position:fixed; z-index:20; top:auto; left:0; right:0; bottom:0; height:auto; overflow:hidden; display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); padding:7px 7px calc(7px + env(safe-area-inset-bottom)); border:1px solid var(--line); }.sidebar .role-card,.nav-spacer { display:none; }.nav-item { min-width:0; justify-content:center; flex-direction:column; gap:3px; padding:7px 2px; font-size:11px; line-height:1.1; text-align:center; white-space:normal; overflow-wrap:anywhere; }.nav-item>span:first-child { display:block; width:auto; font-size:16px; line-height:1; }.nav-item>span:last-child { max-width:100%; }.sidebar[data-visible-items="1"] { grid-template-columns:1fr; }.sidebar[data-visible-items="4"] { grid-template-columns:repeat(4,minmax(0,1fr)); }.sidebar[data-visible-items="5"] { grid-template-columns:repeat(5,minmax(0,1fr)); }main { padding-bottom:105px; }.metrics { grid-template-columns:repeat(2,1fr); }.user-row { grid-template-columns:minmax(180px,1.4fr) .7fr auto; }.user-status { display:none; } }
@media (max-width:660px) { .topbar { padding:0 15px; }.session span:last-child { display:none; }.topbar-actions { gap:7px; }.page-heading { align-items:flex-start; flex-direction:column; }.page-heading .primary { width:100%; }.locator-tools { align-items:stretch; flex-direction:column; }.mode-switch button { flex:1; }.pole-row { grid-template-columns:1fr auto; }.pole-place { display:none; }.pole-reading { grid-column:1; align-items:flex-start; }.open-label { grid-column:2; grid-row:1/3; }.process-strip { grid-template-columns:1fr; gap:2px; }.metrics,.grid-two { grid-template-columns:1fr 1fr; }main { padding:27px 14px 95px; }.reading-grid,.wide-dialog[data-system="BENITO"] .reading-grid { grid-template-columns:1fr; }.reading-context { grid-template-columns:repeat(2,minmax(0,1fr)); margin-inline:0; }.reading-context-title { grid-column:1/-1; }.reading-context strong { white-space:normal; }.pole-summary { grid-template-columns:1fr; }.dialog-actions button { flex:1; }.table-wrap { margin-inline:-14px; border-radius:0; }.map-canvas { min-height:330px; }.admin-panel-heading { flex-direction:column; }.admin-list-tools { display:grid; grid-template-columns:minmax(0,1fr) auto; width:100%; }.battery-panel-heading .compact-search { grid-column:1/-1; width:100%; }.inventory-sort-field { min-width:0; }.sort-direction { align-self:end; }.user-row { grid-template-columns:1fr; gap:10px; }.user-actions { justify-content:flex-start; flex-wrap:wrap; }.admin-tabs { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); width:100%; }.admin-tabs button { min-width:0; padding-inline:7px; }.admin-tabs button:disabled { display:none; } }
@media (max-width:480px) { .login-brand-panel { min-height:210px; padding:20px; }.login-brand { display:none; }.login-brand-copy h1 { max-width:280px; margin-bottom:0; font-size:33px; }.solar-scene { width:76vw; height:245px; opacity:.75; }.solar-disc { width:105px; }.solar-lamp { width:60px; }.login-form-panel { padding:28px 19px 38px; }.login-mobile-brand { display:flex; align-items:center; gap:10px; margin-bottom:28px; }.login-mobile-brand .login-brand-mark { width:38px; height:38px; }.login-options { align-items:flex-start; flex-direction:column; }.login-form h2 { font-size:31px; } }
@media (max-width:430px) { .metrics,.grid-two { grid-template-columns:1fr; }.brand small { display:none; }.brand>span:last-child { display:none; }.login-language { top:15px; right:15px; } }
@media (max-width:660px) { .sync-strip { align-items:stretch; flex-direction:column; }.sync-strip>div { flex-wrap:wrap; }.sync-strip p { flex:1 1 180px; }.sync-strip button { width:100%; } }
@media (max-width:430px) { .sidebar { padding-inline:4px; }.nav-item { padding-inline:1px; font-size:10px; }.nav-item>span:first-child { font-size:15px; }main { padding-bottom:110px; } }
@media (max-width:660px) { .history-row-grid { grid-template-columns:1fr 1fr; } }
@media (max-width:430px) { .history-row-grid { grid-template-columns:1fr; } }
.system-badge.unknown span { background:#8a9690; }
.system-badge.benito { color:var(--benito); background:#e8f0f8; }.system-badge.benito span { background:var(--benito); }
.pole-map-marker.benito { background:var(--benito); }
.primary:disabled { cursor:not-allowed; opacity:.45; box-shadow:none; }
.activation-button { width:100%; margin-top:12px; border:1px solid var(--line); border-radius:10px; padding:11px 14px; color:var(--green); background:white; font-weight:750; }
.activation-button:hover { background:var(--mint); }
.installation-access { margin:16px 0 0; padding:14px; border:1px solid var(--line); border-radius:11px; }
.installation-access legend { padding:0 6px; color:var(--green); font-weight:800; }
.installation-access>div { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px 14px; }
.installation-access label { display:flex; align-items:center; gap:7px; font-weight:600; }
.authorization-active { align-self:end; padding-bottom:11px; }

.report-heading { align-items:flex-end; }
.report-tabs { display:flex; width:max-content; max-width:100%; margin:0 0 14px; padding:4px; border:1px solid var(--line); border-radius:11px; background:#eaf2ee; }
.report-tabs button { border:0; border-radius:8px; padding:9px 14px; color:var(--muted); background:transparent; font-weight:800; }
.report-tabs button.active { color:white; background:var(--green); }
.report-panel[hidden] { display:none; }
.report-metadata { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:1px; margin-bottom:14px; padding:0; overflow:hidden; background:var(--line); }
.report-metadata>div { padding:15px 18px; background:white; }
.report-metadata span,.report-metadata strong { display:block; }
.report-metadata span { margin-bottom:5px; color:var(--muted); font-size:11px; text-transform:uppercase; letter-spacing:.06em; }
.report-metrics { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:12px; margin-bottom:14px; }
.report-metrics article { padding:16px 18px; border:1px solid var(--line); border-radius:13px; background:white; }
.report-metrics span { display:block; color:var(--muted); font-size:13px; }
.report-metrics strong { display:block; margin-top:5px; font-size:29px; }
.report-metrics .critical { border-top:4px solid #b8422e; }
.report-metrics .warning { border-top:4px solid var(--sun); }
.report-metrics .pending { border-top:4px solid #7b8983; }
.report-toolbar { display:grid; grid-template-columns:minmax(220px,1.35fr) minmax(155px,.8fr) repeat(2,minmax(135px,.65fr)) repeat(2,minmax(145px,.7fr)); align-items:end; gap:11px; margin-bottom:10px; padding:15px; }
.report-toolbar label { display:grid; gap:5px; min-width:0; color:var(--muted); font-size:12px; }
.report-toolbar input,.report-toolbar select { width:100%; min-width:0; min-height:40px; border:1px solid var(--line); border-radius:9px; padding:8px 10px; color:var(--ink); background:white; }
.report-legend { display:flex; flex-wrap:wrap; gap:18px; margin:10px 2px 12px; color:var(--muted); font-size:12px; }
.report-legend>span { display:flex; align-items:center; gap:7px; }
.report-legend i { width:10px; height:10px; border-radius:50%; }
.report-legend i.critical { background:#b8422e; }.report-legend i.warning { background:var(--sun); }.report-legend i.pending { background:#7b8983; }
.report-table-wrap { position:relative; min-height:210px; overflow:auto; padding:0; }
.report-table td { vertical-align:top; white-space:normal; }
.report-table td:nth-child(2),.report-table td:nth-child(7) { white-space:nowrap; }
.report-table td small { display:block; margin-top:4px; color:var(--muted); }
.report-table.single-installation .installation-column { display:none; }
.report-severity-group th { padding:11px 14px; border-top:2px solid currentColor; text-align:left; font-size:13px; letter-spacing:.04em; text-transform:uppercase; }
.report-severity-group th span { display:inline-flex; min-width:24px; justify-content:center; margin-left:7px; padding:2px 7px; border-radius:999px; background:rgba(255,255,255,.72); font-size:11px; }
.report-severity-group.critical th { color:#8d2f20; background:#fde8e3; }
.report-severity-group.warning th { color:#81521f; background:#fff0d8; }
.report-severity-group.pending th { color:#52615b; background:#edf1ef; }
.severity-badge { display:inline-flex; padding:5px 8px; border-radius:999px; font-size:11px; font-weight:850; white-space:nowrap; }
.severity-badge.critical { color:#8d2f20; background:#fde8e3; }.severity-badge.warning { color:#81521f; background:#fff0d8; }.severity-badge.pending { color:#52615b; background:#edf1ef; }
.report-empty { display:grid; place-items:center; align-content:center; min-height:210px; padding:30px; color:var(--muted); text-align:center; }
.report-empty p { margin:7px 0 0; }.report-empty[hidden] { display:none; }
.history-report-toolbar { display:grid; grid-template-columns:repeat(3,minmax(150px,1fr)) repeat(3,minmax(135px,.8fr)); align-items:end; gap:11px; margin-bottom:14px; padding:15px; }
.history-report-toolbar label { display:grid; gap:5px; min-width:0; color:var(--muted); font-size:12px; }
.history-report-toolbar input,.history-report-toolbar select { width:100%; min-width:0; min-height:40px; border:1px solid var(--line); border-radius:9px; padding:8px 10px; color:var(--ink); background:white; }
.history-report-toolbar .history-check { display:flex; align-items:center; align-self:center; flex-direction:row; gap:8px; padding-top:18px; color:var(--ink); font-weight:700; }
.history-report-toolbar .history-check input { width:17px; min-height:17px; }
.history-asset-card { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:1px; margin-bottom:8px; padding:0; overflow:hidden; background:var(--line); }
.history-asset-card>div { min-width:0; padding:9px 12px; background:white; }
.history-asset-card span,.history-asset-card strong { display:block; }
.history-asset-card span { margin-bottom:5px; color:var(--muted); font-size:10px; letter-spacing:.05em; text-transform:uppercase; }
.history-asset-card strong { overflow-wrap:anywhere; font-size:13px; }
.history-metrics { gap:8px; margin-bottom:8px; }
.history-metrics article { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:10px 13px; border-radius:10px; }
.history-metrics span { font-size:11px; }
.history-metrics strong { flex:none; margin:0; font-size:17px; }
.history-limitation { margin:0 0 12px; padding:11px 14px; border-left:4px solid var(--sun); border-radius:8px; color:#704b20; background:#fff3df; font-size:13px; }
.history-report-table { min-width:1280px; }
.history-report-table td { vertical-align:top; }
.history-report-table td:nth-child(7) { min-width:330px; white-space:normal; }
.history-report-table td:nth-child(8) { min-width:280px; }
.history-report-table td small { display:block; margin-top:4px; color:var(--muted); line-height:1.35; }
.history-system-group th { padding:10px 13px; border-top:2px solid var(--green); color:var(--green); background:var(--mint); text-align:left; letter-spacing:.08em; }
.history-capture-group th { padding:9px 13px; border-top:2px solid var(--green); color:var(--green); background:var(--mint); text-align:left; }
.history-capture-group th strong { margin-right:10px; }
.history-capture-group th span { display:inline-flex; padding:2px 7px; border-radius:999px; color:var(--muted); background:white; font-size:11px; font-weight:750; }
.automatic-alert+.technician-comment { margin-top:10px; padding-top:9px; border-top:1px solid var(--line); }
.technician-comment strong { display:block; color:var(--green); font-size:11px; }
.reading-full-details { margin-top:9px; padding-top:7px; border-top:1px dashed var(--line); }
.reading-full-details summary { width:max-content; max-width:100%; cursor:pointer; color:var(--green); font-size:11px; font-weight:800; }
.reading-full-details dl { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:5px 12px; margin:9px 0 2px; }
.reading-full-details dl div { min-width:0; padding:5px 7px; border-radius:6px; background:var(--canvas); }
.reading-full-details dt { color:var(--muted); font-size:9px; line-height:1.2; }
.reading-full-details dd { margin:2px 0 0; overflow-wrap:anywhere; color:var(--ink); font-size:11px; font-weight:750; }

@media (max-width:920px) {
  .report-toolbar { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .report-toolbar label:first-child { grid-column:1/-1; }
  .history-report-toolbar { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .history-asset-card { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .report-table-wrap { margin-inline:0; }
}

/* Actuacions i estat operatiu de la bateria. */
.battery-status { display:block; width:max-content; max-width:100%; margin-top:5px; padding:3px 7px; border-radius:999px; color:#53635d; background:#edf1ef; font-size:10px; font-weight:800; line-height:1.3; white-space:normal; }
.battery-status.installed { color:#087a5b; background:#e3f5ed; }
.battery-status.removed_pending { color:#992f22; background:#fde8e3; }
.battery-status.not_applicable { color:#52615b; background:#edf1ef; }
.asset-state { display:inline-flex; width:max-content; max-width:100%; margin-top:5px; padding:4px 8px; border-radius:999px; color:#59665f; background:#edf1ef; font-size:11px; font-weight:800; line-height:1.2; }
.asset-state.compact { margin-left:7px; padding:3px 7px; font-size:10px; vertical-align:middle; }
.asset-state.active { color:#087a5b; background:#e3f5ed; }
.asset-state.inactive { color:#992f22; background:#fde8e3; }
.asset-state.maintenance { color:#89571b; background:#fff0d8; }
.asset-state.unknown { color:#59665f; background:#edf1ef; }
.state-editor-note { margin:14px 0 0; padding:10px 12px; border-left:4px solid var(--green); border-radius:8px; color:var(--muted); background:#f5faf7; font-size:13px; }
.reading-context .operational-warning { grid-column:1/-1; color:#8d2f20; background:#fff0e9; }
.asset-voltage { display:block; margin-top:3px; color:var(--muted); font-size:11px; font-weight:750; }
.asset-conflict { margin-top:14px; padding:12px 14px; border:1px solid #e0a07f; border-radius:10px; color:#8d2f20; background:#fff4f0; font-weight:700; line-height:1.4; }
.battery-summary.removed_pending { background:#fff4f0; }
.battery-reason { margin-top:7px; color:#8d2f20!important; line-height:1.35; }
.intervention-toolbar { grid-template-columns:minmax(220px,1.5fr) repeat(5,minmax(125px,.75fr)); }
.intervention-list { padding:0; overflow:hidden; }
.intervention-list>.muted-copy { padding:24px; }
.intervention-row { display:grid; grid-template-columns:minmax(150px,.7fr) minmax(220px,1fr) minmax(260px,1.5fr) minmax(150px,auto); align-items:center; gap:16px; padding:15px 18px; border-bottom:1px solid var(--line); }
.intervention-row:last-child { border-bottom:0; }
.intervention-row strong,.intervention-row small { display:block; }
.intervention-row small { margin-top:4px; color:var(--muted); }
.intervention-row p { margin:0; line-height:1.45; }
.follow-up { padding:5px 9px; border-radius:999px; color:#56625e; background:#edf1ef; font-size:11px; font-weight:800; }
.follow-up.pending { color:#8d2f20; background:#fde8e3; }
.intervention-actions { display:grid; justify-items:end; gap:7px; }.intervention-actions .table-action { white-space:nowrap; }.intervention-list-status { padding-top:10px; }
.intervention-context { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:1px; margin:18px 0 0; overflow:hidden; border:1px solid var(--line); border-radius:11px; background:var(--line); }
.intervention-context>div { min-width:0; padding:10px 12px; background:#f8fbf9; }
.intervention-context small,.intervention-context strong { display:block; }
.intervention-context small { margin-bottom:4px; color:var(--muted); }
.intervention-date-known { align-self:end; min-height:43px; padding-bottom:8px; }

@media (max-width:920px) {
  .sidebar[data-visible-items="6"] { grid-template-columns:repeat(6,minmax(0,1fr)); }
  .intervention-toolbar { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .intervention-toolbar label:first-child { grid-column:1/-1; }
  .intervention-row { grid-template-columns:1fr 1fr; }
  .intervention-row p { grid-column:1/-1; }
  .intervention-context { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:660px) {
  .intervention-toolbar,.intervention-row,.intervention-context { grid-template-columns:1fr; }
  .intervention-toolbar label:first-child,.intervention-row p { grid-column:auto; }
  .follow-up { width:max-content; }.intervention-actions { justify-items:start; }
}
@media (max-width:660px) {
  .report-metadata,.report-metrics,.report-toolbar { grid-template-columns:1fr 1fr; }
  .report-metadata>div:last-child,.report-toolbar label:first-child { grid-column:1/-1; }
  .report-heading .report-print { width:100%; }
  .report-tabs { width:100%; }
  .report-tabs button { flex:1; }
  .history-report-toolbar { grid-template-columns:1fr; }
  .history-asset-card { grid-template-columns:1fr 1fr; }
  .report-table { min-width:940px; }
}

@media print {
  @page { size:A4 landscape; margin:10mm; }
  body { background:white; color:#111; }
  .topbar,.sidebar,.report-print,.report-toolbar,.history-report-toolbar,.report-tabs,.report-legend,.view:not(#informes),.report-panel[hidden] { display:none!important; }
  #authenticated-app,.shell,#informes { display:block!important; }
  main { max-width:none; padding:0; }
  .report-heading { margin-bottom:5px; }
  .report-heading .eyebrow { display:none!important; }
  .report-heading h1 { margin:0; font-size:23px; line-height:1.05; }
  .report-heading p:last-child { margin:4px 0 0; font-size:10px; line-height:1.25; }
  .report-metadata,.report-metrics { break-inside:avoid; }
  .history-asset-card { display:none!important; }
  .history-metrics { grid-template-columns:repeat(4,minmax(0,1fr))!important; gap:5px; margin:0 0 6px; }
  .history-metrics article { min-height:0; padding:5px 8px; border-radius:6px; }
  .history-metrics span { font-size:8px; }
  .history-metrics strong { font-size:12px; }
  .history-limitation { margin-bottom:5px; padding:5px 8px; font-size:8px; }
  .report-table-wrap { overflow:visible; border-color:#bbb; }
  .report-table { font-size:9px; }
  .history-report-table { min-width:0; font-size:8px; }
  .report-table th,.report-table td { padding:7px 8px; border-color:#bbb; }
  .report-severity-group th { background:#eee!important; }
  .history-system-group th { color:#111; background:#eee!important; }
  .history-capture-group th { color:#111; background:#eee!important; }
  .reading-full-details { display:none!important; }
  .severity-badge { border:1px solid currentColor; background:white!important; }
}

/* Tablet portrait: keep the shell and every data form inside the viewport. */
.shell,main,.view,.locator-panel,.locator-tools,.locator-content,.panel,dialog form { min-width:0; }
@media (max-width:920px) {
  #authenticated-app>.topbar { padding-inline:18px; }
  .topbar-actions { min-width:0; gap:9px; }
  main { width:100%; max-width:100vw; padding:28px 18px 100px; }
  .locator-tools { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:end; gap:10px; }
  .locator-tools .search-field { grid-column:1/-1; width:100%; }
  .locator-tools .mode-switch { width:100%; }
  .locator-select,.locator-select select,.mode-switch { min-width:0; width:100%; }
  .mode-switch button { min-width:64px; }
  dialog,dialog.wide-dialog { width:calc(100vw - 16px); max-width:calc(100vw - 16px); margin-inline:auto; overflow-x:clip; }
  dialog form { max-width:100%; padding:22px; overflow-x:clip; }
  .reading-context { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .reading-context-title { grid-column:1/-1; }
  .reading-context strong { white-space:normal; }
  .wide-dialog[data-system="BENITO"] .reading-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .history-row-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .reader-field,.history-row { min-width:0; }
}
@media (max-width:660px) {
  .topbar { padding-inline:12px; }
  .app-version { display:none; }
  main { padding:24px 12px 94px; }
  .locator-tools { display:flex; align-items:stretch; flex-direction:column; }
  dialog,dialog.wide-dialog { width:calc(100vw - 10px); max-width:calc(100vw - 10px); max-height:calc(100dvh - 10px); }
  dialog form { padding:18px 14px; }
  .reading-grid,.wide-dialog[data-system="BENITO"] .reading-grid,.history-row-grid { grid-template-columns:1fr; }
  .reading-context { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .map-legend { min-width:126px; padding:8px 10px; font-size:11px; }
  .installation-access>div { grid-template-columns:1fr; }
  .sync-strip { align-items:stretch; flex-direction:column; }
  .sync-strip button { width:100%; }
  .report-tabs.context-bar,.admin-tabs.context-bar { position:sticky; top:calc(70px + env(safe-area-inset-top)); z-index:30; isolation:isolate; box-shadow:0 8px 18px #17372f18; }
}
.locator-tools.context-bar { margin-bottom:10px; padding:14px 16px; border:1px solid var(--line); border-radius:14px; background:var(--paper); }
@media (max-width:660px) { .admin-tabs.context-bar { display:flex; flex-wrap:nowrap; width:100%; overflow-x:auto; }.admin-tabs.context-bar button { min-width:max-content; padding-inline:10px; } }

/*
 * Pantalles de treball: la capçalera i els controls no floten sobre les dades.
 * A escriptori i tauleta només es desplaça la llista o el contingut inferior.
 */
@media (min-width:661px) {
  #authenticated-app>.shell { height:100dvh; min-height:100dvh; overflow:hidden; }
  main { height:calc(100dvh - 70px - env(safe-area-inset-top)); min-height:0; overflow:hidden; padding-bottom:24px; }
  .view.active { display:flex; flex-direction:column; height:100%; min-height:0; overflow:hidden; }
  .view.active>.page-heading,
  .view.active>.sync-strip,
  .view.active>.context-bar,
  .view.active>.process-strip { flex:0 0 auto; }

  #inici>.locator-panel { flex:1 1 auto; min-height:180px; overflow:hidden; }
  #inici>.locator-panel>.locator-content.active { display:block; height:100%; min-height:0; overflow:auto; }
  #inici .map-canvas { height:100%; min-height:300px; }

  #baculs>.table-wrap { flex:1 1 auto; min-height:180px; overflow:auto; }
  #baculs>.table-wrap thead th { position:sticky; top:0; z-index:2; background:var(--paper); box-shadow:0 1px 0 var(--line); }

  #actuacions>.intervention-list { flex:1 1 auto; min-height:180px; overflow:auto; }
  #actuacions>.intervention-list-status { flex:0 0 auto; }

  #informes>.report-panel.active { display:flex; flex:1 1 auto; flex-direction:column; min-height:0; overflow:hidden; padding-top:1px; }
  #informes>.report-panel.active>.report-metadata,
  #informes>.report-panel.active>.report-metrics,
  #informes>.report-panel.active>.report-toolbar,
  #informes>.report-panel.active>.report-legend,
  #informes>.report-panel.active>.history-report-toolbar,
  #informes>.report-panel.active>.history-asset-card,
  #informes>.report-panel.active>.history-metrics,
  #informes>.report-panel.active>.history-limitation { flex:0 0 auto; }
  #informes>.report-panel.active>.report-table-wrap { flex:1 1 auto; min-height:120px; overflow:auto; overscroll-behavior:contain; }
  #informes>.report-panel.active>.report-table-wrap thead th { position:sticky; top:0; z-index:3; background:var(--paper); box-shadow:0 1px 0 var(--line); }
  #estadistiques { overflow:auto; }

  #configuracio>.admin-panel:not([hidden]) { display:flex; flex:1 1 auto; flex-direction:column; min-height:0; overflow:hidden; }
  #configuracio>.admin-panel:not([hidden])>.admin-panel-heading { flex:0 0 auto; }
  #configuracio>.admin-panel:not([hidden])>.table-wrap,
  #configuracio>.admin-panel:not([hidden])>.user-list { flex:1 1 auto; min-height:0; overflow:auto; }
  #configuracio>.admin-panel:not([hidden]) table thead th { position:sticky; top:0; z-index:2; background:var(--paper); box-shadow:0 1px 0 var(--line); }
  #configuracio>.admin-panel:not([hidden])>.admin-feedback { flex:0 0 auto; }
}
.origin-badge{display:inline-flex;margin:.35rem 0 .15rem;padding:.2rem .5rem;border-radius:999px;font-size:.7rem;font-weight:800;line-height:1.2;background:#e7f1ee;color:#185c4e}.origin-badge.inventory_correction{background:#fff0cf;color:#805500}.origin-badge.legacy_import{background:#edf0f2;color:#53616a}.intervention-row>div:nth-child(2){display:flex;flex-direction:column;align-items:flex-start}

/* Capçalera corporativa reservada als informes impresos. */
.report-document-header { display:none; }

/* Aquesta regla ha de quedar al final: anul·la els contenidors fixos de la interfície. */
@media print {
  @page { size:A4 landscape; margin:9mm; }
  html,body { width:auto!important; height:auto!important; overflow:visible!important; background:#fff!important; }
  #authenticated-app,#authenticated-app>.shell,main,#informes,#informes.view.active,
  #informes>.report-panel.active,#informes>.report-panel.active>.report-table-wrap {
    display:block!important; width:auto!important; height:auto!important; min-height:0!important; max-height:none!important; overflow:visible!important;
  }
  main { padding:0!important; }
  .report-document-header { display:grid!important; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:18mm; margin:0 0 5mm; padding:0 0 4mm; border-bottom:1px solid #aebcb7; break-inside:avoid; }
  .report-brand-company { display:flex; align-items:center; gap:5mm; min-width:0; }
  .report-brand-company img { width:58mm; height:9mm; object-fit:contain; object-position:left center; }
  .report-brand-company p { display:grid; gap:.7mm; margin:0; color:#4f625c; font-size:7.5pt; line-height:1.15; }
  .report-brand-company strong { color:#203b34; font-size:8pt; }
  .report-brand-institution { display:flex; align-items:center; justify-content:flex-end; gap:4mm; color:#1f3a5f; font-size:8pt; text-align:right; }
  .report-brand-institution img { width:17mm; height:17mm; object-fit:contain; }
  .report-heading { break-inside:avoid; }
  .report-metadata,.report-metrics { break-inside:avoid; }
  .report-table-wrap { border:1px solid #b9c5c1!important; }
  .report-table { width:100%!important; min-width:0!important; table-layout:fixed; font-size:8pt; }
  .report-table thead { display:table-header-group; }
  .report-table tfoot { display:table-footer-group; }
  .report-table tr { break-inside:avoid; page-break-inside:avoid; }
  .report-table th,.report-table td { padding:5px 6px!important; vertical-align:top; }
  .report-table th:nth-child(1) { width:9%; }
  .report-table th:nth-child(2) { width:11%; }
  .report-table th:nth-child(3) { width:14%; }
  .report-table th:nth-child(4) { width:24%; }
  .report-table th:nth-child(5) { width:25%; }
  .report-table th:nth-child(6) { width:7%; }
  .report-table th:nth-child(7) { width:10%; }
  .report-table.single-installation th:nth-child(2),.report-table.single-installation td:nth-child(2) { display:none!important; }
  .report-table.single-installation th:nth-child(4) { width:28%; }
  .report-table.single-installation th:nth-child(5) { width:31%; }
  .report-severity-group th { position:static!important; }
}
