
:root{--brn-red:#ef1d24;--brn-red-dark:#c91319;--brn-yellow:#ffd21a;--brn-blue:#0069b5;--ink:#111827;--muted:#667085;--line:#e7e9ee;--canvas:#f6f7f9}
*{box-sizing:border-box} html{scroll-behavior:smooth} body{font-family:Inter,ui-sans-serif,system-ui,sans-serif;background:var(--canvas)} button,a,input,select,textarea{transition:all .18s ease} button{outline:none}.hidden{display:none!important}
/* Sidebar: intentionally light, no multicolor borders */
.sidebar-brand{height:76px;padding:14px 16px;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:12px}.sidebar-logo{width:62px;height:42px;border-radius:11px;background:#fff;display:grid;place-items:center;overflow:hidden;box-shadow:0 5px 14px rgba(16,24,40,.08)}.sidebar-logo img{width:100%;height:100%;object-fit:contain}.sidebar-brand-copy strong{display:block;font-size:15px;letter-spacing:-.02em}.sidebar-brand-copy span{display:block;font-size:10px;color:#98a2b3;margin-top:2px}.sidebar-nav{height:calc(100vh - 140px);overflow:auto;padding:12px 10px 22px}.sidebar-nav::-webkit-scrollbar{width:5px}.sidebar-nav::-webkit-scrollbar-thumb{background:#d8dce3;border-radius:999px}.nav-dashboard,.nav-module-btn,.nav-section-btn,.nav-page{width:100%;display:flex;align-items:center;text-decoration:none;color:#596273;border-radius:11px;font-size:12.5px;font-weight:650}.nav-dashboard,.nav-module-btn{min-height:42px;padding:0 10px;gap:10px}.nav-dashboard:hover,.nav-module-btn:hover{background:#f5f6f8;color:#111827}.nav-dashboard.active{background:#fff1f1;color:var(--brn-red-dark);font-weight:800}.nav-icon{width:20px;height:20px;display:grid;place-items:center;flex:0 0 20px}.nav-icon svg{width:18px;height:18px;stroke-width:1.8}.nav-module-btn .chev,.nav-section-btn .chev{margin-left:auto;width:15px;height:15px;transition:transform .2s}.nav-module-btn.open .chev,.nav-section-btn.open .chev{transform:rotate(90deg)}.nav-module-btn.open{color:#111827;background:#f8f9fb}.nav-module-wrap{margin-top:3px}.nav-module-children{padding:4px 0 6px 15px;margin-left:19px;border-left:1px solid #eceef2}.nav-module-children.closed{display:none}.nav-overview,.nav-page{min-height:34px;padding:6px 8px;gap:8px;margin:1px 0}.nav-overview:hover,.nav-page:hover{background:#f7f8fa;color:#111827}.nav-overview.active,.nav-page.active{background:#fff0f0;color:#ca161c;font-weight:800}.nav-overview svg,.nav-page svg{width:15px;height:15px;flex:0 0 15px}.nav-section-wrap{margin-top:4px}.nav-section-btn{min-height:32px;padding:5px 7px;gap:8px;color:#7b8492;font-size:11.5px}.nav-section-btn:hover{background:#f7f8fa;color:#374151}.nav-section-btn svg{width:14px;height:14px}.nav-section-pages{padding-left:10px}.nav-section-pages.closed{display:none}.sidebar-user{position:absolute;bottom:0;left:0;right:0;padding:10px;background:#fff;border-top:1px solid var(--line)}.sidebar-user-card{padding:10px;border-radius:13px;background:#f8f9fb;display:flex;align-items:center;gap:9px}.sidebar-avatar{width:34px;height:34px;border-radius:10px;background:#111827;color:#fff;display:grid;place-items:center;font-size:10px;font-weight:800}.sidebar-user-card strong{font-size:11px;display:block}.sidebar-user-card span{font-size:9.5px;color:#98a2b3;display:block;margin-top:2px}
/* Topbar */
.topbar-search{height:40px;max-width:480px;flex:1;display:flex;align-items:center;gap:8px;background:#f7f8fa;border-radius:11px;padding:0 12px;color:#98a2b3}.topbar-search svg{width:17px}.topbar-search input{width:100%;border:0!important;outline:0!important;box-shadow:none!important;background:transparent!important;font-size:12.5px;padding:0!important}.topbar-action{height:39px;min-width:39px;padding:0 11px;border-radius:11px;background:#fff;border:1px solid #e8eaf0;display:flex;align-items:center;justify-content:center;gap:7px;color:#667085;font-size:11px;font-weight:700}.topbar-action:hover{background:#f8f9fb;color:#111827}.topbar-action svg{width:17px;height:17px}.notif-dot{position:absolute;width:7px;height:7px;background:var(--brn-red);border-radius:50%;right:8px;top:7px;box-shadow:0 0 0 2px #fff}
/* Core layout */
.breadcrumb{display:flex;align-items:center;gap:5px;color:#98a2b3;font-size:10.5px;font-weight:650}.breadcrumb svg{width:12px;height:12px}.page-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:18px}.page-heading h1,.module-hero h1{font-size:clamp(25px,3vw,36px);line-height:1.1;letter-spacing:-.045em;font-weight:800;margin:0}.page-heading p,.module-hero p{font-size:13px;color:#667085;line-height:1.65;margin-top:6px;max-width:780px}.page-icon{width:46px;height:46px;border-radius:14px;background:#fff0f0;color:var(--brn-red);display:grid;place-items:center;flex:0 0 auto}.page-icon svg{width:22px;height:22px}.page-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.btn-primary,.btn-secondary{height:40px;border-radius:11px;padding:0 14px;font-size:12px;font-weight:750;display:inline-flex;align-items:center;gap:7px;text-decoration:none}.btn-primary{background:var(--brn-red);color:#fff;box-shadow:0 7px 16px rgba(239,29,36,.17)}.btn-primary:hover{background:var(--brn-red-dark);transform:translateY(-1px)}.btn-secondary{background:#fff;color:#475467;border:1px solid #e4e7ec}.btn-secondary:hover{background:#f9fafb;color:#111827}.btn-primary svg,.btn-secondary svg{width:16px;height:16px}.soft-chip{display:inline-flex;align-items:center;min-height:25px;border-radius:999px;background:#f2f4f7;color:#667085;padding:4px 9px;font-size:10px;font-weight:700}.eyebrow{font-size:10px;font-weight:800;color:#98a2b3;text-transform:uppercase;letter-spacing:.16em}.section-heading h2{font-size:22px;letter-spacing:-.025em;font-weight:800;margin-top:5px}.section-heading p{font-size:12px;color:#667085;margin-top:4px}.panel{background:#fff;border:1px solid #e8eaef;border-radius:18px;box-shadow:0 8px 24px rgba(16,24,40,.035)}.panel-head{padding:18px 20px 14px;display:flex;align-items:flex-start;justify-content:space-between;gap:14px}.panel-head.compact{padding:0}.panel-head h2{font-size:14px;font-weight:800;letter-spacing:-.01em}.panel-head p{font-size:11px;color:#98a2b3;margin-top:4px;line-height:1.5}.record-chip{background:#f4f5f7;color:#667085;border-radius:999px;padding:5px 9px;font-size:9.5px;font-weight:750;white-space:nowrap}
/* Metrics */
.metric-card{background:#fff;border:1px solid #e8eaef;border-radius:17px;padding:17px;display:flex;gap:12px;box-shadow:0 6px 20px rgba(16,24,40,.025)}.metric-icon{width:40px;height:40px;border-radius:12px;background:#f6f7f9;color:#475467;display:grid;place-items:center;flex:0 0 auto}.metric-icon svg{width:19px;height:19px}.metric-card p{font-size:10px;color:#98a2b3;font-weight:750;text-transform:uppercase;letter-spacing:.05em}.metric-card strong{font-size:21px;display:block;margin-top:2px;letter-spacing:-.035em}.metric-card span{font-size:10px;color:#98a2b3;display:block;margin-top:2px}
/* Datatable */
.datatable-panel{overflow:hidden}.datatable-toolbar{padding:11px 20px;border-top:1px solid #f0f1f3;border-bottom:1px solid #f0f1f3;display:flex;align-items:center;justify-content:space-between;gap:10px;background:#fcfcfd}.table-search{height:36px;min-width:260px;display:flex;align-items:center;gap:7px;background:#fff;border:1px solid #e4e7ec;border-radius:10px;padding:0 10px;color:#98a2b3}.table-search svg{width:15px}.table-search input{border:0!important;outline:0!important;box-shadow:none!important;padding:0!important;background:transparent!important;font-size:11px;width:100%}.toolbar-right{display:flex;gap:7px}.toolbar-right select{height:36px;border:1px solid #e4e7ec!important;border-radius:10px!important;background:#fff!important;font-size:10.5px;color:#667085;padding:0 32px 0 10px!important;box-shadow:none!important}.table-scroll{overflow-x:auto}.brn-table{width:100%;border-collapse:separate;border-spacing:0;min-width:900px}.brn-table thead{background:#f8f9fb}.brn-table th{height:40px;padding:0 13px;text-align:left;font-size:9.5px;color:#667085;font-weight:800;text-transform:uppercase;letter-spacing:.045em;white-space:nowrap;border-bottom:1px solid #e8eaef;cursor:default}.brn-table th[data-sort]{cursor:pointer}.brn-table th svg{width:11px;height:11px;display:inline;margin-left:3px;vertical-align:-2px}.brn-table td{padding:11px 13px;font-size:11px;color:#475467;border-bottom:1px solid #f0f1f3;white-space:nowrap}.brn-table tbody tr:hover{background:#fcfcfd}.brn-table tbody tr:last-child td{border-bottom:0}.brn-table td:nth-child(2){font-weight:650;color:#344054}.row-no{width:52px;color:#98a2b3!important;font-variant-numeric:tabular-nums}.status-badge{display:inline-flex;align-items:center;padding:4px 8px;border-radius:999px;font-size:9px;font-weight:750}.status-badge.success{background:#ecfdf3;color:#027a48}.status-badge.warning{background:#fff8e6;color:#986f00}.status-badge.danger{background:#fff0f0;color:#c5171d}.status-badge.neutral{background:#f2f4f7;color:#667085}.row-actions{display:flex;gap:4px}.row-actions button,.icon-btn{width:30px;height:30px;border-radius:8px;display:grid;place-items:center;color:#667085;background:#fff;border:1px solid #e8eaef}.row-actions button:hover,.icon-btn:hover{background:#f7f8fa;color:#111827}.row-actions button.danger:hover{background:#fff1f1;color:#d0161d}.row-actions button.approve:hover{background:#ecfdf3;color:#027a48}.row-actions svg,.icon-btn svg{width:14px;height:14px}.datatable-footer{padding:12px 20px;border-top:1px solid #f0f1f3;display:flex;align-items:center;justify-content:space-between;gap:10px}.datatable-footer p{font-size:10.5px;color:#98a2b3}.pagination{display:flex;align-items:center;gap:4px}.pagination button{height:30px;min-width:30px;padding:0 8px;border:1px solid #e5e7eb;background:#fff;border-radius:8px;font-size:10px;color:#667085;display:grid;place-items:center}.pagination button:hover,.pagination button.active{background:#111827;color:#fff;border-color:#111827}.pagination button:disabled{opacity:.35;cursor:not-allowed}.pagination svg{width:14px;height:14px}.pagination>span{display:flex;gap:4px}
/* Forms / config */
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.form-grid.single{grid-template-columns:1fr}.form-grid label{display:block}.form-grid label>span{display:block;font-size:10.5px;font-weight:700;color:#475467;margin-bottom:6px}.form-grid input,.form-grid select,.form-grid textarea{width:100%;border:1px solid #e4e7ec!important;border-radius:10px!important;box-shadow:none!important;font-size:11.5px!important;color:#344054;background:#fff!important}.form-grid input,.form-grid select{height:40px}.form-grid input:focus,.form-grid select:focus,.form-grid textarea:focus{border-color:#cbd0d9!important;box-shadow:0 0 0 3px rgba(16,24,40,.04)!important}.preview-card{min-height:360px;border-radius:18px;background:#f8f9fb;overflow:hidden}.preview-nav{height:58px;background:#fff;padding:9px 14px;display:flex;align-items:center;gap:9px;border-bottom:1px solid #eceef2;font-size:11px;font-weight:800}.preview-nav img{width:45px;height:29px;object-fit:contain}.preview-body{padding:40px 28px}.preview-body h3{font-size:28px;font-weight:800;letter-spacing:-.04em;margin-top:13px}.preview-body p{font-size:12px;color:#667085;line-height:1.65;margin-top:8px}.preview-body button{margin-top:20px;background:var(--brn-red);color:#fff;border-radius:10px;padding:9px 13px;font-size:10px;font-weight:750}.toggle-row{position:relative;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:13px 0;border-bottom:1px solid #f0f1f3}.toggle-row strong{font-size:11.5px;display:block}.toggle-row span{font-size:9.5px;color:#98a2b3;display:block;margin-top:3px}.toggle-row input{position:absolute;opacity:0;right:0}.toggle-ui{width:38px!important;height:22px;border-radius:999px;background:#e4e7ec;position:relative;flex:0 0 auto}.toggle-ui:after{content:"";position:absolute;width:17px;height:17px;left:2.5px;top:2.5px;background:#fff;border-radius:50%;box-shadow:0 1px 3px rgba(0,0,0,.15);transition:.2s}.toggle-row input:checked+.toggle-ui{background:var(--brn-red)}.toggle-row input:checked+.toggle-ui:after{transform:translateX(16px)}.notice{display:flex;gap:9px;background:#f5f8ff;border-radius:12px;padding:12px;color:#37557e;font-size:10.5px;line-height:1.5}.notice svg{width:16px;height:16px;flex:0 0 auto}
/* Hero / module overview */
.home-hero{min-height:330px;border-radius:24px;background:#fff;border:1px solid #e8eaef;display:grid;grid-template-columns:1.35fr .65fr;overflow:hidden;box-shadow:0 12px 32px rgba(16,24,40,.04)}.home-copy{padding:38px}.hero-kicker{margin-top:40px;display:inline-flex;align-items:center;gap:7px;background:#fff0f0;color:#c3171d;border-radius:999px;padding:6px 10px;font-size:10px;font-weight:800}.hero-kicker svg{width:14px}.home-copy h1{max-width:780px;font-size:clamp(34px,4.5vw,58px);line-height:1.02;letter-spacing:-.055em;font-weight:800;margin-top:15px}.home-copy>p{max-width:720px;font-size:13px;line-height:1.75;color:#667085;margin-top:16px}.hero-actions{display:flex;gap:9px;margin-top:24px}.hero-brand{background:#f7f8fa;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:30px}.hero-logo-box{width:150px;height:86px;background:#fff;border-radius:18px;display:grid;place-items:center;box-shadow:0 16px 38px rgba(16,24,40,.09)}.hero-logo-box img{width:128px;height:70px;object-fit:contain}.hero-stat{margin-top:18px;text-align:center}.hero-stat strong{font-size:27px;display:block;letter-spacing:-.04em}.hero-stat span{font-size:10px;color:#98a2b3}.module-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.module-card{background:#fff;border:1px solid #e8eaef;border-radius:15px;padding:14px;display:flex;align-items:center;gap:11px;text-decoration:none;color:#344054;box-shadow:0 4px 15px rgba(16,24,40,.02)}.module-card:hover{transform:translateY(-2px);box-shadow:0 10px 24px rgba(16,24,40,.06)}.module-card-icon{width:40px;height:40px;border-radius:12px;background:#f6f7f9;color:#475467;display:grid;place-items:center}.module-card-icon svg{width:19px}.module-card h3{font-size:11.5px;font-weight:800}.module-card p{font-size:9.5px;color:#98a2b3;margin-top:2px}.module-card>svg{width:15px;margin-left:auto;color:#b3b9c4}.module-hero{background:#fff;border:1px solid #e8eaef;border-radius:22px;padding:28px;display:flex;align-items:center;justify-content:space-between;gap:25px;box-shadow:0 8px 26px rgba(16,24,40,.03)}.module-hero-icon{width:52px;height:52px;border-radius:15px;background:#fff0f0;color:var(--brn-red);display:grid;place-items:center;margin-top:24px;margin-bottom:14px}.module-hero-icon svg{width:25px}.module-hero-logo{width:190px;min-height:150px;border-radius:18px;background:#f7f8fa;display:flex;flex-direction:column;align-items:center;justify-content:center}.module-hero-logo img{width:100px;height:55px;object-fit:contain}.module-hero-logo strong{font-size:25px;margin-top:10px}.module-hero-logo span{font-size:9.5px;color:#98a2b3}.section-title{display:flex;align-items:center;gap:11px}.section-title>span{width:37px;height:37px;border-radius:11px;background:#f6f7f9;display:grid;place-items:center;color:#475467}.section-title svg{width:18px}.section-title h2{font-size:13px;font-weight:800}.section-title p{font-size:9.5px;color:#98a2b3;margin-top:2px}.module-link-list{display:grid;grid-template-columns:1fr 1fr;gap:7px}.module-link-list a{min-height:38px;border-radius:10px;background:#f8f9fb;display:flex;align-items:center;gap:8px;padding:7px 9px;text-decoration:none;color:#596273;font-size:10.5px;font-weight:650}.module-link-list a:hover{background:#fff0f0;color:#c5171d}.module-link-list a svg{width:14px}.module-link-list a svg:last-child{margin-left:auto;width:12px}
/* Kanban */
.kanban-board{display:grid;grid-template-columns:repeat(3,minmax(280px,1fr));gap:14px;overflow-x:auto}.kanban-column{background:#eef0f3;border-radius:17px;padding:10px;min-height:500px}.kanban-title{height:40px;display:flex;align-items:center;justify-content:space-between;padding:0 4px 8px;font-size:11px;font-weight:800}.kanban-title span{display:flex;align-items:center;gap:7px}.kanban-title svg{width:15px}.kanban-title b{font-size:9px;background:#fff;border-radius:999px;padding:3px 6px}.task-card{background:#fff;border-radius:13px;padding:13px;margin-bottom:8px;box-shadow:0 3px 10px rgba(16,24,40,.04)}.task-card h3{font-size:11.5px;font-weight:800;margin-top:10px}.task-card>p{display:flex;align-items:center;gap:5px;font-size:9.5px;color:#98a2b3;margin-top:8px}.task-card>p svg{width:13px}.task-card>div{display:flex;align-items:center;gap:6px;font-size:9.5px;color:#667085;margin-top:12px}.avatar-mini{width:23px;height:23px;border-radius:7px;background:#111827;color:#fff;display:grid;place-items:center;font-size:8px;font-weight:800}
/* Dashboard visuals */
.chart-bars{height:260px;display:flex;align-items:flex-end;gap:16px;padding:10px 4px 0}.chart-bars>div{height:100%;flex:1;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;gap:8px}.chart-bars span{width:min(48px,72%);background:linear-gradient(180deg,#ee3d43,#e31b23);border-radius:9px 9px 4px 4px;min-height:30px}.chart-bars b{font-size:9px;color:#98a2b3;font-weight:650}.insight-list>div{display:flex;align-items:center;gap:11px;padding:14px 0;border-bottom:1px solid #f0f1f3}.insight-list>div:last-child{border-bottom:0}.insight-list>div>svg{width:18px;color:#667085}.insight-list strong{font-size:15px;display:block}.insight-list span{font-size:9.5px;color:#98a2b3;display:block;margin-top:2px}
/* Modal + toast */
.modal{position:fixed;inset:0;z-index:80;display:grid;place-items:center;padding:20px}.modal-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.38);backdrop-filter:blur(2px)}.modal-card{position:relative;width:min(720px,100%);max-height:90vh;overflow:auto;background:#fff;border-radius:20px;padding:22px;box-shadow:0 30px 80px rgba(15,23,42,.2)}.modal-head{display:flex;align-items:flex-start;justify-content:space-between;gap:15px}.modal-head h2{font-size:18px;font-weight:800;letter-spacing:-.02em;margin-top:8px}.modal-head p{font-size:10px;color:#98a2b3;margin-top:4px}.modal-actions{display:flex;justify-content:flex-end;gap:8px;border-top:1px solid #eef0f3;padding-top:16px;margin-top:20px}.toast{width:min(340px,calc(100vw - 32px));background:#101828;color:#fff;border-radius:12px;padding:11px 13px;box-shadow:0 18px 38px rgba(16,24,40,.2);display:flex;align-items:center;gap:9px;font-size:10.5px;animation:toastIn .2s ease}.toast svg{width:16px;color:#7ee2a8}@keyframes toastIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@media(max-width:1100px){.module-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.home-hero{grid-template-columns:1fr}.hero-brand{display:none}}
@media(max-width:760px){.page-heading{align-items:flex-start;flex-direction:column}.page-actions{width:100%;justify-content:flex-start}.home-copy{padding:25px}.hero-kicker{margin-top:25px}.module-grid{grid-template-columns:1fr}.module-hero{align-items:flex-start}.module-hero-logo{display:none}.module-link-list{grid-template-columns:1fr}.datatable-toolbar{align-items:stretch;flex-direction:column}.table-search{min-width:0;width:100%}.toolbar-right{width:100%}.toolbar-right select{flex:1}.datatable-footer{align-items:flex-start;flex-direction:column}.form-grid{grid-template-columns:1fr}.form-grid .col-span-2{grid-column:auto}.kanban-board{grid-template-columns:repeat(3,280px)}}

/* === BRN V3: transparent white complex header === */
.sidebar-nav{height:calc(100vh - 128px);padding-bottom:18px}
.sidebar-user{display:none!important}
.sidebar-footer{position:absolute;left:0;right:0;bottom:0;padding:10px 12px;background:rgba(255,255,255,.96);border-top:1px solid #eef0f3}
.sidebar-system-state{height:42px;border-radius:12px;background:#f8f9fb;display:flex;align-items:center;gap:9px;padding:0 11px}
.sidebar-system-state>div{min-width:0}.sidebar-system-state strong{display:block;font-size:10.5px;color:#344054}.sidebar-system-state span{display:block;font-size:9px;color:#98a2b3;margin-top:1px}
.sidebar-online-dot{width:8px!important;height:8px;border-radius:999px;background:#22c55e;box-shadow:0 0 0 4px rgba(34,197,94,.09);flex:0 0 auto}
.topbar-shell{height:72px;padding:0 18px;display:flex;align-items:center;gap:14px;background:rgba(255,255,255,.76);backdrop-filter:blur(20px) saturate(180%);-webkit-backdrop-filter:blur(20px) saturate(180%);border-bottom:1px solid rgba(228,231,236,.72);box-shadow:0 7px 24px rgba(16,24,40,.025)}
.topbar-left,.topbar-tools{display:flex;align-items:center}.topbar-left{gap:10px;flex:0 0 auto}.topbar-tools{margin-left:auto;gap:7px;flex:0 0 auto}
.topbar-context{align-items:center;gap:9px;min-width:190px}.topbar-context-icon{width:34px;height:34px;border-radius:10px;background:#f7f8fa;color:#475467;display:grid;place-items:center}.topbar-context-icon svg{width:16px;height:16px}.topbar-context div{line-height:1.1}.topbar-context span{display:block;font-size:8.5px;color:#98a2b3;font-weight:700;text-transform:uppercase;letter-spacing:.08em}.topbar-context strong{display:block;max-width:190px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:11.5px;color:#344054;margin-top:4px}
.topbar-search-wrap{position:relative;flex:1;min-width:220px;max-width:560px;margin:0 auto}.topbar-search{height:42px;max-width:none;width:100%;background:rgba(247,248,250,.86);border:1px solid rgba(228,231,236,.7);border-radius:12px;padding:0 11px;color:#98a2b3}.topbar-search:focus-within{background:#fff;border-color:#d0d5dd;box-shadow:0 0 0 4px rgba(16,24,40,.035)}.topbar-search input{font-size:11.5px!important}.topbar-search kbd{height:22px;min-width:29px;border:1px solid #e4e7ec;background:#fff;border-radius:6px;display:grid;place-items:center;padding:0 5px;color:#98a2b3;font-size:8.5px;font-family:Inter,sans-serif;box-shadow:0 1px 2px rgba(16,24,40,.03)}
.topbar-icon-btn,.quick-action-btn,.profile-trigger,.scope-switcher{border:1px solid rgba(228,231,236,.86);background:rgba(255,255,255,.82);color:#667085;box-shadow:0 1px 2px rgba(16,24,40,.025)}
.topbar-icon-btn{width:40px;height:40px;border-radius:11px;display:grid;place-items:center;position:relative;text-decoration:none}.topbar-icon-btn:hover,.quick-action-btn:hover,.profile-trigger:hover,.scope-switcher:hover{background:#fff;color:#111827;border-color:#d8dce3;box-shadow:0 5px 15px rgba(16,24,40,.055)}.topbar-icon-btn svg{width:17px;height:17px}
.topbar-count{position:absolute;right:-4px;top:-5px;min-width:18px;height:18px;padding:0 4px;border-radius:999px;background:#111827;color:#fff;border:2px solid rgba(255,255,255,.98);display:grid;place-items:center;font-size:7.5px;font-weight:800;line-height:1}.topbar-count.danger{background:var(--brn-red)}
.topbar-dropdown{position:relative}.scope-switcher{height:42px;min-width:150px;border-radius:12px;padding:0 10px;display:flex;align-items:center;gap:8px;text-align:left}.scope-switcher>svg:first-child{width:16px}.scope-switcher>svg:last-child{width:13px;margin-left:auto}.scope-switcher span{min-width:0}.scope-switcher small{display:block;font-size:7.5px;color:#98a2b3;font-weight:700;text-transform:uppercase;letter-spacing:.06em}.scope-switcher b{display:block;font-size:9.5px;color:#475467;margin-top:2px;white-space:nowrap;max-width:95px;overflow:hidden;text-overflow:ellipsis}
.quick-action-btn{height:40px;border-radius:11px;padding:0 11px;display:flex;align-items:center;gap:6px;font-size:10px;font-weight:750}.quick-action-btn svg{width:15px}
.system-online{height:36px;align-items:center;gap:6px;padding:0 9px;border-radius:999px;background:rgba(240,253,244,.88);color:#15803d;font-size:8.5px}.system-online>span{width:6px;height:6px;border-radius:50%;background:#22c55e}.system-online svg{width:13px}.system-online b{font-weight:800}
.topbar-separator{width:1px;height:28px;background:rgba(228,231,236,.85);margin:0 2px}
.profile-trigger{height:44px;border-radius:13px;padding:4px 8px 4px 5px;display:flex;align-items:center;gap:8px;text-align:left}.header-avatar{width:34px;height:34px;border-radius:10px;background:#111827;color:#fff;display:grid;place-items:center;font-size:9.5px;font-weight:800;box-shadow:0 4px 10px rgba(16,24,40,.1)}.profile-copy{min-width:86px;line-height:1.1}.profile-copy b{display:block;font-size:9.5px;color:#344054}.profile-copy small{display:block;font-size:8px;color:#98a2b3;margin-top:3px}.profile-trigger>svg{width:13px}
.topbar-popover{position:absolute;right:0;top:calc(100% + 10px);z-index:70;background:rgba(255,255,255,.98);border:1px solid #e7e9ee;border-radius:16px;box-shadow:0 24px 60px rgba(16,24,40,.14),0 4px 14px rgba(16,24,40,.05);overflow:hidden;animation:brnPopover .14s ease-out}.topbar-popover:before{content:"";position:absolute;top:-7px;right:20px;width:13px;height:13px;background:#fff;border-left:1px solid #e7e9ee;border-top:1px solid #e7e9ee;transform:rotate(45deg)}@keyframes brnPopover{from{opacity:0;transform:translateY(-5px) scale(.985)}to{opacity:1;transform:none}}
.popover-head{min-height:62px;padding:13px 14px;border-bottom:1px solid #eef0f3;display:flex;align-items:center;justify-content:space-between;gap:12px;position:relative}.popover-head strong{display:block;font-size:11px;color:#344054}.popover-head span{display:block;font-size:8.5px;color:#98a2b3;margin-top:3px}.popover-head>svg{width:18px;color:#98a2b3}.popover-head>button{font-size:8.5px;color:var(--brn-red);font-weight:750}
.scope-popover{width:294px}.scope-option{width:100%;min-height:52px;padding:8px 12px;display:flex;align-items:center;gap:10px;color:#667085;text-align:left}.scope-option:hover,.scope-option.active{background:#f8f9fb}.scope-option>svg:first-child{width:16px}.scope-option>svg:last-child{width:14px;margin-left:auto;color:var(--brn-red)}.scope-option span{min-width:0}.scope-option b{display:block;font-size:10px;color:#344054}.scope-option small{display:block;font-size:8.5px;color:#98a2b3;margin-top:2px}
.quick-popover{width:315px}.quick-popover>a{min-height:56px;padding:9px 13px;display:flex;align-items:center;gap:10px;text-decoration:none;color:#667085}.quick-popover>a:hover{background:#f8f9fb}.quick-popover>a>svg{width:17px;color:#667085}.quick-popover>a span{min-width:0}.quick-popover>a b{display:block;font-size:10px;color:#344054}.quick-popover>a small{display:block;font-size:8.5px;color:#98a2b3;margin-top:2px}
.notifications-popover{width:min(390px,calc(100vw - 24px))}.notification-list>a{display:flex;gap:10px;padding:11px 13px;text-decoration:none;border-bottom:1px solid #f2f3f5}.notification-list>a:hover{background:#fafbfc}.notification-icon{width:34px;height:34px;border-radius:10px;display:grid;place-items:center;flex:0 0 auto;background:#f3f4f6;color:#667085}.notification-icon.warning{background:#fff7e8;color:#b7791f}.notification-icon.danger{background:#fff0f0;color:#cf2027}.notification-icon svg{width:15px}.notification-list b{display:block;font-size:9.8px;color:#344054}.notification-list p{font-size:8.5px;color:#667085;margin-top:3px;line-height:1.45}.notification-list small{display:block;font-size:7.8px;color:#b0b7c3;margin-top:5px}.popover-footer-link{height:40px;display:flex;align-items:center;justify-content:center;gap:5px;color:#475467;text-decoration:none;font-size:9px;font-weight:750}.popover-footer-link:hover{background:#f8f9fb}.popover-footer-link svg{width:12px}
.profile-popover{width:280px}.profile-summary{padding:15px;display:flex;align-items:center;gap:11px;border-bottom:1px solid #eef0f3}.profile-avatar-lg{width:42px;height:42px;border-radius:12px;background:#111827;color:#fff;display:grid;place-items:center;font-size:11px;font-weight:800}.profile-summary strong{display:block;font-size:11px;color:#344054}.profile-summary span{display:block;font-size:8.5px;color:#98a2b3;margin-top:2px}.profile-summary small{display:flex;align-items:center;gap:5px;font-size:8px;color:#667085;margin-top:5px}.profile-summary small i{width:6px;height:6px;border-radius:50%;background:#22c55e}.profile-menu{padding:7px}.profile-menu button{width:100%;height:38px;border-radius:9px;display:flex;align-items:center;gap:9px;padding:0 9px;color:#596273;font-size:9.5px;font-weight:650;text-align:left}.profile-menu button:hover{background:#f7f8fa;color:#111827}.profile-menu svg{width:15px}.profile-logout{padding:7px;border-top:1px solid #eef0f3}.profile-logout button{width:100%;min-height:46px;border-radius:10px;display:flex;align-items:center;gap:10px;padding:7px 9px;color:#c81e24;text-align:left}.profile-logout button:hover{background:#fff1f1}.profile-logout svg{width:16px}.profile-logout b{display:block;font-size:9.5px}.profile-logout small{display:block;font-size:8px;color:#d35b60;margin-top:2px}
.search-popover{left:0;right:0;width:auto;top:calc(100% + 8px);max-height:430px;overflow:auto}.search-popover:before{left:28px;right:auto}.search-result-head{height:38px;padding:0 12px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #eef0f3;font-size:8.5px;color:#98a2b3;font-weight:700;text-transform:uppercase;letter-spacing:.06em}.search-result-head b{background:#f2f4f7;color:#667085;border-radius:999px;padding:2px 6px}.search-popover>a{min-height:51px;padding:8px 11px;display:flex;align-items:center;gap:10px;text-decoration:none;color:#667085;border-bottom:1px solid #f5f6f7}.search-popover>a:hover{background:#f8f9fb}.search-popover>a>span{width:31px;height:31px;border-radius:9px;background:#f4f5f7;display:grid;place-items:center}.search-popover>a>span svg{width:14px}.search-popover>a>div{min-width:0;flex:1}.search-popover>a b{display:block;font-size:9.8px;color:#344054}.search-popover>a small{display:block;font-size:8px;color:#98a2b3;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.search-popover>a>svg{width:13px;color:#c0c5ce}.search-empty{min-height:155px;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#98a2b3;text-align:center}.search-empty svg{width:25px}.search-empty strong{font-size:10px;color:#475467;margin-top:8px}.search-empty span{font-size:8.5px;margin-top:3px}
@media(max-width:1280px){.topbar-search-wrap{max-width:430px}.topbar-shell{padding:0 14px}.topbar-tools{gap:5px}}
@media(max-width:850px){.topbar-shell{height:66px}.topbar-search-wrap{max-width:none}.profile-trigger{padding-right:5px}.scope-switcher{min-width:0}.sidebar-nav{height:calc(100vh - 128px)}}
@media(max-width:640px){.topbar-shell{padding:0 10px;gap:8px}.topbar-tools{gap:4px}.topbar-separator{display:none}.profile-trigger{border:0;background:transparent;box-shadow:none;padding:3px}.header-avatar{width:35px;height:35px}.approval-button{display:none}.notifications-popover,.profile-popover{position:fixed;top:74px;right:10px;left:10px;width:auto}.topbar-popover:before{display:none}}
/* Header responsive visibility is controlled here so popover `hidden` state remains deterministic. */
.topbar-sm-block,.topbar-md-block,.topbar-lg-block,.topbar-xl-flex,.topbar-2xl-flex,.topbar-2xl-inline,.topbar-2xl-block{display:none!important}
@media(min-width:640px){.topbar-sm-block{display:block!important}}
@media(min-width:768px){.topbar-md-block{display:block!important}}
@media(min-width:1024px){.topbar-lg-block{display:block!important}}
@media(min-width:1280px){.topbar-xl-flex{display:flex!important}}
@media(min-width:1500px){.topbar-2xl-flex{display:flex!important}.topbar-2xl-inline{display:inline!important}.topbar-2xl-block{display:block!important}}

/* =========================================================
   BRN SYSTEM V4 — PAGE EXPERIENCE UPGRADE
   Focus: clearer hierarchy, contextual workspace, richer pages
   ========================================================= */
:root{
  --surface:#ffffff;
  --surface-soft:#f9fafb;
  --surface-muted:#f4f6f8;
  --surface-red:#fff5f5;
  --text-strong:#101828;
  --text:#344054;
  --text-soft:#667085;
  --text-faint:#98a2b3;
  --shadow-sm:0 1px 2px rgba(16,24,40,.025),0 4px 12px rgba(16,24,40,.025);
  --shadow-md:0 8px 26px rgba(16,24,40,.055),0 2px 7px rgba(16,24,40,.025);
  --shadow-lg:0 20px 55px rgba(16,24,40,.09),0 5px 18px rgba(16,24,40,.035);
}
body{background:linear-gradient(180deg,#f8f9fb 0,#f6f7f9 320px,#f6f7f9 100%);}
main{padding-top:28px!important;padding-bottom:54px!important;}

/* Better contextual page hero */
.page-heading-v4{
  position:relative;
  align-items:center;
  overflow:hidden;
  padding:22px 24px;
  background:rgba(255,255,255,.9);
  border:1px solid rgba(228,231,236,.9);
  border-radius:22px;
  box-shadow:var(--shadow-sm);
  backdrop-filter:blur(14px);
}
.page-heading-v4:after{
  content:"";
  position:absolute;
  width:240px;height:240px;right:-130px;top:-140px;
  border-radius:50%;
  background:radial-gradient(circle,rgba(239,29,36,.075),rgba(239,29,36,0) 68%);
  pointer-events:none;
}
.page-heading-v4>div{position:relative;z-index:1;}
.page-heading-v4 .breadcrumb{font-size:10px;letter-spacing:.01em;}
.page-heading-v4 .page-icon{
  width:50px;height:50px;border-radius:15px;
  background:linear-gradient(145deg,#fff5f5,#fff);
  box-shadow:inset 0 0 0 1px #ffe3e4,0 6px 16px rgba(239,29,36,.07);
}
.page-heading-v4 .page-icon svg{width:23px;height:23px;}
.page-heading-v4 h1{font-size:clamp(25px,2.8vw,35px);}
.page-heading-v4 p{max-width:820px;color:#667085;font-size:12.5px;}
.page-heading-v4 .soft-chip{background:#f6f7f9;border:1px solid #eef0f3;}
.page-mode-pill{
  min-height:42px;padding:6px 11px 6px 8px;
  border-radius:13px;
  border:1px solid #e8eaee;
  background:rgba(255,255,255,.86);
  display:flex;align-items:center;gap:8px;
  color:#667085;white-space:nowrap;
}
.page-mode-pill>svg{width:17px;height:17px;color:#475467;}
.page-mode-pill small{display:block;font-size:7.5px;line-height:1;text-transform:uppercase;letter-spacing:.08em;color:#98a2b3;font-weight:800;}
.page-mode-pill b{display:block;margin-top:4px;font-size:9.5px;color:#344054;line-height:1;font-weight:800;}

/* Context strip: useful instead of decorative */
.page-experience-strip{
  min-height:70px;margin-top:12px;padding:11px 14px;
  background:rgba(255,255,255,.72);
  border:1px solid rgba(231,233,238,.9);
  border-radius:17px;
  display:flex;align-items:center;justify-content:space-between;gap:16px;
  box-shadow:0 3px 12px rgba(16,24,40,.018);
  backdrop-filter:blur(10px);
}
.experience-message{display:flex;align-items:center;gap:11px;min-width:0;}
.experience-message-icon{width:38px;height:38px;border-radius:11px;background:#f4f5f7;color:#475467;display:grid;place-items:center;flex:0 0 auto;}
.experience-message-icon svg{width:17px;height:17px;}
.experience-message small{display:block;color:#98a2b3;text-transform:uppercase;letter-spacing:.09em;font-size:7.5px;font-weight:800;}
.experience-message strong{display:block;color:#475467;font-size:10px;line-height:1.45;margin-top:3px;font-weight:700;max-width:600px;}
.experience-meta{display:flex;align-items:stretch;gap:6px;flex-wrap:wrap;justify-content:flex-end;}
.experience-meta>span{min-width:118px;padding:7px 9px;border-radius:11px;background:#fff;border:1px solid #eceef2;display:grid;grid-template-columns:17px 1fr;column-gap:7px;align-items:center;}
.experience-meta>span>svg{grid-row:1/3;width:15px;height:15px;color:#98a2b3;}
.experience-meta small{font-size:7px;color:#98a2b3;text-transform:uppercase;letter-spacing:.06em;font-weight:750;line-height:1.1;}
.experience-meta b{font-size:8.5px;color:#475467;font-weight:800;line-height:1.25;margin-top:2px;}

/* Buttons are cleaner and more tactile */
.btn-primary,.btn-secondary{height:42px;border-radius:12px;}
.btn-primary{box-shadow:0 8px 18px rgba(239,29,36,.14),inset 0 1px 0 rgba(255,255,255,.18);}
.btn-secondary{box-shadow:0 1px 2px rgba(16,24,40,.025);}
.btn-secondary:hover{border-color:#d9dde4;box-shadow:0 5px 12px rgba(16,24,40,.045);transform:translateY(-1px);}
.compact-action{height:42px;}

/* Metric cards: more legible with subtle visual hierarchy */
.metric-card-v4{
  min-height:112px;
  position:relative;overflow:hidden;
  padding:18px;
  border-color:#e9ebef;
  border-radius:18px;
  box-shadow:var(--shadow-sm);
  transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease;
}
.metric-card-v4:hover{transform:translateY(-2px);box-shadow:var(--shadow-md);border-color:#dee1e6;}
.metric-card-v4:after{content:"";position:absolute;width:72px;height:72px;border-radius:50%;right:-35px;top:-35px;background:rgba(16,24,40,.022);}
.metric-card-v4:first-child .metric-icon{background:#fff1f1;color:#d51b21;}
.metric-card-v4 .metric-icon{width:43px;height:43px;border-radius:13px;background:#f5f6f8;}
.metric-card-v4 strong{font-size:23px;color:#101828;}
.metric-card-v4 p{font-size:9px;}
.metric-card-v4 span{font-size:9px;color:#98a2b3;}

/* Panels */
.panel-v4{border-color:#e8eaef;box-shadow:var(--shadow-sm);}
.panel-v4:hover{border-color:#e1e4e9;}
.panel-head{padding:19px 20px 15px;}
.panel-head h2{font-size:14.5px;color:#101828;}
.record-chip{background:#f6f7f9;border:1px solid #eceef2;color:#667085;}

/* Datatable workspace */
.datatable-v4{box-shadow:var(--shadow-md);border-radius:20px;}
.datatable-v4 .panel-head{background:linear-gradient(180deg,#fff,#fefefe);}
.datatable-toolbar{padding:12px 20px;background:#fafbfc;gap:12px;}
.datatable-toolbar .table-search{height:39px;min-width:min(380px,42vw);border-radius:11px;background:#fff;}
.datatable-toolbar .table-search:focus-within{border-color:#cfd4dc;box-shadow:0 0 0 4px rgba(16,24,40,.035);}
.toolbar-right{align-items:center;flex-wrap:wrap;justify-content:flex-end;}
.toolbar-right select{height:39px;border-radius:11px!important;}
.dt-tool-btn{width:39px;height:39px;border:1px solid #e4e7ec;border-radius:11px;background:#fff;color:#667085;display:grid;place-items:center;}
.dt-tool-btn:hover{background:#f4f5f7;color:#111827;border-color:#d8dce3;box-shadow:0 3px 9px rgba(16,24,40,.045);}
.dt-tool-btn svg{width:15px;height:15px;}
.table-scroll{position:relative;background:#fff;}
.brn-table{min-width:940px;}
.brn-table thead{background:#f7f8fa;}
.brn-table th{position:sticky;top:0;z-index:2;height:44px;background:#f7f8fa;color:#697386;letter-spacing:.055em;}
.brn-table th:first-child,.brn-table td:first-child{padding-left:19px;}
.brn-table th:last-child,.brn-table td:last-child{padding-right:19px;}
.brn-table td{height:48px;padding-top:10px;padding-bottom:10px;font-size:10.8px;}
.brn-table tbody tr{transition:background .15s ease,box-shadow .15s ease;}
.brn-table tbody tr:nth-child(even){background:#fdfdfd;}
.brn-table tbody tr:hover{background:#f8f9fb;box-shadow:inset 3px 0 0 #eaedf1;}
.row-no{font-size:9.5px!important;font-weight:800!important;color:#98a2b3!important;}
.status-badge{padding:5px 9px;border:1px solid transparent;}
.status-badge.success{border-color:#d6f5e2;}
.status-badge.warning{border-color:#f8e9b9;}
.status-badge.danger{border-color:#ffd9db;}
.row-actions button,.icon-btn{width:31px;height:31px;border-radius:9px;}
.datatable-footer{padding:13px 20px;background:#fff;}
.pagination button{height:32px;min-width:32px;border-radius:9px;}
.dt-empty{position:absolute;inset:44px 0 0;background:rgba(255,255,255,.96);z-index:6;min-height:260px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;color:#98a2b3;}
.dt-empty>svg{width:28px;height:28px;}
.dt-empty strong{font-size:12px;color:#475467;margin-top:9px;}
.dt-empty span{font-size:9.5px;margin-top:4px;}
.dt-empty button{margin-top:12px;height:32px;padding:0 11px;border-radius:9px;background:#f4f5f7;color:#475467;font-size:9px;font-weight:750;}
.dt-empty button:hover{background:#eaecf0;color:#101828;}

/* Overview pages */
.module-hero-v4{border-radius:24px!important;box-shadow:var(--shadow-md)!important;overflow:hidden;position:relative;}
.module-hero-v4:after{content:"";position:absolute;right:-90px;top:-130px;width:260px;height:260px;border-radius:50%;background:radial-gradient(circle,rgba(239,29,36,.065),rgba(239,29,36,0) 68%);}
.module-overview-status{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:12px;}
.module-overview-status>div{padding:12px 14px;background:rgba(255,255,255,.78);border:1px solid #e8eaef;border-radius:15px;display:flex;align-items:center;gap:10px;box-shadow:var(--shadow-sm);}
.module-overview-status>div>span{width:34px;height:34px;border-radius:10px;background:#f4f5f7;color:#667085;display:grid;place-items:center;}
.module-overview-status svg{width:15px;height:15px;}
.module-overview-status small{display:block;font-size:7.5px;color:#98a2b3;text-transform:uppercase;letter-spacing:.07em;font-weight:800;}
.module-overview-status b{display:block;font-size:9.5px;color:#475467;margin-top:3px;}
.module-link-list-v4{gap:7px!important;}
.module-link-list-v4 a{min-height:45px;border:1px solid transparent;border-radius:11px;padding:7px 9px!important;}
.module-link-list-v4 a:hover{background:#f8f9fb!important;border-color:#eceef2;transform:translateX(2px);}
.module-link-list-v4 a>svg:first-child{width:16px;height:16px;color:#7b8492;}
.module-link-list-v4 a .link-arrow{opacity:.45;transition:transform .18s ease,opacity .18s ease;}
.module-link-list-v4 a:hover .link-arrow{opacity:1;transform:translateX(2px);}
.section-title>span{box-shadow:inset 0 0 0 1px #eceef2;}

/* Workflow command center */
.workflow-command{margin-top:18px;margin-bottom:-4px;padding:15px 17px;background:#fff;border:1px solid #e8eaef;border-radius:18px;box-shadow:var(--shadow-sm);display:flex;align-items:center;justify-content:space-between;gap:18px;}
.workflow-command-copy{display:flex;align-items:center;gap:12px;min-width:0;}
.command-icon{width:42px;height:42px;border-radius:13px;background:#fff4f4;color:#d71c22;display:grid;place-items:center;flex:0 0 auto;}
.command-icon svg{width:19px;height:19px;}
.workflow-command-copy small,.decision-head small,.report-filter-title small{font-size:7.5px;color:#98a2b3;text-transform:uppercase;letter-spacing:.08em;font-weight:800;}
.workflow-command-copy h3{font-size:12.5px;color:#101828;font-weight:850;margin-top:2px;}
.workflow-command-copy p{font-size:9.5px;color:#7b8492;margin-top:3px;line-height:1.4;}
.workflow-command-stats{display:flex;gap:7px;}
.workflow-command-stats>span{min-width:84px;padding:8px 10px;border:1px solid #eceef2;border-radius:11px;background:#fafbfc;text-align:center;}
.workflow-command-stats small{display:block;font-size:7.2px;color:#98a2b3;text-transform:uppercase;font-weight:750;}
.workflow-command-stats b{display:block;font-size:15px;color:#344054;margin-top:2px;letter-spacing:-.03em;}

/* Live monitor strip */
.live-monitor-strip{margin-top:18px;margin-bottom:-4px;min-height:62px;padding:10px 14px;background:#fff;border:1px solid #e8eaef;border-radius:17px;display:flex;align-items:center;justify-content:space-between;gap:14px;box-shadow:var(--shadow-sm);}
.live-monitor-strip>div:first-child{display:flex;align-items:center;gap:9px;}
.live-pulse{width:34px;height:34px;border-radius:11px;background:#f0fdf4;display:grid;place-items:center;}
.live-pulse i{width:8px;height:8px;border-radius:50%;background:#22c55e;box-shadow:0 0 0 5px rgba(34,197,94,.11);animation:livePulse 1.9s infinite;}
@keyframes livePulse{0%,100%{box-shadow:0 0 0 4px rgba(34,197,94,.09)}50%{box-shadow:0 0 0 8px rgba(34,197,94,.025)}}
.live-monitor-strip small{display:block;font-size:7.5px;color:#16a34a;text-transform:uppercase;letter-spacing:.07em;font-weight:800;}
.live-monitor-strip b{display:block;font-size:9.8px;color:#475467;margin-top:3px;}
.live-monitor-actions{display:flex;align-items:center;gap:8px;}
.live-monitor-actions>span{display:flex;align-items:center;gap:5px;color:#98a2b3;font-size:8.5px;}
.live-monitor-actions svg{width:13px;height:13px;}
.live-monitor-actions button{height:34px;padding:0 10px;border-radius:9px;border:1px solid #e4e7ec;background:#fff;color:#475467;display:flex;align-items:center;gap:5px;font-size:8.5px;font-weight:750;}
.live-monitor-actions button:hover{background:#f7f8fa;}

/* Reports */
.report-command-center{margin-top:18px;margin-bottom:-4px;display:grid;grid-template-columns:minmax(0,1.45fr) minmax(270px,.55fr);gap:12px;}
.report-filter-card,.report-insight-card{background:#fff;border:1px solid #e8eaef;border-radius:18px;box-shadow:var(--shadow-sm);}
.report-filter-card{padding:14px 16px;display:flex;align-items:center;gap:20px;}
.report-filter-title{display:flex;align-items:center;gap:9px;min-width:145px;}
.report-filter-title>span{width:36px;height:36px;border-radius:11px;background:#f4f5f7;color:#667085;display:grid;place-items:center;}
.report-filter-title svg{width:16px;}
.report-filter-title h3{font-size:11px;color:#344054;margin-top:2px;font-weight:800;}
.report-filter-grid{display:grid;grid-template-columns:1fr 1fr auto;align-items:end;gap:8px;flex:1;}
.report-filter-grid label>span{display:block;font-size:7.5px;color:#98a2b3;font-weight:750;margin-bottom:4px;}
.report-filter-grid select{width:100%;height:36px;border:1px solid #e4e7ec!important;border-radius:10px!important;background:#fff!important;box-shadow:none!important;font-size:9px;color:#475467;}
.report-filter-grid button{height:36px;padding:0 11px;border-radius:10px;background:#111827;color:#fff;display:flex;align-items:center;gap:5px;font-size:8.5px;font-weight:750;}
.report-filter-grid button svg{width:13px;}
.report-insight-card{padding:13px 15px;display:grid;grid-template-columns:auto 1fr;align-items:end;gap:14px;overflow:hidden;}
.report-insight-card small{display:block;font-size:7.5px;text-transform:uppercase;letter-spacing:.06em;color:#98a2b3;font-weight:800;}
.report-insight-card b{display:block;font-size:20px;color:#15803d;margin-top:3px;letter-spacing:-.04em;}
.report-insight-card span{display:block;font-size:7.8px;color:#98a2b3;margin-top:2px;white-space:nowrap;}
.mini-bars{height:52px;display:flex;align-items:end;gap:4px;}
.mini-bars i{flex:1;min-width:5px;border-radius:5px 5px 2px 2px;background:linear-gradient(180deg,#70798a,#c4c8cf);opacity:.72;}
.mini-bars i:last-child{background:linear-gradient(180deg,#ef1d24,#f68a8e);opacity:.9;}

/* Decision dashboards */
.dashboard-decision-grid{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(330px,.75fr);gap:14px;margin-top:16px;}
.decision-trend,.decision-focus{background:#fff;border:1px solid #e8eaef;border-radius:19px;padding:16px 17px;box-shadow:var(--shadow-sm);}
.decision-head{display:flex;align-items:center;justify-content:space-between;gap:12px;}
.decision-head h3{font-size:12px;font-weight:850;color:#101828;margin-top:2px;}
.decision-head>span{padding:5px 8px;border-radius:999px;background:#eefbf2;color:#15803d;font-size:8px;font-weight:800;display:flex;align-items:center;gap:4px;}
.decision-head>span svg,.decision-head>svg{width:14px;height:14px;color:#98a2b3;}
.trend-chart{height:92px;margin-top:16px;display:flex;align-items:end;gap:8px;border-bottom:1px solid #eef0f3;padding:0 5px;}
.trend-chart i{flex:1;border-radius:7px 7px 2px 2px;background:linear-gradient(180deg,#4f5868,#c6cad1);opacity:.7;min-width:14px;}
.trend-chart i:last-child{background:linear-gradient(180deg,#ef1d24,#ff999c);opacity:.9;}
.trend-labels{display:grid;grid-template-columns:repeat(7,1fr);gap:8px;margin-top:6px;padding:0 5px;text-align:center;color:#a3aab5;font-size:7.5px;}
.decision-focus ul{margin-top:11px;display:grid;gap:4px;}
.decision-focus li{display:grid;grid-template-columns:9px 1fr auto;align-items:center;gap:8px;padding:8px;border-radius:10px;}
.decision-focus li:hover{background:#f8f9fb;}
.focus-dot{width:7px;height:7px;border-radius:50%;}.focus-dot.danger{background:#ef4444}.focus-dot.warning{background:#f59e0b}.focus-dot.success{background:#22c55e}
.decision-focus li b{display:block;font-size:9.5px;color:#475467;}.decision-focus li small{display:block;font-size:7.8px;color:#98a2b3;margin-top:2px;}.decision-focus li strong{font-size:7.5px;color:#98a2b3;text-transform:uppercase;}

/* Builder stepper */
.builder-stepper{margin-top:16px;padding:11px 14px;background:#fff;border:1px solid #e8eaef;border-radius:17px;box-shadow:var(--shadow-sm);display:flex;align-items:center;justify-content:center;gap:8px;}
.builder-stepper>div{min-width:112px;display:grid;grid-template-columns:34px 1fr;column-gap:8px;align-items:center;padding:6px 8px;border-radius:11px;}
.builder-stepper>div.active{background:#fff4f4;}
.builder-stepper>div>span{grid-row:1/3;width:32px;height:32px;border-radius:10px;background:#f4f5f7;color:#667085;display:grid;place-items:center;}.builder-stepper>div.active>span{background:#fff;color:#d51b21;box-shadow:0 3px 10px rgba(239,29,36,.08);}
.builder-stepper svg{width:15px;height:15px;}.builder-stepper small{font-size:7px;color:#98a2b3;text-transform:uppercase;font-weight:750;}.builder-stepper b{font-size:9px;color:#475467;margin-top:1px;}.builder-stepper .step-line{width:38px;height:1px;background:#e8eaef;}
.preview-card{box-shadow:inset 0 0 0 1px #eceef2;}

/* Config governance */
.config-governance{display:grid;grid-template-columns:repeat(3,1fr);gap:9px;margin-top:16px;}
.config-governance>div{min-height:58px;background:#fff;border:1px solid #e8eaef;border-radius:15px;padding:9px 12px;display:flex;align-items:center;gap:9px;box-shadow:var(--shadow-sm);}
.config-governance>div>svg{width:17px;color:#667085;}.config-governance small{display:block;font-size:7px;color:#98a2b3;text-transform:uppercase;letter-spacing:.06em;font-weight:750;}.config-governance b{display:block;font-size:8.8px;color:#475467;margin-top:3px;}
.toggle-row{padding:14px 2px;}.toggle-row:hover{background:#fafbfc;margin-left:-8px;margin-right:-8px;padding-left:10px;padding-right:10px;border-radius:10px;}

/* Audit log */
.audit-integrity-strip{margin-top:18px;margin-bottom:-4px;min-height:60px;background:#fff;border:1px solid #e8eaef;border-radius:16px;padding:10px 13px;display:flex;align-items:center;justify-content:space-between;gap:12px;box-shadow:var(--shadow-sm);}
.audit-integrity-strip>div:first-child{display:flex;align-items:center;gap:9px;}.audit-integrity-strip>div:first-child>svg{width:17px;color:#667085;}.audit-integrity-strip small{display:block;font-size:7px;color:#98a2b3;text-transform:uppercase;font-weight:800;}.audit-integrity-strip b{display:block;font-size:9px;color:#475467;margin-top:2px;}.audit-filter-chips{display:flex;gap:5px;flex-wrap:wrap;}.audit-filter-chips button{height:30px;padding:0 9px;border-radius:9px;background:#f7f8fa;color:#667085;font-size:8px;font-weight:750;}.audit-filter-chips button.active,.audit-filter-chips button:hover{background:#111827;color:#fff;}

/* Kanban */
.kanban-controls{margin-top:18px;margin-bottom:-4px;min-height:60px;padding:10px 13px;background:#fff;border:1px solid #e8eaef;border-radius:16px;box-shadow:var(--shadow-sm);display:flex;align-items:center;justify-content:space-between;gap:12px;}
.kanban-controls>div:first-child{display:flex;align-items:center;gap:9px;}.kanban-controls>div:first-child>span{width:35px;height:35px;border-radius:10px;background:#f4f5f7;color:#667085;display:grid;place-items:center;}.kanban-controls svg{width:15px;height:15px;}.kanban-controls small{display:block;font-size:7px;color:#98a2b3;text-transform:uppercase;font-weight:800;}.kanban-controls b{display:block;font-size:9px;color:#475467;margin-top:2px;}.kanban-controls>div:last-child{display:flex;gap:6px;}.kanban-controls select{height:34px;border:1px solid #e4e7ec!important;border-radius:9px!important;font-size:8.5px;color:#667085;background:#fff!important;box-shadow:none!important;}.kanban-controls button{width:34px;height:34px;border:1px solid #e4e7ec;border-radius:9px;display:grid;place-items:center;color:#667085;background:#fff;}
.kanban-column{background:#eef1f4;border:1px solid #e6e9ed;border-radius:18px;padding:11px;}
.task-card-v4{position:relative;padding-top:15px;border:1px solid #eceef2;box-shadow:0 4px 12px rgba(16,24,40,.035);cursor:grab;}.task-card-v4:hover{transform:translateY(-2px);box-shadow:0 10px 22px rgba(16,24,40,.07);}.task-card-v4:active{cursor:grabbing;}.task-priority{position:absolute;right:10px;top:10px;padding:3px 6px;border-radius:999px;font-size:7px;font-weight:800;}.task-priority.high{background:#fff0f0;color:#c61b21}.task-priority.medium{background:#fff7e6;color:#9a6c00}.task-priority.normal{background:#eef7f1;color:#257344}

/* Modals and forms */
.modal-backdrop{background:rgba(15,23,42,.42);backdrop-filter:blur(4px);}
.modal-card{border:1px solid rgba(255,255,255,.7);border-radius:23px;padding:0;box-shadow:0 36px 100px rgba(15,23,42,.25);}
.modal-head{padding:20px 22px 16px;background:linear-gradient(180deg,#fff,#fafbfc);border-bottom:1px solid #edf0f2;}
.modal-card form{padding:0 22px 20px;}
.modal-actions{position:sticky;bottom:-20px;background:#fff;margin-left:-22px;margin-right:-22px;padding:14px 22px 0;}
.form-grid input,.form-grid select,.form-grid textarea{border-radius:11px!important;background:#fcfcfd!important;}.form-grid input:focus,.form-grid select:focus,.form-grid textarea:focus{background:#fff!important;border-color:#c9ced7!important;}

/* Responsive */
@media(max-width:1200px){
  .experience-meta>span{min-width:105px;}
  .dashboard-decision-grid{grid-template-columns:1fr;}
  .report-command-center{grid-template-columns:1fr;}
  .report-insight-card{min-height:95px;}
}
@media(max-width:900px){
  main{padding-top:20px!important;}
  .page-heading-v4{align-items:flex-start;}
  .page-mode-pill{display:none;}
  .page-experience-strip{align-items:flex-start;flex-direction:column;}
  .experience-meta{width:100%;justify-content:flex-start;}
  .experience-meta>span{flex:1;min-width:140px;}
  .workflow-command,.live-monitor-strip,.audit-integrity-strip,.kanban-controls{align-items:flex-start;flex-direction:column;}
  .workflow-command-stats{width:100%;}.workflow-command-stats>span{flex:1;}
  .report-filter-card{align-items:flex-start;flex-direction:column;}.report-filter-title{min-width:0;}.report-filter-grid{width:100%;}
  .builder-stepper{justify-content:flex-start;overflow-x:auto;}.builder-stepper>div{min-width:125px;}.builder-stepper .step-line{min-width:24px;}
  .module-overview-status,.config-governance{grid-template-columns:1fr;}
}
@media(max-width:640px){
  main{padding:14px!important;padding-bottom:42px!important;}
  .page-heading-v4{padding:17px;border-radius:18px;}
  .page-heading-v4 .page-icon{width:43px;height:43px;border-radius:13px;}
  .page-heading-v4 h1{font-size:25px;}
  .page-experience-strip{display:none;}
  .metric-card-v4{min-height:100px;padding:14px;}
  .datatable-v4{border-radius:17px;}
  .datatable-toolbar{padding:10px 12px;}.toolbar-right{display:grid;grid-template-columns:repeat(3,36px) 1fr 1fr;width:100%;}.dt-tool-btn{width:36px;height:36px}.toolbar-right select{min-width:0;width:100%;padding-left:7px!important;padding-right:22px!important;}
  .workflow-command{padding:13px;}.workflow-command-copy p{display:none;}.workflow-command-stats>span{min-width:0;}
  .live-monitor-actions{width:100%;justify-content:space-between;}
  .report-filter-grid{grid-template-columns:1fr 1fr;}.report-filter-grid button{grid-column:1/-1;justify-content:center;}
  .report-insight-card{grid-template-columns:1fr;}.mini-bars{height:44px;}
  .decision-focus,.decision-trend{padding:14px;}.trend-chart{height:75px;gap:5px;}
  .audit-filter-chips{overflow-x:auto;width:100%;flex-wrap:nowrap;padding-bottom:2px;}.audit-filter-chips button{white-space:nowrap;}
  .kanban-controls>div:last-child{width:100%;}.kanban-controls select{flex:1;min-width:0;}
}


/* BRN SYSTEM V5 — SIDEBAR BRAND & HAMBURGER */
.sidebar-brand{
  height:82px;
  padding:13px 12px 13px 14px;
  gap:10px;
}
.sidebar-logo{
  width:54px;
  height:42px;
  flex:0 0 54px;
  border:1px solid #edf0f4;
  box-shadow:0 4px 12px rgba(16,24,40,.05);
}
.sidebar-brand-copy{
  min-width:0;
  flex:1;
  line-height:1.15;
}
.sidebar-brand-copy strong{
  font-size:14px;
  font-weight:800;
  color:#111827;
  letter-spacing:-.025em;
  white-space:nowrap;
}
.sidebar-brand-copy span{
  font-size:8.7px;
  font-weight:600;
  color:#98a2b3;
  margin-top:4px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.sidebar-hamburger{
  width:34px;
  height:34px;
  flex:0 0 34px;
  display:grid;
  place-items:center;
  border:1px solid #e8ebf0;
  border-radius:10px;
  background:#fff;
  color:#667085;
  cursor:pointer;
  transition:background .18s ease,color .18s ease,border-color .18s ease,box-shadow .18s ease;
}
.sidebar-hamburger:hover{
  color:#111827;
  background:#f7f8fa;
  border-color:#dfe3e9;
  box-shadow:0 4px 12px rgba(16,24,40,.05);
}
.sidebar-hamburger svg{width:18px;height:18px;stroke-width:2}
.sidebar-nav{height:calc(100vh - 134px)}

@media(min-width:1024px){
  #app-sidebar,.lg\:pl-\[304px\]{transition:width .22s ease,padding-left .22s ease,transform .22s ease}
  body.sidebar-collapsed #app-sidebar{width:82px}
  body.sidebar-collapsed .lg\:pl-\[304px\]{padding-left:82px!important}
  body.sidebar-collapsed .sidebar-brand{padding-left:13px;padding-right:13px;justify-content:center;gap:0}
  body.sidebar-collapsed .sidebar-brand-copy{display:none}
  body.sidebar-collapsed .sidebar-logo{display:none}
  body.sidebar-collapsed .sidebar-hamburger{width:42px;height:42px;flex-basis:42px;background:#f8f9fb}
  body.sidebar-collapsed .sidebar-footer{display:none}
  body.sidebar-collapsed .sidebar-nav{height:calc(100vh - 82px);padding:12px 9px 18px}
  body.sidebar-collapsed .nav-dashboard,
  body.sidebar-collapsed .nav-module-btn{justify-content:center;padding:0;width:100%;}
  body.sidebar-collapsed .nav-dashboard>span:not(.nav-icon),
  body.sidebar-collapsed .nav-module-btn>span:not(.nav-icon),
  body.sidebar-collapsed .nav-module-btn>.chev{display:none}
  body.sidebar-collapsed .nav-icon{width:22px;height:22px;flex-basis:22px}
  body.sidebar-collapsed .nav-icon svg{width:19px;height:19px}
  body.sidebar-collapsed .nav-module-children{display:none!important}
  body.sidebar-collapsed .nav-module-wrap{margin-top:4px}
}

@media(max-width:1023px){
  .sidebar-brand{height:78px}
  .sidebar-nav{height:calc(100vh - 130px)}
}

/* =========================================================
   BRN ERP SYSTEM V7 — LIGHT / DARK THEME
   Theme toggle lives in the admin header and persists locally.
   ========================================================= */
html{color-scheme:light;}
html.theme-dark{color-scheme:dark;}
.theme-toggle-btn{position:relative;overflow:hidden;transition:background .18s ease,color .18s ease,border-color .18s ease,transform .18s ease;}
.theme-toggle-btn:hover{transform:translateY(-1px);}
.theme-toggle-btn svg{transition:transform .22s ease;}
.theme-toggle-btn:hover svg{transform:rotate(-8deg) scale(1.04);}

html.theme-dark body{
  background:linear-gradient(180deg,#0b1220 0,#0a101c 340px,#0a101c 100%)!important;
  color:#e5e7eb!important;
}
html.theme-dark #sidebar-overlay{background:rgba(2,6,23,.68)!important;}
html.theme-dark #app-sidebar{
  background:#0f1724!important;
  border-color:#263244!important;
  color:#dbe4ef;
}
html.theme-dark .sidebar-brand{border-color:#263244;}
html.theme-dark .sidebar-logo{background:#fff;box-shadow:0 6px 18px rgba(0,0,0,.22);}
html.theme-dark .sidebar-brand-copy strong{color:#f8fafc;}
html.theme-dark .sidebar-brand-copy span{color:#7f8da3;}
html.theme-dark .sidebar-hamburger{background:#172233;border-color:#29364a;color:#aebbd0;}
html.theme-dark .sidebar-hamburger:hover{background:#1d2a3e;color:#fff;border-color:#34445d;}
html.theme-dark .sidebar-nav::-webkit-scrollbar-thumb{background:#344258;}
html.theme-dark .nav-dashboard,
html.theme-dark .nav-module-btn,
html.theme-dark .nav-section-btn,
html.theme-dark .nav-page{color:#94a3b8;}
html.theme-dark .nav-dashboard:hover,
html.theme-dark .nav-module-btn:hover,
html.theme-dark .nav-overview:hover,
html.theme-dark .nav-page:hover,
html.theme-dark .nav-section-btn:hover{background:#172233;color:#f8fafc;}
html.theme-dark .nav-module-btn.open{background:#151f2e;color:#f8fafc;}
html.theme-dark .nav-module-children{border-color:#2a374b;}
html.theme-dark .nav-dashboard.active,
html.theme-dark .nav-overview.active,
html.theme-dark .nav-page.active{background:rgba(239,29,36,.13);color:#ff7d82;}
html.theme-dark .sidebar-footer{border-color:#263244!important;background:#0f1724!important;}
html.theme-dark .sidebar-system-state{background:#151f2e!important;border-color:#263244!important;}
html.theme-dark .sidebar-system-state strong{color:#e5e7eb!important;}
html.theme-dark .sidebar-system-state span{color:#7f8da3!important;}

html.theme-dark .topbar-shell{
  background:rgba(11,18,32,.82)!important;
  border-color:rgba(51,65,85,.75)!important;
  box-shadow:0 10px 34px rgba(0,0,0,.16)!important;
  backdrop-filter:blur(18px)!important;
}
html.theme-dark .topbar-context-icon,
html.theme-dark .topbar-action,
html.theme-dark .topbar-icon-btn,
html.theme-dark .quick-action-btn,
html.theme-dark .scope-switcher,
html.theme-dark .profile-trigger{
  background:#121c2b!important;
  border-color:#2a3749!important;
  color:#aebbd0!important;
}
html.theme-dark .topbar-action:hover,
html.theme-dark .topbar-icon-btn:hover,
html.theme-dark .quick-action-btn:hover,
html.theme-dark .scope-switcher:hover,
html.theme-dark .profile-trigger:hover{background:#19263a!important;color:#fff!important;border-color:#3a4a63!important;}
html.theme-dark .theme-toggle-btn{background:#172233!important;color:#f7c66a!important;border-color:#334155!important;}
html.theme-dark .topbar-context span,
html.theme-dark .profile-copy small,
html.theme-dark .scope-switcher small{color:#7f8da3!important;}
html.theme-dark .topbar-context strong,
html.theme-dark .profile-copy b,
html.theme-dark .scope-switcher b{color:#e5e7eb!important;}
html.theme-dark .topbar-search{background:#111b2a!important;border:1px solid #273449!important;color:#7f8da3!important;}
html.theme-dark .topbar-search input{color:#dbe4ef!important;}
html.theme-dark .topbar-search input::placeholder{color:#6f7f96!important;}
html.theme-dark .topbar-search kbd{background:#1d2a3d!important;border-color:#35445b!important;color:#8f9db1!important;}
html.theme-dark .topbar-separator{background:#2a3749!important;}
html.theme-dark .system-online{background:rgba(16,185,129,.08)!important;border-color:rgba(16,185,129,.18)!important;color:#6ee7b7!important;}
html.theme-dark .topbar-popover,
html.theme-dark .search-popover,
html.theme-dark .scope-popover,
html.theme-dark .quick-popover,
html.theme-dark .notifications-popover,
html.theme-dark .profile-popover{
  background:#111b2a!important;border-color:#2b394e!important;box-shadow:0 24px 70px rgba(0,0,0,.42)!important;color:#dbe4ef!important;
}
html.theme-dark .popover-head,
html.theme-dark .profile-summary,
html.theme-dark .profile-logout{border-color:#29364a!important;}
html.theme-dark .popover-head strong,
html.theme-dark .profile-summary strong,
html.theme-dark .topbar-popover b{color:#f1f5f9!important;}
html.theme-dark .popover-head span,
html.theme-dark .profile-summary span,
html.theme-dark .profile-summary small,
html.theme-dark .topbar-popover small,
html.theme-dark .topbar-popover p{color:#8492a8!important;}
html.theme-dark .scope-option,
html.theme-dark .quick-popover a,
html.theme-dark .notification-list a,
html.theme-dark .profile-menu button,
html.theme-dark .profile-logout button{color:#b9c4d4!important;}
html.theme-dark .scope-option:hover,
html.theme-dark .scope-option.active,
html.theme-dark .quick-popover a:hover,
html.theme-dark .notification-list a:hover,
html.theme-dark .profile-menu button:hover,
html.theme-dark .profile-logout button:hover{background:#172334!important;}
html.theme-dark .popover-footer-link{border-color:#29364a!important;color:#ff7d82!important;}

html.theme-dark main{color:#dbe4ef;}
html.theme-dark .breadcrumb,
html.theme-dark .eyebrow{color:#7f8da3!important;}
html.theme-dark .breadcrumb span:last-child{color:#aebbd0!important;}
html.theme-dark .page-heading h1,
html.theme-dark .module-hero h1,
html.theme-dark .section-heading h2,
html.theme-dark .panel-head h2,
html.theme-dark .metric-card strong,
html.theme-dark .metric-card-v4 strong{color:#f8fafc!important;}
html.theme-dark .page-heading p,
html.theme-dark .module-hero p,
html.theme-dark .section-heading p,
html.theme-dark .panel-head p,
html.theme-dark .metric-card p,
html.theme-dark .metric-card span{color:#8290a5!important;}
html.theme-dark .page-heading-v4,
html.theme-dark .page-experience-strip,
html.theme-dark .panel,
html.theme-dark .panel-v4,
html.theme-dark .metric-card,
html.theme-dark .metric-card-v4,
html.theme-dark .module-hero,
html.theme-dark .module-card,
html.theme-dark .module-overview-status>div,
html.theme-dark .builder-stepper,
html.theme-dark .kanban-controls,
html.theme-dark .audit-integrity-strip,
html.theme-dark .workflow-command,
html.theme-dark .live-monitor-strip,
html.theme-dark .report-insight-card,
html.theme-dark .config-governance>div{
  background:#111b2a!important;
  border-color:#273449!important;
  box-shadow:0 8px 26px rgba(0,0,0,.16)!important;
}
html.theme-dark .page-heading-v4:after,
html.theme-dark .module-hero-v4:after{opacity:.55;}
html.theme-dark .page-icon,
html.theme-dark .page-heading-v4 .page-icon,
html.theme-dark .metric-icon,
html.theme-dark .metric-card-v4 .metric-icon,
html.theme-dark .module-card-icon,
html.theme-dark .experience-message-icon{background:#182537!important;color:#ff6b70!important;box-shadow:none!important;}
html.theme-dark .soft-chip,
html.theme-dark .record-chip,
html.theme-dark .page-mode-pill{background:#172334!important;border-color:#29374b!important;color:#94a3b8!important;}
html.theme-dark .page-mode-pill b,
html.theme-dark .experience-message strong,
html.theme-dark .experience-meta b{color:#cbd5e1!important;}
html.theme-dark .experience-message small,
html.theme-dark .experience-meta small{color:#718096!important;}
html.theme-dark .experience-meta>span{background:#121d2c!important;border-color:#29374b!important;}
html.theme-dark .btn-secondary{background:#162132!important;border-color:#2b394e!important;color:#cbd5e1!important;}
html.theme-dark .btn-secondary:hover{background:#1d2a3d!important;color:#fff!important;}

html.theme-dark .home-hero{background:linear-gradient(145deg,#111b2a,#0f1826)!important;border-color:#273449!important;box-shadow:0 20px 52px rgba(0,0,0,.18)!important;}
html.theme-dark .home-hero h1,
html.theme-dark .home-copy h1{color:#f8fafc!important;}
html.theme-dark .home-hero p,
html.theme-dark .home-copy p{color:#91a0b5!important;}
html.theme-dark .hero-logo-box,
html.theme-dark .module-hero-logo{background:#fff!important;}
html.theme-dark .hero-stat{background:#172334!important;border-color:#29374b!important;}
html.theme-dark .hero-stat strong{color:#f8fafc!important;}
html.theme-dark .hero-stat span{color:#8290a5!important;}
html.theme-dark .module-card h3,
html.theme-dark .module-link-list-v4 a span{color:#e5e7eb!important;}
html.theme-dark .module-card p{color:#7f8da3!important;}
html.theme-dark .module-card:hover,
html.theme-dark .module-link-list-v4 a:hover{background:#172334!important;border-color:#334155!important;}

html.theme-dark .datatable-v4,
html.theme-dark .datatable-panel{background:#111b2a!important;}
html.theme-dark .datatable-v4 .panel-head,
html.theme-dark .datatable-toolbar,
html.theme-dark .datatable-footer,
html.theme-dark .table-scroll{background:#111b2a!important;border-color:#263448!important;}
html.theme-dark .table-search,
html.theme-dark .toolbar-right select,
html.theme-dark .dt-tool-btn,
html.theme-dark .row-actions button,
html.theme-dark .icon-btn,
html.theme-dark .pagination button{
  background:#162132!important;border-color:#2b394e!important;color:#9ba9bd!important;
}
html.theme-dark .table-search input,
html.theme-dark .toolbar-right select{color:#d3dce8!important;}
html.theme-dark .table-search input::placeholder{color:#6e7d92!important;}
html.theme-dark .brn-table thead,
html.theme-dark .brn-table th{background:#152031!important;color:#8492a8!important;border-color:#2a3749!important;}
html.theme-dark .brn-table td{color:#b7c3d3!important;border-color:#223044!important;background:transparent!important;}
html.theme-dark .brn-table td:nth-child(2){color:#d9e2ec!important;}
html.theme-dark .brn-table tbody tr:nth-child(even){background:#0f1927!important;}
html.theme-dark .brn-table tbody tr:hover{background:#172334!important;box-shadow:inset 3px 0 0 #334155!important;}
html.theme-dark .pagination button:hover,
html.theme-dark .pagination button.active{background:#e91d24!important;border-color:#e91d24!important;color:#fff!important;}
html.theme-dark .dt-empty{background:rgba(17,27,42,.97)!important;color:#8290a5!important;}
html.theme-dark .dt-empty strong{color:#dbe4ef!important;}
html.theme-dark .dt-empty button{background:#1a2739!important;color:#b8c3d3!important;}

html.theme-dark .form-grid label>span{color:#aebbd0!important;}
html.theme-dark .form-grid input,
html.theme-dark .form-grid select,
html.theme-dark .form-grid textarea,
html.theme-dark input:not([type=checkbox]):not([type=radio]),
html.theme-dark select,
html.theme-dark textarea{
  background:#0f1927!important;border-color:#2d3b50!important;color:#dbe4ef!important;
}
html.theme-dark input::placeholder,
html.theme-dark textarea::placeholder{color:#64748b!important;}
html.theme-dark .modal-backdrop{background:rgba(2,6,23,.74)!important;}
html.theme-dark .modal-card{background:#111b2a!important;border-color:#334155!important;}
html.theme-dark .modal-head{background:linear-gradient(180deg,#141f30,#111b2a)!important;border-color:#2b394e!important;}
html.theme-dark .modal-actions{background:#111b2a!important;}
html.theme-dark .modal-card h2,
html.theme-dark .modal-card h3{color:#f8fafc!important;}
html.theme-dark .modal-card p{color:#8290a5!important;}

html.theme-dark .builder-stepper>div.active{background:rgba(239,29,36,.11)!important;}
html.theme-dark .builder-stepper>div>span{background:#182537!important;color:#9ba9bd!important;}
html.theme-dark .builder-stepper b,
html.theme-dark .config-governance b,
html.theme-dark .audit-integrity-strip b,
html.theme-dark .kanban-controls b{color:#cbd5e1!important;}
html.theme-dark .builder-stepper small,
html.theme-dark .config-governance small,
html.theme-dark .audit-integrity-strip small,
html.theme-dark .kanban-controls small{color:#718096!important;}
html.theme-dark .builder-stepper .step-line{background:#334155!important;}
html.theme-dark .kanban-column{background:#0d1724!important;border-color:#273449!important;}
html.theme-dark .task-card,
html.theme-dark .task-card-v4{background:#142031!important;border-color:#2a374a!important;color:#cbd5e1!important;}
html.theme-dark .kanban-controls select,
html.theme-dark .kanban-controls button{background:#162132!important;border-color:#2b394e!important;color:#9ba9bd!important;}
html.theme-dark .audit-filter-chips button{background:#162132!important;color:#9ba9bd!important;}
html.theme-dark .audit-filter-chips button.active,
html.theme-dark .audit-filter-chips button:hover{background:#e91d24!important;color:#fff!important;}

/* Tailwind utility compatibility used by generated static pages. */
html.theme-dark .bg-white{background-color:#111b2a!important;}
html.theme-dark .bg-slate-50{background-color:#0f1927!important;}
html.theme-dark .bg-slate-100{background-color:#172334!important;}
html.theme-dark .text-slate-950,
html.theme-dark .text-slate-900,
html.theme-dark .text-slate-800{color:#f1f5f9!important;}
html.theme-dark .text-slate-700,
html.theme-dark .text-slate-600{color:#c0cad8!important;}
html.theme-dark .text-slate-500{color:#8b99ad!important;}
html.theme-dark .text-slate-400{color:#718096!important;}
html.theme-dark .border-slate-200,
html.theme-dark .border-slate-300{border-color:#2c3a4f!important;}

@media(max-width:640px){
  html.theme-dark .topbar-shell{background:rgba(11,18,32,.94)!important;}
  .theme-toggle-btn{min-width:39px;}
}
