/* SBM ONE v181 — approved dashboard visual system.
   Same information and permissions; denser, clearer presentation matching the approved previews. */

/* Shared shell for the five dashboard workspaces. */
body.dashboard-v181{background:#edf2f6}
body.dashboard-v181 .top{background:#071b2a;border-bottom:1px solid #28536f;color:#fff;padding:7px 16px;min-height:64px}
body.dashboard-v181 .top .brand img{width:54px;height:50px}
body.dashboard-v181 .top .brand b{color:#fff;font-size:17px;letter-spacing:.2px}
body.dashboard-v181 .top .brand span{color:#c9d8e5;font-size:11px}
body.dashboard-v181 .top .identity,body.dashboard-v181 .top .identity b{color:#fff}
body.dashboard-v181 .top .btn{background:#0e3048;color:#fff;border-color:#456d87}
body.dashboard-v181 .top .btn:hover{background:#174762}
body.dashboard-v181 .nav{top:64px;padding:0 14px;background:#0c2a40;border-bottom:1px solid #28536f;gap:0}
body.dashboard-v181 .nav a{border-radius:0;padding:13px 18px;color:#ecf5fb;border-bottom:3px solid transparent;font-size:12px}
body.dashboard-v181 .nav a:hover{background:#143a54;color:#fff}
body.dashboard-v181 .nav a.active{background:#183e57;color:#ffc928;border-bottom-color:#f2b314}
body.dashboard-v181 .wrap{max-width:1620px;padding:16px 18px 26px}
body.dashboard-v181 .btn{border-radius:7px}
body.dashboard-v181 .btn.primary{background:#0874b4;border-color:#3197d0;box-shadow:inset 0 1px 0 #7bc7ef33;color:#fff}
body.dashboard-v181 .btn.primary:hover{background:#0a85ca}

.dashboard-date-line{display:flex;justify-content:flex-end;align-items:center;gap:12px;white-space:nowrap;font-size:12px;color:#4d6475;font-weight:700}
.dashboard-date-line .dashboard-clock{display:inline-flex;align-items:center;gap:6px}
.dashboard-date-line .dashboard-clock::before{content:'◷';font-size:16px}

/* Shared dashboard heading. */
body.dashboard-v181 .section-dashboard,body.dashboard-v181 .mgmt-dashboard{gap:10px;margin-bottom:16px}
body.dashboard-v181 .section-dashboard-head,body.dashboard-v181 .mgmt-dashboard-head{align-items:flex-end;border:0;padding:0 2px 2px}
body.dashboard-v181 .section-dashboard-head h1,body.dashboard-v181 .mgmt-dashboard-head h1{font-size:31px;letter-spacing:-.5px;color:#102b3e;font-weight:900}
body.dashboard-v181 .section-dashboard-head p,body.dashboard-v181 .mgmt-dashboard-head p{color:#526b7b;font-size:13px;margin-top:3px}
body.dashboard-v181 .mgmt-dashboard-time{color:#526b7b;font-weight:700;line-height:1.45}

/* Strong, colored summary cards like the approved mockups. */
body.dashboard-v181 .section-kpis,body.dashboard-v181 .mgmt-kpis{gap:10px}
body.dashboard-v181 .section-kpis .sum,body.dashboard-v181 .section-kpi,body.dashboard-v181 .mgmt-kpi{
  min-height:114px;border-radius:9px;padding:14px 15px;border:1px solid #1971a5;background:#0c4262;color:#fff;box-shadow:0 5px 18px #08243b24;position:relative;overflow:hidden
}
body.dashboard-v181 .section-kpis .sum::after,body.dashboard-v181 .section-kpi::after,body.dashboard-v181 .mgmt-kpi::after{content:'';position:absolute;inset:0;background:linear-gradient(145deg,#ffffff0e,transparent 55%);pointer-events:none}
body.dashboard-v181 .section-kpis .sum strong,body.dashboard-v181 .section-kpi strong,body.dashboard-v181 .mgmt-kpi strong{color:#fff;font-size:31px;font-weight:900;margin-bottom:4px;position:relative;z-index:1}
body.dashboard-v181 .section-kpis .sum span,body.dashboard-v181 .section-kpi span,body.dashboard-v181 .mgmt-kpi span{color:#fff;font-size:13px;font-weight:900;position:relative;z-index:1}
body.dashboard-v181 .section-kpi small,body.dashboard-v181 .mgmt-kpi small{color:#d5e8f4;font-size:11px;line-height:1.35;position:relative;z-index:1}
body.dashboard-v181 .section-kpi.info,body.dashboard-v181 .mgmt-kpi.info,body.dashboard-v181 #maintSummary.section-kpis .sum:nth-child(1){background:#0c4f78;border-color:#1f8cca}
body.dashboard-v181 .section-kpi.danger,body.dashboard-v181 .mgmt-kpi.danger,body.dashboard-v181 #maintSummary.section-kpis .sum:nth-child(2){background:#7d2029;border-color:#d24c58}
body.dashboard-v181 .section-kpi.warn,body.dashboard-v181 .mgmt-kpi.warn,body.dashboard-v181 #maintSummary.section-kpis .sum:nth-child(3){background:#72530d;border-color:#cb9618}
body.dashboard-v181 .section-kpi.good,body.dashboard-v181 .mgmt-kpi.good,body.dashboard-v181 #maintSummary.section-kpis .sum:nth-child(4){background:#0d5e45;border-color:#2bae7a}
body.dashboard-v181 .mgmt-kpi{display:grid;grid-template-columns:54px minmax(0,1fr);column-gap:12px;align-items:center}
body.dashboard-v181 .mgmt-kpi .dash-icon{grid-row:1/4;width:48px;height:48px;border-radius:9px;display:grid;place-items:center;font-size:24px;background:#ffffff16;border:1px solid #ffffff22;color:#fff}
body.dashboard-v181 .mgmt-kpi strong,body.dashboard-v181 .mgmt-kpi span,body.dashboard-v181 .mgmt-kpi small{grid-column:2}

/* Quick actions bar. */
body.dashboard-v181 .section-actions-wrap{border:1px solid #17618d;border-radius:9px;background:#0c3a57;overflow:hidden;box-shadow:0 4px 14px #0b2c401c}
body.dashboard-v181 .dash-strip-title{padding:8px 11px;background:#0a314b;color:#fff;font-weight:900;font-size:13px;border-bottom:1px solid #1d5f83}
body.dashboard-v181 .section-actions{border:0;border-radius:0;background:transparent;padding:8px;gap:7px}
body.dashboard-v181 .section-actions .btn,body.dashboard-v181 .section-actions a{background:#103f5d;border:1px solid #357699;color:#fff;min-height:42px;font-size:11px;font-weight:850;box-shadow:none}
body.dashboard-v181 .section-actions .btn:hover,body.dashboard-v181 .section-actions a:hover{background:#175271}
body.dashboard-v181 .section-actions .btn.primary{background:#0876b5;border-color:#32a0da}
body.dashboard-v181 .section-actions .shipyard-accent{background:#4c2a79;border-color:#8c5bc3}

/* General dark-blue framed panels for the dashboard work area. */
body.dashboard-v181 .dashboard-panel,body.dashboard-v181 .mgmt-panel,body.dashboard-v181 #schedulePanel,body.dashboard-v181 .documents-dashboard-panel{
  border:1px solid #2e6f93;border-radius:9px;background:#fff;overflow:hidden;box-shadow:0 4px 14px #16384e12
}
body.dashboard-v181 .mgmt-panel-head,body.dashboard-v181 .dashboard-panel-head{
  background:#0b4566;color:#fff;border-bottom:1px solid #34799d;padding:11px 13px
}
body.dashboard-v181 .mgmt-panel-head h2,body.dashboard-v181 .dashboard-panel-head h2{color:#fff;font-size:17px;font-weight:900}
body.dashboard-v181 .mgmt-panel-head a,body.dashboard-v181 .dashboard-panel-head a{color:#fff;text-decoration:none}
body.dashboard-v181 .mgmt-panel-head a:hover,body.dashboard-v181 .dashboard-panel-head a:hover{text-decoration:underline}

/* Management table presentation. */
body.dashboard-v181 .mgmt-dashboard-grid{grid-template-columns:minmax(0,1.72fr) minmax(340px,.94fr);gap:11px}
body.dashboard-v181 .mgmt-main-stack,body.dashboard-v181 .mgmt-side-stack{gap:11px}
body.dashboard-v181 .mgmt-table-head,body.dashboard-v181 .mgmt-row{display:grid;grid-template-columns:105px minmax(0,1.35fr) minmax(135px,.78fr) 112px 82px;gap:9px;align-items:center}
body.dashboard-v181 .mgmt-table-head{padding:8px 13px;background:#edf4f8;color:#28485d;font-size:10px;font-weight:900;text-transform:uppercase;letter-spacing:.25px;border-bottom:1px solid #d1dde5}
body.dashboard-v181 .mgmt-row{padding:9px 13px;border-top:1px solid #dfe8ee;background:#fff;min-height:53px}
body.dashboard-v181 .mgmt-row:first-child{border-top:0}
body.dashboard-v181 .mgmt-row .task-title{font-size:13px;color:#1a3446}
body.dashboard-v181 .mgmt-row .sub{font-size:10px;color:#6a7d89}
body.dashboard-v181 .mgmt-row .scope,body.dashboard-v181 .mgmt-row .due{font-size:11px;color:#314e61}
body.dashboard-v181 .mgmt-row.overdue .due{color:#b51f2f}
body.dashboard-v181 .mgmt-row .btn{min-width:68px;padding:7px 9px;font-size:11px}
body.dashboard-v181 .dash-status{display:inline-flex;align-items:center;justify-content:center;padding:5px 8px;border-radius:5px;font-size:10px;font-weight:900;white-space:nowrap;border:1px solid transparent}
body.dashboard-v181 .dash-status.danger{background:#b52b3a;color:#fff;border-color:#d9505c}
body.dashboard-v181 .dash-status.warn{background:#9d6b05;color:#fff;border-color:#c89519}
body.dashboard-v181 .dash-status.info{background:#315c77;color:#fff;border-color:#5a8199}
body.dashboard-v181 .dash-status.good{background:#18774e;color:#fff;border-color:#48a37b}
body.dashboard-v181 .mgmt-vessels{padding:4px 12px}
body.dashboard-v181 .mgmt-vessel{padding:9px 1px;border-color:#dbe6ed;align-items:center}
body.dashboard-v181 .mgmt-vessel b{font-size:12px;color:#1b3547;display:flex;gap:8px;align-items:center}
body.dashboard-v181 .mgmt-vessel b::before{content:'';width:8px;height:8px;border-radius:50%;background:#31b76c;box-shadow:0 0 0 2px #31b76c22}
body.dashboard-v181 .mgmt-vessel[data-state="warn"] b::before{background:#f1a51b}
body.dashboard-v181 .mgmt-vessel[data-state="danger"] b::before{background:#e84552}
body.dashboard-v181 .mgmt-vessel span{font-size:11px;color:#5f7483}
body.dashboard-v181 .mgmt-mini-metrics{font-size:12px;color:#243f51}
body.dashboard-v181 .mgmt-mini-metrics div{border-color:#dde7ed}
body.dashboard-v181 .mgmt-quick{gap:6px;padding:9px}
body.dashboard-v181 .mgmt-quick .btn{min-height:39px;padding:7px 9px;background:#edf5fa;border-color:#9fbfd2;color:#124e72;font-size:11px;text-align:left}
body.dashboard-v181 .mgmt-quick .btn:hover{background:#dcecf5}
body.dashboard-v181 .mgmt-recent{font-size:11px}
body.dashboard-v181 .mgmt-recent-item{border-color:#dce7ed;color:#203b4d}
body.dashboard-v181 .mgmt-tools{border-color:#adc5d3;background:#fff}

/* Maintenance and Safety work areas stay compact like the mockups. */
body.dashboard-v181 #schedulePanel{padding-bottom:8px}
body.dashboard-v181 #schedulePanel>.toolbar{margin:0;padding:8px 10px;background:#0b4566;border-bottom:1px solid #2f7397;color:#fff}
body.dashboard-v181 #schedulePanel>.toolbar select,body.dashboard-v181 #schedulePanel>.toolbar input{background:#0f3047;color:#fff;border-color:#4d7b96;min-height:38px}
body.dashboard-v181 #schedulePanel>.toolbar input::placeholder{color:#c1d4df}
body.dashboard-v181 #maintenanceScheduleCount{color:#d7e7f1}
body.dashboard-v181 #maintenanceScheduleTasks{padding:8px;gap:6px}
body.dashboard-v181 #maintenanceScheduleTasks .task{border-radius:7px;padding:9px 11px;border-width:1px;border-left-width:5px;box-shadow:none}
body.dashboard-v181 #maintenanceScheduleTasks .task .title{font-size:13px}
body.dashboard-v181 #maintenanceScheduleTasks .task .meta,body.dashboard-v181 #maintenanceScheduleTasks .task .instructions{font-size:10px;line-height:1.35}
body.dashboard-v181 #maintenanceScheduleTasks .source-box{margin-top:7px}
body.dashboard-v181 .completed-group{margin:8px;border:1px solid #c7d9e4;border-radius:7px;background:#fff}

/* Safety dashboard queue added in v181. */
body.dashboard-v181 .safety-work-panel{margin-top:0}
body.dashboard-v181 .safety-work-tabs{display:flex;gap:0;background:#0d334c;border-bottom:1px solid #397491;overflow:auto}
body.dashboard-v181 .safety-work-tabs a{padding:9px 15px;color:#dcebf4;text-decoration:none;font-size:11px;font-weight:900;border-right:1px solid #295c78;white-space:nowrap}
body.dashboard-v181 .safety-work-tabs a.active{background:#15506f;color:#ffc928}
body.dashboard-v181 .safety-queue{display:grid}
body.dashboard-v181 .safety-queue-row{display:grid;grid-template-columns:105px minmax(0,1.35fr) minmax(130px,.7fr) 92px 76px;gap:9px;align-items:center;min-height:49px;padding:8px 12px;background:#fff;border-top:1px solid #dfe8ed;font-size:11px;color:#274253}
body.dashboard-v181 .safety-queue-row.head{min-height:auto;background:#edf4f8;font-size:10px;font-weight:900;text-transform:uppercase;border-top:0}
body.dashboard-v181 .safety-queue-row .task-name{font-weight:850;color:#18364a}
body.dashboard-v181 .safety-queue-row .btn{padding:6px 8px;font-size:10px}

/* Documents: compact three-column dashboard below the cards. */
body.dashboard-v181 .documents-dashboard-layout{display:grid;grid-template-columns:minmax(220px,.72fr) minmax(0,1.5fr) minmax(210px,.68fr);gap:10px;margin-top:0}
body.dashboard-v181 .documents-dashboard-box{border:1px solid #2e6f93;border-radius:8px;overflow:hidden;background:#fff}
body.dashboard-v181 .documents-dashboard-box h2{margin:0;padding:10px 12px;background:#0b4566;color:#fff;font-size:14px}
body.dashboard-v181 .documents-dashboard-box .box-body{padding:8px 10px}
body.dashboard-v181 .documents-dashboard-box .quick-link{display:flex;justify-content:space-between;gap:10px;padding:7px 3px;border-top:1px solid #e1e9ee;font-size:11px;text-decoration:none;color:#234557}
body.dashboard-v181 .documents-dashboard-box .quick-link:first-child{border-top:0}
body.dashboard-v181 .documents-dashboard-box .quick-link:hover{color:#0874b4}

/* Equipment app overrides. */
body.dashboard-v181.equipment-read-only{background:#edf2f6}
body.dashboard-v181 .equipment-unified-dashboard{margin:0 0 10px}
body.dashboard-v181 .main .content{padding-top:12px}
body.dashboard-v181 .equipment-unified-dashboard+.paperwork-dashboard-panel{border-color:#2e6f93;box-shadow:0 4px 14px #16384e12}
body.dashboard-v181 .equipment-unified-dashboard+.paperwork-dashboard-panel .panel-head{background:#0b4566;color:#fff}
body.dashboard-v181 .panel-grid>.panel,body.dashboard-v181 .maintenance-attention-panel{border-color:#2e6f93;box-shadow:0 4px 14px #16384e12}
body.dashboard-v181 .panel-grid>.panel>.panel-head,body.dashboard-v181 .maintenance-attention-panel>.panel-head{background:#0b4566;color:#fff}
body.dashboard-v181 .panel-grid>.panel>.panel-head h3,body.dashboard-v181 .maintenance-attention-panel>.panel-head h3{color:#fff}

/* Footer strip mirrors the approved visual but contains no operational claims. */
.dashboard-v181-footer{margin-top:18px;background:#071b2a;color:#dceaf4;border-top:1px solid #2b5872;padding:13px 18px;display:flex;justify-content:space-between;gap:16px;align-items:center;font-size:11px}
.dashboard-v181-footer strong{color:#fff;font-size:13px;letter-spacing:.3px}.dashboard-v181-footer span{white-space:nowrap}

/* Dark mode: same approved structure, fully dark work surfaces. */
html[data-sbm-theme="dark"] body.dashboard-v181{background:#071018;color:#eaf2f8}
html[data-sbm-theme="dark"] body.dashboard-v181 .section-dashboard-head h1,html[data-sbm-theme="dark"] body.dashboard-v181 .mgmt-dashboard-head h1{color:#f4f8fb}
html[data-sbm-theme="dark"] body.dashboard-v181 .section-dashboard-head p,html[data-sbm-theme="dark"] body.dashboard-v181 .mgmt-dashboard-head p,html[data-sbm-theme="dark"] body.dashboard-v181 .dashboard-date-line,html[data-sbm-theme="dark"] body.dashboard-v181 .mgmt-dashboard-time{color:#c6d5df}
html[data-sbm-theme="dark"] body.dashboard-v181 :is(.mgmt-panel,#schedulePanel,.documents-dashboard-box,.mgmt-tools,.completed-group){background:#0d1821;border-color:#2e6f93;color:#eaf2f8}
html[data-sbm-theme="dark"] body.dashboard-v181 .mgmt-table-head,html[data-sbm-theme="dark"] body.dashboard-v181 .safety-queue-row.head{background:#0a2b40;color:#d9e8f2;border-color:#275a76}
html[data-sbm-theme="dark"] body.dashboard-v181 .mgmt-row,html[data-sbm-theme="dark"] body.dashboard-v181 .safety-queue-row{background:#0e1b25;border-color:#253a49;color:#e2edf4}
html[data-sbm-theme="dark"] body.dashboard-v181 .mgmt-row .task-title,html[data-sbm-theme="dark"] body.dashboard-v181 .safety-queue-row .task-name,html[data-sbm-theme="dark"] body.dashboard-v181 .mgmt-vessel b{color:#f1f6fa}
html[data-sbm-theme="dark"] body.dashboard-v181 .mgmt-row .scope,html[data-sbm-theme="dark"] body.dashboard-v181 .mgmt-row .due,html[data-sbm-theme="dark"] body.dashboard-v181 .mgmt-vessel span,html[data-sbm-theme="dark"] body.dashboard-v181 .mgmt-row .sub{color:#b9cad5}
html[data-sbm-theme="dark"] body.dashboard-v181 .mgmt-vessel{border-color:#253b49}
html[data-sbm-theme="dark"] body.dashboard-v181 .mgmt-mini-metrics{color:#e0ebf2}
html[data-sbm-theme="dark"] body.dashboard-v181 .mgmt-mini-metrics div,html[data-sbm-theme="dark"] body.dashboard-v181 .mgmt-recent-item{border-color:#263d4b}
html[data-sbm-theme="dark"] body.dashboard-v181 .mgmt-quick .btn{background:#123147;border-color:#3d6b88;color:#eff7fb}
html[data-sbm-theme="dark"] body.dashboard-v181 .mgmt-quick .btn:hover{background:#19435e}
html[data-sbm-theme="dark"] body.dashboard-v181 #maintenanceScheduleTasks .task,html[data-sbm-theme="dark"] body.dashboard-v181 .completed-group{background:#0e1b25;color:#e6eff5;border-color:#344c5c}
html[data-sbm-theme="dark"] body.dashboard-v181 .documents-dashboard-box .quick-link{color:#dceaf2;border-color:#263e4d}
html[data-sbm-theme="dark"] body.dashboard-v181 .documents-dashboard-box .quick-link:hover{color:#91d2ff}

@media(max-width:1050px){
 body.dashboard-v181 .mgmt-dashboard-grid{grid-template-columns:1fr}
 body.dashboard-v181 .mgmt-side-stack{grid-template-columns:1fr 1fr}
 body.dashboard-v181 .mgmt-side-stack .mgmt-panel:last-child{grid-column:1/-1}
 body.dashboard-v181 .mgmt-table-head,body.dashboard-v181 .mgmt-row{grid-template-columns:95px minmax(0,1fr) 110px 78px}
 body.dashboard-v181 .mgmt-table-head .scope-head,body.dashboard-v181 .mgmt-row .scope{display:none}
 body.dashboard-v181 .documents-dashboard-layout{grid-template-columns:1fr 1fr}.documents-dashboard-box.recent-docs{grid-column:1/-1}
}
@media(max-width:720px){
 body.dashboard-v181 .top{position:relative;min-height:58px}.dashboard-v181 .nav{top:0}
 body.dashboard-v181 .wrap{padding:11px}
 body.dashboard-v181 .section-dashboard-head,body.dashboard-v181 .mgmt-dashboard-head{align-items:flex-start;flex-direction:column}
 body.dashboard-v181 .dashboard-date-line{justify-content:flex-start;white-space:normal}
 body.dashboard-v181 .section-kpis,body.dashboard-v181 .mgmt-kpis{grid-template-columns:1fr 1fr!important;gap:8px}
 body.dashboard-v181 .section-kpis .sum,body.dashboard-v181 .section-kpi,body.dashboard-v181 .mgmt-kpi{min-height:105px;padding:11px}
 body.dashboard-v181 .mgmt-kpi{grid-template-columns:42px minmax(0,1fr);gap:8px}.dashboard-v181 .mgmt-kpi .dash-icon{width:38px;height:38px;font-size:19px}
 body.dashboard-v181 .section-actions{grid-template-columns:1fr 1fr!important}
 body.dashboard-v181 .mgmt-side-stack{grid-template-columns:1fr}.dashboard-v181 .mgmt-side-stack .mgmt-panel:last-child{grid-column:auto}
 body.dashboard-v181 .mgmt-table-head{display:none}
 body.dashboard-v181 .mgmt-row{grid-template-columns:1fr auto;gap:5px 9px;padding:11px}
 body.dashboard-v181 .mgmt-row .due,body.dashboard-v181 .mgmt-row .task-copy,body.dashboard-v181 .mgmt-row .scope,body.dashboard-v181 .mgmt-row .status-cell{grid-column:1;display:block}
 body.dashboard-v181 .mgmt-row .btn{grid-column:2;grid-row:1/5;align-self:center;min-height:44px}
 body.dashboard-v181 .safety-queue-row{grid-template-columns:1fr auto;padding:10px}.dashboard-v181 .safety-queue-row.head{display:none}.dashboard-v181 .safety-queue-row>*{grid-column:1}.dashboard-v181 .safety-queue-row .btn{grid-column:2;grid-row:1/5;min-height:42px}
 body.dashboard-v181 .documents-dashboard-layout{grid-template-columns:1fr}.dashboard-v181 .documents-dashboard-box.recent-docs{grid-column:auto}
 .dashboard-v181-footer{flex-direction:column;align-items:flex-start}
}
@media(max-width:430px){body.dashboard-v181 .section-kpis,body.dashboard-v181 .mgmt-kpis{grid-template-columns:1fr!important}.dashboard-v181 .section-actions{grid-template-columns:1fr!important}}
@media print{.dashboard-v181-footer,.section-actions-wrap{display:none!important}}
/* Accessibility: amber KPI supporting text remains comfortably above WCAG AA contrast. */
body.dashboard-v181 .section-kpi.warn small,body.dashboard-v181 .mgmt-kpi.warn small{color:#fff4d1}
html[data-sbm-theme="dark"] body.dashboard-v181 .mgmt-recent-item,html[data-sbm-theme="dark"] body.dashboard-v181 .mgmt-recent-item span{color:#dce8f0}
html[data-sbm-theme="dark"] body.dashboard-v181 .mgmt-recent-item time{color:#aebfca}
