
:root{
  --bg:#f3f6fb;
  --panel:#ffffff;
  --text:#111827;
  --muted:#64748b;
  --line:#e5e7eb;
  --primary:#7c3aed;
  --primary-soft:#f1eafe;
  --danger:#ef4444;
  --success:#22c55e;
  --blue:#0ea5e9;
}
*{box-sizing:border-box}
body{
  margin:0;
  font-family:Arial, Helvetica, sans-serif;
  background:var(--bg);
  color:var(--text);
}
a{text-decoration:none;color:inherit}
button,input,select,textarea{
  font-family:inherit;
}
.login-page{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
  background:linear-gradient(135deg,#eef2ff,#f8fafc);
}
.login-card{
  width:100%;
  max-width:430px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:20px;
  box-shadow:0 20px 60px rgba(15,23,42,.12);
  padding:26px;
}
.brand-row{display:flex;align-items:center;gap:12px;margin-bottom:18px}
.brand-logo{
  width:42px;height:42px;border-radius:12px;
  display:flex;align-items:center;justify-content:center;
  background:#ef233c;color:#fff;font-weight:900;font-size:24px;
}
h1{margin:0;font-size:28px}
h2{margin:0;font-size:20px}
.small{font-size:13px;color:var(--muted);line-height:1.5}
.field{display:flex;flex-direction:column;gap:7px;margin-top:13px}
.field label{font-size:13px;font-weight:700;color:#334155}
input,select,textarea{
  width:100%;
  border:1px solid #cbd5e1;
  border-radius:10px;
  padding:11px 12px;
  min-height:42px;
  background:#fff;
  color:#111827;
}
textarea{min-height:90px;resize:vertical}
.btn{
  border:0;border-radius:10px;
  padding:11px 14px;
  min-height:42px;
  font-weight:800;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
}
.btn-primary{background:var(--primary);color:white}
.btn-success{background:var(--success);color:white}
.btn-danger{background:var(--danger);color:white}
.btn-muted{background:#eef2f7;color:#334155;border:1px solid #cbd5e1}
.status{margin-top:12px;font-size:13px;min-height:18px}
.app-layout{
  display:grid;
  grid-template-columns:260px 1fr;
  min-height:100vh;
}
.sidebar{
  background:#fff;
  border-right:1px solid var(--line);
  padding:18px 14px;
}
.sidebar .brand-row{margin-bottom:24px}
.sidebar-section-title{
  margin:18px 8px 8px;
  font-size:12px;
  font-weight:900;
  color:#0f172a;
}
.menu-item{
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px 14px;
  border-radius:10px;
  color:#475569;
  font-weight:700;
  font-size:14px;
  margin-bottom:6px;
}
.menu-item:hover,.menu-item.active{
  background:var(--primary-soft);
  color:var(--primary);
}
.content{
  min-width:0;
  display:flex;
  flex-direction:column;
}
.topbar{
  height:72px;
  background:#fff;
  border-bottom:1px solid var(--line);
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 22px;
  gap:16px;
}
.searchbox{
  max-width:420px;
  width:100%;
}
.main{
  padding:22px;
}
.card{
  background:#fff;
  border:1px solid var(--line);
  border-radius:16px;
  padding:20px;
  box-shadow:0 8px 24px rgba(15,23,42,.04);
}
.card-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
  gap:18px;
}
.big-action{
  display:block;
  padding:24px;
  border:1px solid var(--line);
  border-radius:18px;
  background:#fff;
  transition:.2s;
}
.big-action:hover{
  transform:translateY(-2px);
  box-shadow:0 12px 34px rgba(15,23,42,.08);
  border-color:#c4b5fd;
}
.big-icon{
  width:48px;height:48px;border-radius:14px;
  display:flex;align-items:center;justify-content:center;
  background:var(--primary-soft);
  color:var(--primary);
  font-size:24px;
  margin-bottom:14px;
}
.table-wrap{
  overflow:auto;
  border:1px solid var(--line);
  border-radius:14px;
}
table{width:100%;border-collapse:collapse;min-width:850px;background:#fff}
th,td{
  border-bottom:1px solid var(--line);
  padding:11px 12px;
  text-align:left;
  font-size:13px;
  vertical-align:top;
}
th{background:#f8fafc;color:#334155;font-weight:900}
.form-grid{
  display:grid;
  grid-template-columns:minmax(120px,0.7fr) minmax(170px,1fr) minmax(160px,0.9fr) minmax(200px,1fr) minmax(150px,0.8fr) minmax(180px,1fr) 140px auto auto;
  gap:12px;
  align-items:end;
}
.hidden{display:none!important}
/* Prevent permission-controlled sidebar items from flashing incorrectly.
   api.js now paints cached permissions immediately; this rule is only a short
   first-load guard when there is no cache yet, not a repeated blank sidebar. */
body:not(.app-permissions-ready):not(.app-permissions-cached) .sidebar .menu-item[href]{
  visibility:hidden;
  opacity:0;
  pointer-events:none;
}
body.app-permissions-ready .sidebar .menu-item[href],
body.app-permissions-cached .sidebar .menu-item[href]{
  visibility:visible;
  opacity:1;
}
.sidebar .menu-item[href]{
  transition:opacity .08s ease;
}

@media(max-width:900px){
  .app-layout{grid-template-columns:1fr}
  .sidebar{display:none}
  .form-grid{grid-template-columns:1fr}
}


.import-card{
  margin-top:20px;
  padding:18px;
  border:1px solid var(--line);
  border-radius:16px;
  background:#f8fafc;
}
.import-grid{
  display:grid;
  grid-template-columns:minmax(280px,1fr) 140px 220px auto;
  gap:12px;
  align-items:end;
}
.mapping-wrap{
  margin-top:14px;
  border-top:1px solid var(--line);
  padding-top:14px;
}
.mapping-grid{
  display:grid;
  grid-template-columns:repeat(6, minmax(150px, 1fr));
  gap:12px;
}
@media(max-width:1100px){
  .import-grid,
  .mapping-grid{
    grid-template-columns:1fr;
  }
}


.table-filter-row th{
  background:#ffffff;
  position:sticky;
  top:38px;
  z-index:2;
}
.table-filter-row input,
.table-filter-row select{
  min-height:34px;
  padding:7px 9px;
  font-size:12px;
  border-radius:8px;
}
.btn-small{
  min-height:34px;
  padding:7px 10px;
  font-size:12px;
}
.user-filter-summary{
  margin-top:8px;
  color:#64748b;
  font-size:12px;
}


.filterable-th{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}
.column-filter-btn{
  border:0;
  background:transparent;
  color:#334155;
  font-size:15px;
  width:26px;
  height:26px;
  border-radius:7px;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.column-filter-btn:hover,
.column-filter-btn.active{
  background:var(--primary-soft);
  color:var(--primary);
}
.column-filter-panel{
  position:fixed;
  width:320px;
  max-width:calc(100vw - 24px);
  background:#ffffff;
  border:1px solid #cbd5e1;
  border-radius:14px;
  box-shadow:0 18px 60px rgba(15,23,42,.18);
  padding:14px;
  z-index:999999;
}
.column-filter-title{
  font-weight:900;
  color:#0f172a;
}
.column-filter-actions,
.column-filter-footer{
  display:flex;
  gap:8px;
  margin-top:10px;
}
.column-filter-list{
  margin-top:10px;
  max-height:240px;
  overflow:auto;
  border:1px solid #e5e7eb;
  border-radius:10px;
  background:#f8fafc;
  padding:6px;
}
.column-filter-item{
  display:flex;
  align-items:center;
  gap:8px;
  padding:7px 8px;
  border-radius:8px;
  font-size:13px;
  cursor:pointer;
}
.column-filter-item:hover{
  background:#eef2ff;
}
.column-filter-item input{
  width:auto;
  min-height:auto;
}
.column-filter-empty{
  color:#64748b;
  padding:10px;
  font-size:13px;
}
.column-filter-count{
  color:#64748b;
  font-size:12px;
  margin-top:8px;
}


.requestor-form-grid{
  display:grid;
  grid-template-columns:repeat(4, minmax(180px, 1fr));
  gap:12px;
  align-items:end;
}
.requestor-wide{
  grid-column:span 2;
}
.requestor-import-grid{
  grid-template-columns:minmax(320px,1fr) 140px auto;
}
.requestor-mapping-grid{
  grid-template-columns:repeat(4, minmax(160px, 1fr));
}
@media(max-width:1100px){
  .requestor-form-grid,
  .requestor-import-grid,
  .requestor-mapping-grid{
    grid-template-columns:1fr;
  }
  .requestor-wide{
    grid-column:span 1;
  }
}


.project-form-grid{
  display:grid;
  grid-template-columns:repeat(4, minmax(180px, 1fr));
  gap:12px;
  align-items:end;
}
.project-wide{
  grid-column:span 2;
}
.project-import-grid{
  grid-template-columns:minmax(320px,1fr) 140px auto;
}
.project-mapping-grid{
  grid-template-columns:repeat(4, minmax(160px, 1fr));
}
@media(max-width:1100px){
  .project-form-grid,
  .project-import-grid,
  .project-mapping-grid{
    grid-template-columns:1fr;
  }
  .project-wide{
    grid-column:span 1;
  }
}


.jobs-layout{
  display:grid;
  grid-template-columns:minmax(320px, 0.9fr) minmax(520px, 1.6fr);
  gap:18px;
  align-items:start;
}
.jobs-left-panel,
.jobs-right-panel{
  display:flex;
  flex-direction:column;
  gap:16px;
}
.sub-card{
  background:#fff;
  border:1px solid var(--line);
  border-radius:16px;
  padding:18px;
}
.sub-card h2{
  margin:0 0 8px;
}
.selected-row{
  background:#f1eafe;
}
.project-job-header-grid{
  display:grid;
  grid-template-columns:minmax(180px, 0.5fr) minmax(260px, 1fr) auto;
  gap:12px;
  align-items:end;
}
.header-textarea textarea{
  min-height:110px;
}
.job-data-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:14px;
}
.project-jobs-import-grid{
  grid-template-columns:minmax(320px,1fr) 140px auto;
}
.project-jobs-mapping-grid{
  grid-template-columns:repeat(4, minmax(160px,1fr));
}
.project-map-control-grid{
  display:grid;
  grid-template-columns:minmax(280px,1fr) 160px 160px auto;
  gap:12px;
  align-items:end;
}
.project-job-map{
  height:420px;
  min-height:320px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#eef2f7;
  margin-top:12px;
}
.dynamic-cell-input{
  min-width:160px;
  width:100%;
  border:1px solid #cbd5e1;
  border-radius:8px;
  padding:8px 9px;
  min-height:36px;
}
@media(max-width:1200px){
  .jobs-layout{
    grid-template-columns:1fr;
  }
  .project-job-header-grid,
  .project-jobs-import-grid,
  .project-jobs-mapping-grid,
  .project-map-control-grid{
    grid-template-columns:1fr;
  }
}


.header-import-box{
  margin-top:14px;
  border-top:1px solid var(--line);
  padding-top:14px;
}
.project-header-import-grid{
  display:grid;
  grid-template-columns:minmax(320px,1fr) 140px 220px auto;
  gap:12px;
  align-items:end;
}
.imported-headers-list{
  display:grid;
  grid-template-columns:repeat(4, minmax(180px, 1fr));
  gap:8px;
  max-height:220px;
  overflow:auto;
  border:1px solid #e5e7eb;
  border-radius:12px;
  background:#f8fafc;
  padding:10px;
}
.imported-header-item{
  display:flex;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  border-radius:10px;
  background:#fff;
  border:1px solid #e5e7eb;
  font-size:13px;
  cursor:pointer;
}
.imported-header-item:hover{
  background:#eef2ff;
}
.imported-header-item input{
  width:auto;
  min-height:auto;
}
@media(max-width:1200px){
  .project-header-import-grid,
  .imported-headers-list{
    grid-template-columns:1fr;
  }
}


.autosave-pill{
  display:inline-flex;
  align-items:center;
  min-height:38px;
  padding:8px 12px;
  border-radius:999px;
  background:#dcfce7;
  color:#166534;
  border:1px solid #86efac;
  font-weight:800;
  font-size:13px;
}


.map-info-card{
  min-width:280px;
  max-width:430px;
  font-family:inherit;
}
.map-info-title{
  font-weight:900;
  font-size:15px;
  margin-bottom:4px;
  color:#0f172a;
}
.map-info-subtitle{
  font-size:12px;
  color:#475569;
  margin-bottom:8px;
}
.map-info-table-wrap{
  max-height:260px;
  overflow:auto;
  border:1px solid #e2e8f0;
  border-radius:10px;
}
.map-info-table{
  width:100%;
  border-collapse:collapse;
  font-size:12px;
}
.map-info-table th,
.map-info-table td{
  border-bottom:1px solid #e2e8f0;
  padding:6px 8px;
  text-align:left;
  vertical-align:top;
}
.map-info-table th{
  width:42%;
  background:#f8fafc;
  font-weight:800;
  color:#334155;
}
.map-info-table td{
  color:#0f172a;
}
.map-info-button{
  margin-top:10px;
  border:0;
  border-radius:10px;
  padding:8px 10px;
  background:#7c3aed;
  color:#fff;
  font-weight:800;
  cursor:pointer;
}
.job-data-row.highlight-row{
  background:#fef3c7 !important;
  outline:3px solid #f59e0b;
  outline-offset:-3px;
}


.job-list-page .jobs-layout{
  grid-template-columns:1fr;
}
.job-list-page .jobs-left-panel,
.job-list-page .jobs-right-panel{
  width:100%;
}
.job-list-page .jobs-right-panel{
  display:flex;
  flex-direction:column;
  gap:16px;
  order:-1;
}
.job-list-page .jobs-right-panel > .sub-card:not(:first-child){
  display:none;
}
.job-list-page .jobs-right-panel .job-data-actions{
  display:none;
}
.job-list-page .jobs-right-panel #loadJobTablesBtn,
.job-list-page .jobs-right-panel #loadJobRowsBtn{
  display:none;
}
.job-list-page .sub-card{
  width:100%;
}
.job-list-page #jobsTable{
  min-width:1100px;
}
.job-list-instruction{
  background:#f8fafc;
}
.job-detail-page .job-detail-layout{
  display:block;
}
.job-detail-page .jobs-right-panel{
  display:flex;
  flex-direction:column;
  gap:16px;
}
.job-detail-page .jobs-right-panel > .sub-card:first-child{
  display:none;
}


.row-action-group{
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:nowrap;
}
.history-panel{
  margin-top:16px;
  border:1px solid #dbe4f0;
  border-radius:16px;
  padding:16px;
  background:#f8fafc;
}
.history-panel-header{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
  margin-bottom:12px;
}
.history-panel-header h3{
  margin:0 0 4px;
}
.history-value{
  max-width:360px;
  max-height:100px;
  overflow:auto;
  white-space:pre-wrap;
  word-break:break-word;
  border-radius:8px;
  padding:8px;
  border:1px solid #e2e8f0;
  background:#fff;
}
.old-value{
  background:#fff7ed;
}
.new-value{
  background:#ecfdf5;
}
.job-data-filter-btn.active{
  background:#ede9fe;
  color:#6d28d9;
  border-color:#c4b5fd;
}
#jobRowHistoryTable th,
#jobRowHistoryTable td{
  vertical-align:top;
}


.job-management-control-grid{
  display:grid;
  grid-template-columns:minmax(220px, 1.2fr) minmax(220px, 1.2fr) minmax(220px, 1.2fr) auto;
  gap:12px;
  align-items:end;
}
.job-management-buttons{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:end;
}
.job-management-summary{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin:14px 0;
}
.summary-pill{
  background:#f8fafc;
  border:1px solid #dbe4f0;
  border-radius:999px;
  padding:8px 12px;
  font-size:13px;
  font-weight:800;
  color:#334155;
}
.mini-search{
  border:1px solid #cbd5e1;
  border-radius:12px;
  padding:10px 12px;
  min-height:38px;
  min-width:240px;
}
.assignment-tag{
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  padding:6px 10px;
  background:#dcfce7;
  border:1px solid #86efac;
  color:#166534;
  font-weight:900;
  font-size:12px;
}
.unassigned-tag{
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  padding:6px 10px;
  background:#f1f5f9;
  border:1px solid #cbd5e1;
  color:#475569;
  font-weight:800;
  font-size:12px;
}
.assigned-row{
  background:#f8fff9;
}
#jobManagementTable th,
#jobManagementTable td{
  white-space:nowrap;
}
@media(max-width:1100px){
  .job-management-control-grid{
    grid-template-columns:1fr;
  }
}


.job-management-map-card{
  margin:16px 0;
}
.job-management-map-controls{
  display:grid;
  grid-template-columns:minmax(260px,1fr) 180px 180px;
  gap:12px;
  align-items:end;
  margin-bottom:12px;
}
.job-management-map{
  width:100%;
  height:430px;
  border:1px solid #dbe4f0;
  border-radius:16px;
  background:#eef2f7;
  overflow:hidden;
}
@media(max-width:1100px){
  .job-management-map-controls{
    grid-template-columns:1fr;
  }
}


.editable-columns-card{
  margin:14px 0;
  background:#f8fafc;
}
.editable-columns-list{
  display:grid;
  grid-template-columns:repeat(4, minmax(180px, 1fr));
  gap:8px;
  margin-top:12px;
  max-height:260px;
  overflow:auto;
}
.editable-column-item{
  display:flex;
  align-items:center;
  gap:8px;
  border:1px solid #dbe4f0;
  background:#fff;
  border-radius:12px;
  padding:9px 10px;
  font-weight:800;
  font-size:13px;
}
.editable-column-item input{
  width:auto;
  min-height:auto;
}
.my-task-summary{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin:12px 0 16px;
}
.my-task-cell.readonly{
  background:#f1f5f9;
  color:#64748b;
  cursor:not-allowed;
}
.my-task-cell.editable{
  background:#fff;
  border-color:#86efac;
}
.my-task-status{
  min-width:150px;
}
.my-task-note{
  min-width:170px;
}
#myTasksTable th,
#myTasksTable td{
  white-space:nowrap;
  vertical-align:top;
}
@media(max-width:1100px){
  .editable-columns-list{
    grid-template-columns:1fr;
  }
}

/* My Tasks job-level workflow */
.completion-box{
  display:grid;
  grid-template-columns:minmax(240px,1fr) minmax(220px,280px) minmax(220px,1fr) auto;
  gap:12px;
  align-items:end;
  border:1px solid #dbe4f0;
  border-radius:16px;
  padding:14px;
  background:#f8fafc;
  margin:12px 0 16px;
}
.completion-box input[type="file"],
.completion-box input[type="text"]{
  border:1px solid #cbd5e1;
  border-radius:12px;
  padding:10px 12px;
  min-height:42px;
  background:#fff;
}
.task-status-pill{
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  padding:6px 10px;
  font-size:12px;
  font-weight:900;
  border:1px solid #cbd5e1;
  background:#f8fafc;
  color:#334155;
  white-space:nowrap;
}
.task-status-not-started{background:#f1f5f9;color:#475569;}
.task-status-in-progress{background:#dbeafe;color:#1d4ed8;border-color:#93c5fd;}
.task-status-pending-on-hold{background:#fef3c7;color:#92400e;border-color:#fcd34d;}
.task-status-submitted{background:#ede9fe;color:#6d28d9;border-color:#c4b5fd;}
.task-status-rejected{background:#fee2e2;color:#b91c1c;border-color:#fca5a5;}
.task-status-approved,
.task-status-done{background:#dcfce7;color:#166534;border-color:#86efac;}
.active-task-job-row{background:#f5f3ff !important;}
.my-task-cell.editable{border-color:#86efac;background:#f0fdf4;}
.my-task-cell.readonly{background:#f8fafc;color:#64748b;}
@media(max-width:1100px){
  .completion-box{grid-template-columns:1fr;}
}


.btn-warning{
  background:#f59e0b;
  color:#fff;
  border-color:#f59e0b;
}
.btn-warning:hover{
  filter:brightness(0.96);
}


.task-session-pill{
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  padding:6px 10px;
  border:1px solid #dbe4f0;
  background:#f8fafc;
  font-weight:900;
  font-size:12px;
  white-space:nowrap;
}
.task-session-initial-complete,
.task-session-rework-complete{
  background:#dcfce7;
  border-color:#86efac;
  color:#166534;
}
.task-session-rework-requested{
  background:#ffedd5;
  border-color:#fdba74;
  color:#9a3412;
}
#taskWorkHistoryTable th,
#taskWorkHistoryTable td{
  vertical-align:top;
  white-space:nowrap;
}
#taskWorkHistoryTable .history-value{
  min-width:180px;
  max-width:300px;
  max-height:80px;
}

.kind-job-form-grid,
.project-target-grid{
  display:grid;
  grid-template-columns:repeat(6,minmax(130px,1fr));
  gap:12px;
  align-items:end;
}
.kind-description-field{ grid-column:span 6; }
.project-target-notes-field{ grid-column:span 2; }
.kind-tag{
  display:inline-flex;align-items:center;border-radius:999px;padding:5px 9px;background:#eef2ff;border:1px solid #c7d2fe;color:#3730a3;font-weight:900;font-size:12px;white-space:nowrap;
}
@media(max-width:1200px){
  .kind-job-form-grid,.project-target-grid{ grid-template-columns:1fr 1fr; }
  .kind-description-field,.project-target-notes-field{ grid-column:span 2; }
}
@media(max-width:700px){
  .kind-job-form-grid,.project-target-grid{ grid-template-columns:1fr; }
  .kind-description-field,.project-target-notes-field{ grid-column:span 1; }
}


.qc-finding-panel{
  margin-top:16px;
  border:1px solid #dbe4f0;
  border-radius:16px;
  padding:16px;
  background:#fffbeb;
}
.kind-tag{
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  padding:6px 10px;
  background:#eef2ff;
  border:1px solid #c7d2fe;
  color:#3730a3;
  font-weight:900;
  font-size:12px;
}
.severity-pill,
.finding-status-pill{
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  padding:5px 9px;
  font-weight:900;
  font-size:12px;
  border:1px solid #dbe4f0;
}
.severity-minor{ background:#ecfeff; color:#155e75; border-color:#a5f3fc; }
.severity-medium{ background:#fef9c3; color:#854d0e; border-color:#fde68a; }
.severity-major{ background:#ffedd5; color:#9a3412; border-color:#fdba74; }
.severity-critical{ background:#fee2e2; color:#991b1b; border-color:#fecaca; }
.finding-status-open{ background:#eff6ff; color:#1d4ed8; border-color:#bfdbfe; }
.finding-status-accepted{ background:#dcfce7; color:#166534; border-color:#86efac; }
.finding-status-cancelled{ background:#fee2e2; color:#991b1b; border-color:#fecaca; }
.finding-status-resolved{ background:#f0fdf4; color:#15803d; border-color:#bbf7d0; }
.finding-status-disputed{ background:#fef3c7; color:#92400e; border-color:#fde68a; }


.workflow-pill{
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  padding:6px 10px;
  font-weight:900;
  font-size:12px;
  border:1px solid #dbe4f0;
  background:#f8fafc;
  color:#334155;
  white-space:nowrap;
}
.workflow-job-created,
.workflow-project-setup{
  background:#f8fafc;
  color:#334155;
  border-color:#dbe4f0;
}
.workflow-production-process{
  background:#eff6ff;
  color:#1d4ed8;
  border-color:#bfdbfe;
}
.workflow-waiting-qc{
  background:#fff7ed;
  color:#c2410c;
  border-color:#fed7aa;
}
.workflow-qc-process{
  background:#f5f3ff;
  color:#6d28d9;
  border-color:#ddd6fe;
}
.workflow-qc-done{
  background:#ecfdf5;
  color:#047857;
  border-color:#a7f3d0;
}
.workflow-completed{
  background:#dcfce7;
  color:#166534;
  border-color:#86efac;
}
.workflow-cancelled{
  background:#fee2e2;
  color:#991b1b;
  border-color:#fecaca;
}

.task-status-qc-process{
  background:#f5f3ff;
  color:#6d28d9;
  border-color:#ddd6fe;
}
.task-status-waiting-qc{
  background:#fff7ed;
  color:#c2410c;
  border-color:#fed7aa;
}
.task-status-qc-done{
  background:#ecfdf5;
  color:#047857;
  border-color:#a7f3d0;
}

/* =========================================================
   PROFESSIONAL UI REFRESH PATCH
   Scope: visual polish only. No HTML/JS workflow logic changed.
   ========================================================= */
:root{
  --bg:#f4f7fb;
  --panel:#ffffff;
  --text:#0f172a;
  --muted:#64748b;
  --line:#e2e8f0;
  --primary:#4f46e5;
  --primary-2:#7c3aed;
  --primary-soft:#eef2ff;
  --danger:#dc2626;
  --success:#16a34a;
  --blue:#0284c7;
  --warning:#f59e0b;
  --sidebar:#101827;
  --sidebar-2:#172033;
  --sidebar-text:#cbd5e1;
  --sidebar-muted:#94a3b8;
  --radius-lg:20px;
  --radius-md:14px;
  --shadow-card:0 18px 45px rgba(15,23,42,.08);
  --shadow-soft:0 10px 28px rgba(15,23,42,.06);
  --shadow-hover:0 22px 55px rgba(15,23,42,.12);
}

html{scroll-behavior:smooth;}
body{
  font-family:Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(79,70,229,.12), transparent 34%),
    radial-gradient(circle at top right, rgba(14,165,233,.10), transparent 30%),
    linear-gradient(180deg,#f8fafc 0%,#eef2f7 100%);
  color:var(--text);
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}

h1,h2,h3{
  letter-spacing:-.025em;
  color:#0f172a;
}
h1{font-size:clamp(26px,2.4vw,34px);font-weight:900;line-height:1.12;}
h2{font-size:clamp(18px,1.5vw,22px);font-weight:900;line-height:1.2;}
.small{color:#64748b;line-height:1.6;}

.app-layout{
  grid-template-columns:280px minmax(0,1fr);
}
.sidebar{
  position:sticky;
  top:0;
  height:100vh;
  overflow:auto;
  background:
    linear-gradient(180deg,rgba(255,255,255,.05),rgba(255,255,255,0) 28%),
    linear-gradient(180deg,var(--sidebar),var(--sidebar-2));
  border-right:1px solid rgba(255,255,255,.08);
  padding:22px 16px;
  box-shadow:12px 0 32px rgba(15,23,42,.12);
}
.sidebar::-webkit-scrollbar{width:8px;}
.sidebar::-webkit-scrollbar-thumb{background:rgba(148,163,184,.35);border-radius:999px;}
.sidebar .brand-row{
  color:#fff;
  padding:10px 10px 18px;
  border-bottom:1px solid rgba(255,255,255,.09);
  margin-bottom:18px;
}
.sidebar .brand-row *{color:inherit;}
.brand-logo{
  background:linear-gradient(135deg,#6366f1,#8b5cf6 52%,#06b6d4);
  box-shadow:0 14px 30px rgba(99,102,241,.35);
  border:1px solid rgba(255,255,255,.22);
}
.sidebar-section-title{
  color:#94a3b8;
  text-transform:uppercase;
  letter-spacing:.095em;
  font-size:11px;
  margin:22px 10px 9px;
}
.menu-item{
  position:relative;
  color:var(--sidebar-text);
  border:1px solid transparent;
  border-radius:14px;
  padding:11px 13px;
  margin-bottom:5px;
  transition:background .18s ease,color .18s ease,transform .18s ease,border-color .18s ease;
}
.menu-item:hover{
  background:rgba(255,255,255,.08);
  color:#fff;
  transform:translateX(2px);
}
.menu-item.active{
  background:linear-gradient(135deg,rgba(99,102,241,.28),rgba(14,165,233,.18));
  color:#fff;
  border-color:rgba(255,255,255,.13);
  box-shadow:inset 4px 0 0 #38bdf8;
}

.content{min-width:0;}
.topbar{
  min-height:76px;
  height:auto;
  position:sticky;
  top:0;
  z-index:50;
  background:rgba(255,255,255,.86);
  backdrop-filter:blur(16px);
  border-bottom:1px solid rgba(226,232,240,.86);
  box-shadow:0 10px 32px rgba(15,23,42,.05);
  padding:14px 26px;
}
.searchbox,
.topbar input[type="text"]{
  max-width:520px;
  border-radius:999px;
  border-color:#dbe4f0;
  background:#f8fafc;
  padding-left:18px;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.8);
}
.main{padding:28px;}

.card,
.sub-card,
.import-card,
.history-panel,
.qc-finding-panel,
.editable-columns-card{
  border-color:rgba(226,232,240,.95);
  border-radius:var(--radius-lg);
  background:rgba(255,255,255,.94);
  box-shadow:var(--shadow-card);
}
.card{
  padding:24px;
}
.main > .card:first-child{
  position:relative;
  overflow:hidden;
}
.main > .card:first-child::before{
  content:"";
  position:absolute;
  inset:0 0 auto 0;
  height:4px;
  background:linear-gradient(90deg,#4f46e5,#06b6d4,#22c55e);
}

.field label{
  color:#334155;
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.055em;
  font-weight:900;
}
input,select,textarea,
.dynamic-cell-input,
.mini-search{
  border-color:#d7e0ec;
  border-radius:13px;
  background:#ffffff;
  color:#0f172a;
  transition:border-color .16s ease,box-shadow .16s ease,background .16s ease;
}
input:hover,select:hover,textarea:hover,
.dynamic-cell-input:hover,.mini-search:hover{
  border-color:#b6c6dc;
}
input:focus,select:focus,textarea:focus,
.dynamic-cell-input:focus,.mini-search:focus{
  outline:none;
  border-color:#818cf8;
  box-shadow:0 0 0 4px rgba(99,102,241,.14);
}
input[readonly],textarea[readonly]{background:#f8fafc;color:#64748b;}

.btn{
  border-radius:13px;
  font-weight:900;
  letter-spacing:.005em;
  border:1px solid transparent;
  box-shadow:0 8px 18px rgba(15,23,42,.08);
  transition:transform .16s ease,box-shadow .16s ease,filter .16s ease,background .16s ease,border-color .16s ease;
}
.btn:hover{
  transform:translateY(-1px);
  box-shadow:0 14px 28px rgba(15,23,42,.12);
}
.btn:active{transform:translateY(0);box-shadow:0 7px 16px rgba(15,23,42,.10);}
.btn-primary{background:linear-gradient(135deg,#4f46e5,#7c3aed);color:#fff;}
.btn-success{background:linear-gradient(135deg,#16a34a,#22c55e);color:#fff;}
.btn-danger{background:linear-gradient(135deg,#dc2626,#ef4444);color:#fff;}
.btn-warning{background:linear-gradient(135deg,#f59e0b,#f97316);color:#fff;}
.btn-muted{
  background:#fff;
  color:#334155;
  border-color:#d7e0ec;
  box-shadow:0 8px 18px rgba(15,23,42,.05);
}
.btn-muted:hover{border-color:#a5b4fc;background:#f8fafc;color:#4338ca;}
.btn-small{border-radius:10px;box-shadow:none;}

.card-grid{
  grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
  gap:20px;
}
.big-action{
  position:relative;
  overflow:hidden;
  border-color:#e2e8f0;
  border-radius:22px;
  background:linear-gradient(180deg,#fff,#fbfdff);
  box-shadow:var(--shadow-soft);
  padding:24px;
}
.big-action::after{
  content:"";
  position:absolute;
  right:-44px;
  top:-44px;
  width:118px;
  height:118px;
  border-radius:999px;
  background:rgba(99,102,241,.08);
}
.big-action:hover{
  transform:translateY(-4px);
  box-shadow:var(--shadow-hover);
  border-color:#c7d2fe;
}
.big-icon{
  background:linear-gradient(135deg,#eef2ff,#e0f2fe);
  color:#4f46e5;
  border:1px solid #dbeafe;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.85);
}

.table-wrap,
.wf-table-wrap,
.bill-table-wrap,
.report-table-wrap,
.workflow-job-list{
  border-color:#dbe4f0 !important;
  border-radius:18px !important;
  box-shadow:0 10px 28px rgba(15,23,42,.05) !important;
}
table,
.wf-table,
.bill-table,
.report-table,
.workflow-job-table{
  background:#fff;
}
th,
.wf-table th,
.bill-table th,
.report-table th,
.workflow-job-table th{
  background:linear-gradient(180deg,#f8fafc,#eef2f7) !important;
  color:#172554 !important;
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.045em;
  border-bottom:1px solid #dbe4f0 !important;
}
td,
.wf-table td,
.bill-table td,
.report-table td,
.workflow-job-table td{
  border-bottom:1px solid #edf2f7 !important;
}
tr:hover td,
.wf-table tr:hover td,
.bill-table tr:hover td,
.report-table tr:hover td,
.workflow-job-table tr:hover td{
  background:#f8fbff !important;
}

.status{
  color:#475569;
  font-weight:700;
}
.summary-pill,
.assignment-tag,
.unassigned-tag,
.task-status-pill,
.workflow-pill,
.kind-tag,
.severity-pill,
.finding-status-pill,
.autosave-pill{
  border-radius:999px;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.65);
}
.selected-row,
.active-task-job-row{
  background:#eef2ff !important;
  box-shadow:inset 4px 0 0 #4f46e5;
}

/* Page-specific visual polish overrides for inline styles */
.wf-card,
.bill-card,
.report-card,
.report-workflow-wrap,
.report-map-wrap,
.workflow-job-list{
  border:1px solid #e2e8f0 !important;
  border-radius:20px !important;
  background:rgba(255,255,255,.96) !important;
  box-shadow:0 14px 36px rgba(15,23,42,.06) !important;
  padding:18px !important;
}
.wf-panel,
.report-builder-row,
.criteria-row{
  border:1px solid #dbe4f0 !important;
  background:linear-gradient(180deg,#f8fafc,#ffffff) !important;
  border-radius:18px !important;
}
.wf-head,
.bill-head,
.report-hero,
.report-card-head,
.history-panel-header{
  padding-bottom:10px;
  border-bottom:1px solid #eef2f7;
}
.wf-section-title{color:#0f172a !important;}
.wf-summary-btn,
.bill-stat,
.report-stat,
.workflow-card{
  border:1px solid #e2e8f0 !important;
  border-radius:18px !important;
  background:linear-gradient(180deg,#ffffff,#f8fafc) !important;
  box-shadow:0 10px 24px rgba(15,23,42,.05) !important;
  transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease,background .16s ease;
}
.wf-summary-btn:hover,
.wf-summary-btn.active,
.workflow-card:hover,
.workflow-card.active{
  transform:translateY(-2px);
  border-color:#a5b4fc !important;
  background:linear-gradient(180deg,#f8f7ff,#eef2ff) !important;
  box-shadow:0 18px 36px rgba(79,70,229,.12) !important;
}
.wf-summary-btn.active,
.workflow-card.active{
  box-shadow:inset 4px 0 0 #4f46e5, 0 18px 36px rgba(79,70,229,.12) !important;
}
.wf-summary-btn .num,
.bill-stat .num,
.report-stat .num,
.workflow-card .workflow-count{
  color:#111827 !important;
  letter-spacing:-.04em;
}
.wf-summary-btn .label,
.bill-stat .label,
.report-stat .label,
.workflow-card .workflow-label{
  color:#334155 !important;
  letter-spacing:.01em;
}
.wf-empty,
.report-empty{
  border:1px dashed #cbd5e1 !important;
  border-radius:18px !important;
  background:linear-gradient(180deg,#f8fafc,#ffffff) !important;
  color:#64748b !important;
}
.wf-badge,
.bill-badge,
.report-badge{
  border-radius:999px !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.65);
}
.report-fixed-col{background:#f8fafc !important;}
#masterReportMap,
.project-job-map,
.job-management-map{
  border-radius:20px !important;
  border-color:#dbe4f0 !important;
  box-shadow:0 14px 34px rgba(15,23,42,.08);
}

.column-filter-panel{
  border-color:#dbe4f0;
  border-radius:18px;
  box-shadow:0 24px 70px rgba(15,23,42,.18);
}
.column-filter-list,
.imported-headers-list{
  border-radius:14px;
  background:#f8fafc;
}
.column-filter-item,
.imported-header-item,
.editable-column-item{
  border-radius:12px;
}

@media(max-width:900px){
  .app-layout{grid-template-columns:1fr;}
  .sidebar{position:static;height:auto;display:none;}
  .topbar{position:sticky;padding:12px 16px;}
  .main{padding:18px;}
  .card{padding:18px;}
}

/* === Brand logo replacement: Collaborative Synergy online logo === */
.sidebar .brand-row{
  min-height:76px;
  align-items:center;
}
.sidebar .brand-row > *{
  display:none !important;
}
.sidebar .brand-row::before{
  content:"";
  display:block;
  width:220px;
  height:54px;
  background-image:url("https://csynergy.com/wp-content/themes/csynergy/public/assets/images/logo.png");
  background-repeat:no-repeat;
  background-position:left center;
  background-size:contain;
  filter:drop-shadow(0 12px 22px rgba(15,23,42,.28));
}


/* === Sidebar brand logo white panel fix === */
.sidebar .brand-row{
  min-height:auto !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  padding:14px 16px !important;
  margin:0 2px 22px !important;
  background:#ffffff !important;
  border:1px solid rgba(255,255,255,.18) !important;
  border-radius:18px !important;
  box-shadow:0 12px 28px rgba(15,23,42,.18) !important;
}
.sidebar .brand-row::before{
  width:100% !important;
  height:60px !important;
  background-position:center left !important;
  background-size:contain !important;
  filter:none !important;
}

/* === Sidebar logo full-width + sticky/freeze === */
.sidebar{
  padding-top:0 !important;
}
.sidebar .brand-row{
  position:sticky !important;
  top:0 !important;
  z-index:40 !important;
  margin:0 -16px 18px !important;
  padding:16px 18px !important;
  justify-content:flex-start !important;
  background:#ffffff !important;
  border:0 !important;
  border-bottom:1px solid #e5e7eb !important;
  border-radius:0 0 18px 18px !important;
  box-shadow:0 10px 24px rgba(15,23,42,.16) !important;
}
.sidebar .brand-row::before{
  width:100% !important;
  max-width:220px !important;
  height:56px !important;
  background-position:left center !important;
  background-size:contain !important;
}

/* === Sidebar logo sharp full-width fix === */
.sidebar .brand-row{
  margin:0 -16px 18px -16px !important;
  padding:16px 18px !important;
  border-radius:0 !important;
  width:calc(100% + 32px) !important;
  max-width:none !important;
  box-sizing:border-box !important;
  background:#ffffff !important;
  border:0 !important;
  border-bottom:1px solid #e5e7eb !important;
  box-shadow:0 8px 18px rgba(15,23,42,.12) !important;
}
.sidebar .brand-row::before{
  width:100% !important;
  max-width:220px !important;
  height:56px !important;
  background-position:left center !important;
  background-size:contain !important;
}


/* Popup notification + loading indicator */
.app-toast-container{
  position:fixed;
  top:18px;
  right:18px;
  z-index:99999;
  display:flex;
  flex-direction:column;
  gap:10px;
  width:min(420px, calc(100vw - 28px));
  pointer-events:none;
}
.app-toast{
  pointer-events:auto;
  display:grid;
  grid-template-columns:36px 1fr auto;
  align-items:flex-start;
  gap:12px;
  padding:14px 14px;
  border-radius:16px;
  background:#ffffff;
  border:1px solid #dbe4f0;
  box-shadow:0 18px 40px rgba(15,23,42,.15);
  animation:appToastEnter .18s ease-out;
}
.app-toast.closing{
  opacity:0;
  transform:translateY(-6px) scale(.98);
  transition:all .18s ease;
}
.app-toast.success{border-left:5px solid var(--success)}
.app-toast.error{border-left:5px solid var(--danger)}
.app-toast.warning{border-left:5px solid #f59e0b}
.app-toast.info{border-left:5px solid var(--blue)}
.app-toast__icon{
  width:36px;
  height:36px;
  border-radius:12px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:900;
  color:#fff;
  background:var(--blue);
}
.app-toast.success .app-toast__icon{background:var(--success)}
.app-toast.error .app-toast__icon{background:var(--danger)}
.app-toast.warning .app-toast__icon{background:#f59e0b}
.app-toast__body{min-width:0}
.app-toast__title{
  font-size:13px;
  font-weight:900;
  color:#0f172a;
  margin-bottom:4px;
}
.app-toast__message{
  font-size:13px;
  line-height:1.45;
  color:#334155;
  word-break:break-word;
}
.app-toast__close{
  border:0;
  background:transparent;
  color:#64748b;
  font-size:22px;
  line-height:1;
  cursor:pointer;
  padding:0;
  width:26px;
  height:26px;
}
.app-loading-overlay{
  position:fixed;
  inset:0;
  z-index:99998;
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(248,250,252,.62);
  backdrop-filter:blur(2px);
  opacity:0;
  visibility:hidden;
  transition:opacity .18s ease, visibility .18s ease;
}
.app-loading-overlay.show{
  opacity:1;
  visibility:visible;
}
.app-loading-box{
  min-width:280px;
  max-width:90vw;
  display:flex;
  align-items:center;
  gap:14px;
  border-radius:18px;
  padding:18px 20px;
  background:#fff;
  border:1px solid #dbe4f0;
  box-shadow:0 20px 50px rgba(15,23,42,.18);
}
.app-spinner{
  width:28px;
  height:28px;
  border-radius:50%;
  border:3px solid #e5e7eb;
  border-top-color:var(--primary);
  animation:appSpin .8s linear infinite;
  flex:0 0 auto;
}
.app-loading-title{
  font-size:14px;
  font-weight:900;
  color:#0f172a;
  margin-bottom:4px;
}
.app-loading-message{
  font-size:13px;
  color:#64748b;
  line-height:1.4;
}
@keyframes appSpin{
  to{transform:rotate(360deg)}
}
@keyframes appToastEnter{
  from{opacity:0;transform:translateY(-10px) scale(.98)}
  to{opacity:1;transform:translateY(0) scale(1)}
}
@media(max-width:700px){
  .app-toast-container{
    top:12px;
    right:12px;
    left:12px;
    width:auto;
  }
  .app-loading-box{
    min-width:0;
    width:calc(100vw - 28px);
  }
}

/* My Tasks O-Calc import / GPS match preview */
.ocalc-import-panel{
  margin:14px 0;
  padding:14px;
  border:1px solid #dbe4f0;
  border-radius:16px;
  background:#f8fbff;
}
.ocalc-import-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
}
.ocalc-import-controls{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  flex-wrap:wrap;
}
.ocalc-import-controls input[type="file"]{
  min-width:260px;
  max-width:360px;
}
.ocalc-import-controls input[type="number"]{
  width:92px;
}
.ocalc-tolerance-label{
  font-size:12px;
  font-weight:800;
  color:#334155;
}
.ocalc-import-summary{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  margin:10px 0;
}
.ocalc-match-pill{
  display:inline-block;
  padding:4px 8px;
  border-radius:999px;
  font-size:11px;
  font-weight:900;
  border:1px solid transparent;
}
.ocalc-match-pill.ok{
  background:#dcfce7;
  border-color:#86efac;
  color:#166534;
}
.ocalc-match-pill.warn{
  background:#fef3c7;
  border-color:#facc15;
  color:#92400e;
}
.ocalc-match-pill.danger{
  background:#fee2e2;
  border-color:#fca5a5;
  color:#991b1b;
}
#ocalcMatchPreviewTable td,
#ocalcMatchPreviewTable th{
  white-space:nowrap;
}
@media(max-width:900px){
  .ocalc-import-header{display:block}
  .ocalc-import-controls{justify-content:flex-start;margin-top:12px}
  .ocalc-import-controls input[type="file"]{min-width:100%;max-width:100%}
}


/* O-Calc import/history enhancements */
.ocalc-import-controls input#ocalcProposedOwnerInput {
  min-width: 260px;
  flex: 1 1 260px;
}
.ocalc-history-panel {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #dbe7f5;
  border-radius: 16px;
  background: #fff;
}
#ocalcRowHistoryModal {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #dbe7f5;
  border-radius: 16px;
  background: #fff;
}
#ocalcMatchPreviewTable td,
#ocalcRowHistoryTable td,
#ocalcImportHistoryTable td {
  vertical-align: top;
}
#ocalcRowHistoryTable td:nth-child(8),
#ocalcRowHistoryTable td:nth-child(9),
#ocalcRowHistoryTable td:nth-child(10) {
  max-width: 260px;
  white-space: normal;
  line-height: 1.35;
}

/* Team Work Board row request flow */
.team-work-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(360px,1fr));
  gap:18px;
  margin-top:18px;
}
.team-work-section{margin-top:0}
.section-head{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
  margin-bottom:12px;
}
.team-work-list{
  display:flex;
  flex-direction:column;
  gap:12px;
}
.team-work-list.compact{gap:10px}
.team-work-card,
.team-work-request-row{
  border:1px solid #dbe4f0;
  background:#ffffff;
  border-radius:16px;
  padding:14px;
  box-shadow:0 8px 20px rgba(15,23,42,.04);
}
.team-work-card-top,
.team-work-request-row{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:14px;
}
.team-work-card h3{margin:4px 0 0;font-size:17px}

.team-work-card.project-team-job{
  border-color:#c7d2fe;
  background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%);
}
.team-work-card .muted-note{
  display:block;
  color:#64748b;
  background:#f8fafc;
  border:1px dashed #cbd5e1;
  border-radius:10px;
  padding:8px 10px;
}
.team-work-card-body{
  display:grid;
  gap:5px;
  font-size:13px;
  color:#334155;
  margin-top:12px;
}
.team-work-actions,
.team-work-request-actions{
  display:flex;
  gap:8px;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
  margin-top:12px;
}
.team-work-request-actions{margin-top:0;min-width:220px}
.btn-small{min-height:34px;padding:8px 10px;font-size:12px;border-radius:9px}
.wf-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  padding:5px 9px;
  font-size:11px;
  font-weight:900;
  border:1px solid #dbe4f0;
  background:#f8fafc;
  color:#334155;
  white-space:nowrap;
}
.wf-badge.green{background:#dcfce7;border-color:#86efac;color:#166534}
.wf-badge.orange{background:#fffbeb;border-color:#facc15;color:#92400e}
.wf-badge.red{background:#fee2e2;border-color:#fca5a5;color:#991b1b}
.wf-empty{
  border:1px dashed #cbd5e1;
  border-radius:12px;
  padding:14px;
  color:#64748b;
  background:#f8fafc;
}
.team-work-meta{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:12px;
}
.summary-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:34px;
  padding:7px 12px;
  border-radius:999px;
  background:#f8fafc;
  border:1px solid #dbe4f0;
  font-size:12px;
  font-weight:900;
  color:#334155;
}
.twb-modal{
  position:fixed;
  inset:0;
  z-index:99990;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:22px;
  background:rgba(15,23,42,.46);
  backdrop-filter:blur(2px);
}
.twb-modal-panel{
  width:min(1180px, 100%);
  max-height:92vh;
  display:flex;
  flex-direction:column;
  background:#fff;
  border-radius:20px;
  border:1px solid #dbe4f0;
  box-shadow:0 28px 70px rgba(15,23,42,.24);
  overflow:hidden;
}
.twb-modal-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:14px;
  padding:18px 20px;
  border-bottom:1px solid #e5e7eb;
}
.twb-modal-head h2{margin:3px 0 0}
.twb-modal-close{
  border:0;
  background:#f1f5f9;
  border-radius:12px;
  width:38px;
  height:38px;
  cursor:pointer;
  font-size:24px;
  color:#334155;
}
.twb-row-toolbar{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  padding:14px 20px;
  border-bottom:1px solid #e5e7eb;
  background:#f8fafc;
}
.twb-row-toolbar input{max-width:420px;flex:1 1 280px}
.twb-row-table-wrap{
  margin:0 20px;
  border-radius:14px;
  flex:1 1 auto;
  overflow:auto;
}
.team-work-row-table{min-width:980px}
.team-work-row-table tr.selected td{background:#f5f3ff}
.team-work-row-table input[type="checkbox"]{
  width:18px;
  height:18px;
  min-height:18px;
  padding:0;
}
.twb-row-footer{
  display:grid;
  grid-template-columns:1fr auto;
  gap:12px;
  padding:16px 20px;
  border-top:1px solid #e5e7eb;
  background:#fff;
}
.twb-row-footer textarea{min-height:72px}
.twb-row-footer-actions{
  display:flex;
  gap:10px;
  align-items:flex-end;
  justify-content:flex-end;
  flex-wrap:wrap;
}
body.modal-open{overflow:hidden}
@media(max-width:760px){
  .team-work-grid{grid-template-columns:1fr}
  .team-work-card-top,
  .team-work-request-row{display:block}
  .team-work-request-actions{justify-content:flex-start;margin-top:12px;min-width:0}
  .twb-row-footer{grid-template-columns:1fr}
  .twb-modal{padding:10px}
}

/* My Tasks editable table auto-fit sizing */
#myTasksTable{
  width:max-content;
  min-width:100%;
  table-layout:auto;
}
#myTasksTable th,
#myTasksTable td{
  white-space:nowrap;
  vertical-align:middle;
}
#myTasksTable th{
  line-height:1.25;
}
#myTasksTable .my-task-cell,
#myTasksTable .my-task-note{
  box-sizing:border-box;
  display:inline-block;
  width:auto;
  min-height:34px;
  padding:8px 10px;
}
#myTasksTable .my-task-cell.editable{
  border-color:#86efac;
  background:#f0fdf4;
}
#myTasksTable .my-task-cell.readonly{
  background:#f8fafc;
  color:#64748b;
}
#myTasksTable .row-action-group{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:nowrap;
}
#myTasksTable .row-action-group .btn{
  white-space:nowrap;
}

/* Project Job Detail: manual GPS / coordinate row entry */
.manual-map-row-box{
  margin-top:14px;
  padding:14px;
  border:1px solid rgba(148,163,184,.35);
  border-radius:16px;
  background:linear-gradient(180deg,rgba(248,250,252,.92),rgba(255,255,255,.96));
}
.manual-map-row-box h3{
  margin:0 0 4px;
  font-size:16px;
  font-weight:900;
  color:#0f172a;
}
.manual-map-row-grid{
  display:grid;
  grid-template-columns:minmax(170px,1fr) minmax(130px,.75fr) minmax(140px,.75fr) minmax(240px,1.35fr) auto;
  gap:12px;
  align-items:end;
  margin-top:12px;
}
.manual-map-row-grid .btn{
  min-height:42px;
  white-space:nowrap;
}
@media(max-width:1200px){
  .manual-map-row-grid{
    grid-template-columns:1fr 1fr;
  }
  .manual-map-row-grid .manual-map-gps-field,
  .manual-map-row-grid .btn{
    grid-column:1 / -1;
  }
}
@media(max-width:720px){
  .manual-map-row-grid{
    grid-template-columns:1fr;
  }
}

/* App notification center + sidebar action badges */
.topbar-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:12px;
  min-width:fit-content;
}
.app-notification-center{
  position:relative;
  display:inline-flex;
  align-items:center;
}
.app-notification-button{
  position:relative;
  width:42px;
  height:42px;
  border-radius:14px;
  border:1px solid #dbe5f2;
  background:#ffffff;
  color:#1e293b;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  box-shadow:0 8px 22px rgba(15,23,42,.06);
}
.app-notification-button:hover{
  border-color:#93c5fd;
  background:#f8fbff;
}
.app-notification-icon{font-size:18px;line-height:1;}
.app-notification-badge,
.menu-badge{
  min-width:20px;
  height:20px;
  padding:0 6px;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:11px;
  font-weight:900;
  line-height:1;
  background:#ef4444;
  color:#ffffff;
  box-shadow:0 0 0 2px rgba(255,255,255,.85);
}
.app-notification-badge{
  position:absolute;
  top:-6px;
  right:-6px;
}
.app-notification-dropdown{
  position:absolute;
  top:52px;
  right:0;
  z-index:80;
  width:min(420px, calc(100vw - 32px));
  max-height:70vh;
  overflow:hidden;
  background:#ffffff;
  border:1px solid #dbe5f2;
  border-radius:18px;
  box-shadow:0 24px 70px rgba(15,23,42,.22);
}
.app-notification-head{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
  padding:16px;
  border-bottom:1px solid #e5eaf2;
  background:linear-gradient(135deg,#ffffff,#f8fbff);
}
.app-notification-title{font-weight:900;color:#0f172a;font-size:15px;}
.app-notification-subtitle{font-size:12px;color:#64748b;margin-top:3px;}
.app-notification-mark-all,
.app-notification-read,
.app-notification-view{
  border:1px solid #cbd5e1;
  background:#ffffff;
  color:#334155;
  border-radius:10px;
  padding:7px 9px;
  font-size:12px;
  font-weight:800;
  cursor:pointer;
  white-space:nowrap;
}
.app-notification-mark-all:disabled{opacity:.45;cursor:not-allowed;}
.app-notification-view{background:#eef2ff;border-color:#c4b5fd;color:#5b21b6;}
.app-notification-list{max-height:calc(70vh - 74px);overflow:auto;}
.app-notification-empty{padding:18px;color:#64748b;font-size:13px;}
.app-notification-item{
  display:grid;
  grid-template-columns:10px 1fr auto;
  gap:10px;
  padding:14px 16px;
  border-bottom:1px solid #edf2f7;
  align-items:start;
}
.app-notification-item:last-child{border-bottom:0;}
.app-notification-item.is-unread{background:#f8fbff;}
.app-notification-dot{
  width:9px;
  height:9px;
  border-radius:999px;
  background:#0ea5e9;
  margin-top:5px;
}
.app-notification-item.success .app-notification-dot{background:#22c55e;}
.app-notification-item.warning .app-notification-dot{background:#f59e0b;}
.app-notification-item.error .app-notification-dot{background:#ef4444;}
.app-notification-content{min-width:0;}
.app-notification-item-title{font-size:13px;font-weight:900;color:#0f172a;}
.app-notification-message{font-size:12px;color:#475569;line-height:1.45;margin-top:4px;}
.app-notification-time{font-size:11px;color:#94a3b8;margin-top:6px;}
.app-notification-actions{display:flex;flex-direction:column;gap:7px;align-items:flex-end;}
.menu-item{
  justify-content:space-between;
}
.menu-item-label{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.menu-badge{
  margin-left:auto;
  flex:0 0 auto;
  box-shadow:none;
}
.menu-item[data-badge-key="myTasks"] .menu-badge{background:#2563eb;}
.menu-item[data-badge-key="teamWorkBoard"] .menu-badge,
.menu-item[data-badge-key="jobWorkflow"] .menu-badge,
.menu-item[data-badge-key="billingReport"] .menu-badge{background:#f97316;}
.menu-item[data-badge-key="qcFindings"] .menu-badge{background:#ef4444;}
@media(max-width:720px){
  .app-notification-dropdown{right:-88px;width:calc(100vw - 24px);}
  .topbar-actions{gap:8px;}
}

/* Developer-only API mode helper */
.tracker-dev-api-pill{
  position:fixed;
  left:14px;
  bottom:14px;
  z-index:9999;
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:7px 10px;
  border-radius:999px;
  border:1px solid #bfdbfe;
  background:#eff6ff;
  color:#1d4ed8;
  font-size:11px;
  font-weight:900;
  letter-spacing:.02em;
  text-decoration:none;
  box-shadow:0 10px 24px rgba(15,23,42,.12);
}
.tracker-dev-api-pill.is-active{
  background:#fff7ed;
  color:#c2410c;
  border-color:#fed7aa;
}
.dev-settings-page{
  min-height:100vh;
  background:linear-gradient(135deg,#eef6ff 0%,#f8fafc 46%,#fff7ed 100%);
  padding:32px 18px;
}
.dev-settings-shell{max-width:920px;margin:0 auto;}
.dev-settings-card{
  background:#fff;
  border:1px solid #dbe4f0;
  border-radius:28px;
  padding:24px;
  box-shadow:0 24px 70px rgba(15,23,42,.12);
}
.dev-alert{
  margin-top:18px;
  padding:12px 14px;
  border-radius:16px;
  border:1px solid #fed7aa;
  background:#fff7ed;
  color:#9a3412;
  font-size:13px;
  font-weight:800;
}
.dev-status-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  margin-top:18px;
}
.dev-status-card{
  border:1px solid #dbe4f0;
  background:#f8fafc;
  border-radius:18px;
  padding:14px;
}
.dev-status-card.wide{grid-column:1 / -1;}
.dev-status-card .label{font-size:11px;font-weight:900;color:#64748b;text-transform:uppercase;letter-spacing:.05em;}
.dev-status-card .value{font-size:15px;font-weight:900;color:#0f172a;margin-top:6px;word-break:break-word;}
.dev-status-card .value.mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:13px;}
.dev-mode-list{display:grid;gap:10px;margin-top:18px;}
.dev-mode-option{
  display:flex;
  gap:12px;
  align-items:flex-start;
  border:1px solid #dbe4f0;
  border-radius:18px;
  padding:14px;
  cursor:pointer;
  background:#fff;
}
.dev-mode-option:hover{background:#f8fafc;}
.dev-mode-option input{margin-top:4px;}
.dev-mode-option b{display:block;color:#0f172a;}
.dev-mode-option small{display:block;color:#64748b;margin-top:4px;line-height:1.4;}
.dev-field{display:grid;gap:6px;margin-left:30px;margin-bottom:8px;}
.dev-field label{font-size:12px;font-weight:900;color:#475569;}
.dev-field input{
  width:100%;
  border:1px solid #dbe4f0;
  border-radius:14px;
  padding:10px 12px;
  font-size:13px;
}
.dev-actions,.dev-footer-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:18px;}
@media(max-width:640px){
  .dev-status-grid{grid-template-columns:1fr;}
  .dev-field{margin-left:0;}
  .tracker-dev-api-pill{left:10px;bottom:10px;}
}

/* Role & Permission Management */
.role-hero{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;flex-wrap:wrap;}
.role-layout{display:grid;grid-template-columns:minmax(260px,360px) 1fr;gap:18px;align-items:start;}
.role-list{display:flex;flex-direction:column;gap:10px;margin-top:14px;}
.role-list-item{width:100%;border:1px solid #d7e2f3;background:#fff;border-radius:16px;padding:14px;text-align:left;display:flex;justify-content:space-between;align-items:center;gap:10px;cursor:pointer;transition:.16s ease;}
.role-list-item:hover{border-color:#8ea6ff;box-shadow:0 10px 24px rgba(15,23,42,.08);}
.role-list-item.active{border-color:#6d5dfc;background:#f5f7ff;box-shadow:0 0 0 2px rgba(109,93,252,.14) inset;}
.role-chip,.role-status-pill{font-size:11px;font-weight:900;border-radius:999px;padding:6px 9px;white-space:nowrap;}
.role-chip{background:#eef2ff;color:#4338ca;border:1px solid #c7d2fe;}
.role-status-pill.active{background:#ecfdf5;color:#047857;border:1px solid #86efac;}
.role-status-pill.inactive{background:#fff1f2;color:#be123c;border:1px solid #fecdd3;}
.role-empty{border:1px dashed #cbd5e1;border-radius:16px;padding:18px;color:#64748b;}
.role-toolbar{display:flex;gap:10px;margin:16px 0 12px;flex-wrap:wrap;}
.role-toolbar input,.role-toolbar select{border:1px solid #d7e2f3;border-radius:14px;padding:12px 14px;min-width:220px;background:#fff;}
.role-permission-wrap{max-height:620px;overflow:auto;}
.role-permission-table{min-width:860px;}
.role-permission-table th,.role-permission-table td{text-align:left;white-space:nowrap;}
.role-permission-table td:not(:first-child),.role-permission-table th:not(:first-child){text-align:center;}
.role-permission-table input[type="checkbox"]{width:18px;height:18px;accent-color:#6d5dfc;}
@media (max-width:1100px){.role-layout{grid-template-columns:1fr;}}

/* Master Completion Policy / My Tasks completion policy */
.completion-policy-layout{display:grid;grid-template-columns:minmax(360px,1.05fr) minmax(420px,1.2fr);gap:16px;align-items:start;}
.completion-policy-switches{display:flex;gap:12px;flex-wrap:wrap;margin-top:10px;}
.completion-policy-switches label{display:inline-flex;align-items:center;gap:7px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:12px;padding:8px 10px;font-size:12px;font-weight:700;color:#334155;}
.completion-items-panel{margin-top:18px;border-top:1px solid #e5e7eb;padding-top:14px;}
.compact-grid{grid-template-columns:90px minmax(200px,1fr) 160px 170px;}
.completion-policy-box{display:block;}
.completion-policy-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;flex-wrap:wrap;margin-bottom:12px;}
.completion-form-grid{display:grid;grid-template-columns:minmax(260px,1fr) minmax(220px,.7fr);gap:12px;align-items:start;margin-top:12px;}
.completion-checklist-wrap{border:1px solid #dbeafe;background:#f8fbff;border-radius:14px;padding:12px;margin-top:10px;}
.completion-checklist-title{font-weight:900;color:#0f172a;margin-bottom:8px;}
.completion-checklist-item{display:flex;gap:10px;align-items:flex-start;border-top:1px solid #e2e8f0;padding:10px 0;color:#334155;font-size:13px;}
.completion-checklist-item:first-of-type{border-top:0;}
.completion-checklist-item.is-inline input{margin-top:3px;}
.completion-checklist-item textarea,.completion-checklist-item input[type="number"],.completion-checklist-item select{width:100%;border:1px solid #cbd5e1;border-radius:10px;padding:8px;background:#fff;}
.required-pill,.optional-pill{display:inline-flex;align-items:center;border-radius:999px;padding:2px 7px;font-size:10px;font-weight:900;margin-left:6px;}
.required-pill{background:#fee2e2;color:#991b1b;}
.optional-pill{background:#e0f2fe;color:#075985;}
@media(max-width:980px){.completion-policy-layout,.completion-form-grid,.compact-grid{grid-template-columns:1fr;}}

/* CPOL_LAYOUT_FIX_V3_ROW_CHECKLIST_START */
.completion-policy-layout{
  display:grid !important;
  grid-template-columns:1fr !important;
  gap:18px !important;
  align-items:start !important;
  width:100% !important;
  max-width:100% !important;
  overflow:visible !important;
}
.completion-policy-layout > .sub-card,
#completionPolicyForm,
#policyItemsPanel{
  min-width:0 !important;
  width:100% !important;
  max-width:100% !important;
  overflow:visible !important;
}
#completionPolicyForm .form-grid,
#policyItemsPanel .form-grid,
#policyItemsPanel .compact-grid{
  display:grid !important;
  grid-template-columns:repeat(2, minmax(240px, 1fr)) !important;
  gap:14px !important;
  align-items:start !important;
  width:100% !important;
  max-width:100% !important;
}
#completionPolicyForm .field,
#policyItemsPanel .field{ min-width:0 !important; max-width:100% !important; }
#completionPolicyForm input,
#completionPolicyForm select,
#completionPolicyForm textarea,
#policyItemsPanel input,
#policyItemsPanel select,
#policyItemsPanel textarea{ width:100% !important; max-width:100% !important; min-width:0 !important; }
#completionPolicyForm textarea{ min-height:110px !important; }
#completionPolicyForm .completion-policy-switches,
#policyItemsPanel .completion-policy-switches{
  display:grid !important;
  grid-template-columns:repeat(2, minmax(280px, 1fr)) !important;
  gap:12px !important;
  width:100% !important;
  max-width:100% !important;
  margin-top:14px !important;
  overflow:visible !important;
}
#completionPolicyForm .completion-policy-switches label,
#policyItemsPanel .completion-policy-switches label{
  display:flex !important;
  flex-direction:row !important;
  align-items:center !important;
  justify-content:flex-start !important;
  gap:12px !important;
  width:100% !important;
  max-width:100% !important;
  min-height:58px !important;
  padding:12px 14px !important;
  box-sizing:border-box !important;
  white-space:normal !important;
  overflow:visible !important;
  line-height:1.25 !important;
  overflow-wrap:anywhere !important;
  text-align:left !important;
}
#completionPolicyForm .completion-policy-switches input[type="checkbox"],
#policyItemsPanel .completion-policy-switches input[type="checkbox"]{
  flex:0 0 28px !important;
  width:28px !important;
  height:28px !important;
  min-width:28px !important;
  margin:0 !important;
  accent-color:#0ea5e9 !important;
}
.completion-policy-item-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:12px;align-items:center;}
#completionPolicyTable{min-width:720px !important;}
#completionItemTable{min-width:980px !important;}
#completionPolicyTable th,#completionPolicyTable td,#completionItemTable th,#completionItemTable td{white-space:normal !important;}
.is-muted-row{opacity:.66;background:#f8fafc;}
@media (max-width:1280px){
  #completionPolicyForm .completion-policy-switches,
  #policyItemsPanel .completion-policy-switches{grid-template-columns:1fr !important;}
}
@media (max-width:1100px){
  #completionPolicyForm .form-grid,
  #policyItemsPanel .form-grid,
  #policyItemsPanel .compact-grid{grid-template-columns:1fr !important;}
}

.completion-checklist-section{
  border:1px solid #d8e4f5;
  background:#f8fbff;
  border-radius:14px;
  padding:12px;
  margin-top:12px;
}
.completion-checklist-section h4{margin:0 0 10px 0;font-size:15px;}
.completion-row-tools{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:10px;}
.completion-row-checklist-wrap{max-height:360px;overflow:auto;border-radius:12px;border:1px solid #d8e4f5;background:#fff;}
.completion-row-checklist-table{min-width:900px;width:100%;}
.completion-row-checklist-table th,.completion-row-checklist-table td{vertical-align:top;white-space:normal !important;}
.completion-row-checklist-table input[type="checkbox"]{width:22px;height:22px;accent-color:#0ea5e9;}
.completion-row-checklist-table textarea{min-width:180px;min-height:44px;}
.completion-row-checklist-table input[type="number"],.completion-row-checklist-table select{min-width:140px;}
.empty-note{padding:12px;border:1px dashed #cbd5e1;border-radius:12px;color:#64748b;background:#fff;}
/* CPOL_LAYOUT_FIX_V3_ROW_CHECKLIST_END */


/* JM_DISPATCH_LAYOUT_FIX_V1 */
#jmActiveStepsPanel,
.multi-task-dispatch-panel,
.active-steps-panel{
  overflow: visible;
}
#jmActiveStepsList,
.active-steps-list{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  align-items: stretch;
}
#jmActiveStepsList .active-step-item,
.active-steps-list .active-step-item{
  min-width: 0;
  width: 100%;
  max-width: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  background: #f8fbff;
}
#jmActiveStepsList .active-step-main,
.active-steps-list .active-step-main{
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
#jmActiveStepsList .active-step-main b,
.active-steps-list .active-step-main b{
  overflow-wrap: anywhere;
}
#jmActiveStepsList .dispatch-user-cell,
.active-steps-list .dispatch-user-cell{
  width: 100%;
}
#jmActiveStepsList .dispatch-user-cell select,
.active-steps-list .dispatch-user-cell select,
#jmActiveStepsList .dispatch-bulk-user-select,
.active-steps-list .dispatch-bulk-user-select{
  width: 100%;
  min-width: 0;
}
#jmActiveStepsList .active-step-actions,
.active-steps-list .active-step-actions{
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(180px, max-content) minmax(220px, 1fr) minmax(180px, max-content) minmax(220px, 1fr);
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px dashed #93c5fd;
  border-radius: 14px;
  background: #eff6ff;
}
@media (max-width: 1200px){
  #jmActiveStepsList .active-step-actions,
  .active-steps-list .active-step-actions{
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 760px){
  #jmActiveStepsList,
  .active-steps-list{
    grid-template-columns: 1fr;
  }
  #jmActiveStepsList .active-step-actions,
  .active-steps-list .active-step-actions{
    grid-template-columns: 1fr;
  }
}


/* My Tasks project/job folder path */
.job-path-box {
  border: 1px solid #dbeafe;
  background: #f8fbff;
  border-radius: 16px;
  padding: 14px;
  margin: 12px 0;
  display: grid;
  gap: 10px;
}
.job-path-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}
.job-path-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 10px;
  align-items: center;
}
.job-path-box input,
.job-path-box textarea {
  width: 100%;
  box-sizing: border-box;
}
@media (max-width: 760px) {
  .job-path-grid { grid-template-columns: 1fr; }
  .job-path-header .btn { width: 100%; }
}


/* UI_BUBBLE_RESTORE_START */
/* Restore polished My Tasks status filter bubbles after stable merge. */
.my-task-filter-tabs{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  margin:12px 0 16px;
}

.my-task-filter-tab{
  appearance:none;
  -webkit-appearance:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:38px;
  padding:9px 14px;
  border-radius:999px;
  border:1px solid #dbe4f0;
  background:#f8fafc;
  color:#334155;
  font-size:13px;
  font-weight:900;
  line-height:1;
  cursor:pointer;
  box-shadow:none;
  transition:background .15s ease,border-color .15s ease,color .15s ease,box-shadow .15s ease,transform .15s ease;
}

.my-task-filter-tab span{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:24px;
  min-height:22px;
  padding:2px 7px;
  border-radius:999px;
  background:#ffffff;
  border:1px solid #e2e8f0;
  color:#334155;
  font-size:12px;
  font-weight:900;
}

.my-task-filter-tab:hover{
  background:#eef6ff;
  border-color:#bfdbfe;
  color:#1d4ed8;
  transform:translateY(-1px);
}

.my-task-filter-tab.active{
  background:#eef2ff;
  border-color:#8b7cf6;
  color:#312e81;
  box-shadow:0 0 0 2px rgba(124,92,255,.12);
}

.my-task-filter-tab.active span{
  background:#ffffff;
  border-color:#c7d2fe;
  color:#312e81;
}

/* Keep job/table badges looking like rounded bubbles, not default browser buttons. */
.task-status-pill,
.workflow-pill,
.summary-pill,
.assignment-tag,
.unassigned-tag{
  border-radius:999px;
}

/* Prevent status tabs from inheriting generic/default button styling. */
#myTaskFilterTabs button.my-task-filter-tab{
  font-family:inherit;
}

@media(max-width:760px){
  .my-task-filter-tabs{gap:8px;}
  .my-task-filter-tab{padding:8px 11px;font-size:12px;}
  .my-task-filter-tab span{min-width:21px;min-height:20px;font-size:11px;}
}
/* UI_BUBBLE_RESTORE_END */

/* Sidebar Grouping V1 - collapsible folder sidebar */
.sidebar-group{
  margin:8px 0;
}
.sidebar-group-toggle{
  width:100%;
  border:0;
  background:rgba(255,255,255,.04);
  color:var(--sidebar-muted, #94a3b8);
  border-radius:12px;
  padding:10px 10px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  cursor:pointer;
  font-size:11px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.sidebar-group-toggle:hover,
.sidebar-group.is-open > .sidebar-group-toggle,
.sidebar-group.has-active > .sidebar-group-toggle{
  background:rgba(255,255,255,.08);
  color:#ffffff;
}
.sidebar-group-title{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.sidebar-group-right{
  display:inline-flex;
  align-items:center;
  gap:7px;
  flex:0 0 auto;
}
.sidebar-chevron{
  display:inline-flex;
  transition:transform .18s ease;
  font-size:12px;
  line-height:1;
}
.sidebar-group.is-open .sidebar-chevron{
  transform:rotate(180deg);
}
.sidebar-submenu{
  display:none;
  padding:6px 0 4px 10px;
  margin-left:5px;
  border-left:1px solid rgba(148,163,184,.18);
}
.sidebar-group.is-open > .sidebar-submenu{
  display:block;
}
.sidebar-submenu .menu-item{
  margin:3px 0;
  padding-left:11px;
}
.sidebar-group.hidden{
  display:none !important;
}
.sidebar-group-badge{
  min-width:20px;
  height:20px;
  padding:0 6px;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:11px;
  font-weight:900;
  line-height:1;
  background:#f97316;
  color:#ffffff;
}


/* RULE_PAGE_BUBBLE_RESTORE_START
   Restore polished tabs/cards for master-rule.html and master-requirement-rule.html.
   This block intentionally comes late so it overrides browser/default button styles. */
.rule-mgmt-layout,
.requirement-layout{
  display:grid;
  grid-template-columns:minmax(280px, 420px) minmax(0, 1fr);
  gap:18px;
  align-items:start;
}
.rule-list-card,
.rule-editor-card{
  border-radius:22px;
  border:1px solid #e1eaf6;
  background:#ffffff;
  box-shadow:0 14px 34px rgba(15,23,42,.06);
}
.rule-list{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.rule-list .role-list-item,
.rule-list-item,
.req-list-item{
  border:1px solid #dbe7f5 !important;
  border-radius:18px !important;
  background:#ffffff !important;
  padding:14px 16px !important;
  box-shadow:0 8px 20px rgba(15,23,42,.035) !important;
  transition:border-color .16s ease, box-shadow .16s ease, transform .16s ease, background .16s ease;
}
.rule-list .role-list-item:hover,
.rule-list-item:hover,
.req-list-item:hover{
  transform:translateY(-1px);
  border-color:#b8c7ff !important;
  box-shadow:0 12px 26px rgba(15,23,42,.06) !important;
}
.rule-list .role-list-item.active,
.rule-list-item.active,
.req-list-item.active,
.rule-list .role-list-item[aria-selected="true"]{
  border-color:#8b7cf6 !important;
  background:linear-gradient(180deg,#ffffff,#fbfaff) !important;
  box-shadow:0 14px 30px rgba(109,93,252,.14) !important;
}
.rule-tabs{
  display:flex !important;
  flex-wrap:wrap !important;
  gap:8px !important;
  align-items:center !important;
  margin:0 0 14px !important;
  padding:0 !important;
  border:0 !important;
}
.rule-tab,
button.rule-tab{
  appearance:none !important;
  -webkit-appearance:none !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  min-height:36px !important;
  border:1px solid #d7e2f3 !important;
  background:#ffffff !important;
  color:#334155 !important;
  border-radius:12px !important;
  padding:9px 13px !important;
  font-family:inherit !important;
  font-size:12px !important;
  font-weight:800 !important;
  line-height:1 !important;
  cursor:pointer !important;
  box-shadow:0 4px 10px rgba(15,23,42,.04) !important;
  transition:background .16s ease, color .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease !important;
}
.rule-tab:hover,
button.rule-tab:hover{
  border-color:#9aa8ff !important;
  background:#f8f7ff !important;
  color:#4f46e5 !important;
  transform:translateY(-1px) !important;
}
.rule-tab.active,
button.rule-tab.active{
  border-color:#6d5dfc !important;
  background:linear-gradient(135deg,#4f46e5,#7c3aed) !important;
  color:#ffffff !important;
  box-shadow:0 10px 22px rgba(109,93,252,.22) !important;
}
.rule-panel{
  display:none;
  border:1px solid #e0e7f2;
  border-radius:18px;
  background:#ffffff;
  padding:18px;
  box-shadow:0 10px 24px rgba(15,23,42,.04);
}
.rule-panel.active{
  display:block;
}
.rule-panel .field input,
.rule-panel .field select,
.rule-panel .field textarea{
  border-radius:14px;
}
.rule-message-card{
  border:1px solid #dbe7f5;
  border-radius:16px;
  background:#fff;
  padding:14px;
  margin-bottom:10px;
  box-shadow:0 8px 18px rgba(15,23,42,.04);
}
.rule-message-card.unread{
  border-color:#8ea6ff;
  background:#f8f7ff;
}
@media(max-width:980px){
  .rule-mgmt-layout,
  .requirement-layout{
    grid-template-columns:1fr;
  }
}
@media(max-width:720px){
  .rule-tab,
  button.rule-tab{
    padding:9px 11px !important;
    font-size:11px !important;
  }
  .rule-panel{padding:14px;}
}
/* RULE_PAGE_BUBBLE_RESTORE_END */



/* TASK_RULES_MODAL_V1_START */
.task-rules-modal.hidden{display:none!important;}
.task-rules-modal{position:fixed;inset:0;z-index:9999;display:flex;justify-content:flex-end;align-items:stretch;}
.task-rules-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.42);backdrop-filter:blur(3px);}
.task-rules-panel{position:relative;width:min(760px,calc(100vw - 28px));height:100%;background:#f8fafc;box-shadow:-24px 0 60px rgba(15,23,42,.22);padding:22px;overflow:auto;border-left:1px solid rgba(148,163,184,.35);}
.task-rules-header{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:14px;padding:18px;border-radius:22px;background:#fff;border:1px solid #e1eaf6;box-shadow:0 14px 34px rgba(15,23,42,.06);}
.task-rules-header h2{margin:2px 0 4px;font-size:24px;font-weight:900;color:#0f172a;}
.task-rules-header .eyebrow{margin:0;color:#64748b;font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.08em;}
.task-rules-body{display:flex;flex-direction:column;gap:12px;}
.task-rules-empty{display:flex;flex-direction:column;gap:6px;padding:18px;border:1px dashed #cbd5e1;border-radius:18px;background:#fff;color:#475569;}
.task-rule-card{border:1px solid #dbe7f5;border-radius:20px;background:#fff;padding:16px;box-shadow:0 12px 28px rgba(15,23,42,.055);}
.task-rule-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;}
.task-rule-card h3{margin:0 0 5px;font-size:17px;font-weight:900;color:#0f172a;}
.task-rule-card p{margin:0;color:#475569;line-height:1.55;}
.task-rule-card-head p{font-size:12px;color:#64748b;font-weight:700;}
.task-rule-badges{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end;}
.task-rule-badge{display:inline-flex;align-items:center;border-radius:999px;padding:5px 9px;font-size:11px;font-weight:900;border:1px solid transparent;}
.task-rule-badge.info{background:#eef2ff;color:#4338ca;border-color:#c7d2fe;}
.task-rule-badge.warning{background:#fffbeb;color:#92400e;border-color:#fde68a;}
.task-rule-badge.danger{background:#fef2f2;color:#991b1b;border-color:#fecaca;}
.task-rule-scope{margin-top:10px;border-radius:12px;background:#f8fafc;border:1px solid #e2e8f0;padding:9px 11px;color:#475569;font-size:12px;font-weight:800;}
.task-rule-description{margin-top:12px!important;}
.task-rule-note{margin-top:10px;padding:10px 12px;border-radius:14px;background:#f8fafc;border:1px solid #e2e8f0;color:#334155;font-size:13px;line-height:1.55;}
.task-rule-meta{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px;}
.task-rule-meta span{border-radius:999px;background:#f1f5f9;color:#475569;padding:5px 9px;font-size:11px;font-weight:800;}
.task-rule-checklist{margin-top:14px;display:flex;flex-direction:column;gap:8px;}
.task-rule-checkitem{display:grid;grid-template-columns:28px 1fr;gap:10px;padding:10px;border-radius:14px;border:1px solid #e2e8f0;background:#fbfdff;}
.task-rule-checkitem>span{width:28px;height:28px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;background:#ede9fe;color:#5b21b6;font-size:12px;font-weight:900;}
.task-rule-checkitem b{display:block;color:#0f172a;font-size:13px;margin-bottom:3px;}
.task-rule-checkitem small{display:block;color:#64748b;font-size:12px;line-height:1.45;}
.btn-info{background:#eef2ff;color:#4338ca;border-color:#c7d2fe;}
.btn-info:hover{background:#e0e7ff;color:#3730a3;}
body.modal-open{overflow:hidden;}
@media(max-width:760px){.task-rules-panel{width:100%;padding:14px}.task-rules-header{border-radius:16px}.task-rule-card-head{flex-direction:column}.task-rule-badges{justify-content:flex-start}}
/* TASK_RULES_MODAL_V1_END */

/* DASHBOARD_JOB_PROGRESS_PHASE1_START */
.dashboard-progress-page{display:flex;flex-direction:column;gap:16px;}
.dashboard-hero{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;}
.dashboard-hero-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;}
.progress-kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;}
.progress-kpi-card{border:1px solid #dbe7f5;border-radius:20px;background:#fff;padding:16px 18px;box-shadow:0 14px 32px rgba(15,23,42,.055);position:relative;overflow:hidden;}
.progress-kpi-card:before{content:"";position:absolute;inset:0 0 auto 0;height:3px;background:linear-gradient(90deg,#4f46e5,#22c55e);}
.progress-kpi-card span{display:block;color:#64748b;font-size:12px;font-weight:900;text-transform:uppercase;letter-spacing:.06em;margin-bottom:8px;}
.progress-kpi-card strong{display:block;color:#0f172a;font-size:30px;line-height:1;font-weight:950;margin-bottom:8px;}
.progress-kpi-card small{color:#64748b;font-size:12px;font-weight:700;}
.progress-kpi-card.danger-soft:before{background:linear-gradient(90deg,#f59e0b,#ef4444);}
.dashboard-progress-card{padding:18px;}
.dashboard-progress-toolbar{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:14px;}
.dashboard-progress-filters{display:flex;align-items:center;gap:10px;flex-wrap:wrap;}
.dashboard-progress-filters .searchbox.compact{min-width:280px;width:320px;height:42px;}
.dashboard-progress-filters select{height:42px;border:1px solid #d7e2f3;border-radius:14px;background:#fff;color:#0f172a;font-weight:800;padding:0 12px;}
.job-progress-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;}
.job-progress-card{border:1px solid #dbe7f5;border-radius:20px;background:#fff;padding:16px;box-shadow:0 12px 26px rgba(15,23,42,.052);position:relative;overflow:hidden;}
.job-progress-card:before{content:"";position:absolute;left:0;right:0;top:0;height:4px;background:#94a3b8;}
.job-progress-card.waiting:before{background:#94a3b8;}
.job-progress-card.partial:before{background:#f59e0b;}
.job-progress-card.active:before{background:#0ea5e9;}
.job-progress-card.complete:before{background:#22c55e;}
.job-progress-card.stuck:before{background:#ef4444;}
.job-progress-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:14px;}
.job-progress-project{font-size:12px;color:#64748b;font-weight:900;text-transform:uppercase;letter-spacing:.05em;margin-bottom:4px;}
.job-progress-head h3{margin:0;color:#0f172a;font-size:19px;font-weight:950;}
.job-progress-head p{margin:5px 0 0;color:#475569;font-size:12px;font-weight:700;line-height:1.45;}
.job-health-badge{display:inline-flex;align-items:center;justify-content:center;border-radius:999px;padding:7px 10px;font-size:11px;font-weight:950;border:1px solid transparent;white-space:nowrap;}
.job-health-badge.waiting{background:#f1f5f9;color:#475569;border-color:#cbd5e1;}
.job-health-badge.partial{background:#fffbeb;color:#92400e;border-color:#fde68a;}
.job-health-badge.active{background:#eff6ff;color:#1d4ed8;border-color:#bfdbfe;}
.job-health-badge.complete{background:#f0fdf4;color:#15803d;border-color:#bbf7d0;}
.job-health-badge.stuck{background:#fef2f2;color:#b91c1c;border-color:#fecaca;}
.job-progress-current{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-bottom:14px;}
.job-progress-current>div{border:1px solid #e2e8f0;border-radius:14px;background:#f8fafc;padding:10px;min-width:0;}
.job-progress-current span{display:block;font-size:10px;font-weight:900;color:#64748b;text-transform:uppercase;letter-spacing:.06em;margin-bottom:5px;}
.job-progress-current b{display:block;font-size:12px;color:#0f172a;line-height:1.35;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.job-progress-meter-row{margin-bottom:12px;}
.job-progress-meter-text{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:12px;color:#64748b;font-weight:800;margin-bottom:7px;}
.job-progress-meter-text b{font-size:18px;color:#0f172a;}
.job-progress-meter{height:10px;border-radius:999px;background:#e2e8f0;overflow:hidden;}
.job-progress-meter span{display:block;height:100%;border-radius:999px;background:linear-gradient(90deg,#4f46e5,#22c55e);transition:width .25s ease;}
.job-progress-stats{display:flex;flex-wrap:wrap;gap:7px;margin-bottom:13px;}
.job-progress-stats span{border-radius:999px;background:#f8fafc;border:1px solid #e2e8f0;color:#475569;font-size:11px;font-weight:800;padding:6px 9px;}
.job-progress-stats b{color:#0f172a;margin-right:3px;}
.job-progress-foot{display:flex;align-items:center;justify-content:space-between;gap:10px;border-top:1px solid #e2e8f0;padding-top:12px;}
.job-progress-foot small{color:#64748b;font-size:11px;font-weight:700;}
.job-progress-foot>div{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end;}
.btn.btn-sm,.btn-sm{min-height:34px;padding:8px 11px;border-radius:12px;font-size:12px;}
.empty-state{border:1px dashed #cbd5e1;background:#fff;border-radius:18px;padding:18px;color:#64748b;font-weight:800;text-align:center;grid-column:1/-1;}
.empty-state.error{border-color:#fecaca;background:#fef2f2;color:#b91c1c;}
.dashboard-shortcuts{margin-top:2px;}
@media(max-width:1180px){.progress-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr));}.job-progress-list{grid-template-columns:1fr;}}
@media(max-width:760px){.dashboard-hero,.dashboard-progress-toolbar,.job-progress-foot{flex-direction:column;align-items:stretch;}.dashboard-progress-filters{flex-direction:column;align-items:stretch;}.dashboard-progress-filters .searchbox.compact{min-width:0;width:100%;}.progress-kpi-grid{grid-template-columns:1fr;}.job-progress-current{grid-template-columns:1fr;}.dashboard-hero-actions{align-items:stretch}.dashboard-hero-actions .btn{width:100%;justify-content:center;}}
/* DASHBOARD_JOB_PROGRESS_PHASE1_END */

/* DASHBOARD_JOB_PROGRESS_PHASE2_FLOW_START */
.job-flow-panel{margin:12px 0 14px;border:1px solid #e2e8f0;background:linear-gradient(180deg,#ffffff,#f8fafc);border-radius:16px;padding:12px;overflow:hidden;}
.job-flow-panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:10px;}
.job-flow-panel-head b{font-size:13px;font-weight:950;color:#0f172a;}
.job-flow-panel-head small{font-size:11px;font-weight:800;color:#64748b;text-align:right;}
.job-flow-group+.job-flow-group{margin-top:12px;padding-top:12px;border-top:1px dashed #cbd5e1;}
.job-flow-title{font-size:11px;font-weight:950;color:#475569;text-transform:uppercase;letter-spacing:.04em;margin-bottom:9px;}
.job-flow-track{display:flex;align-items:stretch;gap:8px;overflow-x:auto;overflow-y:hidden;padding:2px 2px 8px;scrollbar-width:thin;}
.job-flow-step{min-width:165px;max-width:220px;display:grid;grid-template-columns:18px minmax(0,1fr);gap:8px;align-items:start;border:1px solid #dbe7f5;border-radius:15px;background:#fff;padding:10px;box-shadow:0 8px 18px rgba(15,23,42,.045);position:relative;}
.job-flow-step.complete{border-color:#bbf7d0;background:#f0fdf4;}
.job-flow-step.active{border-color:#bfdbfe;background:#eff6ff;}
.job-flow-step.partial{border-color:#fde68a;background:#fffbeb;}
.job-flow-step.waiting{border-color:#e2e8f0;background:#f8fafc;}
.job-flow-step.stuck{border-color:#fecaca;background:#fef2f2;}
.job-flow-dot{width:14px;height:14px;border-radius:999px;background:#94a3b8;margin-top:3px;box-shadow:0 0 0 4px rgba(148,163,184,.16);}
.job-flow-step.complete .job-flow-dot{background:#22c55e;box-shadow:0 0 0 4px rgba(34,197,94,.16);}
.job-flow-step.active .job-flow-dot{background:#0ea5e9;box-shadow:0 0 0 4px rgba(14,165,233,.16);}
.job-flow-step.partial .job-flow-dot{background:#f59e0b;box-shadow:0 0 0 4px rgba(245,158,11,.18);}
.job-flow-step.stuck .job-flow-dot{background:#ef4444;box-shadow:0 0 0 4px rgba(239,68,68,.16);}
.job-flow-step-body{min-width:0;}
.job-flow-step-body small{display:block;font-size:10px;font-weight:950;color:#64748b;text-transform:uppercase;letter-spacing:.04em;margin-bottom:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.job-flow-step-body b{display:block;font-size:12px;font-weight:950;color:#0f172a;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.job-flow-step-body em{display:block;font-style:normal;font-size:11px;font-weight:800;color:#64748b;line-height:1.35;margin-top:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.job-flow-chip{display:inline-flex;margin-top:7px;border-radius:999px;padding:4px 7px;background:#ede9fe;color:#5b21b6;font-size:10px;font-weight:950;border:1px solid #ddd6fe;}
.job-flow-arrow{display:inline-flex;align-items:center;justify-content:center;align-self:center;min-width:18px;color:#94a3b8;font-weight:950;font-size:16px;}
.job-flow-empty{border:1px dashed #cbd5e1;border-radius:14px;background:#fff;padding:12px;color:#64748b;font-size:12px;font-weight:800;text-align:center;}
@media(max-width:760px){.job-flow-panel-head{flex-direction:column}.job-flow-panel-head small{text-align:left}.job-flow-step{min-width:150px}}
/* DASHBOARD_JOB_PROGRESS_PHASE2_FLOW_END */


/* DASHBOARD_JOB_PROGRESS_PHASE3_START */
.dashboard-attention-card{padding:16px;}
.compact-toolbar{margin-bottom:10px!important;}
.pill-count{display:inline-flex;align-items:center;justify-content:center;min-width:24px;height:24px;border-radius:999px;background:#fee2e2;color:#b91c1c;font-size:12px;font-weight:950;padding:0 8px;margin-left:6px;vertical-align:middle;}
.attention-list{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;}
.attention-item{appearance:none;border:1px solid #dbe7f5;background:#fff;border-radius:16px;padding:12px;text-align:left;display:flex;align-items:flex-start;justify-content:space-between;gap:10px;cursor:pointer;box-shadow:0 8px 18px rgba(15,23,42,.045);transition:.16s ease;}
.attention-item:hover{transform:translateY(-1px);box-shadow:0 14px 26px rgba(15,23,42,.08);border-color:#8b5cf6;}
.attention-item span{min-width:0;display:block;}
.attention-item b{display:block;color:#0f172a;font-size:13px;font-weight:950;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.attention-item em{display:block;font-style:normal;color:#64748b;font-size:11px;font-weight:800;margin-top:4px;line-height:1.35;}
.attention-item small{border-radius:999px;padding:5px 8px;font-size:10px;font-weight:950;white-space:nowrap;background:#f1f5f9;color:#475569;}
.attention-item.stuck{border-color:#fecaca;background:#fff7f7;}
.attention-item.partial{border-color:#fde68a;background:#fffdf0;}
.attention-item.waiting{border-color:#e2e8f0;background:#f8fafc;}
.attention-item.active{border-color:#bfdbfe;background:#eff6ff;}
.job-attention-note{border:1px solid #e2e8f0;background:#f8fafc;border-radius:13px;padding:9px 11px;font-size:12px;font-weight:900;color:#475569;margin-bottom:12px;}
.job-attention-note.stuck{border-color:#fecaca;background:#fef2f2;color:#b91c1c;}
.job-attention-note.partial{border-color:#fde68a;background:#fffbeb;color:#92400e;}
.job-attention-note.active{border-color:#bfdbfe;background:#eff6ff;color:#1d4ed8;}
.job-attention-note.complete{border-color:#bbf7d0;background:#f0fdf4;color:#15803d;}
.pulse-focus{animation:dashboardPulseFocus 1.25s ease;}
@keyframes dashboardPulseFocus{0%{box-shadow:0 0 0 0 rgba(139,92,246,.45);}60%{box-shadow:0 0 0 8px rgba(139,92,246,.10);}100%{box-shadow:0 12px 26px rgba(15,23,42,.052);}}
.job-chat-modal{position:fixed;inset:0;background:rgba(15,23,42,.42);z-index:9999;display:none;align-items:stretch;justify-content:flex-end;padding:18px;}
.job-chat-modal.open{display:flex;}
.job-chat-panel{width:min(520px,100%);height:100%;background:#fff;border-radius:22px;border:1px solid #dbe7f5;box-shadow:0 28px 80px rgba(15,23,42,.28);display:flex;flex-direction:column;overflow:hidden;}
.job-chat-head{padding:18px;border-bottom:1px solid #e2e8f0;display:flex;align-items:flex-start;justify-content:space-between;gap:14px;background:linear-gradient(180deg,#fff,#f8fafc);}
.job-chat-head h2{margin:4px 0 3px;color:#0f172a;font-size:22px;font-weight:950;}
.job-chat-messages{flex:1;overflow:auto;padding:16px;background:#f8fafc;display:flex;flex-direction:column;gap:10px;}
.job-chat-message{background:#fff;border:1px solid #e2e8f0;border-radius:16px;padding:12px;box-shadow:0 8px 16px rgba(15,23,42,.04);}
.job-chat-message-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:7px;}
.job-chat-message-head b{font-size:13px;font-weight:950;color:#0f172a;}
.job-chat-message-head small{font-size:11px;font-weight:800;color:#64748b;white-space:nowrap;}
.job-chat-message p{margin:0;color:#334155;font-size:13px;font-weight:700;line-height:1.45;word-break:break-word;}
.job-chat-compose{border-top:1px solid #e2e8f0;background:#fff;padding:14px;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:end;}
.job-chat-compose textarea{width:100%;border:1px solid #d7e2f3;border-radius:16px;padding:12px;color:#0f172a;font:inherit;font-size:13px;resize:vertical;min-height:72px;outline:none;}
.job-chat-compose textarea:focus{border-color:#8b5cf6;box-shadow:0 0 0 4px rgba(139,92,246,.12);}
.empty-state.compact{padding:14px;font-size:12px;}
@media(max-width:1180px){.attention-list{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:760px){.attention-list{grid-template-columns:1fr}.job-chat-modal{padding:8px}.job-chat-panel{border-radius:18px}.job-chat-compose{grid-template-columns:1fr}.job-chat-compose .btn{width:100%;justify-content:center;}}
/* DASHBOARD_JOB_PROGRESS_PHASE3_END */

/* DASHBOARD_JOB_PROGRESS_PHASE4_CHARTS_START */
.dashboard-chart-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:0 0 16px;}
.dashboard-chart-card{padding:16px;overflow:hidden;}
.dashboard-chart-card.wide{grid-column:span 1;}
.dashboard-chart-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:12px;}
.dashboard-chart-head h2{margin:0 0 4px;color:#0f172a;font-size:18px;font-weight:950;letter-spacing:-.02em;}
.dashboard-chart-head p{margin:0;}
.dashboard-chart-body{min-height:190px;display:flex;flex-direction:column;justify-content:center;}
.dashboard-chart-empty{border:1px dashed #cbd5e1;background:#fff;border-radius:16px;padding:14px;color:#64748b;font-size:12px;font-weight:850;text-align:center;}
.status-donut-wrap{display:grid;grid-template-columns:160px minmax(0,1fr);align-items:center;gap:16px;}
.status-donut{width:152px;height:152px;border-radius:999px;display:grid;place-items:center;box-shadow:inset 0 0 0 1px rgba(15,23,42,.06),0 12px 26px rgba(15,23,42,.08);position:relative;}
.status-donut::after{content:"";position:absolute;inset:22px;border-radius:999px;background:#fff;box-shadow:inset 0 0 0 1px rgba(226,232,240,.9);}
.donut-center{position:relative;z-index:1;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center;}
.donut-center b{font-size:30px;font-weight:950;color:#0f172a;line-height:1;}
.donut-center small{font-size:11px;font-weight:900;color:#64748b;text-transform:uppercase;letter-spacing:.08em;margin-top:5px;}
.chart-legend{display:flex;flex-direction:column;gap:8px;min-width:0;}
.chart-legend.inline{flex-direction:row;flex-wrap:wrap;margin-top:12px;}
.chart-legend span{display:flex;align-items:center;gap:8px;color:#475569;font-size:12px;font-weight:850;}
.chart-legend b{margin-left:auto;color:#0f172a;font-weight:950;}
.legend-dot{width:10px;height:10px;border-radius:999px;background:#94a3b8;box-shadow:0 0 0 3px rgba(148,163,184,.14);flex:0 0 auto;}
.legend-dot.complete,.bar-fill.complete,.bar-part.complete{background:#22c55e;}
.legend-dot.active,.bar-fill.active,.bar-part.active{background:#0ea5e9;}
.legend-dot.partial,.bar-fill.partial,.bar-part.partial{background:#f59e0b;}
.legend-dot.waiting,.bar-fill.waiting,.bar-part.waiting{background:#cbd5e1;}
.legend-dot.stuck,.bar-fill.stuck,.bar-part.stuck{background:#ef4444;}
.bar-chart-list{display:flex;flex-direction:column;gap:11px;width:100%;}
.bar-chart-row{display:grid;grid-template-columns:minmax(120px,170px) minmax(0,1fr) auto;gap:10px;align-items:center;}
.bar-chart-label{min-width:0;}
.bar-chart-label b{display:block;color:#0f172a;font-size:12px;font-weight:950;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.bar-chart-label small{display:block;color:#64748b;font-size:10px;font-weight:850;margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.bar-chart-track{height:13px;border-radius:999px;background:#e2e8f0;overflow:hidden;display:flex;box-shadow:inset 0 0 0 1px rgba(15,23,42,.04);}
.bar-chart-track.stacked{gap:0;background:#f1f5f9;}
.bar-fill,.bar-part{display:block;height:100%;min-width:0;border-radius:999px;transition:width .22s ease;}
.bar-chart-track.stacked .bar-part{border-radius:0;}
.bar-chart-track.stacked .bar-part:first-child{border-top-left-radius:999px;border-bottom-left-radius:999px;}
.bar-chart-track.stacked .bar-part:last-child{border-top-right-radius:999px;border-bottom-right-radius:999px;}
.bar-chart-value{min-width:42px;text-align:right;color:#0f172a;font-size:12px;font-weight:950;}
.project-progress-chart .bar-chart-row,.koj-flow-chart .bar-chart-row{grid-template-columns:minmax(160px,220px) minmax(0,1fr) auto;}
.koj-flow-chart .bar-chart-row{grid-template-columns:minmax(160px,240px) minmax(0,1fr);}
@media(max-width:1180px){.dashboard-chart-grid{grid-template-columns:1fr;}.dashboard-chart-card.wide{grid-column:auto;}.status-donut-wrap{grid-template-columns:140px minmax(0,1fr);}.status-donut{width:136px;height:136px;}}
@media(max-width:760px){.status-donut-wrap{grid-template-columns:1fr;justify-items:center;text-align:left;}.chart-legend{width:100%;}.bar-chart-row,.project-progress-chart .bar-chart-row,.koj-flow-chart .bar-chart-row{grid-template-columns:1fr;gap:6px;}.bar-chart-value{text-align:left;}.dashboard-chart-body{min-height:auto;}}
/* DASHBOARD_JOB_PROGRESS_PHASE4_CHARTS_END */

.job-chat-typing{display:none;align-items:center;gap:5px;padding:8px 16px 0 16px;background:#fff;color:#64748b;font-size:12px;font-weight:800;min-height:22px;}
.job-chat-typing.show{display:flex;}
.typing-dot{width:5px;height:5px;border-radius:999px;background:#8b5cf6;display:inline-block;animation:jobChatTypingBounce 1.1s infinite ease-in-out;}
.typing-dot:nth-child(2){animation-delay:.15s;}
.typing-dot:nth-child(3){animation-delay:.3s;margin-right:4px;}
@keyframes jobChatTypingBounce{0%,80%,100%{opacity:.35;transform:translateY(0)}40%{opacity:1;transform:translateY(-3px)}}

/* DASHBOARD_JOB_CHAT_ATTACHMENT_PHASE4A_START */
.job-chat-file-input{display:none!important;}
.job-chat-compose{grid-template-columns:auto minmax(0,1fr) auto;}
.job-chat-attach-btn{height:44px;min-width:44px;border-radius:14px;font-size:18px;padding:0 12px;align-self:end;}
.job-chat-attachment-preview{display:none;border-top:1px solid #e2e8f0;background:#fff;padding:10px 14px 0;}
.job-chat-attachment-preview.show{display:block;}
.job-chat-selected-file{display:flex;align-items:center;gap:10px;border:1px solid #dbe7f5;background:#f8fafc;border-radius:15px;padding:9px 10px;}
.job-chat-selected-file img{width:48px;height:48px;object-fit:cover;border-radius:12px;border:1px solid #e2e8f0;background:#fff;}
.job-chat-selected-file span:not(.job-chat-file-badge){min-width:0;display:block;flex:1;}
.job-chat-selected-file b{display:block;color:#0f172a;font-size:12px;font-weight:950;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.job-chat-selected-file small{display:block;color:#64748b;font-size:11px;font-weight:800;margin-top:2px;}
.job-chat-file-badge{width:48px;height:48px;display:grid;place-items:center;border-radius:12px;background:#ede9fe;color:#5b21b6;border:1px solid #ddd6fe;font-size:22px;}
.job-chat-attachments{display:flex;flex-direction:column;gap:8px;margin-top:10px;}
.job-chat-attachment-card{border:1px solid #dbe7f5;background:#f8fafc;border-radius:14px;padding:8px;}
.job-chat-image-preview{display:block;margin-bottom:8px;border-radius:12px;overflow:hidden;border:1px solid #e2e8f0;background:#fff;}
.job-chat-image-preview img{display:block;width:100%;max-height:220px;object-fit:cover;}
.job-chat-attachment-row{display:flex;align-items:center;gap:9px;min-width:0;}
.job-chat-attachment-icon{width:34px;height:34px;display:grid;place-items:center;border-radius:10px;background:#ede9fe;color:#5b21b6;flex:0 0 auto;font-size:18px;}
.job-chat-attachment-info{min-width:0;flex:1;display:block;}
.job-chat-attachment-info b{display:block;color:#0f172a;font-size:12px;font-weight:950;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.job-chat-attachment-info small{display:block;color:#64748b;font-size:10px;font-weight:850;margin-top:2px;}
.job-chat-panel.drag-over{outline:3px dashed rgba(139,92,246,.45);outline-offset:-10px;}
@media(max-width:760px){.job-chat-compose{grid-template-columns:auto 1fr;}.job-chat-compose textarea{grid-column:1 / -1;}.job-chat-compose #jobChatSendBtn{grid-column:1 / -1;}}
/* DASHBOARD_JOB_CHAT_ATTACHMENT_PHASE4A_END */

/* Team Work Board map-on-demand row selector fix */
.twb-row-map-panel{
  display:block;
  margin:0 20px 10px;
  padding:10px 12px;
  border:1px solid #dbeafe;
  border-radius:16px;
  background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%);
  box-shadow:0 8px 22px rgba(15,23,42,.06);
  flex:0 0 auto;
}
.twb-row-map-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}
.twb-row-map-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
  gap:8px;
}
#twbRowMapStatus{
  margin-top:4px;
  font-weight:700;
}
.twb-row-map{
  display:block !important;
  width:100% !important;
  height:320px !important;
  min-height:320px !important;
  max-height:42vh;
  border:1px solid #cbd5e1;
  border-radius:14px;
  background:#e5edf7;
  overflow:hidden;
}
.twb-row-map-panel.twb-row-map-collapsed{
  padding:8px 12px;
  background:#f8fbff;
}
.twb-row-map-panel.twb-row-map-collapsed .twb-row-map-head{
  margin-bottom:0;
}
.twb-row-map-panel.twb-row-map-collapsed .twb-map-help,
.twb-row-map-panel.twb-row-map-collapsed #twbRowMapStatus,
.twb-row-map-panel.twb-row-map-collapsed #twbRowMapFitBtn,
.twb-row-map-panel.twb-row-map-collapsed #twbRowMapSelectVisibleBtn,
.twb-row-map-panel.twb-row-map-collapsed #twbRowMapCloseBtn,
.twb-row-map-panel.twb-row-map-collapsed .twb-row-map{
  display:none !important;
}
.twb-row-map-panel.twb-row-map-open #twbRowMapFitBtn,
.twb-row-map-panel.twb-row-map-open #twbRowMapSelectVisibleBtn,
.twb-row-map-panel.twb-row-map-open #twbRowMapCloseBtn{
  display:inline-flex;
}
.twb-row-map-panel.twb-row-map-open .twb-row-map{
  display:block !important;
}
@media(max-width:900px){
  .twb-row-map-head{display:block}
  .twb-row-map-actions{justify-content:flex-start;margin-top:10px}
  .twb-row-map{height:260px !important;min-height:260px !important}
}

/* KOJ Type Phase 1 */
.koj-type-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:3px 8px;
  border-radius:999px;
  font-size:11px;
  font-weight:700;
  letter-spacing:.02em;
  border:1px solid rgba(15,23,42,.12);
  white-space:nowrap;
}
.koj-type-pure{background:#ecfdf5;color:#047857;border-color:#a7f3d0;}
.koj-type-update{background:#eff6ff;color:#1d4ed8;border-color:#bfdbfe;}
.koj-type-training{background:#fef3c7;color:#92400e;border-color:#fde68a;}

/* Master KOJ modal edit UX */
.koj-edit-modal{
  position:fixed;
  inset:0;
  z-index:10000;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
  background:rgba(15,23,42,.48);
  backdrop-filter:blur(3px);
}
.koj-edit-modal.hidden{display:none!important;}
.koj-edit-modal-card{
  width:min(940px, 96vw);
  max-height:90vh;
  overflow:auto;
  background:#fff;
  border:1px solid #dbeafe;
  border-radius:24px;
  box-shadow:0 24px 70px rgba(15,23,42,.28);
  padding:22px;
}
.koj-edit-modal-header,
.koj-edit-modal-footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}
.koj-edit-modal-header{
  padding-bottom:14px;
  border-bottom:1px solid #e2e8f0;
}
.koj-edit-modal-footer{
  padding-top:16px;
  margin-top:16px;
  border-top:1px solid #e2e8f0;
  justify-content:flex-end;
}
.koj-edit-modal-close{
  width:42px;
  height:42px;
  border:0;
  border-radius:14px;
  cursor:pointer;
  background:#f1f5f9;
  color:#0f172a;
  font-size:26px;
  line-height:1;
  font-weight:800;
}
.koj-edit-modal-close:hover{background:#e2e8f0;}
.koj-edit-modal-body{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
  margin-top:16px;
}
.koj-edit-description-field{grid-column:1 / -1;}
.koj-edit-description-field textarea{min-height:96px;}
@media(max-width:760px){
  .koj-edit-modal{padding:10px;align-items:stretch;}
  .koj-edit-modal-card{width:100%;max-height:96vh;border-radius:18px;padding:16px;}
  .koj-edit-modal-body{grid-template-columns:1fr;}
  .koj-edit-modal-footer{flex-direction:column-reverse;align-items:stretch;}
  .koj-edit-modal-footer .btn{width:100%;justify-content:center;}
}

/* REQUESTOR_MODAL_EDIT_FIX_START */
.requestor-edit-modal{
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(3px);
}

.requestor-edit-modal.hidden{
  display: none !important;
}

.requestor-edit-modal-card{
  width: min(980px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: #ffffff;
  border: 1px solid #dbe5f3;
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
  padding: 22px;
}

.requestor-edit-modal-header{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5edf7;
  margin-bottom: 18px;
}

.requestor-edit-modal-body{
  display: block;
}

.requestor-edit-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}

.requestor-edit-grid .field{
  min-width: 0;
}

.requestor-edit-grid .requestor-wide{
  grid-column: 1 / -1;
}

.requestor-edit-modal-footer{
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 16px;
  margin-top: 18px;
  border-top: 1px solid #e5edf7;
}

body.modal-open{
  overflow: hidden;
}

@media (max-width: 760px){
  .requestor-edit-modal{
    padding: 12px;
    align-items: flex-start;
  }
  .requestor-edit-modal-card{
    width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
    padding: 16px;
    border-radius: 18px;
  }
  .requestor-edit-grid{
    grid-template-columns: 1fr;
  }
}
/* REQUESTOR_MODAL_EDIT_FIX_END */

/* Master KOJ Workflow Builder Phase 1 */
.koj-workflow-builder{
  border:1px solid #dbe4f0;
  border-radius:18px;
  background:linear-gradient(180deg,#ffffff 0%,#f8fafc 100%);
  padding:16px;
}
.koj-workflow-builder-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:14px;
}
.koj-workflow-builder-head h3{
  margin:0 0 4px;
  font-size:18px;
  font-weight:900;
  color:#0f172a;
}
.koj-workflow-deliverable-field{
  min-width:320px;
  margin:0;
}
.koj-workflow-canvas{
  display:flex;
  flex-direction:column;
  gap:10px;
  max-height:560px;
  overflow:auto;
  padding:10px;
  border-radius:16px;
  border:1px dashed #cbd5e1;
  background:#ffffff;
}
.koj-workflow-empty{
  padding:22px;
  text-align:center;
  color:#64748b;
  font-weight:800;
}
.koj-workflow-seq{
  border:1px solid #e2e8f0;
  border-radius:16px;
  background:#fff;
  box-shadow:0 8px 20px rgba(15,23,42,.05);
  overflow:hidden;
}
.koj-workflow-seq-parallel{
  border-color:#bfdbfe;
  background:#eff6ff;
}
.koj-workflow-seq-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 12px;
  background:#f1f5f9;
  color:#0f172a;
  font-weight:900;
  letter-spacing:.02em;
}
.koj-workflow-seq-parallel .koj-workflow-seq-header{
  background:#dbeafe;
  color:#1e3a8a;
}
.koj-workflow-count{
  font-size:12px;
  font-weight:900;
  color:#64748b;
  white-space:nowrap;
}
.koj-workflow-card-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(230px,1fr));
  gap:10px;
  padding:12px;
}
.koj-workflow-card{
  text-align:left;
  border:1px solid #dbe4f0;
  border-radius:14px;
  background:#ffffff;
  padding:12px;
  cursor:pointer;
  transition:transform .12s ease, box-shadow .12s ease, border-color .12s ease;
  min-height:118px;
}
.koj-workflow-card:hover{
  transform:translateY(-1px);
  border-color:#93c5fd;
  box-shadow:0 10px 24px rgba(37,99,235,.12);
}
.koj-workflow-card-title{
  font-weight:950;
  color:#0f172a;
  line-height:1.2;
  margin-bottom:3px;
}
.koj-workflow-card-name{
  color:#64748b;
  font-size:12px;
  min-height:18px;
}
.koj-workflow-card-meta{
  display:flex;
  flex-wrap:wrap;
  gap:5px;
  margin-top:10px;
}
.koj-workflow-card-team{
  margin-top:10px;
  color:#475569;
  font-size:12px;
}
.koj-workflow-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid #dbe4f0;
  border-radius:999px;
  padding:3px 8px;
  font-size:11px;
  font-weight:900;
  white-space:nowrap;
}
.koj-workflow-badge-qc{background:#fef3c7;color:#92400e;border-color:#fde68a;}
.koj-workflow-badge-final{background:#fee2e2;color:#991b1b;border-color:#fecaca;}
.koj-workflow-badge-required{background:#eef2ff;color:#3730a3;border-color:#c7d2fe;}
.koj-workflow-badge-inactive{background:#f1f5f9;color:#64748b;border-color:#cbd5e1;}
.koj-workflow-arrow{
  text-align:center;
  font-size:24px;
  line-height:1;
  color:#94a3b8;
  font-weight:900;
}
@media(max-width:900px){
  .koj-workflow-builder-head{display:block;}
  .koj-workflow-deliverable-field{min-width:0;margin-top:12px;}
  .koj-workflow-card-grid{grid-template-columns:1fr;}
}


/* KOJ Visual Workflow Builder Phase 2 */
.koj-workflow-toolbar{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
  margin:12px 0;
  padding:10px;
  background:#f8fafc;
  border:1px solid #e2e8f0;
  border-radius:14px;
}
.koj-workflow-layout{
  display:grid;
  grid-template-columns:280px minmax(0,1fr);
  gap:14px;
  align-items:start;
}
.koj-workflow-library{
  background:#ffffff;
  border:1px solid #e2e8f0;
  border-radius:16px;
  padding:12px;
  position:sticky;
  top:86px;
  max-height:70vh;
  overflow:auto;
}
.koj-workflow-library-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:8px;
  margin-bottom:10px;
}
.koj-workflow-library-head h4{margin:0;font-size:14px;color:#0f172a;}
.koj-workflow-library-head select{min-width:105px;padding:7px 8px;border:1px solid #cbd5e1;border-radius:10px;background:#fff;}
.koj-workflow-library-list{display:flex;flex-direction:column;gap:8px;margin-top:10px;}
.koj-workflow-library-item{
  border:1px solid #e2e8f0;
  background:#fff;
  border-radius:14px;
  padding:10px;
  box-shadow:0 1px 2px rgba(15,23,42,.04);
}
.koj-workflow-library-item.is-mapped{background:#f8fafc;}
.koj-workflow-library-title{font-weight:800;font-size:13px;color:#0f172a;}
.koj-workflow-library-name{font-size:12px;color:#64748b;margin:2px 0 6px;}
.koj-workflow-seq-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;}
.koj-workflow-card-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px;}
.koj-workflow-card{cursor:default;}
@media (max-width: 980px){
  .koj-workflow-layout{grid-template-columns:1fr;}
  .koj-workflow-library{position:relative;top:auto;max-height:none;}
}


/* KOJ_WORKFLOW_LAYOUT_REFINEMENT_PHASE2_5_START */
.koj-workflow-builder{
  padding:18px;
  overflow:hidden;
}
.koj-workflow-layout{
  grid-template-columns:280px minmax(0,1fr);
  align-items:start;
}
.koj-workflow-canvas{
  max-height:640px;
  min-height:360px;
  overflow:auto;
  padding:14px;
  gap:14px;
  background:linear-gradient(180deg,#ffffff 0%,#f8fafc 100%);
}
.koj-workflow-seq{
  width:100%;
  border-radius:18px;
  overflow:visible;
  background:#ffffff;
  border:1px solid #dbe4f0;
  box-shadow:0 8px 22px rgba(15,23,42,.06);
}
.koj-workflow-seq-parallel{
  background:#eff6ff;
  border-color:#93c5fd;
  box-shadow:0 10px 26px rgba(37,99,235,.10);
}
.koj-workflow-seq-header{
  min-height:48px;
  border-radius:18px 18px 0 0;
  padding:12px 16px;
  background:#f1f5f9;
  border-bottom:1px solid #e2e8f0;
}
.koj-workflow-seq-title{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px;
  min-width:0;
}
.koj-workflow-seq-no{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:62px;
  height:28px;
  padding:0 10px;
  border-radius:999px;
  background:#0f172a;
  color:#ffffff;
  font-size:12px;
  font-weight:900;
  letter-spacing:.02em;
}
.koj-workflow-seq-label{
  font-weight:950;
  color:#0f172a;
  white-space:normal;
}
.koj-workflow-parallel-label{
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  padding:5px 10px;
  background:#dbeafe;
  color:#1d4ed8;
  border:1px solid #93c5fd;
  font-size:12px;
  font-weight:900;
}
.koj-workflow-seq-parallel .koj-workflow-seq-header{
  background:#dbeafe;
  border-bottom-color:#bfdbfe;
}
.koj-workflow-seq-body{
  padding:14px;
}
.koj-workflow-card-grid{
  display:flex !important;
  flex-wrap:wrap !important;
  align-items:stretch;
  gap:12px;
  padding:0;
}
.koj-workflow-card{
  flex:0 1 260px;
  width:260px;
  max-width:100%;
  min-height:132px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  border-radius:16px;
  padding:14px;
  background:#ffffff;
  border:1px solid #dbe4f0;
  box-shadow:0 2px 8px rgba(15,23,42,.05);
}
.koj-workflow-card-title{
  font-size:14px;
  line-height:1.25;
  overflow-wrap:anywhere;
}
.koj-workflow-card-name{
  min-height:auto;
  overflow-wrap:anywhere;
}
.koj-workflow-card-meta{
  min-height:24px;
}
.koj-workflow-card-actions{
  margin-top:12px;
  padding-top:10px;
  border-top:1px dashed #e2e8f0;
}
.koj-workflow-arrow{
  display:flex;
  align-items:center;
  justify-content:center;
  width:34px;
  height:34px;
  margin:0 auto;
  border-radius:999px;
  background:#f1f5f9;
  border:1px solid #e2e8f0;
  color:#64748b;
  font-size:20px;
  line-height:1;
}
.koj-workflow-library{
  max-height:640px;
}
.koj-workflow-library-item{
  overflow:hidden;
}
@media (max-width: 980px){
  .koj-workflow-layout{grid-template-columns:1fr;}
  .koj-workflow-library{position:relative;top:auto;max-height:320px;}
}
@media (max-width: 640px){
  .koj-workflow-card{flex-basis:100%;width:100%;}
  .koj-workflow-seq-header{align-items:flex-start;flex-direction:column;}
  .koj-workflow-seq-actions{width:100%;justify-content:flex-start;}
}
/* KOJ_WORKFLOW_LAYOUT_REFINEMENT_PHASE2_5_END */

/* KOJ Workflow Builder Phase 3 - Quick Add */
.koj-quick-add-card{max-width:880px;}
.koj-quick-add-summary{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  margin:14px 0;
}
.koj-quick-add-summary>div{
  border:1px solid #e2e8f0;
  background:#f8fafc;
  border-radius:14px;
  padding:10px 12px;
}
.koj-quick-add-summary span{display:block;font-size:11px;text-transform:uppercase;letter-spacing:.04em;color:#64748b;font-weight:800;margin-bottom:3px;}
.koj-quick-add-summary b{font-size:13px;color:#0f172a;}
.koj-quick-add-controls{
  display:grid;
  grid-template-columns:minmax(220px,1.5fr) minmax(120px,.7fr) minmax(160px,.8fr);
  gap:12px;
  margin-bottom:10px;
}
.koj-quick-add-options{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:10px 14px;
  padding:10px 12px;
  border:1px solid #e2e8f0;
  background:#fff;
  border-radius:14px;
  margin-bottom:12px;
  font-size:13px;
  color:#334155;
}
.koj-quick-add-options label{display:flex;align-items:center;gap:7px;font-weight:700;}
.koj-quick-add-group-label input{
  min-width:180px;
  padding:8px 10px;
  border:1px solid #cbd5e1;
  border-radius:10px;
}
.koj-quick-add-list{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(240px,1fr));
  gap:10px;
  max-height:44vh;
  overflow:auto;
  padding:4px;
  border:1px dashed #cbd5e1;
  border-radius:16px;
  background:#f8fafc;
}
.koj-quick-add-item{
  display:flex;
  align-items:flex-start;
  gap:10px;
  padding:12px;
  border:1px solid #dbe5f0;
  border-radius:14px;
  background:#fff;
  cursor:pointer;
  transition:.15s ease;
}
.koj-quick-add-item:hover{border-color:#93c5fd;box-shadow:0 8px 18px rgba(15,23,42,.08);transform:translateY(-1px);}
.koj-quick-add-item input{margin-top:3px;}
.koj-quick-add-item-main{display:flex;flex-direction:column;gap:5px;min-width:0;}
.koj-quick-add-item-main b{font-size:13px;color:#0f172a;}
.koj-quick-add-item-main small{font-size:12px;color:#64748b;line-height:1.25;}
.koj-workflow-seq-actions .btn{white-space:nowrap;}
@media(max-width:780px){
  .koj-quick-add-summary,.koj-quick-add-controls{grid-template-columns:1fr;}
  .koj-quick-add-list{grid-template-columns:1fr;max-height:50vh;}
}

/* Phase 4A - Safe drag & drop for KOJ workflow cards */
.koj-workflow-card[draggable="true"]{
  cursor: grab;
  user-select: none;
}
.koj-workflow-card[draggable="true"]:active{
  cursor: grabbing;
}
.koj-workflow-card.is-dragging{
  opacity: .45;
  transform: scale(.98);
}
.koj-workflow-dropzone{
  position: relative;
  min-height: 96px;
  border: 1px dashed transparent;
  border-radius: 14px;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.koj-workflow-dropzone.is-drag-over{
  background: #eff6ff;
  border-color: #2563eb;
  box-shadow: inset 0 0 0 2px rgba(37,99,235,.12);
}
.koj-workflow-drop-hint{
  display: none;
  position: absolute;
  right: 12px;
  top: 8px;
  font-size: 11px;
  font-weight: 800;
  color: #2563eb;
  background: #ffffff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: 4px 9px;
  z-index: 2;
}
.koj-workflow-dropzone.is-drag-over .koj-workflow-drop-hint{
  display: inline-flex;
}


/* KOJ Workflow Builder Phase 4B - Stabilization & UX Polish */
.koj-workflow-toolbar{
  position: sticky;
  top: 0;
  z-index: 5;
}
.koj-workflow-search{
  min-width: 260px;
  flex: 1 1 280px;
}
.koj-workflow-collapse-btn{
  width: 28px;
  height: 28px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #ffffff;
  color: #334155;
  font-weight: 900;
  cursor: pointer;
  line-height: 1;
}
.koj-workflow-collapse-btn:hover{
  border-color: #2563eb;
  color: #2563eb;
  box-shadow: 0 4px 12px rgba(37,99,235,.14);
}
.koj-workflow-seq.is-collapsed .koj-workflow-seq-header{
  border-radius: 18px;
  border-bottom: 0;
}
.koj-workflow-collapsed-summary{
  padding: 10px 16px 14px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  background: #ffffff;
  border-radius: 0 0 18px 18px;
}
.koj-workflow-search-count{
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  font-size: 11px;
  font-weight: 900;
}
.koj-workflow-card.is-search-match{
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245,158,11,.16), 0 10px 24px rgba(15,23,42,.08);
}
.koj-workflow-card.is-search-dim{
  opacity: .38;
  filter: grayscale(.25);
}
.koj-type-pure{background:#dcfce7;color:#166534;border-color:#bbf7d0;}
.koj-type-update{background:#ffedd5;color:#9a3412;border-color:#fed7aa;}
.koj-type-training{background:#dbeafe;color:#1d4ed8;border-color:#bfdbfe;}
.koj-workflow-badge-qc{background:#f3e8ff;color:#6b21a8;border-color:#e9d5ff;}
.koj-workflow-badge-final{background:#111827;color:#ffffff;border-color:#111827;}
@media(max-width:780px){
  .koj-workflow-toolbar{position:relative;top:auto;}
  .koj-workflow-search{min-width:100%;}
}


/* Phase 5A - Workflow validation panel */
.koj-workflow-validation-panel{
  margin: 12px 0 14px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}
.koj-workflow-validation-empty{
  padding: 14px 16px;
  color: #64748b;
  font-size: 13px;
}
.koj-workflow-validation-head{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
  padding:14px 16px;
  border-bottom:1px solid #e2e8f0;
  background:#f8fafc;
}
.koj-workflow-validation-head h4{margin:0 0 4px;font-size:15px;color:#0f172a;}
.koj-workflow-validation-head p{margin:0;color:#64748b;font-size:12px;}
.koj-workflow-validation-head.has-error{background:#fff1f2;}
.koj-workflow-validation-head.has-warning{background:#fffbeb;}
.koj-workflow-validation-head.is-ok{background:#ecfdf5;}
.koj-workflow-validation-counts{display:flex;flex-wrap:wrap;gap:6px;justify-content:flex-end;}
.validation-pill{display:inline-flex;align-items:center;border-radius:999px;padding:5px 9px;font-size:11px;font-weight:800;border:1px solid #e2e8f0;background:#fff;white-space:nowrap;}
.validation-error{color:#b91c1c;border-color:#fecaca;background:#fff1f2;}
.validation-warning{color:#92400e;border-color:#fde68a;background:#fffbeb;}
.validation-info{color:#075985;border-color:#bae6fd;background:#f0f9ff;}
.koj-workflow-validation-list{display:grid;gap:8px;padding:10px 12px;}
.koj-workflow-validation-item{display:flex;justify-content:space-between;align-items:center;gap:10px;border:1px solid #e2e8f0;border-radius:12px;padding:10px 12px;background:#fff;}
.koj-workflow-validation-item b{display:block;font-size:13px;color:#0f172a;margin-bottom:3px;}
.koj-workflow-validation-item small{display:block;font-size:12px;color:#64748b;line-height:1.35;}
.koj-workflow-validation-item.severity-error{border-color:#fecaca;background:#fff7f7;}
.koj-workflow-validation-item.severity-warning{border-color:#fde68a;background:#fffdf2;}
.koj-workflow-validation-item.severity-info{border-color:#bae6fd;background:#f8fcff;}
.koj-workflow-validation-item.severity-ok{border-color:#bbf7d0;background:#f0fdf4;}
.koj-workflow-validation-more{padding:8px 12px;color:#64748b;font-size:12px;text-align:center;}
.validation-focus-pulse{animation: validationFocusPulse 1.4s ease-in-out;}
@keyframes validationFocusPulse{
  0%{box-shadow:0 0 0 0 rgba(245, 158, 11, .55);}
  50%{box-shadow:0 0 0 8px rgba(245, 158, 11, .18);}
  100%{box-shadow:0 0 0 0 rgba(245, 158, 11, 0);}
}
@media (max-width: 900px){
  .koj-workflow-validation-head{flex-direction:column;}
  .koj-workflow-validation-counts{justify-content:flex-start;}
  .koj-workflow-validation-item{align-items:flex-start;flex-direction:column;}
}

/* Phase 5C: Edit KOJ action support in Workflow Builder */
.koj-workflow-library-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:8px;
}
.koj-workflow-card-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
}
.koj-workflow-card-actions .btn-small{
  white-space:nowrap;
}

/* DISCUSSION_ROOM_PHASE_DR1_START */
.discussion-room-page{display:flex;flex-direction:column;gap:16px;}
.discussion-hero{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;}
.discussion-hero h1{margin:4px 0 6px;}
.discussion-hero-actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end;}
.discussion-layout{display:grid;grid-template-columns:minmax(240px,300px) minmax(420px,1fr) minmax(240px,300px);gap:16px;align-items:stretch;min-height:calc(100vh - 230px);}
.discussion-room-list-panel,.discussion-chat-panel,.discussion-detail-panel{min-height:0;}
.discussion-panel-head{display:flex;justify-content:space-between;gap:10px;align-items:flex-start;margin-bottom:10px;}
.discussion-panel-head h2,.discussion-chat-head h2,.discussion-detail-panel h2{margin:0 0 4px;}
.discussion-room-list{margin-top:12px;display:flex;flex-direction:column;gap:10px;max-height:calc(100vh - 330px);overflow:auto;padding-right:4px;}
.discussion-room-item{width:100%;border:1px solid rgba(148,163,184,.28);background:#fff;border-radius:16px;padding:12px;text-align:left;cursor:pointer;box-shadow:0 8px 20px rgba(15,23,42,.04);transition:.15s ease;}
.discussion-room-item:hover{transform:translateY(-1px);border-color:rgba(59,130,246,.45);box-shadow:0 12px 26px rgba(15,23,42,.08);}
.discussion-room-item.active{border-color:#2563eb;background:#eff6ff;box-shadow:0 12px 26px rgba(37,99,235,.13);}
.discussion-room-item__top{display:flex;justify-content:space-between;gap:8px;align-items:center;margin-bottom:4px;}
.discussion-room-item p{margin:8px 0;color:#475569;font-size:12px;line-height:1.45;}
.discussion-room-item__meta{display:flex;justify-content:space-between;gap:8px;color:#64748b;font-size:11px;}
.discussion-badge{font-size:10px;font-weight:800;letter-spacing:.04em;border-radius:999px;padding:4px 7px;white-space:nowrap;}
.discussion-badge.public{background:#dcfce7;color:#166534;}
.discussion-badge.private{background:#fef3c7;color:#92400e;}
.discussion-chat-panel{display:flex;flex-direction:column;padding:0;overflow:hidden;}
.discussion-chat-head{padding:16px 18px;border-bottom:1px solid rgba(148,163,184,.25);display:flex;align-items:flex-start;justify-content:space-between;gap:12px;background:linear-gradient(180deg,#fff,#f8fafc);}
.discussion-room-live-pill{font-size:12px;font-weight:800;color:#16a34a;background:#dcfce7;border-radius:999px;padding:6px 10px;white-space:nowrap;}
.discussion-messages{flex:1;min-height:360px;max-height:calc(100vh - 360px);overflow:auto;padding:18px;background:#f8fafc;display:flex;flex-direction:column;gap:10px;}
.discussion-message-row{display:flex;width:100%;}
.discussion-message-row.mine{justify-content:flex-end;}
.discussion-message-row.theirs{justify-content:flex-start;}
.discussion-message-bubble{max-width:min(620px,78%);border:1px solid rgba(148,163,184,.24);border-radius:18px;padding:10px 12px;box-shadow:0 10px 18px rgba(15,23,42,.05);background:#fff;}
.discussion-message-row.mine .discussion-message-bubble{background:#2563eb;color:#fff;border-color:#2563eb;border-bottom-right-radius:6px;}
.discussion-message-row.theirs .discussion-message-bubble{border-bottom-left-radius:6px;}
.discussion-message-author{font-size:11px;font-weight:900;margin-bottom:5px;opacity:.9;}
.discussion-message-body{font-size:14px;line-height:1.45;white-space:normal;word-break:break-word;}
.discussion-message-time{font-size:10px;opacity:.72;margin-top:6px;text-align:right;}
.discussion-typing{min-height:22px;padding:3px 18px;color:#64748b;font-size:12px;background:#f8fafc;}
.discussion-compose{display:flex;gap:10px;padding:14px;border-top:1px solid rgba(148,163,184,.25);background:#fff;align-items:flex-end;}
.discussion-compose textarea{flex:1;resize:vertical;min-height:58px;max-height:150px;border:1px solid rgba(148,163,184,.45);border-radius:14px;padding:10px 12px;font:inherit;}
.discussion-room-details{display:flex;flex-direction:column;gap:10px;margin-top:10px;}
.detail-row{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;border-bottom:1px solid rgba(148,163,184,.18);padding:8px 0;}
.detail-row span{color:#64748b;font-size:12px;}
.detail-row strong{text-align:right;font-size:13px;}
.discussion-next-card{margin-top:16px;border:1px dashed rgba(59,130,246,.45);background:#eff6ff;border-radius:16px;padding:14px;}
.discussion-create-modal{max-width:620px;}
.app-modal{position:fixed;inset:0;background:rgba(15,23,42,.45);display:none;align-items:center;justify-content:center;z-index:9999;padding:20px;}
.app-modal.open{display:flex;}
.app-modal__panel{background:#fff;border-radius:20px;box-shadow:0 24px 80px rgba(15,23,42,.25);padding:18px;width:min(720px,96vw);max-height:90vh;overflow:auto;}
.app-modal__head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:14px;}
.app-modal__head h2{margin:0;}
.app-modal__actions{display:flex;justify-content:flex-end;gap:10px;margin-top:16px;}
@media (max-width:1200px){.discussion-layout{grid-template-columns:280px 1fr;}.discussion-detail-panel{grid-column:1 / -1;}}
@media (max-width:820px){.discussion-layout{grid-template-columns:1fr;}.discussion-hero{flex-direction:column;}.discussion-messages{max-height:55vh;}.discussion-message-bubble{max-width:88%;}.discussion-compose{flex-direction:column;align-items:stretch;}}
/* DISCUSSION_ROOM_PHASE_DR1_END */

/* Discussion Room DR-1B: room edit + member invite */
.discussion-detail-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:14px;
  padding-top:14px;
  border-top:1px solid var(--border, #d8e2ef);
}
.discussion-members-modal{
  width:min(760px, calc(100vw - 36px));
  max-height:88vh;
  display:flex;
  flex-direction:column;
}
.discussion-members-toolbar{
  display:grid;
  gap:8px;
  margin-bottom:12px;
}
.discussion-members-list{
  display:grid;
  gap:8px;
  max-height:52vh;
  overflow:auto;
  padding:4px;
}
.discussion-member-row{
  display:flex;
  align-items:flex-start;
  gap:12px;
  padding:12px;
  border:1px solid #dbe6f3;
  border-radius:14px;
  background:#fff;
  cursor:pointer;
}
.discussion-member-row:hover{background:#f8fbff;border-color:#bcd3f4;}
.discussion-member-row input{margin-top:3px; width:16px; height:16px;}
.discussion-member-row strong{display:block;color:#0f172a;}

/* DR-1E Member Count + Member List UI */
.discussion-members-summary{
  margin-top:6px;
  padding:12px;
  border:1px solid rgba(148,163,184,.28);
  background:#f8fafc;
  border-radius:14px;
}
.discussion-members-summary-title{
  font-size:11px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.04em;
  color:#334155;
  margin-bottom:8px;
}
.discussion-member-avatars{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:6px;
  margin-bottom:8px;
}
.discussion-member-avatar{
  width:28px;
  height:28px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  background:#e0ecff;
  color:#1d4ed8;
  border:1px solid rgba(37,99,235,.22);
  font-size:11px;
  font-weight:900;
  line-height:1;
}
.discussion-member-avatar.more{
  background:#f1f5f9;
  color:#475569;
  border-color:rgba(100,116,139,.28);
}
.discussion-member-name-list{
  display:flex;
  flex-direction:column;
  gap:4px;
  color:#475569;
  font-size:12px;
  line-height:1.35;
}
.discussion-member-name-list span{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

/* DISCUSSION_ROOM_DR2_VOICE_ROOM_START */
.discussion-room-header-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end}
#drVoiceControls{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.discussion-voice-panel{margin:14px 0;padding:14px;border:1px dashed #bcd3ff;border-radius:14px;background:#f7fbff}
.discussion-voice-panel-title{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px;color:#0f172a;font-weight:800}
.discussion-voice-panel-title strong{font-size:12px;background:#dbeafe;color:#1d4ed8;border-radius:999px;padding:4px 9px}
.discussion-voice-participants{display:flex;flex-direction:column;gap:8px}
.discussion-voice-person{display:flex;align-items:center;gap:10px;padding:9px 10px;border-radius:12px;background:#fff;border:1px solid #e5edf8}
.discussion-voice-person.me{border-color:#7c3aed;background:#f5f3ff}
.discussion-voice-person>span{width:32px;height:32px;display:grid;place-items:center;border-radius:999px;background:#e0f2fe;color:#075985;font-size:12px;font-weight:900;flex:0 0 auto}
.discussion-voice-person.me>span{background:#ede9fe;color:#5b21b6}
.discussion-voice-person strong{display:block;font-size:13px;line-height:1.2;color:#0f172a}
.discussion-voice-person small{display:block;font-size:11px;color:#64748b;margin-top:2px}
.btn-danger{background:#ef4444!important;color:#fff!important;border-color:#ef4444!important;box-shadow:0 10px 20px rgba(239,68,68,.18)}
.btn-danger:hover{background:#dc2626!important;border-color:#dc2626!important}
@media (max-width: 900px){.discussion-room-header-actions{justify-content:flex-start}.discussion-room-header-actions #drVoiceControls{width:100%}}
/* DISCUSSION_ROOM_DR2_VOICE_ROOM_END */

/* DISCUSSION_ROOM_DR2B_AUDIO_DIAGNOSTIC_START */
.discussion-voice-diagnostics{
  display:grid;
  grid-template-columns:1fr;
  gap:8px;
  margin:10px 0 12px;
}
.discussion-voice-status{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:9px 10px;
  border:1px solid #dbe6f3;
  border-radius:12px;
  background:#fff;
}
.discussion-voice-status span{
  color:#64748b;
  font-size:11px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.04em;
}
.discussion-voice-status strong{
  color:#334155;
  font-size:12px;
  text-align:right;
}
.discussion-voice-status.ok{border-color:#86efac;background:#f0fdf4;}
.discussion-voice-status.ok strong{color:#15803d;}
.discussion-voice-status.bad{border-color:#fecaca;background:#fff1f2;}
.discussion-voice-status.bad strong{color:#be123c;}
.discussion-voice-status.neutral{border-color:#dbe6f3;background:#fff;}
.discussion-voice-meter{
  position:relative;
  height:10px;
  overflow:hidden;
  border-radius:999px;
  background:#e2e8f0;
  border:1px solid rgba(148,163,184,.35);
}
.discussion-voice-meter i{
  display:block;
  width:2%;
  height:100%;
  min-width:2%;
  border-radius:999px;
  background:linear-gradient(90deg,#22c55e,#3b82f6);
  transition:width .12s ease;
}
.discussion-voice-warning{
  margin:8px 0;
  padding:9px 10px;
  border:1px solid #fde68a;
  background:#fffbeb;
  color:#92400e;
  border-radius:12px;
  font-size:12px;
  font-weight:700;
}
#drVoiceControls .btn{
  white-space:nowrap;
}
/* DISCUSSION_ROOM_DR2B_AUDIO_DIAGNOSTIC_END */

/* DR-2D Voice Room audio settings */
.discussion-audio-settings{margin:12px 0;padding:10px 12px;border:1px solid #dbeafe;border-radius:14px;background:#ffffff}
.discussion-audio-settings summary{cursor:pointer;font-weight:900;color:#0f172a;margin-bottom:8px}
.discussion-audio-settings-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;align-items:end}
.discussion-audio-settings-grid label{display:flex;flex-direction:column;gap:5px;font-size:11px;font-weight:800;color:#475569;text-transform:uppercase;letter-spacing:.04em}
.discussion-audio-settings-grid select,.discussion-audio-settings-grid input[type="range"]{width:100%}
.discussion-audio-settings-grid select{min-height:38px;border:1px solid #cbd5e1;border-radius:10px;padding:8px 10px;background:#fff;color:#0f172a}
.discussion-audio-check{flex-direction:row!important;align-items:center;text-transform:none!important;letter-spacing:0!important;font-size:12px!important;color:#0f172a!important;background:#f8fafc;border:1px solid #e2e8f0;border-radius:10px;padding:9px 10px}
.discussion-audio-check input{width:auto!important}
.discussion-audio-settings-note{margin-top:9px;color:#64748b;font-size:11px;line-height:1.4}
@media(max-width:900px){.discussion-audio-settings-grid{grid-template-columns:1fr}}

/* DR-3A Channel System */
.discussion-channel-panel{margin-top:14px;border-top:1px solid rgba(148,163,184,.22);padding-top:14px;}
.discussion-channel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:10px;}
.discussion-channel-head p{margin:3px 0 0;}
.discussion-channel-list{display:flex;flex-direction:column;gap:8px;max-height:220px;overflow:auto;padding-right:4px;}
.discussion-channel-item{width:100%;display:grid;grid-template-columns:22px 1fr auto;align-items:center;gap:8px;border:1px solid rgba(148,163,184,.25);background:#fff;border-radius:12px;padding:9px 10px;text-align:left;cursor:pointer;color:#334155;transition:.15s ease;}
.discussion-channel-item:hover{border-color:rgba(37,99,235,.45);background:#f8fafc;transform:translateY(-1px);}
.discussion-channel-item.active{border-color:#2563eb;background:#eff6ff;color:#1d4ed8;box-shadow:0 8px 18px rgba(37,99,235,.10);}
.discussion-channel-item span{font-weight:900;color:#64748b;text-align:center;}
.discussion-channel-item strong{font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.discussion-channel-item em{font-style:normal;font-size:11px;font-weight:800;color:#64748b;background:#f1f5f9;border-radius:999px;padding:3px 7px;}
.discussion-channel-item.active em{background:#dbeafe;color:#1d4ed8;}

/* MASTER_USER_MODAL_OVERLAY_FIX_START
   Fix master-user edit/capability dialogs appearing inline at the bottom of the page.
   The linked stylesheet is assets/css/app.css, so modal overlay rules must live here. */
.modal-overlay{
  position:fixed !important;
  inset:0 !important;
  z-index:10050 !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  padding:24px !important;
  background:rgba(15,23,42,.48) !important;
  backdrop-filter:blur(3px);
}
.modal-overlay.hidden{
  display:none !important;
}
.modal-card{
  width:min(980px, 96vw);
  max-height:90vh;
  overflow:auto;
  background:#fff;
  border:1px solid #dbeafe;
  border-radius:24px;
  box-shadow:0 24px 70px rgba(15,23,42,.28);
  padding:22px;
}
.modal-header,
.modal-footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}
.modal-header{
  padding-bottom:14px;
  border-bottom:1px solid #e2e8f0;
}
.modal-body{
  padding-top:16px;
}
.modal-footer{
  padding-top:16px;
  margin-top:16px;
  border-top:1px solid #e2e8f0;
  justify-content:flex-end;
}
.user-modal-card{
  width:min(1120px, 96vw);
}
.user-modal-body .form-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:14px;
}
.capability-modal-card{
  width:min(1120px, 96vw);
}
.capability-toolbar{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  margin:12px 0;
}
.capability-search{
  min-width:280px;
  flex:1;
}
.capability-type-filter{
  min-width:180px;
}
.capability-table-wrap{
  max-height:56vh;
  overflow:auto;
  border:1px solid #e2e8f0;
  border-radius:16px;
}
.capability-table-wrap table{
  min-width:980px;
}
.capability-table-wrap thead th{
  position:sticky;
  top:0;
  z-index:2;
  background:#f8fafc;
}
body.modal-open{
  overflow:hidden;
}
@media(max-width:900px){
  .user-modal-body .form-grid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
}
@media(max-width:760px){
  .modal-overlay{
    padding:10px !important;
    align-items:stretch !important;
  }
  .modal-card{
    width:100%;
    max-height:96vh;
    border-radius:18px;
    padding:16px;
  }
  .modal-footer{
    flex-direction:column-reverse;
    align-items:stretch;
  }
  .modal-footer .btn{
    width:100%;
    justify-content:center;
  }
  .user-modal-body .form-grid{
    grid-template-columns:1fr;
  }
  .capability-search,
  .capability-type-filter{
    min-width:100%;
  }
}
/* MASTER_USER_MODAL_OVERLAY_FIX_END */

/* Workflow UI Refactor - tabbed board/table layout */
.koj-workflow-suite{
  border:1px solid #dbeafe;
  border-radius:18px;
  background:#f8fbff;
  padding:14px;
}
.koj-workflow-suite-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:14px;
  margin-bottom:12px;
}
.koj-workflow-suite-head h3{margin:0 0 4px;color:#0f172a;font-size:18px;}
.koj-workflow-summary-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
  margin:10px 0 12px;
}
.koj-workflow-summary-card{
  background:#fff;
  border:1px solid #e2e8f0;
  border-radius:14px;
  padding:12px 14px;
  box-shadow:0 8px 20px rgba(15,23,42,.04);
  min-width:0;
}
.koj-workflow-summary-card span{
  display:block;
  font-size:11px;
  color:#64748b;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.04em;
  margin-bottom:4px;
}
.koj-workflow-summary-card b{
  display:block;
  color:#0f172a;
  font-size:18px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.workflow-view-tabs{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:12px 0;
  border-bottom:1px solid #dbeafe;
  padding-bottom:10px;
}
.workflow-tab-btn{
  border:1px solid #cbd5e1;
  background:#fff;
  color:#334155;
  border-radius:999px;
  padding:9px 14px;
  font-weight:900;
  cursor:pointer;
  box-shadow:0 6px 14px rgba(15,23,42,.04);
}
.workflow-tab-btn:hover{border-color:#93c5fd;color:#1d4ed8;}
.workflow-tab-btn.is-active{
  background:#1d4ed8;
  border-color:#1d4ed8;
  color:#fff;
}
.workflow-tab-panel{display:none;}
.workflow-tab-panel.is-active{display:block;}
.workflow-table-toolbar{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
  background:#fff;
  border:1px solid #e2e8f0;
  border-radius:14px;
  padding:10px;
}
.workflow-table-toolbar .mini-search{min-width:280px;flex:1;}
.mini-select{
  border:1px solid #cbd5e1;
  border-radius:12px;
  padding:9px 10px;
  background:#fff;
  color:#0f172a;
  font-weight:700;
}
.workflow-detail-table-wrap{max-height:560px;overflow:auto;background:#fff;}
.workflow-detail-table-wrap table thead th{position:sticky;top:0;z-index:2;background:#f8fafc;}
.workflow-table-badge{
  display:inline-flex;
  align-items:center;
  padding:4px 8px;
  border-radius:999px;
  border:1px solid #bfdbfe;
  background:#eff6ff;
  color:#1d4ed8;
  font-size:11px;
  font-weight:900;
  margin:2px;
}
.workflow-table-badge-qc{background:#f3e8ff;color:#6b21a8;border-color:#e9d5ff;}
.workflow-table-badge-final{background:#111827;color:#fff;border-color:#111827;}
.workflow-table-badge-muted{background:#f1f5f9;color:#64748b;border-color:#cbd5e1;}
.workflow-table-actions{display:flex;gap:6px;flex-wrap:wrap;min-width:190px;}
.workflow-audit-placeholder{
  background:#fff;
  border:1px dashed #cbd5e1;
  border-radius:16px;
  padding:18px;
  color:#334155;
}
@media (max-width: 900px){
  .koj-workflow-suite-head{display:block;}
  .koj-workflow-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
  .workflow-table-toolbar .mini-search{min-width:100%;}
}
@media (max-width: 560px){
  .koj-workflow-summary-grid{grid-template-columns:1fr;}
}

/* Project KOJ Target inline editor */
.project-target-card{overflow:hidden;}
.project-target-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:14px;}
.project-target-head h2{margin:0 0 6px;}
.project-target-summary{padding:8px 12px;border:1px solid #dbeafe;background:#eff6ff;color:#1d4ed8;border-radius:999px;font-weight:900;white-space:nowrap;font-size:12px;}
.project-target-toolbar{display:grid;grid-template-columns:minmax(260px,1.2fr) minmax(220px,1fr) auto;gap:12px;align-items:end;margin-bottom:12px;}
.project-target-bulkbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:10px 12px;margin:8px 0 12px;border:1px solid #e2e8f0;background:#f8fafc;border-radius:14px;}
.project-target-bulkbar input,.project-target-bulkbar select{height:38px;border:1px solid #cbd5e1;border-radius:10px;padding:0 10px;background:#fff;color:#0f172a;}
.project-target-bulkbar input{width:120px;}
.project-target-legacy-form{display:none!important;}
.project-target-table-wrap{max-height:560px;overflow:auto;border:1px solid #e2e8f0;border-radius:16px;}
.project-target-table-wrap table{min-width:1120px;}
.project-target-table-wrap thead th{position:sticky;top:0;z-index:2;background:#f1f5f9;}
.project-target-row input,.project-target-row select{width:100%;min-height:38px;border:1px solid #cbd5e1;border-radius:10px;padding:7px 9px;background:#fff;color:#0f172a;}
.project-target-row .project-target-check{width:18px;min-height:18px;}
.project-target-row-focus{outline:3px solid rgba(37,99,235,.22);outline-offset:-3px;background:#eff6ff!important;}
.project-target-empty{text-align:center;color:#64748b;padding:22px!important;font-weight:700;}
.project-target-source{display:inline-flex;align-items:center;justify-content:center;padding:5px 9px;border-radius:999px;background:#e2e8f0;color:#334155;font-size:12px;font-weight:900;}
.project-target-source-project{background:#dcfce7;color:#166534;}
.position-count-badge{display:inline-flex;align-items:center;justify-content:center;padding:5px 9px;border-radius:999px;background:#eef2ff;color:#3730a3;font-size:12px;font-weight:900;white-space:nowrap;}
@media (max-width: 980px){
  .project-target-head{flex-direction:column;}
  .project-target-toolbar{grid-template-columns:1fr;}
  .project-target-summary{white-space:normal;}
}

/* Job dashboard UX update */
.job-dashboard-toolbar{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
  justify-content:space-between;
  margin:14px 0 16px;
  padding:12px;
  border:1px solid var(--line);
  border-radius:16px;
  background:#f8fafc;
}
.job-bulk-panel{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
  margin-left:auto;
}
.job-bulk-panel input,
.job-bulk-panel select{
  height:38px;
  border-radius:10px;
  border:1px solid var(--line);
  padding:0 10px;
  background:#fff;
}
.form-grid-3{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:12px;
}
.job-due-tabs{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:12px 0;
}
.job-due-tab{
  border:1px solid var(--line);
  background:#fff;
  border-radius:999px;
  padding:8px 12px;
  font-weight:800;
  color:#334155;
  cursor:pointer;
}
.job-due-tab.active{
  background:#1d4ed8;
  border-color:#1d4ed8;
  color:#fff;
}
.due-badge,.priority-badge,.status-badge{
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  padding:5px 9px;
  font-size:12px;
  font-weight:900;
  white-space:nowrap;
}
.due-on-time{background:#dcfce7;color:#166534;}
.due-soon{background:#fef3c7;color:#92400e;}
.due-overdue{background:#fee2e2;color:#991b1b;}
.due-none{background:#e2e8f0;color:#475569;}
.due-completed{background:#dbeafe;color:#1e40af;}
.due-archived{background:#f3f4f6;color:#4b5563;}
.priority-low{background:#e0f2fe;color:#075985;}
.priority-normal{background:#e2e8f0;color:#334155;}
.priority-high{background:#fef3c7;color:#92400e;}
.priority-urgent{background:#fee2e2;color:#991b1b;}
.status-active{background:#dcfce7;color:#166534;}
.status-on-hold{background:#fef3c7;color:#92400e;}
.status-completed{background:#dbeafe;color:#1e40af;}
.status-archived{background:#f3f4f6;color:#4b5563;}
.job-number-table th:first-child,
.job-number-table td:first-child{
  width:42px;
  text-align:center;
}
@media (max-width: 900px){
  .form-grid-3{grid-template-columns:1fr;}
  .job-bulk-panel{width:100%;margin-left:0;}
}

/* Master Deliverable compact UX */
.deliverable-toolbar{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin:18px 0;
  padding:18px;
  border:1px solid #dbeafe;
  border-radius:20px;
  background:linear-gradient(180deg,#fff,#f8fbff);
}
.deliverable-toolbar-actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center;}
.deliverable-summary-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  margin:12px 0 18px;
}
.deliverable-summary-card{
  border:1px solid #dbeafe;
  border-radius:18px;
  padding:16px;
  background:#fff;
  box-shadow:0 8px 24px rgba(15,23,42,.04);
}
.deliverable-summary-card span{
  display:block;
  color:#64748b;
  font-size:12px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.05em;
}
.deliverable-summary-card strong{
  display:block;
  margin-top:8px;
  color:#0f172a;
  font-size:28px;
  line-height:1;
}
.deliverable-mapping-readonly{background:#fbfdff;}
.deliverable-map-summary{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
  margin-top:14px;
}
.deliverable-map-summary-card{
  border:1px solid #dbeafe;
  border-radius:16px;
  padding:14px;
  background:#fff;
}
.deliverable-map-summary-card strong{display:block;color:#0f172a;}
.deliverable-map-summary-card span{display:block;color:#64748b;font-size:12px;margin-top:3px;}
.deliverable-map-summary-card p{margin:10px 0 0;color:#334155;font-size:12px;line-height:1.45;}
.deliverable-map-summary-count{
  display:inline-flex;
  margin-top:10px;
  padding:5px 10px;
  border-radius:999px;
  background:#eff6ff;
  color:#1d4ed8;
  border:1px solid #bfdbfe;
  font-weight:900;
  font-size:12px;
}
@media(max-width:900px){
  .deliverable-toolbar{flex-direction:column;}
  .deliverable-summary-grid,.deliverable-map-summary{grid-template-columns:1fr 1fr;}
}
@media(max-width:620px){
  .deliverable-summary-grid,.deliverable-map-summary{grid-template-columns:1fr;}
}

/* =========================================================
   Master KOJ modal wizard / bubble restore
   Restores styles for KOJ_FormWizard_PATCH after later CSS patches.
   Safe CSS-only fix: no JS/API/SQL changes.
   ========================================================= */
.koj-master-actions{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
  margin:14px 0;
}
.koj-master-action-card{
  border:1px solid #dbe7f5;
  border-radius:20px;
  background:#fff;
  padding:18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  box-shadow:0 12px 28px rgba(15,23,42,.045);
}
.koj-master-action-card h2{margin:0 0 6px;}
.koj-master-action-card .small{margin:0;line-height:1.45;}
.koj-wizard-card{width:min(980px,96vw);}
.koj-wizard-tabs{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  padding:14px 0 12px;
  border-bottom:1px solid #e2e8f0;
  margin-bottom:12px;
}
.koj-wizard-tab{
  appearance:none;
  -webkit-appearance:none;
  border:1px solid #dbe7f5;
  background:#fff;
  border-radius:999px;
  padding:9px 14px;
  color:#334155;
  font-weight:900;
  cursor:pointer;
  box-shadow:0 6px 14px rgba(15,23,42,.04);
}
.koj-wizard-tab:hover{border-color:#93c5fd;color:#1d4ed8;}
.koj-wizard-tab.is-active{
  background:#2563eb;
  border-color:#2563eb;
  color:#fff;
  box-shadow:0 10px 20px rgba(37,99,235,.18);
}
.koj-wizard-panel{display:none;}
.koj-wizard-panel.is-active{display:block;}
.koj-wizard-panel .koj-edit-modal-body{padding-top:2px;}
.koj-position-picker{
  margin-top:10px;
  max-height:260px;
  overflow:auto;
  border:1px solid #dbe7f5;
  border-radius:16px;
  background:#f8fafc;
  padding:8px;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}
.koj-position-check{
  display:grid;
  grid-template-columns:20px 1fr;
  align-items:center;
  gap:8px;
  padding:9px 11px;
  border:1px solid #e2e8f0;
  border-radius:12px;
  background:#fff;
  font-weight:800;
  color:#0f172a;
  cursor:pointer;
  min-height:42px;
}
.koj-position-check:hover{border-color:#93c5fd;background:#eff6ff;}
.koj-position-check input{
  width:16px!important;
  height:16px!important;
  min-height:16px!important;
  margin:0!important;
  padding:0!important;
  justify-self:center;
}
.koj-position-check span{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
@media(max-width:900px){
  .koj-master-actions{grid-template-columns:1fr;}
  .koj-master-action-card{align-items:flex-start;flex-direction:column;}
  .koj-position-picker{grid-template-columns:1fr;}
}

/* === Requestor / Submittal compact modal bubble fix === */
body.modal-open{overflow:hidden;}
.requestor-toolbar-card{border:1px solid #dbe7f5;border-radius:18px;background:#f8fbff;padding:14px 16px;margin:14px 0 16px;box-shadow:0 10px 28px rgba(15,23,42,.04);}
.requestor-toolbar-main{display:flex;gap:10px;flex-wrap:wrap;align-items:center;justify-content:space-between;}
.requestor-toolbar-search input{width:100%;}
.requestor-filter-chip-row{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0 0;}
.requestor-filter-chip{border:1px solid #d7e3f2;background:#fff;border-radius:999px;padding:8px 13px;font-weight:900;color:#334155;cursor:pointer;line-height:1;}
.requestor-filter-chip.active{background:#2563eb;color:#fff;border-color:#2563eb;box-shadow:0 8px 18px rgba(37,99,235,.18);}
.requestor-list-card{border:1px solid #dbe7f5;border-radius:18px;background:#fff;padding:0;overflow:hidden;}
.requestor-compact-table-wrap{max-height:62vh;overflow:auto;}
.requestor-compact-table{width:100%;border-collapse:separate;border-spacing:0;}
.requestor-compact-table thead th{position:sticky;top:0;z-index:2;background:#f4f7fb;color:#172554;border-bottom:1px solid #dbe7f5;}
.requestor-compact-table td,.requestor-compact-table th{vertical-align:middle;padding:12px 14px;border-bottom:1px solid #edf2f7;}
.requestor-action-row{display:flex;gap:8px;flex-wrap:wrap;align-items:center;}
.requestor-type-badge{display:inline-flex;align-items:center;border-radius:999px;padding:6px 12px;font-weight:900;font-size:12px;background:#eef2ff;color:#3730a3;border:1px solid #c7d2fe;text-transform:capitalize;}
.requestor-type-internal{background:#e0f2fe;color:#075985;border-color:#7dd3fc;}
.requestor-type-external{background:#fef3c7;color:#92400e;border-color:#fcd34d;}
.requestor-type-customer{background:#dcfce7;color:#166534;border-color:#86efac;}
.requestor-edit-modal{position:fixed;inset:0;background:rgba(15,23,42,.55);z-index:9999;display:flex;align-items:flex-start;justify-content:center;padding:28px 18px;overflow:auto;backdrop-filter:blur(2px);}
.requestor-edit-modal.hidden{display:none!important;}
.requestor-edit-modal-card{width:min(980px,96vw);background:#fff;border:1px solid #dbe7f5;border-radius:22px;box-shadow:0 24px 70px rgba(15,23,42,.28);overflow:hidden;}
.requestor-wizard-card{max-width:1020px;}
.requestor-edit-modal-header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:18px 22px;border-bottom:1px solid #e5edf7;background:#fff;position:sticky;top:0;z-index:3;}
.requestor-edit-modal-body{padding:18px 22px 10px;}
.requestor-wizard-tabs{display:flex;gap:8px;flex-wrap:wrap;border-bottom:1px solid #dbe7f5;padding:0 0 12px;margin:0 0 18px;}
.requestor-wizard-tab{border:1px solid #d7e3f2;background:#fff;border-radius:999px;padding:9px 15px;font-weight:900;cursor:pointer;color:#334155;line-height:1;}
.requestor-wizard-tab.active{background:#2563eb;color:#fff;border-color:#2563eb;box-shadow:0 8px 18px rgba(37,99,235,.18);}
.requestor-tab-panel.hidden{display:none!important;}
.requestor-edit-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;}
.requestor-edit-grid .field{min-width:0;}
.requestor-edit-grid .requestor-wide{grid-column:1/-1;}
.requestor-edit-modal-footer{display:flex;gap:10px;justify-content:flex-end;padding:14px 22px 20px;border-top:1px solid #e5edf7;background:#fff;}
.submittal-page-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;flex-wrap:wrap;margin-bottom:14px;}
.submittal-actions{display:flex;gap:8px;flex-wrap:wrap;}
.btn-small{padding:7px 10px;font-size:12px;border-radius:10px;}
@media(max-width:900px){.requestor-edit-modal{padding:10px}.requestor-edit-grid{grid-template-columns:1fr}.requestor-edit-modal-card{width:100%}.requestor-toolbar-main{align-items:stretch}.requestor-action-row{flex-direction:column;align-items:stretch}}

/* Master Submittal sidebar safety fix
   Avoid blank/collapsed-looking sidebar when permission-ready class is late or sidebar.js is missing. */
body:not(.app-permissions-ready):not(.app-permissions-cached) .sidebar .menu-item[href],
body.sidebar-force-ready .sidebar .menu-item[href]{
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}
.sidebar-group.has-active > .sidebar-submenu,
.sidebar-group.is-open > .sidebar-submenu{
  display: flex !important;
}
.sidebar .menu-item.active{
  visibility: visible !important;
  opacity: 1 !important;
}

/* SIDEBAR_VERTICAL_RESTORE_FIX
   Restore sidebar folder/menu layout after module-specific compact/list styles.
   Keep all sidebar groups vertical and full-width, never row/grid. */
.sidebar,
.sidebar *{
  box-sizing:border-box;
}
.sidebar{
  overflow-x:hidden !important;
}
.sidebar .sidebar-group{
  display:block !important;
  width:100% !important;
  min-width:0 !important;
}
.sidebar .sidebar-group-toggle{
  display:flex !important;
  flex-direction:row !important;
  align-items:center !important;
  justify-content:space-between !important;
  width:100% !important;
}
.sidebar .sidebar-submenu{
  width:100% !important;
  min-width:0 !important;
  box-sizing:border-box !important;
  flex-direction:column !important;
  align-items:stretch !important;
  justify-content:flex-start !important;
  gap:4px !important;
}
.sidebar-group.is-open > .sidebar-submenu,
.sidebar-group.has-active > .sidebar-submenu{
  display:flex !important;
  flex-direction:column !important;
  align-items:stretch !important;
}
.sidebar .sidebar-submenu .menu-item,
.sidebar .menu-item{
  display:flex !important;
  flex-direction:row !important;
  align-items:center !important;
  justify-content:flex-start !important;
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
  white-space:normal !important;
  text-align:left !important;
  line-height:1.25 !important;
}
.sidebar .sidebar-submenu .menu-item{
  margin:3px 0 !important;
}
.sidebar .menu-item .menu-item-label,
.sidebar .menu-item span:not(.menu-badge){
  min-width:0 !important;
  white-space:normal !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}
.sidebar .menu-item i,
.sidebar .menu-item svg,
.sidebar .menu-item .menu-icon{
  flex:0 0 auto !important;
}
.sidebar .menu-badge,
.sidebar-group-badge{
  flex:0 0 auto !important;
  margin-left:auto !important;
}
/* Do not let page-level grids/flex helpers turn sidebar into horizontal cards. */
.sidebar .requestor-action-row,
.sidebar .submittal-actions,
.sidebar .toolbar,
.sidebar .filter-row,
.sidebar .chip-row{
  display:flex !important;
  flex-direction:column !important;
  align-items:stretch !important;
}
/* SIDEBAR_VERTICAL_RESTORE_FIX_END */

/* SIDEBAR_STABLE_MANUAL_CLOSE_FIX_START
   Hardening for sidebar after Master Requestor/Submittal UI updates.
   Keep sidebar folders vertical and manually toggleable. */
.sidebar{
  overflow-y:auto;
  overflow-x:hidden !important;
}
.sidebar .sidebar-group{
  display:block !important;
  width:100% !important;
  margin:8px 0 !important;
}
.sidebar .sidebar-group-toggle{
  display:flex !important;
  flex-direction:row !important;
  align-items:center !important;
  justify-content:space-between !important;
  width:100% !important;
  text-align:left !important;
  white-space:nowrap !important;
}
.sidebar .sidebar-submenu{
  display:none !important;
  flex-direction:column !important;
  grid-template-columns:none !important;
  width:100% !important;
  padding:6px 0 4px 10px !important;
  margin-left:5px !important;
  border-left:1px solid rgba(148,163,184,.18) !important;
}
.sidebar .sidebar-group.is-open > .sidebar-submenu{
  display:flex !important;
}
.sidebar .sidebar-submenu .menu-item,
.sidebar .menu-item{
  display:flex !important;
  flex-direction:row !important;
  align-items:center !important;
  justify-content:flex-start !important;
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
  white-space:normal !important;
  overflow:visible !important;
  text-overflow:clip !important;
  box-sizing:border-box !important;
}
.sidebar .menu-item.hidden,
.sidebar .sidebar-group.hidden{
  display:none !important;
}
body.sidebar-force-ready .sidebar .menu-item[href]{
  visibility:visible !important;
}
.sidebar .sidebar-chevron{
  flex:0 0 auto !important;
}
.sidebar .sidebar-group.is-open > .sidebar-group-toggle .sidebar-chevron{
  transform:rotate(180deg) !important;
}
/* Keep page-level chip/bubble styles from damaging sidebar and master pages */
.master-koj-filter-chip,
.koj-filter-chip,
.requestor-filter-chip,
.mr-filter-chip,
.workflow-tab,
.wizard-tab,
.modal-tab,
.role-tab,
.filter-chip{
  border-radius:999px !important;
  padding:8px 13px !important;
  line-height:1.1 !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:6px !important;
  width:auto !important;
  min-width:auto !important;
  white-space:nowrap !important;
}
.koj-position-badge,
.position-count-badge,
.badge-pill,
.status-pill,
.type-pill,
.badge.type,
.koj-type-badge{
  border-radius:999px !important;
  padding:6px 10px !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  width:auto !important;
  min-width:auto !important;
  line-height:1 !important;
  white-space:nowrap !important;
}
.koj-compact-table td:first-child strong,
.koj-compact-table .koj-name,
.koj-name-main{
  margin-right:6px !important;
}
.koj-compact-table td:first-child,
.koj-list-table td:first-child{
  white-space:normal !important;
  word-break:normal !important;
}
/* SIDEBAR_STABLE_MANUAL_CLOSE_FIX_END */

/* MASTER_BUBBLE_SUBMITTAL_STYLE_V2_START
   Normalize filter chips and badges to match Master Submittal style.
   Scoped to content area only so sidebar remains stable. */
.main-content #kindJobFilterChips,
.main-content .koj-filter-chips,
.main-content #requestorQuickFilters,
.main-content .requestor-filter-chip-row,
.main-content .filter-chip-row,
.main-content .chip-row{
  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  gap:8px !important;
  flex-wrap:wrap !important;
  margin:10px 0 12px !important;
}

.main-content #kindJobFilterChips > button,
.main-content .koj-filter-chips > button,
.main-content button.koj-filter-chip,
.main-content #requestorQuickFilters > button,
.main-content .requestor-filter-chip-row > button,
.main-content button.requestor-filter-chip,
.main-content button.filter-chip,
.main-content [data-koj-filter],
.main-content [data-requestor-quick-filter]{
  appearance:none !important;
  -webkit-appearance:none !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  width:auto !important;
  min-width:auto !important;
  max-width:none !important;
  height:auto !important;
  min-height:34px !important;
  padding:8px 15px !important;
  border:1px solid #d7e3f2 !important;
  border-radius:999px !important;
  background:#ffffff !important;
  color:#334155 !important;
  box-shadow:none !important;
  font-size:13px !important;
  font-weight:900 !important;
  line-height:1 !important;
  letter-spacing:0 !important;
  text-transform:none !important;
  white-space:nowrap !important;
  cursor:pointer !important;
}

.main-content #kindJobFilterChips > button:hover,
.main-content .koj-filter-chips > button:hover,
.main-content button.koj-filter-chip:hover,
.main-content #requestorQuickFilters > button:hover,
.main-content .requestor-filter-chip-row > button:hover,
.main-content button.requestor-filter-chip:hover,
.main-content button.filter-chip:hover,
.main-content [data-koj-filter]:hover,
.main-content [data-requestor-quick-filter]:hover{
  background:#f8fbff !important;
  border-color:#bcd2ee !important;
  color:#1e293b !important;
}

.main-content #kindJobFilterChips > button.active,
.main-content .koj-filter-chips > button.active,
.main-content button.koj-filter-chip.active,
.main-content #requestorQuickFilters > button.active,
.main-content .requestor-filter-chip-row > button.active,
.main-content button.requestor-filter-chip.active,
.main-content button.filter-chip.active,
.main-content [data-koj-filter].active,
.main-content [data-requestor-quick-filter].active{
  background:#2563eb !important;
  border-color:#2563eb !important;
  color:#ffffff !important;
  box-shadow:0 8px 18px rgba(37,99,235,.18) !important;
}

.main-content #kindJobFilterChips > button.active:hover,
.main-content .koj-filter-chips > button.active:hover,
.main-content button.koj-filter-chip.active:hover,
.main-content #requestorQuickFilters > button.active:hover,
.main-content .requestor-filter-chip-row > button.active:hover,
.main-content button.requestor-filter-chip.active:hover,
.main-content button.filter-chip.active:hover,
.main-content [data-koj-filter].active:hover,
.main-content [data-requestor-quick-filter].active:hover{
  background:#1d4ed8 !important;
  border-color:#1d4ed8 !important;
  color:#ffffff !important;
}

/* KOJ compact table name cell: force code/name to separate lines. */
.main-content #kindJobsTable .koj-main-cell,
.main-content table.koj-compact-table .koj-main-cell{
  display:flex !important;
  flex-direction:column !important;
  align-items:flex-start !important;
  justify-content:center !important;
  gap:4px !important;
  min-width:240px !important;
  white-space:normal !important;
  word-break:normal !important;
}
.main-content #kindJobsTable .koj-main-cell b,
.main-content table.koj-compact-table .koj-main-cell b{
  display:block !important;
  margin:0 !important;
  color:#0f172a !important;
  font-size:14px !important;
  font-weight:900 !important;
  line-height:1.2 !important;
}
.main-content #kindJobsTable .koj-main-cell > span,
.main-content table.koj-compact-table .koj-main-cell > span{
  display:block !important;
  margin:0 !important;
  color:#475569 !important;
  font-size:13px !important;
  font-weight:600 !important;
  line-height:1.25 !important;
}
.main-content #kindJobsTable .koj-compact-desc,
.main-content table.koj-compact-table .koj-compact-desc{
  display:block !important;
  margin-top:2px !important;
  color:#64748b !important;
  font-size:12px !important;
  font-weight:600 !important;
  line-height:1.25 !important;
}

/* Position count badge should match a soft pill, not black outline. */
.main-content #kindJobsTable .position-count-badge,
.main-content table.koj-compact-table .position-count-badge,
.main-content .position-count-badge,
.main-content button.position-count-badge{
  appearance:none !important;
  -webkit-appearance:none !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  width:auto !important;
  min-width:auto !important;
  min-height:30px !important;
  padding:6px 12px !important;
  border:1px solid #c7d2fe !important;
  border-radius:999px !important;
  background:#eef2ff !important;
  color:#3730a3 !important;
  box-shadow:none !important;
  font-size:12px !important;
  font-weight:900 !important;
  line-height:1 !important;
  white-space:nowrap !important;
}
.main-content #kindJobsTable .position-count-badge:hover,
.main-content table.koj-compact-table .position-count-badge:hover,
.main-content button.position-count-badge:hover{
  background:#e0e7ff !important;
  border-color:#818cf8 !important;
  color:#312e81 !important;
}

/* Requestor status column text stays plain; type badge stays pill. */
.main-content .requestor-type-badge,
.main-content .type-pill,
.main-content .koj-type-badge,
.main-content .koj-status-pill,
.main-content .status-pill,
.main-content .badge-pill,
.main-content .badge{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  width:auto !important;
  min-width:auto !important;
  border-radius:999px !important;
  padding:6px 11px !important;
  font-size:12px !important;
  font-weight:900 !important;
  line-height:1 !important;
  white-space:nowrap !important;
  box-shadow:none !important;
}

/* Sidebar safety: never apply page chip styles inside sidebar. */
.sidebar #kindJobFilterChips,
.sidebar #requestorQuickFilters,
.sidebar .koj-filter-chips,
.sidebar .requestor-filter-chip-row,
.sidebar .koj-filter-chip,
.sidebar .requestor-filter-chip,
.sidebar .filter-chip,
.sidebar [data-koj-filter],
.sidebar [data-requestor-quick-filter],
.sidebar .position-count-badge{
  all:unset !important;
}
/* MASTER_BUBBLE_SUBMITTAL_STYLE_V2_END */

/* MASTER_BUBBLE_SUBMITTAL_STYLE_V3_START
   Final override: make KOJ List and Requestor filter chips match Master Submittal.
   This block is intentionally page-element specific and placed last so older global button styles cannot win. */
#kindJobFilterChips,
#requestorQuickFilters,
.requestor-filter-chip-row{
  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  flex-wrap:wrap !important;
  gap:8px !important;
  margin:10px 0 12px !important;
}

#kindJobFilterChips button,
#kindJobFilterChips .koj-filter-chip,
button.koj-filter-chip[data-koj-filter],
#requestorQuickFilters button,
#requestorQuickFilters .filter-chip,
button.filter-chip[data-requestor-quick-filter],
.requestor-filter-chip-row button,
.requestor-filter-chip-row .requestor-filter-chip,
button.requestor-filter-chip{
  appearance:none !important;
  -webkit-appearance:none !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  width:auto !important;
  min-width:auto !important;
  max-width:none !important;
  min-height:34px !important;
  height:34px !important;
  padding:0 15px !important;
  border:1px solid #d7e3f2 !important;
  border-radius:999px !important;
  background:#ffffff !important;
  color:#334155 !important;
  box-shadow:none !important;
  outline:none !important;
  font-size:13px !important;
  font-weight:900 !important;
  line-height:1 !important;
  letter-spacing:0 !important;
  text-transform:none !important;
  text-decoration:none !important;
  white-space:nowrap !important;
  cursor:pointer !important;
}

#kindJobFilterChips button:hover,
#kindJobFilterChips .koj-filter-chip:hover,
button.koj-filter-chip[data-koj-filter]:hover,
#requestorQuickFilters button:hover,
#requestorQuickFilters .filter-chip:hover,
button.filter-chip[data-requestor-quick-filter]:hover,
.requestor-filter-chip-row button:hover,
.requestor-filter-chip-row .requestor-filter-chip:hover,
button.requestor-filter-chip:hover{
  background:#f8fbff !important;
  border-color:#bcd2ee !important;
  color:#1e293b !important;
}

#kindJobFilterChips button.active,
#kindJobFilterChips .koj-filter-chip.active,
button.koj-filter-chip[data-koj-filter].active,
#requestorQuickFilters button.active,
#requestorQuickFilters .filter-chip.active,
button.filter-chip[data-requestor-quick-filter].active,
.requestor-filter-chip-row button.active,
.requestor-filter-chip-row .requestor-filter-chip.active,
button.requestor-filter-chip.active{
  background:#2563eb !important;
  border-color:#2563eb !important;
  color:#ffffff !important;
  box-shadow:0 8px 18px rgba(37,99,235,.18) !important;
}

#kindJobFilterChips button.active:hover,
#kindJobFilterChips .koj-filter-chip.active:hover,
button.koj-filter-chip[data-koj-filter].active:hover,
#requestorQuickFilters button.active:hover,
#requestorQuickFilters .filter-chip.active:hover,
button.filter-chip[data-requestor-quick-filter].active:hover,
.requestor-filter-chip-row button.active:hover,
.requestor-filter-chip-row .requestor-filter-chip.active:hover,
button.requestor-filter-chip.active:hover{
  background:#1d4ed8 !important;
  border-color:#1d4ed8 !important;
  color:#ffffff !important;
}

/* KOJ table: keep code/name stacked, never glued on the same line. */
#kindJobsTable .koj-main-cell,
table.koj-compact-table .koj-main-cell{
  display:flex !important;
  flex-direction:column !important;
  align-items:flex-start !important;
  justify-content:center !important;
  gap:4px !important;
  min-width:260px !important;
  white-space:normal !important;
}
#kindJobsTable .koj-main-cell b,
table.koj-compact-table .koj-main-cell b{
  display:block !important;
  margin:0 !important;
  color:#0f172a !important;
  font-size:14px !important;
  font-weight:900 !important;
  line-height:1.2 !important;
}
#kindJobsTable .koj-main-cell span,
table.koj-compact-table .koj-main-cell span{
  display:block !important;
  margin:0 !important;
  color:#475569 !important;
  font-size:13px !important;
  font-weight:600 !important;
  line-height:1.25 !important;
}
#kindJobsTable .koj-compact-desc,
table.koj-compact-table .koj-compact-desc{
  display:block !important;
  margin-top:2px !important;
  color:#64748b !important;
  font-size:12px !important;
  font-weight:600 !important;
  line-height:1.25 !important;
}

/* Position count badge: same soft bubble language, not thick black outline. */
#kindJobsTable .position-count-badge,
table.koj-compact-table .position-count-badge,
button.position-count-badge,
.position-count-badge{
  appearance:none !important;
  -webkit-appearance:none !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  width:auto !important;
  min-width:auto !important;
  min-height:30px !important;
  height:30px !important;
  padding:0 12px !important;
  border:1px solid #c7d2fe !important;
  border-radius:999px !important;
  background:#eef2ff !important;
  color:#3730a3 !important;
  box-shadow:none !important;
  outline:none !important;
  font-size:12px !important;
  font-weight:900 !important;
  line-height:1 !important;
  white-space:nowrap !important;
}
#kindJobsTable .position-count-badge:hover,
table.koj-compact-table .position-count-badge:hover,
button.position-count-badge:hover{
  background:#e0e7ff !important;
  border-color:#818cf8 !important;
  color:#312e81 !important;
}

/* Requestor type badges remain rounded and consistent. */
.requestor-type-badge,
.type-pill,
.koj-type-badge,
.koj-status-pill,
.status-pill,
.badge-pill{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  width:auto !important;
  min-width:auto !important;
  border-radius:999px !important;
  padding:6px 11px !important;
  font-size:12px !important;
  font-weight:900 !important;
  line-height:1 !important;
  white-space:nowrap !important;
  box-shadow:none !important;
}
/* MASTER_BUBBLE_SUBMITTAL_STYLE_V3_END */

/* MASTER_KOJ_TABLE_DROPDOWN_DRAWER_REPAIR_START
   Scoped final override for Master Kind of Job compact list.
   Repairs broken action dropdown, position drawer, chips, and prevents native button fallback. */
#kindJobsTable .koj-action-cell,
table.koj-compact-table .koj-action-cell{
  position:relative !important;
  overflow:visible !important;
  white-space:nowrap !important;
}

#kindJobsTable .koj-action-cell > .btn,
table.koj-compact-table .koj-action-cell > .btn,
#kindJobsTable .koj-action-cell > button:first-child,
table.koj-compact-table .koj-action-cell > button:first-child{
  appearance:none !important;
  -webkit-appearance:none !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:6px !important;
  min-height:36px !important;
  height:36px !important;
  padding:0 14px !important;
  border:1px solid #d7e3f2 !important;
  border-radius:10px !important;
  background:#ffffff !important;
  color:#334155 !important;
  font-size:13px !important;
  font-weight:900 !important;
  line-height:1 !important;
  box-shadow:none !important;
  cursor:pointer !important;
}

#kindJobsTable .koj-action-menu.hidden,
table.koj-compact-table .koj-action-menu.hidden,
.koj-action-menu.hidden{
  display:none !important;
}

#kindJobsTable .koj-action-menu,
table.koj-compact-table .koj-action-menu,
.koj-action-menu{
  position:absolute !important;
  top:calc(100% + 6px) !important;
  right:0 !important;
  left:auto !important;
  z-index:9999 !important;
  display:flex !important;
  flex-direction:column !important;
  align-items:stretch !important;
  gap:6px !important;
  min-width:170px !important;
  width:max-content !important;
  padding:8px !important;
  border:1px solid #dbe6f4 !important;
  border-radius:14px !important;
  background:#ffffff !important;
  box-shadow:0 18px 45px rgba(15,23,42,.16) !important;
}

#kindJobsTable .koj-action-menu button,
table.koj-compact-table .koj-action-menu button,
.koj-action-menu button{
  appearance:none !important;
  -webkit-appearance:none !important;
  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  width:100% !important;
  min-height:34px !important;
  height:auto !important;
  padding:8px 11px !important;
  border:0 !important;
  border-radius:10px !important;
  background:#ffffff !important;
  color:#0f172a !important;
  font-size:13px !important;
  font-weight:800 !important;
  line-height:1.2 !important;
  text-align:left !important;
  white-space:nowrap !important;
  cursor:pointer !important;
}

#kindJobsTable .koj-action-menu button:hover,
table.koj-compact-table .koj-action-menu button:hover,
.koj-action-menu button:hover{
  background:#f1f5ff !important;
  color:#1d4ed8 !important;
}

.koj-compact-table-wrap,
#kindJobsTable,
table.koj-compact-table{
  overflow:visible !important;
}

#kindJobsTable .koj-main-cell,
table.koj-compact-table .koj-main-cell{
  display:grid !important;
  grid-template-columns:1fr !important;
  gap:3px !important;
  min-width:240px !important;
  white-space:normal !important;
}
#kindJobsTable .koj-main-cell b,
table.koj-compact-table .koj-main-cell b{
  display:block !important;
  margin:0 !important;
  line-height:1.18 !important;
}
#kindJobsTable .koj-main-cell span,
table.koj-compact-table .koj-main-cell span{
  display:block !important;
  margin:0 !important;
  line-height:1.2 !important;
}

#kindJobsTable .position-count-badge,
table.koj-compact-table .position-count-badge,
button.position-count-badge,
.position-count-badge{
  appearance:none !important;
  -webkit-appearance:none !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  min-height:30px !important;
  height:30px !important;
  padding:0 13px !important;
  border:1px solid #c7d2fe !important;
  border-radius:999px !important;
  background:#eef2ff !important;
  color:#3730a3 !important;
  box-shadow:none !important;
  font-size:12px !important;
  font-weight:900 !important;
  line-height:1 !important;
  white-space:nowrap !important;
}

/* Position drawer should behave like a modal, not raw text under the table. */
#kojPositionDrawer.hidden,
.koj-position-drawer.hidden{
  display:none !important;
}
#kojPositionDrawer,
.koj-position-drawer{
  position:fixed !important;
  inset:0 !important;
  z-index:20000 !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  padding:24px !important;
  background:rgba(15,23,42,.46) !important;
  backdrop-filter:blur(2px) !important;
}
#kojPositionDrawer .koj-position-drawer-card,
.koj-position-drawer-card{
  width:min(720px, calc(100vw - 48px)) !important;
  max-height:min(80vh, 720px) !important;
  overflow:auto !important;
  border:1px solid #dbe6f4 !important;
  border-radius:22px !important;
  background:#ffffff !important;
  box-shadow:0 28px 80px rgba(15,23,42,.25) !important;
  padding:20px !important;
}
.koj-position-drawer-header{
  display:flex !important;
  align-items:flex-start !important;
  justify-content:space-between !important;
  gap:16px !important;
  padding-bottom:14px !important;
  margin-bottom:14px !important;
  border-bottom:1px solid #e5edf7 !important;
}
.koj-position-drawer-close{
  appearance:none !important;
  -webkit-appearance:none !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  width:42px !important;
  height:42px !important;
  min-width:42px !important;
  border:0 !important;
  border-radius:14px !important;
  background:#f1f5f9 !important;
  color:#0f172a !important;
  font-size:24px !important;
  font-weight:900 !important;
  line-height:1 !important;
  cursor:pointer !important;
}
.koj-position-drawer-close:hover{
  background:#e2e8f0 !important;
}
#kojPositionDrawerList,
.koj-position-drawer-list{
  display:flex !important;
  flex-wrap:wrap !important;
  align-items:flex-start !important;
  gap:8px !important;
  color:#0f172a !important;
  line-height:1.35 !important;
}
#kojPositionDrawerList .koj-position-chip,
.koj-position-drawer-list .koj-position-chip,
.koj-position-chip{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  max-width:100% !important;
  padding:8px 11px !important;
  border:1px solid #d7e3f2 !important;
  border-radius:999px !important;
  background:#f8fbff !important;
  color:#334155 !important;
  font-size:12px !important;
  font-weight:800 !important;
  line-height:1.1 !important;
  white-space:normal !important;
  word-break:break-word !important;
}

/* Match Workflow Configuration bubble style for KOJ list filters. */
#kindJobFilterChips,
.koj-filter-chips{
  display:flex !important;
  flex-wrap:wrap !important;
  gap:8px !important;
  margin:10px 0 12px !important;
}
#kindJobFilterChips .koj-filter-chip,
#kindJobFilterChips button,
.koj-filter-chip{
  appearance:none !important;
  -webkit-appearance:none !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  height:36px !important;
  min-height:36px !important;
  padding:0 15px !important;
  border:1px solid #d7e3f2 !important;
  border-radius:999px !important;
  background:#ffffff !important;
  color:#334155 !important;
  box-shadow:none !important;
  font-size:13px !important;
  font-weight:800 !important;
  line-height:1 !important;
}
#kindJobFilterChips .koj-filter-chip.active,
#kindJobFilterChips button.active,
.koj-filter-chip.active{
  background:#2563eb !important;
  border-color:#2563eb !important;
  color:#ffffff !important;
  box-shadow:0 8px 18px rgba(37,99,235,.18) !important;
}
/* MASTER_KOJ_TABLE_DROPDOWN_DRAWER_REPAIR_END */

/* Job Workflow performance pagination */
.wf-pagination-bar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:10px 12px;
  margin:8px 0 10px;
  border:1px solid #e2e8f0;
  border-radius:16px;
  background:linear-gradient(180deg,#ffffff,#f8fafc);
}
.wf-page-actions{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.wf-page-info{
  font-weight:800;
  color:#334155;
}
@media(max-width:760px){
  .wf-pagination-bar{align-items:flex-start;flex-direction:column;}
}


/* Global sidebar hide/show button - book-style arrow, applies to all app pages */
.global-sidebar-toggle{
  position:fixed;
  z-index:10050;
  top:104px;
  left:calc(var(--sidebar-w, 280px) - 15px);
  width:30px;
  height:44px;
  border-radius:999px;
  border:1px solid rgba(203,213,225,.9);
  background:#ffffff;
  color:#0f172a;
  box-shadow:0 10px 26px rgba(15,23,42,.16);
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  font-weight:1000;
  font-size:25px;
  line-height:1;
  padding:0 0 2px 0;
  transition:left .18s ease, transform .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease;
}
.global-sidebar-toggle:hover{
  background:#eff6ff;
  color:#2563eb;
  transform:translateX(1px) scale(1.04);
  box-shadow:0 14px 32px rgba(37,99,235,.20);
}
body.sidebar-global-collapsed .global-sidebar-toggle{
  left:8px;
}
body.sidebar-global-collapsed .global-sidebar-toggle:hover{
  transform:translateX(1px) scale(1.04);
}
body.sidebar-global-collapsed .app-layout{
  grid-template-columns:0 minmax(0,1fr) !important;
}
body.sidebar-global-collapsed .sidebar{
  transform:translateX(-105%) !important;
  width:var(--sidebar-w, 280px);
  min-width:var(--sidebar-w, 280px);
  overflow:hidden !important;
  pointer-events:none !important;
  opacity:0 !important;
  transition:transform .18s ease, opacity .18s ease !important;
}
body:not(.sidebar-global-collapsed) .sidebar{
  transition:transform .18s ease, opacity .18s ease !important;
}
body.sidebar-global-collapsed .content,
body.sidebar-global-collapsed .main{
  min-width:0;
}
/* Remove old duplicate hamburger buttons from earlier sidebar experiments. */
#discussionSidebarToggle,
.discussion-sidebar-toggle,
.sidebar-mobile-toggle,
.app-sidebar-hamburger{
  display:none !important;
}
@media(max-width:900px){
  .global-sidebar-toggle{top:18px;left:14px;}
  body.sidebar-global-collapsed .global-sidebar-toggle{left:14px;}
}

/* =========================================================
   PHASE 1 UI FOUNDATION - Enterprise Workspace Polish
   Scope: visual-only enhancement, no workflow/data logic changes.
   ========================================================= */
:root{
  --ui-bg:#f5f7fb;
  --ui-panel:#ffffff;
  --ui-panel-soft:#f8fafc;
  --ui-text:#0f172a;
  --ui-muted:#64748b;
  --ui-line:#e2e8f0;
  --ui-line-soft:#edf2f7;
  --ui-primary:#4f46e5;
  --ui-primary-2:#2563eb;
  --ui-primary-soft:#eef2ff;
  --ui-ready:#2563eb;
  --ui-processing:#f97316;
  --ui-qc:#7c3aed;
  --ui-revision:#dc2626;
  --ui-complete:#16a34a;
  --ui-archived:#64748b;
  --ui-shadow-sm:0 8px 22px rgba(15,23,42,.055);
  --ui-shadow-md:0 16px 44px rgba(15,23,42,.095);
  --ui-radius:18px;
  --ui-radius-lg:24px;
  --sidebar-w:292px;
}

html{scroll-behavior:smooth;}
body{
  background:
    radial-gradient(circle at 0% 0%, rgba(79,70,229,.12), transparent 30%),
    radial-gradient(circle at 100% 0%, rgba(14,165,233,.09), transparent 28%),
    linear-gradient(180deg,#f8fafc 0%,#f1f5f9 100%) !important;
  color:var(--ui-text);
}

.app-layout{grid-template-columns:var(--sidebar-w) minmax(0,1fr) !important;}
.main{padding:26px;}
.content{background:transparent;}

/* Topbar: cleaner enterprise command bar */
.topbar{
  height:76px;
  position:sticky;
  top:0;
  z-index:80;
  background:rgba(255,255,255,.86) !important;
  backdrop-filter:blur(14px);
  border-bottom:1px solid rgba(226,232,240,.82) !important;
  box-shadow:0 8px 26px rgba(15,23,42,.035);
}
.searchbox{
  border-radius:999px !important;
  border-color:#dbe4f0 !important;
  background:#f8fafc !important;
  min-height:44px !important;
  padding-left:16px !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.8);
}
.searchbox:focus,
input:focus,
select:focus,
textarea:focus{
  outline:none;
  border-color:#a5b4fc !important;
  box-shadow:0 0 0 4px rgba(79,70,229,.12) !important;
}

/* Sidebar workspace / book-tab feel */
.sidebar{
  width:var(--sidebar-w);
  min-width:var(--sidebar-w);
  padding:20px 14px 24px !important;
  background:
    linear-gradient(180deg,rgba(255,255,255,.07),rgba(255,255,255,0) 26%),
    radial-gradient(circle at 50% -10%,rgba(99,102,241,.24),transparent 34%),
    linear-gradient(180deg,#111827 0%,#0f172a 100%) !important;
  border-right:1px solid rgba(148,163,184,.16) !important;
  box-shadow:18px 0 44px rgba(15,23,42,.20) !important;
}
.sidebar .brand-row{
  margin:0 4px 18px !important;
  padding:10px 8px 18px !important;
  border-bottom:1px solid rgba(255,255,255,.10) !important;
}
.sidebar .brand-logo{
  width:44px;
  height:44px;
  border-radius:16px !important;
  color:#fff !important;
  background:linear-gradient(135deg,#4f46e5,#7c3aed 55%,#06b6d4) !important;
  box-shadow:0 16px 32px rgba(79,70,229,.35) !important;
}
.sidebar-group{
  margin:9px 0 !important;
  border-radius:18px;
}
.sidebar-group-toggle{
  min-height:44px;
  padding:11px 12px !important;
  border:1px solid transparent !important;
  background:rgba(255,255,255,.035) !important;
  color:#cbd5e1 !important;
  border-radius:16px !important;
  letter-spacing:.075em !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.035);
}
.sidebar-group-toggle:hover{
  background:rgba(255,255,255,.075) !important;
  color:#fff !important;
  border-color:rgba(255,255,255,.08) !important;
}
.sidebar-group.is-open > .sidebar-group-toggle,
.sidebar-group.has-active > .sidebar-group-toggle{
  background:linear-gradient(135deg,rgba(79,70,229,.28),rgba(37,99,235,.17)) !important;
  color:#fff !important;
  border-color:rgba(165,180,252,.24) !important;
}
.sidebar-submenu{
  margin:7px 0 8px 16px !important;
  padding:5px 0 5px 12px !important;
  border-left:1px solid rgba(148,163,184,.22) !important;
}
.sidebar-submenu .menu-item,
.sidebar .menu-item{
  min-height:39px;
  margin:4px 0 !important;
  padding:10px 11px !important;
  border-radius:14px !important;
  color:#aebbd0 !important;
  background:transparent !important;
  border:1px solid transparent;
  font-weight:800 !important;
  letter-spacing:-.005em;
  transition:background .16s ease,color .16s ease,border-color .16s ease,transform .16s ease;
}
.sidebar .menu-item:hover{
  transform:translateX(2px);
  color:#ffffff !important;
  background:rgba(255,255,255,.07) !important;
  border-color:rgba(255,255,255,.07);
}
.sidebar .menu-item.active{
  color:#ffffff !important;
  background:linear-gradient(135deg,#4f46e5,#2563eb) !important;
  border-color:rgba(255,255,255,.14);
  box-shadow:0 10px 24px rgba(37,99,235,.26);
}
.sidebar-group-badge,
.menu-badge{
  box-shadow:0 8px 16px rgba(249,115,22,.25);
}
.global-sidebar-toggle{
  left:calc(var(--sidebar-w) - 16px) !important;
  top:108px !important;
  border-color:#dbe4f0 !important;
}
body.sidebar-global-collapsed .global-sidebar-toggle{left:10px !important;}

/* Cards and summary cards */
.card,
.wf-card,
.bill-card,
.report-card,
.rule-list-card,
.rule-editor-card,
.progress-kpi-card,
.dashboard-chart-card,
.dev-status-card,
.import-card{
  border:1px solid rgba(226,232,240,.95) !important;
  border-radius:var(--ui-radius-lg) !important;
  background:rgba(255,255,255,.92) !important;
  box-shadow:var(--ui-shadow-sm) !important;
}
.card:hover,
.progress-kpi-card:hover,
.dashboard-chart-card:hover{
  box-shadow:var(--ui-shadow-md) !important;
}
.dashboard-hero,
.card.dashboard-hero{
  background:
    radial-gradient(circle at right top,rgba(79,70,229,.14),transparent 35%),
    linear-gradient(135deg,#ffffff,#f8fafc) !important;
  border-radius:28px !important;
}
.progress-kpi-grid,
.card-grid,
.dev-status-grid{
  gap:18px !important;
}
.progress-kpi-card,
.summary-pill,
.wf-summary-btn{
  position:relative;
  overflow:hidden;
}
.progress-kpi-card::before,
.wf-summary-btn::before{
  content:"";
  position:absolute;
  left:0;top:0;bottom:0;
  width:5px;
  background:linear-gradient(180deg,var(--ui-primary),var(--ui-primary-2));
  opacity:.88;
}
.progress-kpi-card strong,
.wf-summary-btn .num{
  letter-spacing:-.045em;
}

/* Buttons */
.btn{
  border-radius:13px !important;
  font-weight:900 !important;
  border:1px solid transparent;
  transition:transform .14s ease,box-shadow .14s ease,background .14s ease,border-color .14s ease;
}
.btn:hover{transform:translateY(-1px);box-shadow:0 10px 22px rgba(15,23,42,.10);}
.btn-primary{background:linear-gradient(135deg,#4f46e5,#2563eb) !important;}
.btn-success{background:linear-gradient(135deg,#16a34a,#22c55e) !important;}
.btn-danger{background:linear-gradient(135deg,#dc2626,#ef4444) !important;}
.btn-muted,.btn:not(.btn-primary):not(.btn-success):not(.btn-danger){
  background:#f8fafc;
  border-color:#dbe4f0;
  color:#334155;
}

/* Modern table style */
.table-wrap,
.wf-table-wrap,
.bill-table-wrap,
.report-table-wrap,
.workflow-job-table-wrap{
  border-radius:20px !important;
  border:1px solid #dfe7f2 !important;
  background:#ffffff !important;
  box-shadow:var(--ui-shadow-sm) !important;
  overflow:auto !important;
}
table,
.wf-table,
.bill-table,
.report-table,
.workflow-job-table{
  border-collapse:separate !important;
  border-spacing:0 !important;
  background:#fff !important;
}
th,
.wf-table th,
.bill-table th,
.report-table th,
.workflow-job-table th{
  position:sticky;
  top:0;
  z-index:3;
  background:linear-gradient(180deg,#f8fafc,#f1f5f9) !important;
  color:#334155 !important;
  border-bottom:1px solid #dbe4f0 !important;
  font-size:12px !important;
  text-transform:uppercase;
  letter-spacing:.055em;
  padding:12px 13px !important;
}
td,
.wf-table td,
.bill-table td,
.report-table td,
.workflow-job-table td{
  padding:12px 13px !important;
  border-bottom:1px solid #edf2f7 !important;
  color:#1f2937;
}
tbody tr:hover td,
.wf-table tbody tr:hover td,
.bill-table tbody tr:hover td,
.report-table tbody tr:hover td,
.workflow-job-table tbody tr:hover td{
  background:#f8fbff !important;
}
.table-filter-row th{top:42px !important;background:#fff !important;}

/* Consistent status color system */
.status-ready,
.status-open,
.task-status-not-started,
.job-health-badge.active{
  background:#eff6ff !important;color:#1d4ed8 !important;border-color:#bfdbfe !important;
}
.status-processing,
.status-in-progress,
.task-status-in-progress,
.task-status-pending-on-hold,
.job-health-badge.partial{
  background:#fff7ed !important;color:#c2410c !important;border-color:#fed7aa !important;
}
.status-qc,
.status-submitted,
.task-status-submitted,
.task-status-qc-process,
.task-status-waiting-qc{
  background:#f5f3ff !important;color:#6d28d9 !important;border-color:#ddd6fe !important;
}
.status-revision,
.status-rejected,
.task-status-rejected,
.job-health-badge.stuck{
  background:#fef2f2 !important;color:#b91c1c !important;border-color:#fecaca !important;
}
.status-complete,
.status-approved,
.status-done,
.task-status-approved,
.task-status-done,
.task-status-qc-done,
.job-health-badge.complete{
  background:#f0fdf4 !important;color:#15803d !important;border-color:#bbf7d0 !important;
}
.status-archived,
.job-health-badge.waiting{
  background:#f1f5f9 !important;color:#475569 !important;border-color:#cbd5e1 !important;
}
.task-status-pill,
.finding-status-pill,
.role-status-pill,
.job-health-badge,
.koj-type-badge,
.wf-badge,
.bill-badge,
.report-badge,
.kind-tag,
.assignment-tag,
.unassigned-tag,
.workflow-pill,
.severity-pill,
.autosave-pill,
.summary-pill{
  border-radius:999px !important;
  font-weight:900 !important;
  border:1px solid currentColor;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.65);
}

/* Consistent modal / slide panel polish */
.twb-modal,
.koj-edit-modal,
.task-rules-modal,
.job-chat-modal{
  background:rgba(15,23,42,.48) !important;
  backdrop-filter:blur(8px);
}
.twb-modal-panel,
.koj-edit-modal-card,
.task-rules-panel,
.job-chat-panel{
  border-radius:26px !important;
  border:1px solid rgba(226,232,240,.95) !important;
  box-shadow:0 28px 80px rgba(15,23,42,.24) !important;
  background:#ffffff !important;
}
.twb-modal-head,
.koj-edit-modal-header,
.koj-edit-modal-footer,
.task-rules-header,
.job-chat-head{
  border-color:#edf2f7 !important;
}
.twb-modal-close,
.koj-edit-modal-close{
  border-radius:12px !important;
}

/* Form controls */
input,select,textarea{
  border-radius:13px !important;
  border-color:#dbe4f0 !important;
  background:#ffffff;
}
.field label{
  color:#334155 !important;
  letter-spacing:.01em;
}

/* Loading / hidden permission guard remains smooth */
body:not(.app-permissions-ready):not(.app-permissions-cached) .sidebar .menu-item[href]{
  transition:none !important;
}

@media(max-width:900px){
  .app-layout{grid-template-columns:1fr !important;}
  .sidebar{width:100%;min-width:0;}
  .main{padding:18px;}
  .topbar{height:auto;min-height:70px;flex-wrap:wrap;padding:14px 18px;}
  .global-sidebar-toggle{left:14px !important;top:18px !important;}
}

/* =========================================================
   TrackerWebProject - Phase 2 Workflow Visualization
   Pipeline workflow, dispatch board, kanban teamwork, progress bars
   ========================================================= */
.wf-visual-workspace{
  background:linear-gradient(180deg,rgba(255,255,255,.96),rgba(248,250,252,.96));
}
.wf-pipeline-viz{margin-top:4px;}
.wf-pipeline-track{
  display:grid;
  grid-template-columns:repeat(6,minmax(145px,1fr));
  gap:12px;
  align-items:stretch;
}
.wf-pipeline-stage{
  position:relative;
  border:1px solid #dbeafe;
  background:#fff;
  border-radius:20px;
  padding:14px 14px 14px 12px;
  display:flex;
  gap:10px;
  align-items:center;
  text-align:left;
  cursor:pointer;
  min-height:82px;
  box-shadow:0 14px 28px rgba(15,23,42,.06);
  transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.wf-pipeline-stage:hover{transform:translateY(-2px);box-shadow:0 18px 36px rgba(15,23,42,.10);border-color:#93c5fd;}
.wf-pipeline-stage:not(:last-child)::after{
  content:"";
  position:absolute;
  right:-13px;
  top:50%;
  width:14px;
  height:2px;
  background:#cbd5e1;
  transform:translateY(-50%);
  z-index:0;
}
.wf-pipeline-dot{
  width:34px;
  height:34px;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-weight:900;
  background:#eff6ff;
  color:#1d4ed8;
  flex:0 0 auto;
}
.wf-pipeline-body{display:flex;flex-direction:column;gap:3px;min-width:0;}
.wf-pipeline-label{font-weight:950;color:#0f172a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.wf-pipeline-hint{font-size:11px;color:#64748b;text-transform:uppercase;letter-spacing:.04em;}
.wf-pipeline-count{margin-left:auto;font-size:24px;font-weight:950;color:#0f172a;}
.wf-pipeline-stage.is-empty{opacity:.62;}
.wf-pipeline-stage.orange .wf-pipeline-dot{background:#fff7ed;color:#c2410c;}
.wf-pipeline-stage.purple .wf-pipeline-dot{background:#f5f3ff;color:#6d28d9;}
.wf-pipeline-stage.red .wf-pipeline-dot{background:#fee2e2;color:#b91c1c;}
.wf-pipeline-stage.green .wf-pipeline-dot{background:#ecfdf5;color:#047857;}
.wf-pipeline-helper{margin-top:10px;color:#64748b;}
.wf-progress-viz{display:grid;grid-template-columns:repeat(3,minmax(180px,1fr));gap:12px;margin-top:14px;}
.wf-progress-card{border:1px solid #e2e8f0;border-radius:18px;background:#fff;padding:14px;box-shadow:0 12px 26px rgba(15,23,42,.045);}
.wf-progress-top{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px;}
.wf-progress-top span{font-weight:950;color:#0f172a;}
.wf-progress-bar{height:10px;border-radius:999px;background:#e2e8f0;overflow:hidden;margin-bottom:8px;}
.wf-progress-bar span{display:block;height:100%;border-radius:999px;background:#22c55e;min-width:2px;}
.wf-progress-bar.orange span{background:#f97316;}
.wf-progress-bar.red span{background:#ef4444;}

.twb-dispatch-workspace{background:linear-gradient(180deg,#ffffff,#f8fafc);}
.twb-dispatch-board{margin-top:10px;}
.twb-dispatch-metrics{display:grid;grid-template-columns:repeat(3,minmax(120px,1fr));gap:12px;margin-bottom:14px;}
.twb-dispatch-metrics div{border:1px solid #e2e8f0;border-radius:18px;background:#fff;padding:14px;box-shadow:0 12px 26px rgba(15,23,42,.045);}
.twb-dispatch-metrics b{display:block;font-size:28px;line-height:1;color:#0f172a;}
.twb-dispatch-metrics span{display:block;margin-top:5px;color:#64748b;font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.04em;}
.twb-kanban-board{display:grid;grid-template-columns:repeat(3,minmax(260px,1fr));gap:14px;align-items:start;}
.twb-kanban-column{border:1px solid #dbe4f0;border-radius:22px;background:#f8fafc;padding:12px;min-height:240px;}
.twb-kanban-column.active{background:#eff6ff;}
.twb-kanban-column.upcoming{background:#fff7ed;}
.twb-kanban-column.requests{background:#f5f3ff;}
.twb-kanban-column-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:12px;padding:2px 4px;}
.twb-kanban-column-head b{display:block;color:#0f172a;font-size:15px;}
.twb-kanban-column-head span{display:block;margin-top:2px;color:#64748b;font-size:12px;}
.twb-kanban-column-head em{font-style:normal;background:#fff;border:1px solid #dbe4f0;border-radius:999px;min-width:30px;height:30px;display:inline-flex;align-items:center;justify-content:center;font-weight:950;color:#0f172a;}
.twb-kanban-list{display:flex;flex-direction:column;gap:10px;}
.twb-kanban-card{border:1px solid rgba(148,163,184,.28);border-radius:18px;background:#fff;padding:12px;box-shadow:0 12px 26px rgba(15,23,42,.06);}
.twb-kanban-card-top{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:10px;}
.twb-kanban-title{font-weight:950;color:#0f172a;line-height:1.25;}
.twb-kanban-subtitle{font-size:12px;color:#64748b;margin-top:3px;}
.twb-kanban-meta{display:flex;flex-direction:column;gap:3px;margin-top:10px;padding-top:10px;border-top:1px dashed #e2e8f0;font-size:12px;color:#334155;}
.twb-kanban-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:12px;}
.twb-kanban-actions{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end;}
.twb-kanban-empty{border:1px dashed #cbd5e1;border-radius:16px;padding:18px;text-align:center;color:#64748b;background:rgba(255,255,255,.65);}
.twb-dispatch-note{margin-top:10px;color:#64748b;}

@media(max-width:1280px){
  .wf-pipeline-track{grid-template-columns:repeat(3,minmax(160px,1fr));}
  .wf-pipeline-stage:not(:last-child)::after{display:none;}
  .twb-kanban-board{grid-template-columns:1fr;}
}
@media(max-width:760px){
  .wf-pipeline-track,.wf-progress-viz,.twb-dispatch-metrics{grid-template-columns:1fr;}
  .twb-kanban-footer{align-items:flex-start;flex-direction:column;}
}


/* H3-Logic subtle sidebar branding */
.sidebar .h3-logic-powered{
  margin:18px 8px 6px;
  padding:10px 12px;
  border-top:1px solid rgba(255,255,255,.08);
  color:rgba(203,213,225,.72);
  font-size:11px;
  font-weight:700;
  letter-spacing:.02em;
  text-align:center;
  white-space:nowrap;
  user-select:none;
}
.sidebar .h3-logic-powered::before{
  content:'';
  display:block;
  width:34px;
  height:2px;
  margin:0 auto 8px;
  border-radius:999px;
  background:linear-gradient(90deg, rgba(99,102,241,.2), rgba(6,182,212,.55), rgba(34,197,94,.2));
}
body.sidebar-global-collapsed .sidebar .h3-logic-powered{
  display:none;
}
@media (max-width: 900px){
  .sidebar .h3-logic-powered{display:none;}
}


/* =========================================================
   My Tasks Phase 1 UX Cleanup
   UI-only: compact focus workspace + collapsible sections.
   ========================================================= */
.my-tasks-phase1-ux #myTaskDetailPanel {
  border-radius: 24px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 18px 48px rgba(15, 23, 42, .08);
}

.my-tasks-phase1-ux #myTaskDetailPanel > div:first-child {
  position: sticky;
  top: 84px;
  z-index: 12;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(12px);
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .08);
}

.my-tasks-phase1-ux .mt-focus-actions {
  position: sticky;
  top: 176px;
  z-index: 11;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  padding: 10px;
  margin: 12px 0;
  border: 1px solid #dbeafe;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(239,246,255,.96), rgba(255,255,255,.96));
  box-shadow: 0 10px 28px rgba(37, 99, 235, .08);
}

.my-tasks-phase1-ux .mt-workspace-section {
  margin: 12px 0;
  border: 1px solid #dbe4f0;
  border-radius: 18px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .05);
}

.my-tasks-phase1-ux .mt-workspace-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #e5edf7;
  background: linear-gradient(135deg, #f8fbff, #ffffff);
}

.my-tasks-phase1-ux .mt-workspace-section-titlewrap {
  min-width: 0;
}

.my-tasks-phase1-ux .mt-workspace-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #0f172a;
  font-weight: 900;
  font-size: 1rem;
}

.my-tasks-phase1-ux .mt-workspace-section-icon {
  display: inline-flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #eef2ff;
  color: #4338ca;
  font-weight: 900;
}

.my-tasks-phase1-ux .mt-workspace-section-desc {
  margin: 4px 0 0;
  color: #64748b;
}

.my-tasks-phase1-ux .mt-workspace-section-body {
  padding: 14px;
}

.my-tasks-phase1-ux .mt-workspace-section.is-collapsed .mt-workspace-section-body {
  display: none;
}

.my-tasks-phase1-ux .mt-workspace-toggle {
  min-width: 88px;
  justify-content: center;
}

.my-tasks-phase1-ux .completion-box,
.my-tasks-phase1-ux .job-path-box,
.my-tasks-phase1-ux .ocalc-import-panel {
  padding: 0;
}

.my-tasks-phase1-ux .mt-workspace-section-body > .completion-policy-head,
.my-tasks-phase1-ux .mt-workspace-section-body > .ocalc-import-header,
.my-tasks-phase1-ux .mt-workspace-section-body > .job-path-header {
  padding: 0 0 12px;
  border-bottom: 1px dashed #e2e8f0;
  margin-bottom: 12px;
}

.my-tasks-phase1-ux .additional-evidence-box.mt-workspace-section .mt-workspace-section-body,
.my-tasks-phase1-ux .completion-policy-box.mt-workspace-section .mt-workspace-section-body,
.my-tasks-phase1-ux .job-path-box.mt-workspace-section .mt-workspace-section-body,
.my-tasks-phase1-ux .ocalc-import-panel.mt-workspace-section .mt-workspace-section-body {
  display: grid;
  gap: 12px;
}

.my-tasks-phase1-ux .mt-workspace-section.is-collapsed .mt-workspace-section-body {
  display: none !important;
}

.my-tasks-phase1-ux #myTasksTablePanel .table-wrap {
  max-height: calc(100vh - 300px);
  min-height: 420px;
  overflow: auto;
}

.my-tasks-phase1-ux #myTasksTablePanel .table-wrap table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
}

.my-tasks-phase1-ux .completion-form-grid,
.my-tasks-phase1-ux .job-path-grid,
.my-tasks-phase1-ux .ocalc-import-controls {
  gap: 10px;
}

@media (max-width: 900px) {
  .my-tasks-phase1-ux #myTaskDetailPanel > div:first-child,
  .my-tasks-phase1-ux .mt-focus-actions {
    position: static;
  }

  .my-tasks-phase1-ux .mt-workspace-section-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .my-tasks-phase1-ux .mt-workspace-toggle {
    width: 100%;
  }

  .my-tasks-phase1-ux #myTasksTablePanel .table-wrap {
    min-height: 320px;
  }
}

/* =========================================================
   My Tasks Phase 2 UX
   Task cards + focused detail panel. UI-only, no API changes.
   ========================================================= */
.my-tasks-page .mt-task-card-workspace{
  margin: 12px 0 16px;
  padding: 14px;
  border: 1px solid #dbeafe;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(239,246,255,.9), rgba(255,255,255,.96));
  box-shadow: 0 14px 34px rgba(37,99,235,.07);
}
.my-tasks-page .mt-task-card-toolbar{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  margin-bottom:12px;
}
.my-tasks-page .mt-task-card-toolbar b{
  color:#0f172a;
  font-size:16px;
  font-weight:950;
}
.my-tasks-page .mt-task-card-toolbar p{
  margin:3px 0 0;
}
.my-tasks-page .mt-task-card-grid{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap:12px;
}
.my-tasks-page .mt-task-card{
  position:relative;
  overflow:hidden;
  border:1px solid rgba(148,163,184,.28);
  border-radius:20px;
  background:#fff;
  padding:14px;
  box-shadow:0 12px 28px rgba(15,23,42,.06);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.my-tasks-page .mt-task-card:hover{
  transform:translateY(-2px);
  border-color:#93c5fd;
  box-shadow:0 18px 38px rgba(37,99,235,.12);
}
.my-tasks-page .mt-task-card.is-active{
  border-color:#4f46e5;
  box-shadow:0 18px 42px rgba(79,70,229,.18);
}
.my-tasks-page .mt-task-card.is-active::before{
  content:'';
  position:absolute;
  inset:0 auto 0 0;
  width:5px;
  background:linear-gradient(180deg,#4f46e5,#06b6d4,#22c55e);
}
.my-tasks-page .mt-task-card-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
}
.my-tasks-page .mt-task-project{
  display:inline-flex;
  align-items:center;
  padding:4px 9px;
  border-radius:999px;
  background:#eff6ff;
  color:#2563eb;
  font-size:11px;
  font-weight:900;
  letter-spacing:.02em;
}
.my-tasks-page .mt-task-card h3{
  margin:8px 0 2px;
  color:#0f172a;
  font-size:18px;
  line-height:1.2;
}
.my-tasks-page .mt-task-card p{
  margin:0;
  color:#64748b;
  font-size:12px;
}
.my-tasks-page .mt-task-card-tags{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-top:12px;
}
.my-tasks-page .mt-task-card-tags span{
  display:inline-flex;
  max-width:100%;
  padding:5px 9px;
  border:1px solid #e2e8f0;
  border-radius:999px;
  background:#f8fafc;
  color:#334155;
  font-size:11px;
  font-weight:800;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.my-tasks-page .mt-task-progress{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:8px;
  margin-top:14px;
}
.my-tasks-page .mt-task-progress div{
  border:1px solid #e2e8f0;
  border-radius:14px;
  padding:9px;
  background:#f8fafc;
}
.my-tasks-page .mt-task-progress b{
  display:block;
  color:#0f172a;
  font-weight:950;
  font-size:15px;
}
.my-tasks-page .mt-task-progress span{
  color:#64748b;
  font-size:11px;
  font-weight:800;
}
.my-tasks-page .mt-task-progressbar{
  height:8px;
  margin-top:12px;
  border-radius:999px;
  background:#e2e8f0;
  overflow:hidden;
}
.my-tasks-page .mt-task-progressbar i{
  display:block;
  height:100%;
  border-radius:inherit;
  background:linear-gradient(90deg,#4f46e5,#06b6d4,#22c55e);
}
.my-tasks-page .mt-task-card-meta{
  display:flex;
  flex-direction:column;
  gap:4px;
  margin-top:12px;
  padding-top:12px;
  border-top:1px dashed #e2e8f0;
  color:#64748b;
  font-size:12px;
}
.my-tasks-page .mt-task-card-actions{
  display:flex;
  justify-content:flex-end;
  gap:7px;
  flex-wrap:wrap;
  margin-top:12px;
}
.my-tasks-page .mt-task-card-empty{
  grid-column:1/-1;
  border:1px dashed #cbd5e1;
  border-radius:18px;
  padding:22px;
  text-align:center;
  color:#64748b;
  background:#fff;
}
.my-tasks-page .mt-job-task-table-wrap{
  margin-top:12px;
}
.my-tasks-page #myTaskDetailPanel{
  border:1px solid #dbeafe;
}
.my-tasks-page #myTaskDetailPanel:not(.hidden)::before{
  content:'Focused Task Workspace';
  display:inline-flex;
  margin:0 0 10px;
  padding:6px 10px;
  border-radius:999px;
  background:#eef2ff;
  color:#4338ca;
  font-size:11px;
  font-weight:950;
  letter-spacing:.06em;
  text-transform:uppercase;
}
@media(max-width:760px){
  .my-tasks-page .mt-task-card-grid{grid-template-columns:1fr;}
  .my-tasks-page .mt-task-progress{grid-template-columns:1fr;}
}

/* My Tasks Phase 3 — Editable Table UX */
.my-tasks-phase3-table-ux #myTasksTablePanel .table-wrap {
  max-height: 68vh;
  overflow: auto;
  border-radius: 18px;
}

.mt-editable-toolbar {
  margin: 10px 0 14px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255,255,255,0.96), rgba(248,250,252,0.86));
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.06);
}

.mt-editable-toolbar-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.mt-editable-toolbar-title {
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.mt-editable-toolbar-hint {
  margin: 4px 0 0;
  color: #64748b;
}

.mt-editable-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.mt-editable-toolbar .btn.is-active {
  background: linear-gradient(135deg, #4f46e5, #2563eb) !important;
  color: #fff !important;
  border-color: transparent !important;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.22);
}

.mt-editable-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.mt-editable-stats .pill {
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: #fff;
  color: #334155;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
}

.mt-editable-stats .pill.ok {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

.mt-editable-stats .pill.warn {
  background: #fff7ed;
  color: #c2410c;
  border-color: #fed7aa;
}

.mt-editable-stats .pill.muted {
  background: #f8fafc;
  color: #64748b;
}

.my-tasks-phase3-table-ux #myTasksTable thead th {
  position: sticky;
  top: 0;
  z-index: 7;
  background: #f8fafc;
  box-shadow: inset 0 -1px 0 rgba(148, 163, 184, 0.28);
}

.my-tasks-phase3-table-ux #myTasksTable tbody tr.mt-row-focused {
  outline: 2px solid rgba(79, 70, 229, 0.28);
  outline-offset: -2px;
  background: rgba(238, 242, 255, 0.62);
}

.my-tasks-phase3-table-ux #myTasksTable tbody tr.mt-row-dirty {
  background: rgba(255, 247, 237, 0.88);
}

.my-tasks-phase3-table-ux #myTasksTable tbody tr.mt-row-filter-hidden {
  display: none;
}

.my-tasks-phase3-table-ux #myTasksTable .my-task-cell.editable,
.my-tasks-phase3-table-ux #myTasksTable .my-task-note:not(:disabled) {
  border-color: rgba(37, 99, 235, 0.28);
  background: #fff;
}

.my-tasks-phase3-table-ux #myTasksTable .my-task-cell.readonly,
.my-tasks-phase3-table-ux #myTasksTable .my-task-cell:disabled,
.my-tasks-phase3-table-ux #myTasksTable .my-task-note:disabled {
  background: #f8fafc;
  color: #64748b;
}

.my-tasks-phase3-table-ux #myTasksTable .mt-cell-dirty {
  border-color: #f97316 !important;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.12);
}

.my-tasks-compact-table #myTasksTable th,
.my-tasks-compact-table #myTasksTable td {
  padding-top: 7px !important;
  padding-bottom: 7px !important;
}

.my-tasks-compact-table #myTasksTable input {
  min-height: 32px !important;
  padding-top: 5px !important;
  padding-bottom: 5px !important;
}

@media (max-width: 900px) {
  .mt-editable-toolbar-main {
    align-items: stretch;
  }
  .mt-editable-toolbar-actions {
    width: 100%;
  }
  .mt-editable-toolbar-actions .btn {
    flex: 1 1 auto;
  }
}

/* My Tasks Phase 4 — O-Calc import as drawer/modal */
.mytask-tool-launcher{
  margin:14px 0;
  padding:18px;
  border:1px solid #dbe7f5;
  border-radius:18px;
  background:linear-gradient(135deg,#ffffff 0%,#f8fbff 58%,#eef4ff 100%);
  display:flex;
  justify-content:space-between;
  gap:18px;
  align-items:center;
  box-shadow:0 14px 35px rgba(15,23,42,.06);
}
.mytask-tool-launcher h3{margin:3px 0 6px;font-size:18px;color:#0f172a;}
.mytask-tool-launcher p{margin:0;color:#64748b;line-height:1.45;max-width:850px;}
.mytask-tool-kicker{
  display:inline-flex;
  align-items:center;
  gap:6px;
  color:#4f46e5;
  font-size:11px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.mytask-tool-launcher-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap;justify-content:flex-end;}
.mytask-drawer-overlay{
  position:fixed;
  inset:0;
  background:rgba(15,23,42,.48);
  backdrop-filter:blur(4px);
  z-index:3000;
}
.mytask-drawer{
  position:fixed;
  top:0;
  right:0;
  width:min(1120px,92vw);
  height:100vh;
  overflow:auto;
  z-index:3001;
  background:#f8fbff;
  border-left:1px solid #dbe7f5;
  box-shadow:-24px 0 70px rgba(15,23,42,.22);
  padding:22px;
  animation:mytaskDrawerIn .18s ease-out;
}
.mytask-drawer-header{
  position:sticky;
  top:0;
  z-index:5;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  padding:0 0 16px;
  margin-bottom:12px;
  background:linear-gradient(180deg,#f8fbff 75%,rgba(248,251,255,.82));
  border-bottom:1px solid #e2e8f0;
}
.mytask-drawer-header h2{margin:4px 0 4px;color:#0f172a;font-size:24px;}
.mytask-drawer-header p{margin:0;color:#64748b;}
body.mytask-drawer-open{overflow:hidden;}
.mytask-drawer .ocalc-import-panel{
  margin:0;
  background:#fff;
  border-radius:18px;
  box-shadow:none;
}
.mytask-drawer .ocalc-import-controls{
  justify-content:flex-start;
}
.mytask-drawer .table-wrap{
  max-height:54vh;
  overflow:auto;
}
@keyframes mytaskDrawerIn{
  from{transform:translateX(40px);opacity:.7;}
  to{transform:translateX(0);opacity:1;}
}
@media(max-width:900px){
  .mytask-tool-launcher{display:block;}
  .mytask-tool-launcher-actions{justify-content:flex-start;margin-top:14px;}
  .mytask-drawer{width:100vw;padding:16px;}
  .mytask-drawer-header{display:block;}
  .mytask-drawer-header .btn{margin-top:12px;}
}

/* My Tasks Phase 5 — Guided Submit & Evidence Checklist */
.mt-submit-guide{
  margin:14px 0 16px;
  padding:16px;
  border:1px solid #dbeafe;
  border-radius:18px;
  background:linear-gradient(135deg,#ffffff 0%,#f8fbff 62%,#eef6ff 100%);
  box-shadow:0 14px 34px rgba(15,23,42,.06);
}
.mt-submit-guide-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin-bottom:12px;
}
.mt-submit-guide-head h3{
  margin:3px 0 4px;
  color:#0f172a;
  font-size:18px;
}
.mt-submit-guide-head p{margin:0;color:#64748b;}
.mt-submit-guide-score{
  display:inline-flex;
  align-items:center;
  white-space:nowrap;
  padding:7px 11px;
  border-radius:999px;
  background:#eef2ff;
  color:#3730a3;
  border:1px solid #c7d2fe;
  font-weight:900;
  font-size:12px;
}
.mt-submit-steps{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
}
.mt-submit-step{
  display:flex;
  gap:10px;
  align-items:flex-start;
  padding:12px;
  border:1px solid #e2e8f0;
  border-radius:15px;
  background:#fff;
  transition:transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.mt-submit-step-icon{
  width:26px;
  height:26px;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  background:#f1f5f9;
  color:#475569;
  font-size:12px;
  font-weight:900;
}
.mt-submit-step b{display:block;color:#0f172a;font-size:13px;margin-bottom:3px;}
.mt-submit-step p{margin:0;color:#64748b;font-size:12px;line-height:1.35;}
.mt-submit-step.is-ready{
  border-color:#bbf7d0;
  background:linear-gradient(135deg,#f0fdf4 0%,#ffffff 100%);
}
.mt-submit-step.is-ready .mt-submit-step-icon{
  background:#16a34a;
  color:#fff;
}
.mt-submit-step.is-ready .mt-submit-step-icon::before{content:'✓';}
.mt-submit-step.is-ready .mt-submit-step-icon{font-size:0;}
.mt-submit-step.is-ready .mt-submit-step-icon::before{font-size:13px;}
.mt-submit-step.is-needed{
  border-color:#fed7aa;
  background:linear-gradient(135deg,#fff7ed 0%,#ffffff 100%);
}
.mt-submit-step.is-needed .mt-submit-step-icon{
  background:#fb923c;
  color:#fff;
}
.my-tasks-phase5-submit-guide .completion-policy-box #completeActiveJobBtn{
  width:100%;
  justify-content:center;
  margin-top:12px;
  min-height:42px;
  font-weight:900;
}
.my-tasks-phase5-submit-guide .completion-form-grid{
  align-items:start;
}
.my-tasks-phase5-submit-guide .completion-checklist-wrap:not(.hidden){
  margin-top:12px;
}
@media(max-width:1100px){
  .mt-submit-steps{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-width:640px){
  .mt-submit-guide-head{display:block;}
  .mt-submit-guide-score{margin-top:10px;}
  .mt-submit-steps{grid-template-columns:1fr;}
}

/* My Tasks Phase 6: Save All + Row Edit Drawer */
.my-tasks-saveall-rowedit .mt-editable-toolbar-actions #mtSaveAllRows {
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.16);
}
.my-tasks-saveall-rowedit .mt-edit-row-btn {
  white-space: nowrap;
}
.mt-row-edit-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(4px);
  z-index: 1090;
}
.mt-row-edit-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(560px, 94vw);
  height: 100vh;
  background: var(--surface, #ffffff);
  border-left: 1px solid var(--border, #dbe7f5);
  box-shadow: -28px 0 70px rgba(15, 23, 42, 0.24);
  z-index: 1100;
  display: flex;
  flex-direction: column;
}
.mt-row-edit-head,
.mt-row-edit-foot {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border, #dbe7f5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.mt-row-edit-foot {
  border-top: 1px solid var(--border, #dbe7f5);
  border-bottom: 0;
  justify-content: flex-end;
}
.mt-row-edit-head h2 {
  margin: 4px 0;
  font-size: 22px;
}
.mt-row-edit-body {
  padding: 18px 20px;
  overflow: auto;
  display: grid;
  gap: 12px;
}
.mt-row-edit-field {
  display: grid;
  gap: 6px;
}
.mt-row-edit-field span {
  font-size: 11px;
  font-weight: 800;
  color: var(--muted, #64748b);
  letter-spacing: .04em;
  text-transform: uppercase;
}
.mt-row-edit-field input {
  width: 100%;
  border: 1px solid var(--border, #dbe7f5);
  border-radius: 12px;
  padding: 11px 12px;
  background: var(--surface-soft, #f8fbff);
  color: var(--text, #0f172a);
}
.mt-row-edit-field input:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, .12);
}
.mt-row-edit-field.is-readonly input {
  opacity: .68;
  cursor: not-allowed;
}
body.mt-row-edit-open {
  overflow: hidden;
}
@media (max-width: 720px){
  .mt-row-edit-drawer { width: 100vw; }
}

/* My Tasks Phase 6.1 — robust Save All toolbar */
.mt-saveall-sticky-toolbar {
  position: sticky;
  top: 72px;
  z-index: 35;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 10px 0 12px;
  padding: 12px 14px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(12px);
}
.mt-saveall-toolbar-left {
  min-width: 240px;
}
.mt-saveall-toolbar-title {
  font-weight: 900;
  color: var(--ui-text, #0f172a);
  letter-spacing: -0.01em;
}
.mt-saveall-toolbar-meta {
  margin-top: 2px;
  color: var(--ui-muted, #64748b);
  font-size: 0.82rem;
}
.mt-saveall-toolbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}
#mtSaveAllVisibleRowsBtn {
  box-shadow: 0 12px 28px rgba(22, 163, 74, 0.18);
}
#mtSaveChangedRowsBtn:not(:disabled) {
  box-shadow: 0 12px 28px rgba(79, 70, 229, 0.18);
}
tr.mt-row-dirty td {
  background: rgba(255, 251, 235, 0.64);
}
.mt-cell-dirty {
  border-color: rgba(245, 158, 11, 0.72) !important;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.14) !important;
}
@media (max-width: 900px) {
  .mt-saveall-sticky-toolbar {
    position: static;
    align-items: stretch;
    flex-direction: column;
  }
  .mt-saveall-toolbar-actions {
    justify-content: flex-start;
  }
}

/* My Tasks Save All Toolbar V3 — forced visible toolbar above row search */
.mt-force-saveall-toolbar {
  position: sticky;
  top: 76px;
  z-index: 80;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 10px 0 12px;
  padding: 12px 14px;
  border: 1px solid rgba(148, 163, 184, 0.36);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.10);
  backdrop-filter: blur(12px);
  width: 100%;
  box-sizing: border-box;
}
.mt-force-saveall-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 230px;
}
.mt-force-saveall-left strong {
  color: var(--ui-text, #0f172a);
  font-weight: 900;
}
.mt-force-saveall-left span {
  color: var(--ui-muted, #64748b);
  font-size: 0.84rem;
}
.mt-force-saveall-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}
#mtForceSaveAllBtn:not(:disabled) {
  box-shadow: 0 12px 28px rgba(22, 163, 74, 0.20);
}
#mtForceSaveDirtyBtn:not(:disabled) {
  box-shadow: 0 12px 28px rgba(79, 70, 229, 0.18);
}
#myTasksTable tr.mt-row-dirty td {
  background: rgba(255, 251, 235, 0.70);
}
#myTasksTable .mt-cell-dirty {
  border-color: rgba(245, 158, 11, 0.74) !important;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.16) !important;
}
@media (max-width: 900px) {
  .mt-force-saveall-toolbar {
    position: static;
    flex-direction: column;
    align-items: stretch;
  }
  .mt-force-saveall-actions {
    justify-content: flex-start;
  }
}


/* My Tasks Save All V4 */
.mt-saveall-v4-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:12px 14px;
  margin:0 0 12px 0;
  border:1px solid rgba(148,163,184,.35);
  border-radius:18px;
  background:rgba(255,255,255,.96);
  box-shadow:0 14px 34px rgba(15,23,42,.08);
  position:sticky;
  top:76px;
  z-index:40;
}
.mt-saveall-v4-info{display:flex;flex-direction:column;gap:3px;color:#0f172a;}
.mt-saveall-v4-info span{font-size:.85rem;color:#64748b;}
.mt-saveall-v4-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end;}
.mt-row-dirty-v4{background:rgba(245,158,11,.06)!important;}
.mt-cell-dirty-v4{border-color:#f59e0b!important;box-shadow:0 0 0 3px rgba(245,158,11,.16)!important;}
.mt-row-edit-v4.hidden{display:none!important;}
.mt-row-edit-v4{position:fixed;inset:0;z-index:9998;}
.mt-row-edit-v4-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.48);backdrop-filter:blur(3px);}
.mt-row-edit-v4-panel{position:absolute;top:5vh;right:24px;width:min(560px,calc(100vw - 48px));max-height:90vh;overflow:auto;background:#fff;border:1px solid rgba(148,163,184,.35);border-radius:24px;box-shadow:0 30px 80px rgba(15,23,42,.28);}
.mt-row-edit-v4-head,.mt-row-edit-v4-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 18px;border-bottom:1px solid rgba(226,232,240,.9);}
.mt-row-edit-v4-foot{border-top:1px solid rgba(226,232,240,.9);border-bottom:0;justify-content:flex-end;}
.mt-row-edit-v4-head h3{margin:2px 0 0;font-size:1.15rem;}
.mt-row-edit-v4-body{padding:16px 18px;display:grid;grid-template-columns:1fr;gap:12px;}
.mt-row-edit-field-v4{display:grid;gap:6px;font-weight:700;color:#334155;}
.mt-row-edit-field-v4 input{width:100%;border:1px solid #dbe7f5;border-radius:14px;padding:11px 12px;font:inherit;color:#0f172a;background:#fff;}
@media (max-width: 760px){.mt-saveall-v4-toolbar{align-items:stretch;flex-direction:column;top:0}.mt-saveall-v4-actions{justify-content:flex-start}.mt-row-edit-v4-panel{right:12px;left:12px;width:auto}}

/* MRE Phase 3 - My Tasks Row Viewer */
.mre-row-viewer-overlay.hidden,
.mre-row-viewer-drawer.hidden{display:none!important;}
.mre-row-viewer-overlay{position:fixed;inset:0;background:rgba(15,23,42,.50);backdrop-filter:blur(4px);z-index:9996;}
.mre-row-viewer-drawer{position:fixed;top:0;right:0;width:min(760px,calc(100vw - 28px));height:100vh;background:#f8fbff;border-left:1px solid rgba(148,163,184,.35);box-shadow:-30px 0 90px rgba(15,23,42,.30);z-index:9997;display:flex;flex-direction:column;overflow:hidden;}
.mre-row-viewer-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:20px 22px;border-bottom:1px solid rgba(226,232,240,.95);background:linear-gradient(135deg,rgba(255,255,255,.98),rgba(239,246,255,.98));}
.mre-row-viewer-head h3{margin:2px 0 4px;font-size:1.35rem;color:#0f172a;}
.mre-row-viewer-head p{margin:0;color:#64748b;}
.mre-row-viewer-body{padding:18px 22px 24px;overflow:auto;display:grid;gap:16px;}
.mre-row-viewer-loading{margin:auto;color:#0f172a;font-weight:800;padding:32px;}
.mre-summary-strip{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;}
.mre-kv{padding:10px 12px;border:1px solid rgba(148,163,184,.25);border-radius:14px;background:#fff;display:grid;gap:2px;min-width:0;}
.mre-kv span{font-size:.75rem;color:#64748b;text-transform:uppercase;letter-spacing:.04em;}
.mre-kv b{color:#0f172a;font-size:.92rem;overflow-wrap:anywhere;}
.mre-row-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;}
.mre-row-card{border:1px solid rgba(148,163,184,.30);border-radius:18px;background:#fff;box-shadow:0 12px 30px rgba(15,23,42,.06);overflow:hidden;}
.mre-row-card.wide{grid-column:1/-1;}
.mre-row-card h4{margin:0;padding:13px 15px;border-bottom:1px solid rgba(226,232,240,.9);font-size:.95rem;color:#0f172a;background:rgba(248,250,252,.85);}
.mre-row-card-body{padding:14px 15px;display:grid;gap:8px;}
.mre-compare-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;}
.mre-compare-col{display:grid;gap:10px;align-content:start;}
.mre-compare-col>h4{border:0;background:transparent;padding:0;margin:0 0 2px;color:#334155;}
.mre-memo{border:1px solid rgba(226,232,240,.95);border-radius:14px;background:#fff;padding:11px 12px;}
.mre-memo b{display:block;color:#1e293b;margin-bottom:6px;}
.mre-memo p{margin:0;color:#334155;line-height:1.45;white-space:normal;overflow-wrap:anywhere;}
.mre-compare-col.is-proposed .mre-memo{background:rgba(239,246,255,.65);border-color:rgba(147,197,253,.55);}
.mre-empty{color:#94a3b8;font-style:italic;}
.mre-empty-box{border:1px dashed rgba(148,163,184,.70);border-radius:16px;background:#fff;padding:18px;color:#64748b;text-align:center;}
.mre-hoa-list{margin:0;padding-left:18px;display:grid;gap:7px;color:#334155;}
.mre-hoa-list li{line-height:1.4;overflow-wrap:anywhere;}
body.mre-row-viewer-open{overflow:hidden;}
@media(max-width:900px){.mre-row-viewer-drawer{width:100vw}.mre-summary-strip,.mre-row-grid,.mre-compare-grid{grid-template-columns:1fr}.mre-row-viewer-head{padding:16px}.mre-row-viewer-body{padding:14px}}

/* MRE Phase 3.1 — Scrollable row viewer drawer fix */
.mre-row-viewer-drawer{
  height:100dvh;
  max-height:100dvh;
  min-height:0;
}
.mre-row-viewer-head{
  flex:0 0 auto;
  position:sticky;
  top:0;
  z-index:2;
}
.mre-row-viewer-body{
  flex:1 1 auto;
  min-height:0;
  overflow-y:auto;
  overflow-x:hidden;
  padding-bottom:42px;
  overscroll-behavior:contain;
}
.mre-row-card-body{
  min-height:0;
}
.mre-row-card.wide .mre-row-card-body{
  max-height:260px;
  overflow:auto;
}
.mre-row-card.wide:last-child .mre-row-card-body{
  max-height:none;
}
.mre-hoa-list{
  max-height:220px;
  overflow:auto;
  padding-right:8px;
}
.mre-compare-grid{
  align-items:start;
}
.mre-compare-col{
  min-width:0;
}
.mre-memo{
  min-width:0;
}
.mre-memo p{
  max-height:160px;
  overflow:auto;
}
@media(max-width:900px){
  .mre-row-viewer-drawer{width:100vw;height:100dvh;max-height:100dvh;}
  .mre-row-viewer-body{padding-bottom:56px;}
  .mre-row-card.wide .mre-row-card-body,.mre-hoa-list{max-height:240px;}
}

/* MRE Phase 3.2 — Centered scroll modal fix
   Make the MRE row viewer readable at normal browser zoom. */
.mre-row-viewer-overlay{
  position:fixed;
  inset:0;
  z-index:99980;
  background:rgba(15,23,42,.55);
  backdrop-filter:blur(5px);
}
.mre-row-viewer-drawer{
  position:fixed!important;
  top:50%!important;
  left:50%!important;
  right:auto!important;
  bottom:auto!important;
  transform:translate(-50%,-50%)!important;
  width:min(1120px,calc(100vw - 36px))!important;
  height:min(90dvh,900px)!important;
  max-height:90dvh!important;
  min-height:0!important;
  z-index:99981!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
  border:1px solid rgba(148,163,184,.35)!important;
  border-radius:24px!important;
  background:#f8fbff!important;
  box-shadow:0 30px 100px rgba(15,23,42,.38)!important;
}
.mre-row-viewer-head{
  flex:0 0 auto!important;
  position:sticky!important;
  top:0!important;
  z-index:3!important;
  padding:16px 18px!important;
  background:linear-gradient(135deg,rgba(255,255,255,.99),rgba(239,246,255,.99))!important;
}
.mre-row-viewer-head h3{
  font-size:1.15rem!important;
  margin:2px 0 4px!important;
}
.mre-row-viewer-body{
  flex:1 1 auto!important;
  min-height:0!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  padding:14px 18px 20px!important;
  overscroll-behavior:contain!important;
}
.mre-summary-strip{
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
}
.mre-row-grid{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:12px!important;
}
.mre-row-card{
  border-radius:16px!important;
}
.mre-row-card h4{
  padding:10px 12px!important;
}
.mre-row-card-body{
  padding:11px 12px!important;
  gap:7px!important;
}
.mre-kv{
  padding:8px 10px!important;
  border-radius:12px!important;
}
.mre-kv span{
  font-size:.68rem!important;
}
.mre-kv b{
  font-size:.84rem!important;
}
.mre-row-card.wide .mre-row-card-body{
  max-height:230px!important;
  overflow:auto!important;
}
.mre-row-card.wide:last-child .mre-row-card-body{
  max-height:360px!important;
  overflow:auto!important;
}
.mre-hoa-list{
  max-height:190px!important;
  overflow:auto!important;
}
.mre-compare-grid{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:12px!important;
}
.mre-memo{
  padding:9px 10px!important;
  border-radius:12px!important;
}
.mre-memo p{
  max-height:130px!important;
  overflow:auto!important;
}
body.mre-row-viewer-open{
  overflow:hidden!important;
}
@media(max-width:900px){
  .mre-row-viewer-drawer{
    width:calc(100vw - 18px)!important;
    height:92dvh!important;
    max-height:92dvh!important;
    border-radius:18px!important;
  }
  .mre-summary-strip,
  .mre-row-grid,
  .mre-compare-grid{
    grid-template-columns:1fr!important;
  }
  .mre-row-viewer-body{
    padding:12px!important;
  }
  .mre-row-card.wide .mre-row-card-body,
  .mre-row-card.wide:last-child .mre-row-card-body,
  .mre-hoa-list{
    max-height:240px!important;
  }
}

/* MRE Phase 3.3 — Restore right side drawer + full drawer scroll
   User preference: keep MRE viewer on the side, but make the red-marked content area scrollable/readable. */
.mre-row-viewer-overlay{
  position:fixed!important;
  inset:0!important;
  z-index:99980!important;
  background:rgba(15,23,42,.48)!important;
  backdrop-filter:blur(4px)!important;
}
.mre-row-viewer-drawer{
  position:fixed!important;
  top:0!important;
  right:0!important;
  left:auto!important;
  bottom:0!important;
  transform:none!important;
  width:min(820px,calc(100vw - 42px))!important;
  height:100dvh!important;
  max-height:100dvh!important;
  min-height:0!important;
  border-radius:0!important;
  border:0!important;
  border-left:1px solid rgba(148,163,184,.38)!important;
  background:#f8fbff!important;
  box-shadow:-28px 0 90px rgba(15,23,42,.32)!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
  z-index:99981!important;
}
.mre-row-viewer-head{
  flex:0 0 auto!important;
  position:sticky!important;
  top:0!important;
  z-index:4!important;
  padding:16px 18px!important;
  border-bottom:1px solid rgba(226,232,240,.95)!important;
  background:linear-gradient(135deg,rgba(255,255,255,.99),rgba(239,246,255,.99))!important;
}
.mre-row-viewer-body{
  flex:1 1 auto!important;
  min-height:0!important;
  height:auto!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  padding:14px 18px 32px!important;
  overscroll-behavior:contain!important;
  scrollbar-gutter:stable!important;
}
.mre-summary-strip{
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
}
.mre-row-grid{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:12px!important;
}
.mre-row-card.wide .mre-row-card-body{
  max-height:none!important;
  overflow:visible!important;
}
.mre-row-card.wide:last-child .mre-row-card-body{
  max-height:none!important;
  overflow:visible!important;
}
.mre-hoa-list{
  max-height:260px!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  padding-right:8px!important;
}
.mre-compare-grid{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  align-items:start!important;
  gap:12px!important;
}
.mre-memo p{
  max-height:180px!important;
  overflow:auto!important;
}
body.mre-row-viewer-open{
  overflow:hidden!important;
}
@media(max-width:980px){
  .mre-row-viewer-drawer{
    width:100vw!important;
  }
  .mre-summary-strip,
  .mre-row-grid,
  .mre-compare-grid{
    grid-template-columns:1fr!important;
  }
  .mre-row-viewer-body{
    padding:12px 14px 36px!important;
  }
}

/* MRE Phase 3.4 — Readable side drawer single-scroll fix
   Keep the viewer as a right drawer, freeze the title/header, and make only the drawer body scroll.
   All HOA and MRE data is expanded so the user does not fight nested scroll boxes. */
.mre-row-viewer-overlay{
  position:fixed!important;
  inset:0!important;
  z-index:99980!important;
  background:rgba(15,23,42,.46)!important;
  backdrop-filter:blur(4px)!important;
}
.mre-row-viewer-drawer{
  position:fixed!important;
  top:0!important;
  right:0!important;
  left:auto!important;
  bottom:0!important;
  transform:none!important;
  width:min(960px,calc(100vw - 28px))!important;
  height:100dvh!important;
  max-height:100dvh!important;
  min-height:0!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
  border-radius:0!important;
  border:0!important;
  border-left:1px solid rgba(148,163,184,.40)!important;
  background:#f8fbff!important;
  box-shadow:-28px 0 90px rgba(15,23,42,.32)!important;
  z-index:99981!important;
}
.mre-row-viewer-head{
  flex:0 0 auto!important;
  position:relative!important;
  top:auto!important;
  z-index:5!important;
  padding:16px 18px 14px!important;
  border-bottom:2px solid rgba(14,165,233,.22)!important;
  background:linear-gradient(135deg,#ffffff,#eff6ff)!important;
  box-shadow:0 8px 22px rgba(15,23,42,.06)!important;
}
.mre-row-viewer-head h3{
  margin:2px 0 4px!important;
  font-size:1.18rem!important;
  line-height:1.2!important;
}
.mre-row-viewer-head p{
  line-height:1.35!important;
}
.mre-row-viewer-body{
  flex:1 1 auto!important;
  min-height:0!important;
  height:auto!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  display:grid!important;
  align-content:start!important;
  gap:14px!important;
  padding:14px 18px 80px!important;
  overscroll-behavior:contain!important;
  scrollbar-gutter:stable both-edges!important;
}
.mre-summary-strip{
  grid-template-columns:repeat(4,minmax(130px,1fr))!important;
  gap:10px!important;
}
.mre-row-grid{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:12px!important;
  align-items:stretch!important;
}
.mre-row-card{
  min-width:0!important;
  overflow:visible!important;
}
.mre-row-card h4{
  position:sticky!important;
  top:0!important;
  z-index:1!important;
}
.mre-row-card-body,
.mre-row-card.wide .mre-row-card-body,
.mre-row-card.wide:last-child .mre-row-card-body{
  max-height:none!important;
  overflow:visible!important;
  min-height:0!important;
}
.mre-hoa-list{
  max-height:none!important;
  overflow:visible!important;
  padding-right:0!important;
}
.mre-compare-grid{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:12px!important;
  align-items:start!important;
}
.mre-compare-col{
  min-width:0!important;
  align-content:start!important;
}
.mre-memo{
  min-width:0!important;
  overflow:visible!important;
}
.mre-memo p{
  max-height:none!important;
  overflow:visible!important;
  white-space:pre-wrap!important;
  line-height:1.5!important;
}
body.mre-row-viewer-open{
  overflow:hidden!important;
}
@media(max-width:1100px){
  .mre-row-viewer-drawer{width:calc(100vw - 18px)!important;}
}
@media(max-width:900px){
  .mre-row-viewer-drawer{width:100vw!important;}
  .mre-row-viewer-body{padding:12px 14px 82px!important;}
  .mre-summary-strip,
  .mre-row-grid,
  .mre-compare-grid{
    grid-template-columns:1fr!important;
  }
  .mre-row-card h4{
    position:relative!important;
  }
}

/* MRE Working Edit Patch — editable draft/final UI; keeps single-scroll drawer behavior */
.mre-row-viewer-actions{
  display:flex!important;
  flex-wrap:wrap!important;
  justify-content:flex-end!important;
  gap:8px!important;
  min-width:160px!important;
}
.mre-row-viewer-actions .btn:disabled{
  opacity:.55!important;
  cursor:not-allowed!important;
}
.mre-edit-status-line{
  margin-top:8px!important;
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
  flex-wrap:wrap!important;
}
.mre-edit-badge{
  display:inline-flex!important;
  align-items:center!important;
  border-radius:999px!important;
  padding:5px 10px!important;
  font-size:.78rem!important;
  font-weight:800!important;
  border:1px solid rgba(148,163,184,.35)!important;
  background:#fff!important;
  color:#334155!important;
}
.mre-edit-badge.is-draft{
  background:#fff7ed!important;
  border-color:#fed7aa!important;
  color:#9a3412!important;
}
.mre-edit-badge.is-final{
  background:#ecfdf5!important;
  border-color:#86efac!important;
  color:#166534!important;
}
.mre-aux-grid{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:10px!important;
}
.mre-aux-card .mre-kv{
  min-height:58px!important;
}
.mre-working-card .mre-row-card-body{
  overflow:visible!important;
}
.mre-edit-note{
  margin:0 0 12px!important;
  padding:10px 12px!important;
  border:1px solid rgba(147,197,253,.55)!important;
  border-radius:12px!important;
  background:#eff6ff!important;
  color:#1e3a8a!important;
  font-size:.9rem!important;
  line-height:1.45!important;
}
.mre-edit-grid{
  align-items:start!important;
}
.mre-edit-field{
  display:block!important;
  margin:0 0 10px!important;
}
.mre-edit-field span{
  display:block!important;
  margin-bottom:5px!important;
  color:#334155!important;
  font-size:.78rem!important;
  font-weight:900!important;
  text-transform:uppercase!important;
  letter-spacing:.03em!important;
}
.mre-edit-field textarea{
  width:100%!important;
  min-height:112px!important;
  resize:vertical!important;
  border:1px solid rgba(148,163,184,.40)!important;
  border-radius:12px!important;
  background:#fff!important;
  color:#0f172a!important;
  padding:10px 11px!important;
  line-height:1.45!important;
  font:inherit!important;
  box-shadow:inset 0 1px 2px rgba(15,23,42,.04)!important;
}
.mre-edit-field textarea:focus{
  outline:none!important;
  border-color:#60a5fa!important;
  box-shadow:0 0 0 3px rgba(96,165,250,.18)!important;
}
@media(max-width:1100px){
  .mre-aux-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
}
@media(max-width:900px){
  .mre-row-viewer-head{display:block!important;}
  .mre-row-viewer-actions{justify-content:flex-start!important;margin-top:10px!important;}
  .mre-aux-grid{grid-template-columns:1fr!important;}
}

/* Smart Spreadsheet Patch V1 — My Tasks editable table
   Baseline-safe: CSS only targets pages/my-tasks.html table area. */
.my-tasks-page #myTasksTablePanel{
  overflow:visible;
}
.my-tasks-page .smart-spreadsheet-wrap{
  position:relative;
  max-height:calc(100vh - 310px);
  min-height:420px;
  overflow:auto;
  border:1px solid rgba(148,163,184,.32);
  border-radius:22px;
  background:#ffffff;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.65), 0 18px 45px rgba(15,23,42,.07);
  overscroll-behavior:contain;
  scrollbar-gutter:stable both-edges;
}
.my-tasks-page .smart-spreadsheet-wrap::-webkit-scrollbar{
  width:12px;
  height:12px;
}
.my-tasks-page .smart-spreadsheet-wrap::-webkit-scrollbar-track{
  background:#f1f5f9;
  border-radius:999px;
}
.my-tasks-page .smart-spreadsheet-wrap::-webkit-scrollbar-thumb{
  background:#94a3b8;
  border-radius:999px;
  border:3px solid #f1f5f9;
}
.my-tasks-page .smart-spreadsheet-table,
.my-tasks-page #myTasksTable.smart-spreadsheet-table{
  width:max-content;
  min-width:100%;
  border-collapse:separate;
  border-spacing:0;
  table-layout:auto;
}
.my-tasks-page #myTasksTable.smart-spreadsheet-table th,
.my-tasks-page #myTasksTable.smart-spreadsheet-table td{
  border-right:1px solid rgba(226,232,240,.86);
  border-bottom:1px solid rgba(226,232,240,.92);
  background-clip:padding-box;
}
.my-tasks-page #myTasksTable.smart-spreadsheet-table thead th{
  position:sticky;
  top:0;
  z-index:18;
  vertical-align:top;
  padding:8px 10px;
  background:linear-gradient(180deg,#f8fafc 0%,#eef4fb 100%);
  box-shadow:0 1px 0 rgba(148,163,184,.35), 0 9px 16px rgba(15,23,42,.05);
}
.my-tasks-page #myTasksTable.smart-spreadsheet-table tbody td{
  background:#fff;
  transition:background .12s ease, box-shadow .12s ease;
}
.my-tasks-page #myTasksTable.smart-spreadsheet-table tbody tr:nth-child(even) td{
  background:#fbfdff;
}
.my-tasks-page #myTasksTable.smart-spreadsheet-table tbody tr:hover td{
  background:#f5f9ff;
}
.my-tasks-page #myTasksTable.smart-spreadsheet-table tbody tr.mt-smart-active-row td{
  background:#eef6ff !important;
  box-shadow:inset 0 1px 0 rgba(59,130,246,.14), inset 0 -1px 0 rgba(59,130,246,.14);
}
.my-tasks-page #myTasksTable.smart-spreadsheet-table tr.mt-smart-filtered-out{
  display:none!important;
}
.my-tasks-page .mt-smart-th{
  display:grid;
  gap:7px;
  min-width:0;
}
.my-tasks-page .mt-smart-th-label{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:6px;
  min-width:0;
  color:#0f172a;
  font-size:11px;
  line-height:1.2;
  font-weight:900;
  letter-spacing:.02em;
  text-transform:uppercase;
}
.my-tasks-page .mt-smart-th-label-text{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.my-tasks-page .mt-smart-col-filter{
  width:100%;
  min-width:92px;
  height:28px;
  border:1px solid rgba(203,213,225,.88);
  border-radius:10px;
  padding:5px 9px;
  background:#ffffff;
  color:#0f172a;
  font-size:12px;
  font-weight:700;
  outline:none;
}
.my-tasks-page .mt-smart-col-filter:focus{
  border-color:#2563eb;
  box-shadow:0 0 0 3px rgba(37,99,235,.14);
}
.my-tasks-page .mt-smart-sort{
  border:0;
  background:#e2e8f0;
  color:#334155;
  border-radius:8px;
  width:24px;
  height:22px;
  line-height:22px;
  font-size:11px;
  font-weight:900;
  cursor:pointer;
}
.my-tasks-page .mt-smart-sort.is-active{
  background:#2563eb;
  color:#fff;
}
.my-tasks-page #myTasksTable.smart-spreadsheet-table .my-task-cell,
.my-tasks-page #myTasksTable.smart-spreadsheet-table .my-task-note{
  border-radius:11px;
  min-height:30px;
  box-sizing:border-box;
}
.my-tasks-page #myTasksTable.smart-spreadsheet-table .my-task-cell.editable:not(:disabled),
.my-tasks-page #myTasksTable.smart-spreadsheet-table .my-task-note:not(:disabled){
  background:#ffffff;
  border-color:rgba(37,99,235,.28);
}
.my-tasks-page #myTasksTable.smart-spreadsheet-table .my-task-cell.editable:not(:disabled):focus,
.my-tasks-page #myTasksTable.smart-spreadsheet-table .my-task-note:not(:disabled):focus{
  border-color:#2563eb;
  box-shadow:0 0 0 3px rgba(37,99,235,.14);
  outline:none;
}
.my-tasks-page.mt-smart-freeze-left #myTasksTable.smart-spreadsheet-table th:nth-child(1),
.my-tasks-page.mt-smart-freeze-left #myTasksTable.smart-spreadsheet-table td:nth-child(1){
  position:sticky;
  left:0;
  z-index:14;
  min-width:120px;
  max-width:120px;
  background:#f8fafc;
  box-shadow:2px 0 0 rgba(226,232,240,.95);
}
.my-tasks-page.mt-smart-freeze-left #myTasksTable.smart-spreadsheet-table th:nth-child(2),
.my-tasks-page.mt-smart-freeze-left #myTasksTable.smart-spreadsheet-table td:nth-child(2){
  position:sticky;
  left:120px;
  z-index:13;
  min-width:260px;
  background:#f8fafc;
  box-shadow:2px 0 0 rgba(226,232,240,.95);
}
.my-tasks-page.mt-smart-freeze-left #myTasksTable.smart-spreadsheet-table thead th:nth-child(1),
.my-tasks-page.mt-smart-freeze-left #myTasksTable.smart-spreadsheet-table thead th:nth-child(2){
  z-index:30;
  background:linear-gradient(180deg,#eaf2ff 0%,#dfeafe 100%);
}
.my-tasks-page.mt-smart-freeze-actions #myTasksTable.smart-spreadsheet-table th:last-child,
.my-tasks-page.mt-smart-freeze-actions #myTasksTable.smart-spreadsheet-table td:last-child{
  position:sticky;
  right:0;
  z-index:12;
  background:#f8fafc;
  box-shadow:-2px 0 0 rgba(226,232,240,.95);
}
.my-tasks-page.mt-smart-freeze-actions #myTasksTable.smart-spreadsheet-table thead th:last-child{
  z-index:29;
}
.my-tasks-page .mt-smart-sheet-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
  margin:0 0 12px;
  padding:12px 14px;
  border:1px solid rgba(148,163,184,.35);
  border-radius:18px;
  background:linear-gradient(135deg,rgba(255,255,255,.98),rgba(248,251,255,.94));
  box-shadow:0 14px 34px rgba(15,23,42,.07);
}
.my-tasks-page .mt-smart-sheet-toolbar-left{
  display:grid;
  gap:3px;
  min-width:240px;
}
.my-tasks-page .mt-smart-sheet-toolbar-left strong{
  color:#0f172a;
  font-weight:900;
}
.my-tasks-page .mt-smart-sheet-toolbar-left span{
  color:#64748b;
  font-size:.85rem;
}
.my-tasks-page .mt-smart-sheet-toolbar-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  flex-wrap:wrap;
}
.my-tasks-page .mt-smart-sheet-toolbar .btn.is-active{
  background:linear-gradient(135deg,#2563eb,#4f46e5)!important;
  color:#fff!important;
  border-color:transparent!important;
}
.my-tasks-page .mt-smart-status-pills{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  margin-top:2px;
}
.my-tasks-page .mt-smart-pill{
  display:inline-flex;
  align-items:center;
  gap:5px;
  border:1px solid rgba(148,163,184,.35);
  border-radius:999px;
  padding:4px 8px;
  background:#fff;
  color:#334155;
  font-size:11px;
  font-weight:900;
}
.my-tasks-page .mt-smart-pill.warn{
  border-color:#fed7aa;
  color:#c2410c;
  background:#fff7ed;
}
.my-tasks-page .mt-smart-pill.ok{
  border-color:#bbf7d0;
  color:#047857;
  background:#ecfdf5;
}
.my-tasks-page .mt-smart-pill.info{
  border-color:#bfdbfe;
  color:#1d4ed8;
  background:#eff6ff;
}
.my-tasks-page #mtSaveAllV4Toolbar{
  top:76px;
  z-index:45;
}
.my-tasks-page .mt-smart-compact #myTasksTable.smart-spreadsheet-table th,
.my-tasks-page .mt-smart-compact #myTasksTable.smart-spreadsheet-table td{
  padding-top:6px!important;
  padding-bottom:6px!important;
}
@media (max-width: 980px){
  .my-tasks-page .smart-spreadsheet-wrap{max-height:62vh;min-height:360px;}
  .my-tasks-page .mt-smart-sheet-toolbar{align-items:stretch;}
  .my-tasks-page .mt-smart-sheet-toolbar-actions{justify-content:flex-start;}
  .my-tasks-page.mt-smart-freeze-left #myTasksTable.smart-spreadsheet-table th:nth-child(2),
  .my-tasks-page.mt-smart-freeze-left #myTasksTable.smart-spreadsheet-table td:nth-child(2){
    position:static;
  }
}
.my-tasks-page .smart-spreadsheet-wrap.mt-smart-compact #myTasksTable.smart-spreadsheet-table th,
.my-tasks-page .smart-spreadsheet-wrap.mt-smart-compact #myTasksTable.smart-spreadsheet-table td{
  padding-top:6px!important;
  padding-bottom:6px!important;
}
.my-tasks-page .smart-spreadsheet-wrap.mt-smart-compact #myTasksTable.smart-spreadsheet-table input{
  min-height:28px!important;
}

/* My Tasks Smart Spreadsheet Patch V2 — true Excel-like grid
   Purpose: remove pill/bubble inputs from task rows and make cells read like spreadsheet cells. */
.my-tasks-page #myTasksSmartTableWrap.smart-spreadsheet-wrap{
  border-radius:8px!important;
  border-color:#cbd5e1!important;
  box-shadow:0 10px 28px rgba(15,23,42,.05)!important;
  background:#fff!important;
}
.my-tasks-page #myTasksTable.smart-spreadsheet-table{
  border-collapse:separate!important;
  border-spacing:0!important;
  font-size:12px!important;
  color:#1e293b!important;
}
.my-tasks-page #myTasksTable.smart-spreadsheet-table th,
.my-tasks-page #myTasksTable.smart-spreadsheet-table td{
  border-right:1px solid #dbe5f1!important;
  border-bottom:1px solid #dbe5f1!important;
  border-radius:0!important;
  box-shadow:none!important;
  white-space:nowrap!important;
}
.my-tasks-page #myTasksTable.smart-spreadsheet-table thead th{
  padding:5px 7px!important;
  background:#f1f5f9!important;
  color:#334155!important;
  box-shadow:inset 0 -1px 0 #cbd5e1!important;
}
.my-tasks-page #myTasksTable.smart-spreadsheet-table tbody td{
  padding:0!important;
  height:32px!important;
  min-height:32px!important;
  background:#fff!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.my-tasks-page #myTasksTable.smart-spreadsheet-table tbody tr:nth-child(even) td{
  background:#fbfdff!important;
}
.my-tasks-page #myTasksTable.smart-spreadsheet-table tbody tr:hover td,
.my-tasks-page #myTasksTable.smart-spreadsheet-table tbody tr.mt-smart-active-row td{
  background:#eef6ff!important;
}
.my-tasks-page #myTasksTable.smart-spreadsheet-table td:first-child{
  padding:4px 8px!important;
  line-height:1.2!important;
}
.my-tasks-page #myTasksTable.smart-spreadsheet-table td:first-child .small{
  display:block!important;
  max-width:112px!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  color:#64748b!important;
  font-size:11px!important;
}
.my-tasks-page #myTasksTable.smart-spreadsheet-table .my-task-cell,
.my-tasks-page #myTasksTable.smart-spreadsheet-table .my-task-note{
  display:block!important;
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
  height:31px!important;
  min-height:31px!important;
  margin:0!important;
  padding:5px 8px!important;
  border:1px solid transparent!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  color:#1e293b!important;
  font:inherit!important;
  font-weight:500!important;
  outline:none!important;
  appearance:none!important;
}
.my-tasks-page #myTasksTable.smart-spreadsheet-table .my-task-cell.editable:not(:disabled),
.my-tasks-page #myTasksTable.smart-spreadsheet-table .my-task-note:not(:disabled),
.my-tasks-page #myTasksTable.smart-spreadsheet-table .my-task-cell.readonly,
.my-tasks-page #myTasksTable.smart-spreadsheet-table .my-task-cell:disabled,
.my-tasks-page #myTasksTable.smart-spreadsheet-table .my-task-note:disabled{
  background:transparent!important;
  border-color:transparent!important;
  box-shadow:none!important;
  opacity:1!important;
  -webkit-text-fill-color:#1e293b!important;
}
.my-tasks-page #myTasksTable.smart-spreadsheet-table .my-task-cell.editable:not(:disabled):focus,
.my-tasks-page #myTasksTable.smart-spreadsheet-table .my-task-note:not(:disabled):focus{
  background:#fff!important;
  border-color:#2563eb!important;
  box-shadow:inset 0 0 0 1px #2563eb!important;
}
.my-tasks-page #myTasksTable.smart-spreadsheet-table .mt-cell-dirty,
.my-tasks-page #myTasksTable.smart-spreadsheet-table input[data-mt-dirty-v4="1"]{
  background:#fff7ed!important;
  border-color:#f97316!important;
  box-shadow:inset 0 0 0 1px #f97316!important;
}
.my-tasks-page #myTasksTable.smart-spreadsheet-table .row-action-group{
  padding:3px 6px!important;
}
.my-tasks-page #myTasksTable.smart-spreadsheet-table .row-action-group .btn{
  border-radius:4px!important;
  min-height:24px!important;
  padding:4px 7px!important;
  font-size:11px!important;
}
.my-tasks-page .mt-smart-col-filter{
  height:24px!important;
  min-height:24px!important;
  border-radius:3px!important;
  padding:3px 6px!important;
  font-size:11px!important;
  box-shadow:none!important;
}
.my-tasks-page .mt-smart-sort{
  border-radius:3px!important;
  width:20px!important;
  height:20px!important;
  line-height:20px!important;
}
.my-tasks-page.mt-smart-freeze-left #myTasksTable.smart-spreadsheet-table th:nth-child(1),
.my-tasks-page.mt-smart-freeze-left #myTasksTable.smart-spreadsheet-table td:nth-child(1),
.my-tasks-page.mt-smart-freeze-left #myTasksTable.smart-spreadsheet-table th:nth-child(2),
.my-tasks-page.mt-smart-freeze-left #myTasksTable.smart-spreadsheet-table td:nth-child(2),
.my-tasks-page.mt-smart-freeze-actions #myTasksTable.smart-spreadsheet-table th:last-child,
.my-tasks-page.mt-smart-freeze-actions #myTasksTable.smart-spreadsheet-table td:last-child{
  background:#f8fafc!important;
  box-shadow:2px 0 0 #dbe5f1!important;
}
.my-tasks-page.mt-smart-freeze-left #myTasksTable.smart-spreadsheet-table thead th:nth-child(1),
.my-tasks-page.mt-smart-freeze-left #myTasksTable.smart-spreadsheet-table thead th:nth-child(2),
.my-tasks-page.mt-smart-freeze-actions #myTasksTable.smart-spreadsheet-table thead th:last-child{
  background:#eaf2ff!important;
}

/* My Tasks Smart Spreadsheet Patch V3 — Excel-style range copy */
.my-tasks-page #myTasksTable.mt-xls-copy-enabled{
  user-select:none;
}
.my-tasks-page #myTasksTable.mt-xls-copy-enabled tbody td{
  cursor:cell;
}
.my-tasks-page #myTasksTable.mt-xls-copy-enabled tbody td:last-child,
.my-tasks-page #myTasksTable.mt-xls-copy-enabled tbody td:last-child *{
  cursor:default;
}
.my-tasks-page #myTasksTable.smart-spreadsheet-table td.mt-xls-selected{
  background:#dbeafe!important;
  box-shadow:inset 0 0 0 1px #60a5fa!important;
}
.my-tasks-page #myTasksTable.smart-spreadsheet-table td.mt-xls-anchor{
  background:#bfdbfe!important;
  box-shadow:inset 0 0 0 2px #2563eb!important;
}
.my-tasks-page #myTasksTable.smart-spreadsheet-table td.mt-xls-selected .my-task-cell,
.my-tasks-page #myTasksTable.smart-spreadsheet-table td.mt-xls-selected .my-task-note{
  background:transparent!important;
}
.my-tasks-page #myTasksTable.smart-spreadsheet-table td.mt-xls-selected input::selection,
.my-tasks-page #myTasksTable.smart-spreadsheet-table td.mt-xls-selected textarea::selection{
  background:rgba(37,99,235,.28)!important;
}
.my-tasks-page .mt-smart-selection-meta{
  display:inline-flex!important;
  align-items:center!important;
  width:max-content!important;
  max-width:100%!important;
  margin-top:4px!important;
  padding:4px 8px!important;
  border:1px solid #bfdbfe!important;
  border-radius:999px!important;
  background:#eff6ff!important;
  color:#1d4ed8!important;
  font-size:11px!important;
  font-weight:900!important;
}
.my-tasks-page .mt-smart-copy-meta{
  display:block!important;
  margin-top:2px!important;
  color:#64748b!important;
  font-size:11px!important;
  font-weight:800!important;
}
.my-tasks-page .mt-smart-copy-meta.is-ok{
  color:#047857!important;
}
.my-tasks-page .mt-smart-copy-meta.is-warn{
  color:#dc2626!important;
}
.my-tasks-page #mtCopySelectionBtn,
.my-tasks-page #mtCopyHeadersBtn{
  background:#0f766e!important;
  border-color:#0f766e!important;
  color:#fff!important;
}
.my-tasks-page #mtCopySelectionBtn:disabled,
.my-tasks-page #mtCopyHeadersBtn:disabled,
.my-tasks-page #mtClearSelectionBtn:disabled{
  opacity:.45!important;
  cursor:not-allowed!important;
}
.my-tasks-page #myTasksTable.smart-spreadsheet-table input[data-mt-xls-editing="1"],
.my-tasks-page #myTasksTable.smart-spreadsheet-table textarea[data-mt-xls-editing="1"],
.my-tasks-page #myTasksTable.smart-spreadsheet-table select[data-mt-xls-editing="1"]{
  background:#fff!important;
  border-color:#2563eb!important;
  box-shadow:inset 0 0 0 1px #2563eb!important;
  user-select:text!important;
}

/* My Tasks Smart Spreadsheet Patch V4 — flexible scroll + fullscreen focus mode */
.my-tasks-page .mt-smart-top-scroller{
  height:15px!important;
  min-height:15px!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  border:1px solid #dbe5f1!important;
  border-bottom:0!important;
  border-radius:10px 10px 0 0!important;
  background:#f8fafc!important;
  scrollbar-color:#94a3b8 #edf2f7!important;
  scrollbar-width:thin!important;
}
.my-tasks-page .mt-smart-top-scroller::-webkit-scrollbar{
  height:12px!important;
}
.my-tasks-page .mt-smart-top-scroller::-webkit-scrollbar-track{
  background:#edf2f7!important;
  border-radius:999px!important;
}
.my-tasks-page .mt-smart-top-scroller::-webkit-scrollbar-thumb{
  background:#94a3b8!important;
  border-radius:999px!important;
  border:2px solid #edf2f7!important;
}
.my-tasks-page .mt-smart-top-scroller-inner{
  height:1px!important;
  min-width:100%!important;
}
.my-tasks-page #myTasksSmartTableWrap.smart-spreadsheet-wrap{
  border-top-left-radius:0!important;
  border-top-right-radius:0!important;
  scroll-behavior:auto!important;
  outline:none!important;
}
.my-tasks-page .mt-smart-sheet-status-bar{
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
  flex-wrap:wrap!important;
  padding:8px 10px!important;
  border:1px solid #dbe5f1!important;
  border-top:0!important;
  border-radius:0 0 10px 10px!important;
  background:#f8fafc!important;
  color:#475569!important;
  font-size:11px!important;
  font-weight:800!important;
}
.my-tasks-page .mt-smart-sheet-status-bar span:not(.mt-smart-status-help){
  display:inline-flex!important;
  align-items:center!important;
  min-height:22px!important;
  padding:3px 8px!important;
  border:1px solid #cbd5e1!important;
  border-radius:999px!important;
  background:#fff!important;
  color:#334155!important;
}
.my-tasks-page .mt-smart-status-help{
  margin-left:auto!important;
  color:#64748b!important;
  font-weight:700!important;
}
.my-tasks-page #mtSmartFullscreenBtn{
  background:#1d4ed8!important;
  border-color:#1d4ed8!important;
  color:#fff!important;
}
.my-tasks-page #mtSmartFullscreenBtn.is-active{
  background:#0f172a!important;
  border-color:#0f172a!important;
}
.my-tasks-page #mtSmartScrollRightBtn{
  white-space:nowrap!important;
}
.my-tasks-page.mt-smart-table-fullscreen{
  overflow:hidden!important;
}
.my-tasks-page.mt-smart-table-fullscreen .sidebar,
.my-tasks-page.mt-smart-table-fullscreen .topbar,
.my-tasks-page.mt-smart-table-fullscreen #myJobTasksTable,
.my-tasks-page.mt-smart-table-fullscreen #myTaskFilterTabs,
.my-tasks-page.mt-smart-table-fullscreen .my-task-summary,
.my-tasks-page.mt-smart-table-fullscreen #taskWorkHistoryPanel,
.my-tasks-page.mt-smart-table-fullscreen #myTasksMapPanel,
.my-tasks-page.mt-smart-table-fullscreen #mreRowViewerDrawer,
.my-tasks-page.mt-smart-table-fullscreen #mreRowViewerOverlay{
  display:none!important;
}
.my-tasks-page.mt-smart-table-fullscreen .app-layout,
.my-tasks-page.mt-smart-table-fullscreen .content,
.my-tasks-page.mt-smart-table-fullscreen .main,
.my-tasks-page.mt-smart-table-fullscreen .card,
.my-tasks-page.mt-smart-table-fullscreen .sub-card{
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  padding:0!important;
  overflow:visible!important;
}
.my-tasks-page.mt-smart-table-fullscreen .card > *:not(#myTaskDetailPanel),
.my-tasks-page.mt-smart-table-fullscreen #myTaskDetailPanel > *:not(#myTasksTablePanel),
.my-tasks-page.mt-smart-table-fullscreen #myTaskDetailPanel > aside,
.my-tasks-page.mt-smart-table-fullscreen #myTaskDetailPanel > .task-work-main,
.my-tasks-page.mt-smart-table-fullscreen #myTasksStatus,
.my-tasks-page.mt-smart-table-fullscreen #qcFindingPanel{
  display:none!important;
}
.my-tasks-page.mt-smart-table-fullscreen #myTaskDetailPanel{
  display:block!important;
  padding:0!important;
  margin:0!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
.my-tasks-page.mt-smart-table-fullscreen #myTasksTablePanel.mt-smart-table-panel-fullscreen{
  position:fixed!important;
  inset:10px!important;
  z-index:99999!important;
  display:flex!important;
  flex-direction:column!important;
  gap:8px!important;
  padding:12px!important;
  border:1px solid #cbd5e1!important;
  border-radius:16px!important;
  background:#fff!important;
  box-shadow:0 24px 80px rgba(15,23,42,.28)!important;
  overflow:hidden!important;
}
.my-tasks-page.mt-smart-table-fullscreen #myTasksTablePanel.mt-smart-table-panel-fullscreen > div:first-child{
  flex:0 0 auto!important;
  position:relative!important;
  z-index:5!important;
  margin:0!important;
  padding:2px 4px 6px!important;
  background:#fff!important;
}
.my-tasks-page.mt-smart-table-fullscreen #myTasksTablePanel.mt-smart-table-panel-fullscreen > div:first-child h3::after{
  content:' — Fullscreen Focus Mode';
  color:#1d4ed8;
  font-size:12px;
  font-weight:900;
}
.my-tasks-page.mt-smart-table-fullscreen #myTasksTablePanel.mt-smart-table-panel-fullscreen #myTaskSearch{
  min-width:360px!important;
}
.my-tasks-page.mt-smart-table-fullscreen #mtSmartSheetToolbar{
  flex:0 0 auto!important;
  position:relative!important;
  z-index:6!important;
  margin:0!important;
  box-shadow:0 10px 24px rgba(15,23,42,.06)!important;
}
.my-tasks-page.mt-smart-table-fullscreen .mt-smart-top-scroller{
  flex:0 0 auto!important;
}
.my-tasks-page.mt-smart-table-fullscreen #myTasksSmartTableWrap.smart-spreadsheet-wrap{
  flex:1 1 auto!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  overflow:auto!important;
  overscroll-behavior:contain!important;
  box-shadow:none!important;
}
.my-tasks-page.mt-smart-table-fullscreen #myTasksTable.smart-spreadsheet-table thead th{
  top:0!important;
  z-index:12!important;
}
.my-tasks-page.mt-smart-table-fullscreen .mt-smart-sheet-status-bar{
  flex:0 0 auto!important;
  position:relative!important;
  z-index:6!important;
}
.my-tasks-page.mt-smart-table-fullscreen .mt-smart-status-help{
  color:#1d4ed8!important;
}
@media (max-width:900px){
  .my-tasks-page .mt-smart-status-help{
    width:100%!important;
    margin-left:0!important;
  }
  .my-tasks-page.mt-smart-table-fullscreen #myTasksTablePanel.mt-smart-table-panel-fullscreen{
    inset:4px!important;
    padding:8px!important;
    border-radius:12px!important;
  }
  .my-tasks-page.mt-smart-table-fullscreen #myTasksTablePanel.mt-smart-table-panel-fullscreen #myTaskSearch{
    min-width:0!important;
    width:100%!important;
  }
}

/* MT_XLS4B_VISIBLE_FULLSCREEN_BUTTON_START */
.mt-smart-visible-action{white-space:nowrap;}
.mt-smart-fullscreen-action{box-shadow:0 8px 18px rgba(37,99,235,.18);}
.mt-saveall-v4-actions #mtSmartFullscreenBtn{background:#2563eb;color:#fff;border-color:#2563eb;}
.mt-saveall-v4-actions #mtSmartFullscreenBtn:hover{filter:brightness(.96);}
body.mt-smart-table-fullscreen #mtSmartFullscreenBtn{background:#ef4444;border-color:#ef4444;color:#fff;}
body.mt-smart-table-fullscreen #myTasksTablePanel{z-index:9999;}
/* MT_XLS4B_VISIBLE_FULLSCREEN_BUTTON_END */

/* MT_XLS4C_FORCE_TABLE_ACTION_FULLSCREEN_START */
#mtSaveAllV4Toolbar .mt-saveall-v4-actions #mtSmartScrollRightBtn,
#mtSaveAllV4Toolbar .mt-saveall-v4-actions #mtSmartFullscreenBtn{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:36px!important;
  white-space:nowrap!important;
}
#mtSaveAllV4Toolbar .mt-saveall-v4-actions #mtSmartFullscreenBtn{
  background:#2563eb!important;
  border-color:#2563eb!important;
  color:#fff!important;
}
#mtSaveAllV4Toolbar .mt-saveall-v4-actions #mtSmartFullscreenBtn.is-active{
  background:#ef4444!important;
  border-color:#ef4444!important;
  color:#fff!important;
}
/* MT_XLS4C_FORCE_TABLE_ACTION_FULLSCREEN_END */

/* MT_XLS5_EDGE_AUTOSCROLL_SELECTION_START */
.my-tasks-page #myTasksSmartTableWrap.smart-spreadsheet-wrap{
  scrollbar-width:auto!important;
  scrollbar-color:#64748b #e5edf7!important;
}
.my-tasks-page #myTasksSmartTableWrap.smart-spreadsheet-wrap::-webkit-scrollbar{
  width:16px!important;
  height:16px!important;
}
.my-tasks-page #myTasksSmartTableWrap.smart-spreadsheet-wrap::-webkit-scrollbar-track{
  background:#e5edf7!important;
  border-radius:999px!important;
}
.my-tasks-page #myTasksSmartTableWrap.smart-spreadsheet-wrap::-webkit-scrollbar-thumb{
  background:#64748b!important;
  border-radius:999px!important;
  border:3px solid #e5edf7!important;
}
.my-tasks-page #myTasksSmartTableWrap.smart-spreadsheet-wrap::-webkit-scrollbar-thumb:hover{
  background:#334155!important;
}
.my-tasks-page.mt-xls-auto-scrolling #myTasksTable.smart-spreadsheet-table td.mt-xls-selected{
  background:#c7ddff!important;
  box-shadow:inset 0 0 0 1px #2563eb!important;
}
.my-tasks-page #myTasksTable.mt-xls-copy-enabled tbody td:not(:last-child){
  touch-action:none;
}
.my-tasks-page.mt-smart-table-fullscreen #myTasksSmartTableWrap.smart-spreadsheet-wrap::-webkit-scrollbar{
  width:18px!important;
  height:18px!important;
}
/* MT_XLS5_EDGE_AUTOSCROLL_SELECTION_END */

/* My Tasks Smart Spreadsheet Patch V6 — text drag range selection */
.my-tasks-page #myTasksTable.mt-xls6-text-drag-enabled,
.my-tasks-page #myTasksTable.mt-xls6-text-drag-enabled tbody,
.my-tasks-page #myTasksTable.mt-xls6-text-drag-enabled tbody tr,
.my-tasks-page #myTasksTable.mt-xls6-text-drag-enabled tbody td,
.my-tasks-page #myTasksTable.mt-xls6-text-drag-enabled tbody td *{
  -webkit-user-select:none!important;
  user-select:none!important;
}
.my-tasks-page #myTasksTable.mt-xls6-text-drag-enabled tbody td:not(:last-child){
  cursor:cell!important;
}
body.mt-xls-range-selecting,
body.mt-xls-range-selecting *{
  -webkit-user-select:none!important;
  user-select:none!important;
  cursor:cell!important;
}
body.mt-xls-range-selecting #myTasksTable.smart-spreadsheet-table td.mt-xls-selected{
  background:#dbeafe!important;
  box-shadow:inset 0 0 0 1px #2563eb!important;
}
body.mt-xls-range-selecting #myTasksTable.smart-spreadsheet-table td.mt-xls-anchor{
  background:#bfdbfe!important;
  box-shadow:inset 0 0 0 2px #1d4ed8!important;
}
body.mt-xls-range-selecting ::selection{
  background:transparent!important;
}
.my-tasks-page #myTasksTable.mt-xls6-text-drag-enabled input[data-mt-xls-editing="1"],
.my-tasks-page #myTasksTable.mt-xls6-text-drag-enabled textarea[data-mt-xls-editing="1"],
.my-tasks-page #myTasksTable.mt-xls6-text-drag-enabled select[data-mt-xls-editing="1"]{
  -webkit-user-select:text!important;
  user-select:text!important;
  cursor:text!important;
}
/* MT_XLS6_TEXT_DRAG_RANGE_SELECTION_END */

/* MT_XLS7_FULLSCREEN_HORIZONTAL_SCROLLBAR_START */
#mtSmartTopScroller.mt-xls7-pinned-scrollbar,
#mtSmartBottomScroller.mt-xls7-pinned-scrollbar{
  display:block!important;
  width:100%!important;
  height:22px!important;
  min-height:22px!important;
  max-height:22px!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  background:#f8fafc!important;
  border:1px solid #cbd5e1!important;
  scrollbar-width:auto!important;
  scrollbar-color:#475569 #e2e8f0!important;
  flex:0 0 22px!important;
}
#mtSmartTopScroller.mt-xls7-pinned-scrollbar{
  border-bottom:0!important;
  border-radius:10px 10px 0 0!important;
  margin-top:6px!important;
}
#mtSmartBottomScroller.mt-xls7-pinned-scrollbar{
  border-top:0!important;
  border-radius:0 0 10px 10px!important;
  margin-bottom:0!important;
  position:relative!important;
  z-index:80!important;
}
#mtSmartTopScroller.mt-xls7-pinned-scrollbar::-webkit-scrollbar,
#mtSmartBottomScroller.mt-xls7-pinned-scrollbar::-webkit-scrollbar{
  height:18px!important;
}
#mtSmartTopScroller.mt-xls7-pinned-scrollbar::-webkit-scrollbar-track,
#mtSmartBottomScroller.mt-xls7-pinned-scrollbar::-webkit-scrollbar-track{
  background:#e2e8f0!important;
  border-radius:999px!important;
}
#mtSmartTopScroller.mt-xls7-pinned-scrollbar::-webkit-scrollbar-thumb,
#mtSmartBottomScroller.mt-xls7-pinned-scrollbar::-webkit-scrollbar-thumb{
  background:#475569!important;
  border-radius:999px!important;
  border:3px solid #e2e8f0!important;
}
#mtSmartTopScroller.mt-xls7-pinned-scrollbar::-webkit-scrollbar-thumb:hover,
#mtSmartBottomScroller.mt-xls7-pinned-scrollbar::-webkit-scrollbar-thumb:hover{
  background:#1f2937!important;
}
.mt-xls7-scroll-inner{
  height:1px!important;
  min-width:100%!important;
  pointer-events:none!important;
}
#mtXls7ScrollStatus{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:10px!important;
  padding:5px 8px!important;
  font-size:11px!important;
  font-weight:800!important;
  color:#475569!important;
  background:#f8fafc!important;
  border-left:1px solid #cbd5e1!important;
  border-right:1px solid #cbd5e1!important;
  flex:0 0 auto!important;
}
#mtXls7ScrollStatus span:first-child{
  color:#1d4ed8!important;
}
#mtSmartJumpLeftBtn,
#mtSmartJumpRightBtn{
  min-width:36px!important;
  padding-left:10px!important;
  padding-right:10px!important;
  font-size:14px!important;
  line-height:1!important;
}
#mtSmartJumpLeftBtn:disabled,
#mtSmartJumpRightBtn:disabled{
  opacity:.45!important;
  cursor:not-allowed!important;
}
body.mt-smart-table-fullscreen,
.my-tasks-page.mt-smart-table-fullscreen{
  overflow:hidden!important;
}
body.mt-smart-table-fullscreen #myTasksTablePanel,
body.mt-smart-table-fullscreen #myTasksTablePanel.mt-smart-table-panel-fullscreen,
.my-tasks-page.mt-smart-table-fullscreen #myTasksTablePanel,
.my-tasks-page.mt-smart-table-fullscreen #myTasksTablePanel.mt-smart-table-panel-fullscreen{
  position:fixed!important;
  inset:8px!important;
  z-index:99999!important;
  display:flex!important;
  flex-direction:column!important;
  min-width:0!important;
  min-height:0!important;
  overflow:hidden!important;
  background:#fff!important;
}
body.mt-smart-table-fullscreen #myTasksSmartTableWrap.smart-spreadsheet-wrap,
.my-tasks-page.mt-smart-table-fullscreen #myTasksSmartTableWrap.smart-spreadsheet-wrap{
  flex:1 1 auto!important;
  min-height:0!important;
  height:auto!important;
  max-height:none!important;
  overflow:auto!important;
  scrollbar-width:auto!important;
  scrollbar-color:#475569 #e2e8f0!important;
  border-bottom-left-radius:0!important;
  border-bottom-right-radius:0!important;
}
body.mt-smart-table-fullscreen #myTasksSmartTableWrap.smart-spreadsheet-wrap::-webkit-scrollbar,
.my-tasks-page.mt-smart-table-fullscreen #myTasksSmartTableWrap.smart-spreadsheet-wrap::-webkit-scrollbar{
  width:18px!important;
  height:18px!important;
}
body.mt-smart-table-fullscreen #mtSmartTopScroller.mt-xls7-pinned-scrollbar,
body.mt-smart-table-fullscreen #mtSmartBottomScroller.mt-xls7-pinned-scrollbar,
.my-tasks-page.mt-smart-table-fullscreen #mtSmartTopScroller.mt-xls7-pinned-scrollbar,
.my-tasks-page.mt-smart-table-fullscreen #mtSmartBottomScroller.mt-xls7-pinned-scrollbar{
  display:block!important;
  visibility:visible!important;
  opacity:1!important;
  height:24px!important;
  min-height:24px!important;
  max-height:24px!important;
  flex:0 0 24px!important;
}
body.mt-smart-table-fullscreen #mtSmartBottomScroller.mt-xls7-pinned-scrollbar,
.my-tasks-page.mt-smart-table-fullscreen #mtSmartBottomScroller.mt-xls7-pinned-scrollbar{
  position:sticky!important;
  bottom:0!important;
  z-index:100!important;
  box-shadow:0 -6px 16px rgba(15,23,42,.10)!important;
}
body.mt-smart-table-fullscreen #myTasksTable.smart-spreadsheet-table,
.my-tasks-page.mt-smart-table-fullscreen #myTasksTable.smart-spreadsheet-table{
  width:max-content!important;
  min-width:100%!important;
}
body.mt-smart-table-fullscreen #myTasksTable.smart-spreadsheet-table th,
body.mt-smart-table-fullscreen #myTasksTable.smart-spreadsheet-table td,
.my-tasks-page.mt-smart-table-fullscreen #myTasksTable.smart-spreadsheet-table th,
.my-tasks-page.mt-smart-table-fullscreen #myTasksTable.smart-spreadsheet-table td{
  min-width:92px!important;
}
body.mt-smart-table-fullscreen #myTasksTable.smart-spreadsheet-table th:nth-child(1),
body.mt-smart-table-fullscreen #myTasksTable.smart-spreadsheet-table td:nth-child(1),
.my-tasks-page.mt-smart-table-fullscreen #myTasksTable.smart-spreadsheet-table th:nth-child(1),
.my-tasks-page.mt-smart-table-fullscreen #myTasksTable.smart-spreadsheet-table td:nth-child(1){
  min-width:92px!important;
}
body.mt-smart-table-fullscreen #myTasksTable.smart-spreadsheet-table th:nth-child(2),
body.mt-smart-table-fullscreen #myTasksTable.smart-spreadsheet-table td:nth-child(2),
.my-tasks-page.mt-smart-table-fullscreen #myTasksTable.smart-spreadsheet-table th:nth-child(2),
.my-tasks-page.mt-smart-table-fullscreen #myTasksTable.smart-spreadsheet-table td:nth-child(2){
  min-width:150px!important;
}
@media (max-width:900px){
  #mtXls7ScrollStatus{
    align-items:flex-start!important;
    flex-direction:column!important;
  }
  body.mt-smart-table-fullscreen #myTasksTablePanel,
  body.mt-smart-table-fullscreen #myTasksTablePanel.mt-smart-table-panel-fullscreen,
  .my-tasks-page.mt-smart-table-fullscreen #myTasksTablePanel,
  .my-tasks-page.mt-smart-table-fullscreen #myTasksTablePanel.mt-smart-table-panel-fullscreen{
    inset:4px!important;
  }
}
/* MT_XLS7_FULLSCREEN_HORIZONTAL_SCROLLBAR_END */

/* MT_XLS8_LOCKED_FULLSCREEN_SCROLL_WORKSPACE_START */
html.mt-smart-table-fullscreen,
html.mt-smart-table-fullscreen body,
body.mt-smart-table-fullscreen{
  height:100%!important;
  overflow:hidden!important;
  overscroll-behavior:none!important;
}
body.mt-smart-table-fullscreen #myTasksTablePanel,
body.mt-smart-table-fullscreen #myTasksTablePanel.mt-smart-table-panel-fullscreen,
body.mt-smart-table-fullscreen #myTasksTablePanel.mt-xls8-fullscreen-panel{
  position:fixed!important;
  inset:6px!important;
  width:auto!important;
  height:calc(100dvh - 12px)!important;
  max-height:calc(100dvh - 12px)!important;
  min-height:0!important;
  display:flex!important;
  flex-direction:column!important;
  gap:6px!important;
  padding:10px!important;
  margin:0!important;
  overflow:hidden!important;
  background:#fff!important;
  border:1px solid #cbd5e1!important;
  border-radius:12px!important;
  box-shadow:0 20px 70px rgba(15,23,42,.22)!important;
  z-index:999999!important;
  --mt-xls8-v-top:160px;
  --mt-xls8-v-height:420px;
}
body.mt-smart-table-fullscreen #myTasksTablePanel > *{
  flex:0 0 auto!important;
}
body.mt-smart-table-fullscreen #myTasksTablePanel #myTaskSearch{
  flex:0 0 auto!important;
  height:36px!important;
  min-height:36px!important;
  margin:0!important;
}
body.mt-smart-table-fullscreen #mtSaveAllV4Toolbar,
body.mt-smart-table-fullscreen #myTasksTablePanel .mt-saveall-v4-toolbar,
body.mt-smart-table-fullscreen #myTasksTablePanel .mt-saveall-v4-actions{
  flex:0 0 auto!important;
  position:relative!important;
  top:auto!important;
  z-index:260!important;
}
body.mt-smart-table-fullscreen #myTasksTablePanel > div:first-child{
  flex:0 0 auto!important;
  max-height:58px!important;
  overflow:hidden!important;
}
body.mt-smart-table-fullscreen #myTasksSmartTableWrap.smart-spreadsheet-wrap,
body.mt-smart-table-fullscreen #myTasksSmartTableWrap.mt-xls8-scroll-owner{
  flex:1 1 auto!important;
  min-height:0!important;
  height:auto!important;
  max-height:none!important;
  overflow:auto!important;
  overflow-x:auto!important;
  overflow-y:auto!important;
  scrollbar-gutter:stable both-edges!important;
  overscroll-behavior:contain!important;
  border-radius:0!important;
  border:1px solid #cbd5e1!important;
  box-shadow:none!important;
  background:#fff!important;
  z-index:20!important;
}
body.mt-smart-table-fullscreen #myTasksSmartTableWrap.smart-spreadsheet-wrap::-webkit-scrollbar,
body.mt-smart-table-fullscreen #myTasksSmartTableWrap.mt-xls8-scroll-owner::-webkit-scrollbar{
  width:18px!important;
  height:18px!important;
}
body.mt-smart-table-fullscreen #myTasksSmartTableWrap.smart-spreadsheet-wrap::-webkit-scrollbar-track,
body.mt-smart-table-fullscreen #myTasksSmartTableWrap.mt-xls8-scroll-owner::-webkit-scrollbar-track{
  background:#e2e8f0!important;
  border-radius:999px!important;
}
body.mt-smart-table-fullscreen #myTasksSmartTableWrap.smart-spreadsheet-wrap::-webkit-scrollbar-thumb,
body.mt-smart-table-fullscreen #myTasksSmartTableWrap.mt-xls8-scroll-owner::-webkit-scrollbar-thumb{
  background:#334155!important;
  border:3px solid #e2e8f0!important;
  border-radius:999px!important;
}
body.mt-smart-table-fullscreen #myTasksTable.smart-spreadsheet-table{
  table-layout:fixed!important;
  width:max-content!important;
  min-width:max-content!important;
  border-collapse:separate!important;
  border-spacing:0!important;
}
body.mt-smart-table-fullscreen #myTasksTable.smart-spreadsheet-table thead th{
  position:sticky!important;
  top:0!important;
  z-index:220!important;
  background:#eaf2ff!important;
  box-shadow:inset 0 -1px 0 #94a3b8, 0 2px 8px rgba(15,23,42,.08)!important;
}
body.mt-smart-table-fullscreen.mt-smart-freeze-left #myTasksTable.smart-spreadsheet-table th:nth-child(1),
body.mt-smart-table-fullscreen.mt-smart-freeze-left #myTasksTable.smart-spreadsheet-table td:nth-child(1){
  position:sticky!important;
  left:0!important;
  z-index:210!important;
  background:#f8fafc!important;
}
body.mt-smart-table-fullscreen.mt-smart-freeze-left #myTasksTable.smart-spreadsheet-table th:nth-child(2),
body.mt-smart-table-fullscreen.mt-smart-freeze-left #myTasksTable.smart-spreadsheet-table td:nth-child(2){
  position:sticky!important;
  left:100px!important;
  z-index:209!important;
  background:#f8fafc!important;
}
body.mt-smart-table-fullscreen.mt-smart-freeze-left #myTasksTable.smart-spreadsheet-table thead th:nth-child(1),
body.mt-smart-table-fullscreen.mt-smart-freeze-left #myTasksTable.smart-spreadsheet-table thead th:nth-child(2){
  z-index:240!important;
  background:#dbeafe!important;
}
#mtSmartTopScroller.mt-xls8-h-scrollbar,
#mtSmartBottomScroller.mt-xls8-h-scrollbar{
  display:block!important;
  visibility:visible!important;
  opacity:1!important;
  width:100%!important;
  height:26px!important;
  min-height:26px!important;
  max-height:26px!important;
  flex:0 0 26px!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  background:#f8fafc!important;
  border:1px solid #94a3b8!important;
  scrollbar-width:auto!important;
  scrollbar-color:#1f2937 #dbe4ef!important;
  z-index:250!important;
}
#mtSmartTopScroller.mt-xls8-h-scrollbar{
  border-bottom:0!important;
  border-radius:8px 8px 0 0!important;
  margin:0!important;
}
#mtSmartBottomScroller.mt-xls8-h-scrollbar{
  border-top:0!important;
  border-radius:0 0 8px 8px!important;
  margin:0!important;
  box-shadow:0 -5px 16px rgba(15,23,42,.08)!important;
}
#mtSmartTopScroller.mt-xls8-h-scrollbar::-webkit-scrollbar,
#mtSmartBottomScroller.mt-xls8-h-scrollbar::-webkit-scrollbar{
  height:20px!important;
}
#mtSmartTopScroller.mt-xls8-h-scrollbar::-webkit-scrollbar-track,
#mtSmartBottomScroller.mt-xls8-h-scrollbar::-webkit-scrollbar-track{
  background:#dbe4ef!important;
  border-radius:999px!important;
}
#mtSmartTopScroller.mt-xls8-h-scrollbar::-webkit-scrollbar-thumb,
#mtSmartBottomScroller.mt-xls8-h-scrollbar::-webkit-scrollbar-thumb{
  background:#1f2937!important;
  border:3px solid #dbe4ef!important;
  border-radius:999px!important;
}
.mt-xls8-scroll-inner{
  height:1px!important;
  min-width:100%!important;
  pointer-events:none!important;
}
.mt-xls8-scroll-inner.is-vertical{
  width:1px!important;
  min-height:100%!important;
}
#mtSmartVerticalScroller.mt-xls8-v-scrollbar{
  display:block!important;
  visibility:visible!important;
  opacity:1!important;
  position:absolute!important;
  top:var(--mt-xls8-v-top)!important;
  right:10px!important;
  width:26px!important;
  height:var(--mt-xls8-v-height)!important;
  min-height:120px!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  background:#f8fafc!important;
  border:1px solid #94a3b8!important;
  border-radius:999px!important;
  scrollbar-width:auto!important;
  scrollbar-color:#1f2937 #dbe4ef!important;
  z-index:300!important;
  box-shadow:-5px 0 16px rgba(15,23,42,.08)!important;
}
#mtSmartVerticalScroller.mt-xls8-v-scrollbar::-webkit-scrollbar{
  width:20px!important;
}
#mtSmartVerticalScroller.mt-xls8-v-scrollbar::-webkit-scrollbar-track{
  background:#dbe4ef!important;
  border-radius:999px!important;
}
#mtSmartVerticalScroller.mt-xls8-v-scrollbar::-webkit-scrollbar-thumb{
  background:#1f2937!important;
  border:3px solid #dbe4ef!important;
  border-radius:999px!important;
}
#mtXls8ScrollStatus{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:10px!important;
  min-height:24px!important;
  flex:0 0 auto!important;
  padding:4px 8px!important;
  border:1px solid #cbd5e1!important;
  border-top:0!important;
  border-radius:0 0 8px 8px!important;
  background:#f8fafc!important;
  color:#475569!important;
  font-size:11px!important;
  font-weight:800!important;
  z-index:240!important;
}
#mtXls8ScrollStatusText{
  color:#1d4ed8!important;
}
#mtSmartJumpLeftBtn,
#mtSmartJumpRightBtn,
.mt-xls8-quick-scroll{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:34px!important;
  white-space:nowrap!important;
}
body.mt-xls8-edge-scrolling #myTasksTable.smart-spreadsheet-table td.mt-xls-selected,
body.mt-xls-range-selecting #myTasksTable.smart-spreadsheet-table td.mt-xls-selected{
  background:#dbeafe!important;
  box-shadow:inset 0 0 0 1px #2563eb!important;
}
body.mt-smart-table-fullscreen #myTasksTable.mt-xls6-text-drag-enabled,
body.mt-smart-table-fullscreen #myTasksTable.mt-xls6-text-drag-enabled tbody td,
body.mt-smart-table-fullscreen #myTasksTable.mt-xls6-text-drag-enabled tbody td *{
  -webkit-user-select:none!important;
  user-select:none!important;
}
@media (max-width:900px){
  body.mt-smart-table-fullscreen #myTasksTablePanel,
  body.mt-smart-table-fullscreen #myTasksTablePanel.mt-smart-table-panel-fullscreen,
  body.mt-smart-table-fullscreen #myTasksTablePanel.mt-xls8-fullscreen-panel{
    inset:3px!important;
    height:calc(100dvh - 6px)!important;
    max-height:calc(100dvh - 6px)!important;
    padding:6px!important;
  }
  #mtSmartVerticalScroller.mt-xls8-v-scrollbar{
    right:5px!important;
    width:22px!important;
  }
  #mtXls8ScrollStatus{
    align-items:flex-start!important;
    flex-direction:column!important;
  }
}
/* MT_XLS8_LOCKED_FULLSCREEN_SCROLL_WORKSPACE_END */

/* MT_XLS9_FIXED_FULLSCREEN_SCROLLBARS_START */
body.mt-xls9-fullscreen-active,
html.mt-xls9-fullscreen-active{
  overflow:hidden!important;
  height:100%!important;
  overscroll-behavior:none!important;
}
body.mt-smart-table-fullscreen #myTasksTablePanel.mt-xls9-fullscreen-panel,
body.mt-smart-table-fullscreen #myTasksTablePanel.mt-xls8-fullscreen-panel,
body.mt-smart-table-fullscreen #myTasksTablePanel.mt-smart-table-panel-fullscreen{
  position:fixed!important;
  inset:6px!important;
  width:auto!important;
  height:calc(100dvh - 12px)!important;
  max-height:calc(100dvh - 12px)!important;
  overflow:hidden!important;
  display:flex!important;
  flex-direction:column!important;
  padding:10px 42px 54px 10px!important;
  box-sizing:border-box!important;
}
body.mt-smart-table-fullscreen #myTasksTablePanel.mt-xls9-fullscreen-panel #myTasksSmartTableWrap,
body.mt-smart-table-fullscreen #myTasksSmartTableWrap.mt-xls9-scroll-owner{
  flex:1 1 auto!important;
  min-height:180px!important;
  max-height:none!important;
  overflow:scroll!important;
  overflow-x:scroll!important;
  overflow-y:scroll!important;
  overscroll-behavior:contain!important;
  scrollbar-gutter:stable both-edges!important;
  scrollbar-width:auto!important;
  scrollbar-color:#0f172a #dbe4ef!important;
  touch-action:none!important;
  border:1px solid #94a3b8!important;
  border-radius:8px!important;
  background:#fff!important;
  position:relative!important;
  z-index:20!important;
}
body.mt-smart-table-fullscreen #myTasksSmartTableWrap.mt-xls9-scroll-owner::-webkit-scrollbar{
  width:22px!important;
  height:22px!important;
}
body.mt-smart-table-fullscreen #myTasksSmartTableWrap.mt-xls9-scroll-owner::-webkit-scrollbar-track{
  background:#dbe4ef!important;
  border-radius:999px!important;
  box-shadow:inset 0 0 0 1px #94a3b8!important;
}
body.mt-smart-table-fullscreen #myTasksSmartTableWrap.mt-xls9-scroll-owner::-webkit-scrollbar-thumb{
  background:#0f172a!important;
  border:4px solid #dbe4ef!important;
  border-radius:999px!important;
}
body.mt-smart-table-fullscreen #myTasksTable.mt-xls9-table{
  border-collapse:separate!important;
  border-spacing:0!important;
  table-layout:fixed!important;
}
body.mt-smart-table-fullscreen #myTasksTable.mt-xls9-table thead th{
  position:sticky!important;
  top:0!important;
  z-index:600!important;
  background:#dbeafe!important;
  box-shadow:inset 0 -1px 0 #64748b, 0 3px 8px rgba(15,23,42,.14)!important;
}
#mtXls9FullscreenHScroll,
#mtXls9FullscreenVScroll{
  display:none;
}
body.mt-smart-table-fullscreen #mtXls9FullscreenHScroll.mt-xls9-fullscreen-hscroll{
  display:block!important;
  position:fixed!important;
  left:12px!important;
  right:44px!important;
  bottom:10px!important;
  height:28px!important;
  min-height:28px!important;
  overflow-x:scroll!important;
  overflow-y:hidden!important;
  background:#eef2f7!important;
  border:1px solid #64748b!important;
  border-radius:999px!important;
  scrollbar-width:auto!important;
  scrollbar-color:#0f172a #dbe4ef!important;
  box-shadow:0 -8px 22px rgba(15,23,42,.18)!important;
  z-index:1000005!important;
}
body.mt-smart-table-fullscreen #mtXls9FullscreenVScroll.mt-xls9-fullscreen-vscroll{
  display:block!important;
  position:fixed!important;
  top:132px!important;
  right:10px!important;
  bottom:44px!important;
  width:28px!important;
  min-width:28px!important;
  overflow-y:scroll!important;
  overflow-x:hidden!important;
  background:#eef2f7!important;
  border:1px solid #64748b!important;
  border-radius:999px!important;
  scrollbar-width:auto!important;
  scrollbar-color:#0f172a #dbe4ef!important;
  box-shadow:-8px 0 22px rgba(15,23,42,.16)!important;
  z-index:1000006!important;
}
#mtXls9FullscreenHScroll .mt-xls9-h-inner{
  height:1px!important;
  min-width:100%!important;
  pointer-events:none!important;
}
#mtXls9FullscreenVScroll .mt-xls9-v-inner{
  width:1px!important;
  min-height:100%!important;
  pointer-events:none!important;
}
#mtXls9FullscreenHScroll::-webkit-scrollbar{
  height:22px!important;
}
#mtXls9FullscreenVScroll::-webkit-scrollbar{
  width:22px!important;
}
#mtXls9FullscreenHScroll::-webkit-scrollbar-track,
#mtXls9FullscreenVScroll::-webkit-scrollbar-track{
  background:#dbe4ef!important;
  border-radius:999px!important;
  box-shadow:inset 0 0 0 1px #94a3b8!important;
}
#mtXls9FullscreenHScroll::-webkit-scrollbar-thumb,
#mtXls9FullscreenVScroll::-webkit-scrollbar-thumb{
  background:#0f172a!important;
  border:4px solid #dbe4ef!important;
  border-radius:999px!important;
}
#mtXls9ScrollStatus{
  display:none!important;
}
body.mt-smart-table-fullscreen #mtXls9ScrollStatus.mt-xls9-scroll-status,
body.mt-smart-table-fullscreen #mtXls9ScrollStatus{
  display:flex!important;
  position:fixed!important;
  left:14px!important;
  bottom:42px!important;
  right:48px!important;
  min-height:24px!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:8px!important;
  padding:3px 9px!important;
  color:#334155!important;
  font-size:11px!important;
  font-weight:800!important;
  background:rgba(248,250,252,.94)!important;
  border:1px solid #cbd5e1!important;
  border-radius:8px!important;
  z-index:1000004!important;
  pointer-events:none!important;
}
#mtXls9ScrollStatusText{
  color:#1d4ed8!important;
}
#mtXls9ScrollUpBtn,
#mtXls9ScrollDownBtn,
.mt-xls9-y-button{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:34px!important;
  white-space:nowrap!important;
}
body.mt-xls9-edge-autoscrolling #myTasksTable.mt-xls9-table tbody td.mt-xls-selected,
body.mt-xls9-edge-autoscrolling #myTasksTable.mt-xls9-table tbody td.mt-smart-selected{
  background:#dbeafe!important;
  box-shadow:inset 0 0 0 1px #2563eb!important;
}
@media (max-width:900px){
  body.mt-smart-table-fullscreen #myTasksTablePanel.mt-xls9-fullscreen-panel,
  body.mt-smart-table-fullscreen #myTasksTablePanel.mt-xls8-fullscreen-panel,
  body.mt-smart-table-fullscreen #myTasksTablePanel.mt-smart-table-panel-fullscreen{
    inset:3px!important;
    height:calc(100dvh - 6px)!important;
    max-height:calc(100dvh - 6px)!important;
    padding:6px 36px 52px 6px!important;
  }
  body.mt-smart-table-fullscreen #mtXls9FullscreenHScroll.mt-xls9-fullscreen-hscroll{
    left:8px!important;
    right:38px!important;
    bottom:8px!important;
  }
  body.mt-smart-table-fullscreen #mtXls9FullscreenVScroll.mt-xls9-fullscreen-vscroll{
    top:112px!important;
    right:7px!important;
    bottom:42px!important;
  }
}
/* MT_XLS9_FIXED_FULLSCREEN_SCROLLBARS_END */

/* MT_XLS10_REAL_FULLSCREEN_VERTICAL_SCROLL_START */
html.mt-xls10-fullscreen-active,
body.mt-xls10-fullscreen-active,
body.mt-smart-table-fullscreen,
html.mt-smart-table-fullscreen{
  height:100%!important;
  overflow:hidden!important;
  overscroll-behavior:none!important;
}
body.mt-smart-table-fullscreen #myTasksTablePanel.mt-xls10-fullscreen-panel,
body.mt-smart-table-fullscreen #myTasksTablePanel.mt-xls9-fullscreen-panel,
body.mt-smart-table-fullscreen #myTasksTablePanel.mt-xls8-fullscreen-panel,
body.mt-smart-table-fullscreen #myTasksTablePanel.mt-smart-table-panel-fullscreen{
  position:fixed!important;
  inset:6px!important;
  width:auto!important;
  height:calc(100dvh - 12px)!important;
  max-height:calc(100dvh - 12px)!important;
  min-height:0!important;
  display:flex!important;
  flex-direction:column!important;
  gap:6px!important;
  padding:10px 10px 44px 10px!important;
  margin:0!important;
  box-sizing:border-box!important;
  overflow:hidden!important;
  background:#fff!important;
  border:1px solid #cbd5e1!important;
  border-radius:12px!important;
  box-shadow:0 20px 70px rgba(15,23,42,.22)!important;
  z-index:1000000!important;
}
body.mt-smart-table-fullscreen #myTasksTablePanel.mt-xls10-fullscreen-panel > *{
  flex:0 0 auto!important;
}
body.mt-smart-table-fullscreen #myTasksTablePanel.mt-xls10-fullscreen-panel #myTaskSearch{
  height:34px!important;
  min-height:34px!important;
  margin:0!important;
}
body.mt-smart-table-fullscreen #myTasksSmartTableWrap.mt-xls10-real-scroll-owner,
body.mt-smart-table-fullscreen #myTasksSmartTableWrap.mt-xls10-active-scroll-owner{
  display:block!important;
  flex:0 0 auto!important;
  min-height:190px!important;
  max-height:none!important;
  overflow:auto!important;
  overflow-x:auto!important;
  overflow-y:auto!important;
  scrollbar-gutter:stable both-edges!important;
  scrollbar-width:auto!important;
  scrollbar-color:#0f172a #dbe4ef!important;
  overscroll-behavior:contain!important;
  touch-action:auto!important;
  border:1px solid #94a3b8!important;
  border-radius:8px!important;
  background:#fff!important;
  position:relative!important;
  z-index:30!important;
}
body.mt-smart-table-fullscreen #myTasksSmartTableWrap.mt-xls10-real-scroll-owner::-webkit-scrollbar,
body.mt-smart-table-fullscreen #myTasksSmartTableWrap.mt-xls10-active-scroll-owner::-webkit-scrollbar{
  width:22px!important;
  height:22px!important;
  display:block!important;
}
body.mt-smart-table-fullscreen #myTasksSmartTableWrap.mt-xls10-real-scroll-owner::-webkit-scrollbar-track,
body.mt-smart-table-fullscreen #myTasksSmartTableWrap.mt-xls10-active-scroll-owner::-webkit-scrollbar-track{
  background:#dbe4ef!important;
  border-radius:999px!important;
  box-shadow:inset 0 0 0 1px #94a3b8!important;
}
body.mt-smart-table-fullscreen #myTasksSmartTableWrap.mt-xls10-real-scroll-owner::-webkit-scrollbar-thumb,
body.mt-smart-table-fullscreen #myTasksSmartTableWrap.mt-xls10-active-scroll-owner::-webkit-scrollbar-thumb{
  background:#0f172a!important;
  border:4px solid #dbe4ef!important;
  border-radius:999px!important;
}
body.mt-smart-table-fullscreen #myTasksTable.mt-xls10-table{
  border-collapse:separate!important;
  border-spacing:0!important;
  table-layout:fixed!important;
}
body.mt-smart-table-fullscreen #myTasksTable.mt-xls10-table thead th{
  position:sticky!important;
  top:0!important;
  z-index:700!important;
  background:#dbeafe!important;
  box-shadow:inset 0 -1px 0 #64748b, 0 3px 8px rgba(15,23,42,.14)!important;
}
body.mt-smart-table-fullscreen #myTasksTable.mt-xls10-table tbody td{
  user-select:none!important;
  -webkit-user-select:none!important;
}
#mtXls10HBar,
#mtXls10VBar{
  display:none;
}
body.mt-smart-table-fullscreen #mtXls10HBar.mt-xls10-hbar.is-visible{
  display:block!important;
  position:fixed!important;
  height:28px!important;
  min-height:28px!important;
  max-height:28px!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  background:#eef2f7!important;
  border:1px solid #64748b!important;
  border-radius:999px!important;
  scrollbar-width:auto!important;
  scrollbar-color:#0f172a #dbe4ef!important;
  box-shadow:0 -8px 22px rgba(15,23,42,.18)!important;
  z-index:1000010!important;
}
body.mt-smart-table-fullscreen #mtXls10VBar.mt-xls10-vbar.is-visible{
  display:block!important;
  position:fixed!important;
  width:28px!important;
  min-width:28px!important;
  max-width:28px!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  background:#eef2f7!important;
  border:1px solid #64748b!important;
  border-radius:999px!important;
  scrollbar-width:auto!important;
  scrollbar-color:#0f172a #dbe4ef!important;
  box-shadow:-8px 0 22px rgba(15,23,42,.16)!important;
  z-index:1000011!important;
}
#mtXls10HBar .mt-xls10-hbar-inner{
  height:1px!important;
  min-width:100%!important;
  pointer-events:none!important;
}
#mtXls10VBar .mt-xls10-vbar-inner{
  width:1px!important;
  min-height:100%!important;
  pointer-events:none!important;
}
#mtXls10HBar::-webkit-scrollbar{height:22px!important;display:block!important;}
#mtXls10VBar::-webkit-scrollbar{width:22px!important;display:block!important;}
#mtXls10HBar::-webkit-scrollbar-track,
#mtXls10VBar::-webkit-scrollbar-track{
  background:#dbe4ef!important;
  border-radius:999px!important;
  box-shadow:inset 0 0 0 1px #94a3b8!important;
}
#mtXls10HBar::-webkit-scrollbar-thumb,
#mtXls10VBar::-webkit-scrollbar-thumb{
  background:#0f172a!important;
  border:4px solid #dbe4ef!important;
  border-radius:999px!important;
}
.mt-xls10-disabled-old-scrollbar,
body.mt-smart-table-fullscreen #mtXls9FullscreenHScroll.mt-xls10-disabled-old-scrollbar,
body.mt-smart-table-fullscreen #mtXls9FullscreenVScroll.mt-xls10-disabled-old-scrollbar,
body.mt-smart-table-fullscreen #mtSmartVerticalScroller.mt-xls10-disabled-old-scrollbar{
  display:none!important;
  visibility:hidden!important;
  pointer-events:none!important;
}
body.mt-xls10-edge-scrolling #myTasksTable.mt-xls10-table tbody td.mt-xls-selected,
body.mt-xls10-edge-scrolling #myTasksTable.mt-xls10-table tbody td.mt-smart-selected{
  background:#dbeafe!important;
  box-shadow:inset 0 0 0 1px #2563eb!important;
}
@media (max-width:900px){
  body.mt-smart-table-fullscreen #myTasksTablePanel.mt-xls10-fullscreen-panel,
  body.mt-smart-table-fullscreen #myTasksTablePanel.mt-xls9-fullscreen-panel,
  body.mt-smart-table-fullscreen #myTasksTablePanel.mt-xls8-fullscreen-panel,
  body.mt-smart-table-fullscreen #myTasksTablePanel.mt-smart-table-panel-fullscreen{
    inset:3px!important;
    height:calc(100dvh - 6px)!important;
    max-height:calc(100dvh - 6px)!important;
    padding:6px 6px 42px 6px!important;
  }
  body.mt-smart-table-fullscreen #mtXls10VBar.mt-xls10-vbar.is-visible{
    width:24px!important;
    min-width:24px!important;
  }
}
/* MT_XLS10_REAL_FULLSCREEN_VERTICAL_SCROLL_END */


/* MT_XLS18_FAST_EXCEL_SELECTION_CSS_START */
body.mt-xls18-enabled #myTasksSmartTableWrap.mt-xls18-wrap{
  width:100%;
  max-width:100%;
  min-height:260px;
  max-height:min(68vh, 760px);
  overflow:auto!important;
  position:relative;
  border:1px solid #d6e4f7;
  border-radius:14px;
  background:#fff;
  scrollbar-gutter:stable both-edges;
}
body.mt-xls18-enabled #myTasksSmartTableWrap.mt-xls18-wrap::-webkit-scrollbar{
  width:16px;
  height:16px;
}
body.mt-xls18-enabled #myTasksSmartTableWrap.mt-xls18-wrap::-webkit-scrollbar-track{
  background:#eef4fb;
  border-radius:999px;
}
body.mt-xls18-enabled #myTasksSmartTableWrap.mt-xls18-wrap::-webkit-scrollbar-thumb{
  background:#7689a4;
  border:3px solid #eef4fb;
  border-radius:999px;
}
body.mt-xls18-enabled #myTasksTable.mt-xls18-table{
  border-collapse:separate!important;
  border-spacing:0!important;
  min-width:max-content;
  width:max-content;
  table-layout:auto!important;
}
body.mt-xls18-enabled #myTasksTable.mt-xls18-table th,
body.mt-xls18-enabled #myTasksTable.mt-xls18-table td{
  border-right:1px solid #cfe0f4!important;
  border-bottom:1px solid #cfe0f4!important;
  box-shadow:none!important;
  border-radius:0!important;
  min-width:120px;
}
body.mt-xls18-enabled #myTasksTable.mt-xls18-table thead th{
  position:sticky!important;
  top:0!important;
  z-index:5;
  background:#eaf3ff!important;
}
body.mt-xls18-enabled #myTasksTable.mt-xls18-table th:first-child,
body.mt-xls18-enabled #myTasksTable.mt-xls18-table td:first-child{
  min-width:84px;
  width:84px;
  position:sticky!important;
  left:0!important;
  z-index:6;
  background:#f8fbff!important;
}
body.mt-xls18-enabled #myTasksTable.mt-xls18-table thead th:first-child{
  z-index:12;
}
body.mt-xls18-enabled #myTasksTable.mt-xls18-table th:nth-child(2),
body.mt-xls18-enabled #myTasksTable.mt-xls18-table td:nth-child(2){
  min-width:160px;
  width:160px;
  position:sticky!important;
  left:84px!important;
  z-index:6;
  background:#f8fbff!important;
}
body.mt-xls18-enabled #myTasksTable.mt-xls18-table thead th:nth-child(2){
  z-index:12;
}
body.mt-xls18-enabled #myTasksTable.mt-xls18-table input,
body.mt-xls18-enabled #myTasksTable.mt-xls18-table textarea,
body.mt-xls18-enabled #myTasksTable.mt-xls18-table select{
  width:100%!important;
  max-width:none!important;
  height:auto!important;
  min-height:24px!important;
  padding:2px 4px!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  font:inherit!important;
  color:inherit!important;
}
body.mt-xls18-enabled #myTasksTable.mt-xls18-table td.mt-xls18-selected{
  background:#d9eaff!important;
  outline:1px solid #2f7df6!important;
  outline-offset:-1px;
}
body.mt-xls18-enabled #myTasksTable.mt-xls18-table td.mt-xls18-focus{
  outline:2px solid #1463ff!important;
  outline-offset:-2px;
  background:#cfe3ff!important;
}
body.mt-xls18-enabled #myTasksTable.mt-xls18-table td.mt-xls18-anchor{
  background:#cfe3ff!important;
}
body.mt-xls18-selecting,
body.mt-xls18-selecting *{
  user-select:none!important;
  cursor:cell!important;
}
body.mt-xls18-selecting ::selection{
  background:transparent!important;
}
.mt-xls18-fullscreen-btn{
  white-space:nowrap;
}
html.mt-xls18-fullscreen-on,
body.mt-xls18-fullscreen-on{
  overflow:hidden!important;
}
body.mt-xls18-fullscreen-on .app-sidebar,
body.mt-xls18-fullscreen-on .sidebar,
body.mt-xls18-fullscreen-on .topbar,
body.mt-xls18-fullscreen-on .app-topbar,
body.mt-xls18-fullscreen-on header:not(#myTasksTablePanel header){
  display:none!important;
}
body.mt-xls18-fullscreen-on #myTasksTablePanel.mt-xls18-fullscreen-panel{
  position:fixed!important;
  inset:10px!important;
  z-index:10050!important;
  display:flex!important;
  flex-direction:column!important;
  gap:10px!important;
  padding:14px!important;
  margin:0!important;
  max-width:none!important;
  width:auto!important;
  height:auto!important;
  overflow:hidden!important;
  background:#fff!important;
  border:1px solid #cfe0f4!important;
  border-radius:14px!important;
  box-shadow:0 24px 70px rgba(15,23,42,.22)!important;
}
body.mt-xls18-fullscreen-on #myTasksTablePanel.mt-xls18-fullscreen-panel > *{
  flex:0 0 auto;
}
body.mt-xls18-fullscreen-on #myTasksTablePanel.mt-xls18-fullscreen-panel #mtSaveAllV4Toolbar,
body.mt-xls18-fullscreen-on #myTasksTablePanel.mt-xls18-fullscreen-panel .mt-saveall-v4-toolbar{
  position:relative!important;
  top:auto!important;
  z-index:20!important;
  margin:0!important;
}
body.mt-xls18-fullscreen-on #myTasksTablePanel.mt-xls18-fullscreen-panel #myTaskSearch{
  flex:0 0 auto!important;
}
body.mt-xls18-fullscreen-on #myTasksSmartTableWrap.mt-xls18-fullscreen-wrap{
  flex:1 1 auto!important;
  min-height:0!important;
  height:auto!important;
  max-height:none!important;
  overflow:auto!important;
  border-radius:12px!important;
}
body.mt-xls18-fullscreen-on #myTasksTable.mt-xls18-table{
  min-width:max-content!important;
  width:max-content!important;
}
/* MT_XLS18_FAST_EXCEL_SELECTION_CSS_END */


/* MT_XLS21_EXCEL_DROPDOWN_FILTER_CSS_START */
.my-tasks-page #myTasksTable.mt-excel-filter-table thead th.mt-excel-filter-th{
  position: sticky;
  top: 0;
  z-index: 6;
  padding-right: 26px !important;
}
.my-tasks-page #myTasksTable.mt-excel-filter-table thead th.mt-excel-filter-th .mt-excel-filter-label{
  display:block;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.my-tasks-page #myTasksTable.mt-excel-filter-table thead th.mt-excel-filter-th .mt-excel-filter-btn{
  position:absolute;
  right:4px;
  top:50%;
  transform:translateY(-50%);
  width:18px;
  height:18px;
  line-height:16px;
  padding:0;
  border:1px solid #cbd5e1;
  border-radius:3px;
  background:#f8fafc;
  color:#334155;
  font-size:10px;
  cursor:pointer;
  box-shadow:none;
}
.my-tasks-page #myTasksTable.mt-excel-filter-table thead th.mt-excel-filter-th .mt-excel-filter-btn:hover{
  background:#e0f2fe;
  border-color:#60a5fa;
}
.my-tasks-page #myTasksTable.mt-excel-filter-table thead th.mt-excel-filter-th.is-filtered .mt-excel-filter-btn,
.my-tasks-page #myTasksTable.mt-excel-filter-table thead th.mt-excel-filter-th .mt-excel-filter-btn.is-filtered{
  background:#2563eb;
  border-color:#1d4ed8;
  color:#fff;
}
.my-tasks-page #myTasksTable.mt-excel-filter-table thead th.mt-excel-filter-actions-th{
  padding-right:8px !important;
}
.mt-excel-filter-menu{
  position:fixed;
  z-index:999999;
  display:flex;
  flex-direction:column;
  gap:0;
  min-width:260px;
  max-width:360px;
  padding:8px;
  border:1px solid #94a3b8;
  border-radius:8px;
  background:#fff;
  color:#0f172a;
  box-shadow:0 18px 45px rgba(15,23,42,.22);
  font-size:12px;
  overflow:hidden;
}
.mt-excel-filter-title{
  font-weight:800;
  color:#0f172a;
  padding:4px 6px 8px;
  border-bottom:1px solid #e2e8f0;
  margin-bottom:4px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.mt-excel-filter-menu-row{
  width:100%;
  border:0;
  border-radius:5px;
  background:transparent;
  color:#0f172a;
  text-align:left;
  padding:7px 8px;
  cursor:pointer;
  font-weight:600;
  font-size:12px;
}
.mt-excel-filter-menu-row:hover{ background:#eff6ff; }
.mt-excel-filter-menu-row.is-disabled,
.mt-excel-filter-menu-row:disabled{
  color:#94a3b8;
  cursor:not-allowed;
  background:transparent;
}
.mt-excel-filter-divider{
  height:1px;
  background:#e2e8f0;
  margin:5px 0;
}
.mt-excel-filter-subtitle{
  padding:4px 6px;
  font-weight:800;
  color:#334155;
}
.mt-excel-filter-search{
  width:100%;
  height:30px;
  border:1px solid #cbd5e1;
  border-radius:4px;
  padding:4px 8px;
  margin:4px 0 6px;
  font-size:12px;
  outline:none;
}
.mt-excel-filter-search:focus{
  border-color:#2563eb;
  box-shadow:0 0 0 2px rgba(37,99,235,.15);
}
.mt-excel-filter-select-row{
  display:flex;
  align-items:center;
  gap:6px;
  padding:3px 6px;
  font-weight:700;
  cursor:pointer;
}
.mt-excel-filter-values{
  max-height:210px;
  overflow:auto;
  border:1px solid #e2e8f0;
  background:#fff;
  margin:4px 0 8px;
  padding:3px 0;
}
.mt-excel-filter-values::-webkit-scrollbar{ width:12px; height:12px; }
.mt-excel-filter-values::-webkit-scrollbar-thumb{ background:#94a3b8; border-radius:8px; border:2px solid #f8fafc; }
.mt-excel-filter-option{
  display:grid;
  grid-template-columns:18px minmax(0,1fr) auto;
  align-items:center;
  gap:5px;
  padding:3px 6px;
  cursor:pointer;
  line-height:1.35;
}
.mt-excel-filter-option:hover{ background:#eff6ff; }
.mt-excel-filter-option-text{
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
}
.mt-excel-filter-count{
  color:#64748b;
  font-size:11px;
}
.mt-excel-filter-empty,
.mt-excel-filter-limit{
  padding:8px;
  color:#64748b;
  font-size:11px;
}
.mt-excel-filter-actions{
  display:flex;
  justify-content:flex-end;
  gap:8px;
  padding-top:4px;
}
.mt-excel-filter-actions .btn{
  min-width:64px;
}
.my-tasks-page #myTasksTable tbody tr.mt-excel-filtered-out,
.my-tasks-page #myTasksTable tbody tr.mt-smart-filtered-out{
  display:none !important;
}
/* MT_XLS21_EXCEL_DROPDOWN_FILTER_CSS_END */

/* MT_XLS22_FILTER_COMPACT_UI_START
   Compact Excel-style dropdown filter UI.
   Fix oversized global checkbox/input styling inside filter menu only. */
.mt-excel-filter-menu{
  width:260px !important;
  min-width:240px !important;
  max-width:300px !important;
  padding:6px !important;
  border-radius:6px !important;
  font-size:11px !important;
}
.mt-excel-filter-title{
  padding:3px 5px 6px !important;
  margin-bottom:3px !important;
  font-size:11px !important;
}
.mt-excel-filter-menu-row{
  padding:5px 6px !important;
  border-radius:4px !important;
  font-size:11px !important;
  line-height:1.25 !important;
}
.mt-excel-filter-divider{
  margin:4px 0 !important;
}
.mt-excel-filter-subtitle{
  padding:3px 5px !important;
  font-size:11px !important;
}
.mt-excel-filter-search{
  height:26px !important;
  min-height:26px !important;
  padding:3px 7px !important;
  margin:3px 0 5px !important;
  border-radius:4px !important;
  font-size:11px !important;
  box-shadow:none !important;
}
.mt-excel-filter-search:focus{
  box-shadow:0 0 0 2px rgba(37,99,235,.14) !important;
}
.mt-excel-filter-select-row{
  display:grid !important;
  grid-template-columns:16px minmax(0,1fr) !important;
  align-items:center !important;
  gap:6px !important;
  min-height:22px !important;
  padding:2px 5px !important;
  margin:0 !important;
  border:0 !important;
  background:transparent !important;
  font-size:11px !important;
  line-height:1.2 !important;
}
.mt-excel-filter-select-row:hover{
  background:#eff6ff !important;
}
.mt-excel-filter-select-row span{
  display:block !important;
  overflow:hidden !important;
  white-space:nowrap !important;
  text-overflow:ellipsis !important;
}
.mt-excel-filter-menu input.mt-excel-filter-select-all,
.mt-excel-filter-menu input.mt-excel-filter-check,
.mt-excel-filter-menu input[type="checkbox"].mt-excel-filter-select-all,
.mt-excel-filter-menu input[type="checkbox"].mt-excel-filter-check{
  appearance:auto !important;
  -webkit-appearance:checkbox !important;
  width:13px !important;
  height:13px !important;
  min-width:13px !important;
  max-width:13px !important;
  min-height:13px !important;
  max-height:13px !important;
  padding:0 !important;
  margin:0 !important;
  border:1px solid #94a3b8 !important;
  border-radius:2px !important;
  box-shadow:none !important;
  outline:none !important;
  transform:none !important;
  display:inline-block !important;
  vertical-align:middle !important;
  accent-color:#16a34a !important;
  background-color:#fff !important;
  cursor:pointer !important;
}
.mt-excel-filter-menu input.mt-excel-filter-select-all:focus,
.mt-excel-filter-menu input.mt-excel-filter-check:focus{
  box-shadow:0 0 0 2px rgba(37,99,235,.18) !important;
  outline:none !important;
}
.mt-excel-filter-values{
  max-height:190px !important;
  margin:3px 0 7px !important;
  padding:2px 0 !important;
}
.mt-excel-filter-option{
  grid-template-columns:16px minmax(0,1fr) auto !important;
  gap:6px !important;
  min-height:22px !important;
  padding:2px 5px !important;
  font-size:11px !important;
  line-height:1.2 !important;
}
.mt-excel-filter-option-text{
  font-size:11px !important;
}
.mt-excel-filter-count{
  font-size:10px !important;
}
.mt-excel-filter-empty,
.mt-excel-filter-limit{
  padding:6px !important;
  font-size:10px !important;
}
.mt-excel-filter-actions{
  gap:6px !important;
  padding-top:3px !important;
}
.mt-excel-filter-actions .btn{
  min-width:54px !important;
  height:26px !important;
  padding:4px 10px !important;
  font-size:11px !important;
  border-radius:8px !important;
}
/* MT_XLS22_FILTER_COMPACT_UI_END */

/* MT_FOCUS_PAGE_1_CSS_START
   Dedicated My Tasks focus page: one full-screen spreadsheet workspace, no sidebar/page scroll. */
body.my-tasks-focus-page{
  height:100vh !important;
  min-height:100vh !important;
  overflow:hidden !important;
  background:#f8fafc !important;
}
body.my-tasks-focus-page .app-layout{
  display:block !important;
  height:100vh !important;
  min-height:100vh !important;
  overflow:hidden !important;
}
body.my-tasks-focus-page .sidebar,
body.my-tasks-focus-page .topbar{
  display:none !important;
}
body.my-tasks-focus-page .content{
  width:100vw !important;
  min-width:100vw !important;
  height:100vh !important;
  min-height:100vh !important;
  margin:0 !important;
  padding:0 !important;
  overflow:hidden !important;
}
body.my-tasks-focus-page .main{
  height:100vh !important;
  min-height:100vh !important;
  margin:0 !important;
  padding:8px !important;
  overflow:hidden !important;
}
body.my-tasks-focus-page .main > .card{
  height:calc(100vh - 16px) !important;
  min-height:0 !important;
  margin:0 !important;
  padding:10px !important;
  display:flex !important;
  flex-direction:column !important;
  overflow:hidden !important;
  border-radius:14px !important;
  box-shadow:0 10px 28px rgba(15,23,42,.08) !important;
}
body.my-tasks-focus-page .main > .card > div:first-child,
body.my-tasks-focus-page #myTasksStatus,
body.my-tasks-focus-page .my-task-summary,
body.my-tasks-focus-page #myTaskFilterTabs,
body.my-tasks-focus-page .main > .card > .sub-card:not(#myTaskDetailPanel),
body.my-tasks-focus-page #taskWorkHistoryPanel,
body.my-tasks-focus-page #myTaskRulesModal{
  display:none !important;
}
body.my-tasks-focus-page #myTaskDetailPanel{
  display:flex !important;
  flex:1 1 auto !important;
  min-height:0 !important;
  margin:0 !important;
  padding:0 !important;
  border:0 !important;
  box-shadow:none !important;
  background:transparent !important;
  overflow:hidden !important;
}
body.my-tasks-focus-page #myTaskDetailPanel.hidden{
  display:none !important;
}
body.my-tasks-focus-page #myTaskDetailPanel > :not(#myTasksTablePanel){
  display:none !important;
}
body.my-tasks-focus-page #myTasksTablePanel{
  display:flex !important;
  flex-direction:column !important;
  flex:1 1 auto !important;
  min-height:0 !important;
  width:100% !important;
  overflow:hidden !important;
  padding:0 !important;
  margin:0 !important;
}
body.my-tasks-focus-page #myTasksTablePanel > div:first-child{
  flex:0 0 auto !important;
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:10px !important;
  flex-wrap:wrap !important;
  margin:0 0 8px !important;
  padding:0 !important;
}
body.my-tasks-focus-page #myTasksTablePanel > div:first-child h3{
  flex:0 0 auto !important;
  margin:0 !important;
  font-size:16px !important;
  font-weight:900 !important;
}
body.my-tasks-focus-page #myTaskSearch{
  order:20 !important;
  flex:0 0 100% !important;
  width:100% !important;
  max-width:none !important;
  height:34px !important;
  margin:0 !important;
}
body.my-tasks-focus-page .mt-saveall-v4-toolbar{
  order:10 !important;
  flex:0 0 auto !important;
  margin:0 !important;
  position:static !important;
  top:auto !important;
  right:auto !important;
  z-index:20 !important;
  max-width:100% !important;
  padding:10px 12px !important;
}
body.my-tasks-focus-page .mt-saveall-v4-actions{
  display:flex !important;
  gap:8px !important;
  flex-wrap:wrap !important;
  align-items:center !important;
}
body.my-tasks-focus-page #myTasksTablePanel > .table-wrap,
body.my-tasks-focus-page #myTasksSmartTableWrap{
  flex:1 1 auto !important;
  min-height:0 !important;
  height:auto !important;
  max-height:none !important;
  width:100% !important;
  max-width:100% !important;
  overflow:auto !important;
  border:1px solid #cbd5e1 !important;
  border-radius:10px !important;
  scrollbar-gutter:stable both-edges !important;
  overscroll-behavior:contain !important;
  background:#fff !important;
}
body.my-tasks-focus-page #myTasksTable{
  width:max-content !important;
  min-width:100% !important;
  border-collapse:separate !important;
  border-spacing:0 !important;
}
body.my-tasks-focus-page #myTasksTable thead th{
  position:sticky !important;
  top:0 !important;
  z-index:8 !important;
  background:#eaf2ff !important;
}
body.my-tasks-focus-page #qcFindingPanel{
  display:none !important;
}
body.my-tasks-focus-page #myTasksSmartTableWrap::-webkit-scrollbar,
body.my-tasks-focus-page #myTasksTablePanel > .table-wrap::-webkit-scrollbar{
  width:16px !important;
  height:16px !important;
}
body.my-tasks-focus-page #myTasksSmartTableWrap::-webkit-scrollbar-thumb,
body.my-tasks-focus-page #myTasksTablePanel > .table-wrap::-webkit-scrollbar-thumb{
  background:#64748b !important;
  border-radius:999px !important;
  border:3px solid #e2e8f0 !important;
}
body.my-tasks-focus-page #myTasksSmartTableWrap::-webkit-scrollbar-track,
body.my-tasks-focus-page #myTasksTablePanel > .table-wrap::-webkit-scrollbar-track{
  background:#e2e8f0 !important;
  border-radius:999px !important;
}
body.my-tasks-focus-page .mt-xls18-fullscreen-btn{
  white-space:nowrap !important;
}
@media (max-width:900px){
  body.my-tasks-focus-page .main{ padding:4px !important; }
  body.my-tasks-focus-page .main > .card{ height:calc(100vh - 8px) !important; padding:6px !important; }
  body.my-tasks-focus-page .mt-saveall-v4-toolbar{ width:100% !important; justify-content:space-between !important; }
}
/* MT_FOCUS_PAGE_1_CSS_END */

/* MT_FOCUS_PAGE_2_CLEAN_CONTAINER_START
   Clean dedicated focus page: no sidebar/left rail, one real table scroll container. */
html:has(body.my-tasks-focus-page){
  width:100% !important;
  height:100% !important;
  overflow:hidden !important;
}
body.my-tasks-focus-page.mt-focus-v2-page-body{
  width:100vw !important;
  height:100dvh !important;
  min-height:100dvh !important;
  margin:0 !important;
  padding:0 !important;
  overflow:hidden !important;
  background:#f3f7ff !important;
}
body.my-tasks-focus-page .mt-focus-v2-page{
  box-sizing:border-box !important;
  width:100vw !important;
  height:100dvh !important;
  min-height:0 !important;
  display:flex !important;
  flex-direction:column !important;
  gap:8px !important;
  padding:10px !important;
  overflow:hidden !important;
}
body.my-tasks-focus-page .mt-focus-v2-head{
  flex:0 0 auto !important;
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:12px !important;
  padding:10px 12px !important;
  border:1px solid #dbeafe !important;
  border-radius:14px !important;
  background:#fff !important;
  box-shadow:0 6px 18px rgba(15,23,42,.06) !important;
}
body.my-tasks-focus-page .mt-focus-v2-titlebox{
  min-width:0 !important;
}
body.my-tasks-focus-page .mt-focus-v2-kicker{
  display:block !important;
  margin-bottom:2px !important;
  color:#4f46e5 !important;
  font-size:11px !important;
  font-weight:900 !important;
  letter-spacing:.08em !important;
  text-transform:uppercase !important;
}
body.my-tasks-focus-page .mt-focus-v2-head h1{
  margin:0 !important;
  font-size:18px !important;
  font-weight:900 !important;
  color:#0f172a !important;
}
body.my-tasks-focus-page .mt-focus-v2-head p{
  margin:3px 0 0 !important;
  max-width:1200px !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}
body.my-tasks-focus-page .mt-focus-v2-head-actions{
  display:flex !important;
  align-items:center !important;
  gap:8px !important;
  flex:0 0 auto !important;
}
body.my-tasks-focus-page .mt-focus-v2-status{
  flex:0 0 auto !important;
  min-height:18px !important;
  margin:0 !important;
  padding:0 4px !important;
  font-size:12px !important;
}
body.my-tasks-focus-page .mt-focus-v2-hidden{
  display:none !important;
}
body.my-tasks-focus-page #myTaskDetailPanel.mt-focus-v2-shell,
body.my-tasks-focus-page #myTaskDetailPanel{
  flex:1 1 auto !important;
  min-height:0 !important;
  width:100% !important;
  display:flex !important;
  flex-direction:column !important;
  margin:0 !important;
  padding:0 !important;
  overflow:hidden !important;
  background:transparent !important;
  border:0 !important;
  box-shadow:none !important;
}
body.my-tasks-focus-page #myTasksTablePanel.mt-focus-v2-table-panel,
body.my-tasks-focus-page #myTasksTablePanel{
  flex:1 1 auto !important;
  min-height:0 !important;
  width:100% !important;
  display:flex !important;
  flex-direction:column !important;
  gap:8px !important;
  margin:0 !important;
  padding:10px !important;
  overflow:hidden !important;
  border:1px solid #dbeafe !important;
  border-radius:14px !important;
  background:#fff !important;
  box-shadow:0 10px 26px rgba(15,23,42,.07) !important;
}
body.my-tasks-focus-page #myTasksTablePanel > .mt-focus-v2-table-top{
  flex:0 0 auto !important;
  min-height:0 !important;
  display:flex !important;
  align-items:center !important;
  gap:10px !important;
  flex-wrap:wrap !important;
  margin:0 !important;
  padding:0 !important;
}
body.my-tasks-focus-page .mt-focus-v2-table-title{
  flex:1 1 280px !important;
  min-width:220px !important;
}
body.my-tasks-focus-page .mt-focus-v2-table-title h2{
  margin:0 !important;
  color:#0f172a !important;
  font-size:17px !important;
  font-weight:900 !important;
}
body.my-tasks-focus-page .mt-focus-v2-table-title p{
  margin:3px 0 0 !important;
}
body.my-tasks-focus-page #myTasksTablePanel #mtSaveAllV4Toolbar.mt-saveall-v4-toolbar{
  position:static !important;
  inset:auto !important;
  transform:none !important;
  flex:0 0 auto !important;
  margin:0 !important;
  padding:8px 10px !important;
  max-width:none !important;
  min-height:0 !important;
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:10px !important;
  border-radius:12px !important;
  border:1px solid #dbeafe !important;
  background:#ffffff !important;
  box-shadow:0 8px 18px rgba(15,23,42,.06) !important;
  z-index:30 !important;
}
body.my-tasks-focus-page #myTasksTablePanel .mt-saveall-v4-actions{
  display:flex !important;
  align-items:center !important;
  gap:8px !important;
  flex-wrap:wrap !important;
}
body.my-tasks-focus-page #myTasksTablePanel #myTaskSearch{
  flex:0 0 100% !important;
  width:100% !important;
  max-width:none !important;
  height:34px !important;
  margin:0 !important;
  border-radius:10px !important;
}
body.my-tasks-focus-page #myTasksTablePanel > .table-wrap.mt-focus-v2-table-wrap,
body.my-tasks-focus-page #myTasksTablePanel > .table-wrap,
body.my-tasks-focus-page #myTasksSmartTableWrap.mt-xls18-wrap,
body.my-tasks-focus-page #myTasksSmartTableWrap{
  flex:1 1 auto !important;
  min-height:0 !important;
  height:auto !important;
  max-height:none !important;
  width:100% !important;
  max-width:100% !important;
  display:block !important;
  overflow:auto !important;
  overscroll-behavior:contain !important;
  scrollbar-gutter:stable both-edges !important;
  border:1px solid #c7d2fe !important;
  border-radius:12px !important;
  background:#fff !important;
}
body.my-tasks-focus-page #myTasksTable.mt-xls18-table,
body.my-tasks-focus-page #myTasksTable{
  width:max-content !important;
  min-width:100% !important;
  max-width:none !important;
  table-layout:auto !important;
  border-collapse:separate !important;
  border-spacing:0 !important;
}
body.my-tasks-focus-page #myTasksTable thead th{
  position:sticky !important;
  top:0 !important;
  z-index:25 !important;
  background:#eaf2ff !important;
  box-shadow:inset 0 -1px 0 #bfdbfe !important;
}
body.my-tasks-focus-page #myTasksTable th,
body.my-tasks-focus-page #myTasksTable td{
  height:30px !important;
  line-height:1.25 !important;
  white-space:nowrap !important;
}
body.my-tasks-focus-page #myTasksSmartTableWrap::-webkit-scrollbar,
body.my-tasks-focus-page #myTasksTablePanel > .table-wrap::-webkit-scrollbar{
  width:16px !important;
  height:16px !important;
}
body.my-tasks-focus-page #myTasksSmartTableWrap::-webkit-scrollbar-thumb,
body.my-tasks-focus-page #myTasksTablePanel > .table-wrap::-webkit-scrollbar-thumb{
  background:#64748b !important;
  border:3px solid #e2e8f0 !important;
  border-radius:999px !important;
}
body.my-tasks-focus-page #myTasksSmartTableWrap::-webkit-scrollbar-thumb:hover,
body.my-tasks-focus-page #myTasksTablePanel > .table-wrap::-webkit-scrollbar-thumb:hover{
  background:#475569 !important;
}
body.my-tasks-focus-page #myTasksSmartTableWrap::-webkit-scrollbar-track,
body.my-tasks-focus-page #myTasksTablePanel > .table-wrap::-webkit-scrollbar-track{
  background:#e2e8f0 !important;
  border-radius:999px !important;
}
body.my-tasks-focus-page .mt-excel-filter-menu{
  z-index:5000 !important;
}
body.my-tasks-focus-page #mtXls18FullscreenBtn{
  white-space:nowrap !important;
}
@media (max-width:900px){
  body.my-tasks-focus-page .mt-focus-v2-page{ padding:6px !important; gap:6px !important; }
  body.my-tasks-focus-page .mt-focus-v2-head{ padding:8px !important; }
  body.my-tasks-focus-page #myTasksTablePanel{ padding:6px !important; }
  body.my-tasks-focus-page #myTasksTablePanel #mtSaveAllV4Toolbar.mt-saveall-v4-toolbar{ width:100% !important; }
}
/* MT_FOCUS_PAGE_2_CLEAN_CONTAINER_END */

/* MT_XLS24_SELECT_FIRST_EDIT_ON_DBLCLICK_START
   Spreadsheet behavior: single click/drag selects cell area; double click or Enter edits the cell value. */
body.mt-xls18-enabled #myTasksTable.mt-xls18-table tbody td{
  cursor:cell !important;
  user-select:none !important;
}
body.mt-xls18-enabled #myTasksTable.mt-xls18-table tbody td:not(.mt-xls18-editing) input.my-task-cell,
body.mt-xls18-enabled #myTasksTable.mt-xls18-table tbody td:not(.mt-xls18-editing) input.my-task-note,
body.mt-xls18-enabled #myTasksTable.mt-xls18-table tbody td:not(.mt-xls18-editing) textarea.my-task-cell,
body.mt-xls18-enabled #myTasksTable.mt-xls18-table tbody td:not(.mt-xls18-editing) textarea.my-task-note,
body.mt-xls18-enabled #myTasksTable.mt-xls18-table tbody td:not(.mt-xls18-editing) select.my-task-cell,
body.mt-xls18-enabled #myTasksTable.mt-xls18-table tbody td:not(.mt-xls18-editing) select.my-task-note{
  pointer-events:none !important;
  user-select:none !important;
  caret-color:transparent !important;
  cursor:cell !important;
}
body.mt-xls18-enabled #myTasksTable.mt-xls18-table tbody td.mt-xls18-editing{
  background:#fff !important;
  outline:2px solid #16a34a !important;
  outline-offset:-2px;
  cursor:text !important;
}
body.mt-xls18-enabled #myTasksTable.mt-xls18-table tbody td.mt-xls18-editing input.mt-xls18-editing-input,
body.mt-xls18-enabled #myTasksTable.mt-xls18-table tbody td.mt-xls18-editing textarea.mt-xls18-editing-input,
body.mt-xls18-enabled #myTasksTable.mt-xls18-table tbody td.mt-xls18-editing select.mt-xls18-editing-input{
  pointer-events:auto !important;
  user-select:text !important;
  caret-color:auto !important;
  cursor:text !important;
  background:#fff !important;
  box-shadow:inset 0 0 0 1px rgba(22, 163, 74, .28) !important;
}
body.mt-xls18-enabled #myTasksTable.mt-xls18-table tbody td.mt-xls18-editing input.mt-xls18-editing-input:focus,
body.mt-xls18-enabled #myTasksTable.mt-xls18-table tbody td.mt-xls18-editing textarea.mt-xls18-editing-input:focus,
body.mt-xls18-enabled #myTasksTable.mt-xls18-table tbody td.mt-xls18-editing select.mt-xls18-editing-input:focus{
  outline:none !important;
}
/* MT_XLS24_SELECT_FIRST_EDIT_ON_DBLCLICK_END */

/* MT_FOCUS_PAGE_3_NO_DUPLICATE_HEADER_START
   Focus page cleanup: remove duplicate top header/exit button and let table workspace use the full height. */
body.my-tasks-focus-page .mt-focus-v3-hidden-controls,
body.my-tasks-focus-page .mt-focus-v2-head,
body.my-tasks-focus-page .mt-focus-v2-status{
  display:none !important;
}
body.my-tasks-focus-page .mt-focus-v2-page{
  gap:6px !important;
  padding:8px !important;
}
body.my-tasks-focus-page #myTaskDetailPanel.mt-focus-v2-shell,
body.my-tasks-focus-page #myTaskDetailPanel{
  flex:1 1 auto !important;
  height:calc(100dvh - 16px) !important;
  min-height:0 !important;
}
body.my-tasks-focus-page #myTasksTablePanel.mt-focus-v2-table-panel,
body.my-tasks-focus-page #myTasksTablePanel{
  height:100% !important;
  min-height:0 !important;
  padding:10px !important;
}
body.my-tasks-focus-page #myTasksTablePanel > .mt-focus-v2-table-top{
  gap:8px !important;
}
body.my-tasks-focus-page #myTasksTablePanel #mtSaveAllV4Toolbar.mt-saveall-v4-toolbar{
  flex:0 0 auto !important;
}
/* MT_FOCUS_PAGE_3_NO_DUPLICATE_HEADER_END */


/* JM_SMART_TABLE_PHASE1: Job Management table gets the same spreadsheet feel as My Tasks without touching workflow logic. */
.job-management-page .jm-smart-section{
  border:1px solid rgba(148,163,184,.25);
  border-radius:18px;
  background:linear-gradient(180deg,rgba(255,255,255,.92),rgba(248,250,252,.95));
  padding:12px;
  margin-top:18px;
  box-shadow:0 14px 36px rgba(15,23,42,.07);
}
.job-management-page .jm-smart-section-header{
  position:sticky;
  top:0;
  z-index:8;
  background:linear-gradient(180deg,rgba(255,255,255,.96),rgba(248,250,252,.92));
  backdrop-filter:blur(10px);
  padding:2px 0 10px;
}
.job-management-page .jm-smart-table-wrap{
  width:100%;
  max-height:66vh;
  min-height:360px;
  overflow:auto;
  border:1px solid rgba(148,163,184,.42);
  border-radius:14px;
  background:#fff;
  scrollbar-width:auto;
  scrollbar-color:#94a3b8 #e2e8f0;
}
.job-management-page .jm-smart-table-wrap::-webkit-scrollbar{width:16px;height:16px;}
.job-management-page .jm-smart-table-wrap::-webkit-scrollbar-track{background:#e2e8f0;border-radius:12px;}
.job-management-page .jm-smart-table-wrap::-webkit-scrollbar-thumb{background:#94a3b8;border-radius:12px;border:3px solid #e2e8f0;}
.job-management-page .jm-smart-table-wrap::-webkit-scrollbar-thumb:hover{background:#64748b;}
.job-management-page #jobManagementTable.jm-smart-table{
  border-collapse:separate;
  border-spacing:0;
  width:max-content;
  min-width:100%;
  table-layout:auto;
  font-size:12.5px;
}
.job-management-page #jobManagementTable.jm-smart-table th,
.job-management-page #jobManagementTable.jm-smart-table td{
  border-right:1px solid #dbe4ef;
  border-bottom:1px solid #e2e8f0;
  padding:7px 9px;
  white-space:nowrap;
  vertical-align:middle;
  background:#fff;
}
.job-management-page #jobManagementTable.jm-smart-table thead th{
  position:sticky;
  top:0;
  z-index:5;
  background:linear-gradient(180deg,#f8fafc,#eef2f7);
  color:#334155;
  font-weight:800;
  box-shadow:0 1px 0 #cbd5e1;
}
.job-management-page #jobManagementTable.jm-smart-table tbody tr:nth-child(even) td{background:#fbfdff;}
.job-management-page #jobManagementTable.jm-smart-table tbody tr:hover td{background:#eef6ff;}
.job-management-page #jobManagementTable.jm-smart-table .jm-select-col{
  position:sticky;
  left:0;
  z-index:6;
  text-align:center;
  min-width:44px;
  width:44px;
  box-shadow:1px 0 0 #cbd5e1;
}
.job-management-page #jobManagementTable.jm-smart-table thead .jm-select-col{z-index:9;}
.job-management-page #jobManagementTable.jm-smart-table th[data-jm-col-key="row_no"],
.job-management-page #jobManagementTable.jm-smart-table td[data-jm-col-key="row_no"]{
  position:sticky;
  left:44px;
  z-index:6;
  min-width:92px;
  box-shadow:1px 0 0 #cbd5e1;
}
.job-management-page #jobManagementTable.jm-smart-table thead th[data-jm-col-key="row_no"]{z-index:9;}
.job-management-page .jm-smart-head-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  min-width:110px;
}
.job-management-page .jm-smart-head-label{overflow:hidden;text-overflow:ellipsis;}
.job-management-page .jm-excel-filter-btn{
  width:22px;
  height:22px;
  min-width:22px;
  border:1px solid #cbd5e1;
  border-radius:6px;
  background:#fff;
  color:#475569;
  font-size:10px;
  line-height:1;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.job-management-page .jm-excel-filter-btn:hover,
.job-management-page .jm-excel-filter-btn.is-filtered{
  background:#2563eb;
  color:#fff;
  border-color:#2563eb;
}
.job-management-page #jobManagementTable.jm-smart-table td.jm-smart-cell{cursor:cell;user-select:none;}
.job-management-page #jobManagementTable.jm-smart-table td.jm-cell-selected{
  background:#dbeafe !important;
  outline:1px solid rgba(37,99,235,.55);
  outline-offset:-1px;
}
.job-management-page #jobManagementTable.jm-smart-table td.jm-cell-anchor{
  outline:2px solid #2563eb;
  outline-offset:-2px;
}
body.jm-smart-range-selecting,
body.jm-smart-range-selecting *{user-select:none!important;}
.job-management-page .jm-smart-help{margin-top:8px;color:#64748b;}
.jm-excel-filter-menu{
  position:fixed;
  z-index:100000;
  width:300px;
  max-width:calc(100vw - 18px);
  background:#fff;
  border:1px solid #cbd5e1;
  border-radius:12px;
  box-shadow:0 24px 70px rgba(15,23,42,.22);
  padding:10px;
  color:#0f172a;
}
.jm-excel-filter-menu .jm-filter-title{font-weight:900;margin:0 0 8px;color:#0f172a;}
.jm-excel-filter-menu .jm-filter-command{
  width:100%;
  border:0;
  background:#fff;
  color:#334155;
  text-align:left;
  padding:7px 8px;
  border-radius:8px;
  cursor:pointer;
  font-size:13px;
}
.jm-excel-filter-menu .jm-filter-command:hover{background:#eff6ff;color:#1d4ed8;}
.jm-excel-filter-menu .jm-filter-search{
  width:100%;
  box-sizing:border-box;
  border:1px solid #cbd5e1;
  border-radius:8px;
  padding:7px 9px;
  margin:8px 0;
  font-size:13px;
}
.jm-excel-filter-menu .jm-filter-values{
  max-height:220px;
  overflow:auto;
  border:1px solid #e2e8f0;
  border-radius:8px;
  padding:4px;
  background:#f8fafc;
}
.jm-excel-filter-menu .jm-filter-check{
  display:flex;
  align-items:center;
  gap:7px;
  min-height:24px;
  padding:3px 5px;
  border-radius:6px;
  font-size:12.5px;
  cursor:pointer;
}
.jm-excel-filter-menu .jm-filter-check:hover{background:#e0f2fe;}
.jm-excel-filter-menu .jm-filter-check input[type="checkbox"]{
  width:14px!important;
  height:14px!important;
  min-width:14px!important;
  margin:0!important;
  transform:none!important;
  accent-color:#2563eb;
}
.jm-excel-filter-menu .jm-filter-check span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.jm-excel-filter-menu .jm-filter-check.all{
  border-bottom:1px solid #e2e8f0;
  margin-bottom:5px;
  font-weight:800;
}
.jm-excel-filter-menu .jm-filter-footer{
  display:flex;
  justify-content:flex-end;
  gap:8px;
  margin-top:10px;
}
.jm-excel-filter-menu .jm-filter-limit{padding:8px;color:#64748b;}
body.job-management-page.jm-table-focus-mode{overflow:hidden;background:#f8fafc;}
body.job-management-page.jm-table-focus-mode .sidebar,
body.job-management-page.jm-table-focus-mode .topbar,
body.job-management-page.jm-table-focus-mode .card > div:first-child,
body.job-management-page.jm-table-focus-mode #jobManagementStatus,
body.job-management-page.jm-table-focus-mode .job-management-control-grid,
body.job-management-page.jm-table-focus-mode #jmActiveStepsPanel,
body.job-management-page.jm-table-focus-mode #jmBulkTaskActionsPanel,
body.job-management-page.jm-table-focus-mode #jmEditableColumnsPanel,
body.job-management-page.jm-table-focus-mode .job-management-map-card,
body.job-management-page.jm-table-focus-mode #assignmentHistoryPanel,
body.job-management-page.jm-table-focus-mode .summary-row{display:none!important;}
body.job-management-page.jm-table-focus-mode .app-layout,
body.job-management-page.jm-table-focus-mode .content,
body.job-management-page.jm-table-focus-mode .main,
body.job-management-page.jm-table-focus-mode .card{
  display:block!important;
  width:100vw!important;
  height:100vh!important;
  min-height:100vh!important;
  overflow:hidden!important;
  margin:0!important;
  padding:0!important;
  max-width:none!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
}
body.job-management-page.jm-table-focus-mode .jm-smart-section{
  height:100vh;
  margin:0;
  border-radius:0;
  display:flex;
  flex-direction:column;
  padding:10px;
  box-sizing:border-box;
}
body.job-management-page.jm-table-focus-mode .jm-smart-section-header{position:relative;top:auto;flex:0 0 auto;}
body.job-management-page.jm-table-focus-mode .jm-smart-table-wrap{
  flex:1 1 auto;
  height:auto;
  max-height:none;
  min-height:0;
}
@media (max-width:900px){
  .job-management-page .jm-smart-section-header{align-items:flex-start!important;flex-direction:column;}
  .job-management-page .jm-smart-table-wrap{max-height:58vh;}
}

/* === PJD_SMART_TABLE_PHASE1: Project Job Detail spreadsheet table === */
.job-detail-page .job-data-table-wrap.pjd-smart-table-wrap{
  position: relative;
  max-height: 64vh;
  overflow: auto;
  border: 1px solid #d7e3f2;
  border-radius: 16px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(37,99,235,.04);
  scrollbar-width: auto;
  scrollbar-color: #64748b #e2e8f0;
}
.job-detail-page .job-data-table-wrap.pjd-smart-table-wrap::-webkit-scrollbar{width:14px;height:14px;}
.job-detail-page .job-data-table-wrap.pjd-smart-table-wrap::-webkit-scrollbar-track{background:#e2e8f0;border-radius:999px;}
.job-detail-page .job-data-table-wrap.pjd-smart-table-wrap::-webkit-scrollbar-thumb{background:#64748b;border-radius:999px;border:3px solid #e2e8f0;}
.job-detail-page table.pjd-smart-table{
  border-collapse: separate;
  border-spacing: 0;
  min-width: max-content;
  width: max-content;
  font-size: 12px;
}
.job-detail-page table.pjd-smart-table thead th{
  position: sticky;
  top: 0;
  z-index: 10;
  background: #eaf3ff;
  color: #14213d;
  border-bottom: 1px solid #c6d8ee;
  white-space: nowrap;
  padding: 0;
}
.job-detail-page table.pjd-smart-table th,
.job-detail-page table.pjd-smart-table td{
  border-right: 1px solid #d7e3f2;
  border-bottom: 1px solid #d7e3f2;
}
.job-detail-page table.pjd-smart-table th:first-child,
.job-detail-page table.pjd-smart-table td.sticky-job-col{
  position: sticky;
  left: 0;
  z-index: 11;
  background: #fff;
  min-width: 72px;
  width: 72px;
}
.job-detail-page table.pjd-smart-table thead th:first-child{
  background:#eaf3ff;
  z-index: 13;
  padding: 10px 12px;
}
.job-detail-page .pjd-filterable-th{
  min-width: 150px;
  height: 34px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding: 8px 8px 8px 10px;
}
.job-detail-page .pjd-header-label{
  max-width: 210px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-weight: 900;
  letter-spacing: .03em;
}
.job-detail-page .pjd-filterable-th .column-filter-btn{
  width: 18px;
  height: 18px;
  line-height: 1;
  padding: 0;
  border-radius: 4px;
  display:inline-grid;
  place-items:center;
  background:#f8fbff;
  border:1px solid #bcd0e8;
  color:#334155;
  font-size: 10px;
}
.job-detail-page .pjd-filterable-th .column-filter-btn.active{
  background:#2563eb;
  color:#fff;
  border-color:#2563eb;
}
.job-detail-page table.pjd-smart-table td.pjd-grid-cell{
  min-width: 150px;
  max-width: 260px;
  height: 36px;
  padding: 0;
  background: #fff;
  user-select: none;
  cursor: cell;
}
.job-detail-page table.pjd-smart-table tr:nth-child(even) td.pjd-grid-cell{background:#f8fbff;}
.job-detail-page table.pjd-smart-table td.pjd-grid-cell .dynamic-cell-input{
  width: 100%;
  min-width: 100%;
  height: 35px;
  padding: 7px 10px;
  border: 0 !important;
  border-radius: 0 !important;
  outline: none !important;
  background: transparent !important;
  box-shadow: none !important;
  font: inherit;
  color:#0f172a;
  cursor: cell;
  appearance: none;
}
.job-detail-page table.pjd-smart-table td.pjd-grid-cell select.dynamic-cell-input{color:#0f172a;opacity:1;}
.job-detail-page table.pjd-smart-table td.pjd-grid-cell .dynamic-cell-input.pjd-cell-editing{
  background:#fff !important;
  cursor:text;
  box-shadow: inset 0 0 0 2px #2563eb !important;
  position:relative;
  z-index:2;
}
.job-detail-page table.pjd-smart-table td.pjd-cell-selected{
  background: #dbeafe !important;
  box-shadow: inset 0 0 0 1px #3b82f6;
}
.job-detail-page table.pjd-smart-table td.pjd-cell-active{
  box-shadow: inset 0 0 0 2px #1d4ed8 !important;
}
body.pjd-selecting, body.pjd-selecting *{
  user-select:none !important;
  cursor: cell !important;
}
.job-detail-page .job-data-table-wrap.pjd-smart-table-wrap .row-action-group{
  flex-wrap: nowrap;
  white-space: nowrap;
}
.job-detail-page .job-data-table-wrap.pjd-smart-table-wrap td:not(.pjd-grid-cell){
  white-space: nowrap;
  padding: 8px 10px;
}
body.pjd-focus-table-mode{
  overflow:hidden !important;
}
body.pjd-focus-table-mode .sidebar,
body.pjd-focus-table-mode .topbar,
body.pjd-focus-table-mode #headerSetupCard,
body.pjd-focus-table-mode #jobDetailTabs,
body.pjd-focus-table-mode #jobDetailSummaryCards,
body.pjd-focus-table-mode .job-detail-section:not(#jobDetailDataSection),
body.pjd-focus-table-mode .card > div:first-child{
  display:none !important;
}
body.pjd-focus-table-mode .app-layout,
body.pjd-focus-table-mode .content,
body.pjd-focus-table-mode .main,
body.pjd-focus-table-mode .card,
body.pjd-focus-table-mode .job-detail-layout,
body.pjd-focus-table-mode .jobs-right-panel{
  margin:0 !important;
  padding:0 !important;
  width:100vw !important;
  max-width:none !important;
  min-height:0 !important;
  display:block !important;
}
body.pjd-focus-table-mode #jobDetailDataSection{
  position:fixed;
  inset:8px;
  z-index:9998;
  display:flex !important;
  flex-direction:column;
  gap:10px;
  margin:0 !important;
  padding:14px !important;
  background:#fff;
  border:1px solid #d7e3f2;
  border-radius:18px;
  box-shadow:0 24px 80px rgba(15,23,42,.18);
  overflow:hidden;
}
body.pjd-focus-table-mode #jobDetailDataSection > div:first-child{
  flex:0 0 auto;
}
body.pjd-focus-table-mode #jobDetailDataSection .job-data-toolbar{
  flex:0 0 auto;
  margin:0;
}
body.pjd-focus-table-mode #jobDetailDataSection .job-data-table-wrap.pjd-smart-table-wrap{
  flex:1 1 auto;
  height:auto !important;
  max-height:none !important;
  min-height:0;
}
body.pjd-focus-table-mode #pjdFocusTableBtn{
  background:#ef4444;
  color:#fff;
  border-color:#ef4444;
}
@media(max-width:900px){
  .job-detail-page .pjd-filterable-th{min-width:132px;}
  .job-detail-page table.pjd-smart-table td.pjd-grid-cell{min-width:132px;}
}
.job-detail-page table.pjd-smart-table td.pjd-grid-cell .dynamic-cell-input[data-pjd-grid-input="1"]:not(.pjd-cell-editing){
  pointer-events:none;
}
.job-detail-page table.pjd-smart-table td.pjd-grid-cell .dynamic-cell-input[data-pjd-grid-input="1"].pjd-cell-editing{
  pointer-events:auto;
}

/* === MU_SMART_TABLE_PHASE1: Master User spreadsheet-style table === */
body.master-user-page .mu-smart-table-card{
  margin-top:18px;
  border:1px solid #dbe7f5;
  border-radius:20px;
  background:#fff;
  box-shadow:0 18px 44px rgba(15,23,42,.08);
  overflow:hidden;
}
body.master-user-page .mu-smart-table-toolbar{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  padding:18px 20px;
  border-bottom:1px solid #e2e8f0;
  background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%);
}
body.master-user-page .mu-smart-table-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
body.master-user-page .mu-smart-table-count{
  display:inline-flex;
  align-items:center;
  min-height:32px;
  padding:0 12px;
  border:1px solid #dbe7f5;
  border-radius:999px;
  background:#f8fafc;
  color:#475569;
  font-size:12px;
  font-weight:800;
  white-space:nowrap;
}
body.master-user-page .mu-smart-table-wrap{
  margin:0;
  max-height:58vh;
  overflow:auto;
  border:0;
  border-radius:0;
  background:#fff;
}
body.master-user-page .mu-smart-table-wrap::-webkit-scrollbar{width:14px;height:14px;}
body.master-user-page .mu-smart-table-wrap::-webkit-scrollbar-track{background:#e2e8f0;border-radius:999px;}
body.master-user-page .mu-smart-table-wrap::-webkit-scrollbar-thumb{background:#64748b;border:3px solid #e2e8f0;border-radius:999px;}
body.master-user-page .mu-smart-table-wrap::-webkit-scrollbar-thumb:hover{background:#475569;}
body.master-user-page .mu-smart-table{
  border-collapse:separate;
  border-spacing:0;
  min-width:1280px;
  width:max-content;
  table-layout:fixed;
}
body.master-user-page .mu-smart-table th,
body.master-user-page .mu-smart-table td{
  border-right:1px solid #d8e6f5;
  border-bottom:1px solid #d8e6f5;
  padding:8px 10px;
  min-width:128px;
  height:38px;
  font-size:12px;
  line-height:1.25;
  color:#0f172a;
  vertical-align:middle;
  background:#fff;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
body.master-user-page .mu-smart-table thead th{
  position:sticky;
  top:0;
  z-index:5;
  background:#eaf3ff;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.04em;
  color:#1f2a44;
}
body.master-user-page .mu-smart-table th:first-child,
body.master-user-page .mu-smart-table td:first-child{
  position:sticky;
  left:0;
  z-index:4;
  min-width:74px;
  width:74px;
  background:#f8fbff;
  font-weight:800;
}
body.master-user-page .mu-smart-table thead th:first-child{z-index:7;background:#dcecff;}
body.master-user-page .mu-smart-table th:nth-child(2),
body.master-user-page .mu-smart-table td:nth-child(2){
  position:sticky;
  left:74px;
  z-index:4;
  min-width:132px;
  width:132px;
  background:#f8fbff;
}
body.master-user-page .mu-smart-table thead th:nth-child(2){z-index:7;background:#dcecff;}
body.master-user-page .mu-smart-table th:nth-child(3),
body.master-user-page .mu-smart-table td:nth-child(3){min-width:180px;width:180px;}
body.master-user-page .mu-smart-table th:nth-child(4),
body.master-user-page .mu-smart-table td:nth-child(4){min-width:150px;width:150px;}
body.master-user-page .mu-smart-table th:nth-child(5),
body.master-user-page .mu-smart-table td:nth-child(5){min-width:220px;width:220px;}
body.master-user-page .mu-smart-table th:nth-child(11),
body.master-user-page .mu-smart-table td:nth-child(11){min-width:320px;width:320px;}
body.master-user-page .mu-smart-table tbody tr:nth-child(even) td{background:#f8fbff;}
body.master-user-page .mu-smart-table tbody tr:hover td{background:#eef6ff;}
body.master-user-page .mu-smart-table td.mu-cell-selected{
  background:#dbeafe !important;
  outline:1px solid #3b82f6;
  outline-offset:-1px;
  user-select:none;
}
body.master-user-page .mu-smart-table td.mu-cell-active{
  outline:2px solid #2563eb;
  outline-offset:-2px;
  background:#bfdbfe !important;
}
body.master-user-page.mu-selecting,
body.master-user-page.mu-selecting *{
  cursor:cell !important;
  user-select:none !important;
}
body.master-user-page .mu-smart-table .filterable-th{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  width:100%;
}
body.master-user-page .mu-smart-table .column-filter-btn{
  width:18px;
  height:18px;
  min-width:18px;
  padding:0;
  border-radius:4px;
  font-size:0;
  line-height:1;
  background:#f8fafc;
  border:1px solid #bcd1ec;
  color:#334155;
}
body.master-user-page .mu-smart-table .column-filter-btn::before{content:"▾";font-size:10px;line-height:16px;}
body.master-user-page .mu-smart-table .column-filter-btn.active,
body.master-user-page .mu-smart-table .column-filter-btn.sorted{
  background:#2563eb;
  border-color:#2563eb;
  color:#fff;
}
body.master-user-page .mu-smart-table .column-filter-btn.active::before,
body.master-user-page .mu-smart-table .column-filter-btn.sorted::before{color:#fff;}
body.master-user-page .mu-action-cell .user-action-stack{
  display:flex;
  align-items:center;
  gap:6px;
  flex-wrap:nowrap;
}
body.master-user-page .mu-action-cell .btn{
  padding:6px 8px;
  font-size:11px;
  white-space:nowrap;
}
body.master-user-page .column-filter-panel{
  width:310px;
  border-radius:12px;
  box-shadow:0 18px 50px rgba(15,23,42,.22);
  border:1px solid #cbd5e1;
  z-index:5000;
}
body.master-user-page .column-filter-panel .column-filter-item{
  gap:8px;
  padding:6px 8px;
  min-height:28px;
  border-radius:8px;
}
body.master-user-page .column-filter-panel .column-filter-item input[type="checkbox"]{
  width:14px !important;
  height:14px !important;
  min-width:14px !important;
  accent-color:#16a34a;
}
body.master-user-page .mu-column-filter-sort-actions{
  justify-content:stretch;
}
body.master-user-page .mu-column-filter-sort-actions .btn{
  flex:1;
}
body.master-user-page.mu-table-focus-mode{overflow:hidden;}
body.master-user-page.mu-table-focus-mode #masterUserSmartTablePanel{
  position:fixed;
  inset:12px;
  z-index:4500;
  margin:0;
  display:flex;
  flex-direction:column;
  box-shadow:0 24px 80px rgba(15,23,42,.28);
}
body.master-user-page.mu-table-focus-mode #masterUserSmartTablePanel .mu-smart-table-wrap{
  flex:1;
  max-height:none;
  min-height:0;
}
body.master-user-page.mu-table-focus-mode #masterUserFocusBtn{
  background:#ef4444;
  color:#fff;
  border-color:#ef4444;
}
@media (max-width: 900px){
  body.master-user-page .mu-smart-table-toolbar{flex-direction:column;}
  body.master-user-page .mu-smart-table-actions{justify-content:flex-start;}
  body.master-user-page .mu-smart-table-wrap{max-height:52vh;}
}

/* === MR_SMART_TABLE_PHASE1: Master Requestor spreadsheet-style table === */
body.master-requestor-page .mr-smart-table-card{
  margin-top:18px;
  border:1px solid #dbe7f5;
  border-radius:20px;
  background:#fff;
  box-shadow:0 18px 44px rgba(15,23,42,.08);
  overflow:hidden;
}
body.master-requestor-page .mr-smart-table-toolbar{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  padding:18px 20px;
  border-bottom:1px solid #e2e8f0;
  background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%);
}
body.master-requestor-page .mr-smart-table-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
body.master-requestor-page .mr-smart-table-count{
  display:inline-flex;
  align-items:center;
  min-height:32px;
  padding:0 12px;
  border:1px solid #dbe7f5;
  border-radius:999px;
  background:#f8fafc;
  color:#475569;
  font-size:12px;
  font-weight:800;
  white-space:nowrap;
}
body.master-requestor-page .mr-smart-table-wrap{
  margin:0;
  max-height:58vh;
  overflow:auto;
  border:0;
  border-radius:0;
  background:#fff;
}
body.master-requestor-page .mr-smart-table-wrap::-webkit-scrollbar{width:14px;height:14px;}
body.master-requestor-page .mr-smart-table-wrap::-webkit-scrollbar-track{background:#e2e8f0;border-radius:999px;}
body.master-requestor-page .mr-smart-table-wrap::-webkit-scrollbar-thumb{background:#64748b;border:3px solid #e2e8f0;border-radius:999px;}
body.master-requestor-page .mr-smart-table-wrap::-webkit-scrollbar-thumb:hover{background:#475569;}
body.master-requestor-page .mr-smart-table{
  border-collapse:separate;
  border-spacing:0;
  min-width:1580px;
  width:max-content;
  table-layout:fixed;
}
body.master-requestor-page .mr-smart-table th,
body.master-requestor-page .mr-smart-table td{
  border-right:1px solid #d8e6f5;
  border-bottom:1px solid #d8e6f5;
  padding:8px 10px;
  min-width:132px;
  height:38px;
  font-size:12px;
  line-height:1.25;
  color:#0f172a;
  vertical-align:middle;
  background:#fff;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
body.master-requestor-page .mr-smart-table thead th{
  position:sticky;
  top:0;
  z-index:5;
  background:#eaf3ff;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.04em;
  color:#1f2a44;
}
body.master-requestor-page .mr-smart-table th:first-child,
body.master-requestor-page .mr-smart-table td:first-child{
  position:sticky;
  left:0;
  z-index:4;
  min-width:130px;
  width:130px;
  background:#f8fbff;
  font-weight:800;
}
body.master-requestor-page .mr-smart-table thead th:first-child{z-index:7;background:#dcecff;}
body.master-requestor-page .mr-smart-table th:nth-child(2),
body.master-requestor-page .mr-smart-table td:nth-child(2){min-width:220px;width:220px;}
body.master-requestor-page .mr-smart-table th:nth-child(3),
body.master-requestor-page .mr-smart-table td:nth-child(3){min-width:220px;width:220px;}
body.master-requestor-page .mr-smart-table th:nth-child(5),
body.master-requestor-page .mr-smart-table td:nth-child(5){min-width:220px;width:220px;}
body.master-requestor-page .mr-smart-table th:nth-child(12),
body.master-requestor-page .mr-smart-table td:nth-child(12){min-width:220px;width:220px;}
body.master-requestor-page .mr-smart-table tbody tr:nth-child(even) td{background:#f8fbff;}
body.master-requestor-page .mr-smart-table tbody tr:hover td{background:#eef6ff;}
body.master-requestor-page .mr-smart-table td.mr-cell-selected{
  background:#dbeafe !important;
  outline:1px solid #3b82f6;
  outline-offset:-1px;
  user-select:none;
}
body.master-requestor-page .mr-smart-table td.mr-cell-active{
  outline:2px solid #2563eb;
  outline-offset:-2px;
  background:#bfdbfe !important;
}
body.master-requestor-page.mr-selecting,
body.master-requestor-page.mr-selecting *{
  cursor:cell !important;
  user-select:none !important;
}
body.master-requestor-page .mr-smart-table .filterable-th{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  width:100%;
}
body.master-requestor-page .mr-smart-table .requestor-filter-btn{
  width:18px;
  height:18px;
  min-width:18px;
  padding:0;
  border-radius:4px;
  font-size:0;
  line-height:1;
  background:#f8fafc;
  border:1px solid #bcd1ec;
  color:#334155;
}
body.master-requestor-page .mr-smart-table .requestor-filter-btn::before{content:"▾";font-size:10px;line-height:16px;}
body.master-requestor-page .mr-smart-table .requestor-filter-btn.active,
body.master-requestor-page .mr-smart-table .requestor-filter-btn.sorted{
  background:#2563eb;
  border-color:#2563eb;
  color:#fff;
}
body.master-requestor-page .mr-smart-table .requestor-filter-btn.active::before,
body.master-requestor-page .mr-smart-table .requestor-filter-btn.sorted::before{color:#fff;}
body.master-requestor-page .mr-action-cell .requestor-action-row{
  display:flex;
  align-items:center;
  gap:6px;
  flex-wrap:nowrap;
}
body.master-requestor-page .mr-action-cell .btn{
  padding:6px 8px;
  font-size:11px;
  white-space:nowrap;
}
body.master-requestor-page .column-filter-panel{
  width:310px;
  border-radius:12px;
  box-shadow:0 18px 50px rgba(15,23,42,.22);
  border:1px solid #cbd5e1;
  z-index:5000;
}
body.master-requestor-page .column-filter-panel .column-filter-item{
  gap:8px;
  padding:6px 8px;
  min-height:28px;
  border-radius:8px;
}
body.master-requestor-page .column-filter-panel .column-filter-item input[type="checkbox"]{
  width:14px !important;
  height:14px !important;
  min-width:14px !important;
  accent-color:#16a34a;
}
body.master-requestor-page .mr-column-filter-sort-actions{justify-content:stretch;}
body.master-requestor-page .mr-column-filter-sort-actions .btn{flex:1;}
body.master-requestor-page.mr-table-focus-mode{overflow:hidden;}
body.master-requestor-page.mr-table-focus-mode #masterRequestorSmartTablePanel{
  position:fixed;
  inset:12px;
  z-index:4500;
  margin:0;
  display:flex;
  flex-direction:column;
  box-shadow:0 24px 80px rgba(15,23,42,.28);
}
body.master-requestor-page.mr-table-focus-mode #masterRequestorSmartTablePanel .mr-smart-table-wrap{
  flex:1;
  max-height:none;
  min-height:0;
}
body.master-requestor-page.mr-table-focus-mode #masterRequestorFocusBtn{
  background:#ef4444;
  color:#fff;
  border-color:#ef4444;
}
@media (max-width: 900px){
  body.master-requestor-page .mr-smart-table-toolbar{flex-direction:column;}
  body.master-requestor-page .mr-smart-table-actions{justify-content:flex-start;}
  body.master-requestor-page .mr-smart-table-wrap{max-height:52vh;}
}

/* === MS_SMART_TABLE_PHASE1: Master Submittal spreadsheet-style table === */
body.master-submittal-page .ms-smart-table-card{
  margin-top:18px;
  border:1px solid #dbe7f5;
  border-radius:20px;
  background:#fff;
  box-shadow:0 18px 44px rgba(15,23,42,.08);
  overflow:hidden;
}
body.master-submittal-page .ms-smart-table-toolbar{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  padding:18px 20px;
  border-bottom:1px solid #e2e8f0;
  background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%);
}
body.master-submittal-page .ms-smart-table-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
body.master-submittal-page .ms-smart-table-count{
  display:inline-flex;
  align-items:center;
  min-height:32px;
  padding:0 12px;
  border:1px solid #dbe7f5;
  border-radius:999px;
  background:#f8fafc;
  color:#475569;
  font-size:12px;
  font-weight:800;
  white-space:nowrap;
}
body.master-submittal-page .ms-smart-table-wrap{
  margin:0;
  max-height:58vh;
  overflow:auto;
  border:0;
  border-radius:0;
  background:#fff;
}
body.master-submittal-page .ms-smart-table-wrap::-webkit-scrollbar{width:14px;height:14px;}
body.master-submittal-page .ms-smart-table-wrap::-webkit-scrollbar-track{background:#e2e8f0;border-radius:999px;}
body.master-submittal-page .ms-smart-table-wrap::-webkit-scrollbar-thumb{background:#64748b;border:3px solid #e2e8f0;border-radius:999px;}
body.master-submittal-page .ms-smart-table-wrap::-webkit-scrollbar-thumb:hover{background:#475569;}
body.master-submittal-page .ms-smart-table{
  border-collapse:separate;
  border-spacing:0;
  min-width:1840px;
  width:max-content;
  table-layout:fixed;
}
body.master-submittal-page .ms-smart-table th,
body.master-submittal-page .ms-smart-table td{
  border-right:1px solid #d8e6f5;
  border-bottom:1px solid #d8e6f5;
  padding:8px 10px;
  min-width:132px;
  height:38px;
  font-size:12px;
  line-height:1.25;
  color:#0f172a;
  vertical-align:middle;
  background:#fff;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
body.master-submittal-page .ms-smart-table thead th{
  position:sticky;
  top:0;
  z-index:5;
  background:#eaf3ff;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.04em;
  color:#1f2a44;
}
body.master-submittal-page .ms-smart-table th:first-child,
body.master-submittal-page .ms-smart-table td:first-child{
  position:sticky;
  left:0;
  z-index:4;
  min-width:140px;
  width:140px;
  background:#f8fbff;
  font-weight:800;
}
body.master-submittal-page .ms-smart-table thead th:first-child{z-index:7;background:#dcecff;}
body.master-submittal-page .ms-smart-table th:nth-child(2),
body.master-submittal-page .ms-smart-table td:nth-child(2){min-width:240px;width:240px;}
body.master-submittal-page .ms-smart-table th:nth-child(3),
body.master-submittal-page .ms-smart-table td:nth-child(3){min-width:220px;width:220px;}
body.master-submittal-page .ms-smart-table th:nth-child(4),
body.master-submittal-page .ms-smart-table td:nth-child(4){min-width:220px;width:220px;}
body.master-submittal-page .ms-smart-table th:nth-child(6),
body.master-submittal-page .ms-smart-table td:nth-child(6){min-width:220px;width:220px;}
body.master-submittal-page .ms-smart-table th:nth-child(7),
body.master-submittal-page .ms-smart-table td:nth-child(7){min-width:220px;width:220px;}
body.master-submittal-page .ms-smart-table th:nth-child(13),
body.master-submittal-page .ms-smart-table td:nth-child(13){min-width:220px;width:220px;}
body.master-submittal-page .ms-smart-table tbody tr:nth-child(even) td{background:#f8fbff;}
body.master-submittal-page .ms-smart-table tbody tr:hover td{background:#eef6ff;}
body.master-submittal-page .ms-smart-table td.ms-cell-selected{
  background:#dbeafe !important;
  outline:1px solid #3b82f6;
  outline-offset:-1px;
  user-select:none;
}
body.master-submittal-page .ms-smart-table td.ms-cell-active{
  outline:2px solid #2563eb;
  outline-offset:-2px;
  background:#bfdbfe !important;
}
body.master-submittal-page.ms-selecting,
body.master-submittal-page.ms-selecting *{
  cursor:cell !important;
  user-select:none !important;
}
body.master-submittal-page .ms-smart-table .filterable-th{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  width:100%;
}
body.master-submittal-page .ms-smart-table .submittal-filter-btn{
  width:18px;
  height:18px;
  min-width:18px;
  padding:0;
  border-radius:4px;
  font-size:0;
  line-height:1;
  background:#f8fafc;
  border:1px solid #bcd1ec;
  color:#334155;
}
body.master-submittal-page .ms-smart-table .submittal-filter-btn::before{content:"▾";font-size:10px;line-height:16px;}
body.master-submittal-page .ms-smart-table .submittal-filter-btn.active,
body.master-submittal-page .ms-smart-table .submittal-filter-btn.sorted{
  background:#2563eb;
  border-color:#2563eb;
  color:#fff;
}
body.master-submittal-page .ms-smart-table .submittal-filter-btn.active::before,
body.master-submittal-page .ms-smart-table .submittal-filter-btn.sorted::before{color:#fff;}
body.master-submittal-page .ms-action-cell .requestor-action-row{
  display:flex;
  align-items:center;
  gap:6px;
  flex-wrap:nowrap;
}
body.master-submittal-page .ms-action-cell .btn{
  padding:6px 8px;
  font-size:11px;
  white-space:nowrap;
}
body.master-submittal-page .column-filter-panel{
  width:310px;
  border-radius:12px;
  box-shadow:0 18px 50px rgba(15,23,42,.22);
  border:1px solid #cbd5e1;
  z-index:5000;
}
body.master-submittal-page .column-filter-panel .column-filter-item{
  gap:8px;
  padding:6px 8px;
  min-height:28px;
  border-radius:8px;
}
body.master-submittal-page .column-filter-panel .column-filter-item input[type="checkbox"]{
  width:14px !important;
  height:14px !important;
  min-width:14px !important;
  accent-color:#16a34a;
}
body.master-submittal-page .ms-column-filter-sort-actions{justify-content:stretch;}
body.master-submittal-page .ms-column-filter-sort-actions .btn{flex:1;}
body.master-submittal-page.ms-table-focus-mode{overflow:hidden;}
body.master-submittal-page.ms-table-focus-mode #masterSubmittalSmartTablePanel{
  position:fixed;
  inset:12px;
  z-index:4500;
  margin:0;
  display:flex;
  flex-direction:column;
  box-shadow:0 24px 80px rgba(15,23,42,.28);
}
body.master-submittal-page.ms-table-focus-mode #masterSubmittalSmartTablePanel .ms-smart-table-wrap{
  flex:1;
  max-height:none;
  min-height:0;
}
body.master-submittal-page.ms-table-focus-mode #masterSubmittalFocusBtn{
  background:#ef4444;
  color:#fff;
  border-color:#ef4444;
}
@media (max-width: 900px){
  body.master-submittal-page .ms-smart-table-toolbar{flex-direction:column;}
  body.master-submittal-page .ms-smart-table-actions{justify-content:flex-start;}
  body.master-submittal-page .ms-smart-table-wrap{max-height:52vh;}
}

/* === MP_SMART_TABLE_PHASE1: Master Project spreadsheet-style table === */
body.master-project-page .mp-smart-table-card{
  margin-top:18px;
  border:1px solid #dbe7f5;
  border-radius:20px;
  background:#fff;
  box-shadow:0 18px 44px rgba(15,23,42,.08);
  overflow:hidden;
}
body.master-project-page .mp-smart-table-toolbar{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  padding:18px 20px;
  border-bottom:1px solid #e2e8f0;
  background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%);
}
body.master-project-page .mp-smart-table-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
body.master-project-page .mp-smart-table-count{
  display:inline-flex;
  align-items:center;
  min-height:32px;
  padding:0 12px;
  border:1px solid #dbe7f5;
  border-radius:999px;
  background:#f8fafc;
  color:#475569;
  font-size:12px;
  font-weight:800;
  white-space:nowrap;
}
body.master-project-page .mp-smart-table-wrap{
  margin:0;
  max-height:58vh;
  overflow:auto;
  border:0;
  border-radius:0;
  background:#fff;
}
body.master-project-page .mp-smart-table-wrap::-webkit-scrollbar{width:14px;height:14px;}
body.master-project-page .mp-smart-table-wrap::-webkit-scrollbar-track{background:#e2e8f0;border-radius:999px;}
body.master-project-page .mp-smart-table-wrap::-webkit-scrollbar-thumb{background:#64748b;border:3px solid #e2e8f0;border-radius:999px;}
body.master-project-page .mp-smart-table-wrap::-webkit-scrollbar-thumb:hover{background:#475569;}
body.master-project-page .mp-smart-table{
  border-collapse:separate;
  border-spacing:0;
  min-width:1520px;
  width:max-content;
  table-layout:fixed;
}
body.master-project-page .mp-smart-table th,
body.master-project-page .mp-smart-table td{
  border-right:1px solid #d8e6f5;
  border-bottom:1px solid #d8e6f5;
  padding:8px 10px;
  min-width:128px;
  height:38px;
  font-size:12px;
  line-height:1.25;
  color:#0f172a;
  vertical-align:middle;
  background:#fff;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
body.master-project-page .mp-smart-table thead th{
  position:sticky;
  top:0;
  z-index:5;
  background:#eaf3ff;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.04em;
  color:#1f2a44;
}
body.master-project-page .mp-smart-table th:first-child,
body.master-project-page .mp-smart-table td:first-child{
  position:sticky;
  left:0;
  z-index:4;
  min-width:330px;
  width:330px;
  background:#f8fbff;
  font-weight:800;
}
body.master-project-page .mp-smart-table thead th:first-child{z-index:7;background:#dcecff;}
body.master-project-page .mp-smart-table th:nth-child(2),
body.master-project-page .mp-smart-table td:nth-child(2){min-width:220px;width:220px;}
body.master-project-page .mp-smart-table th:nth-child(3),
body.master-project-page .mp-smart-table td:nth-child(3){min-width:220px;width:220px;}
body.master-project-page .mp-smart-table th:nth-child(8),
body.master-project-page .mp-smart-table td:nth-child(8){min-width:260px;width:260px;}
body.master-project-page .mp-smart-table th:nth-child(9),
body.master-project-page .mp-smart-table td:nth-child(9){min-width:280px;width:280px;}
body.master-project-page .mp-smart-table tbody tr:nth-child(even) td{background:#f8fbff;}
body.master-project-page .mp-smart-table tbody tr:hover td{background:#eef6ff;}
body.master-project-page .mp-smart-table td.mp-cell-selected{
  background:#dbeafe !important;
  outline:1px solid #3b82f6;
  outline-offset:-1px;
  user-select:none;
}
body.master-project-page .mp-smart-table td.mp-cell-active{
  outline:2px solid #2563eb;
  outline-offset:-2px;
  background:#bfdbfe !important;
}
body.master-project-page.mp-selecting,
body.master-project-page.mp-selecting *{
  cursor:cell !important;
  user-select:none !important;
}
body.master-project-page .mp-smart-table .filterable-th{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  width:100%;
}
body.master-project-page .mp-smart-table .project-filter-btn{
  width:18px;
  height:18px;
  min-width:18px;
  padding:0;
  border-radius:4px;
  font-size:0;
  line-height:1;
  background:#f8fafc;
  border:1px solid #bcd1ec;
  color:#334155;
}
body.master-project-page .mp-smart-table .project-filter-btn::before{content:"▾";font-size:10px;line-height:16px;}
body.master-project-page .mp-smart-table .project-filter-btn.active,
body.master-project-page .mp-smart-table .project-filter-btn.sorted{
  background:#2563eb;
  border-color:#2563eb;
  color:#fff;
}
body.master-project-page .mp-smart-table .project-filter-btn.active::before,
body.master-project-page .mp-smart-table .project-filter-btn.sorted::before{color:#fff;}
body.master-project-page .mp-action-cell .mp-actions{
  display:flex;
  align-items:center;
  gap:6px;
  flex-wrap:nowrap;
}
body.master-project-page .mp-action-cell .btn{
  padding:6px 8px;
  font-size:11px;
  white-space:nowrap;
}
body.master-project-page .column-filter-panel{
  width:310px;
  border-radius:12px;
  box-shadow:0 18px 50px rgba(15,23,42,.22);
  border:1px solid #cbd5e1;
  z-index:5000;
}
body.master-project-page .column-filter-panel .column-filter-item{
  gap:8px;
  padding:6px 8px;
  min-height:28px;
  border-radius:8px;
}
body.master-project-page .column-filter-panel .column-filter-item input[type="checkbox"]{
  width:14px !important;
  height:14px !important;
  min-width:14px !important;
  accent-color:#16a34a;
}
body.master-project-page .mp-column-filter-sort-actions{justify-content:stretch;}
body.master-project-page .mp-column-filter-sort-actions .btn{flex:1;}
body.master-project-page.mp-table-focus-mode{overflow:hidden;}
body.master-project-page.mp-table-focus-mode #masterProjectSmartTablePanel{
  position:fixed;
  inset:12px;
  z-index:4500;
  margin:0;
  display:flex;
  flex-direction:column;
  box-shadow:0 24px 80px rgba(15,23,42,.28);
}
body.master-project-page.mp-table-focus-mode #masterProjectSmartTablePanel .mp-smart-table-wrap{
  flex:1;
  max-height:none;
  min-height:0;
}
body.master-project-page.mp-table-focus-mode #masterProjectFocusBtn{
  background:#ef4444;
  color:#fff;
  border-color:#ef4444;
}
@media (max-width: 900px){
  body.master-project-page .mp-smart-table-toolbar{flex-direction:column;}
  body.master-project-page .mp-smart-table-actions{justify-content:flex-start;}
  body.master-project-page .mp-smart-table-wrap{max-height:52vh;}
}

/* === PJN_SMART_TABLE_PHASE1: Project Job Number List spreadsheet table === */
body.job-list-page .job-number-list-card{
  border:1px solid rgba(148,163,184,.35);
  border-radius:18px;
  box-shadow:0 16px 42px rgba(15,23,42,.08);
}
body.job-list-page .job-list-controls{align-items:center;flex-wrap:wrap;}
body.job-list-page .project-job-number-table-wrap{
  position:relative;
  max-height:62vh;
  overflow:auto;
  border:1px solid #cbd5e1;
  border-radius:14px;
  background:#fff;
  overscroll-behavior:contain;
}
body.job-list-page .project-job-number-table-wrap::-webkit-scrollbar{width:14px;height:14px;}
body.job-list-page .project-job-number-table-wrap::-webkit-scrollbar-track{background:#e2e8f0;border-radius:999px;}
body.job-list-page .project-job-number-table-wrap::-webkit-scrollbar-thumb{background:#64748b;border:3px solid #e2e8f0;border-radius:999px;}
body.job-list-page .project-job-number-table-wrap::-webkit-scrollbar-thumb:hover{background:#475569;}
body.job-list-page .project-job-number-smart-table{
  width:max-content;
  min-width:100%;
  border-collapse:separate;
  border-spacing:0;
  table-layout:auto;
  background:#fff;
}
body.job-list-page .project-job-number-smart-table th,
body.job-list-page .project-job-number-smart-table td{
  border-right:1px solid #dbe4ef;
  border-bottom:1px solid #dbe4ef;
  padding:8px 10px;
  white-space:nowrap;
  vertical-align:middle;
  line-height:1.28;
  min-width:130px;
  max-width:360px;
  overflow:hidden;
  text-overflow:ellipsis;
  user-select:none;
}
body.job-list-page .project-job-number-smart-table thead th{
  position:sticky;
  top:0;
  z-index:6;
  background:#eaf3ff;
  color:#0f172a;
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.04em;
  border-bottom:1px solid #b9cbe3;
  box-shadow:0 1px 0 rgba(15,23,42,.08);
}
body.job-list-page .project-job-number-smart-table thead tr.job-list-filter-row th{
  top:35px;
  z-index:5;
  background:#f8fbff;
  padding:6px;
}
body.job-list-page .project-job-number-smart-table thead tr.job-list-filter-row input,
body.job-list-page .project-job-number-smart-table thead tr.job-list-filter-row select{
  height:30px;
  min-width:120px;
  font-size:12px;
}
body.job-list-page .project-job-number-smart-table th:first-child,
body.job-list-page .project-job-number-smart-table td:first-child{
  position:sticky;
  left:0;
  z-index:4;
  min-width:52px;
  width:52px;
  background:#fff;
  text-align:center;
}
body.job-list-page .project-job-number-smart-table th:nth-child(2),
body.job-list-page .project-job-number-smart-table td:nth-child(2){
  position:sticky;
  left:52px;
  z-index:4;
  min-width:230px;
  width:230px;
  background:#fff;
  box-shadow:4px 0 8px rgba(15,23,42,.06);
}
body.job-list-page .project-job-number-smart-table thead th:first-child,
body.job-list-page .project-job-number-smart-table thead th:nth-child(2){z-index:8;background:#dcecff;}
body.job-list-page .project-job-number-smart-table th:nth-child(3),
body.job-list-page .project-job-number-smart-table td:nth-child(3){min-width:300px;width:300px;}
body.job-list-page .project-job-number-smart-table th:nth-child(4),
body.job-list-page .project-job-number-smart-table td:nth-child(4){min-width:150px;width:150px;}
body.job-list-page .project-job-number-smart-table th:nth-child(5),
body.job-list-page .project-job-number-smart-table td:nth-child(5){min-width:150px;width:150px;}
body.job-list-page .project-job-number-smart-table th:nth-child(7),
body.job-list-page .project-job-number-smart-table td:nth-child(7){min-width:240px;width:240px;}
body.job-list-page .project-job-number-smart-table th:nth-child(9),
body.job-list-page .project-job-number-smart-table td:nth-child(9){min-width:250px;width:250px;}
body.job-list-page .project-job-number-smart-table tbody tr:nth-child(even) td{background:#f8fbff;}
body.job-list-page .project-job-number-smart-table tbody tr:hover td{background:#eef6ff;}
body.job-list-page .project-job-number-smart-table td.pjn-cell-selected{
  background:#dbeafe !important;
  outline:1px solid #93c5fd;
  outline-offset:-1px;
}
body.job-list-page .project-job-number-smart-table td.pjn-cell-active{
  box-shadow:inset 0 0 0 2px #2563eb;
}
body.job-list-page .project-job-number-smart-table .pjn-header-row th{
  display:table-cell;
}
body.job-list-page .project-job-number-smart-table .pjn-header-row th[data-pjn-col]{
  padding-right:30px;
}
body.job-list-page .project-job-number-smart-table .pjn-filter-btn{
  position:absolute;
  right:7px;
  top:50%;
  transform:translateY(-50%);
  width:18px;
  height:18px;
  border:1px solid #94a3b8;
  border-radius:5px;
  background:#fff;
  color:#334155;
  cursor:pointer;
  padding:0;
}
body.job-list-page .project-job-number-smart-table .pjn-filter-btn::before{content:"▾";font-size:10px;line-height:16px;display:block;}
body.job-list-page .project-job-number-smart-table .pjn-filter-btn.active,
body.job-list-page .project-job-number-smart-table .pjn-filter-btn.sorted{
  background:#2563eb;
  color:#fff;
  border-color:#2563eb;
}
body.job-list-page .project-job-number-smart-table .pjn-actions-cell{
  white-space:nowrap;
  user-select:auto;
}
body.job-list-page.pjn-table-focus-mode .app-layout{display:block;}
body.job-list-page.pjn-table-focus-mode .sidebar,
body.job-list-page.pjn-table-focus-mode .topbar,
body.job-list-page.pjn-table-focus-mode .job-list-instruction,
body.job-list-page.pjn-table-focus-mode #createJobCard,
body.job-list-page.pjn-table-focus-mode #importJobsCard,
body.job-list-page.pjn-table-focus-mode #headerSetupCard,
body.job-list-page.pjn-table-focus-mode .jobs-right-panel,
body.job-list-page.pjn-table-focus-mode .job-dashboard-toolbar > .btn:not(#toggleCreateJobBtn),
body.job-list-page.pjn-table-focus-mode .job-dashboard-toolbar .job-bulk-panel{
  display:none !important;
}
body.job-list-page.pjn-table-focus-mode .content,
body.job-list-page.pjn-table-focus-mode .main,
body.job-list-page.pjn-table-focus-mode .jobs-layout,
body.job-list-page.pjn-table-focus-mode .jobs-left-panel{
  width:100% !important;
  max-width:none !important;
  margin:0 !important;
  padding:8px !important;
  display:block !important;
}
body.job-list-page.pjn-table-focus-mode .card,
body.job-list-page.pjn-table-focus-mode .job-number-list-card{
  height:calc(100vh - 16px);
  margin:0 !important;
  border-radius:14px;
  display:flex;
  flex-direction:column;
  overflow:hidden;
}
body.job-list-page.pjn-table-focus-mode .project-job-number-table-wrap{
  flex:1 1 auto;
  max-height:none;
  min-height:0;
}
body.job-list-page.pjn-table-focus-mode #pjnFocusTableBtn{background:#ef4444;color:#fff;border-color:#ef4444;}
.pjn-filter-menu{
  position:fixed;
  z-index:99999;
  width:260px;
  max-height:330px;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  gap:6px;
  padding:10px;
  border:1px solid #cbd5e1;
  border-radius:12px;
  background:#fff;
  box-shadow:0 18px 48px rgba(15,23,42,.22);
  color:#0f172a;
}
.pjn-filter-command{
  border:0;
  background:transparent;
  text-align:left;
  padding:7px 8px;
  border-radius:8px;
  cursor:pointer;
  font-size:13px;
}
.pjn-filter-command:hover{background:#eef6ff;}
.pjn-filter-search{
  height:32px;
  border:1px solid #cbd5e1;
  border-radius:8px;
  padding:0 9px;
  font-size:13px;
}
.pjn-filter-values{
  overflow:auto;
  max-height:145px;
  border:1px solid #e2e8f0;
  border-radius:8px;
  padding:4px;
}
.pjn-filter-check{
  display:flex;
  align-items:center;
  gap:7px;
  padding:4px 6px;
  font-size:13px;
  border-radius:7px;
  min-height:24px;
}
.pjn-filter-check:hover{background:#f1f5f9;}
.pjn-filter-check input[type="checkbox"]{
  width:14px !important;
  height:14px !important;
  min-width:14px !important;
  padding:0 !important;
  margin:0 !important;
  accent-color:#2563eb;
}
.pjn-filter-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:2px;}
@media (max-width: 900px){
  body.job-list-page .project-job-number-table-wrap{max-height:54vh;}
  body.job-list-page .job-list-controls{justify-content:flex-start;}
}

/* MKOJ_SMART_TABLE_PHASE1: spreadsheet-style tables for Master Kind of Job */
body.master-kind-job-page .mkoj-smart-wrap{
  overflow:auto;
  max-height:56vh;
  border:1px solid #dbe3ef;
  border-radius:14px;
  background:#fff;
  scrollbar-gutter:stable both-edges;
}
body.master-kind-job-page .mkoj-smart-wrap::-webkit-scrollbar{width:14px;height:14px;}
body.master-kind-job-page .mkoj-smart-wrap::-webkit-scrollbar-thumb{background:#94a3b8;border-radius:999px;border:3px solid #f8fafc;}
body.master-kind-job-page .mkoj-smart-wrap::-webkit-scrollbar-track{background:#f1f5f9;border-radius:999px;}
body.master-kind-job-page .mkoj-smart-table{
  border-collapse:separate;
  border-spacing:0;
  min-width:920px;
  width:max-content;
  user-select:none;
}
body.master-kind-job-page .mkoj-smart-table th,
body.master-kind-job-page .mkoj-smart-table td{
  border-right:1px solid #e2e8f0;
  border-bottom:1px solid #e2e8f0;
  background:#fff;
  vertical-align:top;
}
body.master-kind-job-page .mkoj-smart-table th{
  position:sticky;
  top:0;
  z-index:12;
  background:#f8fafc;
  color:#0f172a;
  white-space:nowrap;
  padding-right:28px !important;
}
body.master-kind-job-page .mkoj-smart-table td{min-width:120px;}
body.master-kind-job-page .mkoj-smart-table-kind td:first-child,
body.master-kind-job-page .mkoj-smart-table-kind th:first-child,
body.master-kind-job-page .mkoj-smart-table-mapping td:first-child,
body.master-kind-job-page .mkoj-smart-table-mapping th:first-child,
body.master-kind-job-page .mkoj-smart-table-targets td:nth-child(2),
body.master-kind-job-page .mkoj-smart-table-targets th:nth-child(2){
  position:sticky;
  left:0;
  z-index:10;
  box-shadow:2px 0 0 rgba(15,23,42,.06);
}
body.master-kind-job-page .mkoj-smart-table-kind th:first-child,
body.master-kind-job-page .mkoj-smart-table-mapping th:first-child,
body.master-kind-job-page .mkoj-smart-table-targets th:nth-child(2){z-index:20;background:#f8fafc;}
body.master-kind-job-page .mkoj-cell-selected{background:#dbeafe !important;outline:1px solid #60a5fa;outline-offset:-1px;}
body.master-kind-job-page .mkoj-cell-active{outline:2px solid #2563eb !important;outline-offset:-2px;background:#bfdbfe !important;}
body.master-kind-job-page .mkoj-filter-hidden{display:none !important;}
body.master-kind-job-page .mkoj-filter-btn{
  position:absolute;
  right:6px;
  top:50%;
  transform:translateY(-50%);
  width:18px;
  height:18px;
  border:1px solid #94a3b8;
  border-radius:5px;
  background:#fff;
  color:#334155;
  cursor:pointer;
  padding:0;
}
body.master-kind-job-page .mkoj-filter-btn::before{content:"▾";font-size:10px;line-height:16px;display:block;}
body.master-kind-job-page .mkoj-filter-btn.active,
body.master-kind-job-page .mkoj-filter-btn.sorted{background:#2563eb;color:#fff;border-color:#2563eb;}
body.master-kind-job-page .mkoj-focus-btn{white-space:nowrap;}
body.master-kind-job-page.mkoj-table-focus-mode .app-layout{display:block;}
body.master-kind-job-page.mkoj-table-focus-mode .sidebar,
body.master-kind-job-page.mkoj-table-focus-mode .topbar,
body.master-kind-job-page.mkoj-table-focus-mode .koj-master-actions,
body.master-kind-job-page.mkoj-table-focus-mode .koj-workflow-suite-head,
body.master-kind-job-page.mkoj-table-focus-mode .koj-workflow-summary-grid,
body.master-kind-job-page.mkoj-table-focus-mode .workflow-view-tabs,
body.master-kind-job-page.mkoj-table-focus-mode .sub-card:not(.mkoj-focus-card),
body.master-kind-job-page.mkoj-table-focus-mode .card > div:first-child,
body.master-kind-job-page.mkoj-table-focus-mode #kindJobStatus{display:none !important;}
body.master-kind-job-page.mkoj-table-focus-mode .content,
body.master-kind-job-page.mkoj-table-focus-mode .main{
  width:100% !important;
  max-width:none !important;
  margin:0 !important;
  padding:8px !important;
  display:block !important;
}
body.master-kind-job-page.mkoj-table-focus-mode .card,
body.master-kind-job-page.mkoj-table-focus-mode .mkoj-focus-card{
  height:calc(100vh - 16px);
  margin:0 !important;
  border-radius:14px;
  display:flex !important;
  flex-direction:column;
  overflow:hidden;
}
body.master-kind-job-page.mkoj-table-focus-mode .mkoj-focus-card .mkoj-smart-wrap{
  flex:1 1 auto;
  min-height:0;
  max-height:none;
}
body.master-kind-job-page.mkoj-table-focus-mode .mkoj-focus-card .workflow-tab-panel,
body.master-kind-job-page.mkoj-table-focus-mode .mkoj-focus-card .workflow-tab-panel.is-active{display:block !important;}
body.master-kind-job-page.mkoj-table-focus-mode .mkoj-focus-btn{background:#ef4444;color:#fff;border-color:#ef4444;}
.mkoj-filter-menu{
  position:fixed;
  z-index:99999;
  width:260px;
  max-height:330px;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  gap:6px;
  padding:10px;
  border:1px solid #cbd5e1;
  border-radius:12px;
  background:#fff;
  box-shadow:0 18px 48px rgba(15,23,42,.22);
  color:#0f172a;
}
.mkoj-filter-command{border:0;background:transparent;text-align:left;padding:7px 8px;border-radius:8px;cursor:pointer;font-size:13px;}
.mkoj-filter-command:hover{background:#eef6ff;}
.mkoj-filter-search{height:32px;border:1px solid #cbd5e1;border-radius:8px;padding:0 9px;font-size:13px;}
.mkoj-filter-values{overflow:auto;max-height:145px;border:1px solid #e2e8f0;border-radius:8px;padding:4px;}
.mkoj-filter-check{display:flex;align-items:center;gap:7px;padding:4px 6px;font-size:13px;border-radius:7px;min-height:24px;}
.mkoj-filter-check:hover{background:#f1f5f9;}
.mkoj-filter-check input[type="checkbox"]{width:14px !important;height:14px !important;min-width:14px !important;padding:0 !important;margin:0 !important;accent-color:#2563eb;}
.mkoj-filter-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:2px;}

/* ============================================================
   Master Deliverable Type Smart Table Phase 1
   Scoped to master-deliverable-type.html only.
   ============================================================ */
body.master-deliverable-type-page .mdt-smart-card{
  border:1px solid #dbeafe;
  background:#ffffff;
  overflow:hidden;
}
body.master-deliverable-type-page .mdt-smart-table-toolbar{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
}
body.master-deliverable-type-page .mdt-smart-table-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  flex-wrap:wrap;
}
body.master-deliverable-type-page .mdt-smart-table-count{
  display:inline-flex;
  align-items:center;
  min-height:30px;
  padding:0 10px;
  border:1px solid #dbeafe;
  border-radius:999px;
  background:#eff6ff;
  color:#1e3a8a;
  font-size:12px;
  font-weight:800;
  white-space:nowrap;
}
body.master-deliverable-type-page .mdt-smart-table-wrap{
  position:relative;
  max-height:58vh;
  overflow:auto !important;
  border:1px solid #cbd5e1;
  border-radius:14px;
  background:#fff;
  scrollbar-width:auto;
  scrollbar-color:#64748b #e2e8f0;
}
body.master-deliverable-type-page .mdt-smart-table-wrap::-webkit-scrollbar{width:15px;height:15px;}
body.master-deliverable-type-page .mdt-smart-table-wrap::-webkit-scrollbar-track{background:#e2e8f0;border-radius:999px;}
body.master-deliverable-type-page .mdt-smart-table-wrap::-webkit-scrollbar-thumb{background:#64748b;border:3px solid #e2e8f0;border-radius:999px;}
body.master-deliverable-type-page .mdt-smart-table-wrap::-webkit-scrollbar-thumb:hover{background:#334155;}
body.master-deliverable-type-page .mdt-smart-table{
  width:max-content;
  min-width:100%;
  border-collapse:separate;
  border-spacing:0;
  user-select:none;
}
body.master-deliverable-type-page .mdt-smart-table th,
body.master-deliverable-type-page .mdt-smart-table td{
  border-right:1px solid #e2e8f0;
  border-bottom:1px solid #e2e8f0;
  background:#fff;
  color:#0f172a;
  vertical-align:top;
  min-width:130px;
}
body.master-deliverable-type-page .mdt-smart-table thead th{
  position:sticky;
  top:0;
  z-index:5;
  background:#f8fafc;
  font-weight:900;
  white-space:nowrap;
  padding:9px 8px;
}
body.master-deliverable-type-page .mdt-smart-table tbody tr:nth-child(even) td{background:#fbfdff;}
body.master-deliverable-type-page .mdt-smart-table tbody tr:hover td{background:#eef6ff;}
body.master-deliverable-type-page .mdt-smart-table th:first-child,
body.master-deliverable-type-page .mdt-smart-table td:first-child{
  position:sticky;
  left:0;
  z-index:4;
  min-width:120px;
  width:120px;
  background:#f8fbff;
  box-shadow:2px 0 0 rgba(15,23,42,.06);
}
body.master-deliverable-type-page .mdt-smart-table thead th:first-child{z-index:8;background:#dcecff;}
body.master-deliverable-type-page .mdt-smart-table th:nth-child(2),
body.master-deliverable-type-page .mdt-smart-table td:nth-child(2){min-width:230px;width:230px;}
body.master-deliverable-type-page .mdt-smart-table th:nth-child(4),
body.master-deliverable-type-page .mdt-smart-table td:nth-child(4){min-width:170px;width:170px;}
body.master-deliverable-type-page .mdt-smart-table th:nth-child(7),
body.master-deliverable-type-page .mdt-smart-table td:nth-child(7){min-width:320px;width:320px;}
body.master-deliverable-type-page .mdt-smart-table th:nth-child(8),
body.master-deliverable-type-page .mdt-smart-table td:nth-child(8){min-width:105px;width:105px;}
body.master-deliverable-type-page .mdt-head-inner{display:flex;align-items:center;gap:8px;justify-content:space-between;min-width:0;}
body.master-deliverable-type-page .mdt-head-label{overflow:hidden;text-overflow:ellipsis;}
body.master-deliverable-type-page .mdt-filter-btn{
  width:19px;
  height:19px;
  min-width:19px;
  border:1px solid #94a3b8;
  border-radius:5px;
  background:#fff;
  color:#334155;
  padding:0;
  cursor:pointer;
  line-height:16px;
}
body.master-deliverable-type-page .mdt-filter-btn::before{content:"▾";font-size:10px;display:block;}
body.master-deliverable-type-page .mdt-filter-btn.active,
body.master-deliverable-type-page .mdt-filter-btn.sorted{background:#2563eb;color:#fff;border-color:#2563eb;}
body.master-deliverable-type-page .mdt-smart-table td[data-mdt-cell="1"]{cursor:cell;}
body.master-deliverable-type-page .mdt-smart-table td.mdt-cell-selected{background:#dbeafe !important;outline:1px solid #60a5fa;outline-offset:-1px;}
body.master-deliverable-type-page .mdt-smart-table td.mdt-cell-anchor{background:#bfdbfe !important;outline:2px solid #2563eb !important;outline-offset:-2px;}
body.master-deliverable-type-page .mdt-actions-cell{white-space:nowrap;}
body.master-deliverable-type-page.mdt-table-focus-mode{overflow:hidden;background:#f8fafc;}
body.master-deliverable-type-page.mdt-table-focus-mode .sidebar,
body.master-deliverable-type-page.mdt-table-focus-mode .topbar,
body.master-deliverable-type-page.mdt-table-focus-mode .card > div:first-child,
body.master-deliverable-type-page.mdt-table-focus-mode .deliverable-toolbar,
body.master-deliverable-type-page.mdt-table-focus-mode .deliverable-summary-grid,
body.master-deliverable-type-page.mdt-table-focus-mode .deliverable-mapping-readonly,
body.master-deliverable-type-page.mdt-table-focus-mode .mdt-smart-card + .small{display:none !important;}
body.master-deliverable-type-page.mdt-table-focus-mode .app-layout,
body.master-deliverable-type-page.mdt-table-focus-mode .content,
body.master-deliverable-type-page.mdt-table-focus-mode .main,
body.master-deliverable-type-page.mdt-table-focus-mode .card{
  display:block !important;
  width:100% !important;
  max-width:none !important;
  margin:0 !important;
  padding:0 !important;
  height:100vh !important;
  overflow:hidden !important;
}
body.master-deliverable-type-page.mdt-table-focus-mode .card{border:0;border-radius:0;background:#f8fafc;}
body.master-deliverable-type-page.mdt-table-focus-mode .mdt-smart-card{
  height:calc(100vh - 16px);
  margin:8px !important;
  border-radius:14px;
  display:flex !important;
  flex-direction:column;
  overflow:hidden;
}
body.master-deliverable-type-page.mdt-table-focus-mode .mdt-smart-table-toolbar{flex:0 0 auto;padding:2px;}
body.master-deliverable-type-page.mdt-table-focus-mode .mdt-smart-table-wrap{
  flex:1 1 auto;
  min-height:0;
  max-height:none;
}
body.master-deliverable-type-page.mdt-table-focus-mode .mdt-smart-card > .small{display:none;}
body.master-deliverable-type-page.mdt-table-focus-mode #deliverableFocusBtn{background:#ef4444;color:#fff;border-color:#ef4444;}
.mdt-filter-menu{
  position:fixed;
  z-index:99999;
  width:270px;
  max-height:340px;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  gap:6px;
  padding:10px;
  border:1px solid #cbd5e1;
  border-radius:12px;
  background:#fff;
  box-shadow:0 18px 48px rgba(15,23,42,.22);
  color:#0f172a;
}
.mdt-filter-command{border:0;background:transparent;text-align:left;padding:7px 8px;border-radius:8px;cursor:pointer;font-size:13px;}
.mdt-filter-command:hover{background:#eef6ff;}
.mdt-filter-search{height:32px;border:1px solid #cbd5e1;border-radius:8px;padding:0 9px;font-size:13px;}
.mdt-filter-values{overflow:auto;max-height:145px;border:1px solid #e2e8f0;border-radius:8px;padding:4px;}
.mdt-filter-check{display:flex;align-items:center;gap:7px;padding:4px 6px;font-size:13px;border-radius:7px;min-height:24px;}
.mdt-filter-check:hover{background:#f1f5f9;}
.mdt-filter-check input[type="checkbox"]{width:14px !important;height:14px !important;min-width:14px !important;padding:0 !important;margin:0 !important;accent-color:#2563eb;}
.mdt-filter-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:2px;}

/* =========================================================
   Master Error Category Smart Table Phase 1
   ========================================================= */
body.master-error-category-page .mec-smart-card{
  display:flex;
  flex-direction:column;
  gap:10px;
}
body.master-error-category-page .mec-smart-table-toolbar{
  align-items:center !important;
}
body.master-error-category-page .mec-smart-table-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  flex-wrap:wrap;
  margin-left:auto;
}
body.master-error-category-page .mec-smart-table-count{
  display:inline-flex;
  align-items:center;
  min-height:28px;
  padding:0 10px;
  border:1px solid #dbeafe;
  background:#eff6ff;
  color:#1d4ed8;
  border-radius:999px;
  font-size:12px;
  font-weight:800;
  white-space:nowrap;
}
body.master-error-category-page .mec-smart-table-wrap{
  width:100%;
  max-height:62vh;
  overflow:auto;
  border:1px solid #cbd5e1;
  border-radius:14px;
  background:#fff;
  scrollbar-gutter:stable both-edges;
}
body.master-error-category-page .mec-smart-table-wrap::-webkit-scrollbar{width:15px;height:15px;}
body.master-error-category-page .mec-smart-table-wrap::-webkit-scrollbar-track{background:#e2e8f0;border-radius:999px;}
body.master-error-category-page .mec-smart-table-wrap::-webkit-scrollbar-thumb{background:#64748b;border:3px solid #e2e8f0;border-radius:999px;}
body.master-error-category-page .mec-smart-table-wrap::-webkit-scrollbar-thumb:hover{background:#334155;}
body.master-error-category-page .mec-smart-table{
  width:max-content;
  min-width:100%;
  border-collapse:separate;
  border-spacing:0;
  table-layout:auto;
}
body.master-error-category-page .mec-smart-table th,
body.master-error-category-page .mec-smart-table td{
  border-right:1px solid #e2e8f0;
  border-bottom:1px solid #e2e8f0;
  padding:8px 10px;
  min-width:135px;
  max-width:360px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  vertical-align:middle;
}
body.master-error-category-page .mec-smart-table thead th{
  position:sticky;
  top:0;
  z-index:5;
  background:#eaf2ff;
  color:#0f172a;
  font-size:12px;
  font-weight:900;
  box-shadow:0 1px 0 #cbd5e1;
}
body.master-error-category-page .mec-smart-table tbody tr:nth-child(even) td{background:#fbfdff;}
body.master-error-category-page .mec-smart-table tbody tr:hover td{background:#eef6ff;}
body.master-error-category-page .mec-smart-table th:first-child,
body.master-error-category-page .mec-smart-table td:first-child{
  position:sticky;
  left:0;
  z-index:4;
  min-width:120px;
  width:120px;
  background:#fff;
  box-shadow:1px 0 0 #cbd5e1;
}
body.master-error-category-page .mec-smart-table thead th:first-child{z-index:8;background:#dcecff;}
body.master-error-category-page .mec-smart-table th:nth-child(2),
body.master-error-category-page .mec-smart-table td:nth-child(2){min-width:250px;width:250px;}
body.master-error-category-page .mec-smart-table th:nth-child(3),
body.master-error-category-page .mec-smart-table td:nth-child(3){min-width:135px;width:135px;}
body.master-error-category-page .mec-smart-table th:nth-child(4),
body.master-error-category-page .mec-smart-table td:nth-child(4){min-width:145px;width:145px;}
body.master-error-category-page .mec-smart-table th:nth-child(6),
body.master-error-category-page .mec-smart-table td:nth-child(6){min-width:360px;width:360px;}
body.master-error-category-page .mec-smart-table th:nth-child(7),
body.master-error-category-page .mec-smart-table td:nth-child(7){min-width:105px;width:105px;}
body.master-error-category-page .mec-head-inner{display:flex;align-items:center;gap:8px;justify-content:space-between;min-width:0;}
body.master-error-category-page .mec-head-label{overflow:hidden;text-overflow:ellipsis;}
body.master-error-category-page .mec-filter-btn{
  width:22px;
  height:22px;
  min-width:22px;
  border:1px solid #cbd5e1;
  border-radius:7px;
  background:#fff;
  color:#334155;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  padding:0;
}
body.master-error-category-page .mec-filter-btn::before{content:"▾";font-size:10px;display:block;}
body.master-error-category-page .mec-filter-btn.active,
body.master-error-category-page .mec-filter-btn.sorted{background:#2563eb;color:#fff;border-color:#2563eb;}
body.master-error-category-page .mec-smart-table td[data-mec-cell="1"]{cursor:cell;user-select:none;}
body.master-error-category-page .mec-smart-table td.mec-cell-selected{background:#dbeafe !important;outline:1px solid #60a5fa;outline-offset:-1px;}
body.master-error-category-page .mec-smart-table td.mec-cell-anchor{background:#bfdbfe !important;outline:2px solid #2563eb !important;outline-offset:-2px;}
body.master-error-category-page .mec-actions-cell{white-space:nowrap;}
body.master-error-category-page.mec-table-focus-mode{overflow:hidden;background:#f8fafc;}
body.master-error-category-page.mec-table-focus-mode .sidebar,
body.master-error-category-page.mec-table-focus-mode .topbar,
body.master-error-category-page.mec-table-focus-mode .card > div:first-child,
body.master-error-category-page.mec-table-focus-mode #errorCategoryStatus,
body.master-error-category-page.mec-table-focus-mode .sub-card:not(#masterErrorCategorySmartTablePanel){display:none !important;}
body.master-error-category-page.mec-table-focus-mode .app-layout,
body.master-error-category-page.mec-table-focus-mode .content,
body.master-error-category-page.mec-table-focus-mode .main,
body.master-error-category-page.mec-table-focus-mode .card{
  display:block;
  width:100vw;
  max-width:none;
  min-height:100vh;
  height:100vh;
  margin:0;
  padding:0;
  overflow:hidden;
}
body.master-error-category-page.mec-table-focus-mode .card{border:0;border-radius:0;background:#f8fafc;}
body.master-error-category-page.mec-table-focus-mode #masterErrorCategorySmartTablePanel{
  height:100vh;
  max-height:100vh;
  border:0;
  border-radius:0;
  padding:10px;
  margin:0;
  display:flex;
  flex-direction:column;
}
body.master-error-category-page.mec-table-focus-mode .mec-smart-table-toolbar{flex:0 0 auto;padding:2px;}
body.master-error-category-page.mec-table-focus-mode .mec-smart-table-wrap{
  flex:1 1 auto;
  max-height:none;
  min-height:0;
  height:auto;
}
body.master-error-category-page.mec-table-focus-mode #mecFocusTableBtn{background:#ef4444;color:#fff;border-color:#ef4444;}
.mec-filter-menu{
  position:fixed;
  z-index:99999;
  width:270px;
  max-width:calc(100vw - 16px);
  background:#fff;
  border:1px solid #cbd5e1;
  border-radius:12px;
  box-shadow:0 18px 45px rgba(15,23,42,.22);
  padding:8px;
  display:flex;
  flex-direction:column;
  gap:6px;
}
.mec-filter-command{border:0;background:transparent;text-align:left;padding:7px 8px;border-radius:8px;cursor:pointer;font-size:13px;}
.mec-filter-command:hover{background:#eef6ff;}
.mec-filter-search{height:32px;border:1px solid #cbd5e1;border-radius:8px;padding:0 9px;font-size:13px;}
.mec-filter-values{overflow:auto;max-height:145px;border:1px solid #e2e8f0;border-radius:8px;padding:4px;}
.mec-filter-check{display:flex;align-items:center;gap:7px;padding:4px 6px;font-size:13px;border-radius:7px;min-height:24px;}
.mec-filter-check:hover{background:#f1f5f9;}
.mec-filter-check input[type="checkbox"]{width:14px !important;height:14px !important;min-width:14px !important;padding:0 !important;margin:0 !important;accent-color:#2563eb;}
.mec-filter-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:2px;}

/* =========================================================
   Master Completion Policy Smart Table Phase 1
   ========================================================= */
body.master-completion-policy-page .mcp-smart-card{
  display:flex;
  flex-direction:column;
  gap:10px;
}
body.master-completion-policy-page .mcp-original-heading{display:none;}
body.master-completion-policy-page .mcp-smart-table-toolbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  margin-bottom:4px;
}
body.master-completion-policy-page .mcp-smart-table-hint{
  display:block;
  color:#64748b;
  font-size:12px;
  margin-top:2px;
}
body.master-completion-policy-page .mcp-smart-table-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  flex-wrap:wrap;
  margin-left:auto;
}
body.master-completion-policy-page .mcp-smart-table-count{
  display:inline-flex;
  align-items:center;
  min-height:28px;
  padding:0 10px;
  border:1px solid #dbeafe;
  background:#eff6ff;
  color:#1d4ed8;
  border-radius:999px;
  font-size:12px;
  font-weight:800;
  white-space:nowrap;
}
body.master-completion-policy-page .mcp-smart-table-wrap{
  width:100%;
  max-height:54vh;
  overflow:auto;
  border:1px solid #cbd5e1;
  border-radius:14px;
  background:#fff;
  scrollbar-gutter:stable both-edges;
}
body.master-completion-policy-page .completion-items-panel .mcp-smart-table-wrap{max-height:42vh;}
body.master-completion-policy-page .mcp-smart-table-wrap::-webkit-scrollbar{width:15px;height:15px;}
body.master-completion-policy-page .mcp-smart-table-wrap::-webkit-scrollbar-track{background:#e2e8f0;border-radius:999px;}
body.master-completion-policy-page .mcp-smart-table-wrap::-webkit-scrollbar-thumb{background:#64748b;border:3px solid #e2e8f0;border-radius:999px;}
body.master-completion-policy-page .mcp-smart-table-wrap::-webkit-scrollbar-thumb:hover{background:#334155;}
body.master-completion-policy-page .mcp-smart-table{
  width:max-content;
  min-width:100%;
  border-collapse:separate;
  border-spacing:0;
  table-layout:auto;
}
body.master-completion-policy-page .mcp-smart-table th,
body.master-completion-policy-page .mcp-smart-table td{
  border-right:1px solid #e2e8f0;
  border-bottom:1px solid #e2e8f0;
  padding:8px 10px;
  min-width:130px;
  max-width:380px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  vertical-align:middle;
}
body.master-completion-policy-page .mcp-smart-table thead th{
  position:sticky;
  top:0;
  z-index:5;
  background:#eaf2ff;
  color:#0f172a;
  font-size:12px;
  font-weight:900;
  box-shadow:0 1px 0 #cbd5e1;
}
body.master-completion-policy-page .mcp-smart-table tbody tr:nth-child(even) td{background:#fbfdff;}
body.master-completion-policy-page .mcp-smart-table tbody tr:hover td{background:#eef6ff;}
body.master-completion-policy-page .mcp-smart-table th:first-child,
body.master-completion-policy-page .mcp-smart-table td:first-child{
  position:sticky;
  left:0;
  z-index:4;
  min-width:210px;
  width:210px;
  background:#fff;
  box-shadow:1px 0 0 #cbd5e1;
}
body.master-completion-policy-page .mcp-smart-table thead th:first-child{z-index:8;background:#dcecff;}
body.master-completion-policy-page .mcp-policy-table th:nth-child(2),
body.master-completion-policy-page .mcp-policy-table td:nth-child(2){min-width:280px;width:280px;}
body.master-completion-policy-page .mcp-policy-table th:nth-child(3),
body.master-completion-policy-page .mcp-policy-table td:nth-child(3){min-width:170px;width:170px;}
body.master-completion-policy-page .mcp-policy-table th:nth-child(4),
body.master-completion-policy-page .mcp-policy-table td:nth-child(4){min-width:90px;width:90px;text-align:center;}
body.master-completion-policy-page .mcp-policy-table th:nth-child(6),
body.master-completion-policy-page .mcp-policy-table td:nth-child(6){min-width:95px;width:95px;}
body.master-completion-policy-page .mcp-item-table th:nth-child(1),
body.master-completion-policy-page .mcp-item-table td:nth-child(1){min-width:70px;width:70px;text-align:center;}
body.master-completion-policy-page .mcp-item-table th:nth-child(2),
body.master-completion-policy-page .mcp-item-table td:nth-child(2){min-width:310px;width:310px;text-align:left;}
body.master-completion-policy-page .mcp-item-table th:nth-child(3),
body.master-completion-policy-page .mcp-item-table td:nth-child(3){min-width:150px;width:150px;}
body.master-completion-policy-page .mcp-item-table th:nth-child(6),
body.master-completion-policy-page .mcp-item-table td:nth-child(6){min-width:170px;width:170px;}
body.master-completion-policy-page .mcp-item-table th:nth-child(8),
body.master-completion-policy-page .mcp-item-table td:nth-child(8){min-width:165px;width:165px;}
body.master-completion-policy-page .mcp-head-inner{display:flex;align-items:center;gap:8px;justify-content:space-between;min-width:0;}
body.master-completion-policy-page .mcp-head-label{overflow:hidden;text-overflow:ellipsis;}
body.master-completion-policy-page .mcp-filter-btn{
  width:22px;
  height:22px;
  min-width:22px;
  border:1px solid #cbd5e1;
  border-radius:7px;
  background:#fff;
  color:#334155;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  padding:0;
}
body.master-completion-policy-page .mcp-filter-btn::before{content:"▾";font-size:10px;display:block;}
body.master-completion-policy-page .mcp-filter-btn.active,
body.master-completion-policy-page .mcp-filter-btn.sorted{background:#2563eb;color:#fff;border-color:#2563eb;}
body.master-completion-policy-page .mcp-smart-table td[data-mcp-cell="1"]{cursor:cell;user-select:none;}
body.master-completion-policy-page .mcp-smart-table td.mcp-cell-selected{background:#dbeafe !important;outline:1px solid #60a5fa;outline-offset:-1px;}
body.master-completion-policy-page .mcp-smart-table td.mcp-cell-anchor{background:#bfdbfe !important;outline:2px solid #2563eb !important;outline-offset:-2px;}
body.master-completion-policy-page .mcp-actions-cell{white-space:nowrap;}
body.master-completion-policy-page.mcp-table-focus-mode{overflow:hidden;background:#f8fafc;}
body.master-completion-policy-page.mcp-table-focus-mode .sidebar,
body.master-completion-policy-page.mcp-table-focus-mode .topbar,
body.master-completion-policy-page.mcp-table-focus-mode .card > div:first-child,
body.master-completion-policy-page.mcp-table-focus-mode #completionPolicyStatus{display:none !important;}
body.master-completion-policy-page.mcp-table-focus-mode .app-layout,
body.master-completion-policy-page.mcp-table-focus-mode .content,
body.master-completion-policy-page.mcp-table-focus-mode .main,
body.master-completion-policy-page.mcp-table-focus-mode .card{
  display:block !important;
  width:100vw !important;
  max-width:none !important;
  min-height:100vh !important;
  height:100vh !important;
  margin:0 !important;
  padding:0 !important;
  overflow:hidden !important;
  border:0 !important;
  border-radius:0 !important;
  background:#f8fafc !important;
}
body.master-completion-policy-page.mcp-table-focus-mode .completion-policy-layout{
  display:block !important;
  height:100vh !important;
  margin:0 !important;
  overflow:hidden !important;
}
body.master-completion-policy-page.mcp-table-focus-mode[data-mcp-focus="policy"] .completion-policy-layout > .sub-card:not(#completionPolicySmartPanel){display:none !important;}
body.master-completion-policy-page.mcp-table-focus-mode[data-mcp-focus="item"] #completionPolicySmartPanel,
body.master-completion-policy-page.mcp-table-focus-mode[data-mcp-focus="item"] #completionPolicyForm,
body.master-completion-policy-page.mcp-table-focus-mode[data-mcp-focus="item"] #policyItemsPanel > .form-grid,
body.master-completion-policy-page.mcp-table-focus-mode[data-mcp-focus="item"] #policyItemsPanel > .field,
body.master-completion-policy-page.mcp-table-focus-mode[data-mcp-focus="item"] #policyItemsPanel > .completion-policy-switches,
body.master-completion-policy-page.mcp-table-focus-mode[data-mcp-focus="item"] #policyItemsPanel > .completion-policy-item-actions,
body.master-completion-policy-page.mcp-table-focus-mode[data-mcp-focus="item"] #policyItemsPanel > .small{display:none !important;}
body.master-completion-policy-page.mcp-table-focus-mode[data-mcp-focus="item"] .completion-policy-layout > .sub-card:last-child{display:flex !important;}
body.master-completion-policy-page.mcp-table-focus-mode #completionPolicySmartPanel,
body.master-completion-policy-page.mcp-table-focus-mode[data-mcp-focus="item"] #policyItemsPanel{
  height:calc(100vh - 16px) !important;
  max-height:none !important;
  margin:8px !important;
  padding:10px !important;
  border-radius:14px !important;
  display:flex !important;
  flex-direction:column !important;
  overflow:hidden !important;
  background:#fff !important;
}
body.master-completion-policy-page.mcp-table-focus-mode .mcp-smart-table-toolbar{flex:0 0 auto;padding:2px;}
body.master-completion-policy-page.mcp-table-focus-mode .mcp-smart-table-wrap{
  flex:1 1 auto;
  max-height:none !important;
  min-height:0;
  height:auto;
}
body.master-completion-policy-page.mcp-table-focus-mode [data-mcp-focus]{background:#ef4444;color:#fff;border-color:#ef4444;}
.mcp-filter-menu{
  position:fixed;
  z-index:99999;
  width:270px;
  max-width:calc(100vw - 16px);
  background:#fff;
  border:1px solid #cbd5e1;
  border-radius:12px;
  box-shadow:0 18px 45px rgba(15,23,42,.22);
  padding:8px;
  display:flex;
  flex-direction:column;
  gap:6px;
  color:#0f172a;
}
.mcp-filter-command{border:0;background:transparent;text-align:left;padding:7px 8px;border-radius:8px;cursor:pointer;font-size:13px;}
.mcp-filter-command:hover{background:#eef6ff;}
.mcp-filter-search{height:32px;border:1px solid #cbd5e1;border-radius:8px;padding:0 9px;font-size:13px;}
.mcp-filter-values{overflow:auto;max-height:145px;border:1px solid #e2e8f0;border-radius:8px;padding:4px;}
.mcp-filter-check{display:flex;align-items:center;gap:7px;padding:4px 6px;font-size:13px;border-radius:7px;min-height:24px;}
.mcp-filter-check:hover{background:#f1f5f9;}
.mcp-filter-check input[type="checkbox"]{width:14px !important;height:14px !important;min-width:14px !important;padding:0 !important;margin:0 !important;accent-color:#2563eb;}
.mcp-filter-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:2px;}

/* MCP_NO_FOCUS_TABLE: Master Completion Policy does not use Focus Table button/mode. */
body.master-completion-policy-page [data-mcp-focus]{display:none !important;}
body.master-completion-policy-page.mcp-table-focus-mode{overflow:auto !important;background:inherit !important;}

/* TWB_SMART_TABLE_PHASE1 - Team Work Board smart/focus table */
.team-work-board-page .twb-table-head-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
}
.team-work-board-page .twb-smart-wrap{
  border:1px solid #d9e6f6;
  border-radius:16px;
  overflow:auto;
  background:#fff;
  max-height:62vh;
  min-height:220px;
  scrollbar-gutter:stable both-edges;
}
.team-work-board-page .twb-smart-wrap::-webkit-scrollbar{width:14px;height:14px;}
.team-work-board-page .twb-smart-wrap::-webkit-scrollbar-track{background:#eef4fb;border-radius:999px;}
.team-work-board-page .twb-smart-wrap::-webkit-scrollbar-thumb{background:#70839d;border-radius:999px;border:3px solid #eef4fb;}
.team-work-board-page .twb-smart-table{
  border-collapse:separate!important;
  border-spacing:0!important;
  min-width:1120px;
  width:max-content;
  table-layout:auto;
}
.team-work-board-page .twb-smart-table th,
.team-work-board-page .twb-smart-table td{
  border-right:1px solid #d7e4f3;
  border-bottom:1px solid #d7e4f3;
  white-space:nowrap;
}
.team-work-board-page .twb-smart-table thead th{
  position:sticky;
  top:0;
  z-index:5;
  background:#eaf2fb!important;
  padding:10px 36px 10px 12px!important;
  vertical-align:middle;
}
.team-work-board-page .twb-smart-th-text{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
}
.team-work-board-page .twb-smart-filter-btn{
  position:absolute;
  right:8px;
  top:50%;
  transform:translateY(-50%);
  width:20px;
  height:20px;
  border:1px solid #bcd0e7;
  border-radius:5px;
  background:#f8fbff;
  color:#334155;
  font-size:11px;
  line-height:1;
  cursor:pointer;
}
.team-work-board-page .twb-smart-filtered .twb-smart-filter-btn{
  background:#2563eb;
  color:#fff;
  border-color:#2563eb;
}
.team-work-board-page .twb-smart-table tbody td{
  cursor:cell;
  user-select:none;
}
.team-work-board-page .twb-smart-table tbody td a,
.team-work-board-page .twb-smart-table tbody td button{
  cursor:pointer;
  user-select:auto;
}
.team-work-board-page .twb-smart-table tbody td.twb-smart-selected{
  background:#dbeafe!important;
  outline:1px solid #3b82f6;
  outline-offset:-1px;
}
.team-work-board-page .twb-smart-table tbody td.twb-smart-anchor{
  outline:2px solid #1d4ed8!important;
  outline-offset:-2px;
}
body.twb-smart-range-selecting,
body.twb-smart-range-selecting *{
  cursor:cell!important;
  user-select:none!important;
}
#twbSmartFilterMenu{
  position:fixed;
  z-index:20000;
  width:292px;
  max-height:420px;
  overflow:hidden;
  border:1px solid #cbd5e1;
  border-radius:12px;
  background:#fff;
  box-shadow:0 18px 45px rgba(15,23,42,.22);
  padding:10px;
  color:#0f172a;
}
#twbSmartFilterMenu.hidden{display:none!important;}
#twbSmartFilterMenu .twb-filter-menu-row{
  width:100%;
  border:0;
  background:transparent;
  text-align:left;
  padding:8px 8px;
  border-radius:8px;
  font-weight:800;
  cursor:pointer;
}
#twbSmartFilterMenu .twb-filter-menu-row:hover{background:#eff6ff;}
#twbSmartFilterMenu .twb-filter-menu-row.muted{color:#64748b;font-weight:700;}
#twbSmartFilterMenu .twb-filter-menu-title{
  margin:10px 0 6px;
  font-size:12px;
  font-weight:900;
  color:#334155;
}
#twbSmartFilterMenu .twb-filter-search{
  width:100%;
  height:34px;
  border:1px solid #cbd5e1;
  border-radius:8px;
  padding:0 10px;
  margin-bottom:8px;
}
#twbSmartFilterMenu .twb-filter-values{
  max-height:190px;
  overflow:auto;
  border:1px solid #e2e8f0;
  border-radius:8px;
  padding:4px;
}
#twbSmartFilterMenu .twb-filter-check{
  display:flex;
  align-items:center;
  gap:8px;
  min-height:26px;
  padding:4px 6px;
  border-radius:6px;
  font-size:13px;
  cursor:pointer;
}
#twbSmartFilterMenu .twb-filter-check:hover{background:#f8fafc;}
#twbSmartFilterMenu .twb-filter-check input{
  width:14px!important;
  height:14px!important;
  min-width:14px!important;
  min-height:14px!important;
  accent-color:#16a34a;
  transform:none!important;
}
#twbSmartFilterMenu .twb-filter-actions{
  display:flex;
  justify-content:flex-end;
  gap:8px;
  margin-top:10px;
}
.team-work-board-page.twb-focus-mode{
  overflow:hidden;
}
.team-work-board-page.twb-focus-mode .app-layout{
  display:block;
}
.team-work-board-page.twb-focus-mode .sidebar,
.team-work-board-page.twb-focus-mode .topbar,
.team-work-board-page.twb-focus-mode .main > .card:first-child,
.team-work-board-page.twb-focus-mode .twb-dispatch-workspace{
  display:none!important;
}
.team-work-board-page.twb-focus-mode .content{
  margin:0!important;
  width:100%!important;
  max-width:none!important;
}
.team-work-board-page.twb-focus-mode .main{
  padding:10px!important;
  height:100vh;
  overflow:hidden;
}
.team-work-board-page.twb-focus-mode .twb-table-workspace{
  height:calc(100vh - 20px);
  min-height:0;
  display:flex;
  flex-direction:column;
  border-radius:16px;
}
.team-work-board-page.twb-focus-mode .twb-table-workspace > .section-head{
  flex:0 0 auto;
  margin-bottom:10px;
}
.team-work-board-page.twb-focus-mode .twb-table-panel.is-active{
  flex:1 1 auto;
  min-height:0;
  display:flex;
  flex-direction:column;
}
.team-work-board-page.twb-focus-mode .twb-table-panel[hidden]{display:none!important;}
.team-work-board-page.twb-focus-mode .twb-table-panel .compact-toolbar{
  flex:0 0 auto;
}
.team-work-board-page.twb-focus-mode .team-work-list.table-mode{
  flex:1 1 auto;
  min-height:0;
  display:flex;
  flex-direction:column;
}
.team-work-board-page.twb-focus-mode .twb-smart-wrap{
  flex:1 1 auto;
  max-height:none!important;
  min-height:0;
  height:100%;
}
.team-work-board-page.twb-focus-mode .twb-data-table{
  min-width:1280px;
}
@media(max-width:900px){
  .team-work-board-page .twb-table-head-actions{justify-content:flex-start;}
}
.team-work-board-page .twb-smart-table{width:max-content!important;min-width:1120px!important;}
.team-work-board-page.twb-focus-mode .twb-smart-table{min-width:1280px!important;}

/* === Master Report Smart Tables: All Job Data + Report Builder Results === */
.master-report-smart-wrap{
  position:relative!important;
  overflow:auto!important;
  border:1px solid #cfe0f5!important;
  border-radius:16px!important;
  background:#fff!important;
  max-height:70vh!important;
  box-shadow:0 10px 24px rgba(15,23,42,.06)!important;
}
.master-report-smart-wrap::-webkit-scrollbar{width:15px;height:15px;}
.master-report-smart-wrap::-webkit-scrollbar-track{background:#e8f0fa;border-radius:999px;}
.master-report-smart-wrap::-webkit-scrollbar-thumb{background:#7d8fa8;border-radius:999px;border:3px solid #e8f0fa;}
.master-report-smart-wrap::-webkit-scrollbar-thumb:hover{background:#52677f;}
.master-report-smart-table{
  width:max-content!important;
  min-width:100%!important;
  border-collapse:separate!important;
  border-spacing:0!important;
  table-layout:auto!important;
  font-size:12px!important;
}
.master-report-smart-table th,
.master-report-smart-table td{
  border-right:1px solid #cfe0f5!important;
  border-bottom:1px solid #cfe0f5!important;
  padding:7px 9px!important;
  height:30px!important;
  white-space:nowrap!important;
  vertical-align:middle!important;
  color:#0f172a!important;
}
.master-report-smart-table thead th{
  position:sticky!important;
  top:0!important;
  z-index:6!important;
  background:#eaf3ff!important;
  color:#12233f!important;
  font-weight:900!important;
  text-transform:uppercase!important;
  letter-spacing:.02em!important;
  box-shadow:0 1px 0 #bfd5ee!important;
}
.master-report-smart-table tbody tr:nth-child(even) td{background:#f8fbff!important;}
.master-report-smart-table tbody tr:hover td{background:#eef6ff!important;}
.master-report-smart-table .mr-freeze-col{
  position:sticky!important;
  left:0!important;
  z-index:5!important;
  background:#f3f8ff!important;
  font-weight:800!important;
}
.master-report-smart-table thead .mr-freeze-col{z-index:9!important;background:#dcecff!important;}
.mr-smart-head-inner{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0;}
.mr-smart-head-label{display:block;overflow:hidden;text-overflow:ellipsis;min-width:0;}
.mr-excel-filter-btn{
  flex:0 0 auto;
  width:20px;height:20px;
  display:inline-flex;align-items:center;justify-content:center;
  border:1px solid #b8c9dd;
  border-radius:4px;
  background:#fff;
  color:#334155;
  font-size:11px;
  cursor:pointer;
  padding:0;
}
.mr-excel-filter-btn:hover{background:#e0f2fe;border-color:#38bdf8;color:#075985;}
.master-report-smart-table th.is-filtered .mr-excel-filter-btn,
.master-report-smart-table th.is-sorted .mr-excel-filter-btn{background:#2563eb;border-color:#2563eb;color:#fff;}
.master-report-smart-table td[data-mr-cell="1"]{cursor:cell;user-select:none;}
.master-report-smart-table td.mr-cell-selected{background:#dbeafe!important;outline:1px solid #60a5fa!important;outline-offset:-1px!important;}
.master-report-smart-table td.mr-cell-anchor{background:#bfdbfe!important;outline:2px solid #2563eb!important;outline-offset:-2px!important;}
body.mr-smart-selecting, body.mr-smart-selecting *{user-select:none!important;cursor:cell!important;}
.mr-excel-filter-menu{
  position:fixed;z-index:2147482500;
  width:300px;max-width:calc(100vw - 16px);
  max-height:430px;
  background:#fff;border:1px solid #cbd5e1;border-radius:12px;
  box-shadow:0 22px 54px rgba(15,23,42,.22);
  padding:10px;
  font-size:12px;color:#0f172a;
}
.mr-excel-filter-title{font-weight:900;color:#172554;padding:2px 4px 8px;border-bottom:1px solid #e2e8f0;margin-bottom:6px;}
.mr-filter-row{
  width:100%;border:0;background:transparent;text-align:left;
  padding:8px 8px;border-radius:8px;cursor:pointer;
  font-size:12px;font-weight:800;color:#334155;
}
.mr-filter-row:hover{background:#eff6ff;color:#1d4ed8;}
.mr-filter-divider{height:1px;background:#e2e8f0;margin:6px 0;}
.mr-filter-search{width:100%;height:32px;min-height:32px!important;border:1px solid #cbd5e1;border-radius:8px;padding:6px 8px;margin:4px 0 7px;background:#fff;}
.mr-filter-values{max-height:190px;overflow:auto;border:1px solid #e2e8f0;border-radius:8px;background:#f8fafc;padding:4px;}
.mr-filter-values::-webkit-scrollbar{width:12px;height:12px;}
.mr-filter-values::-webkit-scrollbar-thumb{background:#94a3b8;border-radius:8px;border:2px solid #f8fafc;}
.mr-filter-option{display:flex;align-items:center;gap:7px;padding:5px 6px;border-radius:6px;font-size:12px;line-height:1.25;cursor:pointer;color:#172554;}
.mr-filter-option:hover{background:#eaf3ff;}
.mr-filter-option input[type="checkbox"],
.mr-filter-select-all-input,
.mr-filter-value-check{
  width:13px!important;height:13px!important;min-width:13px!important;min-height:13px!important;
  padding:0!important;margin:0!important;accent-color:#2563eb;
}
.mr-filter-select-all{font-weight:900;background:#fff;margin-bottom:6px;border:1px solid #e2e8f0;}
.mr-filter-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:10px;}
.mr-filter-empty{font-size:12px;color:#64748b;padding:8px;text-align:center;}
.mr-result-wrap{max-height:420px!important;}
.mr-workflow-wrap{max-height:360px!important;}


/* MRPT_FOCUS_DYNAMIC_JOB_DATA - dedicated focus workspace for Master Report Dynamic Job Data Table */
body.master-report-dynamic-focus{
  overflow:hidden!important;
  background:#f8fafc!important;
}
body.master-report-dynamic-focus #masterReportDynamicDataCard{
  position:fixed!important;
  inset:10px!important;
  z-index:2147482000!important;
  display:flex!important;
  flex-direction:column!important;
  min-width:0!important;
  min-height:0!important;
  width:auto!important;
  height:auto!important;
  margin:0!important;
  padding:12px!important;
  border-radius:14px!important;
  border:1px solid #cbd5e1!important;
  background:#fff!important;
  box-shadow:0 24px 70px rgba(15,23,42,.28)!important;
  overflow:hidden!important;
}
body.master-report-dynamic-focus #masterReportDynamicDataHead{
  flex:0 0 auto!important;
  margin-bottom:8px!important;
  padding:0!important;
  align-items:center!important;
}
body.master-report-dynamic-focus #masterReportDynamicDataHead h2{
  font-size:18px!important;
  line-height:1.2!important;
}
body.master-report-dynamic-focus #masterReportDynamicDataHead .muted-note{
  max-width:72vw!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}
body.master-report-dynamic-focus #allJobTableContainer.master-report-smart-wrap,
body.master-report-dynamic-focus #allJobTableContainer.is-focus-scroll-owner{
  flex:1 1 auto!important;
  min-height:0!important;
  height:auto!important;
  max-height:none!important;
  overflow:auto!important;
  border-radius:12px!important;
  border:1px solid #cbd5e1!important;
  box-shadow:none!important;
}
body.master-report-dynamic-focus #allJobTableContainer.report-empty{
  flex:1 1 auto!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:260px!important;
}
body.master-report-dynamic-focus #masterReportAllJobTable{
  min-width:max-content!important;
}
body.master-report-dynamic-focus #masterReportAllJobTable thead th{
  top:0!important;
  z-index:20!important;
}
body.master-report-dynamic-focus #masterReportAllJobTable thead .mr-freeze-col{
  z-index:30!important;
}
body.master-report-dynamic-focus #masterReportAllJobTable .mr-freeze-col{
  z-index:15!important;
}
body.master-report-dynamic-focus #reportPagination{
  flex:0 0 auto!important;
  margin-top:8px!important;
  padding-top:4px!important;
}
body.master-report-dynamic-focus #mapWrap,
body.master-report-dynamic-focus #reportStatus{
  display:none!important;
}
body.master-report-dynamic-focus #focusDynamicJobDataBtn{
  background:#ef4444!important;
  color:#fff!important;
  border-color:#ef4444!important;
}
body.master-report-dynamic-focus .mr-excel-filter-menu{
  z-index:2147482600!important;
}

/* DISCUSSION_CHAT_PHASE1_PRIVATE_ONLINE_START */
.discussion-users-panel{
  margin:10px 0 14px;
  padding:12px;
  border:1px solid rgba(148,163,184,.28);
  border-radius:18px;
  background:linear-gradient(180deg,#f8fbff,#ffffff);
  box-shadow:0 12px 28px rgba(15,23,42,.06);
}
.discussion-users-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:8px;}
.discussion-users-head h3{margin:0;font-size:14px;font-weight:900;color:#0f172a;}
.discussion-users-head .small{margin:2px 0 0;line-height:1.25;}
.discussion-online-count{font-size:11px;font-weight:900;color:#047857;background:#d1fae5;border:1px solid rgba(16,185,129,.28);border-radius:999px;padding:5px 8px;white-space:nowrap;}
.discussion-user-list{display:flex;flex-direction:column;gap:7px;max-height:260px;overflow:auto;margin-top:10px;padding-right:2px;}
.discussion-user-item{width:100%;border:1px solid rgba(148,163,184,.22);background:#fff;border-radius:14px;padding:8px;display:grid;grid-template-columns:34px minmax(0,1fr) auto;gap:9px;align-items:center;text-align:left;cursor:pointer;transition:.15s ease;color:#0f172a;}
.discussion-user-item:hover{transform:translateY(-1px);border-color:rgba(37,99,235,.38);box-shadow:0 10px 22px rgba(37,99,235,.12);}
.discussion-user-item.online{background:linear-gradient(90deg,#ecfdf5,#ffffff);}
.discussion-user-avatar{width:34px;height:34px;border-radius:13px;background:#e0e7ff;color:#3730a3;font-weight:900;font-size:11px;display:flex;align-items:center;justify-content:center;position:relative;box-shadow:inset 0 0 0 1px rgba(99,102,241,.18);}
.discussion-user-avatar i{position:absolute;right:-1px;bottom:-1px;width:10px;height:10px;border-radius:999px;border:2px solid #fff;background:#94a3b8;}
.discussion-user-item.online .discussion-user-avatar i{background:#22c55e;}
.discussion-user-main{min-width:0;display:flex;flex-direction:column;gap:2px;}
.discussion-user-main strong{font-size:12px;font-weight:900;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.discussion-user-main em{font-size:10px;font-style:normal;color:#64748b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.discussion-user-state{font-size:10px;font-weight:900;color:#64748b;background:#f1f5f9;border-radius:999px;padding:4px 6px;}
.discussion-user-item.online .discussion-user-state{color:#047857;background:#d1fae5;}
.discussion-room-item.private-chat .discussion-room-item__top strong::before{content:"💬 ";font-size:12px;}
/* DISCUSSION_CHAT_PHASE1_PRIVATE_ONLINE_END */

/* DISCUSSION_CHAT_PHASE2_UI_CLEANUP_START */
.discussion-room-list-panel{
  display:flex;
  flex-direction:column;
  gap:12px;
  overflow:hidden;
}
.discussion-left-title{margin-bottom:2px!important;}
.discussion-left-title h2{font-size:18px!important;}
.discussion-global-search{flex:0 0 auto;}
.discussion-sidebar-section{
  border:1px solid rgba(148,163,184,.26);
  background:linear-gradient(180deg,#ffffff,#f8fafc);
  border-radius:18px;
  padding:10px;
  box-shadow:0 10px 22px rgba(15,23,42,.045);
  min-height:0;
}
.discussion-section-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  margin-bottom:8px;
}
.discussion-section-head.compact{align-items:center;margin-bottom:7px;}
.discussion-section-head h3{
  margin:0;
  font-size:12px;
  font-weight:950;
  color:#0f172a;
  text-transform:uppercase;
  letter-spacing:.045em;
}
.discussion-section-head .small{margin:2px 0 0;line-height:1.25;}
.discussion-section-count{
  min-width:22px;
  height:22px;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 7px;
  font-size:11px;
  font-weight:950;
  color:#334155;
  background:#eef2ff;
  border:1px solid rgba(99,102,241,.20);
}
.discussion-users-panel{
  margin:0!important;
  padding:10px!important;
  box-shadow:0 10px 22px rgba(15,23,42,.045)!important;
}
.discussion-users-head{display:none!important;}
.discussion-online-count{font-size:10px!important;}
.discussion-compact-list{
  margin-top:6px!important;
  padding-right:3px;
  overflow:auto;
}
.discussion-user-list.discussion-compact-list{
  max-height:176px!important;
  gap:5px!important;
}
.discussion-room-list.discussion-compact-list{
  max-height:190px!important;
  gap:5px!important;
  display:flex;
  flex-direction:column;
}
.discussion-channel-list.discussion-compact-list{max-height:220px!important;}
.discussion-room-item-compact{
  width:100%;
  border:1px solid rgba(148,163,184,.22);
  background:#fff;
  border-radius:13px;
  padding:8px;
  text-align:left;
  cursor:pointer;
  display:grid;
  grid-template-columns:30px minmax(0,1fr);
  gap:8px;
  align-items:center;
  box-shadow:none!important;
  transform:none!important;
}
.discussion-room-item-compact:hover{
  border-color:rgba(37,99,235,.42);
  background:#f8fbff;
  box-shadow:0 8px 18px rgba(37,99,235,.10)!important;
}
.discussion-room-item-compact.active{
  border-color:#2563eb!important;
  background:#eff6ff!important;
  box-shadow:inset 3px 0 0 #2563eb, 0 8px 18px rgba(37,99,235,.12)!important;
}
.discussion-room-icon{
  width:30px;
  height:30px;
  border-radius:11px;
  background:#eef2ff;
  color:#3730a3;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:13px;
  font-weight:900;
}
.discussion-room-item-compact.private-chat .discussion-room-icon{background:#ecfeff;color:#0e7490;}
.discussion-room-item-compact.team-group-chat .discussion-room-icon{background:#ecfdf5;color:#047857;}
.discussion-room-main{min-width:0;display:flex;flex-direction:column;gap:2px;}
.discussion-room-title{display:flex;align-items:center;justify-content:space-between;gap:6px;min-width:0;}
.discussion-room-title strong{font-size:12px;font-weight:950;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.discussion-room-sub,.discussion-room-meta-line{
  display:block;
  font-size:10.5px;
  color:#64748b;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  line-height:1.25;
}
.discussion-room-meta-line{color:#94a3b8;font-size:10px;}
.discussion-badge.dm{background:#cffafe;color:#0e7490;}
.discussion-badge.team{background:#d1fae5;color:#047857;}
.discussion-room-item.private-chat .discussion-room-item__top strong::before{content:""!important;}
.discussion-room-item-compact p,.discussion-room-item-compact .discussion-room-item__meta,.discussion-room-item-compact .discussion-room-item__top{display:none!important;}
.discussion-user-item{
  border-radius:12px!important;
  padding:7px!important;
  grid-template-columns:30px minmax(0,1fr) auto!important;
  gap:7px!important;
  box-shadow:none!important;
}
.discussion-user-avatar{width:30px!important;height:30px!important;border-radius:11px!important;font-size:10px!important;}
.discussion-user-main strong{font-size:11.5px!important;}
.discussion-user-main em{font-size:10px!important;}
.discussion-user-state{font-size:9.5px!important;padding:3px 5px!important;}
.discussion-dm-list .empty-state.compact,
.discussion-team-list .empty-state.compact,
.discussion-channel-list .empty-state.compact{padding:10px;font-size:11px;}
@media (max-width:1200px){
  .discussion-room-list.discussion-compact-list{max-height:160px!important;}
  .discussion-user-list.discussion-compact-list{max-height:150px!important;}
}
/* DISCUSSION_CHAT_PHASE2_UI_CLEANUP_END */

/* DISCUSSION_TEAM_MEMBERSHIP_PHASE3A_START */
.discussion-auto-team-row{
  display:flex !important;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border:1px solid rgba(37,99,235,.16);
  background:linear-gradient(180deg,#f8fbff,#ffffff);
  border-radius:14px;
  font-size:12px;
  font-weight:800;
  color:#334155;
}
.discussion-auto-team-row input[type="checkbox"]{
  width:16px !important;
  height:16px !important;
  min-width:16px !important;
  accent-color:#2563eb;
}
.discussion-auto-team-row.hidden{ display:none !important; }
.discussion-member-row.is-auto{
  background:linear-gradient(90deg,#eff6ff,#ffffff);
  border-color:rgba(37,99,235,.20);
}
.discussion-member-source{
  display:inline-flex;
  align-items:center;
  margin-left:6px;
  padding:2px 7px;
  border-radius:999px;
  font-size:10px;
  font-weight:900;
  letter-spacing:.02em;
  vertical-align:middle;
}
.discussion-member-source.auto{ background:#dbeafe; color:#1d4ed8; }
.discussion-member-source.manual{ background:#dcfce7; color:#15803d; }
.discussion-member-source.owner{ background:#fef3c7; color:#92400e; }
.discussion-member-hint{
  margin-top:3px;
  font-size:10.5px;
  line-height:1.35;
  color:#64748b;
}
.discussion-room-item.team-group-chat .discussion-room-icon{
  background:#ecfdf5;
  color:#047857;
}
.discussion-badge.team{ background:#dcfce7; color:#047857; }
/* DISCUSSION_TEAM_MEMBERSHIP_PHASE3A_END */

/* DISCUSSION_EMOJI_PHASE1_START */
.discussion-compose-input-wrap{
  position:relative;
  flex:1;
  display:flex;
  min-width:0;
}
.discussion-compose-input-wrap textarea{
  width:100%;
}
.discussion-emoji-btn{
  min-width:44px;
  height:44px;
  padding:0 10px;
  font-size:20px;
  line-height:1;
  border-radius:14px;
  background:#fff;
}
.discussion-emoji-btn:disabled{
  opacity:.55;
  cursor:not-allowed;
}
.discussion-emoji-picker{
  position:absolute;
  left:0;
  bottom:calc(100% + 10px);
  width:min(360px, calc(100vw - 56px));
  max-height:320px;
  overflow:auto;
  background:#fff;
  border:1px solid rgba(148,163,184,.34);
  border-radius:18px;
  box-shadow:0 24px 70px rgba(15,23,42,.18);
  padding:12px;
  z-index:80;
  display:none;
}
.discussion-emoji-picker.open{display:block;}
.discussion-emoji-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:2px 4px 10px;
  border-bottom:1px solid rgba(148,163,184,.18);
  margin-bottom:10px;
}
.discussion-emoji-head strong{
  color:#0f172a;
  font-size:13px;
  font-weight:900;
}
.discussion-emoji-head span{
  color:#64748b;
  font-size:11px;
  font-weight:700;
}
.discussion-emoji-grid{
  display:grid;
  grid-template-columns:repeat(8, minmax(30px, 1fr));
  gap:6px;
}
.discussion-emoji-option{
  width:36px;
  height:36px;
  border:1px solid transparent;
  background:#f8fafc;
  border-radius:12px;
  cursor:pointer;
  font-size:20px;
  line-height:1;
  display:flex;
  align-items:center;
  justify-content:center;
  transition:transform .12s ease, border-color .12s ease, background .12s ease;
}
.discussion-emoji-option:hover{
  transform:translateY(-1px) scale(1.07);
  border-color:rgba(37,99,235,.28);
  background:#eff6ff;
}
.discussion-message-body .dr-emoji-animated{
  font-size:1.24em;
  vertical-align:-.08em;
}
.dr-emoji-animated{
  display:inline-block;
  transform-origin:center;
  will-change:transform, opacity;
}
.dr-emoji-bounce{animation:drEmojiBounce 1.25s ease-in-out infinite;}
.dr-emoji-pulse{animation:drEmojiPulse 1.3s ease-in-out infinite;}
.dr-emoji-pop{animation:drEmojiPop 1.15s ease-in-out infinite;}
.dr-emoji-heart{animation:drEmojiHeart 1.2s ease-in-out infinite;}
.dr-emoji-wiggle{animation:drEmojiWiggle 1.1s ease-in-out infinite;}
.dr-emoji-clap{animation:drEmojiClap 1.25s ease-in-out infinite;}
.dr-emoji-fly{animation:drEmojiFly 1.4s ease-in-out infinite;}
.dr-emoji-twinkle{animation:drEmojiTwinkle 1.35s ease-in-out infinite;}
@keyframes drEmojiBounce{0%,100%{transform:translateY(0)}50%{transform:translateY(-3px)}}
@keyframes drEmojiPulse{0%,100%{transform:scale(1)}50%{transform:scale(1.16)}}
@keyframes drEmojiPop{0%,100%{transform:scale(1)}45%{transform:scale(1.22)}70%{transform:scale(.98)}}
@keyframes drEmojiHeart{0%,100%{transform:scale(1)}35%{transform:scale(1.18)}60%{transform:scale(1.04)}}
@keyframes drEmojiWiggle{0%,100%{transform:rotate(0deg)}25%{transform:rotate(-8deg)}75%{transform:rotate(8deg)}}
@keyframes drEmojiClap{0%,100%{transform:rotate(0deg) scale(1)}45%{transform:rotate(-10deg) scale(1.12)}70%{transform:rotate(8deg) scale(1.04)}}
@keyframes drEmojiFly{0%,100%{transform:translate(0,0) rotate(0deg)}50%{transform:translate(3px,-4px) rotate(8deg)}}
@keyframes drEmojiTwinkle{0%,100%{opacity:1;transform:scale(1) rotate(0deg)}50%{opacity:.72;transform:scale(1.18) rotate(10deg)}}
@media (prefers-reduced-motion: reduce){
  .dr-emoji-animated{animation:none!important;}
}
@media (max-width:820px){
  .discussion-compose-input-wrap{width:100%;}
  .discussion-emoji-picker{left:0;right:auto;bottom:calc(100% + 8px);}
  .discussion-emoji-grid{grid-template-columns:repeat(7, minmax(30px, 1fr));}
}
/* DISCUSSION_EMOJI_PHASE1_END */

/* DISCUSSION_ROOM_MAXIMIZE_SPACE_FIX_START
   Keep Discussion Room compact and make the chat/table workspace use all available height.
   This fixes the large blank area below the composer and makes the left/right panels scroll internally.
*/
body.discussion-discord-mode{
  overflow:hidden;
}
body.discussion-discord-mode .content{
  min-height:100vh;
  overflow:hidden;
}
body.discussion-discord-mode .main{
  height:calc(100vh - 76px);
  overflow:hidden;
  padding:14px 18px 16px !important;
}
body.discussion-discord-mode .discussion-room-page{
  height:100%;
  min-height:0;
  display:flex;
  flex-direction:column;
  gap:10px;
}
body.discussion-discord-mode .discussion-hero{
  display:none !important;
}
body.discussion-discord-mode .discussion-layout{
  flex:1 1 auto;
  min-height:0 !important;
  height:100%;
  grid-template-columns:minmax(230px,282px) minmax(520px,1fr) minmax(235px,292px);
  gap:12px;
  align-items:stretch;
}
body.discussion-discord-mode .discussion-room-list-panel,
body.discussion-discord-mode .discussion-chat-panel,
body.discussion-discord-mode .discussion-detail-panel{
  height:100%;
  min-height:0 !important;
  overflow:hidden;
}
body.discussion-discord-mode .discussion-room-list-panel{
  padding:12px !important;
  gap:8px !important;
}
body.discussion-discord-mode .discussion-left-title{
  display:none !important;
}
body.discussion-discord-mode .discussion-global-search{
  min-height:38px;
}
body.discussion-discord-mode .discussion-sidebar-section{
  padding:8px !important;
  border-radius:15px !important;
}
body.discussion-discord-mode .discussion-users-panel{
  flex:0 0 auto;
}
body.discussion-discord-mode .discussion-room-list-panel .discussion-sidebar-section:not(.discussion-users-panel){
  flex:0 1 auto;
}
body.discussion-discord-mode .discussion-room-list-panel .discussion-sidebar-section:last-child{
  flex:1 1 auto;
  min-height:0;
  display:flex;
  flex-direction:column;
}
body.discussion-discord-mode .discussion-channel-list.discussion-compact-list,
body.discussion-discord-mode .discussion-room-list.discussion-compact-list,
body.discussion-discord-mode .discussion-user-list.discussion-compact-list{
  max-height:none !important;
}
body.discussion-discord-mode .discussion-channel-list.discussion-compact-list{
  flex:1 1 auto;
  min-height:0;
}
body.discussion-discord-mode .discussion-section-head{
  margin-bottom:6px !important;
}
body.discussion-discord-mode .discussion-chat-panel{
  display:flex !important;
  flex-direction:column !important;
}
body.discussion-discord-mode .discussion-chat-head{
  flex:0 0 auto;
  padding:12px 14px !important;
}
body.discussion-discord-mode .discussion-messages{
  flex:1 1 auto !important;
  min-height:0 !important;
  max-height:none !important;
  height:auto !important;
  overflow:auto !important;
  padding:14px 16px !important;
}
body.discussion-discord-mode .discussion-messages > .empty-state{
  min-height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
}
body.discussion-discord-mode .discussion-typing,
body.discussion-discord-mode .discussion-attachment-preview,
body.discussion-discord-mode .discussion-screen-stage{
  flex:0 0 auto;
}
body.discussion-discord-mode .discussion-compose{
  flex:0 0 auto;
  padding:10px 12px !important;
  gap:8px !important;
}
body.discussion-discord-mode .discussion-compose textarea{
  min-height:44px !important;
  max-height:110px !important;
  resize:none !important;
}
body.discussion-discord-mode .discussion-attach-btn,
body.discussion-discord-mode .discussion-emoji-btn,
body.discussion-discord-mode #drSendBtn{
  align-self:center;
}
body.discussion-discord-mode .discussion-detail-panel{
  overflow:auto !important;
  padding:12px !important;
}
body.discussion-discord-mode .discussion-next-card{
  display:none !important;
}
@media (max-width:1200px){
  body.discussion-discord-mode{overflow:auto;}
  body.discussion-discord-mode .main{height:auto;min-height:calc(100vh - 76px);overflow:visible;}
  body.discussion-discord-mode .discussion-layout{height:auto;grid-template-columns:280px minmax(0,1fr);}  
  body.discussion-discord-mode .discussion-room-list-panel,
  body.discussion-discord-mode .discussion-chat-panel,
  body.discussion-discord-mode .discussion-detail-panel{height:auto;min-height:420px;}
  body.discussion-discord-mode .discussion-detail-panel{grid-column:1 / -1;}
}
@media (max-width:820px){
  body.discussion-discord-mode .discussion-layout{grid-template-columns:1fr;}
  body.discussion-discord-mode .discussion-chat-panel{min-height:70vh;}
}
/* DISCUSSION_ROOM_MAXIMIZE_SPACE_FIX_END */

/* DISCUSSION_DISCORD_LAYOUT_PHASE3B_START
   Discord-style conversation navigation: team rail + scrollable channel/DM panel + fixed chat workspace.
   This is UI-only and keeps the existing Socket.IO/chat logic intact.
*/
body.discussion-discord-mode .discussion-layout.discussion-discord-shell{
  display:grid !important;
  grid-template-columns:72px minmax(230px,320px) minmax(520px,1fr) minmax(250px,300px) !important;
  gap:10px !important;
  height:100% !important;
  min-height:0 !important;
  align-items:stretch !important;
}
body.discussion-discord-mode .discussion-server-rail{
  height:100% !important;
  min-height:0 !important;
  overflow:hidden !important;
  padding:10px 7px !important;
  border-radius:18px !important;
  display:flex !important;
  flex-direction:column !important;
  gap:8px !important;
  align-items:center !important;
  background:linear-gradient(180deg,#0f172a,#111827) !important;
  border:1px solid rgba(15,23,42,.18) !important;
  box-shadow:0 14px 34px rgba(15,23,42,.16) !important;
}
body.discussion-discord-mode .discussion-team-rail-list{
  width:100%;
  min-height:0;
  flex:1 1 auto;
  overflow:auto;
  display:flex;
  flex-direction:column;
  gap:8px;
  padding:0 2px 2px;
  scrollbar-width:thin;
}
body.discussion-discord-mode .discussion-team-rail-list::-webkit-scrollbar{width:8px;}
body.discussion-discord-mode .discussion-team-rail-list::-webkit-scrollbar-thumb{background:rgba(148,163,184,.48);border-radius:999px;}
body.discussion-discord-mode .discussion-rail-item{
  width:54px;
  min-height:52px;
  border:0;
  border-radius:17px;
  background:rgba(255,255,255,.08);
  color:#e2e8f0;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:3px;
  cursor:pointer;
  position:relative;
  transition:background .16s ease, border-radius .16s ease, transform .16s ease, color .16s ease;
}
body.discussion-discord-mode .discussion-rail-item:hover{
  transform:translateY(-1px);
  background:rgba(37,99,235,.82);
  color:#fff;
  border-radius:15px;
}
body.discussion-discord-mode .discussion-rail-item.active{
  background:#2563eb;
  color:#fff;
  border-radius:14px;
  box-shadow:0 12px 24px rgba(37,99,235,.32);
}
body.discussion-discord-mode .discussion-rail-item.active::before{
  content:"";
  position:absolute;
  left:-7px;
  top:12px;
  width:4px;
  height:28px;
  border-radius:0 999px 999px 0;
  background:#fff;
}
body.discussion-discord-mode .discussion-rail-icon{
  width:30px;
  height:24px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:15px;
  font-weight:950;
  line-height:1;
}
body.discussion-discord-mode .discussion-rail-label{
  width:100%;
  max-width:50px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  text-align:center;
  font-size:9px;
  font-weight:900;
  line-height:1.1;
  letter-spacing:.01em;
}
body.discussion-discord-mode .discussion-rail-count{
  position:absolute;
  right:-2px;
  top:-2px;
  min-width:17px;
  height:17px;
  border-radius:999px;
  background:#ef4444;
  color:#fff;
  border:2px solid #111827;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:9px;
  font-weight:950;
  padding:0 4px;
}
body.discussion-discord-mode .discussion-rail-divider{
  width:36px;
  height:1px;
  background:rgba(226,232,240,.22);
  margin:1px 0;
}
body.discussion-discord-mode .discussion-rail-empty{
  color:#94a3b8;
  font-size:9px;
  font-weight:900;
  text-align:center;
  line-height:1.2;
  padding:8px 2px;
}
body.discussion-discord-mode .discussion-room-list-panel{
  height:100% !important;
  min-height:0 !important;
  overflow:hidden !important;
  display:flex !important;
  flex-direction:column !important;
  padding:10px !important;
  gap:8px !important;
}
body.discussion-discord-mode .discussion-left-title{
  display:block !important;
  flex:0 0 auto;
  padding:4px 3px 2px;
}
body.discussion-discord-mode .discussion-left-title h2{
  font-size:15px !important;
  line-height:1.12 !important;
  margin:0 0 3px !important;
}
body.discussion-discord-mode .discussion-left-title .small{
  font-size:10.5px !important;
  line-height:1.22 !important;
  margin:0 !important;
}
body.discussion-discord-mode .discussion-global-search{
  flex:0 0 auto;
  height:36px !important;
  min-height:36px !important;
}
body.discussion-discord-mode .discussion-sidebar-section.hidden{
  display:none !important;
}
body.discussion-discord-mode .discussion-sidebar-section{
  flex:0 0 auto;
  min-height:0;
}
body.discussion-discord-mode .discussion-users-panel{
  max-height:34%;
  display:flex !important;
  flex-direction:column !important;
}
body.discussion-discord-mode .discussion-users-panel.hidden{display:none !important;}
body.discussion-discord-mode .discussion-users-panel #drUserSearch{
  flex:0 0 auto;
}
body.discussion-discord-mode .discussion-user-list.discussion-compact-list{
  flex:1 1 auto;
  min-height:0;
  overflow:auto;
}
body.discussion-discord-mode .discussion-room-list-panel .discussion-sidebar-section:not(.hidden){
  display:flex;
  flex-direction:column;
}
body.discussion-discord-mode .discussion-room-list-panel .discussion-sidebar-section:not(.discussion-users-panel){
  flex:1 1 0;
  min-height:110px;
}
body.discussion-discord-mode .discussion-room-list.discussion-compact-list,
body.discussion-discord-mode .discussion-channel-list.discussion-compact-list{
  flex:1 1 auto !important;
  min-height:0 !important;
  max-height:none !important;
  overflow:auto !important;
  padding-bottom:4px;
  scrollbar-width:thin;
}
body.discussion-discord-mode .discussion-room-list.discussion-compact-list::-webkit-scrollbar,
body.discussion-discord-mode .discussion-user-list.discussion-compact-list::-webkit-scrollbar,
body.discussion-discord-mode .discussion-channel-list.discussion-compact-list::-webkit-scrollbar{
  width:9px;
}
body.discussion-discord-mode .discussion-room-list.discussion-compact-list::-webkit-scrollbar-thumb,
body.discussion-discord-mode .discussion-user-list.discussion-compact-list::-webkit-scrollbar-thumb,
body.discussion-discord-mode .discussion-channel-list.discussion-compact-list::-webkit-scrollbar-thumb{
  background:#cbd5e1;
  border-radius:999px;
  border:2px solid #f8fafc;
}
body.discussion-discord-mode .discussion-channel-panel{
  flex:1 1 auto;
  min-height:0;
  display:flex;
  flex-direction:column;
  margin-top:8px;
  overflow:hidden;
}
body.discussion-discord-mode .discussion-channel-panel .discussion-channel-list{
  flex:1 1 auto;
  min-height:0;
  overflow:auto;
  padding-right:3px;
}
body.discussion-discord-mode .discussion-chat-panel{
  height:100% !important;
  min-width:0 !important;
}
body.discussion-discord-mode .discussion-detail-panel{
  height:100% !important;
  min-height:0 !important;
  overflow:auto !important;
}
@media (max-width:1380px){
  body.discussion-discord-mode .discussion-layout.discussion-discord-shell{
    grid-template-columns:68px minmax(220px,292px) minmax(420px,1fr) minmax(220px,270px) !important;
    gap:9px !important;
  }
}
@media (max-width:1180px){
  body.discussion-discord-mode{overflow:auto !important;}
  body.discussion-discord-mode .main{height:auto !important;min-height:calc(100vh - 76px) !important;overflow:visible !important;}
  body.discussion-discord-mode .discussion-layout.discussion-discord-shell{
    grid-template-columns:68px minmax(230px,310px) minmax(0,1fr) !important;
    height:calc(100vh - 110px) !important;
  }
  body.discussion-discord-mode .discussion-detail-panel{display:none !important;}
}
@media (max-width:820px){
  body.discussion-discord-mode .discussion-layout.discussion-discord-shell{
    grid-template-columns:58px minmax(190px,250px) minmax(360px,1fr) !important;
    overflow:auto;
  }
  body.discussion-discord-mode .discussion-rail-item{width:44px;min-height:44px;border-radius:14px;}
  body.discussion-discord-mode .discussion-rail-label{display:none;}
}
/* DISCUSSION_DISCORD_LAYOUT_PHASE3B_END */

/* DISCUSSION_CHANNEL_TREE_PHASE3C_START
   Compact Discord-like channel tree for team mode.
   UI-only: keeps existing room/channel/socket logic intact.
*/
body.discussion-discord-mode .discussion-channel-panel.hidden{
  display:none !important;
}
body.discussion-discord-mode .discussion-channel-panel{
  border:1px solid rgba(148,163,184,.26) !important;
  background:linear-gradient(180deg,#ffffff,#f8fafc) !important;
  border-radius:16px !important;
  padding:8px !important;
  margin-top:0 !important;
  min-height:0 !important;
  flex:1 1 auto !important;
  overflow:hidden !important;
  box-shadow:0 10px 22px rgba(15,23,42,.045) !important;
}
body.discussion-discord-mode .discussion-channel-tree{
  height:100%;
  min-height:0;
  display:flex;
  flex-direction:column;
  gap:8px;
}
body.discussion-discord-mode .discussion-channel-tree-title{
  flex:0 0 auto;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  padding:3px 2px 7px;
  border-bottom:1px solid rgba(148,163,184,.18);
}
body.discussion-discord-mode .discussion-channel-tree-title strong{
  display:block;
  font-size:12px;
  font-weight:950;
  color:#0f172a;
  text-transform:uppercase;
  letter-spacing:.045em;
  line-height:1.15;
}
body.discussion-discord-mode .discussion-channel-tree-title span{
  display:block;
  margin-top:2px;
  font-size:10px;
  font-weight:700;
  color:#64748b;
  max-width:170px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
body.discussion-discord-mode .discussion-channel-tree-title .btn{
  min-height:28px !important;
  padding:6px 9px !important;
  border-radius:10px !important;
  font-size:11px !important;
}
body.discussion-discord-mode .discussion-channel-tree-scroll{
  flex:1 1 auto;
  min-height:0;
  overflow:auto;
  padding-right:3px;
  scrollbar-width:thin;
}
body.discussion-discord-mode .discussion-channel-tree-scroll::-webkit-scrollbar{width:9px;}
body.discussion-discord-mode .discussion-channel-tree-scroll::-webkit-scrollbar-thumb{
  background:#cbd5e1;
  border-radius:999px;
  border:2px solid #f8fafc;
}
body.discussion-discord-mode .discussion-channel-tree-section{
  margin:0 0 8px;
}
body.discussion-discord-mode .discussion-channel-tree-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  min-height:28px;
  padding:2px 0;
}
body.discussion-discord-mode .discussion-channel-collapse{
  border:0;
  background:transparent;
  color:#64748b;
  font-size:11px;
  font-weight:950;
  text-transform:uppercase;
  letter-spacing:.045em;
  display:inline-flex;
  align-items:center;
  gap:5px;
  cursor:pointer;
  padding:4px 5px;
  border-radius:8px;
  min-width:0;
}
body.discussion-discord-mode .discussion-channel-collapse:hover{
  color:#0f172a;
  background:#eef2ff;
}
body.discussion-discord-mode .discussion-channel-collapse span{
  font-size:10px;
  width:12px;
  display:inline-flex;
  justify-content:center;
}
body.discussion-discord-mode .discussion-channel-add-mini{
  width:24px;
  height:24px;
  border:1px solid rgba(148,163,184,.34);
  background:#fff;
  color:#334155;
  border-radius:8px;
  font-size:15px;
  font-weight:950;
  line-height:1;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
}
body.discussion-discord-mode .discussion-channel-add-mini:hover{
  border-color:#2563eb;
  background:#eff6ff;
  color:#1d4ed8;
}
body.discussion-discord-mode .discussion-channel-tree-list{
  display:flex;
  flex-direction:column;
  gap:2px;
}
body.discussion-discord-mode .discussion-channel-tree-section.is-collapsed .discussion-channel-tree-list{
  display:none;
}
body.discussion-discord-mode .discussion-channel-item.tree{
  border:0 !important;
  box-shadow:none !important;
  background:transparent !important;
  border-radius:8px !important;
  padding:7px 7px !important;
  min-height:30px;
  display:grid !important;
  grid-template-columns:18px minmax(0,1fr) auto !important;
  gap:7px !important;
  color:#475569 !important;
  transform:none !important;
}
body.discussion-discord-mode .discussion-channel-item.tree:hover{
  background:#eef2ff !important;
  color:#0f172a !important;
}
body.discussion-discord-mode .discussion-channel-item.tree.active{
  background:#dbeafe !important;
  color:#1d4ed8 !important;
  box-shadow:inset 3px 0 0 #2563eb !important;
}
body.discussion-discord-mode .discussion-channel-item.tree span{
  width:18px;
  font-size:13px;
  color:#64748b;
  text-align:center;
}
body.discussion-discord-mode .discussion-channel-item.tree strong{
  font-size:12px !important;
  font-weight:850 !important;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
body.discussion-discord-mode .discussion-channel-item.tree em{
  min-width:19px;
  height:19px;
  border-radius:999px;
  padding:0 6px !important;
  background:#e2e8f0 !important;
  color:#475569 !important;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:10px !important;
  font-weight:950 !important;
}
body.discussion-discord-mode .discussion-channel-item.tree.active em{
  background:#bfdbfe !important;
  color:#1d4ed8 !important;
}
body.discussion-discord-mode .discussion-channel-empty-row{
  padding:8px 10px;
  border:1px dashed rgba(148,163,184,.34);
  border-radius:10px;
  color:#94a3b8;
  font-size:11px;
  font-weight:800;
  background:#fff;
}
body.discussion-discord-mode .discussion-channel-tree-empty{
  height:100%;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  gap:4px;
  padding:16px;
  border:1px dashed rgba(148,163,184,.38);
  border-radius:14px;
  color:#64748b;
  background:#fff;
}
body.discussion-discord-mode .discussion-channel-tree-empty strong{
  font-size:13px;
  color:#0f172a;
}
body.discussion-discord-mode .discussion-channel-tree-empty span{
  font-size:11px;
  line-height:1.35;
}
body.discussion-discord-mode .discussion-room-list-panel[data-scope="team"] .discussion-users-panel,
body.discussion-discord-mode .discussion-room-list-panel[data-scope="team"] .discussion-dm-list,
body.discussion-discord-mode .discussion-room-list-panel[data-scope="team"] .discussion-team-list,
body.discussion-discord-mode .discussion-room-list-panel[data-scope="team"] #drRoomList{
  display:none !important;
}
@media (max-width:1200px){
  body.discussion-discord-mode .discussion-channel-tree-title span{max-width:130px;}
}
/* DISCUSSION_CHANNEL_TREE_PHASE3C_END */


/* DISCUSSION_CHANNEL_TREE_PHASE3D_VISIBLE_FIX_START
   Keep the dedicated channel tree visible in team mode. The old panel could be injected inside the hidden Channels section.
*/
body.discussion-discord-mode .discussion-room-list-panel > #drChannelPanel.discussion-channel-panel{
  display:flex;
}
body.discussion-discord-mode .discussion-room-list-panel > #drChannelPanel.discussion-channel-panel.hidden{
  display:none !important;
}
body.discussion-discord-mode .discussion-room-list-panel[data-scope="team"] > #drChannelPanel.discussion-channel-panel{
  flex:1 1 auto !important;
  min-height:0 !important;
}
body.discussion-discord-mode .discussion-room-list-panel[data-scope="team"] .discussion-channel-tree-scroll{
  min-height:0 !important;
  overflow:auto !important;
}
/* DISCUSSION_CHANNEL_TREE_PHASE3D_VISIBLE_FIX_END */


/* DISCUSSION_GROUP_CREATE_PHASE3E_START */
body.discussion-discord-mode .discussion-rail-create{
  border:1px dashed rgba(147,197,253,.55) !important;
  background:rgba(37,99,235,.10) !important;
}
body.discussion-discord-mode .discussion-rail-create:hover{
  background:rgba(37,99,235,.20) !important;
  border-color:rgba(59,130,246,.75) !important;
}
body.discussion-discord-mode .discussion-create-group-quick{
  padding:8px 10px;
  white-space:nowrap;
  border-radius:12px;
  font-size:11px;
  align-self:flex-start;
}
body.discussion-discord-mode .discussion-empty-team-card{
  margin:10px;
  border:1px dashed rgba(99,102,241,.35);
  background:linear-gradient(180deg,#f8fbff,#ffffff);
  border-radius:18px;
  padding:18px 14px;
  min-height:220px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:10px;
  text-align:center;
  box-shadow:0 12px 28px rgba(15,23,42,.06);
}
body.discussion-discord-mode .discussion-empty-team-icon{
  width:54px;
  height:54px;
  border-radius:18px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#eef2ff;
  color:#4338ca;
  font-size:26px;
  box-shadow:inset 0 0 0 1px rgba(99,102,241,.18);
}
body.discussion-discord-mode .discussion-empty-team-card h3{
  margin:2px 0 0;
  font-size:15px;
  color:#0f172a;
  letter-spacing:-.02em;
}
body.discussion-discord-mode .discussion-empty-team-card p{
  margin:0;
  color:#64748b;
  font-size:12px;
  line-height:1.45;
  max-width:260px;
}
body.discussion-discord-mode .discussion-empty-team-actions{
  display:flex;
  flex-direction:column;
  gap:8px;
  width:100%;
  max-width:220px;
  margin-top:4px;
}
body.discussion-discord-mode .discussion-empty-team-actions .btn{
  width:100%;
  justify-content:center;
}
body.discussion-discord-mode .discussion-channel-tree-empty-action{
  min-height:100%;
}
body.discussion-discord-mode .discussion-channel-empty-row{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:42px;
  border:1px dashed rgba(148,163,184,.35);
  border-radius:12px;
  margin:4px 0;
  font-size:11px;
}
/* DISCUSSION_GROUP_CREATE_PHASE3E_END */

/* DISCUSSION_CALL_RINGTONE_PHASE4_START */
.discussion-call-alert-btn{
  background: linear-gradient(135deg, #fff7ed, #ffedd5) !important;
  color: #9a3412 !important;
  border-color: rgba(251, 146, 60, .45) !important;
}
.discussion-call-alert-btn:hover{
  background: linear-gradient(135deg, #ffedd5, #fed7aa) !important;
  color: #7c2d12 !important;
}
/* DISCUSSION_CALL_RINGTONE_PHASE4_END */

/* DISCUSSION_PRIVATE_CALL_INVITE_PHASE4B_START */
.discussion-private-call-overlay{
  position:fixed; inset:0; z-index:9999; display:flex; align-items:flex-start; justify-content:center;
  padding-top:22px; pointer-events:none;
}
.discussion-private-call-card{
  pointer-events:auto; min-width:360px; max-width:min(480px,calc(100vw - 28px));
  display:flex; align-items:center; gap:14px; padding:14px 16px;
  border:1px solid rgba(148,163,184,.28); border-radius:20px;
  background:linear-gradient(135deg,rgba(15,23,42,.96),rgba(30,41,59,.94)); color:#fff;
  box-shadow:0 24px 70px rgba(15,23,42,.32);
}
.discussion-private-call-avatar{width:50px;height:50px;border-radius:18px;display:grid;place-items:center;background:rgba(34,197,94,.18);font-size:25px;animation:drCallPulse 1.15s ease-in-out infinite;}
.discussion-private-call-copy{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1;}
.discussion-private-call-copy span{font-size:11px;text-transform:uppercase;letter-spacing:.12em;color:#bae6fd;font-weight:900;}
.discussion-private-call-copy strong{font-size:17px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.discussion-private-call-copy small{color:#cbd5e1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.discussion-private-call-actions{display:flex;gap:8px;align-items:center;}
.discussion-private-call-inline{display:inline-flex;align-items:center;gap:6px;padding:7px 10px;border-radius:999px;background:rgba(59,130,246,.12);color:#1d4ed8;font-size:12px;font-weight:900;white-space:nowrap;}
.discussion-private-call-inline:before{content:"";width:8px;height:8px;border-radius:50%;background:#22c55e;box-shadow:0 0 0 0 rgba(34,197,94,.42);animation:drCallPulseDot 1s infinite;}
@keyframes drCallPulse{0%,100%{transform:scale(1)}50%{transform:scale(1.08)}}
@keyframes drCallPulseDot{0%{box-shadow:0 0 0 0 rgba(34,197,94,.42)}100%{box-shadow:0 0 0 9px rgba(34,197,94,0)}}
@media(max-width:720px){.discussion-private-call-card{min-width:0;align-items:flex-start;}.discussion-private-call-actions{flex-direction:column}.discussion-private-call-actions .btn{width:100%;}}
/* DISCUSSION_PRIVATE_CALL_INVITE_PHASE4B_END */

/* DISCUSSION_RICH_MEDIA_PHASE5: Discord-style GIF / sticker / emoji picker */
.discussion-media-picker{
  width:min(560px, calc(100vw - 72px)) !important;
  max-height:min(520px, 70vh) !important;
  padding:0 !important;
  overflow:hidden !important;
  border-radius:18px !important;
  box-shadow:0 28px 90px rgba(15,23,42,.24) !important;
}
.discussion-media-tabs{
  display:flex;
  align-items:center;
  gap:6px;
  padding:12px 12px 8px;
  border-bottom:1px solid rgba(148,163,184,.22);
  background:linear-gradient(180deg,#fff,#f8fafc);
}
.discussion-media-tab{
  border:0;
  background:transparent;
  color:#475569;
  font-weight:900;
  padding:8px 12px;
  border-radius:12px;
  cursor:pointer;
  transition:background .12s ease,color .12s ease,transform .12s ease;
}
.discussion-media-tab:hover{background:#eef2ff;color:#1d4ed8;transform:translateY(-1px);}
.discussion-media-tab.active{background:#334bf6;color:#fff;box-shadow:0 10px 24px rgba(51,75,246,.22);}
.discussion-media-search-wrap{
  margin:10px 12px;
  display:flex;
  align-items:center;
  gap:8px;
  border:1px solid rgba(148,163,184,.34);
  background:#f8fafc;
  border-radius:14px;
  padding:8px 10px;
}
.discussion-media-search-wrap span{color:#64748b;font-size:18px;line-height:1;}
.discussion-media-search{
  width:100%;
  border:0 !important;
  outline:none !important;
  background:transparent !important;
  font:inherit;
  color:#0f172a;
  padding:2px 0 !important;
  min-height:24px !important;
}
.discussion-media-panel{display:none;padding:0 12px 12px;max-height:360px;overflow:auto;}
.discussion-media-panel.active{display:block;}
.discussion-gif-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
.discussion-gif-option{
  position:relative;
  min-height:92px;
  border:1px solid rgba(148,163,184,.25);
  border-radius:16px;
  overflow:hidden;
  background:linear-gradient(135deg,#eef2ff,#dbeafe);
  cursor:pointer;
  box-shadow:0 12px 30px rgba(15,23,42,.08);
  transition:transform .15s ease,box-shadow .15s ease,border-color .15s ease;
}
.discussion-gif-option:hover{transform:translateY(-2px) scale(1.015);box-shadow:0 18px 36px rgba(15,23,42,.14);border-color:rgba(37,99,235,.35);}
.discussion-gif-option:before,
.discussion-gif-option:after{
  content:"";
  position:absolute;
  inset:auto auto -38px -22px;
  width:110px;
  height:110px;
  border-radius:999px;
  background:rgba(255,255,255,.35);
  animation:discussionGifFloat 3.6s ease-in-out infinite;
}
.discussion-gif-option:after{inset:-42px -26px auto auto;width:132px;height:132px;animation-delay:-1.2s;}
.discussion-gif-emoji{position:relative;z-index:1;display:block;font-size:34px;margin:14px 0 6px;animation:discussionStickerPop 1.8s ease-in-out infinite;text-shadow:0 8px 24px rgba(15,23,42,.16);}
.discussion-gif-label{position:relative;z-index:1;display:block;color:#0f172a;font-size:13px;font-weight:1000;letter-spacing:.04em;text-transform:uppercase;text-shadow:0 1px 0 rgba(255,255,255,.65);}
.discussion-gif-congrats{background:linear-gradient(135deg,#fef3c7,#fecaca,#ddd6fe);}
.discussion-gif-nice{background:linear-gradient(135deg,#dcfce7,#bfdbfe);}
.discussion-gif-thanks{background:linear-gradient(135deg,#fdf2f8,#e0f2fe);}
.discussion-gif-hello{background:linear-gradient(135deg,#f0f9ff,#ccfbf1);}
.discussion-gif-sorry{background:linear-gradient(135deg,#e0e7ff,#f1f5f9);}
.discussion-gif-onit,.discussion-gif-shipit{background:linear-gradient(135deg,#dbeafe,#c7d2fe,#bfdbfe);}
.discussion-gif-waiting,.discussion-gif-loading{background:linear-gradient(135deg,#f8fafc,#e2e8f0);}
.discussion-gif-approved{background:linear-gradient(135deg,#dcfce7,#bbf7d0);}
.discussion-gif-review{background:linear-gradient(135deg,#fef9c3,#fde68a);}
.discussion-gif-fire,.discussion-gif-alert{background:linear-gradient(135deg,#fee2e2,#fed7aa);}
.discussion-gif-party{background:linear-gradient(135deg,#fae8ff,#bfdbfe,#dcfce7);}
.discussion-gif-coffee{background:linear-gradient(135deg,#f5e6d3,#fef3c7);}
.discussion-gif-focus{background:linear-gradient(135deg,#e0f2fe,#f0fdf4);}
.discussion-sticker-grid{display:grid;grid-template-columns:repeat(4,minmax(72px,1fr));gap:10px;}
.discussion-sticker-option{
  min-height:94px;
  border:1px solid rgba(148,163,184,.25);
  border-radius:18px;
  background:#f8fafc;
  cursor:pointer;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:6px;
  transition:transform .15s ease,background .15s ease,border-color .15s ease;
}
.discussion-sticker-option:hover{background:#eef2ff;border-color:rgba(37,99,235,.32);transform:translateY(-2px);}
.discussion-sticker-emoji{font-size:34px;animation:discussionStickerPop 2s ease-in-out infinite;}
.discussion-sticker-label{font-size:11px;font-weight:1000;color:#334155;text-transform:uppercase;letter-spacing:.04em;}
.discussion-media-empty{grid-column:1/-1;border:1px dashed rgba(148,163,184,.5);border-radius:14px;padding:18px;text-align:center;color:#64748b;font-size:12px;font-weight:800;background:#f8fafc;}
.discussion-message-body .discussion-gif-message,
.discussion-message-body .discussion-sticker-message{
  display:inline-flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:6px;
  min-width:180px;
  min-height:110px;
  margin:4px 0;
  border-radius:18px;
  background:linear-gradient(135deg,#eef2ff,#dbeafe);
  border:1px solid rgba(148,163,184,.24);
  box-shadow:0 14px 34px rgba(15,23,42,.12);
  overflow:hidden;
  position:relative;
}
.discussion-message-body .discussion-sticker-message{min-width:128px;min-height:118px;background:#f8fafc;}
.discussion-message-body .discussion-gif-message:before,
.discussion-message-body .discussion-gif-message:after{
  content:"";position:absolute;border-radius:999px;background:rgba(255,255,255,.36);width:118px;height:118px;left:-36px;bottom:-46px;animation:discussionGifFloat 3.4s ease-in-out infinite;
}
.discussion-message-body .discussion-gif-message:after{left:auto;right:-40px;bottom:auto;top:-48px;animation-delay:-1.1s;}
.discussion-gif-message-emoji,.discussion-sticker-message-emoji{position:relative;z-index:1;font-size:42px;animation:discussionStickerPop 1.8s ease-in-out infinite;}
.discussion-gif-message-label,.discussion-sticker-message-label{position:relative;z-index:1;color:#0f172a;font-size:13px;font-weight:1000;letter-spacing:.05em;text-transform:uppercase;}
.discussion-message-body .discussion-gif-congrats{background:linear-gradient(135deg,#fef3c7,#fecaca,#ddd6fe);}
.discussion-message-body .discussion-gif-nice{background:linear-gradient(135deg,#dcfce7,#bfdbfe);}
.discussion-message-body .discussion-gif-thanks{background:linear-gradient(135deg,#fdf2f8,#e0f2fe);}
.discussion-message-body .discussion-gif-hello{background:linear-gradient(135deg,#f0f9ff,#ccfbf1);}
.discussion-message-body .discussion-gif-sorry{background:linear-gradient(135deg,#e0e7ff,#f1f5f9);}
.discussion-message-body .discussion-gif-onit,.discussion-message-body .discussion-gif-shipit{background:linear-gradient(135deg,#dbeafe,#c7d2fe,#bfdbfe);}
.discussion-message-body .discussion-gif-waiting,.discussion-message-body .discussion-gif-loading{background:linear-gradient(135deg,#f8fafc,#e2e8f0);}
.discussion-message-body .discussion-gif-approved{background:linear-gradient(135deg,#dcfce7,#bbf7d0);}
.discussion-message-body .discussion-gif-review{background:linear-gradient(135deg,#fef9c3,#fde68a);}
.discussion-message-body .discussion-gif-fire,.discussion-message-body .discussion-gif-alert{background:linear-gradient(135deg,#fee2e2,#fed7aa);}
.discussion-message-body .discussion-gif-party{background:linear-gradient(135deg,#fae8ff,#bfdbfe,#dcfce7);}
.discussion-message-body .discussion-gif-coffee{background:linear-gradient(135deg,#f5e6d3,#fef3c7);}
.discussion-message-body .discussion-gif-focus{background:linear-gradient(135deg,#e0f2fe,#f0fdf4);}
.discussion-media-token-missing{display:inline-block;padding:4px 8px;border-radius:999px;background:#f1f5f9;color:#64748b;font-size:12px;font-weight:800;}
@keyframes discussionGifFloat{0%,100%{transform:translate3d(0,0,0) scale(1);}50%{transform:translate3d(10px,-10px,0) scale(1.08);}}
@keyframes discussionStickerPop{0%,100%{transform:translateY(0) scale(1) rotate(0deg);}45%{transform:translateY(-4px) scale(1.08) rotate(-2deg);}70%{transform:translateY(0) scale(1.02) rotate(1deg);}}
@media (max-width:720px){
  .discussion-media-picker{width:min(420px, calc(100vw - 34px)) !important;}
  .discussion-gif-grid{grid-template-columns:1fr;}
  .discussion-sticker-grid{grid-template-columns:repeat(3,minmax(70px,1fr));}
}
