.permission-intro{margin-bottom:18px}
.permission-wrap{max-width:100%}
.permission-matrix{min-width:1850px}
.permission-matrix th,.permission-matrix td{text-align:center;vertical-align:middle}
.permission-matrix th:first-child,.permission-matrix td:first-child{text-align:left;position:sticky;left:0;z-index:2;background:#fff;min-width:210px}
.permission-matrix th:first-child{background:#f8f7f2;z-index:3}
.permission-matrix th:nth-child(2),.permission-matrix td:nth-child(2){position:sticky;left:210px;z-index:2;background:#fff;min-width:105px}
.permission-matrix th:nth-child(2){background:#f8f7f2;z-index:3}
.permission-matrix th span{display:block;white-space:normal;line-height:1.25}
.permission-matrix th small{display:block;color:var(--secondary);margin-top:4px}
.permission-check{display:grid;place-items:center}
.permission-check input{width:21px;height:21px;accent-color:var(--primary);cursor:pointer}
.permission-check input:disabled{cursor:not-allowed}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.student-filters{grid-template-columns:minmax(210px,1.3fr) minmax(150px,.8fr) minmax(260px,1.5fr) minmax(130px,.6fr) auto auto;align-items:center}
.student-filters select{min-width:0}
.directory-summary{font-weight:650;margin:8px 0 14px}
.row-number{width:58px;color:var(--muted);font-weight:700;text-align:center}
.compact-pager{align-items:center;margin-top:18px}
.compact-pager a{min-width:40px;text-align:center}
.compact-pager a.current{background:var(--primary);border-color:var(--primary);color:#fff;font-weight:800}
.pager-gap{padding:8px 3px;color:var(--muted);font-weight:800}
@media(max-width:1180px){.student-filters{grid-template-columns:1fr 1fr 1fr}}
@media(max-width:760px){.student-filters{grid-template-columns:1fr}.compact-pager{gap:5px}.compact-pager a{padding:7px 9px}}
.report-dimension-filters{grid-template-columns:repeat(2,minmax(145px,.7fr)) minmax(170px,1fr) minmax(150px,.9fr) minmax(230px,1.4fr) minmax(130px,.6fr) auto auto;align-items:center}
.log-filters{grid-template-columns:minmax(220px,1.4fr) minmax(150px,.8fr) minmax(150px,.8fr) minmax(145px,.7fr) minmax(135px,.65fr) minmax(135px,.65fr) auto auto;align-items:center}
.role-list{display:grid;gap:10px}.role-list>div{display:flex;justify-content:space-between;gap:15px;align-items:center;padding:12px 14px;border:1px solid var(--border);border-radius:8px;background:#f8f7f2}.role-list small{color:var(--muted)}
.sidebar-copyright{display:block;margin-top:10px;padding-top:12px;border-top:1px solid var(--border);color:var(--muted)!important;text-align:center;font-size:12px}
@media(max-width:1350px){.report-dimension-filters,.log-filters{grid-template-columns:repeat(4,1fr)}}
@media(max-width:900px){.report-dimension-filters,.log-filters{grid-template-columns:repeat(2,1fr)}}
@media(max-width:760px){.report-dimension-filters,.log-filters{grid-template-columns:1fr}.role-list>div{align-items:flex-start;flex-direction:column;gap:3px}}
.sidebar{overflow:hidden!important}
.sidebar .portal-brand{flex:0 0 auto;background:#fdfbf7;position:relative;z-index:2}
.sidebar nav{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;align-content:start;padding-right:3px;padding-bottom:10px}
.sidebar .sidebar-foot{flex:0 0 auto;margin-top:0;background:#fdfbf7;position:relative;z-index:2}
.topbar{position:sticky;top:0;z-index:12}
.scouts-table .recruiter-group td{background:#eaf0f6!important;color:var(--primary);padding:11px 14px;border-top:3px solid var(--primary);border-bottom:1px solid #ced9e5}
.recruiter-group span{display:inline-block;text-transform:uppercase;letter-spacing:.08em;font-size:11px;font-weight:800;color:var(--secondary);margin-right:10px}
.recruiter-group b{font-size:15px}
@media(max-width:760px){.nav-open:after{z-index:18!important}}
.audit-accuracy{display:grid;gap:4px;margin:0 0 18px;padding:14px 16px;border:1px solid #cdd9e5;border-left:4px solid var(--primary);border-radius:9px;background:#f3f7fb;color:var(--primary)}
.audit-accuracy span{color:var(--muted);font-size:13px;line-height:1.5}
.audit-table{min-width:1180px}.audit-table td{vertical-align:top}
.device-audit{display:grid;gap:5px;min-width:245px;max-width:360px}
.ip-address{font:700 13px/1.35 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;color:var(--primary)}
.device-badges{display:flex;flex-wrap:wrap;gap:5px}.device-badges span{display:inline-flex;padding:3px 7px;border-radius:999px;background:#e7edf4;color:var(--primary);font-size:11px;font-weight:800}
.device-badges .verified-hint{background:#e7f4e8;color:#276431}.device-audit small{display:block;color:var(--muted);line-height:1.35}.device-audit small b{color:var(--text)}
.device-audit details{margin-top:2px}.device-audit summary{cursor:pointer;color:var(--secondary);font-size:12px;font-weight:750}.device-audit details small{margin-top:5px}
.device-audit code{display:block;margin-top:6px;padding:8px;border:1px solid var(--border);border-radius:6px;background:#f8f7f2;color:#3b4654;font:11px/1.45 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;white-space:normal;overflow-wrap:anywhere}
.scout-row-actions{display:flex;align-items:center;gap:7px;white-space:nowrap}.scout-row-actions form{margin:0}.scout-row-actions .btn{padding:7px 10px;font-size:13px}
.btn.danger{background:var(--danger);color:#fff}.btn.danger:hover{background:#8f1d14;box-shadow:0 4px 12px rgba(180,35,24,.2)}
.edit-scout-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;margin-bottom:20px;padding-bottom:15px;border-bottom:1px solid var(--border)}.edit-scout-heading h2{margin-bottom:3px}.edit-scout-heading p{margin:0}.edit-scout-submit{display:flex;gap:8px;flex-wrap:wrap;margin:20px 0 0}
@media(max-width:760px){.edit-scout-heading{flex-direction:column}.scout-row-actions{align-items:stretch;flex-direction:column}.scout-row-actions .btn{width:100%;text-align:center}}
.subtab-count{display:inline-grid;place-items:center;min-width:22px;height:22px;margin-left:4px;padding:0 6px;border-radius:999px;background:var(--secondary);color:#fff;font-size:11px;font-weight:800}.subtabs a.active .subtab-count{background:#fff;color:var(--primary)}
.applications-table{min-width:1050px}.application-username{font-size:13px;letter-spacing:.04em}.application-status.pending{background:#fff3df;color:#9a5700}.application-status.approved{background:#e7f3eb;color:var(--success)}.application-status.rejected{background:#fee4e2;color:var(--danger)}
.application-review-actions{display:flex;gap:7px;align-items:center}.application-review-actions form{margin:0}.application-review-actions .btn{padding:8px 11px;font-size:13px}

/* Reference-inspired collapsible portal sidebar */
.portal-body{background:#e9edf2}.sidebar-icon-sprite{position:absolute;width:0;height:0;overflow:hidden}.portal-body .shell{min-height:100vh}.portal-body .sidebar{inset:12px auto 12px 12px;width:292px;height:auto;padding:18px 14px 14px;border:1px solid #e2e6eb;border-radius:16px;background:#fff!important;box-shadow:0 18px 45px rgba(30,48,70,.12);transition:width .24s ease,transform .24s ease;padding .24s ease;overflow:visible!important}.portal-body main{margin-left:316px;width:calc(100% - 316px);transition:margin-left .24s ease,width .24s ease}.portal-body .portal-brand{position:relative;flex:0 0 auto;display:flex;flex-direction:column;align-items:center;gap:3px;margin:0 8px 12px;padding:2px 4px 17px;border-bottom:1px solid #edf0f3;background:#fff!important;text-align:center}.portal-body .portal-brand .brand-logo{width:78px;height:66px;object-fit:contain;border:0;border-radius:0;background:transparent;padding:0;filter:drop-shadow(0 5px 9px rgba(30,58,95,.1))}.portal-body .brand-copy{display:grid;gap:1px;min-width:0}.portal-body .brand-copy b{color:var(--primary);font-size:15px;line-height:1.25}.portal-body .brand-copy small{color:#7b7d82;font-size:11px;letter-spacing:.02em}.sidebar-collapse{position:absolute;right:-33px;top:25px;z-index:4;width:32px;height:32px;display:grid;place-items:center;border:1px solid #e2e6eb;border-radius:9px;background:#fff;color:var(--primary);box-shadow:0 6px 18px rgba(30,48,70,.14);cursor:pointer;transition:.2s}.sidebar-collapse:hover{background:var(--primary);color:#fff}.sidebar-collapse span{display:block;font-size:25px;line-height:1;transform:translateY(-1px);transition:transform .24s ease}.portal-body .sidebar nav{flex:1 1 auto;display:grid;align-content:start;gap:3px;min-height:0;padding:3px 3px 12px;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin}.nav-section{display:block;padding:10px 12px 5px;color:#8a8b90;font-size:10px;font-weight:750;letter-spacing:.12em;text-transform:uppercase;white-space:nowrap}.nav-section-management{margin-top:9px;padding-top:17px;border-top:1px solid #edf0f3}.portal-body .sidebar nav .side-link{position:relative;display:flex;align-items:center;gap:12px;min-height:43px;padding:9px 12px;border-radius:10px;color:#666a70;text-decoration:none;font-weight:570;box-shadow:none;transition:background .18s ease,color .18s ease,transform .18s ease}.portal-body .side-link svg,.portal-body .sidebar-signout svg{width:21px;height:21px;flex:0 0 21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.portal-body .side-link>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.portal-body .sidebar nav .side-link:hover{background:#f5f6f7;color:var(--primary);transform:translateX(2px)}.portal-body .sidebar nav .side-link.active{background:#eef2f6;color:var(--primary);font-weight:730;box-shadow:inset 3px 0 0 var(--secondary)}.portal-body .sidebar-foot{flex:0 0 auto;margin:0!important;padding:13px 4px 0;border-top:1px solid #edf0f3;background:#fff!important}.account-row{display:grid;grid-template-columns:42px minmax(0,1fr) auto;align-items:center;gap:10px}.account-avatar{width:42px;height:42px;display:grid;place-items:center;border-radius:50%;background:linear-gradient(145deg,#f9b0c2,#f6d2d9);color:var(--primary);border:2px solid #fff;box-shadow:0 3px 12px rgba(30,58,95,.14);font-size:13px;font-weight:800}.account-copy{display:grid;min-width:0}.account-copy small{color:#8a8b90!important;font-size:9px;font-weight:750;letter-spacing:.08em;text-transform:uppercase}.account-copy b{overflow:hidden;color:#20252b!important;font-size:13px;text-overflow:ellipsis;white-space:nowrap}.portal-body .sidebar-signout{width:34px;height:34px;display:grid;place-items:center;padding:0!important;border-radius:9px;color:#7b7d82!important}.portal-body .sidebar-signout:hover{background:#fff0ee;color:var(--danger)!important}.portal-body .sidebar-signout span{display:none}.portal-body .sidebar-copyright{margin-top:9px;padding-top:8px!important;border-top:1px solid #f0f1f3!important;color:#92949a!important;font-size:10px;text-align:center}.sidebar-tooltip{position:fixed;z-index:1000;display:none;padding:8px 11px;border-radius:7px;background:#12161c;color:#fff;font-size:12px;font-weight:650;box-shadow:0 8px 22px rgba(0,0,0,.22);pointer-events:none;white-space:nowrap}.sidebar-tooltip.visible{display:block}
.sidebar-collapsed .portal-body .sidebar,.portal-body.sidebar-collapsed .sidebar{width:88px;padding-inline:12px}.sidebar-collapsed .portal-body main,.portal-body.sidebar-collapsed main{margin-left:112px;width:calc(100% - 112px)}.sidebar-collapsed .portal-body .portal-brand,.portal-body.sidebar-collapsed .portal-brand{margin-inline:0;padding-bottom:15px}.sidebar-collapsed .portal-body .portal-brand .brand-logo,.portal-body.sidebar-collapsed .portal-brand .brand-logo{width:54px;height:52px}.sidebar-collapsed .portal-body .brand-copy,.portal-body.sidebar-collapsed .brand-copy{display:none}.sidebar-collapsed .portal-body .sidebar-collapse,.portal-body.sidebar-collapsed .sidebar-collapse{right:-29px;top:19px}.sidebar-collapsed .portal-body .sidebar-collapse span,.portal-body.sidebar-collapsed .sidebar-collapse span{transform:rotate(180deg) translateY(1px)}.sidebar-collapsed .portal-body .sidebar nav,.portal-body.sidebar-collapsed .sidebar nav{padding-inline:3px}.sidebar-collapsed .portal-body .nav-section,.portal-body.sidebar-collapsed .nav-section{height:30px;padding:10px 0 4px;text-align:center;font-size:0}.sidebar-collapsed .portal-body .nav-section:after,.portal-body.sidebar-collapsed .nav-section:after{content:"";display:block;width:28px;height:1px;margin:auto;background:#edf0f3}.sidebar-collapsed .portal-body .nav-section-management,.portal-body.sidebar-collapsed .nav-section-management{border:0;margin-top:4px}.sidebar-collapsed .portal-body .side-link,.portal-body.sidebar-collapsed .side-link{justify-content:center;gap:0;padding:10px;transform:none!important}.sidebar-collapsed .portal-body .side-link>span,.portal-body.sidebar-collapsed .side-link>span{display:none}.sidebar-collapsed .portal-body .side-link.active,.portal-body.sidebar-collapsed .side-link.active{box-shadow:none}.sidebar-collapsed .portal-body .account-row,.portal-body.sidebar-collapsed .account-row{display:flex;flex-direction:column;gap:7px}.sidebar-collapsed .portal-body .account-copy,.portal-body.sidebar-collapsed .account-copy,.sidebar-collapsed .portal-body .sidebar-copyright,.portal-body.sidebar-collapsed .sidebar-copyright{display:none}.sidebar-collapsed .portal-body .sidebar-signout,.portal-body.sidebar-collapsed .sidebar-signout{display:grid}
@media(max-width:760px){.portal-body .sidebar{inset:0 auto 0 0;width:min(292px,88vw);border-radius:0;padding:17px 14px;transform:translateX(-105%)}.portal-body.nav-open .sidebar{transform:none}.portal-body main,.portal-body.sidebar-collapsed main{margin-left:0;width:100%}.portal-body .sidebar-collapse{display:none}.portal-body .portal-brand .brand-logo{width:70px;height:60px}.portal-body.nav-open:after{z-index:18!important}.sidebar-tooltip{display:none!important}}

/* Redesigned universal portal header */
.portal-body .topbar{position:sticky;top:12px;z-index:12;min-height:112px;margin:12px 18px 0;padding:18px 22px;display:flex;align-items:center;gap:17px;border:1px solid #e2e6eb;border-radius:15px;background:#fff;color:var(--text);box-shadow:0 12px 34px rgba(30,48,70,.09)}.portal-body .topbar .menu{display:none;align-items:center;justify-content:center;width:40px;height:40px;padding:0;border:1px solid #d0d7de;border-radius:10px;background:#f4f6f8;color:var(--primary);cursor:pointer;transition:.2s;flex:0 0 auto}.portal-body .topbar .menu:hover{background:#e4e8ec;color:var(--primary-hover);border-color:#b0b8c0}.portal-body .topbar .menu svg{width:22px;height:22px;stroke:currentColor;stroke-width:2.2}.portal-body .topbar-copy{min-width:0}.portal-body .topbar-context{display:block;margin-bottom:2px;color:var(--secondary);font-size:10px;font-weight:800;letter-spacing:.14em;text-transform:uppercase}.portal-body .topbar h1{margin:0;color:var(--primary);font-size:27px;line-height:1.2;letter-spacing:-.015em}.portal-body .topbar p{margin:4px 0 0;color:var(--muted);font-size:14px}.topbar-meta{display:flex;align-items:center;gap:12px;margin-left:auto}.topbar-date{height:39px;display:inline-flex;align-items:center;gap:8px;padding:0 12px;border:1px solid #e5e9ed;border-radius:10px;background:#f7f8f9;color:#666d75;font-size:12px;font-weight:650;white-space:nowrap}.topbar-date svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.topbar-user{display:flex;align-items:center;gap:9px;padding-left:12px;border-left:1px solid #e5e9ed}.topbar-avatar{width:39px;height:39px;display:grid;place-items:center;border-radius:50%;background:linear-gradient(145deg,#f9b0c2,#f6d2d9);color:var(--primary);font-size:12px;font-weight:800;box-shadow:0 3px 12px rgba(30,58,95,.12)}.topbar-user>span:last-child{display:grid;min-width:0}.topbar-user b{max-width:145px;overflow:hidden;color:#20252b;font-size:12px;text-overflow:ellipsis;white-space:nowrap}.topbar-user small{color:#858990;font-size:10px}.portal-body .content{padding-top:23px}

/* Footer appearance control */
.theme-toggle{width:100%;display:grid;grid-template-columns:34px minmax(0,1fr) 38px;align-items:center;gap:9px;margin-top:11px;padding:8px;border:1px solid #e7eaee;border-radius:11px;background:#f7f8f9;color:#5f656d;text-align:left;cursor:pointer;transition:.2s}.theme-toggle:hover{border-color:#d6dce2;background:#f1f3f5;color:var(--primary)}.theme-icon{width:34px;height:34px;display:grid;place-items:center;border-radius:99px;background:#fff;box-shadow:0 2px 8px rgba(30,48,70,.08)}.theme-icon svg{grid-area:1/1;width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.theme-moon{display:none}.theme-copy{display:grid;min-width:0}.theme-copy b{color:currentColor;font-size:11px}.theme-copy small{color:#8a8f96!important;font-size:9px}.theme-switch{position:relative;width:36px;height:20px;border-radius:999px;background:#d8dde3;transition:.2s}.theme-switch i{position:absolute;left:3px;top:3px;width:14px;height:14px;border-radius:50%;background:#fff;box-shadow:0 1px 4px rgba(0,0,0,.2);transition:left .2s ease}.portal-body.sidebar-collapsed .theme-toggle{display:flex;justify-content:center;width:44px;margin:9px auto 0;padding:5px}.portal-body.sidebar-collapsed .theme-copy,.portal-body.sidebar-collapsed .theme-switch{display:none}.portal-body.sidebar-collapsed .theme-icon{box-shadow:none}

/* Complete dark portal theme */
html[data-portal-theme="dark"]{color-scheme:dark}html[data-portal-theme="dark"] .portal-body{--primary:#4f83b9;--primary-hover:#6294c8;--primary-light:#1c2a38;--warm-white:#0d141c;--white:#17212b;--text:#e8edf3;--muted:#a5b0bc;--border:#2d3945;--shadow:0 10px 30px -5px rgba(0,0,0,.3),0 1px 3px rgba(0,0,0,.25);--shadow-hover:0 20px 40px -10px rgba(0,0,0,.42);background:#0d141c;color:var(--text)}html[data-portal-theme="dark"] .portal-body .sidebar,html[data-portal-theme="dark"] .portal-body .portal-brand,html[data-portal-theme="dark"] .portal-body .sidebar-foot,html[data-portal-theme="dark"] .portal-body .topbar{border-color:#2b3743;background:#151f29!important;box-shadow:0 18px 45px rgba(0,0,0,.28)}html[data-portal-theme="dark"] .portal-body .portal-brand,html[data-portal-theme="dark"] .portal-body .sidebar-foot,html[data-portal-theme="dark"] .portal-body .nav-section-management{border-color:#2b3743}html[data-portal-theme="dark"] .portal-body .brand-copy b,html[data-portal-theme="dark"] .portal-body .topbar h1{color:#dce9f6}html[data-portal-theme="dark"] .portal-body .sidebar nav .side-link{color:#aeb8c2}html[data-portal-theme="dark"] .portal-body .sidebar nav .side-link:hover{background:#1c2936;color:#e7f1fb}html[data-portal-theme="dark"] .portal-body .sidebar nav .side-link.active{background:#203247;color:#fff;box-shadow:inset 3px 0 0 var(--secondary)}html[data-portal-theme="dark"] .portal-body .nav-section:after{background:#2b3743}html[data-portal-theme="dark"] .portal-body .sidebar-collapse{border-color:#33404d;background:#1a2530;color:#dce9f6}html[data-portal-theme="dark"] .portal-body .sidebar-collapse:hover{background:#315d8f}html[data-portal-theme="dark"] .portal-body .account-copy b,html[data-portal-theme="dark"] .portal-body .topbar-user b{color:#edf2f7!important}html[data-portal-theme="dark"] .portal-body .sidebar-signout:hover{background:#392321}html[data-portal-theme="dark"] .portal-body .topbar-date{border-color:#303c48;background:#1b2732;color:#b7c1cb}html[data-portal-theme="dark"] .portal-body .topbar-user{border-color:#303c48}html[data-portal-theme="dark"] .portal-body .topbar-avatar,html[data-portal-theme="dark"] .portal-body .account-avatar{color:#17212b}html[data-portal-theme="dark"] .portal-body .card,html[data-portal-theme="dark"] .portal-body .table-wrap,html[data-portal-theme="dark"] .portal-body input,html[data-portal-theme="dark"] .portal-body select,html[data-portal-theme="dark"] .portal-body textarea,html[data-portal-theme="dark"] .portal-body .subtabs a,html[data-portal-theme="dark"] .portal-body .pager a,html[data-portal-theme="dark"] .portal-body .role-list>div{border-color:#2d3945;background:#17212b;color:#e8edf3}html[data-portal-theme="dark"] .portal-body input::placeholder,html[data-portal-theme="dark"] .portal-body textarea::placeholder{color:#778594}html[data-portal-theme="dark"] .portal-body input[readonly]{background:#111a23;color:#aeb9c4}html[data-portal-theme="dark"] .portal-body th{border-color:#34414e;background:#1d2935;color:#dce8f4}html[data-portal-theme="dark"] .portal-body td{border-color:#2d3945}html[data-portal-theme="dark"] .portal-body tr:hover td{background:#1a2733}html[data-portal-theme="dark"] .portal-body .permission-matrix th:first-child,html[data-portal-theme="dark"] .portal-body .permission-matrix th:nth-child(2){background:#1d2935}html[data-portal-theme="dark"] .portal-body .permission-matrix td:first-child,html[data-portal-theme="dark"] .portal-body .permission-matrix td:nth-child(2){background:#17212b}html[data-portal-theme="dark"] .portal-body .card h2,html[data-portal-theme="dark"] .portal-body .section-heading h2,html[data-portal-theme="dark"] .portal-body label,html[data-portal-theme="dark"] .portal-body .code{color:#dce8f4}html[data-portal-theme="dark"] .portal-body .btn.light{border-color:#344455;background:#1d2b39;color:#dce8f4}html[data-portal-theme="dark"] .portal-body .btn.light:hover{background:#315d8f;color:#fff}html[data-portal-theme="dark"] .portal-body .audit-accuracy{border-color:#34506b;background:#152638;color:#d8e8f7}html[data-portal-theme="dark"] .portal-body .device-audit code{border-color:#33414e;background:#111a23;color:#c8d2dc}html[data-portal-theme="dark"] .portal-body .scouts-table .recruiter-group td{border-color:#36506b;background:#1b3045!important;color:#e5eff9}html[data-portal-theme="dark"] .portal-body .report-track,html[data-portal-theme="dark"] .portal-body .upload-progress{background:#293744}html[data-portal-theme="dark"] .portal-body .theme-toggle{border-color:#303d49;background:#1a2631;color:#d7e0e9}html[data-portal-theme="dark"] .portal-body .theme-toggle:hover{border-color:#405365;background:#20303e;color:#fff}html[data-portal-theme="dark"] .portal-body .theme-icon{background:#111a23}html[data-portal-theme="dark"] .portal-body .theme-sun{display:none}html[data-portal-theme="dark"] .portal-body .theme-moon{display:block}html[data-portal-theme="dark"] .portal-body .theme-switch{background:#4f83b9}html[data-portal-theme="dark"] .portal-body .theme-switch i{left:19px}html[data-portal-theme="dark"] .portal-body .alert{border-color:#356347;background:#163224;color:#b9e7ca}html[data-portal-theme="dark"] .portal-body .alert.error{border-color:#843a34;background:#3a201e;color:#ffc8c3}html[data-portal-theme="dark"] .portal-body .subtabs a.active{border-color:#4f83b9;background:#315d8f;color:#fff}html[data-portal-theme="dark"] .portal-body .topbar .menu{border-color:#344455;background:#1d2b39;color:#dce8f4}html[data-portal-theme="dark"] .portal-body .topbar .menu:hover{background:#27384a;border-color:#4a5c70;color:#fff}
@media(max-width:900px){.topbar-date{display:none}.topbar-user>span:last-child{display:none}.topbar-user{padding-left:0;border:0}.portal-body .topbar{min-height:100px}}
@media(max-width:760px){.portal-body .topbar{top:0;min-height:90px;margin:0;border-width:0 0 1px;border-radius:0;padding:15px 18px}.portal-body .topbar .menu{display:inline-flex}.portal-body .topbar-context{font-size:9px}.portal-body .topbar h1{font-size:22px}.portal-body .topbar p{font-size:12px}.topbar-avatar{width:36px;height:36px}.theme-toggle{margin-top:10px}}

/* SMS Centre */
.sms-settings-grid,.sms-compose-layout{align-items:start}.sms-stat-grid{margin-bottom:22px}.sms-status-list{display:grid;gap:0;border:1px solid var(--border);border-radius:10px;overflow:hidden}.sms-status-list span{display:flex;justify-content:space-between;gap:15px;padding:12px 14px;border-bottom:1px solid var(--border)}.sms-status-list span:last-child{border-bottom:0}.sms-status-list b{color:var(--text);font-size:13px}.sms-status-list em{color:var(--muted);font-size:13px;font-style:normal;text-align:right;overflow-wrap:anywhere}.audience-panel{margin-top:16px}.audience-panel[hidden]{display:none!important}.sms-recipient-search{margin-top:8px}.sms-recipient-list{max-height:340px;overflow:auto;margin-top:8px;border:1px solid var(--border);border-radius:10px;background:var(--white)}.sms-recipient-list label{display:flex;align-items:flex-start;gap:11px;padding:11px 13px;border-bottom:1px solid var(--border);cursor:pointer}.sms-recipient-list label:last-child{border-bottom:0}.sms-recipient-list label:hover{background:var(--primary-light)}.sms-recipient-list input{width:18px;height:18px;flex:0 0 auto;margin-top:2px;accent-color:var(--primary)}.sms-recipient-list span{display:grid;gap:2px;min-width:0}.sms-recipient-list small{color:var(--muted);overflow-wrap:anywhere}.sms-message-field{margin-top:19px}.sms-message-help{display:flex;justify-content:space-between;gap:16px;margin-top:6px;color:var(--muted)}.sms-message-help small:last-child{white-space:nowrap}.sms-phone{white-space:nowrap}.sms-delivery-status.failed{background:#fee4e2;color:var(--danger)}.sms-delivery-status.accepted{background:#fff3df;color:#9a5700}.sms-delivery-status.delivered{background:#e7f3eb;color:var(--success)}.sms-log-table{min-width:920px}
.manual-sms-history{margin-top:20px}.manual-sms-history .table-wrap{box-shadow:none}.manual-sms-history table{min-width:720px}
html[data-portal-theme="dark"] .portal-body .sms-recipient-list{border-color:#2d3945;background:#17212b}html[data-portal-theme="dark"] .portal-body .sms-recipient-list label:hover{background:#203247}html[data-portal-theme="dark"] .portal-body .sms-status-list{border-color:#2d3945}html[data-portal-theme="dark"] .portal-body .sms-status-list span{border-color:#2d3945}html[data-portal-theme="dark"] .portal-body .sms-status-list b{color:#dce8f4}
@media(max-width:760px){.sms-message-help{align-items:flex-start;flex-direction:column;gap:5px}.sms-status-list span{align-items:flex-start;flex-direction:column;gap:3px}.sms-status-list em{text-align:left}}

/* Flamingo Portal layout refinement — integrated sidebar/header/dashboard */
.portal-body .sidebar{
  inset:0 auto 0 0;
  width:286px;
  height:100vh;
  padding:12px 12px 10px;
  border:0;
  border-right:1px solid #e3e7eb;
  border-radius:0;
  box-shadow:none;
  background:#fff!important;
}
.portal-body main{
  margin-left:286px;
  width:calc(100% - 286px);
}
.portal-body .portal-brand{
  margin:0;
  padding:4px 8px 12px;
  gap:2px;
  border:0;
  border-bottom:1px solid #edf0f3;
  border-radius:0;
  box-shadow:none;
  background:transparent!important;
}
.portal-body .portal-brand .brand-logo{
  width:205px;
  height:82px;
  object-fit:contain;
  filter:none;
}
.portal-body .brand-copy b{font-size:14px}
.portal-body .brand-copy small{font-size:10px}
.sidebar-collapse{right:-17px;top:24px;border-radius:50%;width:30px;height:30px;box-shadow:0 3px 10px rgba(30,48,70,.13)}
.portal-body .sidebar nav{padding-top:7px;scroll-behavior:auto;overscroll-behavior:contain}
.portal-body .sidebar-foot{padding-top:10px}
.portal-body .topbar{
  top:0;
  min-height:82px;
  margin:0;
  padding:11px 22px;
  border-width:0 0 1px;
  border-radius:0;
  box-shadow:none;
}
.portal-body .topbar-context{font-size:9px;margin-bottom:1px}
.portal-body .topbar h1{font-size:26px;line-height:1.05}
.portal-body .topbar p{margin-top:4px;font-size:12px;line-height:1.25}
.portal-body .topbar-meta{gap:10px}
.portal-body .topbar-date{padding:8px 10px;font-size:11px}
.portal-body .topbar-avatar{width:38px;height:38px}
.portal-body .topbar-user{padding-left:10px}
.portal-body .topbar-user b{font-size:12px}
.portal-body .topbar-user small{font-size:9px}
.portal-body .content{padding:20px 22px 28px;min-height:calc(100vh - 82px)}
.dashboard-quick-actions{display:flex;gap:9px;flex-wrap:wrap;margin:0 0 14px}
.dashboard-quick-actions .btn{min-height:38px;padding:8px 13px}
.dashboard-mini-stats{margin-top:0}
.portal-body.sidebar-collapsed .sidebar{width:82px;padding-inline:10px}
.portal-body.sidebar-collapsed main{margin-left:82px;width:calc(100% - 82px)}
.portal-body.sidebar-collapsed .portal-brand .brand-logo{width:58px;height:58px;object-fit:contain}
.portal-body.sidebar-collapsed .sidebar-collapse{right:-15px}
html[data-portal-theme="dark"] .portal-body .sidebar{border-right-color:#2b3743;background:#151f29!important}
html[data-portal-theme="dark"] .portal-body .portal-brand{background:transparent!important}
@media(max-width:900px){.portal-body .topbar{min-height:76px}.portal-body .content{min-height:calc(100vh - 76px)}}
@media(max-width:760px){
  .portal-body .sidebar{inset:0 auto 0 0;width:min(286px,88vw);border-right:1px solid #e3e7eb}
  .portal-body main,.portal-body.sidebar-collapsed main{margin-left:0;width:100%}
  .portal-body .portal-brand .brand-logo{width:190px;height:76px}
  .portal-body .topbar{min-height:72px;padding:10px 14px}
  .portal-body .topbar h1{font-size:20px}
  .portal-body .topbar p{display:none}
  .portal-body .content{padding:15px;min-height:calc(100vh - 72px)}
  .dashboard-quick-actions{overflow-x:auto;flex-wrap:nowrap;padding-bottom:3px}
  .dashboard-quick-actions .btn{white-space:nowrap}
}

/* 2026-09-01 compact Flamingo sidebar branding */
.portal-body .portal-brand{padding:0 6px 7px!important;gap:0!important;margin-top:-4px!important;min-height:0!important}
.portal-body .portal-brand .brand-logo{width:138px!important;height:48px!important;max-height:48px!important;object-fit:contain!important}
.portal-body .brand-copy{gap:0!important}
.portal-body .brand-copy b{font-size:12px!important;line-height:1.15!important}
.portal-body .brand-copy small{font-size:8px!important;line-height:1.1!important}
.sidebar-collapse{top:12px!important}
.portal-body .sidebar nav{padding-top:3px!important}
.portal-body.sidebar-collapsed .portal-brand .brand-logo{width:54px!important;height:44px!important}
@media(max-width:760px){.portal-body .portal-brand .brand-logo{width:132px!important;height:46px!important}}
