:root {
  --bo-ink: #15324b;
  --bo-muted: #637a8d;
  --bo-line: #d8e4ec;
  --bo-cyan: #087fa3;
  --bo-blue: #174f7c;
  --bo-bg: #f5f9fc;
}

.guided-home-legacy,
#view-dashboard .guided-more-actions,
#view-dashboard .advanced-workflow-details {
  display: none !important;
}

.bo-v2-home { display: grid; gap: 16px; }
.bo-v2-heading {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 22px 26px; color: #fff; border-radius: 16px;
  background: linear-gradient(118deg, #143f67 0%, #087f9d 72%, #2c9db6 100%);
  box-shadow: 0 12px 28px rgba(20, 63, 103, .17);
}
.bo-v2-heading h1 { margin: 3px 0 5px; font-size: 1.65rem; line-height: 1.2; }
.bo-v2-heading p { margin: 0; max-width: 900px; color: rgba(255,255,255,.86); font-size: .86rem; line-height: 1.65; }
.bo-v2-kicker { font-size: .68rem; font-weight: 800; letter-spacing: .13em; opacity: .74; }
.bo-v2-master-badge { flex: 0 0 auto; border: 1px solid rgba(255,255,255,.42); border-radius: 999px; padding: 7px 12px; font-size: .74rem; font-weight: 800; background: rgba(255,255,255,.1); }

.bo-v2-section { background: #fff; border: 1px solid var(--bo-line); border-radius: 14px; padding: 17px; box-shadow: 0 4px 14px rgba(15, 55, 82, .045); }
.bo-v2-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.bo-v2-section-head > div { display: flex; align-items: center; gap: 9px; }
.bo-v2-section-head > div > span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; color: var(--bo-cyan); background: #e9f7fb; font-size: .68rem; font-weight: 900; }
.bo-v2-section-head h2 { margin: 0; color: var(--bo-ink); font-size: 1rem; }
.bo-v2-section-head small { color: var(--bo-muted); font-size: .73rem; }
.bo-v2-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.bo-v2-action { position: relative; min-height: 86px; padding: 16px; text-align: left; border: 1px solid #d9e4ec; border-radius: 12px; background: #fafdff; color: var(--bo-ink); cursor: pointer; transition: .16s ease; }
.bo-v2-action::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; border-radius: 12px 0 0 12px; background: var(--bo-cyan); }
.bo-v2-action strong,.bo-v2-action span { display: block; }
.bo-v2-action strong { margin-bottom: 7px; font-size: .92rem; }
.bo-v2-action span { color: var(--bo-muted); font-size: .72rem; line-height: 1.45; }
.bo-v2-action:hover { transform: translateY(-2px); border-color: #78bfd2; box-shadow: 0 8px 18px rgba(8, 127, 163, .1); }
.bo-v2-action.primary { color:#fff; border-color:#116b8d; background: linear-gradient(135deg,#15527e,#087f9f); }
.bo-v2-action.primary span { color:rgba(255,255,255,.78); }
.bo-v2-action.primary::before { background:#f5cb4b; }
.bo-v2-action.change::before { background:#d97706; }
.bo-v2-action.successor::before { background:#7c3aed; }
.bo-v2-action.material::before { background:#0f9f78; }

.bo-v2-dashboard-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, .86fr); gap: 16px; }
.bo-v2-task-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 9px; }
.bo-v2-task-grid button { display:flex; align-items:center; justify-content:space-between; gap:8px; min-height:50px; padding:10px 12px; border:1px solid #e0e8ee; border-radius:10px; background:#f9fbfd; color:var(--bo-ink); cursor:pointer; }
.bo-v2-task-grid button:hover { border-color:#85c5d6; background:#f1fbfd; }
.bo-v2-task-grid span { font-size:.76rem; font-weight:700; }
.bo-v2-task-grid strong { display:grid; place-items:center; min-width:27px; height:27px; padding:0 7px; color:#075d7d; background:#dff3f8; border-radius:999px; }
.bo-v2-current { border-top: 3px solid #1686a5; }
.bo-v2-status { padding:5px 9px; border-radius:999px; color:#0c6582; background:#e4f5f9; font-size:.7rem; font-weight:800; }
.bo-v2-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px 14px; margin:0; }
.bo-v2-summary div { min-width:0; }
.bo-v2-summary dt { color:var(--bo-muted); font-size:.66rem; }
.bo-v2-summary dd { overflow:hidden; margin:3px 0 0; color:var(--bo-ink); font-size:.78rem; font-weight:800; white-space:nowrap; text-overflow:ellipsis; }
.bo-v2-progress { margin-top:13px; }
.bo-v2-progress > div { display:flex; justify-content:space-between; color:var(--bo-muted); font-size:.7rem; }
.bo-v2-progress progress { width:100%; height:8px; accent-color:var(--bo-cyan); }
.bo-v2-next { width:100%; margin-top:11px; padding:9px 12px; border:0; border-radius:9px; color:#fff; background:var(--bo-blue); font-weight:800; cursor:pointer; }
.bo-v2-next:disabled { color:#7b8f9e; background:#edf2f5; cursor:not-allowed; }
.bo-v2-link { border:0; background:transparent; color:#087493; font-size:.75rem; font-weight:800; cursor:pointer; }
.bo-v2-table-wrap { overflow:auto; }
.bo-v2-table { width:100%; min-width:1040px; border-collapse:collapse; }
.bo-v2-table th { padding:9px 10px; color:#60758a; background:#f5f8fa; border-bottom:1px solid #dce6ed; font-size:.69rem; text-align:left; white-space:nowrap; }
.bo-v2-table td { padding:10px; border-bottom:1px solid #e7edf2; color:#30475a; font-size:.74rem; }
.bo-v2-table tbody tr:hover { background:#f8fcfe; }
.bo-v2-empty { text-align:center; color:#8999a8 !important; padding:22px !important; }
.bo-v2-table .bo-open { border:0; border-radius:7px; padding:6px 10px; color:#fff; background:#175781; cursor:pointer; font-weight:700; }

#view-ecn .page-content { padding-bottom: 112px; }
.bo-v2-workspace-subtitle { margin:-12px 0 16px; color:#657b8d; font-size:.78rem; line-height:1.5; }
.bo-v2-step-nav { display:grid !important; grid-template-columns:repeat(6,minmax(0,1fr)); gap:7px; position:sticky; top:0; z-index:20; margin-bottom:14px; padding:8px; background:rgba(245,249,252,.94); border:1px solid #dae6ed; border-radius:12px; backdrop-filter:blur(8px); }
.bo-v2-step-nav button { min-height:46px; padding:7px 8px; border:1px solid #d8e3ea; border-radius:9px; background:#fff; color:#5f7486; cursor:pointer; font-size:.68rem; font-weight:800; line-height:1.35; }
.bo-v2-step-nav button span { display:block; color:#8aa0b0; font-size:.61rem; }
.bo-v2-step-nav button.active { color:#fff; border-color:#126f91; background:linear-gradient(135deg,#174f7c,#09819f); box-shadow:0 5px 12px rgba(14,111,145,.16); }
.bo-v2-step-nav button.active span { color:rgba(255,255,255,.7); }
.bo-v2-step-panel[hidden] { display:none !important; }
.bo-v2-card .card-header { background:linear-gradient(90deg,#edf8fb,#f8fbfd); }
.bo-v2-field-note { grid-column:1/-1; padding:10px 12px; color:#6b7f8f; background:#f6fafc; border:1px dashed #c9dce7; border-radius:8px; font-size:.73rem; line-height:1.55; }
.bo-v2-field-note.danger { color:#9a3412; background:#fff7ed; border-color:#fdba74; }
.bo-v2-subgrid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.bo-v2-subcard { padding:14px; border:1px solid #dce6ed; border-radius:10px; background:#fbfdfe; }
.bo-v2-subcard h4 { margin:0 0 11px; color:#174f70; font-size:.84rem; }
.bo-v2-departments { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; margin-bottom:12px; }
.bo-v2-department { display:flex; align-items:center; gap:8px; padding:10px; border:1px solid #dbe5eb; border-radius:9px; background:#fff; color:#29475d; font-size:.76rem; font-weight:800; cursor:pointer; }
.bo-v2-department:has(input:checked) { color:#075e7c; border-color:#69b9cd; background:#eefafd; }
.bo-v2-department input { accent-color:#087fa3; }
.bo-v2-suggestion { margin:0; padding:10px 12px; border-radius:8px; color:#496477; background:#f2f7fa; font-size:.72rem; }
.bo-v2-evaluation { margin-bottom:9px; border:1px solid #d8e4eb; border-radius:10px; background:#fbfdfe; }
.bo-v2-evaluation[hidden] { display:none; }
.bo-v2-evaluation summary { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 14px; color:#21465f; cursor:pointer; font-size:.8rem; font-weight:800; }
.bo-v2-evaluation summary strong { padding:4px 8px; border-radius:999px; color:#0b6b87; background:#e4f5f9; font-size:.66rem; }
.bo-v2-evaluation-body { padding:5px 14px 14px; border-top:1px solid #e4ebf0; }
.bo-v2-evaluation-permission,.bo-v2-final-permission { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:7px 0 12px; padding:9px 11px; border:1px solid #c8dde7; border-radius:8px; color:#31576c; background:#f0f8fb; font-size:.72rem; line-height:1.5; }
.bo-v2-evaluation-permission button,.bo-v2-final-permission button { flex:0 0 auto; padding:7px 10px; border:1px solid #0e7898; border-radius:7px; color:#fff; background:#0e7898; font:inherit; font-weight:800; cursor:pointer; }
.bo-v2-evaluation-readonly .form-grid { opacity:.68; }
.bo-v2-supervisor-confirm { display:flex; align-items:center; gap:8px; padding:10px; border:1px solid #cbdde7; border-radius:8px; color:#174f70; background:#eff8fb; font-size:.75rem; font-weight:800; }
.bo-v2-evaluation-actions { display:flex; justify-content:flex-end; gap:8px; margin-top:12px; }
.bo-v2-evaluation-actions button { padding:8px 12px; border:1px solid #bfcfd9; border-radius:7px; background:#fff; color:#29475d; font-weight:800; cursor:pointer; }
.bo-v2-evaluation-actions button.primary { color:#fff; border-color:#087a9c; background:#087a9c; }
.bo-v2-legacy-tools { margin-top:12px; padding:10px 12px; border:1px dashed #cad9e2; border-radius:9px; color:#617789; font-size:.74rem; }
.bo-v2-legacy-tools .approval-grid { margin-top:12px; }
.bo-not-applicable { opacity:.62; }
.bo-v2-final-summary { margin-top:14px; padding:14px; border:1px solid #cfe1ea; border-radius:10px; background:#f8fcfe; }
.bo-v2-final-summary h3 { margin:0 0 12px; color:#174f70; font-size:.9rem; }
.bo-v2-final-summary dl { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:11px 16px; margin:0; }
.bo-v2-final-summary dt { color:#6b7f8f; font-size:.65rem; }
.bo-v2-final-summary dd { margin:3px 0 0; color:#233f53; font-size:.74rem; font-weight:700; line-height:1.45; }
.bo-v2-relation-chain { display:flex; align-items:center; justify-content:center; gap:9px; grid-column:1/-1; padding:13px; color:#174f70; background:#edf8fb; border:1px solid #cce5ee; border-radius:9px; font-weight:800; font-size:.76rem; }
.bo-v2-relation-chain i { color:#8da4b3; font-style:normal; }

.bo-v2-bottom-bar { position:fixed; left:295px; right:0; bottom:0; z-index:80; padding:9px 22px 10px; border-top:1px solid #cbdbe5; background:rgba(255,255,255,.97); box-shadow:0 -8px 22px rgba(21,50,75,.1); backdrop-filter:blur(9px); }
.bo-v2-missing { overflow:hidden; margin-bottom:7px; color:#8d4a15; font-size:.7rem; white-space:nowrap; text-overflow:ellipsis; }
.bo-v2-bottom-actions { display:flex; justify-content:space-between; gap:12px; }
.bo-v2-bottom-actions > div { display:flex; gap:8px; }
.bo-v2-bottom-bar button { min-height:36px; padding:7px 13px; border:1px solid #cbd9e2; border-radius:8px; background:#fff; color:#29475d; font-size:.74rem; font-weight:800; cursor:pointer; }
.bo-v2-bottom-bar button.primary { color:#fff; border-color:#126d90; background:#126d90; }
.bo-v2-bottom-bar button.warning { color:#fff; border-color:#b45309; background:#b45309; }
.bo-v2-bottom-bar button:disabled { opacity:.45; cursor:not-allowed; }
.bo-mobile-menu,.bo-mobile-sidebar-backdrop { display:none; }

@media (max-width: 1100px) {
  .bo-v2-actions { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .bo-v2-dashboard-grid { grid-template-columns:1fr; }
  .bo-v2-step-nav { grid-template-columns:repeat(3,minmax(0,1fr)); position:static; }
  .bo-v2-bottom-bar { left:0; }
}
@media (max-width: 680px) {
  :root { --sidebar-w: 0px; }
  body { overflow-x:hidden; }
  .main-area { width:100%; min-width:0; margin-left:0; }
  .sidebar { width:min(82vw,300px); transform:translateX(-105%); transition:transform .2s ease; box-shadow:12px 0 30px rgba(7,32,54,.26); }
  body.bo-mobile-sidebar-open .sidebar { transform:translateX(0); }
  .bo-mobile-menu { display:grid; place-items:center; flex:0 0 auto; width:36px; height:36px; border:1px solid rgba(255,255,255,.18); border-radius:7px; color:#fff; background:rgba(255,255,255,.08); }
  .bo-mobile-sidebar-backdrop { position:fixed; inset:var(--topbar-h) 0 0; z-index:790; border:0; background:rgba(5,24,40,.48); }
  body.bo-mobile-sidebar-open .bo-mobile-sidebar-backdrop { display:block; }
  .topbar { padding:0 10px; gap:7px; }
  .tb-logo { gap:4px; padding-right:7px; border-right:0; }
  .tb-logo-title,.tb-logo .logo-badge,.tb-search,.tb-spacer,.tb-user,.tb-actions > .tb-divider,.tb-actions > .tb-btn:not(:first-of-type) { display:none; }
  .tb-actions { margin-left:auto; min-width:0; }
  .portal-auth-status { max-width:148px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
  .sub-header { height:auto; min-height:var(--subhdr-h); padding:8px 12px; gap:8px; }
  .breadcrumb { display:none; }
  .sub-hdr-actions > span { display:none; }
  .page-content { padding:14px 12px; }
  #view-ecn .page-content { padding-bottom:170px; }
  .bo-v2-heading { align-items:flex-start; padding:18px; }
  .bo-v2-heading h1 { font-size:1.3rem; }
  .bo-v2-master-badge { display:none; }
  .bo-v2-actions,.bo-v2-task-grid,.bo-v2-summary,.bo-v2-subgrid,.bo-v2-departments { grid-template-columns:1fr; }
  .bo-v2-final-summary dl { grid-template-columns:1fr; }
  .bo-v2-step-nav { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .bo-v2-bottom-bar { padding:8px 10px; }
  .bo-v2-bottom-actions { align-items:stretch; flex-direction:column; gap:6px; }
  .bo-v2-bottom-actions > div { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; }
  .bo-v2-bottom-bar button { width:100%; min-width:0; padding:7px 8px; }
  .bo-v2-evaluation-permission,.bo-v2-final-permission { align-items:stretch; flex-direction:column; }
  .bo-v2-evaluation-permission button,.bo-v2-final-permission button { width:100%; }
  .bo-v2-missing { white-space:normal; max-height:34px; line-height:1.35; }
  .work-order-main,.work-order-actions { min-width:0; }
  .work-order-actions { justify-content:flex-start; }
}
