/* 0.1.4 approved brand, compact navigation, real-data Dashboard and login alignment. */
:root { --portal-sidebar:#082747; --portal-sidebar-2:#051d38; --portal-text:#152e4d; --portal-muted:#61748d; --portal-border:#dfe9f4; --portal-accent:#147be5; --portal-accent-2:#0763cf; --portal-bg:#f4f7fc; --nimble-sidebar-width:262px; }
.portal-sidebar { width:var(--nimble-sidebar-width); padding:18px 14px 12px; display:flex; flex-direction:column; overflow-y:auto; scrollbar-gutter:auto; }
.portal-main { margin-left:var(--nimble-sidebar-width); width:calc(100% - var(--nimble-sidebar-width)); min-width:0; }
.portal-brand { background:none; padding:3px 2px 14px; border-radius:0; margin:0 0 12px; flex:0 0 auto; justify-content:center; }
.portal-brand-logo { display:block; width:100%; max-width:226px; height:auto; object-fit:contain; }
.portal-user { background:none; border:0; border-bottom:1px solid #3c536f; border-radius:0; padding:0 10px 22px; margin:0 0 15px; flex:0 0 auto; }
.portal-user .avatar,.account-avatar { border-radius:50%; background:#c9e6ff; color:#085cad; flex-shrink:0; }
.portal-user .avatar { width:46px; height:46px; margin-right:12px; }
.user-details { min-width:0; }
.portal-user .fw-bold { font-size:.88rem; overflow-wrap:anywhere; }
.portal-user .user-role { display:block; font-size:.78rem; margin:3px 0; color:#e1eafa; }
.user-location { display:flex; align-items:center; gap:6px; font-size:.74rem; color:#d0dcee; }
.portal-nav { flex:0 0 auto; }
.portal-nav .nav-link,.sidebar-footer>.nav-link { min-height:44px; margin:0 0 5px; padding:10px 13px; gap:12px; font-size:.86rem; border-radius:10px; display:flex; align-items:center; color:#ecf3ff; }
.portal-nav .nav-link>.bi:first-child,.sidebar-footer>.nav-link>.bi { width:22px; flex-shrink:0; text-align:center; font-size:1.18rem; }
.portal-nav .nav-link.active { background:linear-gradient(120deg,#1882ed,#0863d1); box-shadow:0 4px 12px #001b3420; }
.portal-nav .nav-link:hover:not(.active),.sidebar-footer>.nav-link:hover { background:#ffffff12; }
.nav-destination { margin-left:auto; font-size:.7rem !important; }
.sidebar-footer { margin-top:auto; padding-top:20px; }
.account-dropdown { border-top:1px solid #3c536f; padding-top:14px; position:relative; }
.account-dropdown summary { list-style:none; display:flex; align-items:center; gap:10px; cursor:pointer; padding:6px; font-size:.82rem; min-height:44px; border-radius:8px; }
.account-dropdown summary::-webkit-details-marker { display:none; }
.account-dropdown summary>.bi { margin-left:auto; }
.account-avatar { display:inline-flex; align-items:center; justify-content:center; width:30px; height:30px; background:#396290; color:#fff; }
.account-name { min-width:0; overflow-wrap:anywhere; }
.account-links { background:#fff; border:1px solid var(--portal-border); border-radius:12px; padding:6px; box-shadow:0 10px 25px #0003; position:absolute; bottom:calc(100% - 5px); left:0; right:0; z-index:10; }
.account-links a,.account-links button { width:100%; display:flex; align-items:center; gap:10px; border:0; border-radius:7px; padding:12px; background:none; color:var(--portal-text); font:inherit; font-size:.82rem; min-height:44px; text-align:left; }
.account-links a:hover,.account-links button:hover { background:#edf5ff; }
.portal-sidebar a:focus-visible,.account-dropdown summary:focus-visible { outline:2px solid #82caff; outline-offset:2px; }
.portal-topbar { background:#fff; color:var(--portal-text); border-bottom:1px solid var(--portal-border); padding:15px 26px; }
.portal-topbar h2 { color:var(--portal-text) !important; font-weight:700; }
.portal-topbar .text-secondary { color:#65738b !important; font-size:.71rem; letter-spacing:.035em; }
.portal-topbar .top-pill { background:#edf5ff; color:#0763cd; border:0; border-radius:25px; }
.portal-topbar .scope-pill select { color:#0763cd; font-weight:600; max-width:225px; }
.portal-topbar .scope-pill select:focus-visible { outline-color:#147be5; }
.portal-content { padding:22px 26px; }
.page-identity { display:flex; align-items:center; gap:12px; }
#mobile-nav-toggle { display:none; }
.workspace-tabs { background:#fff; border:1px solid var(--portal-border); border-radius:14px; margin-bottom:22px; padding:14px 18px 0; }
.workspace-label { font-size:.95rem; font-weight:700; display:block; }
.workspace-links { display:flex; flex-wrap:wrap; gap:4px 18px; margin-top:8px; }
.workspace-tab { display:inline-flex; align-items:center; min-height:44px; padding:10px 4px; font-size:.86rem; color:#546986; border-bottom:3px solid transparent; }
.workspace-tab.active { color:#0865d5; border-bottom-color:#0875ec; font-weight:650; }
.workspace-tab:hover,.workspace-tab:focus-visible { color:#0056b8; background:#f1f7ff; }
#content .page-heading { background:transparent; color:var(--portal-text); padding:0; }
#content .page-heading .muted { color:var(--portal-muted); }
#content .panel-title,#content .step-title,#content .form-section-card>h2 { background:transparent; color:var(--portal-text); padding:0 0 10px; }
#content table.table>thead>tr>th,#content .nimble-grid-host .dt-scroll-head,#content .nimble-grid-host .dt-scroll-head th { background:#f8fbff; color:#3e5477; --bs-table-bg:#f8fbff; --bs-table-color:#3e5477; border-color:var(--portal-border); }
#content .dt-column-order { color:#6c82a0; }
.portal-panel,.portal-table-card,.step-card,.form-section-card { box-shadow:0 2px 8px #12365c04; }
.dashboard-hero { position:relative; overflow:hidden; background:linear-gradient(115deg,#082445,#19467e); color:#fff; border-radius:13px; padding:26px 30px; margin-bottom:18px; min-height:138px; }
.dashboard-hero>div { position:relative; z-index:1; }
.dashboard-hero h1 { font-size:clamp(1.35rem,2.15vw,1.85rem); font-weight:750; margin:7px 0; letter-spacing:-.025em; }
.dashboard-hero p { margin:0; color:#dce8ff; font-size:.91rem; }
.dashboard-hero .hero-eyebrow { font-size:.73rem; letter-spacing:.07em; }
.dashboard-hero .hero-context { font-size:.76rem; margin-top:10px; color:#c3d8f8; }
.hero-watermark { position:absolute; width:285px; height:180px; right:40px; top:0; opacity:.16; transform:rotate(-6deg); }
.dashboard-actions,.dashboard-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:15px; }
.dashboard-actions { margin-bottom:16px; }
.quick-action-card,.metric-card,.recent-card,.dashboard-admin { background:#fff; border:1px solid var(--portal-border); border-radius:13px; box-shadow:0 2px 8px #12365c03; }
.quick-action-card { display:flex; gap:14px; padding:19px 17px; align-items:flex-start; }
.dashboard-icon { display:inline-flex; align-items:center; justify-content:center; border-radius:50%; width:52px; height:52px; flex-shrink:0; background:#eaf4ff; color:#0879eb; font-size:1.55rem; }
.small-icon { width:41px; height:41px; font-size:1.3rem; }
.quick-card-body { min-width:0; flex:1; }
.quick-card-heading { display:flex; justify-content:space-between; gap:8px; font-size:.93rem; font-weight:700; color:#112947; margin-bottom:7px; }
.quick-card-heading>.bi { font-size:.72rem; color:#6683a8; }
.quick-action-card p { min-height:43px; margin:0 0 12px; font-size:.8rem; line-height:1.55; color:#5a6f8a; }
.quick-action-card .btn { min-height:40px; font-size:.82rem; padding:.5rem .8rem; background:#eaf4ff; border:0; }
.metric-card { padding:17px 15px 13px; min-width:0; }
.metric-top { display:flex; align-items:flex-start; gap:11px; }
.metric-top>div { min-width:0; }
.metric-top h3 { margin:2px 0 5px; font-size:.75rem; color:#526c8d; font-weight:600; }
.metric-value { font-size:1.7rem; line-height:1.2; color:#112e53; }
.metric-sparkline { color:#3b8be3; width:96px; min-width:42px; height:55px; margin-left:auto; align-self:flex-end; overflow:visible; }
.metric-ivrs .metric-sparkline { color:#df9360; }
.metric-onboardings .metric-sparkline { color:#26a488; }
.sparkline-baseline { stroke:#dfe8f1; stroke-width:1; }
.sparkline-line { fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.sparkline-area { fill:currentColor; opacity:.10; }
.metric-sparkline circle { fill:currentColor; }
.metric-activity { font-size:.72rem; color:#61748d; margin:11px 0 3px; }
.metric-change { display:flex; align-items:center; gap:5px; font-size:.72rem; margin:0; color:#59718c; }
.trend-up { color:#07805e; }
.trend-down,.trend-neutral { color:#526d8c; }
.metrics-caption { color:#6a7d93; font-size:.71rem; margin:9px 2px 18px; line-height:1.55; }
.metrics-caption details { display:block; margin-top:4px; }
.metrics-caption summary { cursor:pointer; color:#45698e; }
.metrics-caption ul { margin:10px 0; padding-left:20px; }
.dashboard-recent { display:grid; grid-template-columns:minmax(0,1.15fr) minmax(0,1fr); gap:16px; }
.recent-card { min-width:0; padding:16px; }
.recent-card header { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:13px; }
.recent-card h2,.dashboard-admin h2 { font-size:1rem; margin:0; font-weight:700; }
.recent-card header a { font-size:.77rem; white-space:nowrap; }
.recent-scroll { border:1px solid var(--portal-border); border-radius:10px; overflow:auto; max-height:340px; }
.recent-scroll .table { margin:0; font-size:.76rem; }
.recent-scroll .table th { font-size:.65rem; text-transform:uppercase; white-space:nowrap; position:sticky; top:0; z-index:2; padding:11px 10px; }
.recent-scroll .table td { padding:10px; vertical-align:middle; }
.recent-scroll .table td:first-child { white-space:nowrap; }
.recent-scroll .btn-sm { min-height:32px; padding:5px 9px; font-size:.72rem; gap:3px; }
.recent-scroll .btn-sm>.bi { display:none; }
.recent-scroll .status-pill { font-size:.65rem; padding:5px 9px; white-space:nowrap; }
.dashboard-admin { margin-top:17px; padding:17px 20px 0; }
.admin-overview { display:flex; align-items:center; gap:12px; }
.admin-overview p { margin:4px 0 0; font-size:.78rem; color:#61748d; }
.admin-overview>.btn { margin-left:auto; font-size:.78rem; min-height:38px; }
.dashboard-admin-links { display:flex; gap:22px; flex-wrap:wrap; margin-top:12px; }
.dashboard-admin-links a { padding:11px 2px; font-size:.8rem; color:#47658a; min-height:44px; }
.dashboard-admin-links a:hover { color:#0763cf; border-bottom:2px solid; }
.auth-logo { display:flex; align-items:center; width:100%; max-width:340px; margin-bottom:28px; }
.auth-logo img { display:block; width:100%; max-width:340px; height:auto; object-fit:contain; object-position:left center; }
.auth-brand { background:linear-gradient(130deg,#082445,#19467e); }
/* Only the sign-in screen gets the supplied blue-wave background. */
.auth-shell[data-source-template="index.html"] .auth-brand {
    background-color:#082445;
    background-image:linear-gradient(110deg,rgba(2,20,48,.42),rgba(2,20,48,.18)),url("/assets/nimble-login-background.avif");
    background-position:center;
    background-repeat:no-repeat;
    background-size:cover;
}
.auth-brand .badge { font-size:.69rem; letter-spacing:.04em; }
.auth-utility-actions { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; width:100%; }
.auth-utility-actions .btn { width:100%; min-width:0; font-size:.83rem; padding:10px 6px; white-space:normal; }
@media(min-width:992px) and (max-width:1279.98px) { .dashboard-actions,.dashboard-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); } .dashboard-recent { grid-template-columns:1fr; } }
@media(max-width:991.98px) {
    .portal-sidebar { display:none; position:relative; width:100%; max-height:70dvh; inset:auto; }
    .mobile-menu-open .portal-sidebar { display:flex; }
    .portal-shell { display:block; }
    .portal-main { margin-left:0; width:100%; }
    #mobile-nav-toggle { display:inline-flex; min-height:40px; padding:8px; }
    .sidebar-footer { padding-top:12px; }
    .account-links { position:static; }
    .portal-brand { margin-bottom:14px; }
    .portal-content { padding:18px; }
    .dashboard-actions,.dashboard-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .dashboard-recent { grid-template-columns:1fr; }
}
@media(max-width:575.98px) {
    .portal-content,.portal-topbar { padding:14px; }
    .dashboard-actions,.dashboard-metrics { grid-template-columns:1fr; }
    .quick-action-card p { min-height:0; }
    .scope-controls,.scope-controls .top-pill { width:100%; }
    .scope-controls select { width:100%; max-width:none; }
    .dashboard-hero { padding:24px 20px; }
    .hero-watermark { right:-80px; }
    .admin-overview { flex-wrap:wrap; }
    .admin-overview>.btn { margin-left:0; }
    .auth-form-wrap,.auth-brand { padding:26px; }
    .auth-utility-actions { gap:7px; }
    .auth-utility-actions .btn { font-size:.72rem; padding:9px 4px; }
    .workspace-links { gap:0 12px; }
}
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { scroll-behavior:auto !important; } }
/* Keep the longest destination on one line without shrinking the whole menu. */
.portal-nav .nav-link { gap:9px; }
.portal-nav .nav-link span { white-space:nowrap; font-size:.83rem; }
.portal-nav .nav-link .nav-destination { width:10px; flex:0 0 10px; }
.recent-scroll .table td[colspan] { white-space:normal; min-width:220px; }
.quick-card-body { display:flex; flex-direction:column; align-self:stretch; }
.quick-card-body p { flex:1; }
.quick-card-body>.btn { align-self:flex-start; }
