/* =====================================================
   TASK OPERASIONAL UI — FINAL (MERGED + UPDATED)
   Generated: 2026-09-30
   ===================================================== */

/* ── Nav Trigger ── */
.task-nav-trigger{border:0;background:transparent;color:inherit;font:inherit;cursor:pointer}
.task-nav-trigger.active{background:#0b6f86!important;color:#fff!important;box-shadow:0 8px 18px rgba(11,111,134,.18)}

/* ── Page Base ── */
.task-page{margin-top:18px}
.task-page *{box-sizing:border-box}
.task-page h1,.task-page h2,.task-page h3,.task-page p{margin-top:0}
.task-muted{color:#6d7d90;font-size:13px}
.task-category-hint{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0 2px 8px;color:#52677c;font-size:12px}
.task-category-hint strong{color:#183250;font-size:13px}
.task-category-hint span{color:#6d7d90}
.task-filter-label{display:flex;min-width:150px;flex:1;flex-direction:column;gap:4px;color:#607080;font-size:12px;font-weight:700}
.task-active-filter{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 18px 12px;color:#315878;font-size:13px;font-weight:700}

/* ── Heading Premium ── */
.task-page h1{
  font-size:clamp(22px,4vw,32px);
  font-weight:900;
  letter-spacing:-0.5px;
  color:#0f2540;
  margin-bottom:4px;
  line-height:1.2;
}
.task-page h2{
  font-size:17px;
  font-weight:800;
  color:#162d45;
  letter-spacing:-0.2px;
}
.task-page h3{font-size:15px;margin-bottom:4px}

/* ── Head / Actions ── */
.task-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:18px}
.task-head-actions{display:flex;gap:8px;align-items:center}
.task-date{border:1px solid #d7e1ea;border-radius:10px;background:#fff;padding:10px 13px;color:#17314e;font-weight:600}

/* ── Subtabs Wrap dengan Fade Indicator ── */
.task-subtabs-wrap{
  position:relative;
  margin-bottom:18px;
}
.task-subtabs-wrap::after{
  content:'';
  position:absolute;
  right:0;top:0;bottom:2px;
  width:40px;
  background:linear-gradient(to right,transparent,#f5f8fa 80%);
  pointer-events:none;
  border-radius:0 0 4px 0;
}
.task-subtabs{
  display:flex;
  gap:4px;
  overflow-x:auto;
  border-bottom:1.5px solid #e0e8ee;
  padding-bottom:0;
  margin-bottom:0;
  scrollbar-width:none;
}
.task-subtabs::-webkit-scrollbar{display:none}
.task-subtab{
  border:0;
  background:transparent;
  padding:12px 16px;
  color:#617286;
  white-space:nowrap;
  cursor:pointer;
  border-bottom:2.5px solid transparent;
  font-weight:600;
  font-size:13px;
  min-height:44px;
  transition:color 0.15s,border-color 0.15s;
  position:relative;
  bottom:-1.5px;
}
.task-subtab.active{color:#087c8a;border-color:#0b9aa2}
.task-subtab:active{opacity:0.7}

/* ── Area Grid ── */
.task-area-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin-bottom:16px}

/* ── Area Card Premium ── */
.task-area-card{
  border:1.5px solid #dde7ef;
  border-radius:16px;
  padding:14px;
  background:#fff;
  cursor:pointer;
  text-align:left;
  min-height:116px;
  transition:border-color 0.18s,box-shadow 0.18s,transform 0.12s;
  position:relative;
  overflow:hidden;
}
.task-area-card::before{
  content:'';
  position:absolute;
  top:0;left:0;right:0;
  height:3px;
  background:linear-gradient(90deg,#0b9aa2,#2c9eea);
  opacity:0;
  transition:opacity 0.18s;
}
.task-area-card:hover,.task-area-card.active{border-color:#0b9aa2;box-shadow:0 8px 24px rgba(11,154,162,0.18)}
.task-area-card.active{background:linear-gradient(180deg,#f0fbfc,#fff)}
.task-area-card.active::before{opacity:1}
.task-area-card:active{transform:scale(0.97)}

/* ── Area Card Icons ── */
.task-area-icon{display:inline-grid;place-items:center;width:32px;height:32px;border-radius:10px;background:#e5f3ff;color:#1675c4;font-weight:800;margin-bottom:8px}
.task-area-card:nth-child(2) .task-area-icon{background:#e3faf4;color:#079b81}
.task-area-card:nth-child(3) .task-area-icon{background:#f1eaff;color:#7450d9}
.task-area-card:nth-child(4) .task-area-icon{background:#fff1d9;color:#e58b10}
.task-area-card:nth-child(5) .task-area-icon{background:#ffe7ec;color:#df4660}
.task-area-name{display:block;font-weight:800;color:#183250}
.task-area-meta{display:block;font-size:12px;color:#738196;margin-top:3px}
.task-area-count{display:block;margin-top:9px;color:#275073;font-weight:700;font-size:13px}

/* ── Role Flow ── */
.task-role-flow{display:flex;align-items:center;gap:8px;background:#fff;border:1px solid #e0e8ef;border-radius:14px;padding:12px 14px;margin-bottom:16px;overflow:auto}
.task-role{display:flex;align-items:center;justify-content:center;gap:7px;min-width:125px;padding:10px 12px;border-radius:9px;background:#f0f5fa;color:#173452;font-size:13px;font-weight:700;white-space:nowrap}
.task-role:nth-child(2){background:#eaf4ff}
.task-role:nth-child(3){background:#f2edff}
.task-role:nth-child(4){background:#e9faf5}
.task-role:nth-child(5){background:#edf6ff}
.task-arrow{color:#7c8e9e;font-size:18px}

/* ── KPI Interaktif ── */
.task-kpis{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin-bottom:16px}
.task-kpi{
  background:#fff;
  border:1.5px solid #e1e8ee;
  border-radius:14px;
  padding:14px 16px;
  cursor:pointer;
  transition:box-shadow 0.15s,transform 0.12s;
}
.task-kpi:hover{box-shadow:0 4px 16px rgba(0,0,0,0.09)}
.task-kpi:active{transform:scale(0.96)}
.task-kpi-label{font-size:12px;color:#718096}
.task-kpi-value{display:block;font-size:25px;font-weight:800;color:#183250;margin-top:5px}
.task-kpi.blue .task-kpi-value{color:#1675c4}
.task-kpi.green .task-kpi-value{color:#0b9b70}
.task-kpi.purple .task-kpi-value{color:#7450d9}
.task-kpi.orange .task-kpi-value{color:#e58b10}
.task-kpi.red .task-kpi-value{color:#d94058}

/* ── Task Panel Premium ── */
.task-panel{
  background:#fff;
  border:1.5px solid #e0e8ef;
  border-radius:18px;
  overflow:hidden;
  box-shadow:0 2px 12px rgba(15,37,64,0.05);
}
.task-panel-head{padding:17px 18px 12px;display:flex;justify-content:space-between;gap:14px;align-items:flex-start}
.task-toolbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap;padding:0 18px 14px}
.task-search,.task-select{border:1px solid #d8e2ea;border-radius:9px;padding:10px 12px;background:#fff;color:#31445a;min-height:40px}
.task-search{min-width:240px;flex:1}

/* ── Table Desktop ── */
.task-table-wrap{overflow:auto}
.task-table{width:100%;border-collapse:collapse;min-width:780px}
.task-table th{background:#f3f7fa;text-align:left;font-size:12px;color:#51657b;padding:11px 12px;white-space:nowrap}
.task-table td{padding:12px;border-top:1px solid #edf1f4;font-size:13px;color:#263d56;vertical-align:middle}
.task-title{font-weight:800;color:#193653}
.task-subtitle{font-size:12px;color:#78889a;margin-top:3px}
.task-table-desktop{display:block}
.task-table.task-table-compact{width:100%;min-width:0;table-layout:fixed}
.task-table-compact th,.task-table-compact td{width:33.333%;height:40px;padding:8px 12px;text-align:left}
.task-table-compact th+th,.task-table-compact td+td{border-left:1px solid #cbd5e1}
.task-table-compact td{overflow-wrap:anywhere}
.task-list-title-link{color:#193653;font-weight:750;text-decoration:none}
.task-list-title-link:hover{text-decoration:underline}
.task-table-compact .task-pill{max-width:100%;white-space:normal}

/* ── Mini Progress Bar (Tabel Desktop) ── */
.task-mini-progress{
  height:4px;
  background:#edf1f4;
  border-radius:999px;
  overflow:hidden;
  margin-top:5px;
  width:80px;
}
.task-mini-progress span{
  display:block;
  height:100%;
  background:linear-gradient(90deg,#0b9aa2,#16c8b8);
  border-radius:999px;
}

/* ── Pill Premium ── */
.task-pill{
  display:inline-flex;
  align-items:center;
  gap:4px;
  border-radius:999px;
  padding:4px 10px;
  font-size:11.5px;
  font-weight:700;
  white-space:nowrap;
  letter-spacing:0.01em;
}
.task-pill.daily{background:#e6f3ff;color:#1675c4}
.task-pill.weekly{background:#e3f8ed;color:#098658}
.task-pill.monthly{background:#f0eaff;color:#7251d7}
.task-pill.done{background:#e0f7eb;color:#098657}
.task-pill.review{background:#e6f0ff;color:#2e78d1}
.task-pill.late{background:#ffe4e7;color:#d73f55}
.task-pill.todo{background:#eef2f5;color:#607080}

/* ── Tombol Touch-Friendly (min 44px) ── */
.task-detail-button,.task-primary,.task-secondary{
  min-height:44px;
  padding:10px 16px;
  border-radius:10px;
  font-weight:700;
  font-size:13px;
  transition:transform 0.12s,box-shadow 0.12s;
  cursor:pointer;
}
.task-primary{
  background:linear-gradient(135deg,#0b8f9e,#0d7a88);
  color:#fff;
  box-shadow:0 4px 14px rgba(11,143,158,0.30);
  border:0;
}
.task-primary:hover{box-shadow:0 6px 20px rgba(11,143,158,0.40)}
.task-primary:active,.task-secondary:active{transform:scale(0.97)}
.task-secondary{background:#eef4f8;color:#37536b;border:0}

/* ── Empty State ── */
.task-empty{padding:28px;text-align:center;color:#75879a}
.task-empty-state{padding:32px 16px;text-align:center}
.task-empty-icon{font-size:36px;margin-bottom:10px}
.task-empty-title{font-size:15px;font-weight:700;color:#3a5068;margin-bottom:5px}
.task-empty-desc{font-size:13px;color:#7a8fa0}

/* ── Card List Mobile (BARU) ── */
.task-card-list{
  display:none;
  flex-direction:column;
  gap:6px;
  padding:8px 0 4px;
}
.task-list-header,.task-row-link{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  align-items:center;
  text-align:left;
}
.task-list-header{
  height:40px;
  min-height:40px;
  padding:4px 10px;
  color:#536b82;
  background:#f3f7fa;
  border:1px solid #dce5ee;
  border-radius:9px;
  font-size:11px;
  font-weight:800;
}
.task-list-header span+span{border-left:1px solid #cbd5e1;padding-left:8px}
.task-row-link{
  gap:8px;
  height:40px;
  min-height:40px;
  padding:3px 10px;
  color:#193653;
  text-decoration:none;
  background:#fff;
  border:1px solid #dce5ee;
  border-radius:11px;
  box-shadow:0 1px 3px rgba(25,54,83,.05);
  -webkit-tap-highlight-color:transparent;
}
.task-row-cell{display:flex;align-items:center;width:100%;min-width:0;min-height:100%;box-sizing:border-box}
.task-row-cell+.task-row-cell{border-left:1px solid #b8c8d8;padding-left:8px}
.task-row-link:active{background:#f1f7fb;transform:scale(.992)}
.task-row-title{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:13px;
  line-height:1.25;
  font-weight:750;
}
.task-row-status{justify-self:start;max-width:100%;padding:4px 7px;font-size:10px;white-space:normal}
.task-row-deadline{
  min-width:0;
  color:#536b82;
  text-align:left;
  justify-self:start;
  white-space:nowrap;
  font-size:10.5px;
  font-weight:650;
  font-variant-numeric:tabular-nums;
}
.task-list-header span+span{border-left:1px solid #cbd5e1;padding-left:8px}
.task-card{
  background:#fff;
  border:1.5px solid #e0e8ef;
  border-radius:16px;
  padding:14px 16px;
  cursor:pointer;
  transition:box-shadow 0.15s,border-color 0.15s,transform 0.1s;
  position:relative;
  overflow:hidden;
}
.task-card:active{transform:scale(0.985)}
.task-card-header{
  display:flex;
  gap:6px;
  margin-bottom:8px;
  flex-wrap:wrap;
  align-items:center;
}
.task-card-title{
  font-size:14px;
  font-weight:800;
  color:#193653;
  margin-bottom:8px;
  line-height:1.4;
}
.task-card-meta{
  display:flex;
  gap:12px;
  font-size:12px;
  color:#607080;
  flex-wrap:wrap;
  margin-bottom:10px;
}
.task-card-footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  flex-wrap:wrap;
}
.task-card-progress{
  display:flex;
  align-items:center;
  gap:8px;
  flex:1;
  min-width:120px;
}
.task-progress-bar{
  flex:1;
  height:6px;
  background:#e6edf2;
  border-radius:999px;
  overflow:hidden;
}
.task-progress-bar span{
  display:block;
  height:100%;
  background:linear-gradient(90deg,#0b9aa2,#16c8b8);
  border-radius:999px;
  transition:width 0.4s;
}
.task-card-deadline{font-size:12px;color:#8095aa;white-space:nowrap}
.task-card[data-status-class="late"]{border-left:4px solid #d94058}
.task-card[data-status-class="done"]{border-left:4px solid #0b9b70}
.task-card[data-status-class="review"]{border-left:4px solid #2e78d1}

/* ── Layout & Sidebar ── */
.task-layout{display:grid;grid-template-columns:minmax(0,1fr) 330px;gap:16px}
.task-side-card{background:#fff;border:1px solid #e0e8ef;border-radius:15px;padding:16px}
.task-check-row{display:flex;gap:9px;padding:10px 0;border-bottom:1px solid #edf1f4;font-size:13px}
.task-check-row:last-child{border-bottom:0}
.task-check-row input{accent-color:#079b81}
.task-progress{height:8px;border-radius:9px;background:#e6edf2;overflow:hidden;margin:10px 0}
.task-progress span{display:block;width:75%;height:100%;background:#16a579}
.task-activity{display:flex;gap:10px;padding:10px 0;border-bottom:1px solid #edf1f4;font-size:12px}
.task-dot{width:8px;height:8px;background:#0b9aa2;border-radius:50%;margin-top:4px;flex:0 0 auto}

/* ── Template Grid ── */
.task-template-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.task-template-card{border:1px solid #e0e8ef;border-radius:13px;padding:16px;background:#fff}
.task-template-top{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}

/* ── Modal / Bottom Sheet ── */
.task-modal-backdrop{position:fixed;inset:0;background:rgba(14,36,57,.4);z-index:50;display:grid;place-items:center;padding:18px}
.task-modal{background:#fff;border-radius:16px;max-width:680px;width:100%;max-height:90vh;overflow:auto;padding:20px;box-shadow:0 22px 60px rgba(13,37,60,.3)}
.task-modal-head{display:flex;justify-content:space-between;gap:12px}
.task-close{border:0;background:#f0f4f7;border-radius:50%;width:32px;height:32px;cursor:pointer;font-size:18px}
.task-note{background:#f5f8fa;border-radius:10px;padding:12px;font-size:13px;color:#50657a;margin:12px 0}
.task-modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:16px}

/* ── Bottom Sheet Handle ── */
.task-sheet-handle{
  width:40px;
  height:4px;
  background:#d0dae3;
  border-radius:999px;
  margin:0 auto 16px;
}
.task-bottom-sheet{border-radius:24px 24px 0 0;max-height:85vh;width:100%;max-width:100%;padding:12px 16px 24px}

/* ═══════════════════════════════════════
   RESPONSIVE / MEDIA QUERIES
   ═══════════════════════════════════════ */

@media(max-width:900px){
  .task-area-grid{grid-template-columns:repeat(3,minmax(150px,1fr))}
  .task-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}
  .task-layout{grid-template-columns:1fr}
  .task-template-grid{grid-template-columns:1fr 1fr}
}

@media(max-width:720px){
  .task-table-desktop{display:none!important}
  .task-card-list{display:flex!important}
  .task-panel{border:none;background:transparent;box-shadow:none}
  .task-panel-head{background:#fff;border:1.5px solid #e0e8ef;border-radius:16px;margin-bottom:10px}
  .task-toolbar{background:#fff;border:1.5px solid #e0e8ef;border-radius:16px;padding:12px 14px;margin-bottom:10px}
}

@media(max-width:620px){
  .task-page{margin-top:12px}
  .task-head{display:block}
  .task-head-actions{margin-top:12px}
  .task-date{width:100%}
  .task-area-grid{display:flex;overflow-x:auto;padding:2px 2px 10px;gap:8px;scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch;scrollbar-width:thin}
  .task-area-card{min-width:170px;scroll-snap-align:start}
  .task-category-hint{align-items:flex-start;flex-direction:column;gap:2px}
  .task-filter-label{min-width:100%;width:100%}
  .task-active-filter{align-items:flex-start;flex-direction:column;padding:0 14px 12px}
  .task-role-flow{margin-left:-2px;margin-right:-2px}
  .task-role{min-width:105px;font-size:11px;padding:9px 8px}
  .task-arrow{font-size:15px}
  .task-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  .task-panel-head{display:block}
  .task-toolbar{padding-top:3px}
  .task-search{min-width:100%;width:100%}
  .task-select{flex:1;min-width:130px}
  .task-template-grid{grid-template-columns:1fr}
  .task-modal-backdrop{align-items:flex-end;padding:0}
  .task-bottom-sheet{border-radius:24px 24px 0 0;max-height:85vh;width:100%;max-width:100%;padding:12px 16px 24px}
  .task-subtabs-wrap::after{background:linear-gradient(to right,transparent,#fff 80%)}
}
.task-calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:5px;padding:12px}.task-calendar-weekday{text-align:center;font-size:.78rem;color:#64748b;font-weight:700;padding:5px}.task-calendar-day{min-width:0;min-height:92px;border:1px solid #dce5ef;border-radius:10px;background:#fff;padding:7px;display:flex;flex-direction:column;gap:4px;text-align:left;color:#18324c;cursor:pointer}.task-calendar-day:not(.is-empty):hover,.task-calendar-day:not(.is-empty):focus-visible{border-color:#0b9aa2;background:#f0fbfc;outline:2px solid #0b9aa2;outline-offset:1px}.task-calendar-day span,.task-calendar-day small{font-size:.72rem;color:#64748b;overflow:hidden;text-overflow:ellipsis}.task-calendar-day.is-empty{border-color:transparent;background:transparent;cursor:default}.task-template-actions{display:flex;gap:8px;flex-wrap:wrap}.task-template-card ol{padding-left:20px}.task-card .task-primary,.task-table .task-secondary{display:inline-flex;text-decoration:none;align-items:center;justify-content:center;min-height:38px;padding:8px 12px;border-radius:9px}.task-message{padding:12px;border-radius:10px}.task-message.danger{background:#fff1f2;color:#be123c}
@media(max-width:640px){.task-calendar-grid{gap:3px;padding:6px}.task-calendar-day{min-height:70px;padding:4px;border-radius:7px}.task-calendar-day small{display:none}.task-calendar-weekday{font-size:.67rem;padding:3px}.task-table-desktop{overflow-x:auto}.task-table{min-width:760px}}
.task-checklist-list{display:grid;gap:8px}.task-checklist-item{display:flex;align-items:flex-start;gap:10px;padding:10px;border:1px solid #dce5ef;border-radius:10px;background:#fff}.task-checklist-item input{width:20px;height:20px;min-width:20px;margin:1px 0 0;accent-color:#1261c9}.task-checklist-item span{line-height:1.45}

/* Shared category scope for every Task Operasional subtab */
.task-scope-picker{display:flex;align-items:center;gap:12px;margin:0 0 12px;padding:10px 12px;background:#fff;border:1px solid #dce5ed;border-radius:14px;min-width:0}
.task-scope-heading{display:flex;flex:0 0 auto;flex-direction:column;gap:3px;min-width:132px;color:#183250;font-size:13px}
.task-scope-heading span{color:#718096;font-size:11px}
.task-scope-options{display:flex;flex:1;gap:7px;min-width:0;overflow-x:auto;padding:1px 2px 4px;scrollbar-width:thin;-webkit-overflow-scrolling:touch}
.task-scope-chip{display:inline-flex;flex:0 0 auto;align-items:center;gap:7px;min-height:38px;padding:7px 11px;border:1px solid #d9e3eb;border-radius:999px;background:#f8fafc;color:#334b62;font:inherit;font-size:12px;font-weight:700;white-space:nowrap;cursor:pointer}
.task-scope-chip small{display:inline-grid;min-width:19px;height:19px;place-items:center;padding:0 4px;border-radius:999px;background:#e8eef3;color:#53677a;font-size:10px}
.task-scope-chip.active{border-color:#0b8f9a;background:#eaf9fa;color:#066d78;box-shadow:0 0 0 1px rgba(11,143,154,.08)}
.task-scope-chip.active small{background:#cceff0;color:#066d78}
.task-scope-chip:focus-visible{outline:2px solid #087c8a;outline-offset:2px}
@media(max-width:620px){.task-scope-picker{display:block;padding:9px 10px;margin-bottom:10px}.task-scope-heading{flex-direction:row;align-items:center;justify-content:space-between;gap:8px;margin-bottom:7px;min-width:0}.task-scope-heading span{font-size:10px}.task-scope-options{margin-right:-2px}.task-scope-chip{min-height:36px;padding:6px 10px}}

/* Frequency filters and compact status chips, scoped to Task Operasional */
.task-page .task-frequency-tab{padding-left:11px;padding-right:11px;font-size:12px}
.task-page .task-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.task-page .task-kpi--chip{display:inline-flex;flex:0 0 auto;flex-direction:row;align-items:center;justify-content:space-between;gap:6px;width:100%;min-width:0;max-width:100%;height:40px;min-height:40px;padding:6px 10px;border-radius:999px;background:#f8fafc;border-color:#d8e3ed}
.task-page .task-kpi--chip .task-kpi-label{order:1;font-size:12px;font-weight:700;color:#334b62;white-space:nowrap}
.task-page .task-kpi--chip .task-kpi-value{order:2;display:inline-grid;place-items:center;flex:0 0 22px;min-width:22px;width:22px;height:22px;line-height:1;margin:0;padding:0 5px;border-radius:999px;background:#e8eef3;color:#52677c;font-size:11px;font-weight:800}
.task-page .task-kpi--chip:hover{border-color:#0b8f9a;box-shadow:0 3px 12px rgba(11,143,154,.12)}
@media(max-width:620px){.task-page .task-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.task-page .task-kpi--chip{padding:6px 9px}.task-page .task-kpi--chip .task-kpi-label{font-size:11px}}

/* Premium touch treatment for the Task Operasional category buttons only */
.task-scope-chip{
  position:relative;
  isolation:isolate;
  min-height:42px;
  padding:8px 13px;
  gap:8px;
  border:1px solid #d6e1ef;
  border-radius:14px;
  background:linear-gradient(180deg,#fff 0%,#f3f7fd 100%);
  color:#344a65;
  box-shadow:0 2px 5px rgba(27,54,91,.08),inset 0 1px 0 rgba(255,255,255,.95);
  transition:transform .16s ease,border-color .16s ease,background .16s ease,box-shadow .16s ease,color .16s ease;
  -webkit-tap-highlight-color:transparent;
}
.task-scope-chip span{position:relative;z-index:1;letter-spacing:-.01em}
.task-scope-chip small{
  position:relative;
  z-index:1;
  min-width:21px;
  height:21px;
  border:1px solid #e0e8f2;
  background:linear-gradient(180deg,#f4f7fb,#e7edf5);
  color:#50647d;
  font-size:10px;
  font-weight:800;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.9);
}
.task-scope-chip:hover{
  transform:translateY(-1px);
  border-color:#9db8e4;
  background:linear-gradient(180deg,#fff 0%,#edf4ff 100%);
  box-shadow:0 5px 12px rgba(37,82,149,.13),inset 0 1px 0 #fff;
}
.task-scope-chip.active{
  border-color:#174ca9;
  background:linear-gradient(135deg,#3278e9 0%,#205bc1 55%,#17479f 100%);
  color:#fff;
  box-shadow:0 5px 13px rgba(31,91,193,.3),inset 0 1px 0 rgba(255,255,255,.28),inset 0 -1px 0 rgba(9,39,103,.2);
}
.task-scope-chip.active small{
  border-color:rgba(255,255,255,.3);
  background:rgba(255,255,255,.2);
  color:#fff;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.22);
}
.task-scope-chip:active{transform:scale(.97)}
.task-scope-chip.active:hover{
  background:linear-gradient(135deg,#3b82f6 0%,#2563d2 55%,#1b50ad 100%);
  box-shadow:0 7px 16px rgba(31,91,193,.36),inset 0 1px 0 rgba(255,255,255,.3);
}
.task-scope-chip:focus-visible{outline:3px solid rgba(47,119,226,.32);outline-offset:2px}
@media(max-width:620px){.task-scope-chip{min-height:42px;padding:7px 12px;border-radius:13px}}
.task-page .task-scope-picker{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:end;gap:12px;padding:10px 12px;margin:0 0 12px}
.task-scope-dropdown{display:grid;gap:3px;color:#183250;font-size:12px;font-weight:750}
.task-scope-dropdown .task-select{width:100%;min-height:44px;margin:0}
.task-scope-create{width:100%;min-height:44px;margin:0;white-space:nowrap}
/* Task Operasional only: align controls and rows to the 40px KPI chip height. */
.task-page .task-primary,.task-page .task-secondary,.task-page .task-detail-button,.task-page .task-search,.task-page .task-select,.task-page .task-scope-dropdown .task-select,.task-page .task-scope-create{min-height:40px;height:40px;box-sizing:border-box}
.task-page .task-primary,.task-page .task-secondary,.task-page .task-detail-button{padding-top:6px;padding-bottom:6px}
.task-page .task-search,.task-page .task-select{padding-top:6px;padding-bottom:6px}

/* Final 40px alignment for Task Operasional controls only. */
.task-page .task-search,.task-page .task-select,.task-page .task-subtab{height:40px;min-height:40px!important;box-sizing:border-box}
.task-page .task-primary,.task-page .task-secondary,.task-page .task-detail-button{height:40px;min-height:40px!important}

/* Task Operasional only: keep table row spacing at 2px maximum. */
.task-page .task-card-list{gap:2px}

/* Task Operasional only: compact vertical spacing, maximum 2px between blocks. */
.task-page .task-scope-picker{margin-bottom:2px}
.task-page .task-subtabs-wrap{margin-bottom:2px}
.task-page .task-kpis{gap:2px;margin-bottom:2px}
.task-page .task-toolbar{margin-bottom:2px}
.task-page .task-card-list{gap:2px;padding-top:2px;padding-bottom:2px}

/* Task Operasional only: pull the page 10px upward, leaving 2px from the shell top. */
.task-page{margin-top:-10px}

/* Task Operasional only: override the shell spacing at 2px. */
.app-page-content > .task-page{margin-top:-10px!important}


.task-page .task-completed-controls{display:flex;flex-direction:column;gap:2px;margin-top:2px}
.task-page .task-pagination{display:flex;align-items:center;justify-content:space-between;gap:2px}
.task-page .task-pagination button,.task-page .task-completed-toggle{min-height:40px}
.task-page .task-completed-toggle{width:100%}


/* Task Operasional only: put Category after Status and let the whole four-column list scroll without clipping the title. */
.task-page .task-table-compact th:nth-child(1),
.task-page .task-table-compact td:nth-child(1){width:46%}
.task-page .task-table-compact th:nth-child(2),
.task-page .task-table-compact td:nth-child(2){width:24%}
.task-page .task-table-compact th:nth-child(3),
.task-page .task-table-compact td:nth-child(3){width:17%}
.task-page .task-table-compact th:nth-child(4),
.task-page .task-table-compact td:nth-child(4){width:13%}
.task-page .task-card-list{align-items:stretch;overflow-x:visible;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;scrollbar-width:none;padding-bottom:8px}
.task-page .task-list-header,
.task-page .task-row-link{width:100%;min-width:0;padding-left:4px;padding-right:4px;box-sizing:border-box;grid-template-columns:minmax(0,1fr) minmax(60px,66px) minmax(44px,50px) minmax(48px,54px);column-gap:1px}
.task-page .task-list-header span+span,.task-page .task-row-cell+.task-row-cell{padding-left:2px}
.task-page .task-list-header{padding-left:4px;padding-right:4px}
.task-page .task-row-status{padding:3px 4px;font-size:9.5px;line-height:1.1}
.task-page .task-row-link{height:auto;min-height:40px;touch-action:pan-x pan-y}
.task-page .task-row-title{overflow:visible;text-overflow:clip;white-space:normal;overflow-wrap:anywhere}
.task-page .task-row-category{min-width:0;font-size:10.5px;line-height:1.2;overflow-wrap:anywhere;color:#536b82}


/* Task Operasional only: keep the category select label readable on phones. */
.task-page .task-scope-dropdown .task-select{font-size:14px}

/* Task Operasional: multi-photo/video picker in the create-task sheet. */
.task-page .task-media-field{display:grid;gap:7px;padding:12px;border:1px solid #d7e2ed;border-radius:12px;background:#f7fafc}
.task-page .task-media-field input[type=file]{width:100%;max-width:100%;font:inherit;color:#28415b}
.task-page .task-media-field small{color:#64748b;font-size:.82rem}
.task-page .task-media-list,.task-page .task-media-status{display:block;overflow-wrap:anywhere;font-size:.84rem;color:#31506f}
.task-page .task-media-status{padding:9px;border-radius:9px;background:#fff7ed;color:#9a3412}
.task-page .task-media-status a{display:inline-block;margin-top:5px;color:#087f89;font-weight:700}
.task-page .task-media-field [hidden]{display:none!important}

/* Keep the Task Operasional sheet above the fixed mobile navigation. */
.task-page .task-modal-backdrop{z-index:120}

.task-detail-frame-backdrop{z-index:180;place-items:center;padding:var(--space-4);background:rgb(16 24 40 / 56%)}
.task-detail-frame-shell{display:flex;flex-direction:column;width:min(100%,56rem);height:min(90dvh,54rem);max-width:56rem;max-height:min(90dvh,54rem);min-height:0;overflow:hidden;padding:0;border:1px solid var(--color-border);border-radius:16px;box-shadow:var(--shadow-lg,0 20px 60px rgb(16 24 40 / 24%));background:var(--color-surface,#fff)}
.task-detail-frame{display:block;flex:1 1 auto;width:100%;height:100%;min-height:0;border:0;background:#fff}

@media(max-width:50rem){
  .task-detail-frame-backdrop{align-items:end;padding:0}
  .task-detail-frame-shell{width:100%;height:92dvh;max-height:92dvh;border:0;border-radius:16px 16px 0 0}
}
