:root{--red:#c8102e;--red2:#9f0d25;--black:#111827;--muted:#64748b;--line:#e6eaf0;--bg:#f6f7f9;--white:#fff;--green:#14804a;--blue:#2563eb}*{box-sizing:border-box}body{margin:0;font-family:Inter,Arial,sans-serif;background:var(--bg);color:var(--black);font-size:14px}.app{display:flex;min-height:100vh}.sidebar{width:245px;background:#111318;color:#fff;padding:22px 15px;display:flex;flex-direction:column;position:sticky;top:0;height:100vh;min-height:0;overflow:hidden}.sidebar nav{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;padding:2px 2px 12px;scrollbar-width:thin;scrollbar-color:#4a505b transparent}.sidebar nav::-webkit-scrollbar{width:6px}.sidebar nav::-webkit-scrollbar-track{background:transparent}.sidebar nav::-webkit-scrollbar-thumb{background:#3e444e;border-radius:10px}.sidebar nav::-webkit-scrollbar-thumb:hover{background:#666e7a}.sidebar .side-foot{flex-shrink:0}.brand{display:flex;gap:11px;align-items:center;padding:5px 8px 25px}.brand-mark{width:42px;height:42px;border-radius:11px;background:var(--red);display:grid;place-items:center;font-weight:900}.brand b{display:block;font-size:15px}.brand small{display:block;color:#aeb5c0;font-size:7px;line-height:1.3;max-width:150px;margin-top:3px}.workspace{background:#1c2028;border:1px solid #303641;border-radius:10px;padding:12px;margin:0 3px 20px}.workspace b{font-size:12px;display:block}.workspace small{color:#9099a8;font-size:10px}nav{display:grid;gap:4px}nav>span{font-size:9px;color:#727b89;letter-spacing:1.2px;margin:12px 9px 5px}.nav{width:100%;border:0;background:transparent;color:#aeb5c0;text-align:left;padding:11px 10px;border-radius:8px;cursor:pointer;display:flex;gap:10px;align-items:center;font-size:14px}.nav b{font-size:12px;font-weight:600;flex:1}.nav em{font-style:normal;font-size:10px;background:#303641;padding:2px 6px;border-radius:10px}.nav:hover,.nav.active{background:var(--red);color:#fff}.nav.active em{background:#fff;color:var(--red)}.side-foot{margin-top:auto;border-top:1px solid #292e37;padding:15px 7px}.side-foot b{font-size:10px;display:block}.side-foot small{color:#7f8793;font-size:8px}main{flex:1;min-width:0}header{height:66px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 30px;position:sticky;top:0;z-index:5}header>div:first-child{font-size:12px;color:#9aa3b0}header b{color:#263244}.head-right{display:flex;align-items:center;gap:12px}.head-right input{width:300px;border:1px solid var(--line);padding:10px 13px;border-radius:8px;outline:0}.circle{width:35px;height:35px;border:1px solid var(--line);background:#fff;border-radius:50%;cursor:pointer}.avatar{width:34px;height:34px;border-radius:50%;background:#fee2e2;color:var(--red);display:grid;place-items:center;font-weight:800;font-size:11px}.content{padding:28px;max-width:1500px;margin:auto}.page-head{display:flex;justify-content:space-between;gap:20px;align-items:flex-end;margin-bottom:24px}.page-head small{font-size:9px;letter-spacing:1.5px;color:var(--red);font-weight:800}.page-head h1{font-size:26px;margin:5px 0}.page-head p{color:var(--muted);margin:0}.btn{border:1px solid var(--line);background:#fff;padding:10px 15px;border-radius:8px;cursor:pointer;font-weight:700;font-size:12px;margin-left:7px}.btn.primary{background:var(--red);color:#fff;border-color:var(--red)}.btn.primary:hover{background:var(--red2)}.btn.danger{color:#b42318;background:#fff5f5}.btn.small{padding:7px 10px;font-size:11px}.grid{display:grid;gap:15px}.metrics{grid-template-columns:repeat(4,1fr)}.card,.panel{background:#fff;border:1px solid var(--line);border-radius:11px;padding:18px;box-shadow:0 1px 2px #00000005}.metric label{font-size:11px;color:#7a8698}.metric .num{font-size:25px;font-weight:800;margin:9px 0}.metric small{color:#8290a4}.two{grid-template-columns:1.4fr 1fr;margin-top:15px}.three{grid-template-columns:repeat(3,1fr)}.panel h2{font-size:15px;margin:0 0 4px}.panel p{font-size:11px;color:#8995a7;margin:0 0 15px}.toolbar{display:flex;gap:8px;justify-content:space-between;align-items:center;margin-bottom:14px}.toolbar input,.toolbar select,.form input,.form select,.form textarea{border:1px solid #dce2ea;border-radius:7px;padding:9px 10px;background:#fff;outline:0;width:100%;font-size:12px}.toolbar input{max-width:280px}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;min-width:700px}th{text-align:left;font-size:9px;color:#8a96a7;letter-spacing:.5px;border-bottom:1px solid var(--line);padding:9px}td{padding:10px 9px;border-bottom:1px solid #f0f2f5;font-size:11px;color:#4e5d73}td strong{color:#26354d}.pill{display:inline-block;border-radius:20px;padding:4px 8px;font-size:9px;font-weight:700;background:#eef2f7}.pill.green{background:#e8f7ef;color:#137443}.pill.red{background:#ffebee;color:#b42338}.pill.orange{background:#fff3df;color:#a15c00}.pill.blue{background:#eaf1ff;color:#245ec4}.actions{display:flex;gap:5px}.actions button{border:1px solid var(--line);background:#fff;border-radius:6px;padding:5px 7px;cursor:pointer;font-size:10px}.empty{text-align:center;color:#8a96a7;padding:35px}.progress{height:8px;background:#edf0f4;border-radius:10px;overflow:hidden}.progress i{display:block;height:100%;background:var(--red)}.list{display:grid;gap:8px}.list-row{display:flex;align-items:center;gap:10px;border-bottom:1px solid #f0f2f5;padding:10px 0}.list-row>div:nth-child(2){flex:1}.list-row b{font-size:11px;display:block}.list-row small{font-size:9px;color:#8a96a7}.check{width:17px;height:17px}.modal-backdrop{position:fixed;inset:0;background:#11182799;z-index:20;display:grid;place-items:center;padding:20px}.modal{width:min(650px,100%);max-height:90vh;overflow:auto;background:#fff;border-radius:13px;padding:24px;position:relative}.close{position:absolute;right:13px;top:10px;border:0;background:transparent;font-size:25px;cursor:pointer;color:#7d8795}.form{display:grid;grid-template-columns:1fr 1fr;gap:12px}.form .full{grid-column:1/-1}.form label{font-size:10px;color:#5f6c7e;font-weight:700;display:grid;gap:5px}.form-actions{grid-column:1/-1;display:flex;justify-content:flex-end;margin-top:8px}.toast{position:fixed;right:22px;bottom:22px;background:#172033;color:#fff;padding:12px 16px;border-radius:8px;opacity:0;transform:translateY(10px);transition:.2s;z-index:30;font-size:12px}.toast.show{opacity:1;transform:none}[hidden]{display:none!important}.notice{padding:12px;border:1px solid #f4c7ce;background:#fff6f7;border-radius:8px;color:#8c2030;font-size:11px;margin-bottom:15px}.kpi{font-size:18px;font-weight:800}.report-grid{grid-template-columns:repeat(2,1fr)}@media(max-width:1050px){.sidebar{width:72px;padding:15px 8px}.brand>div:last-child,.workspace,.nav b,.nav em,nav>span,.side-foot{display:none}.nav{justify-content:center}.metrics{grid-template-columns:repeat(2,1fr)}.content{padding:20px}.two,.three,.report-grid{grid-template-columns:1fr}}@media(max-width:650px){header{padding:0 12px}.head-right input{width:130px}.content{padding:15px}.page-head{align-items:flex-start;flex-direction:column}.form{grid-template-columns:1fr}.form .full{grid-column:auto}.metrics{grid-template-columns:1fr 1fr}.btn{padding:9px 10px}.page-head h1{font-size:21px}}

.finance-tabs{display:flex;gap:6px;flex-wrap:wrap;border-bottom:1px solid var(--line);padding:0 0 12px;margin-bottom:16px}.ftab{border:1px solid var(--line);background:#fff;border-radius:7px;padding:8px 11px;font-size:11px;font-weight:700;cursor:pointer}.ftab.active{background:var(--red);border-color:var(--red);color:#fff}.fee-item{display:grid;grid-template-columns:1fr 150px;gap:10px;align-items:center;padding:8px 0;border-bottom:1px solid #f0f2f5;font-size:11px}.fee-item input{border:1px solid #dce2ea;border-radius:7px;padding:8px}.finance-tabs+div h3{font-size:14px}
.login-screen{min-height:100vh;background:linear-gradient(135deg,#111318 0%,#1b1e26 55%,#c8102e 160%);display:grid;place-items:center;padding:24px}.login-card{width:min(440px,100%);background:#fff;border-radius:18px;padding:34px;box-shadow:0 25px 80px #0008;text-align:center}.login-logo{width:150px;height:150px;object-fit:contain;margin:0 auto 10px;display:block}.login-kicker{font-size:9px;letter-spacing:2px;color:#c8102e;font-weight:900;margin-top:4px}.login-card h1{font-size:25px;margin:9px 0 7px;color:#111827}.login-card>p{font-size:12px;color:#64748b;line-height:1.6;margin:0 0 24px}.login-form{text-align:left;display:grid;gap:14px}.login-form label{font-size:11px;font-weight:800;color:#475569;display:grid;gap:6px}.login-form input{width:100%;padding:12px 13px;border:1px solid #dce2ea;border-radius:8px;outline:0;font-size:13px}.login-form input:focus{border-color:#c8102e;box-shadow:0 0 0 3px #c8102e18}.login-btn{width:100%;margin:0;padding:12px}.login-error{background:#fff1f2;color:#b42338;border:1px solid #fecdd3;border-radius:8px;padding:9px;font-size:11px}.login-note{display:block;color:#94a3b8;font-size:10px;margin-top:18px}.brand-logo{width:43px;height:43px;object-fit:contain;border-radius:50%;background:#fff;flex:none}.logout-btn{width:34px;height:34px;border:1px solid var(--line);background:#fff;border-radius:50%;cursor:pointer;color:#c8102e;font-weight:800}.logout-btn:hover{background:#fff1f2}@media(max-width:650px){.login-card{padding:26px 20px}.login-logo{width:125px;height:125px}}
/* CampusCore branded login page */
.login-screen{min-height:100vh;background:#f5f6f8;display:block;padding:0;color:#111827}
.login-page{min-height:100vh;display:flex;flex-direction:column}
.login-header{height:82px;background:#fff;border-bottom:1px solid #e4e7ec;padding:10px 5%;display:flex;align-items:center;justify-content:space-between;gap:20px;box-shadow:0 2px 10px #1118270a}
.login-branding{display:flex;align-items:center;gap:13px;min-width:0}.login-header-logo{width:58px;height:58px;object-fit:contain;flex:none;border-radius:12px;background:#fff}.login-institute-name{font-size:20px;font-weight:950;letter-spacing:.2px;color:#111827}.login-tagline{font-size:9px;font-weight:800;letter-spacing:1.2px;color:#c8102e;margin-top:4px}.login-header-contact{display:flex;align-items:center;gap:12px;font-size:11px;color:#667085;white-space:nowrap}.login-header-contact a{font-weight:900;color:#c8102e;text-decoration:none;background:#fff1f2;border:1px solid #fecdd3;padding:8px 12px;border-radius:7px}
.login-body{width:min(1320px,92%);margin:0 auto;padding:46px 0;display:grid;grid-template-columns:1.25fr .75fr;gap:60px;align-items:center;flex:1}.product-highlights{padding:5px 0}.welcome-badge{display:inline-block;background:#fff1f2;color:#b30d27;border:1px solid #fecdd3;padding:7px 11px;border-radius:999px;font-size:9px;font-weight:900;letter-spacing:1.4px}.product-highlights h1{font-size:44px;line-height:1.1;margin:18px 0 13px;letter-spacing:-1px;color:#111827}.product-highlights h1 strong{color:#c8102e}.product-intro{max-width:690px;color:#667085;line-height:1.75;font-size:13px;margin:0 0 25px}.highlight-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;max-width:760px}.highlight-card{display:flex;gap:12px;align-items:flex-start;background:#fff;border:1px solid #e5e7eb;border-radius:11px;padding:14px;box-shadow:0 4px 14px #11182708}.highlight-card>span{width:30px;height:30px;border-radius:8px;background:#111318;color:#fff;display:grid;place-items:center;font-size:9px;font-weight:900;flex:none}.highlight-card b{display:block;font-size:11px;margin-bottom:4px}.highlight-card small{display:block;font-size:9px;color:#7a8698;line-height:1.45}
.login-panel-wrap{display:flex;justify-content:flex-end}.login-card{width:min(420px,100%);background:#fff;border:1px solid #e2e6ec;border-radius:18px;padding:31px;box-shadow:0 18px 55px #11182714;text-align:center}.login-panel-logo{display:flex;justify-content:center;margin-bottom:5px}.login-logo{width:100px;height:100px;object-fit:contain;margin:0}.login-card h2{font-size:25px;margin:8px 0 6px;color:#111827}.login-card>p{font-size:11px;color:#64748b;line-height:1.6;margin:0 0 22px}.login-support{margin-top:17px;padding-top:15px;border-top:1px solid #edf0f4;font-size:10px;color:#7b8798;display:flex;justify-content:center;gap:6px;flex-wrap:wrap}.login-support b{color:#475569}.login-support a{color:#c8102e;font-weight:900;text-decoration:none}.login-footer{min-height:68px;background:#111318;color:#d8dce3;padding:13px 5%;display:flex;align-items:center;justify-content:space-between;gap:20px;font-size:9px}.login-footer>div{display:flex;flex-direction:column;gap:3px}.login-footer b{color:#fff;font-size:10px}.login-footer span{color:#8f98a7}.login-footer a{color:#ffced5;text-decoration:none;font-weight:800}.developer-credit{align-items:center!important}.login-header-contact a:hover,.login-footer a:hover{ text-decoration:underline }
@media(max-width:950px){.login-body{grid-template-columns:1fr;gap:30px;padding:35px 0}.login-panel-wrap{justify-content:center}.product-highlights h1{font-size:36px}.highlight-grid{max-width:none}.login-card{max-width:470px}.login-footer{flex-wrap:wrap}}
@media(max-width:650px){.login-header{height:auto;padding:12px 5%;align-items:flex-start}.login-branding{align-items:flex-start}.login-header-logo{width:46px;height:46px}.login-institute-name{font-size:12px;line-height:1.25}.login-tagline{font-size:7px}.login-header-contact{font-size:9px;flex-direction:column;gap:4px;align-items:flex-end}.login-header-contact a{padding:6px 8px}.login-body{width:90%;padding:25px 0}.product-highlights h1{font-size:29px}.product-intro{font-size:11px}.highlight-grid{grid-template-columns:1fr}.login-card{padding:25px 19px}.login-footer{font-size:8px;flex-direction:column;align-items:center;text-align:center}.developer-credit{align-items:center!important}.login-logo{width:85px;height:85px}}
.filter-row{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}.filter-row select,.filter-row input{min-width:150px}.bulk-bar{display:flex;align-items:center;gap:10px;padding:12px 0 0;border-top:1px solid #eee;margin-top:12px}.bulk-bar select{min-width:220px}.overdue-text{color:#b00020;font-weight:700}.detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:10px 0 18px}.detail-grid>div{padding:10px 12px;border:1px solid #eee;border-radius:10px;background:#fafafa}.detail-grid b{display:block;font-size:11px;text-transform:uppercase;color:#777;margin-bottom:4px}.detail-grid span{display:block}.timeline{border-left:2px solid #e6e6e6;padding-left:18px;margin:12px 0}.timeline-item{position:relative;padding:0 0 18px}.timeline-item:before{content:'';position:absolute;left:-25px;top:4px;width:10px;height:10px;border-radius:50%;background:#c8102e}.timeline-item p{margin:6px 0}.lead-metrics{grid-template-columns:repeat(6,minmax(0,1fr))}@media(max-width:1100px){.lead-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:700px){.lead-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.detail-grid{grid-template-columns:1fr}.bulk-bar{align-items:stretch;flex-direction:column}.bulk-bar select{min-width:0;width:100%}.filter-row select,.filter-row input{width:100%}}

/* VIQE Premium Select / Dropdown System */
:root{
  --select-border:#d9dee8;
  --select-border-hover:#b8c2d1;
  --select-focus:#c8102e;
  --select-shadow:0 8px 24px rgba(17,24,39,.08);
}
select,
.toolbar select,
.filter-row select,
.bulk-bar select,
.form select,
.form-control select,
.login-form select{
  -webkit-appearance:none;
  -moz-appearance:none;
  appearance:none;
  min-height:42px;
  border:1px solid var(--select-border)!important;
  border-radius:10px!important;
  padding:10px 40px 10px 13px!important;
  background-color:#fff!important;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")!important;
  background-repeat:no-repeat!important;
  background-position:right 13px center!important;
  background-size:16px!important;
  color:#243047!important;
  font-size:12px!important;
  font-weight:600!important;
  line-height:1.35!important;
  cursor:pointer!important;
  transition:border-color .18s ease,box-shadow .18s ease,background-color .18s ease,transform .18s ease;
  box-shadow:0 1px 2px rgba(15,23,42,.03);
}
select:hover,
.toolbar select:hover,
.filter-row select:hover,
.bulk-bar select:hover,
.form select:hover{
  border-color:var(--select-border-hover)!important;
  background-color:#fcfdff!important;
}
select:focus,
select:focus-visible,
.toolbar select:focus,
.filter-row select:focus,
.bulk-bar select:focus,
.form select:focus{
  outline:none!important;
  border-color:var(--select-focus)!important;
  box-shadow:0 0 0 4px rgba(200,16,46,.10),0 6px 18px rgba(15,23,42,.06)!important;
}
select:disabled{
  opacity:.58;
  cursor:not-allowed!important;
  background-color:#f4f6f8!important;
}
select option{
  background:#fff;
  color:#243047;
  padding:12px;
  font-size:12px;
}
select option:checked,
select option:hover{
  background:#fff1f3;
  color:#a90e27;
}

/* Premium field treatment used consistently throughout the CRM */
.form input,
.form textarea,
.toolbar input,
.filter-row input,
.search-input,
.form-control input,
.form-control textarea{
  min-height:42px;
  border:1px solid #d9dee8!important;
  border-radius:10px!important;
  transition:border-color .18s ease,box-shadow .18s ease;
}
.form input:focus,
.form textarea:focus,
.toolbar input:focus,
.filter-row input:focus,
.search-input:focus{
  outline:none;
  border-color:#c8102e!important;
  box-shadow:0 0 0 4px rgba(200,16,46,.08)!important;
}

/* When a select sits inside a compact filter/toolbar */
.toolbar select,
.filter-row select,
.bulk-bar select{
  min-width:170px;
}

/* Native dropdowns cannot be fully restyled by CSS across every browser;
   this keeps the closed control consistently premium while preserving native accessibility. */
@media(max-width:650px){
  select,
  .toolbar select,
  .filter-row select,
  .bulk-bar select,
  .form select{
    width:100%;
    min-height:44px;
  }
}
/* Central Admin Panel */
.admin-layout{display:grid;grid-template-columns:240px 1fr;gap:16px;align-items:start}.admin-tabs{position:sticky;top:12px;background:#fff;border:1px solid #e7e9ee;border-radius:18px;padding:8px;box-shadow:0 10px 30px rgba(20,25,35,.06)}.admin-tab{display:flex;width:100%;border:0;background:transparent;padding:12px 13px;border-radius:12px;text-align:left;font-weight:700;color:#5b6472;cursor:pointer;margin-bottom:3px}.admin-tab:hover{background:#f5f6f8;color:#c8102e}.admin-tab.active{background:linear-gradient(135deg,#c8102e,#9d0c24);color:#fff;box-shadow:0 7px 18px rgba(200,16,46,.2)}.admin-content .panel{box-shadow:0 12px 35px rgba(20,25,35,.06)}.admin-hero{background:linear-gradient(135deg,#17191f,#292d36);color:#fff;border:0}.admin-hero p{color:#cbd0d8;max-width:780px}.admin-hero small{color:#f0a2b0;font-weight:800;letter-spacing:.14em}.admin-stat-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-top:20px}.admin-stat-grid div{background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.12);padding:14px;border-radius:13px}.admin-stat-grid b,.admin-stat-grid span{display:block}.admin-stat-grid span{font-size:12px;color:#b9c0ca;margin-top:4px}.admin-cards{grid-template-columns:repeat(3,1fr);margin-top:15px}.admin-card{background:#fff;border:1px solid #e7e9ee;border-radius:16px;padding:20px;text-align:left;cursor:pointer;transition:.2s;min-height:125px}.admin-card:hover{transform:translateY(-2px);border-color:#c8102e;box-shadow:0 12px 28px rgba(20,25,35,.08)}.admin-card b,.admin-card span{display:block}.admin-card span{margin-top:8px;color:#697282;font-size:13px;line-height:1.5}.badge{display:inline-flex;align-items:center;padding:7px 10px;border-radius:999px;background:#f8e8eb;color:#b20f2d;font-size:10px;font-weight:800;letter-spacing:.08em}.form-section-title{grid-column:1/-1;margin-top:12px;padding:10px 0 3px;border-bottom:1px solid #eceef2;font-size:11px;font-weight:900;letter-spacing:.1em;color:#8a909b}.admin-form{grid-template-columns:1fr 1fr}.widget-config-list{display:grid;gap:9px}.widget-config{display:grid;grid-template-columns:25px 1fr 60px 80px;align-items:center;gap:12px;padding:13px 15px;border:1px solid #e7e9ee;border-radius:13px;background:#fff}.widget-config small,.widget-config b{display:block}.widget-config small{color:#8b929e;margin-top:3px}.drag{color:#9ba1ab;font-size:17px}.small-input{width:65px;padding:7px;border:1px solid #dfe2e8;border-radius:8px}.switch{position:relative;width:40px;height:22px}.switch input{opacity:0;width:0;height:0}.switch span{position:absolute;inset:0;background:#cbd0d8;border-radius:999px;cursor:pointer}.switch span:before{content:"";position:absolute;width:16px;height:16px;left:3px;top:3px;background:#fff;border-radius:50%;transition:.2s}.switch input:checked+span{background:#c8102e}.switch input:checked+span:before{transform:translateX(18px)}.field-filter{margin:12px 0}.field-filter select{min-width:220px}.admin-two{grid-template-columns:1fr 1fr}.role-list{display:grid;gap:9px}.role-item{padding:12px;border:1px solid #e7e9ee;border-radius:12px}.role-item b,.role-item small{display:block}.role-item small{margin-top:5px;color:#7c8491;word-break:break-word}.overdue-text{color:#b20f2d;font-weight:700}@media(max-width:900px){.admin-layout{grid-template-columns:1fr}.admin-tabs{position:static;display:flex;overflow:auto}.admin-tab{white-space:nowrap;width:auto}.admin-cards,.admin-two{grid-template-columns:1fr}.admin-stat-grid{grid-template-columns:1fr 1fr}}@media(max-width:600px){.admin-form{grid-template-columns:1fr}.admin-stat-grid{grid-template-columns:1fr}.widget-config{grid-template-columns:20px 1fr 45px 55px}}

/* Professional document centre / A4 ID card controls */
.idcards-page .eyebrow{color:#c8102e;font-weight:800;letter-spacing:.12em}.idcard-kpis{display:flex;gap:10px}.idcard-kpis span{min-width:125px;padding:12px 14px;border:1px solid #e8e8e8;border-radius:14px;background:#fff;box-shadow:0 8px 24px rgba(0,0,0,.05)}.idcard-kpis b{display:block;font-size:24px}.idcard-kpis small{color:#667085}.idcard-tabs{display:flex;gap:6px;margin:15px 0;border-bottom:1px solid #e7e7e7}.idtab{border:0;background:transparent;padding:11px 16px;font-weight:700;color:#667085;border-bottom:2px solid transparent;cursor:pointer}.idtab.active{color:#c8102e;border-bottom-color:#c8102e}.idcard-toolbar{display:flex;justify-content:space-between;gap:15px;align-items:end;margin-bottom:12px;flex-wrap:wrap}.idcard-filters{display:flex;gap:10px;flex-wrap:wrap}.idcard-filters>div{min-width:180px}.idcard-filters label{display:block;font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.05em;margin-bottom:5px;color:#667085}.idcard-filters input,.idcard-filters select{min-height:42px}.idcard-actions{display:flex;gap:7px;flex-wrap:wrap}.idcard-print-note{border-left:4px solid #c8102e;margin-bottom:14px}.status-pill{display:inline-flex;padding:5px 9px;border-radius:999px;font-size:11px;font-weight:800}.status-pill.ok{background:#e9f8ef;color:#18794e}.status-pill.warn{background:#fff4df;color:#9a6700}@media(max-width:800px){.idcard-kpis{width:100%}.idcard-kpis span{flex:1}.idcard-toolbar{align-items:stretch}.idcard-filters>div{min-width:100%}.idcard-actions{width:100%}.idcard-actions .btn{flex:1}}
/* VIQE reference-style mega navigation and dashboard */
:root{--ref-blue:#0b63ce;--ref-navy:#17243a;--ref-red:#c8102e;--ref-line:#d9e0e8}
.app{display:block;min-height:100vh;background:#f3f5f8}.top-shell{min-height:100vh}.top-header{height:62px;background:linear-gradient(90deg,#101820,#17202b);color:#fff;border-bottom:3px solid var(--ref-red);display:flex;align-items:center;justify-content:space-between;padding:0 22px;position:sticky;top:0;z-index:30;box-shadow:0 2px 8px #0003}.top-brand{display:flex;align-items:center;gap:10px;min-width:360px}.top-brand img{width:42px;height:42px;object-fit:contain;background:#fff;border-radius:6px;padding:2px}.top-brand b{display:block;font-size:14px;letter-spacing:.2px}.top-brand small{display:block;font-size:9px;letter-spacing:2px;color:#d9e1e8;margin-top:2px}.top-header .head-right{gap:9px}.top-header .head-right input{width:310px;height:36px;background:#202c38;border:1px solid #3b4958;color:#fff;border-radius:8px}.top-header .head-right input::placeholder{color:#aeb8c4}.head-icon{width:35px;height:35px;border:0;border-radius:8px;background:#202c38;color:#fff;cursor:pointer}.top-header .avatar{background:#fff;color:#17243a;border:2px solid #e8edf3}.user-mini{line-height:1.1;min-width:75px}.user-mini b{font-size:11px}.user-mini small{display:block;color:#aeb8c4;font-size:8px;margin-top:3px}.module-board{background:#fff;border-bottom:1px solid #cfd7e1;box-shadow:0 2px 5px #0000000b;position:relative;z-index:20}.module-row{display:flex;border-bottom:1px solid var(--ref-line);min-height:76px}.module-row:last-child{border-bottom:0}.module-rail{width:38px;flex:0 0 38px;background:#1b2635;color:#fff;writing-mode:vertical-rl;transform:rotate(180deg);display:flex;align-items:center;justify-content:center;font-size:9px;font-weight:800;letter-spacing:1.2px}.module-items{display:grid;grid-template-columns:repeat(14,minmax(70px,1fr));flex:1;min-width:0}.module{border:0;border-right:1px solid #f0f2f5;background:#fff;color:#162238;min-height:75px;padding:7px 5px 6px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;cursor:pointer;transition:.15s}.module:hover{background:#f5f9ff;color:var(--ref-blue)}.module.active{background:#fff1f3;color:var(--ref-red);box-shadow:inset 0 -3px 0 var(--ref-red)}.module .mi{font-size:21px;line-height:1;height:24px}.module b{font-size:9px;font-weight:600;text-align:center;line-height:1.15;white-space:normal}.module em{display:none}.content{max-width:1700px;padding:18px 20px 20px}.page-head{margin-bottom:16px}.page-head h1{font-size:22px;margin:3px 0}.page-head p{font-size:12px}.metrics{grid-template-columns:repeat(4,1fr)}.card,.panel{border-radius:8px;box-shadow:0 1px 4px #17243a12;border-color:#dfe5ec}.metric{min-height:105px;position:relative}.metric .num{font-size:24px}.metric:before{content:'';position:absolute;left:0;top:0;bottom:0;width:4px;background:var(--ref-blue);border-radius:8px 0 0 8px}.crm-footer{background:#141a20;color:#d7dee7;display:flex;justify-content:space-between;gap:20px;padding:13px 30px;font-size:10px;align-items:center}.crm-footer b{font-size:14px;color:#fff}.crm-footer a{color:#fff}.dashboard-grid{display:grid;grid-template-columns:1.2fr 1fr 1.25fr;gap:12px}.dashboard-grid .panel{min-height:220px}.dash-section-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}.dash-section-title h2{font-size:13px;margin:0}.dash-section-title a{font-size:10px;color:var(--ref-blue);cursor:pointer}.bar-row{display:grid;grid-template-columns:90px 1fr 42px;gap:9px;align-items:center;margin:13px 0;font-size:10px}.bar{height:7px;background:#e9edf2;border-radius:8px;overflow:hidden}.bar i{display:block;height:100%;background:#2680eb;border-radius:8px}.bar-row:nth-child(3) .bar i{background:#ff6b00}.bar-row:nth-child(4) .bar i{background:#11b8ca}.staff-row{margin:10px 0}.staff-row .line{display:flex;justify-content:space-between;font-size:10px}.staff-row .bar i{background:#2680eb}.staff-row.orange .bar i{background:#ff6b00}.staff-row.cyan .bar i{background:#10b9cf}.staff-row.purple .bar i{background:#7c3aed}.recent-table{width:100%;border-collapse:collapse;font-size:9px}.recent-table th{background:#f4f7fb;color:#536175;text-align:left;padding:7px}.recent-table td{padding:7px;border-bottom:1px solid #edf0f4}.status-pill{display:inline-block;padding:3px 7px;border-radius:8px;font-size:8px;background:#e9f2ff;color:#1d5fbf}.status-pill.follow{background:#fff1cc;color:#8a5a00}.status-pill.convert{background:#ddf7e7;color:#16804b}.lower-dashboard{display:grid;grid-template-columns:1fr 1fr 1.15fr 1fr;gap:12px;margin-top:12px}.mini-list{font-size:10px}.mini-list>div{display:flex;justify-content:space-between;padding:9px 0;border-bottom:1px solid #eef1f5}.mini-list>div:last-child{border-bottom:0}.branch-cards{display:grid;grid-template-columns:1fr 1fr;gap:8px}.branch-card{padding:13px;border:1px solid #e6ebf1;border-radius:8px;text-align:center}.branch-card strong{display:block;font-size:20px}.comm-tabs{display:grid;grid-template-columns:repeat(4,1fr);gap:6px}.comm-tab{padding:8px;border:1px solid #dfe5ec;border-radius:6px;text-align:center;font-size:9px}.comm-tab strong{display:block;font-size:13px;margin-top:4px}.login-status table{width:100%;border-collapse:collapse;font-size:9px}.login-status th,.login-status td{padding:7px;border-bottom:1px solid #edf0f4;text-align:left}.login-status th{text-align:center}.login-status td:not(:first-child){text-align:center;color:#1769d2;font-weight:700}
@media(max-width:1200px){.module-items{grid-template-columns:repeat(7,minmax(75px,1fr));overflow:auto}.module-row{min-height:150px}.module{min-height:74px}.dashboard-grid,.lower-dashboard{grid-template-columns:1fr 1fr}.top-header .head-right input{width:220px}}
@media(max-width:800px){.top-header{height:auto;min-height:62px;flex-wrap:wrap;padding:8px 12px}.top-brand{min-width:0}.top-brand b{font-size:11px}.top-brand small{font-size:7px}.user-mini{display:none}.module-items{grid-template-columns:repeat(4,minmax(78px,1fr));max-height:150px;overflow:auto}.module-row{min-height:150px}.content{padding:12px}.metrics,.dashboard-grid,.lower-dashboard{grid-template-columns:1fr}.crm-footer{flex-direction:column;text-align:center}.page-head{align-items:flex-start;flex-direction:column}}

/* Final reference-menu refinement: compact, clean rows like the supplied SIS/ERP reference. */
.reference-board{background:#fff;border-top:1px solid #d9e0e8}
.reference-board .module-row{min-height:100px;height:100px;align-items:stretch}
.reference-board .module-rail{width:42px;flex:0 0 42px;background:#34475a;color:#fff;font-size:10px;letter-spacing:3px}
.reference-board .module-items{display:flex;align-items:stretch;overflow:hidden;min-width:0}
.reference-board .module{width:98px;min-width:98px;height:100%;min-height:0;padding:9px 5px 7px;border-right:1px solid transparent;gap:6px;color:#223247}
.reference-board .module:hover{background:#f5f8fc;color:#0b63ce}
.reference-board .module.active{background:#f7f9fc;color:#c8102e;box-shadow:inset 0 -3px 0 #c8102e}
.reference-board .module .mi{font-size:29px;line-height:34px;height:34px}
.reference-board .module b{font-size:11px;font-weight:500;line-height:1.15;max-width:92px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
@media(max-width:1100px){.reference-board .module{width:88px;min-width:88px}.reference-board .module b{font-size:10px}.reference-board .module .mi{font-size:26px}}
@media(max-width:760px){.reference-board .module-row{height:92px;min-height:92px}.reference-board .module{width:82px;min-width:82px}.reference-board .module .mi{font-size:24px}.reference-board .module b{font-size:9px}.reference-board .module-items{overflow-x:auto}.reference-board .module-rail{width:38px;flex-basis:38px}}

/* Quick Actions mega menu: reference modules stay hidden until Quick Actions is opened. */
.reference-board[hidden]{display:none!important}
.quick-actions-panel{width:min(1280px,96vw);max-height:88vh;overflow:auto;background:#fff;border-radius:14px;padding:0;box-shadow:0 20px 70px #0004}
.quick-actions-head{position:sticky;top:0;z-index:2;background:#fff;border-bottom:1px solid var(--line);padding:18px 22px;display:flex;align-items:center;justify-content:space-between;gap:15px}
.quick-actions-head h2{margin:0;font-size:18px}
.quick-actions-head p{margin:4px 0 0;color:var(--muted);font-size:11px}
.quick-actions-grid{padding:14px}
.quick-actions-grid .reference-board{display:block!important}
.quick-actions-create{border-top:1px solid var(--line);padding:14px 18px;background:#fafbfc}
.quick-actions-create h3{margin:0 0 10px;font-size:12px}
.quick-actions-create .qa-create-grid{display:grid;grid-template-columns:repeat(6,minmax(120px,1fr));gap:8px}
.quick-actions-create .btn{margin:0}
@media(max-width:900px){.quick-actions-create .qa-create-grid{grid-template-columns:repeat(3,1fr)}}
@media(max-width:560px){.quick-actions-create .qa-create-grid{grid-template-columns:repeat(2,1fr)}.quick-actions-head{padding:14px}.quick-actions-grid{padding:8px}}

/* Functional Quick Actions / module workspaces */
.quick-actions-grid{max-height:72vh;overflow:auto;padding:4px}.qa-finance{margin-top:12px;border-top:1px solid #e5e7eb;padding-top:10px}.finance-items{display:grid;grid-template-columns:repeat(auto-fill,minmax(135px,1fr));gap:8px;padding:10px}.qa-module-action{border:1px solid #e5e7eb;background:#fff;border-radius:12px;min-height:78px;padding:10px 7px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;cursor:pointer;color:#172033}.qa-module-action:hover{border-color:#d71920;box-shadow:0 5px 15px rgba(0,0,0,.08);transform:translateY(-1px)}.qa-module-action .mi{font-size:23px}.module-workspace .kpi{font-size:18px}.module-workspace .filter-row{display:flex;gap:10px;flex-wrap:wrap}.module-workspace .filter-row input,.module-workspace .filter-row select{min-width:220px}
@media(max-width:700px){.finance-items{grid-template-columns:repeat(2,minmax(120px,1fr))}.module-workspace .filter-row input,.module-workspace .filter-row select{min-width:100%;width:100%}}

/* VIQE reference CRM header/dashboard - modeled on the supplied SIS/ERP screenshot. */
.reference-top-header{height:46px!important;min-height:46px!important;background:#fff!important;color:#172033!important;border-bottom:2px solid #e7a600!important;box-shadow:0 1px 5px #00000012!important;padding:0 8px!important;position:sticky!important;top:0!important;z-index:60!important;display:flex!important;gap:10px!important}
.reference-brand{display:flex;align-items:center;gap:7px;min-width:330px;height:100%}
.reference-brand img{width:38px;height:38px;object-fit:contain}.reference-brand b{font-size:11px;color:#ef3b23;letter-spacing:.2px;display:block}.reference-brand small{font-size:7px;color:#344054;letter-spacing:1.3px;display:block;margin-top:1px}
.reference-main-nav{display:flex;align-items:center;gap:1px;height:100%;flex:1;overflow:visible}.ref-dropdown{position:relative;height:100%;display:flex;align-items:center}.ref-menu-btn{height:100%;border:0;background:transparent;color:#24334a;font-size:10px;padding:0 7px;cursor:pointer;white-space:nowrap}.ref-menu-btn:hover,.ref-dropdown:hover>.ref-menu-btn{color:#d71920;background:#fafafa}.ref-menu-btn span{font-size:8px;color:#667085;margin-left:2px}
.ref-dropdown-menu{position:absolute;top:44px;left:0;min-width:175px;background:#fff;border:1px solid #dfe5ec;border-top:2px solid #e6a600;box-shadow:0 8px 22px #0002;border-radius:0 0 6px 6px;padding:5px;display:none;z-index:80}.ref-dropdown:hover .ref-dropdown-menu{display:block}.ref-dropdown-menu .top-action{display:block;width:100%;border:0;background:#fff;text-align:left;padding:7px 9px;font-size:10px;color:#26364c;border-radius:4px;cursor:pointer}.ref-dropdown-menu .top-action:hover{background:#f3f7fb;color:#c8102e}
.reference-head-actions{display:flex;align-items:center;gap:5px;white-space:nowrap}.reference-head-actions input{width:180px!important;height:27px!important;border:1px solid #d7dee8!important;background:#fff!important;color:#172033!important;border-radius:4px!important;font-size:9px!important}.reference-head-actions input::placeholder{color:#98a2b3}.reference-head-actions .head-icon{width:27px;height:27px;background:#fff;color:#475467;border:1px solid #d7dee8;border-radius:4px}.reference-quick-btn{height:27px;border:1px solid #d71920;background:#d71920;color:#fff;border-radius:4px;padding:0 9px;font-size:9px;cursor:pointer}.reference-quick-btn:hover{background:#b6151c}.reference-head-actions .avatar{width:27px;height:27px;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;font-size:9px;font-weight:700}.reference-head-actions .logout-btn{height:27px;width:27px;border:1px solid #d7dee8;background:#fff;border-radius:4px}
.reference-sub-nav{height:31px;background:#fff;border-bottom:1px solid #d8dee7;display:flex;align-items:stretch;padding-left:8px;overflow-x:auto;position:sticky;top:46px;z-index:55}.sub-action{border:0;border-right:1px solid #edf0f4;background:#fff;color:#2e3b50;font-size:9px;padding:0 10px;white-space:nowrap;cursor:pointer}.sub-action:hover,.sub-action.active{background:#f7f9fc;color:#c8102e;border-bottom:2px solid #c8102e}
.reference-top-header+.reference-sub-nav + .content{padding-top:10px}.content{max-width:none!important;padding-left:8px!important;padding-right:8px!important;background:#f1f3f6!important}.page-head{margin:0 0 8px!important;padding:0 2px}.page-head h1{font-size:17px!important;margin:2px 0!important;color:#26364c}.page-head p{font-size:9px!important;color:#98a2b3}.page-head small{font-size:8px!important;color:#667085}
.metrics{gap:8px!important}.metric{min-height:76px!important;background:#fff;border:1px solid #e1e6ed!important;border-radius:7px!important;box-shadow:0 1px 3px #0000000b!important;padding:12px!important}.metric .num{font-size:21px!important}.metric label{font-size:8px!important;color:#475467}.metric small{font-size:8px!important;color:#98a2b3}.dashboard-grid,.lower-dashboard{gap:8px!important}.dashboard-grid .panel,.lower-dashboard .panel{background:#fff;border:1px solid #e1e6ed!important;border-radius:7px!important;box-shadow:0 1px 3px #0000000b!important}.dash-section-title{margin-bottom:7px!important}.dash-section-title h2{font-size:10px!important}.dash-section-title a{font-size:8px!important}.bar-row{font-size:8px!important;margin:9px 0!important}.staff-row{margin:8px 0!important}.staff-row .line{font-size:8px!important}.recent-table{font-size:8px!important}.recent-table th,.recent-table td{padding:5px!important}.mini-list{font-size:8px!important}.mini-list>div{padding:7px 0!important}.branch-card{padding:9px!important}.branch-card strong{font-size:17px!important}.comm-tab{font-size:8px!important}.login-status table{font-size:8px!important}
.quick-actions-panel{width:min(1200px,96vw)!important}.qa-section-title{font-size:10px;font-weight:800;color:#344054;padding:8px 10px 4px}.quick-actions-grid{max-height:70vh!important}.finance-items{padding:8px!important}.qa-module-action{min-height:70px!important}
@media(max-width:1200px){.reference-brand{min-width:245px}.reference-main-nav{overflow-x:auto}.reference-head-actions input{width:140px!important}.ref-menu-btn{padding:0 5px;font-size:9px}}
@media(max-width:850px){.reference-top-header{height:auto!important;min-height:46px!important;flex-wrap:wrap;padding:5px 7px!important}.reference-brand{min-width:210px}.reference-main-nav{order:3;width:100%;height:32px}.reference-sub-nav{top:76px}.reference-head-actions{margin-left:auto}.reference-head-actions input{width:130px!important}.reference-sub-nav{position:relative;top:auto}.reference-top-header+.reference-sub-nav + .content{padding-top:8px}.metrics,.dashboard-grid,.lower-dashboard{grid-template-columns:1fr 1fr!important}}
@media(max-width:600px){.reference-brand{min-width:170px}.reference-brand b{font-size:8px}.reference-brand small{font-size:6px}.reference-head-actions input,.reference-head-actions .user-mini{display:none}.reference-quick-btn{font-size:8px;padding:0 7px}.reference-sub-nav{overflow-x:auto}.metrics,.dashboard-grid,.lower-dashboard{grid-template-columns:1fr!important}}
.board-tabs{display:flex;gap:5px;margin:5px 0 8px}.board-pill{padding:3px 8px;border:1px solid #d9e1ea;border-radius:10px;font-size:8px;color:#475467;background:#fff}.board-pill.active{background:#2878e8;color:#fff;border-color:#2878e8}

/* VIQE comprehensive dashboard overview */
.dashboard-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin-bottom:10px}.dash-kpi{border:1px solid #dfe5ec;background:#fff;border-radius:8px;min-height:88px;padding:12px;display:flex;align-items:center;gap:10px;text-align:left;cursor:pointer;box-shadow:0 1px 3px #0000000b;transition:.15s}.dash-kpi:hover{transform:translateY(-1px);box-shadow:0 3px 10px #00000012}.dash-kpi .kpi-icon{width:42px;height:42px;border-radius:10px;display:grid;place-items:center;font-size:20px;background:#eef5ff}.dash-kpi label{display:block;font-size:8px;color:#667085;font-weight:700;letter-spacing:.35px}.dash-kpi strong{display:block;font-size:21px;color:#162238;line-height:1.15;margin:3px 0}.dash-kpi small{display:block;font-size:8px;color:#98a2b3}.dash-kpi.orange .kpi-icon{background:#fff2e8}.dash-kpi.purple .kpi-icon{background:#f3edff}.dash-kpi.green .kpi-icon{background:#e9f9f0}.dash-kpi.cyan .kpi-icon{background:#e8faff}.dash-kpi.red .kpi-icon{background:#fff0f0}.dash-kpi.teal .kpi-icon{background:#e8fbf7}.dash-kpi.slate .kpi-icon{background:#eef2f6}.dashboard-alerts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-bottom:10px}.dash-alert{border:1px solid #e2e7ee;background:#fff;border-radius:7px;padding:9px 11px;text-align:left;cursor:pointer;display:flex;flex-direction:column;gap:3px}.dash-alert b{font-size:9px}.dash-alert span{font-size:8px;color:#667085}.dash-alert.red{border-left:4px solid #d92d20}.dash-alert.orange{border-left:4px solid #f79009}.dash-alert.blue{border-left:4px solid #2680eb}.dash-alert.purple{border-left:4px solid #7c3aed}.overview-main{grid-template-columns:1.05fr 1fr 1.25fr}.overview-secondary{grid-template-columns:1.15fr 1.15fr 1fr;margin-top:8px}.overview-bottom{margin-top:8px}.pipeline-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin:5px 0 12px}.pipeline-grid>div{border:1px solid #e8edf3;border-radius:6px;padding:8px;text-align:center}.pipeline-grid b{display:block;font-size:16px;color:#162238}.pipeline-grid span{display:block;font-size:8px;color:#667085;margin-top:2px}.conversion-line{display:flex;justify-content:space-between;font-size:9px;color:#667085;margin-bottom:5px}.conversion-line strong{color:#1769d2}.mini-stat-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin-bottom:8px}.mini-stat-grid>div{background:#f7f9fc;border:1px solid #e7ebf0;border-radius:6px;padding:8px;text-align:center}.mini-stat-grid b{display:block;font-size:15px}.mini-stat-grid span{font-size:7px;color:#667085}.finance-snapshot{display:grid;grid-template-columns:repeat(2,1fr);gap:6px;margin-bottom:8px}.finance-snapshot>div{padding:8px;border-radius:6px;background:#f7f9fc;border:1px solid #e7ebf0}.finance-snapshot span{display:block;font-size:8px;color:#667085}.finance-snapshot b{display:block;font-size:13px;margin-top:3px}.danger-text{color:#d92d20!important}.overview-main .panel,.overview-secondary .panel,.overview-bottom .panel{min-height:0}.overview-bottom .comm-tabs{grid-template-columns:repeat(4,1fr)}
@media(max-width:1200px){.dashboard-kpis{grid-template-columns:repeat(4,1fr)}.dashboard-alerts{grid-template-columns:repeat(2,1fr)}.overview-main,.overview-secondary{grid-template-columns:1fr 1fr}.overview-main .panel:last-child{grid-column:1/-1}.overview-secondary .panel:last-child{grid-column:1/-1}.overview-bottom{grid-template-columns:1fr 1fr}}
@media(max-width:800px){.dashboard-kpis{grid-template-columns:1fr 1fr}.dashboard-alerts,.overview-main,.overview-secondary,.overview-bottom{grid-template-columns:1fr}.overview-main .panel:last-child,.overview-secondary .panel:last-child{grid-column:auto}.pipeline-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:520px){.dashboard-kpis{grid-template-columns:1fr}.dashboard-alerts{grid-template-columns:1fr}.mini-stat-grid{grid-template-columns:1fr 1fr}}

/* Quick Actions: full-width modal prevents grid overlap and gives every module a stable icon tile. */
.modal.quick-modal{width:min(1320px,96vw)!important;max-width:1320px!important;height:min(92vh,900px);max-height:92vh!important;padding:0!important;overflow:hidden!important;border-radius:14px!important}
.modal.quick-modal #modal-body{height:100%;min-height:0;overflow:hidden}
.modal.quick-modal .quick-actions-panel{width:100%!important;max-width:none!important;height:100%;max-height:none!important;overflow:hidden!important;border-radius:14px}
.modal.quick-modal .quick-actions-head{min-height:68px;padding:14px 20px}
.modal.quick-modal .quick-actions-grid{height:calc(100% - 176px);max-height:none!important;overflow-y:auto;overflow-x:hidden;padding:10px 14px 14px}
.modal.quick-modal .finance-items{display:grid;grid-template-columns:repeat(auto-fill,minmax(145px,1fr));gap:10px;padding:10px 4px 14px!important}
.modal.quick-modal .qa-module-action{width:100%;min-width:0;min-height:86px;height:86px;padding:9px 8px;gap:6px;border:1px solid #e2e7ee;border-radius:10px;box-shadow:0 1px 2px #00000008;transform:none!important;overflow:hidden}
.modal.quick-modal .qa-module-action:hover{border-color:#d71920;background:#fff8f8;box-shadow:0 4px 12px #00000012}
.modal.quick-modal .qa-module-action .mi{display:grid;place-items:center;width:34px;height:34px;font-size:25px;line-height:1;flex:0 0 34px}
.modal.quick-modal .qa-module-action b{display:block;width:100%;font-size:10px;line-height:1.2;font-weight:700;text-align:center;white-space:normal;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.modal.quick-modal .qa-section-title{padding:8px 4px 3px;font-size:10px;letter-spacing:.4px;border-bottom:1px solid #edf0f4;margin-bottom:2px}
.modal.quick-modal .finance-title{margin-top:4px;color:#b42318}
.modal.quick-modal .quick-actions-create{min-height:108px;padding:10px 16px;background:#f8fafc}
.modal.quick-modal .quick-actions-create h3{margin:0 0 7px;font-size:11px}
.modal.quick-modal .qa-create-grid{grid-template-columns:repeat(6,minmax(120px,1fr));gap:7px}
.modal.quick-modal .qa-create-grid .btn{margin:0;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media(max-width:1000px){.modal.quick-modal .qa-create-grid{grid-template-columns:repeat(3,1fr)}.modal.quick-modal .finance-items{grid-template-columns:repeat(auto-fill,minmax(125px,1fr))}}
@media(max-width:600px){.modal.quick-modal{width:98vw!important;height:94vh}.modal.quick-modal .quick-actions-head{padding:12px 14px}.modal.quick-modal .quick-actions-grid{height:calc(100% - 215px)}.modal.quick-modal .finance-items{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.modal.quick-modal .qa-module-action{height:78px;min-height:78px}.modal.quick-modal .qa-create-grid{grid-template-columns:repeat(2,1fr)}}

/* VIQE header fit fix: keep logout and all header controls inside the dashboard frame */
.reference-top-header{width:100%;max-width:100%;box-sizing:border-box;overflow:hidden!important;display:grid!important;grid-template-columns:minmax(190px,245px) minmax(0,1fr) auto!important;align-items:center!important;gap:8px!important}
.reference-brand{min-width:0!important;width:auto!important;flex:0 1 auto!important;overflow:hidden}
.reference-brand>div{min-width:0;overflow:hidden}
.reference-brand b,.reference-brand small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.reference-main-nav{min-width:0!important;max-width:100%;overflow-x:auto!important;overflow-y:hidden!important;scrollbar-width:none;display:flex!important;align-items:center}
.reference-main-nav::-webkit-scrollbar{display:none}
.reference-head-actions{min-width:0!important;max-width:100%;flex:0 0 auto!important;overflow:hidden!important;display:flex!important;align-items:center!important}
.reference-head-actions input{flex:0 1 180px!important;min-width:60px!important;max-width:180px!important}
.reference-head-actions .user-mini{min-width:58px!important;max-width:70px!important;overflow:hidden}
.reference-head-actions .logout-btn{position:static!important;flex:0 0 27px!important;width:27px!important;min-width:27px!important;height:27px!important;margin:0!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;box-sizing:border-box!important}

@media(max-width:1350px){
  .reference-top-header{grid-template-columns:minmax(180px,220px) minmax(0,1fr) auto!important}
  .reference-head-actions input{max-width:125px!important}
  .reference-brand b{font-size:8px!important}
}
@media(max-width:1150px){
  .reference-top-header{grid-template-columns:minmax(165px,195px) minmax(0,1fr) auto!important;gap:5px!important}
  .reference-head-actions input{display:none!important}
  .reference-head-actions .user-mini{display:none!important}
  .reference-brand b{font-size:8px!important}
  .reference-quick-btn{padding:0 7px!important}
}
@media(max-width:850px){
  .reference-top-header{display:flex!important;flex-wrap:wrap!important;overflow:visible!important;height:auto!important;min-height:46px!important}
  .reference-brand{flex:1 1 auto!important;min-width:170px!important;max-width:50%!important}
  .reference-main-nav{order:3!important;width:100%!important;flex:0 0 100%!important}
  .reference-head-actions{margin-left:auto!important;flex:0 0 auto!important}
  .reference-head-actions .logout-btn{display:inline-flex!important}
}

/* VIQE dashboard space optimization */
.content{width:100%!important;max-width:none!important;margin:0!important;padding:8px 10px 10px!important}
.page-head{margin:0 0 6px!important}
.dashboard-kpis{margin-bottom:7px!important;gap:7px!important}
.dashboard-alerts{margin-bottom:7px!important;gap:7px!important}
.overview-main,.overview-secondary,.overview-bottom{align-items:start!important}
.overview-main .panel,.overview-secondary .panel,.overview-bottom .panel{align-self:start!important;height:auto!important;min-height:0!important}
.overview-secondary{margin-top:7px!important}
.overview-bottom{margin-top:7px!important}
.dashboard-grid .panel{min-height:0!important}
.pipeline-grid{margin-bottom:8px!important}
.finance-snapshot{margin-bottom:5px!important}
.branch-cards{min-height:0!important;align-content:start!important}
.branch-cards .empty{padding:16px 8px!important}
.lower-dashboard .panel{min-height:0!important}
.crm-footer{padding:8px 18px!important;min-height:32px!important;font-size:9px!important}
@media(min-width:1201px){.overview-main{grid-template-columns:1.05fr 1fr 1.25fr!important}.overview-secondary{grid-template-columns:1.15fr 1.15fr 1fr!important}.overview-bottom{grid-template-columns:1fr 1fr 1.15fr 1fr!important}}

/* Final dashboard containment fix: keep every dashboard card and its data inside its own frame. */
.dashboard-grid,
.lower-dashboard,
.dashboard-kpis,
.dashboard-alerts{min-width:0;width:100%;}
.dashboard-grid > .panel,
.lower-dashboard > .panel,
.overview-main > .panel,
.overview-secondary > .panel,
.overview-bottom > .panel{min-width:0!important;width:100%;max-width:100%;overflow:hidden!important;box-sizing:border-box;}
.recent-table{min-width:0!important;width:100%!important;max-width:100%;table-layout:fixed;word-break:break-word;overflow-wrap:anywhere;}
.recent-table th,.recent-table td{max-width:0;overflow:hidden;word-break:break-word;overflow-wrap:anywhere;}
.finance-snapshot{width:100%;min-width:0;grid-template-columns:repeat(2,minmax(0,1fr))!important;}
.finance-snapshot>div{min-width:0;overflow:hidden;box-sizing:border-box;}
.finance-snapshot b{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;}
.branch-cards{width:100%;min-width:0;grid-template-columns:repeat(2,minmax(0,1fr))!important;}
.branch-card{min-width:0;max-width:100%;overflow:hidden;box-sizing:border-box;}
.branch-card strong,.branch-card small{max-width:100%;overflow-wrap:anywhere;word-break:break-word;}
.branch-card small{display:block;line-height:1.25;}
.mini-stat-grid{min-width:0;grid-template-columns:repeat(4,minmax(0,1fr))!important;}
.mini-stat-grid>div{min-width:0;overflow:hidden;}
.pipeline-grid{min-width:0;grid-template-columns:repeat(3,minmax(0,1fr))!important;}
.pipeline-grid>div{min-width:0;overflow:hidden;}
.comm-tabs{min-width:0;grid-template-columns:repeat(4,minmax(0,1fr))!important;}
.comm-tab{min-width:0;overflow:hidden;}
.login-status{min-width:0!important;overflow:hidden!important;}
.login-status table{min-width:0!important;table-layout:fixed;}
@media(max-width:800px){
  .finance-snapshot{grid-template-columns:1fr 1fr!important;}
  .branch-cards{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  .mini-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
}
@media(max-width:520px){
  .finance-snapshot,.branch-cards{grid-template-columns:1fr!important;}
  .pipeline-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  .comm-tabs{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
}

/* VIQE FINAL DASHBOARD VISUAL POLISH - compact, balanced and content-sized */
#app-view{min-width:0;width:100%;}
#app-view > *{min-width:0;}
.dashboard-kpis{align-items:stretch!important;grid-auto-rows:minmax(0,auto)!important;}
.dash-kpi{min-width:0!important;width:100%!important;height:100%!important;min-height:82px!important;padding:11px 12px!important;border-radius:10px!important;box-shadow:0 1px 3px rgba(16,24,40,.07)!important;}
.dash-kpi>div{min-width:0;overflow:hidden;}
.dash-kpi strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.dashboard-alerts{align-items:stretch!important;grid-auto-rows:max-content!important;}
.dash-alert{min-width:0!important;width:100%!important;min-height:58px!important;justify-content:center!important;}
.dashboard-grid,.lower-dashboard{align-items:start!important;grid-auto-rows:max-content!important;}
.overview-main,.overview-secondary,.overview-bottom{align-items:start!important;}
.overview-main>.panel,.overview-secondary>.panel,.overview-bottom>.panel{height:auto!important;align-self:start!important;display:flex!important;flex-direction:column!important;min-height:0!important;}
.panel{min-width:0!important;}
.dash-section-title{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;min-height:22px!important;}
.dash-section-title h2{margin:0!important;line-height:1.25!important;}
.dash-section-title a{flex:0 0 auto;white-space:nowrap;}
.pipeline-grid{align-items:stretch!important;}
.pipeline-grid>div{min-height:52px!important;display:flex;flex-direction:column;justify-content:center;}
.conversion-line{margin-top:1px!important;}
.mini-stat-grid{align-items:stretch!important;}
.mini-stat-grid>div{min-height:52px!important;display:flex;flex-direction:column;justify-content:center;}
.finance-snapshot{align-items:stretch!important;}
.finance-snapshot>div{min-height:54px!important;display:flex;flex-direction:column;justify-content:center;}
.branch-cards{display:grid!important;gap:7px!important;align-items:stretch!important;}
.branch-card{min-height:72px!important;display:grid!important;grid-template-columns:34px minmax(0,1fr)!important;grid-template-rows:auto auto!important;column-gap:8px!important;align-content:center!important;padding:9px!important;}
.branch-card>span{grid-row:1/3;display:grid;place-items:center;width:34px;height:34px;border-radius:9px;background:#f2f5f9;font-size:17px;align-self:center;}
.branch-card strong{font-size:17px!important;line-height:1.05!important;}
.branch-card small{font-size:8px!important;color:#667085!important;line-height:1.25!important;}
.recent-table{margin-top:1px!important;}
.recent-table tbody tr:last-child td{border-bottom:0!important;}
.mini-list{display:grid!important;gap:0!important;}
.mini-list>div{min-height:38px!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;border-bottom:1px solid #eef1f5!important;padding:6px 0!important;}
.mini-list>div:last-child{border-bottom:0!important;}
.comm-tabs{align-items:stretch!important;}
.comm-tab{min-height:68px!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:5px!important;border:1px solid #e7ebf0!important;border-radius:8px!important;background:#fafbfc!important;}
.comm-tab strong{font-size:13px!important;}
.login-status table{margin-top:2px!important;}
.login-status th,.login-status td{padding:6px 7px!important;}
.login-status tbody tr:last-child td{border-bottom:0!important;}
/* Prevent any panel content from creating a wider grid or hidden horizontal scroll. */
.dashboard-kpis,.dashboard-alerts,.overview-main,.overview-secondary,.overview-bottom{overflow:visible!important;}
.overview-main>.panel>*,.overview-secondary>.panel>*,.overview-bottom>.panel>*{max-width:100%;}
.table-wrap{width:100%;max-width:100%;overflow-x:auto!important;overflow-y:hidden!important;}
/* Balanced desktop proportions */
@media(min-width:1201px){
  .dashboard-kpis{grid-template-columns:repeat(4,minmax(0,1fr))!important;}
  .dashboard-alerts{grid-template-columns:repeat(4,minmax(0,1fr))!important;}
  .overview-main{grid-template-columns:1.05fr 1fr 1.05fr!important;}
  .overview-secondary{grid-template-columns:1fr 1fr 1fr!important;}
  .overview-bottom{grid-template-columns:1fr 1fr 1.2fr 1fr!important;}
}
@media(min-width:801px) and (max-width:1200px){
  .dashboard-kpis{grid-template-columns:repeat(4,minmax(0,1fr))!important;}
  .overview-main,.overview-secondary{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  .overview-main>.panel:last-child,.overview-secondary>.panel:last-child{grid-column:auto!important;}
  .overview-bottom{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
}
@media(max-width:800px){
  .content{padding:7px 8px 9px!important;}
  .dashboard-kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  .dashboard-alerts,.overview-main,.overview-secondary,.overview-bottom{grid-template-columns:1fr!important;}
}
@media(max-width:520px){
  .dashboard-kpis{grid-template-columns:1fr!important;}
  .pipeline-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  .mini-stat-grid,.finance-snapshot{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
}

/* 2026-09-24 Dashboard final compact professional layout */
.content{padding-top:7px!important;}
.page-head{display:none!important;}
#app-view{margin-top:0!important;}
.dashboard-kpis{grid-template-columns:repeat(8,minmax(0,1fr))!important;gap:8px!important;margin:0 0 8px!important;}
.dash-kpi{min-height:78px!important;padding:9px 10px!important;gap:8px!important;}
.dash-kpi .kpi-icon{width:36px!important;height:36px!important;font-size:17px!important;flex:0 0 36px!important;}
.dash-kpi strong{font-size:18px!important;}
.dashboard-alerts{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:8px!important;margin:0 0 8px!important;}
.dash-alert{min-height:50px!important;padding:7px 10px!important;}
.overview-main,.overview-secondary,.overview-bottom{gap:8px!important;margin-top:0!important;margin-bottom:8px!important;}
.overview-main{grid-template-columns:minmax(0,1fr) minmax(0,.9fr) minmax(0,1.2fr)!important;}
.overview-secondary{grid-template-columns:minmax(0,1.15fr) minmax(0,1.15fr) minmax(0,.9fr)!important;}
.overview-bottom{grid-template-columns:repeat(4,minmax(0,1fr))!important;margin-bottom:0!important;}
.overview-main>.panel,.overview-secondary>.panel,.overview-bottom>.panel{align-self:stretch!important;height:100%!important;padding:12px!important;}
.pipeline-grid,.mini-stat-grid,.finance-snapshot{gap:6px!important;}
.pipeline-grid>div,.mini-stat-grid>div,.finance-snapshot>div{min-height:48px!important;padding:7px!important;}
.branch-cards{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
.branch-card{min-height:58px!important;}
.mini-list>div{min-height:34px!important;}
.comm-tab{min-height:58px!important;}
.empty{padding:14px 8px!important;}
@media(max-width:1500px){.dashboard-kpis{grid-template-columns:repeat(4,minmax(0,1fr))!important;}}
@media(max-width:1050px){.overview-main,.overview-secondary{grid-template-columns:repeat(2,minmax(0,1fr))!important}.overview-main>.panel:last-child,.overview-secondary>.panel:last-child{grid-column:1/-1}.overview-bottom{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:700px){.dashboard-kpis,.dashboard-alerts,.overview-main,.overview-secondary,.overview-bottom{grid-template-columns:1fr!important}.overview-main>.panel:last-child,.overview-secondary>.panel:last-child{grid-column:auto}.dash-kpi{min-height:72px!important}}

/* Final VIQE header/branding fit and functional navigation layout */
.reference-top-header{
  grid-template-columns:minmax(350px,390px) minmax(420px,1fr) auto!important;
  min-width:0!important;
  overflow:visible!important;
  padding:0 10px!important;
}
.reference-brand{min-width:350px!important;width:100%!important;overflow:visible!important;gap:9px!important}
.reference-brand img{width:40px!important;height:40px!important;flex:0 0 40px!important}
.reference-brand>div{min-width:0!important;overflow:visible!important}
.reference-brand b{
  font-size:12px!important;
  font-weight:800!important;
  letter-spacing:.15px!important;
  white-space:nowrap!important;
  overflow:visible!important;
  text-overflow:clip!important;
  color:#d71920!important;
}
.reference-brand small{font-size:7px!important;white-space:nowrap!important;overflow:visible!important}
.reference-main-nav{min-width:0!important;overflow-x:auto!important;overflow-y:visible!important;scrollbar-width:none!important;justify-content:flex-start!important;padding-left:8px!important}
.reference-main-nav::-webkit-scrollbar{display:none}
.ref-dropdown{flex:0 0 auto!important}
.ref-menu-btn{font-weight:600!important}
.reference-head-actions{min-width:max-content!important;flex:0 0 auto!important}
.reference-head-actions input{width:170px!important}
.reference-head-actions .user-mini{display:block!important;min-width:65px!important}
@media(max-width:1500px){
 .reference-top-header{grid-template-columns:minmax(335px,360px) minmax(360px,1fr) auto!important}
 .reference-brand{min-width:335px!important}
 .reference-brand b{font-size:11px!important}
 .reference-head-actions input{width:145px!important}
}
@media(max-width:1250px){
 .reference-top-header{grid-template-columns:minmax(315px,330px) minmax(300px,1fr) auto!important}
 .reference-brand{min-width:315px!important}
 .reference-brand b{font-size:10px!important}
 .reference-head-actions input{width:120px!important}
 .reference-head-actions .user-mini{display:none!important}
}
@media(max-width:1000px){
 .reference-top-header{grid-template-columns:minmax(300px,1fr) auto!important;grid-template-rows:46px 32px!important}
 .reference-brand{min-width:300px!important}
 .reference-main-nav{grid-column:1/-1;grid-row:2;height:32px!important;border-top:1px solid #edf0f4}
 .reference-head-actions{grid-column:2;grid-row:1}
 .reference-brand{grid-column:1;grid-row:1}
}
@media(max-width:650px){
 .reference-top-header{grid-template-columns:minmax(0,1fr) auto!important}
 .reference-brand{min-width:0!important;max-width:none!important}
 .reference-brand b{font-size:9px!important}
 .reference-brand img{width:36px!important;height:36px!important;flex-basis:36px!important}
 .reference-head-actions input{display:none!important}
 .reference-head-actions .user-mini{display:none!important}
}
/* Keep every dropdown inside viewport */
.ref-dropdown-menu{max-width:min(260px,calc(100vw - 20px))!important;overflow-y:auto!important;max-height:70vh!important}
.ref-dropdown:last-child .ref-dropdown-menu{right:0;left:auto}
.ref-dropdown.open .ref-dropdown-menu{display:block}
.ref-dropdown.open>.ref-menu-btn{color:#d71920;background:#fafafa}

.user-menu-btn{display:flex;align-items:center;gap:5px;border:0;background:transparent;padding:2px 4px;cursor:pointer;color:#172033;min-width:0}.user-menu-btn .user-caret{font-size:9px;color:#667085}.user-menu-dropdown{position:fixed;top:49px;right:10px;width:210px;background:#fff;border:1px solid #dfe5ec;border-top:2px solid #d71920;border-radius:0 0 8px 8px;box-shadow:0 10px 28px #0002;padding:6px;z-index:300;box-sizing:border-box}.user-menu-dropdown button{width:100%;border:0;background:#fff;text-align:left;padding:9px 10px;border-radius:5px;font-size:11px;color:#26364c;cursor:pointer}.user-menu-dropdown button:hover{background:#f4f7fb;color:#c8102e}.user-menu-current{margin:4px 6px;padding:7px 8px;border-radius:5px;background:#f5f7fa;color:#667085;font-size:9px}.session-current-banner{padding:10px 12px;margin-bottom:10px;border:1px solid #dfe5ec;border-radius:7px;background:#f7f9fc;color:#475467;font-size:11px}.reference-head-actions{position:relative}
@media(max-width:600px){.user-menu-dropdown{right:6px;top:48px}.user-menu-btn .user-mini{display:none!important}}


/* FINAL FIX: Always-visible VIQE header menu bar */
.reference-top-header{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  grid-template-rows:46px 34px!important;
  align-items:center!important;
  column-gap:10px!important;
  row-gap:0!important;
  height:80px!important;
  min-height:80px!important;
  padding:0 10px!important;
  overflow:visible!important;
  z-index:100!important;
}
.reference-brand{
  grid-column:1!important;
  grid-row:1!important;
  min-width:0!important;
  width:auto!important;
  max-width:none!important;
  height:46px!important;
  overflow:visible!important;
}
.reference-brand b{
  white-space:nowrap!important;
  overflow:visible!important;
  text-overflow:clip!important;
}
.reference-head-actions{
  grid-column:2!important;
  grid-row:1!important;
  min-width:0!important;
  height:46px!important;
  overflow:visible!important;
}
.reference-main-nav{
  grid-column:1/-1!important;
  grid-row:2!important;
  width:100%!important;
  min-width:0!important;
  height:34px!important;
  display:flex!important;
  align-items:stretch!important;
  justify-content:flex-start!important;
  gap:2px!important;
  overflow-x:auto!important;
  overflow-y:visible!important;
  padding:0!important;
  border-top:1px solid #edf0f4!important;
  scrollbar-width:none!important;
}
.reference-main-nav::-webkit-scrollbar{display:none!important}
.ref-dropdown{
  height:34px!important;
  min-width:max-content!important;
  flex:0 0 auto!important;
  position:relative!important;
}
.ref-menu-btn{
  height:34px!important;
  min-width:72px!important;
  padding:0 12px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:4px!important;
  font-size:10px!important;
  font-weight:800!important;
  color:#24334a!important;
  border-bottom:2px solid transparent!important;
}
.ref-menu-btn:hover,
.ref-dropdown:hover>.ref-menu-btn,
.ref-dropdown.open>.ref-menu-btn{
  color:#c8102e!important;
  background:#fafafa!important;
  border-bottom-color:#c8102e!important;
}
.ref-dropdown-menu,
.ref-dropdown.open .ref-dropdown-menu{
  top:34px!important;
  left:0!important;
  display:none;
  z-index:500!important;
}
.ref-dropdown:hover .ref-dropdown-menu,
.ref-dropdown.open .ref-dropdown-menu{display:block!important}
.ref-dropdown:last-child .ref-dropdown-menu{left:auto!important;right:0!important}
.reference-sub-nav{
  top:80px!important;
  z-index:90!important;
}
.reference-top-header + .reference-sub-nav{top:80px!important}

@media(max-width:1000px){
  .reference-top-header{
    grid-template-columns:minmax(0,1fr) auto!important;
    grid-template-rows:46px 34px!important;
    height:80px!important;
    min-height:80px!important;
  }
  .reference-main-nav{grid-column:1/-1!important;grid-row:2!important;width:100%!important}
  .reference-sub-nav{top:80px!important}
}
@media(max-width:650px){
  .reference-top-header{
    grid-template-columns:minmax(0,1fr) auto!important;
    height:80px!important;
    min-height:80px!important;
  }
  .reference-brand{height:46px!important}
  .reference-brand b{font-size:9px!important}
  .reference-head-actions{height:46px!important}
  .reference-main-nav{height:34px!important}
  .ref-menu-btn{min-width:68px!important;padding:0 9px!important;font-size:9px!important}
  .reference-sub-nav{top:80px!important}
}

/* FINAL DROPDOWN VISIBILITY FIX
   The previous horizontal overflow rule clipped absolutely-positioned dropdowns.
   Keep the menu bar visible and let its dropdowns escape the navigation row. */
.reference-main-nav{
  overflow:visible!important;
  overflow-x:visible!important;
  overflow-y:visible!important;
  position:relative!important;
}
.ref-dropdown{overflow:visible!important;}
.ref-dropdown-menu{
  position:absolute!important;
  visibility:visible;
  pointer-events:auto;
  z-index:9999!important;
}
.ref-dropdown.open .ref-dropdown-menu,
.ref-dropdown:hover .ref-dropdown-menu{
  display:block!important;
  visibility:visible!important;
  pointer-events:auto!important;
}
/* Keep the full menu usable on narrower screens without clipping the dropdowns. */
@media(max-width:1000px){
  .reference-main-nav{
    overflow:visible!important;
    overflow-x:visible!important;
    overflow-y:visible!important;
  }
}

/* Critical: CSS display:flex must never override the HTML hidden attribute. */
.modal-backdrop[hidden]{display:none!important;visibility:hidden!important;pointer-events:none!important;}

/* FINAL MODAL LAYOUT FIX: forms/options stay below the CRM header and sub-navigation */
.modal-backdrop{
  position:fixed!important;
  top:111px!important;
  right:0!important;
  bottom:0!important;
  left:0!important;
  z-index:70!important;
  display:flex!important;
  align-items:flex-start!important;
  justify-content:center!important;
  padding:12px 18px 18px!important;
  overflow:hidden!important;
}
.modal-backdrop .modal{
  position:relative!important;
  width:min(760px,100%)!important;
  max-width:760px!important;
  max-height:calc(100vh - 135px)!important;
  height:auto!important;
  margin:0!important;
  padding:0!important;
  overflow:hidden!important;
  border:1px solid #dfe5ec!important;
  border-radius:12px!important;
  box-shadow:0 16px 45px #0003!important;
}
.modal-backdrop .modal>.close{
  position:absolute!important;
  top:10px!important;
  right:12px!important;
  z-index:20!important;
  width:32px!important;
  height:32px!important;
  display:grid!important;
  place-items:center!important;
  border:1px solid #dfe5ec!important;
  border-radius:7px!important;
  background:#fff!important;
  color:#344054!important;
  font-size:22px!important;
  line-height:1!important;
  cursor:pointer!important;
}
.modal-backdrop .modal>.close:hover{background:#fff1f3!important;color:#c8102e!important;border-color:#f2b8c0!important}
.modal-backdrop #modal-body{
  max-height:calc(100vh - 135px)!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  padding:20px 24px 24px!important;
  scrollbar-width:thin;
}
.modal-backdrop #modal-body>h2{margin:0 42px 4px 0!important;font-size:18px!important;color:#172033!important}
.modal-backdrop #modal-body>p{margin:0 42px 16px 0!important;color:#667085!important;font-size:11px!important}
.modal-backdrop #modal-body .form{padding-bottom:2px!important}
.modal-backdrop .form-actions{position:sticky!important;bottom:-1px!important;background:#fff!important;padding:12px 0 0!important;z-index:5!important;border-top:1px solid #edf0f4!important}
.modal-backdrop .form-actions .btn{margin-left:7px!important}

/* Quick Actions uses the same safe viewport, but gets its own internal scrolling. */
.modal-backdrop .modal.quick-modal{
  width:min(1320px,calc(100vw - 36px))!important;
  max-width:1320px!important;
  height:calc(100vh - 135px)!important;
  max-height:calc(100vh - 135px)!important;
}
.modal-backdrop .modal.quick-modal #modal-body{
  height:100%!important;
  max-height:none!important;
  padding:0!important;
  overflow:hidden!important;
}
.modal-backdrop .modal.quick-modal>.close{display:none!important}

@media(max-width:850px){
  .modal-backdrop{top:111px!important;padding:8px 10px 12px!important}
  .modal-backdrop .modal{max-height:calc(100vh - 127px)!important}
  .modal-backdrop #modal-body{max-height:calc(100vh - 127px)!important;padding:16px 16px 20px!important}
  .modal-backdrop .modal.quick-modal{width:calc(100vw - 20px)!important;height:calc(100vh - 127px)!important;max-height:calc(100vh - 127px)!important}
}
@media(max-width:600px){
  .modal-backdrop{padding:6px 6px 10px!important}
  .modal-backdrop .modal{width:100%!important;border-radius:10px!important}
  .modal-backdrop #modal-body{padding:14px 12px 18px!important}
  .modal-backdrop #modal-body>h2{font-size:16px!important}
  .modal-backdrop .modal.quick-modal{width:100%!important}
}

/* Login screen must never show the authenticated CRM modal/overlay. */
body:has(#login-screen:not([hidden])) #modal{display:none!important;visibility:hidden!important;pointer-events:none!important;}
#login-screen{position:relative;z-index:100;}

/* Organization Settings */
.org-layout{display:grid;grid-template-columns:230px minmax(0,1fr);gap:18px;align-items:start}.org-tabs{position:sticky;top:150px;background:#fff;border:1px solid #e5e7eb;border-radius:18px;padding:10px;box-shadow:0 10px 30px rgba(15,23,42,.05)}.org-tab{width:100%;text-align:left;border:0;background:transparent;padding:12px 14px;border-radius:11px;font-weight:700;color:#475569;cursor:pointer}.org-tab:hover,.org-tab.active{background:#fef2f2;color:#b3122d}.org-content{min-width:0}.org-context{display:flex;justify-content:space-between;gap:20px;align-items:center;margin-bottom:16px;background:#fff;border:1px solid #e5e7eb;border-radius:18px;padding:18px 20px}.org-context h2{margin:4px 0}.org-context p{margin:0;color:#64748b}.org-branch-picker{display:flex;gap:12px;align-items:end;min-width:280px}.org-branch-picker label{display:flex;flex-direction:column;gap:6px;font-weight:700}.org-branch-picker select{min-width:220px}.org-summary-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:18px}.org-summary-grid>div,.org-list>div{border:1px solid #e5e7eb;border-radius:12px;padding:13px;background:#fafafa}.org-summary-grid b{display:block}.org-summary-grid small{color:#64748b}.org-grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}.org-grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}.org-list{display:flex;flex-direction:column;gap:8px}.org-list>div{display:grid;grid-template-columns:1fr auto;gap:4px}.org-list small{grid-column:1;color:#64748b}.org-list span{grid-column:2;grid-row:1/3;align-self:center}.id-design-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:16px}.id-preview{height:155px;border-radius:12px;background:#eef2f7;display:flex;align-items:center;justify-content:center;border:1px dashed #cbd5e1;color:#64748b;font-weight:800;font-size:12px;letter-spacing:.08em}.id-design-card h4{margin:12px 0 4px}.id-design-card p{margin:0 0 10px;color:#64748b}.toolbar-actions{display:flex;gap:8px}.form-section-title{grid-column:1/-1;font-weight:800;color:#334155;border-bottom:1px solid #e5e7eb;padding:8px 0}.integration-form .form-actions{display:flex;gap:8px}.org-content .panel{min-width:0}@media(max-width:1000px){.org-layout{grid-template-columns:1fr}.org-tabs{position:static;display:flex;overflow:auto}.org-tab{min-width:max-content}.org-summary-grid{grid-template-columns:repeat(2,1fr)}.org-grid-3,.org-grid-2{grid-template-columns:1fr}.org-context{flex-direction:column;align-items:stretch}.org-branch-picker{align-items:stretch}}

/* Super Admin Control Center */
/* CampusCore Super Admin branding */
.campuscore-brand{display:flex;align-items:center;gap:12px;padding:8px 6px 18px;margin-bottom:8px;border-bottom:1px solid rgba(255,255,255,.08)}
.campuscore-brand img{width:46px;height:46px;object-fit:contain;border-radius:10px;background:#fff;padding:3px;box-shadow:0 6px 18px rgba(0,0,0,.2)}
.campuscore-brand b{display:block;font-size:20px;letter-spacing:.2px;color:#fff}
.campuscore-brand small{display:block;color:#aeb6c6;margin-top:3px;font-size:11px}
.sa-hero small{letter-spacing:1.2px;font-weight:800}

.super-admin-shell{display:grid;grid-template-columns:255px 1fr;gap:18px;align-items:start}.super-admin-side{position:sticky;top:10px;background:#0f1116;color:#fff;border-radius:20px;padding:12px;box-shadow:0 18px 45px rgba(0,0,0,.12)}.sa-brand{display:flex;align-items:center;gap:11px;padding:12px 10px 18px;border-bottom:1px solid rgba(255,255,255,.1);margin-bottom:10px}.sa-brand>span{width:40px;height:40px;border-radius:12px;display:grid;place-items:center;background:#c8102e;font-weight:900}.sa-brand b,.sa-brand small{display:block}.sa-brand b{font-size:12px;letter-spacing:.08em}.sa-brand small{color:#9ca3af;margin-top:3px;font-size:10px}.sa-tab{display:block;width:100%;border:0;background:transparent;color:#b8bec8;text-align:left;padding:12px 13px;border-radius:11px;font-weight:800;cursor:pointer;margin:3px 0}.sa-tab:hover{background:#1b1e25;color:#fff}.sa-tab.active{background:linear-gradient(135deg,#c8102e,#970c23);color:#fff;box-shadow:0 8px 20px rgba(200,16,46,.22)}.super-admin-main{min-width:0}.sa-hero{background:linear-gradient(135deg,#111318,#282c35);color:#fff;border-radius:20px;padding:24px;box-shadow:0 15px 40px rgba(20,25,35,.1)}.sa-hero small,.sa-page-head small{font-size:10px;letter-spacing:.14em;font-weight:900;color:#ef9aaa}.sa-hero h2,.sa-page-head h2{margin:5px 0 6px}.sa-hero p,.sa-page-head p{margin:0;color:#6d7582;line-height:1.5}.sa-hero p{color:#c5cad3;max-width:760px}.sa-stat-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:9px;margin-top:20px}.sa-stat-grid div{padding:13px;border:1px solid rgba(255,255,255,.1);background:rgba(255,255,255,.06);border-radius:12px}.sa-stat-grid b,.sa-stat-grid span{display:block}.sa-stat-grid b{font-size:21px}.sa-stat-grid span{font-size:10px;color:#aeb5bf;margin-top:3px}.sa-section-head,.sa-page-head{display:flex;justify-content:space-between;align-items:center;gap:15px;margin:18px 0 12px}.sa-section-head h3{margin:0}.sa-section-head p{margin:4px 0 0;color:#737b88;font-size:12px}.sa-branch-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.sa-branch-card{background:#fff;border:1px solid #e5e7eb;border-radius:18px;padding:16px;box-shadow:0 10px 28px rgba(20,25,35,.05)}.sa-branch-top{display:flex;align-items:center;gap:11px}.sa-branch-icon{width:44px;height:44px;border-radius:13px;background:#f9e9ec;color:#c8102e;display:grid;place-items:center;font-weight:900;font-size:18px}.sa-branch-top h3{margin:0}.sa-branch-top small{color:#7a828f}.sa-status{margin-left:auto;padding:5px 8px;border-radius:999px;font-size:10px;font-weight:900;text-transform:uppercase}.sa-status.active{background:#e9f8ef;color:#147a3f}.sa-status.inactive,.sa-status.suspended{background:#fdecee;color:#b21a31}.sa-branch-meta{display:grid;gap:6px;margin:14px 0;color:#69717d;font-size:12px}.sa-branch-actions{display:flex;gap:8px}.sa-branch-actions button,.actions button{border:1px solid #dfe3e8;background:#fff;padding:7px 10px;border-radius:8px;cursor:pointer}.sa-branch-actions button:first-child{background:#111318;color:#fff;border-color:#111318}.sa-branch-actions button.danger{color:#b42318;background:#fff5f5;border-color:#f3c1c8}.sa-branch-actions button.danger:hover{background:#fee2e2}.sa-branch-select{min-width:260px;border:1px solid #dfe3e8;background:#fff;padding:10px 12px;border-radius:10px;font-weight:700}.sa-form{display:grid;grid-template-columns:1fr 1fr}.sa-module-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.sa-module-card{display:flex;align-items:center;gap:12px;border:1px solid #e5e7eb;border-radius:14px;padding:13px;cursor:pointer}.sa-module-card:hover{border-color:#c8102e}.sa-module-card input{width:19px;height:19px;accent-color:#c8102e}.sa-module-card span{flex:1}.sa-module-card b,.sa-module-card small{display:block}.sa-module-card small{color:#818996;margin-top:3px;font-size:11px}.sa-module-card input:not(:checked)+span small{color:#b21a31}.sa-page-head>div:first-child{flex:1}@media(max-width:1100px){.sa-stat-grid{grid-template-columns:repeat(3,1fr)}}@media(max-width:900px){.super-admin-shell{grid-template-columns:1fr}.super-admin-side{position:static;display:flex;overflow:auto;gap:3px}.sa-brand{display:none}.sa-tab{white-space:nowrap;width:auto}.sa-branch-grid,.sa-module-grid{grid-template-columns:1fr}.sa-form{grid-template-columns:1fr}.sa-page-head{align-items:flex-start;flex-direction:column}.sa-branch-select{width:100%}}@media(max-width:600px){.sa-stat-grid{grid-template-columns:1fr 1fr}}

/* Super Admin Branch Setup – polished form layout */
.sa-form{
  gap:0 18px;
  padding:24px;
  border-radius:18px;
}
.sa-form > label{
  display:flex;
  flex-direction:column;
  gap:7px;
  min-width:0;
  padding:7px 0;
  color:#475569;
  font-size:11px;
  font-weight:800;
  letter-spacing:.01em;
}
.sa-form > label.full{grid-column:1/-1}
.sa-form > label input,
.sa-form > label select,
.sa-form > label textarea{
  width:100%;
  min-width:0;
  height:44px;
  padding:0 13px;
  border:1px solid #d8dee8;
  border-radius:10px;
  background:#fff;
  color:#172033;
  font:600 13px/1 Inter,Arial,sans-serif;
  outline:none;
  transition:border-color .15s,box-shadow .15s,background .15s;
}
.sa-form > label textarea{height:auto;min-height:90px;padding:11px 13px;line-height:1.45;resize:vertical}
.sa-form > label input:focus,
.sa-form > label select:focus,
.sa-form > label textarea:focus{
  border-color:#c8102e;
  box-shadow:0 0 0 3px rgba(200,16,46,.09);
  background:#fff;
}
.sa-form > label input[type="file"]{
  height:auto;
  min-height:44px;
  padding:7px 10px;
  font-size:12px;
  font-weight:600;
  cursor:pointer;
}
.sa-form > label input[type="color"]{
  padding:4px;
  cursor:pointer;
}
.sa-form .form-section-title{
  grid-column:1/-1;
  margin:18px 0 5px;
  padding:13px 0 9px;
  border-bottom:1px solid #e7ebf0;
  color:#182338;
  font-size:11px;
  font-weight:900;
  letter-spacing:.13em;
  text-transform:uppercase;
}
.sa-form .form-section-title:first-child{margin-top:0}
.sa-form .form-actions{
  grid-column:1/-1;
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:8px;
  margin-top:18px;
  padding-top:16px;
  border-top:1px solid #edf0f4;
}
.sa-form .form-actions .btn{margin-left:0}
.sa-page-head .sa-branch-select{flex:0 1 360px;max-width:360px;min-width:260px;height:44px;box-shadow:0 1px 2px rgba(15,23,42,.03)}
.sa-page-head .sa-branch-select:focus{outline:none;border-color:#c8102e;box-shadow:0 0 0 3px rgba(200,16,46,.09)}
@media(max-width:900px){
  .sa-form{grid-template-columns:1fr;padding:18px}
  .sa-form > label.full{grid-column:auto}
  .sa-form .form-section-title,.sa-form .form-actions{grid-column:auto}
  .sa-page-head .sa-branch-select{width:100%;max-width:none;min-width:0}
}

/* Branch login notification popup */
.modal-backdrop.notification-modal{z-index:1000!important;background:rgba(15,23,42,.72)!important;backdrop-filter:blur(3px)!important;align-items:center!important;justify-items:center!important}
.modal-backdrop.notification-modal .modal{width:min(620px,calc(100vw - 32px))!important;max-height:calc(100vh - 40px)!important;padding:0!important;overflow:hidden!important;border-radius:18px!important;box-shadow:0 24px 70px #00000035!important;border:1px solid #e5e7eb!important}
.modal-backdrop.notification-modal .modal>.close{z-index:3!important;right:12px!important;top:10px!important;width:36px!important;height:36px!important;border:1px solid #e5e7eb!important;border-radius:50%!important;background:#fff!important;font-size:23px!important;color:#344054!important;line-height:1!important}
.modal-backdrop.notification-modal #modal-body{padding:0!important;max-height:calc(100vh - 40px)!important;overflow:auto!important}
.login-notice-wrap{padding:34px 34px 28px!important;text-align:left!important;background:#fff!important}
.login-notice-badge{display:inline-flex;align-items:center;gap:6px;background:#fff1f2;color:#b42318;border:1px solid #fecdd3;border-radius:999px;padding:7px 11px;font-size:10px;font-weight:800;letter-spacing:.5px;margin-bottom:14px}
.login-notice-wrap h2{font-size:23px!important;line-height:1.25!important;color:#172033!important;margin:0 42px 14px 0!important}
.login-notice-message{font-size:14px!important;line-height:1.65!important;color:#475467!important;white-space:pre-wrap!important;word-break:break-word!important;max-height:45vh!important;overflow:auto!important;padding:15px 16px!important;background:#f8fafc!important;border:1px solid #eaecf0!important;border-radius:11px!important}
.login-notice-meta{margin-top:12px!important;font-size:10px!important;color:#98a2b3!important}
.login-notice-actions{display:flex!important;justify-content:flex-end!important;margin-top:20px!important;padding-top:16px!important;border-top:1px solid #edf0f4!important}
.login-notice-actions .btn{min-width:96px!important;margin:0!important}
@media(max-width:600px){.login-notice-wrap{padding:28px 20px 20px!important}.login-notice-wrap h2{font-size:19px!important}.login-notice-message{font-size:13px!important;max-height:50vh!important}}

/* CampusCore Super Admin visible portal branding v1.1.3 */
.campuscore-portal-bar{display:flex;align-items:center;gap:14px;background:linear-gradient(135deg,#111318,#252a33);color:#fff;border-radius:18px;padding:12px 16px;margin-bottom:16px;box-shadow:0 12px 30px rgba(15,17,22,.16);border:1px solid rgba(255,255,255,.08)}
.campuscore-portal-bar img{width:48px;height:48px;object-fit:contain;background:#fff;border-radius:11px;padding:3px}
.campuscore-portal-bar strong{display:block;font-size:20px;letter-spacing:.2px}
.campuscore-portal-bar span:not(.campuscore-portal-badge){display:block;color:#b9c0cc;font-size:11px;margin-top:2px}
.campuscore-portal-badge{margin-left:auto;border:1px solid rgba(255,255,255,.18);background:rgba(255,255,255,.07);border-radius:999px;padding:7px 10px;font-size:10px;font-weight:900;letter-spacing:.08em;color:#fff}
@media(max-width:700px){.campuscore-portal-bar{padding:10px}.campuscore-portal-badge{display:none}}

/* CampusCore v1.1.5 - unmistakable Super Admin portal branding */
html[data-portal="campuscore-super-admin"] body{background:#f3f5f8!important}
html[data-portal="campuscore-super-admin"] .super-admin-main:before{content:"CampusCore  •  SUPER ADMIN CONTROL CENTER  •  CENTRAL ADMINISTRATION";display:block;background:#c8102e;color:#fff;font-weight:900;letter-spacing:.08em;font-size:11px;padding:9px 14px;border-radius:12px;margin-bottom:12px;text-align:center;box-shadow:0 8px 20px rgba(200,16,46,.16)}
html[data-portal="campuscore-super-admin"] .campuscore-portal-bar{border:2px solid #c8102e;background:linear-gradient(135deg,#090b0f,#1c222b)!important}
html[data-portal="campuscore-super-admin"] .campuscore-portal-bar strong{font-size:24px}

/* CampusCore v1.1.5 branding */
.campuscore-brand img,.campuscore-portal-bar img{object-fit:contain;background:#fff}
.campuscore-brand small,.campuscore-portal-bar span:not(.campuscore-portal-badge){color:#d5d9e2}
.campuscore-portal-bar strong{font-size:22px}

/* CampusCore v1.1.6 - visible Super Admin application branding */
html[data-portal="campuscore-super-admin"] .reference-brand{background:linear-gradient(135deg,#111318,#242a33);border:1px solid rgba(200,16,46,.45);border-radius:12px;padding:5px 9px;min-height:48px}
html[data-portal="campuscore-super-admin"] .reference-brand img{width:72px;height:46px;object-fit:contain;background:#fff;border-radius:7px;padding:2px}
html[data-portal="campuscore-super-admin"] .reference-brand b{color:#fff!important;font-size:16px!important}
html[data-portal="campuscore-super-admin"] .reference-brand small{color:#ffccd3!important;font-size:8px!important;letter-spacing:.6px}
html[data-portal="campuscore-super-admin"] .crm-footer{background:#0b0d11!important}

/* v1.1.8 branch-specific login branding */
.branch-logo-preview{display:flex;align-items:center;gap:12px;min-height:70px;padding:10px 12px;border:1px dashed #d0d5dd;border-radius:10px;background:#f8fafc;margin:4px 0 12px}.branch-logo-preview img{width:64px;height:64px;object-fit:contain;border-radius:8px;background:#fff;border:1px solid #e5e7eb}.branch-logo-preview span{font-size:10px;color:#667085;font-weight:700}.field-help{display:block!important;margin-top:5px;color:#667085;font-size:10px;line-height:1.45}.branch-logo-upload input{margin-top:6px}
/* CampusCore dual login selector v1.1.9 */
.login-mode-tabs{display:grid;grid-template-columns:1fr 1fr;gap:6px;background:#f3f4f6;border:1px solid #e5e7eb;border-radius:10px;padding:4px;margin:0 0 18px;text-align:left}
.login-mode-tab{appearance:none;border:0;background:transparent;color:#667085;border-radius:7px;padding:10px 8px;font-size:11px;font-weight:800;cursor:pointer;transition:.18s}
.login-mode-tab:hover{color:#111827;background:#fff}
.login-mode-tab.active{background:#fff;color:#c8102e;box-shadow:0 1px 4px #11182718}
#branch-code-label[hidden]{display:none!important}
.login-mode-tab:focus-visible{outline:3px solid #c8102e22;outline-offset:1px}
@media(max-width:650px){.login-mode-tab{font-size:10px;padding:9px 5px}}

.forgot-password-link{border:0;background:transparent;color:#c8102e;font-weight:800;font-size:12px;cursor:pointer;text-decoration:none;padding:2px 0;margin:-5px 0 0;text-align:center}.forgot-password-link:hover{text-decoration:underline}


/* CampusCore Login Screen — v1.1.11 final layout fix */
html,body{min-height:100%;margin:0}
body{overflow-x:hidden}
.login-screen{min-height:100svh!important;height:auto!important;box-sizing:border-box!important}
.login-page{min-height:100svh!important;height:auto!important;box-sizing:border-box!important}
.login-header{flex:0 0 auto!important}
.login-body{box-sizing:border-box!important;min-height:0!important;flex:1 1 auto!important;align-items:center!important}
.login-panel-wrap{min-width:0!important}
.login-card{box-sizing:border-box!important;overflow:visible!important}
.login-panel-logo{min-height:84px;align-items:center}
.login-logo{max-width:100px!important;max-height:100px!important;width:auto!important;height:auto!important}
.login-mode-tabs{width:100%;box-sizing:border-box}
.login-mode-tab{min-width:0;white-space:nowrap}
.login-form{width:100%;box-sizing:border-box}
.login-form label,.login-form input,.login-btn,.forgot-password-link{box-sizing:border-box}
.login-form input{min-height:44px!important}
.login-btn{min-height:44px!important;border-radius:9px!important}
.forgot-password-link{display:block!important;width:100%!important;padding:5px 0!important;margin:0!important;border:0!important;background:transparent!important;color:#c8102e!important;font-size:11px!important;font-weight:800!important;text-align:center!important;cursor:pointer!important}
.forgot-password-link:hover{text-decoration:underline!important}
.login-support{line-height:1.45!important}
.login-note{line-height:1.45!important}
.login-footer{flex:0 0 auto!important;box-sizing:border-box!important}
.login-footer>div{min-width:0}
@media(max-width:950px){
 .login-body{width:min(760px,92%)!important;padding:30px 0!important;grid-template-columns:1fr!important;gap:24px!important}
 .product-highlights{text-align:center!important}
 .product-intro{margin-left:auto!important;margin-right:auto!important}
 .highlight-grid{margin-left:auto!important;margin-right:auto!important;text-align:left!important}
 .login-panel-wrap{justify-content:center!important}
}
@media(max-width:650px){
 .login-header{padding:10px 16px!important}
 .login-header-contact{display:none!important}
 .login-body{width:calc(100% - 28px)!important;padding:18px 0 22px!important;gap:18px!important}
 .product-highlights{display:none!important}
 .login-card{width:100%!important;max-width:430px!important;padding:22px 18px!important;border-radius:15px!important}
 .login-panel-logo{min-height:70px}
 .login-logo{max-width:78px!important;max-height:78px!important}
 .login-card h2{font-size:21px!important}
 .login-card>p{font-size:10px!important;margin-bottom:16px!important}
 .login-mode-tabs{margin-bottom:14px!important}
 .login-mode-tab{font-size:10px!important;padding:9px 4px!important}
 .login-footer{padding:12px 14px!important;gap:8px!important}
 .login-footer>div{width:100%!important}
 .developer-credit{display:none!important}
}
@media(max-height:720px) and (min-width:651px){
 .login-header{height:68px!important}
 .login-body{padding:18px 0!important;gap:24px!important}
 .product-highlights h1{font-size:34px!important;margin:10px 0!important}
 .product-intro{margin-bottom:14px!important}
 .highlight-grid{gap:8px!important}
 .highlight-card{padding:9px!important}
 .highlight-card small{font-size:8px!important}
 .login-card{padding:22px!important}
 .login-logo{max-width:78px!important;max-height:78px!important}
 .login-footer{min-height:52px!important;padding:8px 5%!important}
}

/* v1.1.12 GLOBAL PAGE/FOOTER LAYOUT FIX */
html, body { min-height: 100%; }
body { min-height: 100vh; }
.app { min-height: 100vh !important; display: flex !important; flex-direction: column !important; }
.top-shell { min-height: 100vh !important; display: flex !important; flex-direction: column !important; flex: 1 1 auto !important; }
.top-header, .module-board, .reference-board, .reference-top-header, .reference-sub-nav { flex: 0 0 auto; }
.content { flex: 1 0 auto !important; width: 100%; }
.crm-footer { flex: 0 0 auto !important; width: 100%; margin-top: auto !important; position: relative !important; top: auto !important; bottom: auto !important; }
/* Module views must expand naturally; footer follows the complete content instead of jumping upward. */
#app-view { min-height: 0 !important; height: auto !important; }
.content > #app-view { overflow: visible !important; }
/* Never let page-specific containers create a viewport-sized footer overlay. */
main, section, .page, .view, .module-page { max-height: none; }
@media (max-width: 800px) {
  .top-shell { min-height: 100vh !important; }
  .content { flex: 1 0 auto !important; }
  .crm-footer { position: relative !important; margin-top: auto !important; }
}

/* CampusCore multi-branch user access */
.assigned-branch-switcher{min-width:180px;max-width:240px;height:40px;border:1px solid #d8dde6;border-radius:10px;background:#fff;padding:0 10px;font-weight:700;color:#20242b;}
.multi-branch-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:8px;}
.multi-branch-option{display:flex;align-items:center;gap:10px;border:1px solid #e0e4ea;border-radius:10px;padding:11px 12px;background:#fafbfc;cursor:pointer;}
.multi-branch-option:hover{border-color:#c8102e;background:#fff;}
.multi-branch-option input{width:18px;height:18px;accent-color:#c8102e;}
.multi-branch-option span{display:flex;flex-direction:column;gap:2px;}
.multi-branch-option small{opacity:.65;}
.tag{display:inline-block;padding:4px 7px;margin:2px;border-radius:999px;background:#f1f3f6;font-size:12px;}
@media(max-width:800px){.assigned-branch-switcher{max-width:160px;min-width:130px}.multi-branch-grid{grid-template-columns:1fr;}}

/* FINAL LOGIN ISOLATION FIX v1.1.16
   The CRM shell must never render or scroll underneath the login page. */
#login-screen[hidden],
#app-shell[hidden]{
  display:none!important;
  visibility:hidden!important;
  pointer-events:none!important;
}
#login-screen:not([hidden]){
  position:fixed!important;
  inset:0!important;
  width:100vw!important;
  height:100vh!important;
  height:100dvh!important;
  min-height:100dvh!important;
  z-index:99999!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  overscroll-behavior:contain!important;
}
#login-screen:not([hidden]) .login-page{
  min-height:100%!important;
  width:100%!important;
}
body:has(#login-screen:not([hidden])){
  overflow:hidden!important;
  height:100%!important;
}
