/*
 * Koorooz UI/UX refinement 1.0.1
 * Loaded last on purpose: establishes a readable, calm SaaS baseline without
 * rewriting individual feature styles or changing backend behavior.
 */
:root{
  --ux3-bg:#f6f7f8;
  --ux3-surface:#fff;
  --ux3-surface-soft:#fafbfc;
  --ux3-text:#1f2c3d;
  --ux3-muted:#6f7c8d;
  --ux3-border:#e3e7eb;
  --ux3-border-strong:#d5dbe2;
  --ux3-navy:#10223c;
  --ux3-gold:#a47b39;
  --ux3-gold-soft:#f7f0e3;
  --ux3-danger:#b34e45;
  --ux3-radius:14px;
  --ux3-shadow:0 1px 2px rgba(16,34,60,.025),0 10px 28px rgba(16,34,60,.035);
}

html{font-size:16px}
body.ux2{
  background:var(--ux3-bg);
  color:var(--ux3-text);
  font-size:15px;
  line-height:1.72;
  text-rendering:optimizeLegibility;
}
body.ux2 *{letter-spacing:0}
body.ux2 :is(p,li,td,th,label,input,select,textarea,button,a){line-height:1.65}
body.ux2 small{font-size:.78rem!important;line-height:1.65!important}
body.ux2 :is(input,select,textarea,button){font-size:.875rem}

