/* Koorooz Clarity UI 1.0.2 — quiet, task-oriented workspace. */
:root{--clarity-bg:#faf9f6;--clarity-surface:#fff;--clarity-ink:#172337;--clarity-muted:#5f6b78;--clarity-line:#e8e7e2;--clarity-soft:#f2f0e9;--clarity-gold:#a77a36;--clarity-radius:11px}
body.ux2{background:var(--clarity-bg);color:var(--clarity-ink);font-size:15px}
body.ux2 .app-main{background:var(--clarity-bg)}
body.ux2 small{font-size:.75rem!important}
body.ux2 .page-wrap{max-width:1460px;padding:28px clamp(20px,3vw,44px) 72px}
body.ux2 .page-wrap:has(.task-workspace-page){max-width:1720px;padding-inline:clamp(16px,2vw,30px)}

/* Navigation: fewer layers, less chrome. */
body.ux2 .ux-sidebar{--sidebar-w:214px!important;width:214px!important;min-width:214px!important;background:#142238!important}
body.ux2 .ux-sidebar-scroll{padding:22px 11px 18px!important}
body.ux2 .ux-brand{padding:0 8px 16px!important}
body.ux2 .ux-brand img{width:34px!important;height:34px!important}
body.ux2 .ux-brand small{font-size:.76rem!important;color:#aeb9c8!important}
body.ux2 .ux-organization{margin-bottom:14px!important;padding:8px 10px!important;border-radius:8px!important;background:transparent!important;border:1px solid rgba(255,255,255,.08)!important}
body.ux2 .ux-organization small{display:none}
body.ux2 .ux-organization strong{font-size:.8rem!important;font-weight:700!important}
body.ux2 .ux-nav{gap:2px!important}
body.ux2 .ux-nav-item{min-height:40px!important;padding:0 10px!important;border-radius:8px!important;font-size:.84rem!important;gap:9px!important}
body.ux2 .ux-nav-icon{width:18px!important;flex-basis:18px!important;font-size:1rem!important}
body.ux2 .ux-nav-secondary{padding-top:10px!important;margin-top:9px!important;gap:2px!important}
body.ux2 .ux-nav-caption{display:none!important}
body.ux2 .ux-nav-item kbd{display:none!important}
body.ux2 .ux-extra{margin-top:15px!important;padding-top:10px!important}
body.ux2 .ux-extra>summary{font-size:.78rem!important;padding:7px 9px!important}
body.ux2 .ux-extra-links{padding:4px 2px!important}
body.ux2 .ux-extra-links a{font-size:.79rem!important;padding:7px 9px!important}
body.ux2 .platform-sidebar-link{margin:8px 3px!important;padding:8px!important;border-radius:7px!important;font-size:.75rem!important}
body.ux2 .ux-account{padding:10px 11px!important}
body.ux2 .ux-avatar{width:34px!important;height:34px!important;flex-basis:34px!important}
body.ux2 .ux-profile strong{font-size:.8rem!important}
body.ux2 .ux-exit{font-size:.75rem!important;padding:6px 0!important}

/* Topbar: search belongs here, not duplicated in the sidebar. */
body.ux2 .ux-topbar{height:60px!important;padding:0 clamp(16px,2.4vw,32px)!important;background:rgba(250,249,246,.94)!important;border-bottom:1px solid var(--clarity-line)!important;backdrop-filter:blur(14px)}
body.ux2 .ux-topbar-label small{display:none}
body.ux2 .topbar-search-trigger{min-width:180px!important;height:36px!important;border-radius:8px!important;background:#fff!important}
body.ux2 .ux-bell{width:36px!important;height:36px!important;border-radius:8px!important;background:#fff!important}
body.ux2 .ux-top-avatar{width:34px!important;height:34px!important;flex-basis:34px!important}

/* Typography hierarchy: quieter copy, stronger titles. */
body.ux2 .ux-overline{display:none!important}
body.ux2 .ux-page-head,body.ux2 .ux-home-head{margin-bottom:20px!important;gap:14px!important}
body.ux2 .ux-page-head h1,body.ux2 .ux-home-head h1{font-size:clamp(1.55rem,1.6vw,1.95rem)!important;line-height:1.38!important;letter-spacing:-.025em!important;margin-bottom:5px!important}
body.ux2 .ux-page-head p,body.ux2 .ux-home-head p{font-size:.84rem!important;line-height:1.75!important;color:var(--clarity-muted)!important}
body.ux2 .ux-panel-head h2{font-size:.95rem!important}
body.ux2 .ux-panel-head p{font-size:.77rem!important}
body.ux2 .ux-button,body.ux2 .btn{min-height:39px!important;border-radius:8px!important;padding-inline:13px!important;font-size:.8rem!important;box-shadow:none!important}
body.ux2 .ux-button-main,body.ux2 .btn-primary{background:#172337!important}
body.ux2 .ux-button-main:hover,body.ux2 .btn-primary:hover{background:#263850!important;transform:none!important}

/* The dashboard becomes an editorial workspace instead of a pile of cards. */
body.ux2 .role-dashboard .ux-overview{display:grid!important;grid-template-columns:minmax(0,1.7fr) repeat(2,minmax(150px,.55fr))!important;gap:0!important;margin:0 0 22px!important;border-block:1px solid var(--clarity-line);background:transparent}
body.ux2 .role-dashboard .ux-progress-feature,body.ux2 .role-dashboard .ux-mini-stat{min-height:118px!important;border:0!important;border-radius:0!important;background:transparent!important;padding:18px 20px!important;color:var(--clarity-ink)!important}
body.ux2 .role-dashboard .ux-progress-feature{border-inline-end:1px solid var(--clarity-line)!important}
body.ux2 .role-dashboard .ux-mini-stat+ .ux-mini-stat{border-inline-start:1px solid var(--clarity-line)!important}
body.ux2 .role-dashboard .ux-progress-copy>span,body.ux2 .role-dashboard .ux-progress-copy p{color:var(--clarity-muted)!important}
body.ux2 .role-dashboard .ux-progress-copy>strong{font-size:2.25rem!important;color:var(--clarity-ink)!important}
body.ux2 .role-dashboard .ux-progress-copy>strong small{color:var(--clarity-gold)!important}
body.ux2 .role-dashboard .ux-circle{display:none!important}
body.ux2 .role-dashboard .ux-mini-stat .ux-stat-symbol{display:none!important}
body.ux2 .role-dashboard .ux-mini-stat>strong{font-size:1.65rem!important;color:var(--clarity-ink)!important}
body.ux2 .role-dashboard .ux-mini-stat>span:last-child{font-size:.78rem!important}
body.ux2 .role-dashboard .health-grid{gap:0!important;margin:0 0 22px!important;border-block:1px solid var(--clarity-line)}
body.ux2 .role-dashboard .health-card{border:0!important;border-radius:0!important;background:transparent!important;padding:16px 20px!important}
body.ux2 .role-dashboard .health-card+.health-card{border-inline-start:1px solid var(--clarity-line)!important}
body.ux2 .role-dashboard .health-row{border-bottom:0!important;min-height:31px!important}
body.ux2 .role-dashboard .ux-home-grid{gap:28px!important}
body.ux2 .role-dashboard .dashboard-stack{gap:0!important}
body.ux2 .role-dashboard .dashboard-stack>.ux-panel{border:0!important;border-radius:0!important;background:transparent!important;padding:20px 0!important;border-top:1px solid var(--clarity-line)!important}
body.ux2 .role-dashboard .dashboard-stack>.ux-panel:first-child{border-top:0!important;padding-top:0!important}
body.ux2 .role-dashboard .ux-panel-head{margin-bottom:11px!important}
body.ux2 .role-dashboard .ux-todo,body.ux2 .role-dashboard .ux-goal-compact,body.ux2 .role-dashboard .dashboard-list-row{padding-block:9px!important}
body.ux2 .role-dashboard .ux-attention-item{border:0!important;border-bottom:1px solid #ecebe6!important;border-radius:0!important;padding:10px 0!important;background:transparent!important}
body.ux2 .role-dashboard .ux-more{border-top:1px solid var(--clarity-line)!important;margin-top:18px!important}

/* Employee metrics: one calm strip instead of four detached cards. */
body.ux2 .employee-summary-grid{gap:0!important;border-block:1px solid var(--clarity-line);margin-bottom:22px!important}
body.ux2 .employee-summary{min-height:108px!important;border:0!important;border-radius:0!important;background:transparent!important;padding:16px 18px!important}
body.ux2 .employee-summary+.employee-summary{border-inline-start:1px solid var(--clarity-line)!important}
body.ux2 .employee-summary.primary,body.ux2 .employee-summary.danger{background:transparent!important}
body.ux2 .employee-summary.primary>span,body.ux2 .employee-summary.primary>small,body.ux2 .employee-summary.danger>span,body.ux2 .employee-summary.danger>small{color:var(--clarity-muted)!important}
body.ux2 .employee-summary.primary>strong{color:var(--clarity-ink)!important}
body.ux2 .employee-summary.danger>strong{color:#a64e48!important}

/* Panels outside dashboards stay clear but visually lighter. */
body.ux2 .ux-panel{border-color:var(--clarity-line)!important;border-radius:var(--clarity-radius)!important;box-shadow:none!important}
body.ux2 .mywork-tabs{border:0!important;border-bottom:1px solid var(--clarity-line)!important;border-radius:0!important;background:transparent!important;padding:0!important;gap:18px!important}
body.ux2 .mywork-tab{border-radius:0!important;background:transparent!important;padding-inline:0!important;min-height:42px!important;border-bottom:2px solid transparent!important}
body.ux2 .mywork-tab.is-active{background:transparent!important;color:#172337!important;border-bottom-color:#172337!important}
body.ux2 .mywork-filter-panel{border:0!important;border-bottom:1px solid var(--clarity-line)!important;border-radius:0!important;background:transparent!important}
body.ux2 .mywork-main,body.ux2 .mywork-side{box-shadow:none!important}

/* Inline check-in replaces repeated modal dialogs. */
body.ux2 .inline-checkin{margin-top:10px;border-top:1px solid #ecebe6}
body.ux2 .inline-checkin>summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:38px;cursor:pointer;color:#775a29;font-size:.76rem;font-weight:800}
body.ux2 .inline-checkin>summary::-webkit-details-marker{display:none}
body.ux2 .inline-checkin>summary:after{content:"+";margin-right:auto;color:#9a7a43;font-size:1rem;font-weight:500}
body.ux2 .inline-checkin[open]>summary:after{content:"−"}
body.ux2 .inline-checkin>summary small{color:#9aa1a8;font-size:.75rem;font-weight:600}
body.ux2 .inline-checkin-form{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,128px),1fr));gap:9px;padding:10px 0 4px}
body.ux2 .inline-checkin-form label{display:grid;gap:5px;color:#6f7883;font-size:.75rem}
body.ux2 .inline-checkin-form .form-input{min-height:39px!important;border-radius:8px!important;font-size:.8rem!important;padding:7px 9px!important;background:#fff!important}
body.ux2 .inline-checkin-note{grid-column:1/-1}
body.ux2 .inline-checkin-note textarea{min-height:62px!important}
body.ux2 .inline-checkin-more{grid-column:1/-1;border-top:1px dashed #e6e4dd;padding-top:5px}
body.ux2 .inline-checkin-more>summary{cursor:pointer;color:#858e97;font-size:.75rem}
body.ux2 .inline-checkin-more>div{display:grid;grid-template-columns:1fr 1fr;gap:9px;padding-top:8px}
body.ux2 .inline-checkin-actions{grid-column:1/-1;display:flex;justify-content:flex-start}
body.ux2 .tree-inline-checkin{margin-top:8px}

/* Goal detail side panel is contextual, not a blocking popup. */
body.ux2 .goal-tree-drawer-backdrop{display:none!important}
body.ux2 .goal-tree-drawer{box-shadow:-1px 0 0 var(--clarity-line),-8px 0 30px rgba(20,34,52,.06)!important;width:min(390px,92vw)!important}
html.goal-tree-drawer-open{overflow:auto!important}

/* Command palette is the only deliberate global overlay; keep it light. */
.command-palette-backdrop{background:rgba(20,30,42,.22)!important;backdrop-filter:blur(2px)!important}
.command-palette-dialog{border-radius:13px!important;box-shadow:0 22px 60px rgba(17,30,48,.16)!important;border-color:#e9e8e3!important}
.command-palette-search{height:60px!important}

/* Forms need breathing room, not oversized chrome. */
body.ux2 :is(.simple-form-card,.form-stack,.dialog-form) {box-shadow:none!important}
body.ux2 :is(.form-input,.simple-form-card input,.simple-form-card select,.simple-form-card textarea,.form-stack input,.form-stack select,.form-stack textarea){min-height:41px!important;border-radius:8px!important;font-size:.83rem!important}

@media(max-width:980px){body.ux2 .ux-sidebar{width:214px!important;min-width:214px!important}body.ux2 .role-dashboard .ux-home-grid{gap:18px!important}}
@media(max-width:760px){
  body.ux2 .page-wrap{padding:22px 14px 58px!important}
  body.ux2 .role-dashboard .ux-overview{grid-template-columns:1fr 1fr!important}.role-dashboard .ux-progress-feature{grid-column:1/-1!important;border-inline-end:0!important;border-bottom:1px solid var(--clarity-line)!important}
  body.ux2 .role-dashboard .health-grid{grid-template-columns:1fr!important}.role-dashboard .health-card+.health-card{border-inline-start:0!important;border-top:1px solid var(--clarity-line)!important}
  body.ux2 .employee-summary-grid{grid-template-columns:1fr 1fr!important}.employee-summary:nth-child(odd){border-inline-start:0!important}.employee-summary:nth-child(n+3){border-top:1px solid var(--clarity-line)!important}
  body.ux2 .inline-checkin-form{grid-template-columns:1fr 1fr}.inline-checkin-note{grid-column:1/-1!important}
}
@media(max-width:520px){body.ux2 .topbar-search-trigger{min-width:36px!important}.topbar-search-trigger span,.topbar-search-trigger kbd{display:none!important}body.ux2 .employee-summary-grid{grid-template-columns:1fr!important}.employee-summary{border-inline-start:0!important;border-top:1px solid var(--clarity-line)!important}.employee-summary:first-child{border-top:0!important}body.ux2 .inline-checkin-form{grid-template-columns:1fr}.inline-checkin-note,.inline-checkin-more,.inline-checkin-actions{grid-column:auto!important}.inline-checkin-more>div{grid-template-columns:1fr}}

/* Form validation feedback (1.0.4): a rejected save must be obvious. */
.form-error-summary{display:grid;gap:6px;margin:0 0 16px;padding:12px 14px;border:1px solid #efc4c4;border-inline-start:4px solid #c2453a;border-radius:12px;background:#fff6f5;color:#8d3a3a;outline:none}
.form-error-summary strong{font-size:.86rem;font-weight:800}
.form-error-summary ul{margin:0;padding-inline-start:18px;display:grid;gap:3px;font-size:.8rem;line-height:1.8}
.form-error-summary a{color:#8d3a3a;font-weight:700;text-decoration:underline}
body.ux2 .errorlist{color:#b23b31;font-size:.8rem;font-weight:600}
body.ux2 form .is-invalid:not(.k-select),body.ux2 form .is-invalid:not(.k-select):focus,body.ux2 form .k-select.is-invalid .k-select-trigger{border-color:#c2453a!important;box-shadow:0 0 0 3px rgba(194,69,58,.14)!important}

/* Reports navigation (1.0.4): "needs attention" lives under Reports. */
body.ux2 .ux-nav-subitem{display:flex;align-items:center;min-height:32px;margin:-2px 0 2px;padding:0 10px;padding-inline-start:42px;border-radius:8px;color:#9fb0c4;font-size:.78rem;font-weight:600;text-decoration:none}
body.ux2 .ux-nav-subitem:hover{color:#fff;background:#1d304b}
body.ux2 .ux-nav-subitem.is-current{color:#fff;font-weight:800}
.report-tabs{display:flex;gap:4px;margin:0 0 18px;border-bottom:1px solid #e3e8ef;overflow-x:auto}
.report-tab{padding:9px 14px;border-bottom:2px solid transparent;margin-bottom:-1px;color:#5f6f84;font-size:.84rem;font-weight:700;text-decoration:none;white-space:nowrap}
.report-tab:hover{color:#1d3557}
.report-tab.is-active{color:#10213b;border-bottom-color:#1d3557}

/* Plan capacity (1.0.4): show "X of Y" before a limit blocks an action. */
.plan-quotas{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:10px;margin:0 0 16px}
.plan-quota{display:grid;gap:4px;padding:11px 14px;border:1px solid #e3e8ef;border-radius:12px;background:#fff}
.plan-quota>span{font-size:.75rem;color:#6f7d91}
.plan-quota strong{font-size:.88rem;color:#10213b}
.plan-quota progress{width:100%;height:6px;accent-color:#1d3557}
.plan-quota.is-full{border-color:#efc4c4;background:#fff8f7}
.plan-quota.is-full progress{accent-color:#c2453a}
.plan-quota-alert{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;margin:0 0 16px;padding:12px 14px;border:1px solid #f0dfb8;border-radius:12px;background:#fff9ed;color:#76551f;font-size:.82rem;line-height:1.8}
.plan-quota-alert strong{font-weight:800}
.btn[disabled]{opacity:.55;cursor:not-allowed}

/* User activity log (1.0.4) */
.activity-filter{margin:0 0 16px;max-width:none}
.activity-filter-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:10px}
.activity-filter-grid label{display:grid;gap:5px;font-size:.78rem;font-weight:700;color:#55657a}
.activity-filter-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:10px;margin-top:12px}
.activity-filter-actions .checkbox-line{margin-inline-end:auto;font-size:.8rem}
.activity-log{display:grid;gap:0;background:#fff;border:1px solid #e3e8ef;border-radius:14px;overflow:hidden}
.activity-count{padding:10px 14px;font-size:.78rem;color:#6f7d91;border-bottom:1px solid #edf0f3}
.activity-row{display:grid;grid-template-columns:150px minmax(0,1fr) auto;gap:12px;padding:12px 14px;border-bottom:1px solid #f0f2f5}
.activity-row:last-of-type{border-bottom:0}
.activity-when{font-size:.78rem;color:#6f7d91;white-space:nowrap}
.activity-main{display:grid;gap:2px;min-width:0}
.activity-main strong{font-size:.86rem;color:#10213b}
.activity-main span,.activity-main small{font-size:.78rem;color:#5f6f84}
.activity-changes{margin:6px 0 0;padding-inline-start:16px;font-size:.78rem;color:#3d4e63;display:grid;gap:2px}
.activity-old{color:#9a4a42;text-decoration:line-through;text-decoration-color:rgba(154,74,66,.4)}
.activity-new{color:#2f7d63}
.activity-meta{font-size:.75rem;color:#8b96a5}
@media(max-width:640px){.activity-row{grid-template-columns:1fr}.activity-meta{display:none}}

/* Offboarding / responsibility transfer (1.0.4) */
.page-actions{display:flex;flex-wrap:wrap;gap:8px}
.offboard-steps{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 16px;padding:0;list-style:none;counter-reset:step}
.offboard-steps li{counter-increment:step;padding:5px 10px;border-radius:999px;background:#f2f5f8;color:#6f7d91;font-size:.75rem;font-weight:700}
.offboard-steps li::before{content:counter(step, persian) ". "}
.offboard-steps li.is-done{background:#eaf1fa;color:#1d3557}
.offboard-preview{margin-top:14px;padding-top:14px;border-top:1px dashed #e2e7ed}
.offboard-groups{display:grid;gap:8px;margin:10px 0 0;padding:0;list-style:none}
.offboard-groups>li{padding:10px 12px;border:1px solid #e3e8ef;border-radius:12px}
.offboard-groups>li.has-conflict{border-color:#efc4c4;background:#fff8f7}
.offboard-count{margin-inline-start:auto;font-size:.78rem;color:#6f7d91}
.offboard-conflicts{margin:6px 0 0;padding-inline-start:18px;font-size:.78rem;color:#8d3a3a;line-height:1.8}
.ownership-history{margin:6px 0 0;padding:0;list-style:none;font-size:.75rem;color:#6f7d91;line-height:1.8}
.ownership-history li::before{content:"⇄ ";color:#b99145}
@media (max-width: 720px) {
  body.ux2 .simple-table { overflow-x: visible; }
  body.ux2 .simple-table-head,
  body.ux2 .simple-table-row { min-width: 0 !important; grid-template-columns: 1fr !important; }
  body.ux2 .simple-table-head { display: none; }
  body.ux2 .simple-table-row small { display: block; margin-top: 2px; }
  body.ux2 .team-task-who { display: grid; gap: 2px; }
}
