/* 1.5.9 — José's authenticated layout. Public layout and all business screens are preserved. */
.authenticated-shell{
 --sidebar:248px;--member-banner-height:clamp(116px,12.5vw,260px);--member-session-height:30px;
 --member-top:calc(var(--member-banner-height) + var(--member-session-height));
 --member-side:#002238;--member-line:#18526b;--member-ink:#f3f9ff;--member-muted:#bfd5e4;
 --member-active-bg:#074569;--member-active-ink:#fff;--member-accent:#00d4ec;
}
:root[data-theme-preset="corporate-light"] .authenticated-shell{--member-side:#173b57;--member-line:#496378;--member-accent:#e0b56a;--member-active-bg:#c49a50;--member-active-ink:#173b57}
:root[data-theme-preset="warm-sunset"] .authenticated-shell{--member-side:#0d385c;--member-line:#45657d;--member-accent:#feb34c;--member-active-bg:#ffc39f;--member-active-ink:#102e50}
.nav-icon{display:inline-block;width:22px;height:22px;flex:none;vertical-align:middle}
.authenticated-shell .member-header{position:fixed;inset:0 0 auto 0;z-index:60;height:var(--member-top);pointer-events:none}
.member-banner{height:var(--member-banner-height);position:relative;overflow:hidden;background:#08243a;border-bottom:1px solid var(--member-accent);pointer-events:auto}
.member-banner-image{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center top;display:block}
.member-banner::after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,#00182d99 0%,#00182d40 26%,transparent 48%);pointer-events:none}
:root .authenticated-shell .member-identity{position:relative;z-index:1;display:inline-flex;align-items:center;gap:20px;height:100%;padding:18px clamp(20px,2vw,36px);max-width:100%;color:#fff;text-decoration:none}
.member-section-logo{display:block;width:clamp(68px,5.4vw,96px);height:clamp(68px,5.4vw,96px);object-fit:contain;flex:none;filter:drop-shadow(0 2px 5px #0007)}
.member-wordmark{display:flex;flex-direction:column;gap:3px;min-width:0;text-shadow:0 2px 5px #001624}
.member-wordmark strong{font-size:clamp(27px,2.5vw,43px);line-height:1.15;letter-spacing:.025em;font-weight:780;overflow-wrap:anywhere}
.member-wordmark>span{font-size:clamp(12px,1.1vw,17px);line-height:1.3;color:#f0f6ff;overflow-wrap:anywhere;max-width:650px}
.authenticated-shell .member-session{display:flex;align-items:center;justify-content:flex-end;gap:0;margin-left:var(--sidebar);height:var(--member-session-height);background:var(--member-side);border-bottom:1px solid var(--member-line);padding:0 18px;pointer-events:auto;color:var(--member-ink);font-size:12px;font-weight:600}
.member-session .nav-icon{width:17px;height:17px;color:var(--member-accent)}
.member-clock,.member-account{display:inline-flex;align-items:center;gap:6px;min-width:0;padding:0 12px;line-height:24px;font-variant-numeric:tabular-nums}
.member-clock{white-space:nowrap}
:root .authenticated-shell .member-session .member-account{color:var(--member-ink);border-left:1px solid var(--member-line);border-right:1px solid var(--member-line);overflow-wrap:anywhere}
:root .authenticated-shell .member-session button{display:inline-flex;gap:6px;align-items:center;background:transparent;border:0;border-radius:0;box-shadow:none;color:var(--member-ink);min-height:26px;padding:3px 10px;font:inherit;cursor:pointer}
:root .authenticated-shell .member-session button:hover{background:#ffffff12;text-decoration:underline}
:root .authenticated-shell .member-session .member-menu-toggle{display:none}
.authenticated-shell .workspace{margin-left:var(--sidebar);padding-top:var(--member-top);min-height:100dvh;min-width:0}
.authenticated-shell .sidebar{top:var(--member-banner-height);bottom:0;height:calc(100dvh - var(--member-banner-height));width:var(--sidebar);padding:12px 16px 16px;background:var(--member-side);border-right:1px solid var(--member-line);box-shadow:none;z-index:65;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:var(--member-line) var(--member-side)}
.authenticated-shell .sidebar>*{flex-shrink:0}
.authenticated-shell .sidebar .nav-label{margin:16px 8px 8px;padding-top:16px;border-top:1px solid var(--member-line);font-size:11px;letter-spacing:.16em;color:var(--member-muted);font-weight:750}
.authenticated-shell .sidebar>.nav-label:first-of-type{border-top:0;padding-top:0;margin-top:12px}
.authenticated-shell .sidebar nav{gap:3px}
.authenticated-shell .sidebar nav a{min-height:42px;padding:8px 11px;gap:12px;border-radius:9px;line-height:1.3;font-size:14px;color:var(--member-ink);font-weight:650;transform:none}
.authenticated-shell .sidebar nav a .nav-icon{color:var(--member-accent)}
.authenticated-shell .sidebar nav a:hover{background:#ffffff0c;border-color:var(--member-line);transform:none}
.authenticated-shell .sidebar nav a.active{background:var(--member-active-bg);border-color:var(--member-accent);color:var(--member-active-ink);box-shadow:0 0 12px #00cce818}
.authenticated-shell .sidebar nav a.active .nav-icon{color:currentColor}
.authenticated-shell .sidebar .sidebar-bottom{margin-top:auto;padding:14px 10px 0;border-top:0;color:var(--member-muted)}
.member-version{display:flex;gap:10px;align-items:center;font-size:12px;color:var(--member-ink);padding:12px 0;border-block:1px solid var(--member-line)}
.member-ure{display:flex;justify-content:center;align-items:center;min-height:82px;padding:10px 0}
.ure-footer-logo{display:block;width:74px;height:82px;object-fit:contain}
.ure-footer-label{font-size:22px;font-weight:750;color:var(--member-ink)}
.authenticated-shell .sidebar-bottom small{display:block;color:var(--member-muted);font-size:11px;line-height:1.35;text-align:center;margin:3px 0 12px}
:root .authenticated-shell .sidebar .member-rules{display:flex;align-items:center;justify-content:center;gap:8px;color:var(--member-accent);font-size:13px;border-top:1px solid var(--member-line);padding-top:12px}
.authenticated-shell main,.authenticated-shell .public-main{padding:18px 24px 28px;max-width:none;min-width:0;width:100%}
.authenticated-shell .assistance-banner{position:relative;z-index:2;margin:0;padding:12px 24px}
/* Header editor is a separate save operation; does not modify theme/QSL forms. */
.header-image-settings{margin-top:30px;padding-top:24px;border-top:1px solid var(--border);min-width:0}
.header-image-grid{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(260px,1fr);gap:24px;align-items:start}
.header-preview-column,.header-image-controls{min-width:0}
.header-preview{margin:0;border:1px solid var(--border);border-radius:12px;overflow:hidden;background:var(--bg)}
.header-preview img{width:100%;aspect-ratio:8/1;object-fit:cover;display:block}
.header-preview figcaption{padding:10px 14px;font-size:12px;color:var(--text)}
.header-mobile-preview>div{width:min(100%,320px);height:104px;overflow:hidden;border:1px solid var(--border);border-radius:8px}
.header-mobile-preview img{height:100%;width:100%;object-fit:cover;display:block}
.header-image-controls label{color:var(--text);margin-bottom:12px;font-size:13px}
.header-image-controls input[type=file]{max-width:100%;font-size:12px}
.header-image-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.header-image-actions button{white-space:normal}
.header-file-info,.header-image-error,.header-image-status{overflow-wrap:anywhere;font-size:13px;margin:12px 0 0}
:root .app-shell .header-image-error{color:#ffbac1;background:#6e1d2d;padding:10px 12px;border:1px solid #b95a6c;border-radius:7px}
:root .app-shell .header-image-status{color:var(--text)}
@media(max-width:1050px){.authenticated-shell{--sidebar:230px}.header-image-grid{grid-template-columns:minmax(0,1fr)}}
@media(max-width:650px){
 .authenticated-shell{--sidebar:268px;--member-banner-height:104px;--member-session-height:44px}
 .authenticated-shell .member-identity{gap:12px;padding:12px 16px;width:100%}
 .member-section-logo{width:62px;height:62px}
 .member-wordmark strong{font-size:26px}.member-wordmark>span{font-size:12px;max-width:280px}
 .authenticated-shell .workspace{margin-left:0}
 .authenticated-shell .member-session{margin-left:0;padding:0 6px;font-size:11px;gap:0}
 :root .authenticated-shell .member-session .member-menu-toggle{display:inline-flex;margin-right:auto;padding:4px 8px;min-height:40px}
 .member-clock,.member-account{padding:0 6px;gap:4px}
 :root .authenticated-shell .member-session button.member-logout{padding:4px 6px;min-height:40px}
 .member-session .nav-icon{width:16px;height:16px}
 .authenticated-shell .sidebar{top:var(--member-top);height:calc(100dvh - var(--member-top));width:var(--sidebar);transform:translateX(-100%);z-index:65}
 .authenticated-shell .sidebar.open{transform:translateX(0)}
 :root .authenticated-shell .sidebar-close{color:var(--member-ink);margin-bottom:0}
 .authenticated-shell .sidebar-backdrop{top:var(--member-top);height:calc(100dvh - var(--member-top));z-index:64}
 .authenticated-shell main,.authenticated-shell .public-main{padding:14px 12px 22px}
}
@media(max-width:360px){.member-session .member-clock .nav-icon{display:none}.member-menu-toggle>span{display:none}.member-wordmark strong{font-size:23px}.member-session .member-account{font-size:10px}}
@media(prefers-reduced-motion:reduce){.authenticated-shell .sidebar{transition:none}}

/* Keep institutional footer visible; only navigation scrolls on short viewports. */
.authenticated-shell .sidebar{display:flex;flex-direction:column;overflow:hidden}
.authenticated-shell .sidebar>.member-navigation{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;overscroll-behavior:contain}
.authenticated-shell .sidebar .member-navigation>.nav-label:first-child{border-top:0;padding-top:0;margin-top:12px}
.authenticated-shell .sidebar .sidebar-bottom{flex:0 0 auto;margin-top:0;padding:8px 10px 0}
.authenticated-shell .member-version{padding:9px 0}
.authenticated-shell .member-ure{min-height:76px;padding:8px 0}
.authenticated-shell .ure-footer-logo{height:72px;width:64px}
.authenticated-shell .sidebar .member-rules{padding-top:9px;margin-top:0}
:root[data-theme-preset="nomadas-dark"] .authenticated-shell .sidebar a[href="#/consulta"]>.nav-icon{color:#e5b74b}
@media(max-height:640px){.authenticated-shell .member-ure{min-height:50px;padding:4px 0}.authenticated-shell .ure-footer-logo{height:48px}.authenticated-shell .sidebar .nav-label{margin-top:10px;padding-top:10px}}

/* Compact the navigation, not the content, on standard-height laptops. */
@media(max-height:850px){
 .authenticated-shell .sidebar{padding:8px 12px 10px}
 .authenticated-shell .sidebar .nav-label{font-size:10px;line-height:1.3;margin:8px 6px 4px;padding-top:8px}
 .authenticated-shell .sidebar .member-navigation>.nav-label:first-child{margin-top:8px}
 .authenticated-shell .sidebar nav{gap:2px}
 .authenticated-shell .sidebar nav a{min-height:35px;padding:6px 10px;font-size:13px;gap:10px}
 .authenticated-shell .sidebar nav .nav-icon{width:20px;height:20px}
 .authenticated-shell .member-version{padding:7px 0;font-size:11px}
 .authenticated-shell .member-ure{min-height:66px;padding:6px 0}
 .authenticated-shell .ure-footer-logo{height:60px}
 .authenticated-shell .sidebar .member-rules{font-size:12px;padding-top:8px}
}
/* 4.5.0 · Mi progreso */
.mp-page .page-title{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;flex-wrap:wrap}
.mp-tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:12px;margin:14px 0}
.mp-tile{display:flex;flex-direction:column;gap:2px;padding:14px 16px;border:1px solid var(--border);border-radius:12px;background:#ffffff06}
.mp-tile span{color:var(--muted);font-size:.85em}
.mp-tile b{font-size:1.9em;line-height:1.15}
.mp-tile small{color:var(--muted)}
.mp-cats h2,.mp-air h2{margin-top:0}
.mp-cat{margin:12px 0}
.mp-cat-head{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:6px}
.mp-cat-head span{color:var(--muted)}
.mp-bar{height:10px;border-radius:6px;background:#ffffff12;overflow:hidden}
.mp-bar i{display:block;height:100%;background:var(--accent);border-radius:6px}
.mp-air{margin-top:14px}
.mp-air-row{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;padding:10px 12px;border:1px solid var(--border);border-radius:10px;margin:8px 0;color:inherit;text-decoration:none}
.mp-air-row:hover{border-color:var(--accent)}
.mp-air-meta{color:#6fe0a6}
/* 4.5.0 · Instalar la app (PWA) */
.pwa-install{margin:10px 0}.pwa-install-button{display:flex;align-items:center;gap:10px;width:100%;min-height:44px;padding:8px 12px;border-radius:10px;border:1px solid #2b6e8f;background:linear-gradient(100deg,#10324f,#0c2238);color:#e8f5ff;font-weight:600;font-size:13px;text-align:left;cursor:pointer}
.pwa-install-button:hover{border-color:#20c9ef}.pwa-install-button img{width:28px;height:28px;flex:0 0 28px}
.pwa-install.compact .pwa-install-button{font-size:12px;min-height:38px;padding:6px 10px}.pwa-install.compact .pwa-install-button img{width:22px;height:22px;flex-basis:22px}
.footer .pwa-install{margin:0}.footer .pwa-install-button{width:auto}
.pwa-install-help{margin-top:8px;padding:10px 12px;border:1px solid #2b5d7b;border-radius:9px;background:#071d32;color:#e8f5ff;font-size:12.5px;line-height:1.45}.pwa-install-help p{margin:0 0 6px}.pwa-install-help ol{margin:0 0 6px 18px;padding:0}.pwa-install-help .muted{opacity:.8;margin:0}
/* 4.5.0 · Estadísticas públicas (reutiliza .mp-tile, .mp-cat y .mp-bar de «Mi progreso») */
.st-tiles{grid-template-columns:repeat(5,minmax(0,1fr))}
.st-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin-top:18px}.st-card h2{font-size:18px;margin:0 0 14px}.st-card h2 small{font-size:12px;font-weight:500;margin-left:6px}.st-wide{grid-column:1/-1}
.st-days{display:flex;align-items:flex-end;gap:3px;height:150px;padding-bottom:18px;position:relative}.st-day{flex:1;height:100%;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;position:relative}.st-day-bar{width:100%;border-radius:4px 4px 0 0;background:linear-gradient(180deg,#20c9ef,#1173b3);min-height:0}.st-day small{position:absolute;bottom:-17px;font-size:9px;color:var(--muted)}.st-day small.weekend{color:#f2c14e}
.st-axis{display:flex;justify-content:space-between;margin:4px 0 0;font-size:11px}
.st-row{display:grid;grid-template-columns:64px 1fr 64px;align-items:center;gap:10px;margin:8px 0}.st-row>span{text-align:right;font-variant-numeric:tabular-nums}.st-row .mp-bar{margin:0}
.st-hours{display:flex;align-items:flex-end;gap:2px;height:110px;padding-bottom:16px}.st-hour{flex:1;height:100%;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;position:relative}.st-hour span{width:100%;border-radius:3px 3px 0 0;background:#2b7fb0}.st-hour span.peak{background:#20c9ef}.st-hour small{position:absolute;bottom:-15px;font-size:9px;color:var(--muted)}
.st-top{margin:0;padding-left:20px}.st-top li{margin:7px 0}.st-top li span{display:block;font-size:12px}
@media(max-width:1100px){.st-tiles{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){.st-grid{grid-template-columns:1fr}.st-tiles{grid-template-columns:repeat(2,minmax(0,1fr))}.st-days{gap:2px;height:120px}.st-day small{display:none}}

/* 4.5.1 · «Actualizado …» junto al botón y canal de Telegram (portada, pie y panel del activador) */
.page-updated{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.page-updated small{font-size:12px}
.telegram-callout{display:flex;align-items:center;gap:16px;margin:22px 0;padding:16px 20px;border:1px solid #2f8fc4;border-radius:14px;background:linear-gradient(100deg,#0f3554,#0c2338);color:#e8f5ff;text-decoration:none}
.telegram-callout:hover{border-color:#20c9ef;text-decoration:none}.telegram-callout-icon{font-size:28px}.telegram-callout b{display:block;font-size:16px}.telegram-callout small{display:block;color:#b8d3e6;font-size:13px;margin-top:2px}
.telegram-callout-go{margin-left:auto;white-space:nowrap;padding:8px 14px;border-radius:10px;background:#20c9ef;color:#05243a;font-weight:700;font-size:13px}
@media(max-width:650px){.telegram-callout{flex-wrap:wrap;padding:14px}.telegram-callout-go{margin-left:0;width:100%;text-align:center}}
/* 4.5.2 · Mi progreso sin título visible (el menú ya lo nombra): el botón Actualizar queda a la derecha */
.page-title.mp-head>button{margin-left:auto}
/* 4.6.1 · Página de espera de la solicitud («Mientras esperas») y franja de aviso */
.pending-banner{padding:9px 18px;background:#3a2f0b;border-bottom:1px solid #8a6d1c;color:#ffe9a8;font-size:13.5px;text-align:center}.pending-banner a{color:#ffd35c;font-weight:700;margin-left:4px}
.wait-page{max-width:980px}.wait-call{margin:0 0 10px;font-weight:700;letter-spacing:.04em}
.wait-steps{list-style:none;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:0 0 16px;padding:0;counter-reset:w}
.wait-steps li{counter-increment:w;padding:12px 14px;border:1px solid var(--border);border-radius:12px;color:var(--muted);font-size:13.5px}
.wait-steps li::before{content:counter(w);display:inline-grid;place-items:center;width:22px;height:22px;border-radius:50%;margin-right:8px;background:#ffffff14;font-size:12px;font-weight:700}
.wait-steps li b{color:var(--text)}.wait-steps li small{display:block;margin-top:4px}
.wait-steps li.done{border-color:#2e7d5a;background:#123527}.wait-steps li.done::before{content:'✓';background:#2e9f6a;color:#06281a}
.wait-steps li.now{border-color:#c79a2a;background:#33290d}.wait-steps li.now::before{background:#f2c14e;color:#2b1a00}.wait-steps li.now small{color:#ffe1a0}
.wait-mail{margin:6px 0 14px;padding:12px 14px;border-radius:10px;background:#0f3554;border:1px solid #2f8fc4;color:#e8f5ff;font-size:14px}
.wait-nudge{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:0 0 16px}.wait-code{margin:0 0 10px}
.wait-h{font-size:17px;margin:22px 0 10px}
.wait-guide{list-style:none;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:0;padding:0;counter-reset:g}
.wait-guide li{counter-increment:g;padding:12px 14px;border:1px solid var(--border);border-radius:12px;font-size:13.5px}.wait-guide li b::before{content:counter(g) '. '}.wait-guide li span{display:block;color:var(--muted);margin-top:4px}
.wait-links{display:flex;flex-wrap:wrap;gap:10px}
@media(max-width:760px){.wait-steps,.wait-guide{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* 4.7.0 · Visitantes (Administración → Inicio) */
.admin-visits .st-card{margin-top:16px}.visits-views{position:relative;background:#1b4f78!important;display:flex;align-items:flex-end}.visits-people{display:block;width:100%;background:#20c9ef;border-radius:4px 4px 0 0}
.visits-key{display:inline-block;width:10px;height:10px;border-radius:2px;vertical-align:middle;margin:0 3px 0 8px}.visits-key.people{background:#20c9ef}.visits-key.views{background:#1b4f78}
.visits-row{grid-template-columns:170px 1fr 70px}
:root .app-shell .home-install{margin:18px 0}:root .app-shell .home-install .pwa-install-button{width:auto;min-height:48px;padding:10px 18px;justify-content:flex-start;border:1px solid #2b6e8f;background:linear-gradient(100deg,#10324f,#0c2238);color:#e8f5ff;font-size:14px;box-shadow:none}:root .app-shell .home-install .pwa-install-button:hover{border-color:#20c9ef}
.visits-switch{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:12px 0 4px;padding:12px 16px;border-left:4px solid #20c9ef}.visits-switch.off{border-left-color:#f0b429}.visits-switch p{margin:4px 0 0}
.closed-banner{margin:0 auto 12px;max-width:1310px;padding:12px 16px;border-radius:12px;border:1px solid #f0b429;background:rgba(240,180,41,.12);color:inherit}.closed-hint{border-left:4px solid #f0b429;padding-left:10px}.closing-panel{grid-column:1/-1;margin-top:14px;border:1px solid #2b6e8f;border-radius:12px;padding:12px 16px}.closing-panel.closed{border-color:#f0b429}.closing-panel legend{font-weight:700;padding:0 6px}.closing-row{display:flex;flex-wrap:wrap;align-items:flex-end;gap:10px;margin-top:10px}.closing-state{margin:4px 0}
.photo-credit{font-size:12.5px;opacity:.85}.photo-credit a{color:inherit;text-decoration:underline}