/* Calm shell: smaller chrome, more usable content area. */
body.ux2 .ux-sidebar{--sidebar-w:228px!important;width:228px!important;min-width:228px!important}
body.ux2 .ux-sidebar-scroll{padding:22px 12px 18px!important}
body.ux2 .ux-brand{padding:0 7px 17px;gap:10px}
body.ux2 .ux-brand img{width:36px!important;height:36px!important;object-fit:contain}
body.ux2 .ux-brand small{font-size:.78rem;color:#b8c3d1}
body.ux2 .ux-organization{padding:10px 12px;margin-bottom:10px;border-radius:10px}
body.ux2 .ux-organization small{font-size:.75rem}
body.ux2 .ux-organization strong{font-size:.88rem}
body.ux2 .workspace-plan-label{margin:0 13px 18px;font-size:.75rem;line-height:1.55;color:#b8a27a}
body.ux2 .ux-nav{gap:3px}
body.ux2 .ux-nav-item{min-height:43px;padding:0 11px;border-radius:9px;font-size:.875rem;gap:10px}
body.ux2 .ux-nav-icon{width:20px;flex-basis:20px}
body.ux2 .ux-nav-secondary{margin-top:20px!important;padding-top:14px!important}
body.ux2 .ux-nav-caption{font-size:.75rem!important;margin:0 11px 6px!important;color:#8494a8!important}
body.ux2 .ux-extra{margin-top:21px;padding-top:13px}
body.ux2 .ux-extra>summary{font-size:.8rem;padding:7px 10px}
body.ux2 .ux-extra-links a{font-size:.82rem;padding:8px 10px}
body.ux2 .platform-sidebar-link{margin:10px 7px;padding:10px;font-size:.78rem}
body.ux2 .ux-profile strong{font-size:.84rem}
body.ux2 .ux-profile small{font-size:.75rem!important}
body.ux2 .ux-exit{font-size:.78rem}

body.ux2 .ux-topbar{height:64px;padding:0 clamp(16px,2.6vw,36px)}
body.ux2 .ux-topbar-label strong{font-size:.88rem}
body.ux2 .ux-topbar-label small{font-size:.75rem!important}
body.ux2 .topbar-search-trigger{min-height:38px!important;font-size:.8rem!important;border-radius:10px!important}
body.ux2 .topbar-search-trigger kbd{font-size:.75rem!important}
body.ux2 .ux-bell{width:38px;height:38px;border-radius:10px}
body.ux2 .ux-top-avatar{width:36px;height:36px;flex-basis:36px}
body.ux2 .page-wrap{max-width:1440px;padding:30px clamp(18px,3vw,42px) 74px}
body.ux2 .page-wrap:has(.tree-page),body.ux2 .page-wrap:has(.task-workspace-page){max-width:1600px}

/* Page hierarchy: one clear title, restrained helper copy. */
body.ux2 .ux-home-head,body.ux2 .ux-page-head{gap:18px;margin-bottom:22px}
body.ux2 .ux-overline{font-size:.78rem;margin-bottom:5px}
body.ux2 .ux-home-head h1,body.ux2 .ux-page-head h1{font-size:clamp(1.55rem,1vw + 1.22rem,1.95rem);margin-bottom:6px;line-height:1.35}
body.ux2 .ux-home-head p,body.ux2 .ux-page-head p{font-size:.875rem;line-height:1.75;max-width:760px}
body.ux2 .ux-panel{border-color:var(--ux3-border);border-radius:var(--ux3-radius);padding:clamp(17px,1.7vw,23px);box-shadow:none}
body.ux2 .ux-panel-head{margin-bottom:16px;gap:12px}
body.ux2 .ux-panel-head h2{font-size:1rem;line-height:1.45}
body.ux2 .ux-panel-head p{font-size:.8rem}
body.ux2 .ux-see-all{font-size:.8rem}

/* Buttons / touch targets. */
body.ux2 .ux-button,body.ux2 .btn{min-height:42px;padding-inline:15px;border-radius:10px;font-size:.84rem;font-weight:740;box-shadow:none!important}
body.ux2 .btn-small{min-height:36px;font-size:.78rem}
body.ux2 .ux-button-main,body.ux2 .btn-primary{background:var(--ux3-navy);box-shadow:none!important}
body.ux2 .ux-button-main:hover,body.ux2 .btn-primary:hover{background:#1d3554;transform:none}
body.ux2 .ux-button-secondary,body.ux2 .btn-light{background:#fff;border-color:var(--ux3-border-strong)}

/* Forms: consistent density and no microscopic labels. */
body.ux2 :is(.simple-form-card,.form-stack,.dialog-form,.mywork-filter-form,.task-workspace-filter-grid) label{font-size:.8rem!important;gap:6px}
body.ux2 :is(.form-input,.simple-form-card input,.simple-form-card select,.simple-form-card textarea,.dialog-form input,.dialog-form select,.dialog-form textarea,.form-stack input,.form-stack select,.form-stack textarea){
  min-height:44px!important;
  border-radius:10px!important;
  border-color:var(--ux3-border-strong)!important;
  padding:9px 12px!important;
  font-size:.86rem!important;
  box-shadow:none!important;
}
body.ux2 textarea.form-input,body.ux2 :is(.simple-form-card,.dialog-form,.form-stack) textarea{min-height:88px!important;line-height:1.75}
body.ux2 :is(.form-input,.simple-form-card input,.simple-form-card select,.simple-form-card textarea,.dialog-form input,.dialog-form select,.dialog-form textarea,.form-stack input,.form-stack select,.form-stack textarea):focus{
  border-color:#b89a62!important;box-shadow:0 0 0 3px rgba(164,123,57,.1)!important
}
body.ux2 .simple-form-card{border-radius:14px;padding:20px;gap:16px;box-shadow:none}
body.ux2 .form-error,body.ux2 .errorlist{font-size:.78rem}

/* Lists and tables: scan-friendly, less visual noise. */
body.ux2 :is(.goal-list,.simple-list,.task-stack,.management-list,.simple-table,.update-list){box-shadow:none!important;border-color:var(--ux3-border)!important}
body.ux2 .goal-list-item{min-height:76px;padding:12px 15px}
body.ux2 .goal-title-row strong{font-size:.9rem}
body.ux2 .goal-subline{font-size:.76rem;gap:7px}
body.ux2 .goal-side strong{font-size:1rem}
body.ux2 .goal-side small{font-size:.75rem!important}
body.ux2 .status-pill,body.ux2 .soft-tag,body.ux2 .confidence{font-size:.75rem;padding:4px 8px}
body.ux2 .management-row{min-height:62px}
body.ux2 table{font-size:.82rem}
body.ux2 th{font-size:.75rem;font-weight:800;color:#55647a}
body.ux2 td,body.ux2 th{padding-top:11px!important;padding-bottom:11px!important}

/* Dashboard: keep the important numbers, reduce card noise. */
body.ux2 .ux-overview{gap:12px;margin-bottom:18px}
body.ux2 .ux-progress-feature,body.ux2 .ux-mini-stat{min-height:150px;border-radius:14px}
body.ux2 .ux-progress-feature{padding:21px 25px}
body.ux2 .ux-mini-stat{padding:20px}
body.ux2 .ux-mini-stat>strong{font-size:1.75rem}
body.ux2 .ux-home-grid{gap:14px}
body.ux2 .ux-goal-compact{padding:14px 0}
body.ux2 .ux-goal-text>strong{font-size:.88rem}
body.ux2 .ux-goal-text>small{font-size:.76rem!important}

/* My Work: denser structure but readable type. */
body.ux2 .mywork-tabs{margin-bottom:13px;border-radius:12px;gap:4px;padding:4px}
body.ux2 .mywork-tab{min-height:40px;font-size:.8rem;padding-inline:12px}
body.ux2 .mywork-filter-panel>summary{min-height:50px;font-size:.82rem}
body.ux2 .mywork-filter-panel>summary small{font-size:.75rem!important}
body.ux2 .mywork-filter-form{gap:11px;padding:15px}
body.ux2 .mywork-task{padding:14px 0;gap:14px}
body.ux2 .mywork-task-title-row>strong{font-size:.88rem}
body.ux2 .mywork-task-path{font-size:.75rem}
body.ux2 .mywork-task-meta{font-size:.75rem}
body.ux2 .mywork-status{font-size:.75rem}
body.ux2 .mywork-action{min-height:35px;font-size:.75rem}
body.ux2 .mywork-head-links{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
body.ux2 .mywork-gantt-link{display:inline-flex;align-items:center;gap:7px;min-height:34px;padding:0 10px;border-radius:9px;background:var(--ux3-gold-soft);color:#775820;font-size:.77rem;font-weight:800}

/* Dialogs and empty states. */
body.ux2 .checkin-dialog{border-radius:14px}
body.ux2 .dialog-head strong{font-size:.94rem}
body.ux2 .dialog-head small{font-size:.76rem!important}
body.ux2 .ux-empty{padding-block:30px!important}
body.ux2 .ux-empty strong{font-size:.9rem}
body.ux2 .ux-empty p{font-size:.8rem}

/* Mobile: preserve hierarchy instead of merely shrinking desktop. */
@media(max-width:980px){
  body.ux2 .ux-sidebar{width:228px!important;min-width:228px!important}
  body.ux2 .page-wrap{padding:24px 18px 66px}
}
@media(max-width:760px){
  html{font-size:16px}
  body.ux2{font-size:14.5px}
  body.ux2 .ux-topbar{height:60px;padding-inline:14px}
  body.ux2 .topbar-search-trigger span,body.ux2 .topbar-search-trigger kbd{display:none}
  body.ux2 .topbar-search-trigger{width:38px;padding:0!important;justify-content:center!important}
  body.ux2 .ux-page-head,body.ux2 .ux-home-head{align-items:flex-start;flex-direction:column;margin-bottom:18px}
  body.ux2 .ux-page-head>*,body.ux2 .ux-home-head>*{max-width:100%}
  body.ux2 .ux-page-head h1,body.ux2 .ux-home-head h1{font-size:1.48rem}
  body.ux2 .ux-page-head p,body.ux2 .ux-home-head p{font-size:.84rem}
  body.ux2 .ux-overview{grid-template-columns:1fr 1fr}
  body.ux2 .ux-progress-feature{grid-column:1/-1}
  body.ux2 .ux-home-grid,body.ux2 .mywork-layout{grid-template-columns:1fr}
  body.ux2 .mywork-side{order:2}
  body.ux2 .mywork-filter-form{grid-template-columns:1fr 1fr}
  body.ux2 .mywork-filter-search{grid-column:1/-1}
}
@media(max-width:520px){
  body.ux2 .page-wrap{padding:20px 13px 58px}
  body.ux2 .ux-panel{padding:15px}
  body.ux2 .ux-overview{grid-template-columns:1fr}
  body.ux2 .ux-progress-feature{grid-column:auto;min-height:138px}
  body.ux2 .ux-mini-stat{min-height:118px}
  body.ux2 .mywork-filter-form{grid-template-columns:1fr}
  body.ux2 .mywork-filter-search{grid-column:auto}
  body.ux2 .mywork-filter-actions{flex-direction:column}
  body.ux2 .mywork-filter-actions>*{width:100%}
}

/* Final density pass: fewer competing cards and less sidebar metadata. */
body.ux2 .workspace-plan-label{display:none}
body.ux2 .dashboard-stack{gap:12px}
body.ux2 .health-grid{gap:10px;margin-bottom:14px}
body.ux2 .health-card{padding:15px 17px}
body.ux2 .health-card .ux-panel-head{margin-bottom:8px}
body.ux2 .health-row{min-height:35px;font-size:.78rem}
body.ux2 .dashboard-list-row{padding:10px 0}
body.ux2 .dashboard-list-row strong{font-size:.8rem}
body.ux2 .dashboard-list-row small{font-size:.75rem!important}
body.ux2 .team-progress-list{gap:10px}
body.ux2 .team-progress-row strong{font-size:.8rem}
body.ux2 .team-progress-row small{font-size:.75rem!important}
body.ux2 .employee-summary-grid{gap:9px;margin-bottom:14px}
body.ux2 .employee-summary{min-height:112px;padding:16px;border-radius:13px}
body.ux2 .employee-summary>span{font-size:.77rem}
body.ux2 .employee-summary>strong{font-size:1.65rem}
body.ux2 .employee-summary>small{font-size:.75rem!important}
body.ux2 .ux-more{margin-top:12px!important}
body.ux2 .ux-more>summary{font-size:.8rem!important}

/* Phase 4: task titles open the task page (relations, outputs, files). */
.mywork-task-link{color:inherit;text-decoration:none}
.mywork-task-link:hover,.mywork-task-link:focus-visible{text-decoration:underline;text-underline-offset:3px}
