/* Phase 29 — Clarity Pro Stabilization Layer
   Final, browser-safe visual contract. Loaded after app.css + clarity-pro.css so older phase
   experiments cannot leak inconsistent colour, spacing, hover or density into Clarity Pro. */

body[data-theme="clarity-pro"]{
  --cp-primary:#0f766e;
  --cp-primary-hover:#0b625c;
  --cp-primary-soft:#edf7f5;
  --cp-success:#059669;
  --cp-success-soft:#eaf7f1;
  --cp-warning:#d97706;
  --cp-warning-soft:#fff5e7;
  --cp-danger:#b4232f;
  --cp-danger-soft:#fff0f1;
  --cp-info:#0ea5e9;
  --cp-info-soft:#edf8fd;
  --cp-purple:#6a1b9a;
  --cp-purple-soft:#f5eef8;
  --cp-pink:#cc25b0;
  --cp-title:#2f3a4b;
  --cp-text:#56616f;
  --cp-muted:#6f7885;
  --cp-faint:#939ba6;
  --cp-border:#e4e7eb;
  --cp-border-strong:#d5dbe1;
  --cp-bg:#f7f8fa;
  --cp-surface:#fff;
  --cp-surface-alt:#fafbfc;
  --cp-radius:8px;
  --cp-shadow:0 1px 3px rgba(15,23,42,.035);
  --cp-shadow-hover:0 5px 14px rgba(15,23,42,.065);
  color:var(--cp-text);
  background:var(--cp-bg);
}

/* No geometry surprise while icons are waiting for Lucide to replace <i>. */
i[data-lucide]{display:inline-block;width:1em;height:1em;min-width:1em;min-height:1em;flex:0 0 auto;vertical-align:-.125em}
svg.lucide{flex:0 0 auto}

