/* Shared admin presentation, based on the approved VitaPonte CRM layout.
   Scoped to admin shells; agency identity, permissions and records stay in their existing loaders. */
:root{--admin-menu:#123a57;--admin-menu-active:#2d648a;--admin-menu-text:#e8f2f9;--admin-menu-muted:#b5cede;--admin-surface:#f2f6fa;--admin-border:#d8e5ee}
body.vp-admin-theme{background:var(--admin-surface);color:#173b55}
body.vp-admin-theme>#main,body.vp-admin-theme .layout>#main{min-width:0}
body.vp-admin-theme #nav,body.vp-admin-theme #admin-sidebar{background:var(--admin-menu);color:var(--admin-menu-text);border:0;scrollbar-color:#64869e var(--admin-menu)}
body.vp-admin-theme #nav button,body.vp-admin-theme #nav .vp-nav-items button,body.vp-admin-theme #admin-sidebar #tabs button{background:transparent;color:var(--admin-menu-text);font-family:Arial,sans-serif;font-size:16px;font-weight:400;line-height:1.45;min-height:46px;padding:11px 13px;border-radius:8px;box-shadow:none}
body.vp-admin-theme #nav button.on,body.vp-admin-theme #nav .vp-nav-items button.on,body.vp-admin-theme #admin-sidebar #tabs button.active{background:var(--admin-menu-active);color:white;font-weight:700}
body.vp-admin-theme #nav button:hover,body.vp-admin-theme #admin-sidebar #tabs button:hover{background:#234f6f;color:white}
body.vp-admin-theme #nav button.on:hover,body.vp-admin-theme #admin-sidebar #tabs button.active:hover{background:#356f95;color:white}
body.vp-admin-theme #nav .vp-nav-group,body.vp-admin-theme #admin-sidebar #tabs details{border-bottom:1px solid #ffffff24;padding:6px 0}
body.vp-admin-theme #nav .vp-nav-group summary,body.vp-admin-theme #admin-sidebar #tabs summary{color:var(--admin-menu-muted);font:700 12px/1.5 Arial,sans-serif;letter-spacing:1.1px;text-transform:uppercase;padding:14px 10px}
body.vp-admin-theme #nav .mc-menu-search,body.vp-admin-theme #admin-sidebar .menu-search input{background:#1d4765;border:1px solid #63829b;color:white;border-radius:8px;box-sizing:border-box;max-width:100%}
body.vp-admin-theme #nav .mc-menu-search::placeholder,body.vp-admin-theme #admin-sidebar .menu-search input::placeholder{color:#c5d7e5;opacity:1}
body.vp-admin-theme #admin-sidebar .menu-search,body.vp-admin-theme #admin-sidebar .portal-link{color:var(--admin-menu-muted)}
body.vp-admin-theme #nav :focus-visible,body.vp-admin-theme #admin-sidebar :focus-visible{outline:3px solid #8bc9ed;outline-offset:2px}
body.vp-admin-theme .panel,body.vp-admin-theme #main .card,body.vp-admin-theme #admin-main .card{border-color:var(--admin-border);border-radius:13px;background:white;box-shadow:0 2px 8px #173b5504}
body.vp-admin-theme #main h1,body.vp-admin-theme #admin-main h1{color:#173b55;line-height:1.25}
body.vp-admin-theme #main .panel{padding:24px;margin-bottom:22px}
@media(min-width:751px){
 body.vp-admin-theme:has(>.layout>#nav),body.vp-admin-theme:has(>.admin-layout>#admin-sidebar){display:grid;grid-template-columns:260px minmax(0,1fr);grid-template-rows:auto 1fr;align-items:start;min-height:100vh;background:linear-gradient(to right,var(--admin-menu) 260px,var(--admin-surface) 260px)}
 body.vp-admin-theme:has(>.layout>#nav)>header,body.vp-admin-theme:has(>.admin-layout>#admin-sidebar)>header{grid-column:1;grid-row:1;position:static;display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;width:260px;height:auto;min-height:120px;gap:12px;padding:26px 20px 12px;background:var(--admin-menu);color:white;border:0;box-shadow:none;z-index:auto}
 body.vp-admin-theme>header .brand{display:flex;flex-direction:column;align-items:flex-start;gap:8px;padding:0;color:white}
 body.vp-admin-theme>header .brand img,body.vp-admin-theme>header>a img{width:200px!important;height:74px!important;max-width:100%;object-fit:contain}
 body.vp-admin-theme>header .brand small,body.vp-admin-theme>header small,body.vp-admin-theme>header .muted{color:var(--admin-menu-muted)!important;font-size:12px!important;line-height:1.5}
 body.vp-admin-theme>header b{font-size:18px}
 body.vp-admin-theme>.layout,body.vp-admin-theme>.admin-layout{display:contents}
 body.vp-admin-theme #nav,body.vp-admin-theme #admin-sidebar{grid-column:1;grid-row:2;width:260px;max-height:none;position:static;align-self:stretch;min-height:calc(100vh - 160px);padding:14px 16px 28px}
 body.vp-admin-theme .layout>#main,body.vp-admin-theme #admin-main{grid-column:2;grid-row:1 / span 2;max-width:none;width:100%;margin:0;padding:32px 36px 50px!important}
 body.vp-admin-theme>footer{grid-column:2;margin:0;padding:18px 36px;background:var(--admin-surface)}
}
@media(max-width:750px){
 body.vp-admin-theme>header{background:var(--admin-menu);color:white;border:0}
 body.vp-admin-theme>header small,body.vp-admin-theme>header .muted{color:var(--admin-menu-muted)!important}
 body.vp-admin-theme .admin-menu-bar{background:var(--admin-menu);color:white;border-color:#ffffff25}
 body.vp-admin-theme .admin-menu-bar button,body.vp-admin-theme #admin-menu-toggle{background:#2d648a;color:white;border:1px solid #648ba7}
 body.vp-admin-theme #nav,body.vp-admin-theme #admin-sidebar{width:100%;max-height:65vh;overflow:auto;padding:12px}
 body.vp-admin-theme #main,body.vp-admin-theme #admin-main{padding:22px 16px!important}
 body.vp-admin-theme #main .panel{padding:18px}
}
/* Server-rendered support, project and privacy screens use the same navigation palette. */
.shell>.sidebar,.admin-frame-sidebar{background:var(--admin-menu);color:var(--admin-menu-text);border:0}
.shell>.sidebar .brand>span,.shell>.sidebar .brand>span>span,.shell>.sidebar .brand small{color:white}
.shell>.sidebar .nav-caption,.shell>.sidebar .side-bottom,.shell>.sidebar .side-bottom strong,.shell>.sidebar .nav-link{color:var(--admin-menu-muted)}
.shell>.sidebar nav button{color:var(--admin-menu-text);font-size:14px}
.shell>.sidebar nav button.active{background:var(--admin-menu-active);color:white}
.shell>.sidebar nav button:hover,.shell>.sidebar .nav-link:hover{background:#234f6f;color:white}
.shell>.workspace{background:var(--admin-surface)}
.crm-sidebar nav button:hover:not(:disabled),.crm-sidebar>a:not(.crm-brand):hover{background:#234f6f;color:white}
.crm-sidebar nav button.active:hover:not(:disabled){background:#356f95;color:white}
.admin-frame{display:flex;min-height:100vh;background:var(--admin-surface)}
.admin-frame-sidebar{width:245px;flex:0 0 245px;padding:28px 18px}
.admin-frame-brand{display:flex;align-items:center;gap:10px;color:white;font-size:24px;font-weight:700;text-decoration:none;margin-bottom:36px}
.admin-frame-brand img{width:48px;height:48px;object-fit:contain;border-radius:10px}
.admin-frame-brand small{display:block;font-size:10px;letter-spacing:2px;margin-top:5px}
.admin-frame-sidebar details>summary{font-size:11px;letter-spacing:1.4px;color:var(--admin-menu-muted);padding:12px 10px;cursor:pointer}
.admin-frame-sidebar nav{display:grid;gap:4px;margin-top:12px}
.admin-frame-sidebar nav a{color:var(--admin-menu-text);font:14px/1.5 Arial,sans-serif;text-decoration:none;padding:13px 12px;border-radius:8px}
.admin-frame-sidebar nav a[aria-current=page]{background:var(--admin-menu-active);color:white;font-weight:700}
.admin-frame-sidebar nav a:hover{background:#234f6f;color:white}
.admin-frame-sidebar :focus-visible{outline:3px solid #8bc9ed;outline-offset:2px}
.admin-frame-content{min-width:0;flex:1}
.admin-frame-content .privacy-page,.admin-frame-content .pm-app{max-width:none;background:var(--admin-surface);padding:28px 36px 50px;margin:0;width:100%}
@media(max-width:750px){.admin-frame{display:block}.admin-frame-sidebar{width:100%;padding:18px}.admin-frame-brand{font-size:21px;margin-bottom:12px}.admin-frame-sidebar details nav{grid-template-columns:repeat(2,minmax(0,1fr))}.admin-frame-content .privacy-page,.admin-frame-content .pm-app{padding:22px 16px}.admin-frame-sidebar nav a{padding:11px}}
