.record-dialog{width:min(780px,calc(100% - 28px));max-height:88vh;padding:0;border:1px solid #484c54;border-radius:6px;background:#191c21;color:#e9ebee;box-shadow:0 30px 100px #0009}.record-dialog::backdrop{background:#05070bd9}.record-form{display:block;margin:0}.dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:22px 26px;border-bottom:1px solid #343941;background:#20242a;position:sticky;top:0;z-index:1}.dialog-heading h2{font-size:22px}.dialog-heading button{font-size:12px;min-height:32px}.record-fields{display:grid;grid-template-columns:1fr 1fr;gap:22px;padding:26px}.record-fields label{font-size:12px;gap:8px}.record-fields input:not([type=checkbox]),.record-fields select,.record-fields textarea{width:100%;min-width:0}.record-fields textarea{background:#111316;color:#e6e8ed;border:1px solid #41454d;border-radius:4px;padding:12px;font:inherit;resize:vertical}.record-fields .wide{grid-column:1/-1}.record-fields .check-label{display:flex;align-items:center;gap:10px;align-self:center;color:#c9cfd7;cursor:pointer}.check-label input[type=checkbox]{width:17px;height:17px;min-height:0;accent-color:#d34d55}.choice-group{border:0;padding:0;margin:0}.choice-group legend{font-size:14px;font-weight:600;margin-bottom:14px}.permission-section{border:1px solid #343941;background:#16191d;padding:16px;margin-bottom:12px;display:grid;grid-template-columns:1fr 1fr;gap:12px 20px}.permission-section h3{grid-column:1/-1;font-size:12px;color:#ed999e;margin:0 0 4px}.permission-section .check-label{font-size:12px;font-weight:400;line-height:1.5;align-items:flex-start}.permission-section input{flex-shrink:0;margin-top:2px}.dialog-actions{position:sticky;bottom:0;display:flex;align-items:center;justify-content:flex-end;gap:12px;padding:18px 26px;background:#20242a;border-top:1px solid #383e46}.dialog-actions>span{margin-right:auto;margin-top:0;font-size:11px}.form-error{color:#ffc1be;padding:0 26px}.form-error:empty{display:none}

/* Integration rules: original layout geometry, live account controls and API forms. */
:root{--accent:#a07418;--accent-ink:#fff}
.brand-name{color:#ececec}.brand b{color:#e04551}.brand-logo{object-fit:contain;flex-shrink:0}
body.portal-session{background:#101113;font:14px/1.5 'Segoe UI',Arial,sans-serif;--accent:#a07418;--accent-ink:#fff}
body.portal-session #main.workspace-view{width:100%;max-width:none;margin:0;padding:0;min-height:100vh}
body.portal-session #main>.brand,body.portal-session #main>footer{display:none}
body.portal-session .sidebar{overflow-y:auto;z-index:5}
body.portal-session .sidebar>.brand{margin:0;justify-content:flex-start;width:auto;font-size:10px;letter-spacing:1.2px}
body.portal-session .sidebar .brand-mark{width:48px;height:54px;background:none;border:0}
body.portal-session .sidebar .brand-mark img{width:100%;height:100%;object-fit:contain}
body.portal-session .sidebar .brand b{color:#e04551}
body.portal-session .sidebar nav a{font-size:14px}
body.portal-session .sidebar .side-label{margin:26px 10px 14px}
body.portal-session .sidebar .side-bottom{padding-top:12px}
body.portal-session .sidebar .account-panel{margin:0;padding:0;background:none;border:0;border-radius:0}
body.portal-session .account-panel>.panel-heading,body.portal-session .account-panel>.membership-note{display:none}
body.portal-session .account-panel .identity{flex-wrap:wrap;padding-top:16px;margin-top:0;gap:10px}
body.portal-session .account-panel .identity h2{font:14px/1.4 'Segoe UI',sans-serif;margin:0}
body.portal-session .account-panel .identity .avatar{width:38px;height:38px;font-size:12px;border-radius:4px;background:#171a1e;color:#d2b77a;border-color:#41464e}
body.portal-session .account-panel .identity-details{flex:1}
body.portal-session .account-panel #logout{width:auto;margin:0}
body.portal-session .account-panel button{background:none;border:1px solid #42464d;color:#c5cad2;padding:5px 9px;border-radius:3px;font-size:11px;min-height:30px}
body.portal-session .profile-actions{gap:6px;margin-top:10px}
body.portal-session .topbar{height:72px}
body.portal-session .topbar>.btn{font-size:12px;border:0;background:none;color:#aaaeb5}
body.portal-session .portal-page{padding:36px 40px;min-height:calc(100vh - 72px);max-width:1600px;margin:0 auto}
body.portal-session #message:not(:empty){position:fixed;right:24px;top:80px;z-index:30;max-width:min(500px,calc(100vw - 48px));box-shadow:0 6px 24px #0009}
body.portal-session .badge:before{display:none}
body.portal-session .btn{min-height:42px}
body.portal-session .heading h1{margin-bottom:18px}
body.portal-session .workspace-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:30px}
body.portal-session .workspace-subtitle{font-size:13px;color:#9da3ad}
body.portal-session .workspace-toolbar{display:flex;align-items:center;gap:16px;margin:20px 0}
body.portal-session .workspace-toolbar input{width:280px}
body.portal-session .workspace-toolbar>span{margin-right:auto}
body.portal-session .workspace-table-wrap{overflow:auto;border:1px solid #303238;background:#17191c}
body.portal-session .row-action{text-align:right;white-space:nowrap}
body.portal-session .row-action .btn{min-height:30px;padding:6px 12px;font-size:12px}
body.portal-session .empty-state{text-align:center;padding:40px;color:#9da3ad}
body.portal-session .inactive-row{opacity:.65}
body.portal-session .workspace-panel{padding:24px;background:#17191c;border:1px solid #303238;margin-bottom:24px}
body.portal-session .unit-tree{display:none}
body.portal-session .personnel-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:20px}
body.portal-session .personnel-grid .person{width:100%}
body.portal-session .admin-breadcrumb{display:flex;margin-bottom:22px}
body.portal-session .admin-menu-card{min-height:130px}
body.portal-session .review-panel{margin-top:28px}
body.portal-session .review-panel .account form{display:flex;align-items:end;flex-wrap:wrap}
body.portal-session .review-panel button,body.portal-session .profile-panel button{background:#202226;color:#eceef2;border:1px solid #42464d;padding:10px 17px;border-radius:3px;font-size:14px}
body.portal-session .profile-panel button[type=submit]{background:var(--accent)}
.profile-panel{width:min(780px,calc(100% - 32px));max-height:85vh;overflow:auto;margin:auto;color:#ececec;background:#191b1f;border:1px solid #484c54;padding:28px}
.profile-panel::backdrop{background:#05070bd9}
body.portal-session .profile-panel{margin:auto}
body.portal-session .record-dialog .record-form{display:block;margin:0}
body.portal-session .record-dialog .permission-section{display:grid;grid-template-columns:1fr 1fr;padding:16px;gap:12px 20px}
body.portal-session .record-dialog .permission-section h3{grid-column:1/-1;color:#d6bc81}
body.portal-session .record-dialog .permission-section label{font-size:12px}
body.portal-session .record-dialog .dialog-heading h2{margin:0}
body.portal-session .record-dialog .dialog-actions button{padding:10px 17px;background:#202226;color:#eceef2;border:1px solid #42464d;border-radius:3px}
body.portal-session .record-dialog .dialog-actions .primary{background:#a07418}
body.portal-session .record-dialog label{display:grid}
body.portal-session .record-dialog .check-label{display:flex}
body.portal-session .record-dialog input[type=checkbox]{accent-color:#a07418}
@media(min-width:1500px){body.portal-session .portal-page{padding:40px 70px}}
@media(max-width:1000px){body.portal-session .portal-page{padding:28px 24px}}
@media(max-width:760px){body.portal-session .sidebar{position:static;width:auto;padding:22px}.portal-session .sidebar nav{display:flex;overflow-x:auto;gap:6px}.portal-session .sidebar nav a{flex-shrink:0}.portal-session .sidebar .side-bottom{display:block}.portal-session .sidebar .side-bottom>.side-label{display:none}.portal-session .sidebar .account-panel .identity{flex-wrap:nowrap}.portal-session .sidebar .profile-actions{margin-top:8px}.portal-session .workspace{margin:0}.portal-session .portal-page{padding:24px 18px}.portal-session .topbar{padding:14px 18px}.portal-session .workspace-toolbar{flex-wrap:wrap}.portal-session .workspace-toolbar input{width:100%}.portal-session .record-fields{grid-template-columns:1fr;padding:20px}.portal-session .record-dialog .permission-section{grid-template-columns:1fr}.portal-session .profile-form{grid-template-columns:1fr}.portal-session .profile-panel{padding:20px}}
body.portal-session{--accent:var(--viewer-accent,#a07418)}body.portal-session .permission-tools{grid-column:1/-1}body.portal-session .permission-tools .btn{font-size:12px;padding:4px 10px;min-height:28px}.specialty-badges:empty{display:none}
body.portal-session h1,body.portal-session h2,body.portal-session h3,body.portal-session .eyebrow,body.portal-session .side-label,body.portal-session .stat-label,body.portal-session .topbar,body.portal-session .sidebar nav,body.portal-session .brand,body.portal-session th,body.portal-session button{text-transform:none}.qualification-catalogue{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:20px}.qualification-catalogue .panel{margin-bottom:0}.qualification-catalogue .btn{margin-top:16px}.history-heading{margin-top:28px}