/* Shell + typography */
body[data-theme="clarity-pro"] .topbar{height:60px;background:#fff;border-bottom:1px solid var(--cp-border);box-shadow:none}
body[data-theme="clarity-pro"] .layout{grid-template-columns:242px minmax(0,1fr);align-items:start}
body[data-theme="clarity-pro"] .sidebar{top:60px;height:calc(100vh - 60px);background:#fff;border-right:1px solid var(--cp-border);box-shadow:none}
body[data-theme="clarity-pro"] .main{min-width:0;min-height:calc(100vh - 60px);padding:18px 18px 60px;background:var(--cp-bg)}
body[data-theme="clarity-pro"] .page-head{min-height:0!important;padding:0 0 14px!important;margin:0 0 14px!important;align-items:flex-start}
body[data-theme="clarity-pro"] .page-title{color:var(--cp-title)!important;font-size:22px!important;line-height:1.2;font-weight:760;letter-spacing:-.02em}
body[data-theme="clarity-pro"] .page-desc{color:#667180!important;font-size:13px!important;line-height:1.55;max-width:860px}
body[data-theme="clarity-pro"] .breadcrumbs{color:#77818e!important;font-size:11px!important;font-weight:650!important}
body[data-theme="clarity-pro"] .card-title,body[data-theme="clarity-pro"] .section-title,body[data-theme="clarity-pro"] .cell-title{color:var(--cp-title)!important}
body[data-theme="clarity-pro"] .card-sub,body[data-theme="clarity-pro"] .section-help,body[data-theme="clarity-pro"] .cell-sub,body[data-theme="clarity-pro"] .muted{color:var(--cp-muted)!important}
body[data-theme="clarity-pro"] .nav-title{color:#667085!important;font-size:10.5px!important;font-weight:750!important}
body[data-theme="clarity-pro"] .nav-btn{color:#475467!important}
body[data-theme="clarity-pro"] .nav-btn:hover{background:#f3f5f6!important;color:#243142!important}
body[data-theme="clarity-pro"] .nav-btn:hover .nav-icon{color:#344054!important;background:#eef1f3!important}
body[data-theme="clarity-pro"] .nav-btn.active{background:#172033!important;color:#fff!important}
body[data-theme="clarity-pro"] .nav-btn.active .nav-icon{background:rgba(255,255,255,.10)!important;color:#fff!important}
body[data-theme="clarity-pro"] .nav-subitem{color:#5f6b7a!important}
body[data-theme="clarity-pro"] .nav-subitem:hover{background:#f4f8f7!important;color:#0f766e!important}
body[data-theme="clarity-pro"] .nav-subitem.active{background:#eaf6f3!important;color:#0b6d64!important;border-left-color:#0f766e!important}
body[data-theme="clarity-pro"] .nav-badge{background:#eaf6f3!important;color:#0b6d64!important;font-weight:750}

/* Consistent cards / density */
body[data-theme="clarity-pro"] .card,
body[data-theme="clarity-pro"] .module-card,
body[data-theme="clarity-pro"] .section-box,
body[data-theme="clarity-pro"] .approval-card,
body[data-theme="clarity-pro"] .dispatch-card,
body[data-theme="clarity-pro"] .stat,
body[data-theme="clarity-pro"] .cd-card{
  background:#fff!important;border:1px solid var(--cp-border)!important;border-radius:var(--cp-radius)!important;
  box-shadow:var(--cp-shadow)!important;transform:none!important;
}
body[data-theme="clarity-pro"] .card:hover,
body[data-theme="clarity-pro"] .module-card:hover,
body[data-theme="clarity-pro"] .approval-card:hover,
body[data-theme="clarity-pro"] .dispatch-card:hover,
body[data-theme="clarity-pro"] .stat:hover{border-color:var(--cp-border-strong)!important;box-shadow:var(--cp-shadow-hover)!important;transform:none!important}
body[data-theme="clarity-pro"] .card-head,body[data-theme="clarity-pro"] .cd-card-head{min-height:0!important;padding:14px 16px 12px!important;border-bottom-color:#edf0f2}
body[data-theme="clarity-pro"] .card-body{padding:14px 16px}
body[data-theme="clarity-pro"] .grid2,body[data-theme="clarity-pro"] .grid3,body[data-theme="clarity-pro"] .stats,body[data-theme="clarity-pro"] .quick-grid{gap:12px!important}
body[data-theme="clarity-pro"] .stats{margin-bottom:14px!important}
body[data-theme="clarity-pro"] .stat{min-height:108px!important;padding:15px 16px!important;background:#fff!important;overflow:hidden}
body[data-theme="clarity-pro"] .stat:before{display:none!important}
body[data-theme="clarity-pro"] .stat .label{color:#667085!important;font-size:11.7px!important}
body[data-theme="clarity-pro"] .stat .value{color:var(--cp-title)!important;font-size:25px!important}
body[data-theme="clarity-pro"] .stat .note{color:#77818e!important;font-size:11.4px!important}
body[data-theme="clarity-pro"] .stat-icon{width:38px!important;height:38px!important;border-radius:8px!important;color:#fff!important}
body[data-theme="clarity-pro"] .stat-c1 .stat-icon{background:#0ea5e9!important}
body[data-theme="clarity-pro"] .stat-c2 .stat-icon{background:#059669!important}
body[data-theme="clarity-pro"] .stat-c3 .stat-icon{background:#6a1b9a!important}
body[data-theme="clarity-pro"] .stat-c4 .stat-icon{background:#e65100!important}

/* Buttons: neutral stays neutral on hover; semantic buttons keep readable text. */
body[data-theme="clarity-pro"] .btn{min-height:37px;padding:8px 12px;border-radius:6px!important;border:1px solid #d9dfe5!important;background:#fff!important;color:#455160!important;font-size:12.5px!important;font-weight:680!important;box-shadow:none!important;transform:none!important;transition:background-color .14s ease,border-color .14s ease,color .14s ease,box-shadow .14s ease!important}
body[data-theme="clarity-pro"] .btn:hover{background:#f4f6f8!important;border-color:#cbd3dc!important;color:#263444!important;box-shadow:none!important}
body[data-theme="clarity-pro"] .btn svg,body[data-theme="clarity-pro"] .btn i{color:currentColor!important;stroke:currentColor!important}
body[data-theme="clarity-pro"] .btn.primary{background:var(--cp-primary)!important;border-color:var(--cp-primary)!important;color:#fff!important}
body[data-theme="clarity-pro"] .btn.primary:hover{background:var(--cp-primary-hover)!important;border-color:var(--cp-primary-hover)!important;color:#fff!important}
body[data-theme="clarity-pro"] .btn.success{background:var(--cp-success-soft)!important;border-color:#ccebdd!important;color:#047857!important}
body[data-theme="clarity-pro"] .btn.success:hover{background:var(--cp-success)!important;border-color:var(--cp-success)!important;color:#fff!important}
body[data-theme="clarity-pro"] .btn.warning{background:var(--cp-warning-soft)!important;border-color:#f1d7ad!important;color:#9a5c09!important}
body[data-theme="clarity-pro"] .btn.warning:hover{background:#d97706!important;border-color:#d97706!important;color:#fff!important}
body[data-theme="clarity-pro"] .btn.danger,body[data-theme="clarity-pro"] .btn.red{background:var(--cp-danger-soft)!important;border-color:#efc9cd!important;color:#a61b28!important}
body[data-theme="clarity-pro"] .btn.danger:hover,body[data-theme="clarity-pro"] .btn.red:hover{background:var(--cp-danger)!important;border-color:var(--cp-danger)!important;color:#fff!important}
body[data-theme="clarity-pro"] .btn.small{min-height:31px!important;padding:5px 9px!important;font-size:11.6px!important}
body[data-theme="clarity-pro"] .btn:focus-visible,body[data-theme="clarity-pro"] .icon-btn:focus-visible{outline:0;box-shadow:0 0 0 3px rgba(15,118,110,.16)!important}
body[data-theme="clarity-pro"] button:disabled,body[data-theme="clarity-pro"] .btn:disabled{opacity:.58!important}

/* Inputs / tables */
body[data-theme="clarity-pro"] input,body[data-theme="clarity-pro"] select,body[data-theme="clarity-pro"] textarea{min-height:42px;border-radius:6px!important;border-color:#dce2e8!important;background:#fff;color:#354152!important;font-size:13.2px!important}
body[data-theme="clarity-pro"] input::placeholder,body[data-theme="clarity-pro"] textarea::placeholder{color:#98a2ad}
body[data-theme="clarity-pro"] input:focus,body[data-theme="clarity-pro"] select:focus,body[data-theme="clarity-pro"] textarea:focus{border-color:#54a99f!important;box-shadow:0 0 0 3px rgba(15,118,110,.10)!important}
body[data-theme="clarity-pro"] .form-group label{color:#455160!important;font-size:11.9px!important;font-weight:700!important}
body[data-theme="clarity-pro"] .toolbar{gap:8px!important;padding:10px 14px!important;background:#fafbfc!important;border-color:#edf0f2!important}
body[data-theme="clarity-pro"] .table-wrap{border-color:#e5e9ed!important}
body[data-theme="clarity-pro"] table thead th{padding:11px 12px!important;background:#f8f9fa!important;color:#596473!important;font-size:11.6px!important;font-weight:720!important;border-color:#e7eaee!important}
body[data-theme="clarity-pro"] table tbody td{padding:11px 12px!important;color:#53606e!important;font-size:12.6px!important;border-color:#edf0f2!important}
body[data-theme="clarity-pro"] table tbody tr:nth-child(even){background:#fdfdfd!important}
body[data-theme="clarity-pro"] table tbody tr:hover{background:#f6faf9!important}
body[data-theme="clarity-pro"] .table-actions{gap:6px!important}

/* Badges and notice bars: never low-contrast. */
body[data-theme="clarity-pro"] .badge{font-size:10.8px!important;font-weight:750!important;border:0!important}
body[data-theme="clarity-pro"] .badge.success{background:#e8f7f0!important;color:#047857!important}
body[data-theme="clarity-pro"] .badge.info{background:#eaf7fd!important;color:#087ea9!important}
body[data-theme="clarity-pro"] .badge.warning{background:#fff1df!important;color:#9a5c09!important}
body[data-theme="clarity-pro"] .badge.danger{background:#fdebed!important;color:#a61b28!important}
body[data-theme="clarity-pro"] .badge.purple{background:#f4ebf8!important;color:#6a1b9a!important}
body[data-theme="clarity-pro"] .notice-strip{min-height:48px;border:1px solid #dfe4e9!important;border-radius:8px!important;background:#fff!important;color:#354152!important;box-shadow:none!important}
body[data-theme="clarity-pro"] .notice-strip .text,body[data-theme="clarity-pro"] .notice-strip .text b{color:#354152!important}
body[data-theme="clarity-pro"] .notice-strip time{color:#737e8c!important}
body[data-theme="clarity-pro"] .notice-strip .tag{background:#334155!important;color:#fff!important;border-radius:5px;font-weight:800}

/* Approval Center: one clear hierarchy, no unreadable tint-on-tint blocks. */
body[data-theme="clarity-pro"].page-approvals .stats{margin-bottom:12px!important}
body[data-theme="clarity-pro"] .approval-card{grid-template-columns:minmax(0,1fr) auto!important;gap:14px!important;padding:14px 15px!important;margin-bottom:9px!important;align-items:start!important}
body[data-theme="clarity-pro"] .approval-card .cell-title{font-size:13.2px!important;line-height:1.4}
body[data-theme="clarity-pro"] .approval-meta{color:#77818e!important;font-size:11px!important;gap:7px!important}
body[data-theme="clarity-pro"] .approval-detail{margin-top:8px;padding:10px 11px;border:1px solid #dfe9e6;border-radius:7px;background:#f3f9f7;color:#425160;font-size:12px;line-height:1.55}
body[data-theme="clarity-pro"] .approval-thread{margin-top:8px;padding:9px 11px;border:1px solid #e5e9ed;border-radius:7px;background:#fafbfc;color:#4e5b69;font-size:11.8px;line-height:1.5}
body[data-theme="clarity-pro"] .approval-thread small{color:#7f8894!important}
body[data-theme="clarity-pro"] .approval-actions{display:flex;align-items:center;justify-content:flex-end;gap:6px;flex-wrap:wrap;max-width:460px}
body[data-theme="clarity-pro"] .approval-actions form{margin:0!important}
body[data-theme="clarity-pro"] .approval-resend{margin-top:10px;padding:11px;border:1px solid #efd8ae;border-radius:7px;background:#fff8ea;color:#5f513c}
body[data-theme="clarity-pro"] .approval-resend label{color:#6b542d!important;font-size:11.8px!important}
body[data-theme="clarity-pro"] .approval-resend textarea{background:#fff!important}
body[data-theme="clarity-pro"] .approval-stage{display:inline-flex;align-items:center;gap:5px;margin-left:6px;padding:4px 7px;border-radius:999px;background:#e9f6f3;color:#0b6d64;font-size:10px;font-weight:780}
body[data-theme="clarity-pro"] .approval-card[data-stage="ceo"] .approval-stage{background:#f3ebf7;color:#6a1b9a}

/* Head actions: JS moves low-priority overflow here. */
.cp-more-actions{position:relative;display:inline-flex}
.cp-more-actions>summary{list-style:none;cursor:pointer}
.cp-more-actions>summary::-webkit-details-marker{display:none}
.cp-more-menu{position:absolute;right:0;top:calc(100% + 7px);z-index:90;min-width:210px;padding:7px;background:#fff;border:1px solid var(--cp-border);border-radius:8px;box-shadow:0 12px 30px rgba(15,23,42,.12)}
.cp-more-menu>*{display:block!important;width:100%!important;margin:0!important}
.cp-more-menu .btn,.cp-more-menu button{width:100%!important;justify-content:flex-start!important;margin:2px 0!important}
.cp-more-menu form{width:100%}

/* Toasts */
.erp-toast-stack{right:18px!important;top:72px!important}
.erp-toast{border-radius:8px!important;border-color:#e2e6eb!important;box-shadow:0 10px 28px rgba(15,23,42,.14)!important}
.erp-toast b{color:var(--cp-title)!important;font-size:12.3px!important}.erp-toast div>span{color:#637080!important;font-size:11.7px!important}

/* Stable navigation: no artificial exit pause. Native View Transitions enhance supported browsers. */
@view-transition{navigation:auto}
body[data-theme="clarity-pro"] .topbar{view-transition-name:erp-topbar}
body[data-theme="clarity-pro"] .sidebar{view-transition-name:erp-sidebar}
body[data-theme="clarity-pro"] .main{view-transition-name:erp-main}
::view-transition-old(erp-topbar),::view-transition-new(erp-topbar),::view-transition-old(erp-sidebar),::view-transition-new(erp-sidebar){animation:none}
::view-transition-old(erp-main){animation:cp-vt-out 90ms ease-out both}
::view-transition-new(erp-main){animation:cp-vt-in 160ms ease-out both}
@keyframes cp-vt-out{to{opacity:.92}}
@keyframes cp-vt-in{from{opacity:.88;transform:translateY(3px)}to{opacity:1;transform:none}}
body[data-theme="clarity-pro"].cp-page-enter .main{animation:cp-content-in 160ms ease-out both}
@keyframes cp-content-in{from{opacity:.9;transform:translateY(3px)}to{opacity:1;transform:none}}
body[data-theme="clarity-pro"].cp-page-leaving{opacity:1!important;transform:none!important}

/* Prevent older browser effects from becoming layout requirements. */
@supports not (backdrop-filter:blur(2px)){body[data-theme="clarity-pro"] .modal,body[data-theme="clarity-pro"] .dropdown{background:#fff!important}}
@supports not (scrollbar-gutter:stable){html{overflow-y:scroll}}

/* Standalone/integrated module alignment */
body[data-theme="clarity-pro"] .mfg-top,body[data-theme="clarity-pro"] .mfg-card,body[data-theme="clarity-pro"] .ast-card,body[data-theme="clarity-pro"] .qm-card,body[data-theme="clarity-pro"] .xec-card{border-radius:8px!important;border-color:var(--cp-border)!important;box-shadow:var(--cp-shadow)!important}
body[data-theme="clarity-pro"] .mfg-tabs a.active,body[data-theme="clarity-pro"] .acct-tabs a.active{background:var(--cp-primary)!important;color:#fff!important;border-color:var(--cp-primary)!important}

@media(max-width:880px){
  body[data-theme="clarity-pro"] .layout{grid-template-columns:1fr}
  body[data-theme="clarity-pro"] .main{padding:14px 12px 56px}
  body[data-theme="clarity-pro"] .approval-card{grid-template-columns:1fr!important}
  body[data-theme="clarity-pro"] .approval-actions{justify-content:flex-start;max-width:none}
}
@media(max-width:620px){
  body[data-theme="clarity-pro"] .page-title{font-size:20px!important}
  body[data-theme="clarity-pro"] .page-desc{font-size:12.5px!important}
  body[data-theme="clarity-pro"] table tbody td{font-size:12.4px!important}
  body[data-theme="clarity-pro"] .head-actions{width:100%}
  body[data-theme="clarity-pro"] .head-actions>.btn,body[data-theme="clarity-pro"] .head-actions>form{flex:1 1 auto}
  .cp-more-actions{flex:1 1 auto}.cp-more-actions>summary{width:100%}
}
@media(prefers-reduced-motion:reduce){
  body[data-theme="clarity-pro"].cp-page-enter .main{animation:none!important}
  ::view-transition-group(*),::view-transition-old(*),::view-transition-new(*){animation:none!important}
}

/* Phase 30 — audit stabilization: approvals, HR dashboard, CEO cockpit, icon/nav smoothness */
body[data-theme="clarity-pro"]{--cp-font-body:13.6px;--cp-title:#263244;--cp-text:#4f5d6d;--cp-muted:#7c8795}
body[data-theme="clarity-pro"] .main{font-size:var(--cp-font-body)}
body[data-theme="clarity-pro"] .nav-btn{min-height:39px}
body[data-theme="clarity-pro"] .nav-icon{width:20px;min-width:20px;height:20px;display:inline-grid;place-items:center}
body[data-theme="clarity-pro"] [data-lucide]{display:inline-block;vertical-align:middle}
body[data-theme="clarity-pro"] .btn svg,body[data-theme="clarity-pro"] .nav-icon svg{flex:0 0 auto}

/* Approval Center readability and stage clarity */
body[data-theme="clarity-pro"] .approval-card{border-left:3px solid #9fd7cc!important;background:#fff!important}
body[data-theme="clarity-pro"] .approval-card[data-stage="ceo"]{border-left-color:#9e77ed!important}
body[data-theme="clarity-pro"] .approval-card .ref{background:#f2f4f7!important;color:#475467!important;border:1px solid #e4e7ec!important;padding:2px 6px;border-radius:5px}
body[data-theme="clarity-pro"] .approval-stage{font-size:10.8px!important;letter-spacing:.01em}
body[data-theme="clarity-pro"] .approval-card[data-stage="ceo"] .approval-stage{background:#f4ebff!important;color:#6941c6!important}
body[data-theme="clarity-pro"] .approval-detail{background:#f7faf9!important;color:#344054!important}
body[data-theme="clarity-pro"] .approval-actions .btn{white-space:nowrap}
body[data-theme="clarity-pro"] .async-busy{opacity:.82}

/* HR dashboard — balanced reference-like hierarchy */
body[data-theme="clarity-pro"] .cd-hr-hero{grid-template-columns:minmax(280px,.8fr) minmax(0,1.2fr)!important;gap:14px!important}
body[data-theme="clarity-pro"] .cd-hr-workforce{min-height:176px;padding:18px!important;background:linear-gradient(135deg,#ffffff 0%,#f0fbf7 100%)!important;border-color:#d5eee6!important}
body[data-theme="clarity-pro"] .cd-hr-workforce-body{display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-end;min-height:95px}
body[data-theme="clarity-pro"] .cd-hr-workforce-body>b{font-size:38px!important;line-height:1;color:#172b4d!important;letter-spacing:-.04em}
body[data-theme="clarity-pro"] .cd-hr-workforce-body>span{margin-top:10px;color:#667085!important;font-size:12.2px!important}
body[data-theme="clarity-pro"] .cd-hr-mini-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important}
body[data-theme="clarity-pro"] .cd-hr-mini{min-height:82px!important;padding:13px 14px!important;border-radius:8px!important;box-shadow:none!important}
body[data-theme="clarity-pro"] .cd-hr-mini>span{font-size:11.6px!important;font-weight:750!important;color:#52606d!important}
body[data-theme="clarity-pro"] .cd-hr-mini>b{font-size:23px!important;line-height:1.15;margin:6px 0 2px!important;color:#1f2937!important}
body[data-theme="clarity-pro"] .cd-hr-mini>small{font-size:10.8px!important;color:#7a8592!important}
body[data-theme="clarity-pro"] .cd-hr-green{background:#eefaf5!important;border-color:#d8efe4!important}
body[data-theme="clarity-pro"] .cd-hr-orange{background:#fff6eb!important;border-color:#f8e2c4!important}
body[data-theme="clarity-pro"] .cd-hr-blue{background:#eef8fd!important;border-color:#d7edf7!important}
body[data-theme="clarity-pro"] .cd-hr-purple{background:#f6f0fb!important;border-color:#e8d9f2!important}
body[data-theme="clarity-pro"] .cd-hr-middle{grid-template-columns:minmax(0,1.25fr) minmax(300px,.75fr)!important}
body[data-theme="clarity-pro"] .cd-run-payroll{background:#fff!important}
body[data-theme="clarity-pro"] .cd-payroll-action{min-height:205px;display:flex;flex-direction:column;justify-content:space-between;gap:16px}
body[data-theme="clarity-pro"] .cd-attendance-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:10px!important}
body[data-theme="clarity-pro"] .cd-attendance-grid>div{background:#fafbfc!important;border:1px solid #edf0f2!important;border-radius:8px!important;padding:12px!important}
body[data-theme="clarity-pro"] .cd-attendance-grid b{font-size:23px!important;color:#243244!important}
body[data-theme="clarity-pro"] .cd-list-table>div{min-height:58px!important}

/* CEO Cockpit — less noisy, reference-aligned executive hierarchy */
body[data-theme="clarity-pro"] .xec-shell{max-width:1560px!important;padding:18px!important;background:#f6f7f9}
body[data-theme="clarity-pro"] .xec-hero{background:#fff!important;color:#263244!important;border:1px solid #e4e8ed!important;border-radius:9px!important;box-shadow:none!important;padding:18px 20px!important}
body[data-theme="clarity-pro"] .xec-hero:after{display:none!important}
body[data-theme="clarity-pro"] .xec-kicker{color:#0f766e!important;font-size:10.8px!important;letter-spacing:.09em!important}
body[data-theme="clarity-pro"] .xec-title{font-size:29px!important;color:#223047!important;margin:3px 0 5px!important}
body[data-theme="clarity-pro"] .xec-sub{color:#718096!important;font-size:12.5px!important;line-height:1.5!important}
body[data-theme="clarity-pro"] .xec-actions a,body[data-theme="clarity-pro"] .xec-actions button{background:#fff!important;color:#445160!important;border:1px solid #dfe4e9!important;border-radius:7px!important;box-shadow:none!important;min-height:34px;padding:7px 10px!important}
body[data-theme="clarity-pro"] .xec-actions a:hover,body[data-theme="clarity-pro"] .xec-actions button:hover{background:#f3f9f7!important;color:#0f766e!important;border-color:#bcded6!important}
body[data-theme="clarity-pro"] .xec-periods{margin-top:11px!important}
body[data-theme="clarity-pro"] .xec-periods a{background:#f8fafb!important;color:#607080!important;border:1px solid #e5e9ed!important;border-radius:6px!important;padding:6px 9px!important}
body[data-theme="clarity-pro"] .xec-periods a.active{background:#0f766e!important;color:#fff!important;border-color:#0f766e!important}
body[data-theme="clarity-pro"] .xec-signal{background:#f8fafb!important;border:1px solid #e5e9ed!important;color:#445160!important;border-radius:7px!important;padding:7px 10px!important}
body[data-theme="clarity-pro"] .xec-signal strong{font-size:18px!important;color:#263244!important}
body[data-theme="clarity-pro"] .xec-grid{gap:12px!important;margin-top:12px!important}
body[data-theme="clarity-pro"] .xec-primary-kpis{grid-template-columns:repeat(4,minmax(0,1fr))!important}
body[data-theme="clarity-pro"] .xec-secondary-kpis{grid-template-columns:repeat(4,minmax(0,1fr))!important}
body[data-theme="clarity-pro"] .xec-kpi{padding:14px!important}
body[data-theme="clarity-pro"] .xec-kpi-primary{min-height:142px!important}
body[data-theme="clarity-pro"] .xec-kpi-compact{min-height:116px!important}
body[data-theme="clarity-pro"] .xec-kpi-label{font-size:10.8px!important;text-transform:none!important;letter-spacing:0!important;color:#667085!important}
body[data-theme="clarity-pro"] .xec-kpi-value{font-size:24px!important;margin-top:8px!important;color:#263244!important}
body[data-theme="clarity-pro"] .xec-kpi-note{font-size:10.8px!important;color:#84909d!important}
body[data-theme="clarity-pro"] .xec-kpi-icon{width:36px!important;height:36px!important;border-radius:8px!important}
body[data-theme="clarity-pro"] .xec-tone-green .xec-kpi-icon{background:#e8f7f0!important;color:#047857!important}
body[data-theme="clarity-pro"] .xec-tone-violet .xec-kpi-icon{background:#f3ebf7!important;color:#6a1b9a!important}
body[data-theme="clarity-pro"] .xec-tone-blue .xec-kpi-icon{background:#e9f6fc!important;color:#087ea9!important}
body[data-theme="clarity-pro"] .xec-tone-orange .xec-kpi-icon{background:#fff1df!important;color:#b35c00!important}
body[data-theme="clarity-pro"] .xec-section{margin-top:15px!important}
body[data-theme="clarity-pro"] .xec-section-title h3{font-size:16px!important;color:#263244!important}
body[data-theme="clarity-pro"] .xec-section-title p{font-size:11.5px!important}
body[data-theme="clarity-pro"] .xec-chart{min-height:310px!important}
body[data-theme="clarity-pro"] .xec-alert:hover{transform:none!important;box-shadow:none!important;background:#fafcfc!important}

@media(max-width:1100px){
 body[data-theme="clarity-pro"] .xec-primary-kpis,body[data-theme="clarity-pro"] .xec-secondary-kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 body[data-theme="clarity-pro"] .cd-hr-hero{grid-template-columns:1fr!important}
}
@media(max-width:720px){
 body[data-theme="clarity-pro"] .cd-hr-mini-grid{grid-template-columns:1fr 1fr!important}
 body[data-theme="clarity-pro"] .cd-attendance-grid{grid-template-columns:1fr 1fr!important}
 body[data-theme="clarity-pro"] .xec-primary-kpis,body[data-theme="clarity-pro"] .xec-secondary-kpis{grid-template-columns:1fr!important}
}

/* ==========================================================================\n   Phase 31 — dashboard polish, repaired Settings, account brands and History Wave\n   ========================================================================== */
body[data-theme="clarity-pro"] .cd-dashboard-company .cd-welcome-gradient{
  position:relative;overflow:hidden;border:0!important;border-radius:14px!important;
  padding:20px 22px!important;color:#fff!important;
  background:linear-gradient(118deg,#123d75 0%,#1767a8 48%,#1a8fb4 100%)!important;
  box-shadow:0 10px 26px rgba(21,79,132,.15)!important;
}
body[data-theme="clarity-pro"] .cd-dashboard-company .cd-welcome-gradient:before,
body[data-theme="clarity-pro"] .cd-dashboard-company .cd-welcome-gradient:after{content:"";position:absolute;border-radius:999px;pointer-events:none}
body[data-theme="clarity-pro"] .cd-dashboard-company .cd-welcome-gradient:before{width:210px;height:210px;right:-55px;top:-112px;background:rgba(255,255,255,.12)}
body[data-theme="clarity-pro"] .cd-dashboard-company .cd-welcome-gradient:after{width:150px;height:150px;right:95px;bottom:-115px;background:rgba(78,210,224,.18)}
body[data-theme="clarity-pro"] .cd-dashboard-company .cd-welcome-gradient>div{position:relative;z-index:1}
body[data-theme="clarity-pro"] .cd-dashboard-company .cd-welcome-gradient span,
body[data-theme="clarity-pro"] .cd-dashboard-company .cd-welcome-gradient h3,
body[data-theme="clarity-pro"] .cd-dashboard-company .cd-welcome-gradient p{color:#fff!important}
body[data-theme="clarity-pro"] .cd-dashboard-company .cd-welcome-gradient span{opacity:.86}
body[data-theme="clarity-pro"] .cd-dashboard-company .cd-welcome-gradient p{opacity:.82}
body[data-theme="clarity-pro"] .cd-dashboard-company .cd-welcome-gradient .cd-welcome-badge{background:rgba(255,255,255,.16)!important;border:1px solid rgba(255,255,255,.24);backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px)}
@supports not (backdrop-filter:blur(4px)){body[data-theme="clarity-pro"] .cd-dashboard-company .cd-welcome-gradient .cd-welcome-badge{background:#2f74a8!important}}

/* Settings: never allow long OAuth/SMTP content to break the two-column shell. */
body[data-theme="clarity-pro"].page-settings .settings-layout{grid-template-columns:minmax(190px,220px) minmax(0,1fr)!important;align-items:start}
body[data-theme="clarity-pro"].page-settings .settings-layout>div,
body[data-theme="clarity-pro"].page-settings .settings-section,
body[data-theme="clarity-pro"].page-settings .section-box,
body[data-theme="clarity-pro"].page-settings .form-group{min-width:0}
body[data-theme="clarity-pro"].page-settings .settings-section{overflow:hidden}
body[data-theme="clarity-pro"].page-settings .settings-section .form-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:13px 14px}
body[data-theme="clarity-pro"].page-settings .settings-section input,
body[data-theme="clarity-pro"].page-settings .settings-section select,
body[data-theme="clarity-pro"].page-settings .settings-section textarea{max-width:100%;min-width:0}
body[data-theme="clarity-pro"].page-settings .email-integration-box{background:#fbfcfe;border-color:#dfe7ef;padding:15px!important}
body[data-theme="clarity-pro"].page-settings .email-provider-panel{border:1px solid #e2e8ef;border-radius:12px;background:#fff;padding:14px;overflow:hidden}
body[data-theme="clarity-pro"].page-settings .email-provider-panel .assist{margin:9px 0 13px}
body[data-theme="clarity-pro"].page-settings .email-provider-panel .ref{font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body[data-theme="clarity-pro"].page-settings .email-integration-box .toggle-row{gap:8px!important}
body[data-theme="clarity-pro"].page-settings .email-integration-box .toggle-row>label{border:1px solid #dde5ea;background:#fff;border-radius:9px;padding:9px 11px!important;min-width:126px}
body[data-theme="clarity-pro"].page-settings .email-integration-box .toggle-row input{accent-color:#0f766e}
@media(max-width:1120px){body[data-theme="clarity-pro"].page-settings .settings-section .form-grid{grid-template-columns:1fr!important}.form-span2{grid-column:auto!important}}
@media(max-width:900px){body[data-theme="clarity-pro"].page-settings .settings-layout{grid-template-columns:1fr!important}.settings-nav{position:static!important}}

/* Accounts: lighter reference-style balance surfaces instead of heavy saturated slabs. */
body[data-theme="clarity-pro"].page-accounts .bc-grid{gap:12px!important}
body[data-theme="clarity-pro"].page-accounts .balance-card{--bc-tone:#0f766e;background:linear-gradient(145deg,#fff 0%,#f0faf7 100%)!important;border:1px solid #dbe8e5!important;color:#263244!important;border-radius:12px!important;min-height:122px!important;padding:16px 17px!important;box-shadow:0 3px 11px rgba(31,54,76,.045)!important}
body[data-theme="clarity-pro"].page-accounts .balance-card:before{background:linear-gradient(90deg,var(--bc-tone),var(--bc-tone))!important;width:4px!important;right:auto!important;opacity:1!important}
body[data-theme="clarity-pro"].page-accounts .balance-card:after{width:86px;height:86px;right:-25px;bottom:-32px;background:color-mix(in srgb,var(--bc-tone) 7%,transparent)!important}
body[data-theme="clarity-pro"].page-accounts .balance-card .bc-chip{background:#fff!important;color:var(--bc-tone)!important;border:1px solid color-mix(in srgb,var(--bc-tone) 22%,#e6e9ed)!important;width:35px;height:29px}
body[data-theme="clarity-pro"].page-accounts .balance-card .bc-icon{background:color-mix(in srgb,var(--bc-tone) 11%,#fff)!important;color:var(--bc-tone)!important}
body[data-theme="clarity-pro"].page-accounts .balance-card .bc-label{color:#667085!important;opacity:1!important}
body[data-theme="clarity-pro"].page-accounts .balance-card .bc-amount{color:#1f2a37!important;font-size:22px!important}
body[data-theme="clarity-pro"].page-accounts .balance-card .bc-sub{color:#7c8796!important;opacity:1!important}
body[data-theme="clarity-pro"].page-accounts .bc-cash{--bc-tone:#059669!important;background:linear-gradient(145deg,#fff,#eefaf5)!important}
body[data-theme="clarity-pro"].page-accounts .bc-bank{--bc-tone:#0ea5e9!important;background:linear-gradient(145deg,#fff,#eef8fd)!important}
body[data-theme="clarity-pro"].page-accounts .bc-mobile{--bc-tone:#6a1b9a!important;background:linear-gradient(145deg,#fff,#f8f1fb)!important}
body[data-theme="clarity-pro"].page-accounts .bc-default{--bc-tone:#e65100!important;background:linear-gradient(145deg,#fff,#fff4ed)!important}
@supports not (background:color-mix(in srgb,#000 10%,#fff)){body[data-theme="clarity-pro"].page-accounts .balance-card:after{background:rgba(15,118,110,.06)!important}body[data-theme="clarity-pro"].page-accounts .balance-card .bc-icon{background:#eef5f4!important}body[data-theme="clarity-pro"].page-accounts .balance-card .bc-chip{border-color:#d9e2e5!important}}

/* Smart Bangladesh account/bank identity. */
.account-brand-preview{display:flex;align-items:center;gap:12px;border:1px solid #dfe7eb;border-radius:12px;background:linear-gradient(135deg,#fbfdfd,#f7f9ff);padding:12px 13px;margin-bottom:13px}
.account-brand-preview b{display:block;color:#263244}.account-brand-preview small{display:block;margin-top:3px;color:#758193;line-height:1.35}
.account-brand-badge{--brand:#64748b;display:inline-grid;place-items:center;flex:0 0 auto;width:30px;height:30px;border-radius:9px;background:var(--brand);color:#fff!important;font-size:9px;font-weight:850;letter-spacing:-.02em;box-shadow:inset 0 0 0 1px rgba(255,255,255,.16)}
.account-brand-badge.is-lg{width:43px;height:43px;border-radius:12px;font-size:12px}
.account-cell{display:flex;align-items:center;gap:9px;min-width:0}.account-cell .cell-title{min-width:0}
.brand-bkash{--brand:#d81b60}.brand-nagad{--brand:#f97316}.brand-rocket{--brand:#6d28d9}.brand-dbbl{--brand:#16835b}.brand-brac{--brand:#2563eb}.brand-city{--brand:#dc2626}.brand-ebl{--brand:#0f5fa8}.brand-ibbl{--brand:#0f8a55}.brand-sonali{--brand:#6f8f25}.brand-prime{--brand:#7c3aed}.brand-asia{--brand:#0e7490}.brand-cash{--brand:#059669}.brand-bank{--brand:#0ea5e9}.brand-default{--brand:#64748b}

/* Reusable profile/history wave graph. */
.erp-history-wave-card{overflow:hidden}.erp-history-wave-card .card-head{align-items:flex-start}.history-wave-chip{display:inline-flex;align-items:center;border:1px solid #dde6ea;background:#f8fafb;color:#667085;border-radius:999px;padding:5px 9px;font-size:10px;font-weight:750;white-space:nowrap}
.erp-history-wave{height:255px;padding:3px 14px 10px}.erp-history-wave canvas{width:100%!important;height:100%!important}
@media(max-width:720px){.erp-history-wave{height:225px;padding-inline:7px}.history-wave-chip{display:none}}


/* Phase 32 — Monthly Attendance circular status language. */
body[data-theme="clarity-pro"] .att-grid th,body[data-theme="clarity-pro"] .att-grid td{background:#fff!important;border-color:#edf0f2!important}
body[data-theme="clarity-pro"] .att-grid th{background:#f8fafb!important;color:#667085!important}
body[data-theme="clarity-pro"] .att-cell{height:40px!important;min-width:36px!important;width:36px!important;padding:3px!important}
body[data-theme="clarity-pro"] .att-status-dot{display:inline-grid;place-items:center;width:28px;height:28px;border-radius:999px;font-size:10.5px;font-weight:850;line-height:1;border:1px solid transparent;box-shadow:inset 0 0 0 1px rgba(255,255,255,.35)}
body[data-theme="clarity-pro"] .att-status-dot.att-cell-present{background:#dcfce7!important;color:#15803d!important;border-color:#bbf7d0!important}
body[data-theme="clarity-pro"] .att-status-dot.att-cell-late{background:#fef3c7!important;color:#b45309!important;border-color:#fde68a!important}
body[data-theme="clarity-pro"] .att-status-dot.att-cell-absent{background:#fee2e2!important;color:#b91c1c!important;border-color:#fecaca!important}
body[data-theme="clarity-pro"] .att-status-dot.att-cell-half{background:#dbeafe!important;color:#1d4ed8!important;border-color:#bfdbfe!important}
body[data-theme="clarity-pro"] .att-status-dot.att-cell-leave{background:#ede9fe!important;color:#6d28d9!important;border-color:#ddd6fe!important}
body[data-theme="clarity-pro"] .att-status-dot.att-cell-blank{background:#f3f4f6!important;color:#9ca3af!important;border-color:#e5e7eb!important}
body[data-theme="clarity-pro"] .att-month-legend{display:flex;flex-wrap:wrap;gap:8px 14px;margin-top:10px}
body[data-theme="clarity-pro"] .att-month-legend>span{display:inline-flex;align-items:center;gap:6px;color:#667085;font-size:11px;font-weight:650}
body[data-theme="clarity-pro"] .att-month-legend .att-status-dot{width:22px;height:22px;font-size:8.5px}
@media(max-width:760px){body[data-theme="clarity-pro"] .att-month-legend{gap:7px 10px}body[data-theme="clarity-pro"] .att-grid-name{min-width:132px!important}}
