/**
 * ShipCRM Modern Dashboard — content area only
 * Uses ShipCRM brand: #00117b, #0092e4, #ff6b32
 */

.ship-dashboard {
  --ship-primary: #00117b;
  --ship-primary-light: #0092e4;
  --ship-accent: #ff6b32;
  --ship-success: #10b981;
  --ship-bg: #f7f8fa;
  --ship-card: #ffffff;
  --ship-border: #e2e8f0;
  --ship-text: #00117b;
  --ship-text-muted: #64748b;
  --ship-radius: 18px;
  --ship-radius-sm: 12px;
  --ship-shadow: 0px 1px 2px rgba(0, 0, 0, 0.04), 0px 4px 10px rgba(0, 0, 0, 0.05);
  --ship-shadow-hover: 0px 2px 6px rgba(0, 0, 0, 0.06), 0px 10px 18px rgba(0, 0, 0, 0.06);

  /* Spacing system tokens */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 24px;
  --space-2xl: 32px;
  --space-3xl: 40px;
  --space-4xl: 48px;

  /* Grid / layout tokens */
  --container-max: 1920px;
  --container-pad: 16px;
  --grid-columns: 12;
  --grid-gutter: 20px;

  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 0 var(--space-xl);
  box-sizing: border-box;
  min-height: 100%;
  font-family: 'Poppins', sans-serif;
}

/* Page shell — full width inside .viewport like other modules */
.ship-dashboard.ship-dash-home-page {
  padding: 0 0 var(--space-xl);
}

/* Breakpoints + container padding (grid overlay / internal tools) */
@media (min-width: 1600px) {
  .ship-dashboard {
    --container-pad: 24px;
  }
}

@media (max-width: 1024px) {
  .ship-dashboard {
    --container-pad: 20px; /* Tablet */
    --grid-columns: 8;
    --grid-gutter: 16px;
  }
}

@media (max-width: 480px) {
  .ship-dashboard {
    --container-pad: 16px; /* Mobile */
    --grid-columns: 4;
    --grid-gutter: 16px;
  }
}

/* Light content background within viewport */
.view-xl:has(.ship-dashboard) {
  background: var(--ship-bg);
}

/* ── Header ── */
.ship-dashboard__header {
  margin-bottom: 32px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.ship-dashboard__header-left {
  min-width: 0;
}

.ship-dashboard__header-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.ship-dashboard__header-right .btn {
  white-space: nowrap;
}

.ship-kpi-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 var(--space-lg);
}

.ship-kpi-toolbar__label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ship-text-muted);
}

.ship-kpi-toolbar__right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

/* ── KPI Drawer ── */
.ship-kpi-drawer .modal-dialog.ship-kpi-drawer__dialog {
  max-width: 520px;
  width: 520px;
  height: 100%;
  margin: 0 0 0 auto;
}

.ship-kpi-drawer .modal-content.ship-kpi-drawer__content {
  height: 100vh;
  border-radius: 0;
  border: 0;
  border-left: 1px solid var(--ship-border);
  box-shadow: -12px 0 28px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
}

.ship-kpi-drawer__header {
  border-bottom: 1px solid var(--ship-border);
  position: sticky;
  top: 0;
  z-index: 3;
  background: #fff;
  box-shadow: 0 1px 0 rgba(226,232,240,.9);
}

.ship-kpi-drawer__toolbar {
  padding: 12px 16px;
  border-bottom: 1px solid var(--ship-border);
  position: sticky;
  top: 56px;
  z-index: 2;
  background: #fff;
  box-shadow: 0 8px 18px rgba(0,0,0,0.04);
}

.ship-kpi-drawer__search {
  position: relative;
}

.ship-kpi-drawer__search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ship-text-muted);
  font-size: 0.875rem;
  opacity: 0.7;
}

.ship-kpi-drawer__search input {
  width: 100%;
  height: 48px;
  padding: 10px 12px 10px 36px;
  border: 1px solid var(--ship-border);
  border-radius: 12px;
  font-size: 14px;
  line-height: 20px;
  background: #f8fafc;
  transition: box-shadow .15s ease, border-color .15s ease, background .15s ease;
}

.ship-kpi-drawer__search input:hover {
  background: #fff;
}

.ship-kpi-drawer__search input:focus {
  outline: none;
  background: #fff;
  border-color: rgba(0, 146, 228, 0.55);
  box-shadow: 0 0 0 3px rgba(0, 146, 228, 0.12);
}

.ship-kpi-drawer__body {
  padding: 16px;
  overflow: auto;
  flex: 1;
  height: auto;
  min-height: 0;
}

.ship-kpi-drawer__list .ship-kpi-card {
  transition: transform .15s ease, box-shadow .15s ease;
}

.ship-kpi-drawer__list .ship-kpi-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(0,0,0,0.06);
}

.ship-kpi-drawer__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.ship-kpi-item {
  border: 1px solid var(--ship-border);
  border-radius: 16px;
  padding: 14px 14px;
  background: #fff;
}

.ship-kpi-item__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.ship-kpi-item__title {
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  color: var(--ship-text);
  margin: 0;
}

.ship-kpi-item__value {
  font-size: 24px;
  font-weight: 700;
  line-height: 32px;
  color: var(--ship-text);
  margin: 6px 0 0;
  letter-spacing: -0.02em;
}

.ship-kpi-item__meta {
  font-size: 12px;
  line-height: 18px;
  color: var(--ship-text-muted);
  margin-top: 6px;
}

@media (max-width: 600px) {
  .ship-kpi-drawer .modal-dialog.ship-kpi-drawer__dialog {
    max-width: 100%;
    width: 100%;
  }

  .ship-kpi-drawer__list {
    grid-template-columns: 1fr;
  }
}

.ship-dashboard__title {
  font-size: 32px;
  font-weight: 700;
  color: var(--ship-text);
  margin: 0 0 6px;
  letter-spacing: -0.02em;
  line-height: 40px;
}

.ship-dashboard__subtitle {
  font-size: 14px;
  color: var(--ship-text-muted);
  margin: 0;
  font-weight: 400;
  line-height: 20px;
}

/* ── Dashboard title section (report period indicator) ── */
.ship-dashboard__header .ship-report-period {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0, 17, 123, 0.12);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(6px);
  white-space: nowrap;
}

.ship-dashboard__header .ship-report-period strong {
  color: #00117b;
  font-weight: 600;
}

/* ── KPI Grid ── */
.ship-dashboard__kpi-grid {
  --ship-kpi-slot-height: 216px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-xl);
  margin-bottom: var(--space-2xl);
  align-items: stretch;
}

.ship-dashboard__kpi-grid .ship-dashboard-overview__slot-wrap,
.ship-dashboard__kpi-grid .ship-dashboard-overview__slot--kpi,
.ship-dashboard__kpi-grid .ship-report-widget--kpi {
  display: flex;
  flex-direction: column;
  min-height: var(--ship-kpi-slot-height);
  height: 100%;
}

.ship-dashboard__kpi-grid .ship-report-widget--kpi > .ship-kpi-card--slot {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  overflow: hidden;
}

.ship-kpi-card--slot {
  display: flex;
  flex-direction: column;
  height: var(--ship-kpi-slot-height);
  min-height: var(--ship-kpi-slot-height);
  max-height: var(--ship-kpi-slot-height);
  margin-bottom: 0;
  overflow: hidden;
  flex-shrink: 0;
}

/* Edit mode — taller slots for header row + comparison lines */
.ship-dashboard__kpi-grid--edit {
  --ship-kpi-slot-height: 252px;
}

.ship-dashboard__kpi-grid--edit .ship-dashboard-overview__slot-wrap,
.ship-dashboard__kpi-grid--edit .ship-dashboard-overview__slot--kpi,
.ship-dashboard__kpi-grid--edit .ship-report-widget--kpi {
  height: var(--ship-kpi-slot-height);
  min-height: var(--ship-kpi-slot-height);
  max-height: var(--ship-kpi-slot-height);
}

.ship-dashboard__kpi-grid--edit .ship-report-widget--kpi > .ship-kpi-card--slot {
  height: 100%;
  min-height: 0;
  max-height: 100%;
}

.ship-dashboard__kpi-grid--edit .ship-kpi-card--slot .ship-kpi-card__body {
  flex: 1;
  min-height: 0;
}

.ship-kpi-card__head {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--ship-border);
  background: var(--ship-card);
  flex-shrink: 0;
}

.ship-kpi-card__head-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  color: var(--ship-text);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ship-kpi-card__head-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.ship-kpi-card--has-head-actions:hover .ship-kpi-card__head-actions .ship-widget-actions--dashboard-hover,
.ship-kpi-card--has-head-actions:focus-within .ship-kpi-card__head-actions .ship-widget-actions--dashboard-hover,
.ship-report-widget--kpi.ship-report-widget--has-actions:hover .ship-kpi-card__head-actions .ship-widget-actions--dashboard-hover,
.ship-report-widget--kpi.ship-report-widget--has-actions:focus-within .ship-kpi-card__head-actions .ship-widget-actions--dashboard-hover {
  opacity: 1;
  pointer-events: auto;
}

.ship-kpi-card--slot .ship-kpi-card__body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow: hidden;
  padding: 16px 20px;
}

.ship-kpi-card--slot .ship-kpi-card__top {
  flex-shrink: 0;
  margin-bottom: 8px;
}

.ship-kpi-card--slot .ship-kpi-card__comparison {
  flex: 0 0 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow: hidden;
}

.ship-kpi-card--slot .ship-kpi-card__comparison--reserved {
  min-height: 52px;
}

.ship-kpi-card--slot .ship-kpi-card__trend {
  margin-bottom: 4px;
}

.ship-kpi-card--slot .ship-kpi-card__previous {
  margin-top: 0;
}

.ship-kpi-card--slot.ship-kpi-card--empty .ship-kpi-card__body--empty {
  padding: 0;
  justify-content: stretch;
}

.ship-kpi-card--slot.ship-kpi-card--empty .ship-kpi-empty-slot__trigger {
  height: 100%;
}

.ship-report-widget__kpi-detail {
  --ship-kpi-slot-height: 216px;
}

.ship-report-widget__kpi-detail .ship-kpi-card--slot {
  width: 100%;
  max-width: 360px;
}

.ship-kpi-card {
  position: relative;
  background: var(--ship-card);
  border: 1px solid var(--ship-border);
  border-radius: var(--ship-radius);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: var(--ship-shadow);
  min-height: 160px;
}

.ship-kpi-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--ship-shadow-hover);
}

.ship-kpi-card__overlay {
  position: absolute;
  inset: 0;
  opacity: 0.025;
  pointer-events: none;
}

.ship-kpi-card__body {
  position: relative;
  padding: 24px;
  z-index: 1;
}

.ship-kpi-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}

.ship-kpi-card__label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ship-text-muted);
  margin: 0 0 4px;
  text-transform: none;
}

.ship-kpi-card__value {
  font-size: 36px;
  font-weight: 700;
  color: var(--ship-text);
  margin: 0;
  line-height: 40px;
  letter-spacing: -0.03em;
}

.ship-kpi-card__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--ship-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  box-shadow: none;
}

.ship-kpi-card__icon svg {
  width: 24px;
  height: 24px;
  fill: rgba(0, 146, 228, 0.8);
}

/* Enterprise serious: de-emphasize per-card gradients */
.ship-kpi-card__overlay {
  background: linear-gradient(180deg, rgba(0, 17, 123, 0.04), rgba(0, 146, 228, 0.02)) !important;
}

.ship-kpi-card__trend {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.ship-kpi-card__trend--up {
  color: #059669;
}

.ship-kpi-card__trend--down {
  color: #ef4444;
}

.ship-kpi-card__trend-label {
  font-weight: 400;
  color: var(--ship-text-muted);
  font-size: 0.75rem;
}

.ship-kpi-card__previous {
  font-size: 0.75rem;
  line-height: 1.25;
  color: var(--ship-text-muted);
  margin-top: 4px;
}

.ship-kpi-card__sparkline {
  height: 48px;
  margin: 8px -8px -8px;
}

.ship-kpi-card__sparkline canvas {
  width: 100% !important;
  height: 48px !important;
}

/* ── Widget Cards ── */
.ship-dashboard__chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 32px;
  align-items: stretch;
}

.ship-dashboard__chart-grid .ship-dashboard-overview__slot-wrap,
.ship-dashboard__chart-grid .ship-dashboard-overview__slot {
  display: flex;
  flex-direction: column;
  min-height: 580px;
  height: 100%;
}

.ship-dashboard-overview__row {
  margin-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
}

.ship-dashboard-overview__col {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
}

.ship-dashboard-overview__slot {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
}

.ship-dashboard-overview__row .ship-dashboard-overview__col.col-6 {
  min-height: 580px;
}

.ship-dashboard-overview__row .ship-dashboard-overview__col.col-6 .ship-report-widget {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}

.ship-dashboard-overview__row .ship-dashboard-overview__col.col-6 .ship-report-widget > .ship-widget,
.ship-dashboard-overview__row .ship-dashboard-overview__col.col-6 .ship-report-widget-loading.ship-widget {
  flex: 1;
  height: 100%;
  min-height: 580px;
  display: flex;
  flex-direction: column;
}

/* Preview/view — bounded flex so Chart.js cannot grow the slot in a resize loop */
.ship-dashboard-overview:not(.ship-dashboard-overview--edit) .ship-dashboard-overview__row .ship-dashboard-overview__col.col-6 .ship-report-widget--chart .ship-widget__body--chart,
.ship-dashboard-overview:not(.ship-dashboard-overview--edit) .ship-dashboard-overview__row .ship-dashboard-overview__col.col-6 .ship-report-widget--split-row.ship-report-widget--chart .ship-widget__body--chart {
  flex: 1 1 0;
  min-height: 0;
  height: 0;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ship-dashboard-overview:not(.ship-dashboard-overview--edit) .ship-dashboard-overview__row .ship-dashboard-overview__col.col-6 .ship-report-chart {
  flex: 1 1 0;
  min-height: 0;
  height: 0;
  max-height: 100%;
  overflow: hidden;
}

.ship-dashboard-overview:not(.ship-dashboard-overview--edit) .ship-dashboard-overview__row .ship-dashboard-overview__col.col-6 .ship-report-chart__canvas {
  flex: 1 1 0;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
}

.ship-dashboard-overview:not(.ship-dashboard-overview--edit) .ship-dashboard-overview__row .ship-dashboard-overview__col.col-6 .ship-report-chart--ready .ship-report-chart__canvas {
  flex: 0 0 auto;
  height: auto;
}

.ship-report-widget {
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ship-report-widget--has-actions {
  position: relative;
}

.ship-report-widget__hover-actions {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.ship-report-widget--has-actions:hover .ship-report-widget__hover-actions,
.ship-report-widget--has-actions:focus-within .ship-report-widget__hover-actions {
  opacity: 1;
  pointer-events: auto;
}

.ship-widget__head-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.ship-widget-actions--dashboard-hover {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.ship-report-widget--has-actions:hover .ship-widget-actions--dashboard-hover,
.ship-report-widget--has-actions:focus-within .ship-widget-actions--dashboard-hover,
.ship-widget.ship-report-widget--interactive:hover .ship-widget-actions--dashboard-hover,
.ship-widget.ship-report-widget--interactive:focus-within .ship-widget-actions--dashboard-hover,
.ship-report-widget--has-actions:hover .ship-widget__head-actions .ship-widget-actions--dashboard-hover,
.ship-report-widget--has-actions:focus-within .ship-widget__head-actions .ship-widget-actions--dashboard-hover {
  opacity: 1;
  pointer-events: auto;
}

.ship-reports-head__btn--icon {
  width: 40px;
  padding: 0;
  justify-content: center;
}

.ship-reports-head__btn--icon span {
  display: none;
}

.ship-report-widget__action--danger:hover {
  color: #dc2626;
}

.ship-report-widget__kpi-body {
  padding: 0;
}

.ship-report-widget__detail-body {
  padding: 24px;
}

.ship-report-widget__detail-body.ship-widget__body--chart {
  height: 420px;
  min-height: 420px;
}

.ship-report-widget__detail-body--kpi {
  max-width: 420px;
}

.ship-dashboard--report-detail .ship-reports-main-card {
  margin-bottom: 0;
}

@media (hover: none) {
  .ship-widget-actions--dashboard-hover {
    opacity: 1;
    pointer-events: auto;
  }
}

.ship-widget {
  background: var(--ship-card);
  border: 1px solid var(--ship-border);
  border-radius: var(--ship-radius);
  box-shadow: var(--ship-shadow);
  margin-bottom: 32px;
  overflow: hidden;
  transition: box-shadow 0.25s ease;
}

.ship-widget:hover {
  box-shadow: var(--ship-shadow-hover);
}

.ship-dashboard__chart-grid .ship-widget {
  margin-bottom: 0;
}

.ship-dashboard__chart-grid .ship-report-widget {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}

.ship-dashboard__chart-grid .ship-report-widget > .ship-widget,
.ship-dashboard__chart-grid .ship-report-widget-loading.ship-widget {
  flex: 1;
  height: 100%;
  min-height: 580px;
  max-height: none;
  display: flex;
  flex-direction: column;
}

.ship-dashboard__chart-grid .ship-report-widget--split-row > .ship-widget,
.ship-dashboard__chart-grid .ship-report-widget--split-row .ship-report-widget-loading.ship-widget {
  height: 100%;
}

.ship-dashboard-overview:not(.ship-dashboard-overview--edit) .ship-dashboard__chart-grid .ship-report-widget--chart .ship-widget__body--chart,
.ship-dashboard-overview:not(.ship-dashboard-overview--edit) .ship-dashboard__chart-grid .ship-report-widget--chart-tall .ship-widget__body--chart,
.ship-dashboard-overview:not(.ship-dashboard-overview--edit) .ship-dashboard__chart-grid .ship-report-widget--split-row.ship-report-widget--chart .ship-widget__body--chart,
.ship-dashboard-overview:not(.ship-dashboard-overview--edit) .ship-dashboard__chart-grid .ship-report-widget--split-row.ship-report-widget--chart-tall .ship-widget__body--chart {
  flex: 1 1 0;
  min-height: 0;
  height: 0;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ship-dashboard-overview:not(.ship-dashboard-overview--edit) .ship-dashboard__chart-grid .ship-report-chart {
  flex: 1 1 0;
  min-height: 0;
  height: 0;
  max-height: 100%;
  overflow: hidden;
}

.ship-dashboard-overview:not(.ship-dashboard-overview--edit) .ship-dashboard__chart-grid .ship-report-chart__canvas {
  flex: 1 1 0;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
}

.ship-dashboard-overview:not(.ship-dashboard-overview--edit) .ship-dashboard__chart-grid .ship-report-chart--ready .ship-report-chart__canvas {
  flex: 0 0 auto;
  height: auto;
}

.ship-widget__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--ship-border);
}

.ship-widget__title {
  font-size: 18px;
  font-weight: 600;
  color: var(--ship-text);
  margin: 0;
  line-height: 24px;
}

.ship-widget__meta {
  font-size: 12px;
  line-height: 18px;
  color: var(--ship-text-muted);
  margin-top: 2px;
}

.ship-widget__meta--hint {
  opacity: 0.85;
}

/* Detail chart toolbar (search + pager) */
.ship-detail-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.ship-detail-toolbar--table-align {
  padding-left: 16px;
  padding-right: 16px;
}

.ship-detail-toolbar--left {
  justify-content: flex-start;
}

.ship-detail-toolbar__search--wide {
  flex: 1 1 360px;
  max-width: 520px;
}

.ship-detail-toolbar__pager--wide {
  margin-left: auto;
}

.ship-reports-tabs-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px 12px;
  position: relative;
}

.ship-reports-tabs-row::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--ship-border);
  pointer-events: none;
}

.ship-reports__tabs--scroll {
  flex: 1;
  min-width: 0;
  padding: 8px 6px;
  border: none;
  background: transparent;
  box-shadow: none;
}

.ship-reports__tabs--pager {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}

.ship-reports__tabs--pager .ship-reports__tab {
  flex-shrink: 0;
}

.ship-reports-tabs-row__arrow:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.ship-tabs-arrow {
  width: 44px;
  padding: 0;
  justify-content: center;
}

.ship-reports-tabs-row--dashboard{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 24px 10px;
  border-top: none;
  border-bottom: none;
  background: #fff;
}

.ship-reports-tabs-row--dashboard .ship-reports__tabs--scroll{
  padding-top: 0;
  padding-bottom: 0;
  align-items: center;
}

.ship-reports-tabs-row__search{
  position: relative;
  width: 260px;
  flex: 0 0 260px;
}

.ship-reports-tabs-row__search-icon{
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(100, 116, 139, 0.85);
  font-size: 14px;
  pointer-events: none;
}

.ship-reports-tabs-row__search input{
  width: 100%;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: #fff;
  padding: 8px 36px 8px 34px;
  font-size: 13px;
  color: rgba(15, 23, 42, 0.9);
}

.ship-reports-tabs-row__search input:focus{
  outline: none;
  border-color: rgba(0, 146, 228, 0.55);
  box-shadow: 0 0 0 3px rgba(0, 146, 228, 0.12);
}

.ship-reports-tabs-row__search-clear{
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: #fff;
  color: rgba(100, 116, 139, 0.9);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ship-reports-tabs-row__search-clear:hover{
  background: #f8fafc;
  color: rgba(15, 23, 42, 0.9);
}

.ship-reports-tabs-row__arrow{
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: #fff;
  color: rgba(100, 116, 139, 0.9);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ship-reports-tabs-row__arrow:hover{
  background: #f8fafc;
  color: rgba(15, 23, 42, 0.9);
}

.ship-reports__tabs--pills{
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
}

.ship-reports__tabs--pills .ship-reports__tab{
  box-sizing: border-box;
  height: 30px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: #fff;
  border-radius: 999px;
  font-size: 13px;
  color: rgba(15, 23, 42, 0.7);
}

.ship-reports__tabs--pills .ship-reports__tab:hover{
  background: #f8fafc;
  color: rgba(15, 23, 42, 0.9);
}

.ship-reports__tabs--pills .ship-reports__tab.active{
  background: rgba(15, 23, 42, 1);
  border-color: rgba(15, 23, 42, 1);
  border-bottom-color: rgba(15, 23, 42, 1);
  color: #fff;
  font-weight: 500;
}

.ship-reports-tabs-empty {
  flex: 1;
  padding: 10px 12px;
  font-size: 13px;
  color: rgba(100, 116, 139, 0.9);
  white-space: nowrap;
}

@media (max-width: 768px) {
  .ship-reports-tabs-row--dashboard{
    padding: 8px 16px 10px;
  }
  .ship-reports-tabs-row__search{
    width: 100%;
    flex: 1 1 100%;
    order: -1;
  }
}

.ship-detail-topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  background: rgba(247, 248, 250, 0.92);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 18px;
  box-shadow: 0px 2px 8px rgba(0,0,0,0.04);
  margin-bottom: 12px;
}

.ship-detail-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.ship-detail-chips--widget {
  margin-top: 0;
  padding: 0 24px 12px;
  border-bottom: 1px solid var(--ship-border);
}

.ship-detail-chips--widget:empty {
  display: none;
  padding: 0;
  border-bottom: none;
}

.ship-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: #fff;
  color: rgba(15, 23, 42, 0.9);
  font-size: 12px;
  line-height: 18px;
  max-width: 360px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.ship-chip.is-selected {
  background: rgba(0, 146, 228, 0.14);
  border-color: rgba(0, 146, 228, 0.42);
  color: rgba(0, 90, 160, 0.98);
  font-weight: 600;
}

.ship-chip.is-selected:hover {
  background: rgba(0, 146, 228, 0.22);
  border-color: rgba(0, 146, 228, 0.55);
}

.ship-chip.is-selected:focus-visible {
  outline: 2px solid rgba(0, 146, 228, 0.45);
  outline-offset: 2px;
}

.ship-chip__label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 300px;
}

.ship-chip__x {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: #fff;
  color: rgba(100, 116, 139, 0.9);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ship-chip__x:hover {
  color: rgba(15, 23, 42, 0.9);
  background: #f8fafc;
}

.ship-chip-count {
  margin-left: 6px;
  height: 20px;
  min-width: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(0, 146, 228, 0.12);
  border: 1px solid rgba(0, 146, 228, 0.18);
  color: rgba(0, 146, 228, 0.95);
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ship-detail-topbar__right {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.ship-table-shell {
  padding: 0 16px 16px;
}

.ship-table-wrap--scroll {
  max-height: calc(100vh - 360px);
  overflow: auto;
}

.ship-table-wrap--scroll .ship-table {
  width: max-content;
  min-width: 100%;
}

.ship-table--fixed {
  table-layout: fixed;
}

.ship-table--fixed th,
.ship-table--fixed td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Reports detail: main card + filters card (side by side) */
.ship-reports-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.ship-reports-detail-layout.is-filters-open {
  grid-template-columns: minmax(0, 1fr) min(380px, 32vw);
}

.ship-reports-detail-layout .ship-widget {
  margin-bottom: 0;
}

.ship-reports-filters-card {
  display: none;
  flex-direction: column;
  max-height: calc(100vh - 140px);
  position: sticky;
  top: 16px;
  align-self: stretch;
}

.ship-reports-detail-layout.is-filters-open .ship-reports-filters-card {
  display: flex;
}

.ship-reports-filters-card__head {
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.ship-reports-filters-card__head .ship-widget__meta {
  font-size: 12px;
  line-height: 18px;
  color: var(--ship-text-muted);
}

.ship-reports-filters-card__body {
  padding: 14px 20px;
  overflow: auto;
  flex: 1;
  min-height: 0;
}

.ship-reports-filters-card__footer {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--ship-border);
}

/* Legacy StandardFilter embed — stack fields in the narrow filters sidebar */
.ship-reports-filters-card .reportFilter {
  margin: 0;
}

.ship-reports-filters-card .reportFilter .card {
  margin-bottom: 0;
  box-shadow: none;
  border: 0;
  background: transparent;
}

.ship-reports-filters-card .reportFilter .card-header {
  display: none;
}

.ship-reports-filters-card .reportFilter .card-body {
  padding: 0 !important;
}

.ship-reports-filters-card .workFlow_conditions {
  padding: 0;
}

.ship-reports-filters-card .workFlow_conditions .clearfix {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ship-reports-filters-card .workFlow_conditions .clearfix::after {
  display: none;
}

.ship-reports-filters-card .workFlow_conditions .float-left {
  float: none !important;
  width: 100% !important;
  max-width: 100%;
  padding: 0;
}

.ship-reports-filters-card .workFlow_conditions .col-1.float-left,
.ship-reports-filters-card .workFlow_conditions .col-2.float-left,
.ship-reports-filters-card .workFlow_conditions .col-3.float-left {
  flex: 0 0 auto;
}

.ship-reports-filters-card .workFlow_conditions select.form-control,
.ship-reports-filters-card .workFlow_conditions .form-control {
  width: 100%;
  max-width: 100%;
}

.ship-reports-filters-card .workFlow_conditions a.btn.primary_bg {
  display: none;
}

.ship-reports-head__btn.is-active {
  background: rgba(0, 17, 123, 0.08);
  border-color: rgba(0, 146, 228, 0.45);
  color: var(--ship-primary, #00117b);
}

.ship-reports-head__btn.is-dirty {
  box-shadow: inset 0 0 0 1px rgba(255, 107, 50, 0.35);
}

@media (max-width: 900px) {
  .ship-reports-detail-layout.is-filters-open {
    grid-template-columns: 1fr;
  }

  .ship-reports-filters-card {
    position: static;
    max-height: none;
  }
}

.ship-filter-field {
  margin-bottom: 14px;
}

.ship-filter-field__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ship-text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.ship-filter-field__control input,
.ship-filter-field__control select {
  width: 100%;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  padding: 10px 12px;
  background: #f8fafc;
}

.ship-filter-field__control input:focus,
.ship-filter-field__control select:focus {
  outline: none;
  background: #fff;
  border-color: rgba(0, 146, 228, 0.55);
  box-shadow: 0 0 0 3px rgba(0, 146, 228, 0.12);
}

/* Dynamic filter rules (field + condition + value) */
.ship-filter-rules {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ship-filter-rule {
  padding: 12px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 12px;
  background: #f8fafc;
}

.ship-filter-rule__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 36px;
  gap: 10px 8px;
  align-items: end;
}

.ship-filter-rule__cell {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ship-filter-rule__cell--value {
  grid-column: 1 / 3;
}

.ship-filter-rule__value-wrap {
  width: 100%;
  min-width: 0;
}

.ship-filter-rule__cell .ship-form-input,
.ship-filter-rule__value-wrap .form-control,
.ship-filter-rule__value-wrap input[type="text"],
.ship-filter-rule__value-wrap input[type="number"],
.ship-filter-rule__value-wrap input[type="email"],
.ship-filter-rule__value-wrap select {
  width: 100%;
  min-height: 40px;
  height: 40px;
  margin: 0;
  border-radius: 12px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  padding: 0 12px;
  background: #fff;
  font-size: 13px;
  font-family: inherit;
  color: var(--ship-text);
  box-sizing: border-box;
}

.ship-filter-rule__label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--ship-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.ship-filter-rule__field,
.ship-filter-rule__operator,
.ship-filter-rule__value,
.ship-filter-rule__value-from,
.ship-filter-rule__value-to {
  width: 100%;
  height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  padding: 8px 10px;
  background: #fff;
  font-size: 13px;
  font-family: inherit;
  color: var(--ship-text);
}

.ship-filter-rule__value-wrap select[multiple] {
  height: auto;
  min-height: 88px;
  padding: 6px;
}

.ship-filter-rule__between {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ship-filter-rule__between-sep {
  color: var(--ship-text-muted);
  font-size: 12px;
  flex-shrink: 0;
}

.ship-filter-rule__no-value {
  display: flex;
  align-items: center;
  min-height: 40px;
  font-size: 13px;
  color: var(--ship-text-muted);
  font-style: italic;
}

.ship-filter-checkgroup {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 140px;
  overflow-y: auto;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: #fff;
}

.ship-filter-checkgroup__item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ship-text);
  margin: 0;
  cursor: pointer;
}

.ship-filter-checkgroup__item input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.ship-filter-rule__remove {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  align-self: end;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  background: #fff;
  color: var(--ship-text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(226, 232, 240, 0.9);
}

.ship-filter-rule__remove:hover {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fecaca;
}

.ship-filter-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 0;
  border: none;
  background: none;
  color: var(--ship-primary-light, #0092e4);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.ship-filter-add-btn:hover {
  text-decoration: underline;
}

.ship-detail-toolbar__search {
  position: relative;
  min-width: 260px;
  flex: 0 0 320px;
  max-width: 420px;
}

.ship-detail-toolbar__search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ship-text-muted);
  opacity: 0.7;
  font-size: 0.875rem;
}

.ship-detail-toolbar__search input {
  width: 100%;
  height: 48px;
  padding: 10px 12px 10px 36px;
  border: 1px solid var(--ship-border);
  border-radius: 12px;
  font-size: 14px;
  line-height: 20px;
  background: #f8fafc;
  transition: box-shadow .15s ease, border-color .15s ease, background .15s ease;
}

.ship-detail-toolbar__clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: #fff;
  color: var(--ship-text-muted);
  display: none;
  align-items: center;
  justify-content: center;
}

.ship-detail-toolbar__clear:hover {
  background: #f8fafc;
  color: var(--ship-text);
}

.ship-detail-toolbar__search input:hover { background: #fff; }
.ship-detail-toolbar__search input:focus {
  outline: none;
  background: #fff;
  border-color: rgba(0, 146, 228, 0.55);
  box-shadow: 0 0 0 3px rgba(0, 146, 228, 0.12);
}

.ship-detail-toolbar__pager {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

@media (max-width: 520px) {
  .ship-detail-toolbar {
    justify-content: flex-start;
  }
  .ship-detail-toolbar__search {
    flex: 1 1 100%;
    max-width: none;
    min-width: 0;
  }
}

.ship-detail-toolbar__pager-label {
  font-size: 12px;
  line-height: 18px;
  color: var(--ship-text-muted);
  white-space: nowrap;
}

/* Status detail layout: chart + legend */
.ship-status-detail-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 16px;
  align-items: start;
}

.ship-status-legend {
  border: 1px solid var(--ship-border);
  border-radius: 16px;
  background: #fff;
  max-height: 420px;
  overflow: auto;
  padding: 10px;
}

.ship-status-legend__head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  margin: -10px -10px 6px;
  background: #fff;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  font-size: 12px;
  color: var(--ship-text-muted);
}

.ship-status-legend__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  cursor: pointer;
}

.ship-status-legend__item:hover {
  background: rgba(0, 17, 123, 0.03);
}

.ship-status-legend__item.is-active {
  background: rgba(0, 146, 228, 0.08);
  border: 1px solid rgba(0, 146, 228, 0.18);
}

/* Donut center label + empty state */
.ship-chart-center {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  flex-direction: column;
}

.ship-chart-center__value {
  font-size: 22px;
  font-weight: 700;
  line-height: 28px;
  color: var(--ship-text);
}

.ship-chart-center__label {
  font-size: 12px;
  line-height: 18px;
  color: var(--ship-text-muted);
}

.ship-chart-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  text-align: center;
  color: var(--ship-text-muted);
  font-size: 14px;
  line-height: 20px;
  background: rgba(255,255,255,0.85);
  border-radius: 16px;
}

.ship-chart-empty__title {
  font-weight: 600;
  color: var(--ship-text);
  margin-bottom: 10px;
}

.ship-chart-empty__action {
  height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  justify-content: center;
}

.ship-status-legend__left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.ship-status-legend__swatch {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.ship-status-legend__name {
  font-size: 13px;
  line-height: 18px;
  color: var(--ship-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.ship-status-legend__value {
  font-size: 12px;
  line-height: 18px;
  color: var(--ship-text-muted);
  white-space: nowrap;
}

@media (max-width: 900px) {
  .ship-status-detail-layout {
    grid-template-columns: 1fr;
  }
  .ship-status-legend {
    max-height: 240px;
  }
}

.ship-widget__action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: rgba(0, 17, 123, 0.75);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
  font-family: inherit;
}

.ship-widget__action:hover {
  background: rgba(0, 17, 123, 0.06);
  color: var(--ship-primary);
}

.ship-widget__action svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.ship-widget__body {
  padding: 24px;
}

.ship-widget__body--chart {
  position: relative;
  height: 300px;
}

.ship-widget__body--chart canvas {
  max-height: 100%;
}

/* ── Dynamic Reports ── */
.ship-dot{
  margin: 0 8px;
  color: rgba(100,116,139,0.75);
}

.ship-reports-head .ship-widget__meta{
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
}

.ship-reports-head__actions{
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.ship-reports-head__btn{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: #fff;
  color: rgba(15, 23, 42, 0.9);
  font-size: 13px;
  font-weight: 500;
  line-height: 18px;
}

.ship-reports-head__btn:hover{
  background: #f8fafc;
  border-color: rgba(148, 163, 184, 0.8);
}

.ship-reports-head__btn--primary{
  background: rgba(15, 23, 42, 1);
  border-color: rgba(15, 23, 42, 1);
  color: #fff;
}

.ship-reports-head__btn--primary:hover{
  background: rgba(15, 23, 42, 0.92);
  border-color: rgba(15, 23, 42, 0.92);
}

.ship-reports-head__badge{
  height: 18px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.26);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
}

.ship-reports__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 24px 0;
  border-bottom: 1px solid var(--ship-border);
  overflow-x: auto;
}

.ship-reports__tabs.ship-reports__tabs--scroll,
.ship-reports__tabs.ship-reports__tabs--pills {
  border-bottom: none;
}

.ship-reports__tabs.ship-reports__tabs--pager {
  overflow: hidden;
  overflow-x: hidden;
  flex-wrap: nowrap;
}

.ship-reports__tab {
  background: none;
  border: none;
  padding: 10px 16px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ship-text-muted);
  cursor: pointer;
  border-radius: 8px 8px 0 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  white-space: nowrap;
  font-family: inherit;
}

.ship-reports__tab:hover {
  color: var(--ship-primary);
  background: rgba(0, 146, 228, 0.05);
}

.ship-reports__tab.active {
  color: var(--ship-primary-light);
  border-bottom-color: var(--ship-primary-light);
  font-weight: 600;
}

.ship-reports__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  flex-wrap: wrap;
  border-top: none;
}

.ship-reports__search {
  position: relative;
  flex: 1;
  min-width: 220px;
  max-width: 400px;
}

.ship-reports__search .ship-detail-toolbar__clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--ship-border);
  background: #fff;
  color: rgba(100, 116, 139, 0.9);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ship-reports__search .ship-detail-toolbar__clear:hover {
  background: #f8fafc;
  color: rgba(15, 23, 42, 0.9);
}

.ship-reports__search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ship-text-muted);
  font-size: 0.875rem;
  line-height: 1;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ship-panel__body .ship-reports__search {
  max-width: none;
  flex: 0 0 auto;
  min-width: 0;
}

.ship-panel__body .ship-list,
.ship-panel__body .ship-checklist {
  margin-top: 0;
}

.ship-reports__search input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  border: 1px solid var(--ship-border);
  border-radius: var(--ship-radius-sm);
  font-size: 14px;
  color: var(--ship-text);
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
  height: 48px;
}

.ship-reports__search input:focus {
  outline: none;
  border-color: var(--ship-primary-light);
  box-shadow: 0 0 0 3px rgba(0, 146, 228, 0.12);
}

.ship-reports__actions {
  display: flex;
  gap: 8px;
}

.ship-reports__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ship-text);
  background: #fff;
  border: 1px solid var(--ship-border);
  /* border-radius: var(--ship-radius-sm); */
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}

.ship-reports__btn:hover {
  background: var(--ship-bg);
  border-color: var(--ship-primary-light);
}

.ship-reports__btn--primary {
  background: var(--ship-accent) !important;
  border-color: var(--ship-accent) !important;
  color: #fff !important;
}

.ship-reports__btn--primary:hover {
  background: #e55a28 !important;
  border-color: #e55a28 !important;
}

.ship-reports__panel {
  display: none;
  padding: 0 24px 24px;
}

.ship-reports__panel.active {
  display: block;
}

/* ── Data Table ── */
.ship-table-wrap {
  overflow-x: auto;
  border-radius: 16px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: #fff;
  box-shadow: 0px 2px 8px rgba(0,0,0,0.04);
}


.ship-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: #fff;
}

/* Even 2-column tables (e.g., Status detail) */
.ship-table--even-2 {
  table-layout: fixed;
}

.ship-table--even-2 th,
.ship-table--even-2 td {
  width: 50%;
}

.ship-table thead {
  position: sticky;
  top: 0;
  z-index: 1;
}

.ship-table th {
  background: #f8fafc;
  color: #64748b;
  font-weight: 600;
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  white-space: nowrap;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 16px;
}

.ship-table td {
  padding: 16px 16px;
  border-bottom: 1px solid rgba(241, 245, 249, 1);
  color: #0f172a;
  vertical-align: middle;
  font-size: 13px;
  line-height: 20px;
}

.ship-table tbody tr {
  transition: background 0.15s ease;
}

.ship-table tbody tr:hover {
  background: #f8fafc;
}

.ship-table tbody tr:last-child td {
  border-bottom: none;
}

.ship-table__tracking {
  font-weight: 600;
  color: #0f172a;
}

.ship-table__value {
  font-weight: 600;
  color: #0f172a;
}

/* Dynamic Reports: sortable header — icon inline after label */
.ship-th-sort {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.ship-th-sort::after {
  content: "↑↓";
  display: inline-block;
  margin-left: 6px;
  vertical-align: middle;
  font-size: 10px;
  line-height: 1;
  letter-spacing: -0.04em;
  color: rgba(100, 116, 139, 0.75);
}

.ship-th-sort.is-sorted-asc::after {
  content: "↑";
  color: rgba(15, 23, 42, 0.85);
}

.ship-th-sort.is-sorted-desc::after {
  content: "↓";
  color: rgba(15, 23, 42, 0.85);
}

.ship-th-sort:hover::after {
  color: rgba(15, 23, 42, 0.65);
}

.ship-modal .modal-header {
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.ship-modal .modal-title {
  font-weight: 600;
  color: var(--ship-text);
}

.ship-reports__tabs--modal {
  padding: 0 0 12px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.ship-reports__toolbar--modal {
  padding: 12px 0 16px;
}

/* Status badges */
.ship-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: capitalize;
  letter-spacing: 0.02em;
}

.ship-badge--pending {
  background: #f1f5f9;
  color: #64748b;
}

.ship-badge--in-transit {
  background: rgba(0, 146, 228, 0.12);
  color: #0092e4;
}

.ship-badge--delivered {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
}

.ship-badge--delayed {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
}

.ship-badge--cancelled {
  background: #f1f5f9;
  color: #475569;
}

.ship-reports__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-top: 1px solid var(--ship-border);
  font-size: 0.75rem;
  color: var(--ship-text-muted);
}

.ship-table-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--ship-text-muted);
  font-size: 0.875rem;
}

/* ── Dashboard Builder Empty State (upload-style) ── */
.ship-dashboard-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 16px;
}

.ship-dashboard-empty__card {
  width: min(680px, 100%);
  min-height: 320px;
  border-radius: 18px;
  background: #fff;
  border: 2px dashed rgba(226, 232, 240, 0.95);
  box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.04), 0px 4px 10px rgba(0, 0, 0, 0.05);
  padding: 24px;
  text-align: center;
}

.ship-dashboard-empty__icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  border: 1px solid rgba(0, 146, 228, 0.18);
  background: rgba(0, 146, 228, 0.08);
  color: rgba(0, 17, 123, 0.85);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 14px;
}

.ship-dashboard-empty__title {
  font-size: 18px;
  line-height: 24px;
  font-weight: 800;
  color: #00117b;
  margin: 0;
}

.ship-dashboard-empty__desc {
  margin: 10px auto 18px;
  max-width: 520px;
  font-size: 14px;
  line-height: 20px;
  color: var(--ship-text-muted);
}

.ship-dashboard-empty__cta {
  margin-top: 6px;
  border-radius: 999px;
  padding: 0 24px;
  font-weight: 600;
}

.ship-dashboard-empty__card--footer-divider {
  padding: 48px 32px 0;
}

.ship-dashboard-empty__divider {
  width: 100%;
  height: 1px;
  background: rgba(226, 232, 240, 0.95);
  margin-top: 32px;
}

.ship-dashboard-custom--empty {
  width: 100%;
}

.ship-dashboard-custom--empty .ship-dashboard-empty {
  width: 100%;
}

.ship-dashboard-empty__sub {
  margin-top: 10px;
  font-size: 13px;
  line-height: 18px;
  color: var(--ship-text-muted);
}

.ship-dashboard-empty__quick {
  margin-top: 16px;
  display: inline-flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.ship-dashboard-empty__quick-btn {
  height: 40px;
  padding: 0 14px;
  border-radius: 999px;
}

/* ── Dashboard Builder Widgets Grid + Add Report Card ── */
.ship-dashboard-builder-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.ship-grid-card {
  grid-column: span 12;
}

.ship-grid-card--6 {
  grid-column: span 6;
}

.ship-grid-card--12 {
  grid-column: span 12;
}

.ship-add-report-card {
  border: 2px dashed rgba(226, 232, 240, 0.95);
  background: #fff;
  box-shadow: var(--ship-shadow);
  border-radius: 18px;
  cursor: pointer;
  text-align: center;
  padding: 0;
}

.ship-add-report-card:hover {
  border-color: rgba(0, 146, 228, 0.45);
  box-shadow: var(--ship-shadow-hover);
  transform: translateY(-1px);
}

.ship-add-report-card__inner {
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 160px;
}

.ship-add-report-card__plus {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: rgba(0, 146, 228, 0.06);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  color: rgba(0, 17, 123, 0.85);
}

.ship-add-report-card__title {
  font-size: 14px;
  line-height: 20px;
  font-weight: 800;
  color: rgba(15, 23, 42, 0.92);
}

.ship-add-report-card__sub {
  margin-top: 4px;
  font-size: 13px;
  line-height: 18px;
  color: var(--ship-text-muted);
}

@media (max-width: 1200px) {
  .ship-dashboard-builder-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 16px;
  }
  .ship-grid-card--6 {
    grid-column: span 12;
  }
}

@media (max-width: 768px) {
  .ship-dashboard-builder-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 14px;
  }
  .ship-grid-card--6,
  .ship-grid-card--12 {
    grid-column: span 12;
  }
}

/* Widget header controls (builder) */
.ship-widget-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ship-widget-actions .ship-btn {
  width: 44px;
  padding: 0;
  justify-content: center;
}

/* Expand modal */
.ship-expand-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 2000;
}

.ship-expand-modal {
  position: fixed;
  inset: 0;
  z-index: 2010;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.ship-expand-modal__panel {
  width: min(1100px, 96vw);
  height: min(760px, 92vh);
  background: #fff;
  border-radius: 18px;
  border: 1px solid var(--ship-border);
  box-shadow: 0px 12px 40px rgba(0,0,0,0.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ship-expand-modal__head {
  padding: 16px 18px;
  border-bottom: 1px solid var(--ship-border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.ship-expand-modal__title {
  font-size: 18px;
  font-weight: 800;
  line-height: 24px;
  color: var(--ship-text);
}

.ship-expand-modal__sub {
  margin-top: 4px;
  font-size: 12px;
  line-height: 18px;
  color: var(--ship-text-muted);
}

.ship-expand-modal__body {
  padding: 18px;
  overflow: auto;
  flex: 1;
  min-height: 0;
}

/* ── Report Builder Drawer (flow prototype page) ── */
body.ship-drawer-open {
  overflow: hidden;
}

.ship-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  z-index: 1040;
}

.ship-drawer {
  --drawer-pad: 24px;
  --drawer-control-h: 48px;
  --drawer-font: 14px;
  --drawer-label-font: 12px;

  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: min(960px, 94vw);
  z-index: 1050;
  display: flex;
  align-items: stretch;
}

@media (min-width: 1600px) {
  .ship-drawer {
    width: min(1080px, 96vw);
    --drawer-pad: 28px;
  }
}

.ship-drawer--widget-picker {
  width: min(480px, 94vw);
}

.ship-drawer--template-picker {
  width: min(640px, 94vw);
}

.ship-drawer__panel {
  width: 100%;
  height: 100%;
  background: #fff;
  border-left: 1px solid var(--ship-border);
  box-shadow: -8px 0 24px rgba(0,0,0,0.10);
  display: flex;
  flex-direction: column;
}

.ship-drawer__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px var(--drawer-pad) 14px;
  border-bottom: 1px solid var(--ship-border);
}

.ship-drawer__title {
  font-size: 18px;
  font-weight: 700;
  line-height: 24px;
  color: var(--ship-text);
}

.ship-drawer__subtitle {
  margin-top: 4px;
  font-size: 12px;
  line-height: 18px;
  color: var(--ship-text-muted);
}

.ship-drawer__close {
  width: 44px;
  padding: 0;
  justify-content: center;
}

.ship-drawer__stepper {
  display: flex;
  gap: 8px;
  padding: 12px var(--drawer-pad) 12px;
  flex-wrap: nowrap;
  overflow-x: auto;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  background: #fff;
  scrollbar-width: thin;
}

.ship-step {
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: #fff;
  color: rgba(15, 23, 42, 0.9);
  font-size: 12px;
  line-height: 18px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex: 0 0 auto;
}

.ship-step:hover {
  background: #f8fafc;
  border-color: rgba(148, 163, 184, 0.8);
}

.ship-step.is-active {
  border-color: rgba(0, 146, 228, 0.45);
  box-shadow: 0 0 0 3px rgba(0, 146, 228, 0.10);
  background: rgba(0, 146, 228, 0.05);
}

.ship-drawer__context {
  padding: 12px var(--drawer-pad) 12px;
  display: flex;
  align-items: stretch;
  gap: 10px;
  overflow-x: auto;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  background: #fff;
  scrollbar-width: thin;
}

.ship-context-item {
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
  min-width: 0;
  flex: 0 0 auto;
  width: max-content;
  max-width: 320px;
}

.ship-context-k {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ship-text-muted);
  margin-bottom: 4px;
}

.ship-context-v {
  display: block;
  font-size: 12px;
  line-height: 18px;
  color: rgba(15, 23, 42, 0.92);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ship-context-muted {
  color: var(--ship-text-muted);
}

.ship-drawer__body {
  padding: 18px var(--drawer-pad);
  overflow: auto;
  flex: 1;
  min-height: 0;
}

.ship-step-head {
  margin-bottom: 12px;
}

.ship-step-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  color: var(--ship-text);
}

.ship-step-subtitle {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 18px;
  color: var(--ship-text-muted);
}

.ship-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.ship-drawer__body .ship-two-col {
  height: min(560px, calc(100vh - 340px));
  gap: 18px;
}

.ship-drawer .ship-two-col--fields {
  grid-template-columns: 1.2fr 0.8fr;
}

@media (min-width: 900px) {
  .ship-drawer .ship-two-col--fields {
    grid-template-columns: 1fr 1fr;
  }
}

.ship-panel {
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.ship-panel__head {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  font-size: 12px;
  font-weight: 700;
  color: rgba(15, 23, 42, 0.9);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ship-panel__body {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  min-height: 0;
}

.ship-empty {
  color: var(--ship-text-muted);
  font-size: 13px;
  line-height: 18px;
  padding: 12px 0;
}

.ship-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: auto;
  flex: 1;
  min-height: 0;
  padding-right: 4px;
}

.ship-list__item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: #fff;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}

.ship-list__item.is-active {
  border-color: rgba(0, 146, 228, 0.45);
  background: rgba(0, 146, 228, 0.05);
}

.ship-list__title {
  font-size: 13px;
  font-weight: 600;
  color: rgba(15, 23, 42, 0.92);
}

.ship-list__meta {
  font-size: 12px;
  color: var(--ship-text-muted);
  white-space: nowrap;
}

.ship-checklist {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: auto;
  flex: 1;
  min-height: 0;
  padding-right: 4px;
}

.ship-check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: rgba(15, 23, 42, 0.92);
}

.ship-accordion {
  margin-top: 12px;
}

.ship-panel__body .ship-accordion {
  margin-top: 0;
  overflow: auto;
  flex: 1;
  min-height: 0;
  padding-right: 4px;
}

.ship-acc {
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 10px;
  background: #fff;
}

.ship-acc__head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: none;
  background: #f8fafc;
  cursor: pointer;
  font-weight: 700;
  font-size: 12px;
  color: rgba(15, 23, 42, 0.9);
  text-align: left;
  font-family: inherit;
}

.ship-acc__body {
  padding: 10px 12px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.ship-field {
  width: 100%;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 12px;
  background: #fff;
  padding: 10px 10px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}

.ship-field:hover {
  background: #f8fafc;
}

.ship-field.is-selected {
  border-color: rgba(0, 146, 228, 0.45);
  background: rgba(0, 146, 228, 0.05);
}

.ship-field__label {
  font-size: 13px;
  font-weight: 600;
  color: rgba(15, 23, 42, 0.92);
}

.ship-field__meta {
  margin-top: 2px;
  font-size: 12px;
  color: var(--ship-text-muted);
}

.ship-selected {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.ship-selected__hint {
  margin: 0 0 4px;
  font-size: 12px;
  color: var(--ship-text-muted);
}

.ship-selected--sortable.smooth-dnd-container.vertical {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ship-selected__row {
  width: 100%;
  display: grid;
  grid-template-columns: 24px 1fr auto 28px;
  align-items: center;
  gap: 8px;
  padding: 10px 10px;
  border-radius: 12px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: #fff;
  text-align: left;
  font-family: inherit;
  box-sizing: border-box;
}

.ship-selected__row:hover {
  background: #f8fafc;
}

.ship-selected--sortable .smooth-dnd-draggable-wrapper {
  overflow: visible;
}

.ship-selected--sortable .smooth-dnd-ghost .ship-selected__row {
  opacity: 0.92;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
  border-color: rgba(0, 146, 228, 0.35);
}

.ship-selected__drag-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--ship-text-muted);
  cursor: grab;
  border-radius: 6px;
}

.ship-selected__drag-handle:hover {
  color: rgba(15, 23, 42, 0.75);
  background: rgba(226, 232, 240, 0.6);
}

.ship-selected__drag-handle:active {
  cursor: grabbing;
}

.ship-selected__remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--ship-text-muted);
  cursor: pointer;
  border-radius: 8px;
}

.ship-selected__remove:hover {
  color: #dc2626;
  background: rgba(220, 38, 38, 0.08);
}

.ship-selected__label {
  font-size: 13px;
  font-weight: 600;
  color: rgba(15, 23, 42, 0.92);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ship-selected__meta {
  font-size: 12px;
  color: var(--ship-text-muted);
  white-space: nowrap;
}

.ship-viz-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.ship-viz {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: #fff;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}

.ship-viz:hover {
  background: #f8fafc;
}

.ship-viz.is-active {
  border-color: rgba(0, 146, 228, 0.45);
  box-shadow: 0 0 0 3px rgba(0, 146, 228, 0.10);
}

.ship-viz__icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: rgba(0, 146, 228, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(0, 17, 123, 0.85);
}

.ship-viz__name {
  font-size: 13px;
  font-weight: 700;
  color: rgba(15, 23, 42, 0.92);
}

.ship-viz__desc {
  margin-top: 3px;
  font-size: 12px;
  line-height: 18px;
  color: var(--ship-text-muted);
}

/* Step 2 — output type tabs & role slots */
.ship-output-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.ship-output-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: rgba(15, 23, 42, 0.85);
  cursor: pointer;
  font-family: inherit;
}

.ship-output-tab:hover {
  background: #f8fafc;
}

.ship-output-tab.is-active {
  border-color: rgba(0, 146, 228, 0.45);
  background: rgba(0, 146, 228, 0.06);
  color: #00117b;
}

.ship-config-panel {
  overflow: auto;
}

.ship-drawer .ship-two-col--fields > .ship-panel:last-child,
.ship-drawer .ship-two-col--fields > .ship-panel:last-child .ship-panel__body,
.ship-drawer .ship-config-panel {
  overflow: visible;
}

.ship-drawer .ship-two-col--fields > .ship-panel:last-child .ship-config-panel {
  overflow: auto;
  overflow-x: visible;
}

.ship-role-slots {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ship-role-slot {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) 36px;
  gap: 10px;
  align-items: center;
}

.ship-role-slot__label {
  font-size: 12px;
  font-weight: 700;
  color: rgba(15, 23, 42, 0.75);
  line-height: 16px;
}

.ship-role-slot__label small {
  display: block;
  font-weight: 500;
  color: var(--ship-text-muted);
  font-size: 11px;
  margin-top: 2px;
}

.ship-role-slot select,
.ship-role-slot .ship-form-input,
.ship-searchable-field {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.ship-searchable-field {
  position: relative;
}

/* Only size the root Select2 trigger — not nested dropdown containers */
.ship-searchable-field > .select2-container {
  width: 100% !important;
  max-width: 100%;
}

.ship-searchable-field > .select2-container .select2-container-dropdown {
  position: absolute;
  left: 0 !important;
  right: 0;
  width: auto !important;
  max-width: 100%;
  z-index: 30;
}

.ship-searchable-field > .select2-container .select2-container-dropdown .select2-dropdown {
  width: 100% !important;
  max-width: 100%;
  box-sizing: border-box;
}

.ship-searchable-field .select2-selection {
  min-height: 42px;
  border-radius: 12px !important;
  border: 1px solid rgba(226, 232, 240, 0.9) !important;
  display: flex;
  align-items: center;
  padding: 4px 8px;
  font-size: 13px;
  font-family: inherit;
}

.ship-drawer .ship-searchable-field .select2-selection {
  min-height: var(--drawer-control-h, 44px);
}

.ship-role-slot select,
.ship-role-slot .ship-form-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  font-size: 13px;
  font-family: inherit;
}

.ship-role-slot__clear {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: var(--ship-text-muted);
  cursor: pointer;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ship-role-slot__clear:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.ship-role-checklist {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(226, 232, 240, 0.9);
  font-size: 12px;
  color: var(--ship-text-muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ship-role-checklist .is-ok {
  color: #059669;
}

.ship-role-checklist .is-missing {
  color: #dc2626;
}

.ship-chart-type-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.ship-chart-type-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  color: rgba(15, 23, 42, 0.85);
}

.ship-chart-type-btn.is-active {
  border-color: rgba(0, 146, 228, 0.45);
  background: rgba(0, 146, 228, 0.06);
  color: #00117b;
}

.ship-panel--mini-preview .ship-panel__body {
  min-height: 120px;
}

.ship-mini-preview-kpi {
  text-align: center;
  padding: 20px 16px;
}

.ship-mini-preview-kpi__value {
  font-size: 34px;
  font-weight: 800;
  color: #00117b;
  line-height: 40px;
}

.ship-mini-preview-kpi__label {
  margin-top: 6px;
  font-size: 12px;
  color: var(--ship-text-muted);
}

.ship-mini-preview-chart {
  padding: 12px 8px 8px;
}

.ship-mini-bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  gap: 6px;
  height: 120px;
  padding: 0 8px;
}

.ship-mini-bars__col {
  flex: 1;
  max-width: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  height: 100%;
  justify-content: flex-end;
}

.ship-mini-bars__bar {
  width: 100%;
  border-radius: 6px 6px 2px 2px;
  background: rgba(0, 146, 228, 0.55);
  min-height: 8px;
}

.ship-mini-bars__label {
  font-size: 10px;
  color: var(--ship-text-muted);
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ship-mini-line-chart {
  height: 120px;
  position: relative;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.ship-mini-line-chart svg {
  width: 100%;
  height: 100%;
}

.ship-mini-summary-table {
  font-size: 12px;
}

.ship-preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ship-preview-pill {
  height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: #fff;
  color: rgba(15, 23, 42, 0.92);
  font-size: 12px;
  line-height: 18px;
}

.ship-preview-pill strong {
  color: var(--ship-text-muted);
  font-weight: 700;
}

.ship-form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ship-form-label {
  font-size: 12px;
  font-weight: 700;
  color: rgba(15, 23, 42, 0.92);
}

.ship-form-input {
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  padding: 0 12px;
  font-size: 14px;
  font-family: inherit;
}

.ship-form-input:focus {
  outline: none;
  border-color: rgba(0, 146, 228, 0.45);
  box-shadow: 0 0 0 3px rgba(0, 146, 228, 0.10);
}

.ship-form-error {
  font-size: 12px;
  color: #ef4444;
}

.ship-radio {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: rgba(15, 23, 42, 0.92);
  margin: 6px 0 0;
}

.ship-drawer__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px var(--drawer-pad);
  border-top: 1px solid var(--ship-border);
  background: #fff;
}

/* Drawer-scoped controls (wider inputs) */
.ship-drawer .ship-form-input,
.ship-drawer .ship-filter-rule__field,
.ship-drawer .ship-filter-rule__operator,
.ship-drawer .ship-filter-rule__value {
  height: var(--drawer-control-h);
  font-size: var(--drawer-font);
  padding: 0 14px;
  border-radius: 12px;
}

.ship-drawer .ship-form-label,
.ship-drawer .ship-filter-rule__label {
  font-size: var(--drawer-label-font);
  margin-bottom: 8px;
}

.ship-drawer .ship-list__item {
  padding: 14px 16px;
  font-size: var(--drawer-font);
}

.ship-drawer .ship-output-tab {
  height: 42px;
  padding: 0 18px;
  font-size: 13px;
}

.ship-drawer .ship-step {
  height: 36px;
  padding: 0 14px;
  font-size: 13px;
}

.ship-filter-logic-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 16px;
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(0, 146, 228, 0.06);
  border: 1px solid rgba(0, 146, 228, 0.15);
}

.ship-filter-logic-bar__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ship-text);
  margin: 0;
  white-space: nowrap;
}

.ship-filter-logic-bar__select {
  min-width: 280px;
  flex: 1;
  max-width: 420px;
}

.ship-filter-connector {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 0;
}

.ship-filter-connector span {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ship-primary);
  background: #fff;
  border: 1px solid rgba(0, 146, 228, 0.25);
  border-radius: 999px;
  padding: 4px 14px;
}

.ship-drawer .ship-filter-rule__row--drawer {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) 44px;
  gap: 12px 14px;
  align-items: flex-start;
}

.ship-drawer .ship-filter-rule__row--drawer .ship-filter-rule__cell {
  min-width: 0;
}

.ship-drawer .ship-filter-rule__row--drawer .ship-searchable-field,
.ship-drawer .ship-filter-rule__row--drawer .ship-filter-rule__value-wrap {
  width: 100%;
}

.ship-drawer .ship-filter-rule__row--drawer .ship-filter-rule__cell--value {
  grid-column: auto;
}

.ship-drawer .ship-filter-rule__cell .ship-form-input,
.ship-drawer .ship-filter-rule__value-wrap .form-control,
.ship-drawer .ship-filter-rule__value-wrap input[type="text"],
.ship-drawer .ship-filter-rule__value-wrap input[type="number"],
.ship-drawer .ship-filter-rule__value-wrap input[type="email"],
.ship-drawer .ship-filter-rule__value-wrap select {
  min-height: var(--drawer-control-h, 44px);
  height: var(--drawer-control-h, 44px);
  padding: 0 14px;
  font-size: var(--drawer-font, 13px);
}

.ship-drawer .ship-filter-rule__value-wrap .MuiInputBase-root,
.ship-drawer .ship-filter-rule__value-wrap .MuiFormControl-root {
  width: 100%;
  margin: 0;
}

.ship-drawer .ship-filter-rule__value-wrap .react-datetime input {
  width: 100%;
  min-height: var(--drawer-control-h, 44px);
  height: var(--drawer-control-h, 44px);
  border-radius: 12px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  padding: 0 14px;
  font-size: var(--drawer-font, 13px);
  box-sizing: border-box;
}

.ship-drawer .ship-filter-rule__row--drawer .ship-filter-rule__remove {
  grid-column: auto;
  grid-row: auto;
  width: 44px;
  height: 44px;
  align-self: end;
}

.ship-drawer .ship-filter-rule {
  padding: 16px;
}

/* Filters step — prevent Select2 dropdown from being clipped by panel overflow */
.ship-drawer .ship-drawer-step--filters,
.ship-drawer .ship-panel--filters,
.ship-drawer .ship-panel--filters .ship-panel__body,
.ship-drawer .ship-panel--filters .ship-filter-rules,
.ship-drawer .ship-panel--filters .ship-filter-rule,
.ship-drawer .ship-panel--filters .ship-filter-rule__cell,
.ship-drawer .ship-panel--filters .ship-searchable-field {
  overflow: visible;
}

.ship-drawer .ship-panel--filters .ship-panel__body {
  padding-bottom: 220px;
}

.ship-drawer .ship-panel--filters .ship-searchable-field > .select2-container--open {
  position: relative;
  z-index: 40;
}

.ship-drawer .ship-panel--filters .ship-searchable-field > .select2-container .select2-container-dropdown.select2-container--open {
  z-index: 50;
}

.ship-drawer .ship-panel__head {
  padding: 14px 18px;
  font-size: 14px;
}

.ship-drawer .ship-panel__body {
  padding: 16px 18px;
}

.ship-drawer__footer-right {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

@media (max-width: 900px) {
  .ship-drawer {
    width: min(960px, 100vw);
    --drawer-pad: 16px;
    --drawer-control-h: 44px;
  }

  .ship-drawer__context {
    padding-left: 16px;
    padding-right: 16px;
  }

  .ship-drawer .ship-two-col,
  .ship-drawer .ship-two-col--fields {
    grid-template-columns: 1fr;
  }

  .ship-drawer .ship-filter-rule__row--drawer {
    grid-template-columns: 1fr 1fr;
  }

  .ship-drawer .ship-filter-rule__row--drawer .ship-filter-rule__cell--value {
    grid-column: 1 / -1;
  }

  .ship-drawer .ship-filter-rule__row--drawer .ship-filter-rule__remove {
    grid-column: 2;
    justify-self: end;
  }

  .ship-filter-logic-bar__select {
    min-width: 0;
    max-width: none;
    width: 100%;
  }
}

/* ── Responsive ── */
@media (max-width: 1200px) {
  .ship-dashboard__kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .ship-dashboard,
  .ship-dashboard.ship-dash-home-page {
    padding: 0 0 var(--space-lg);
  }

  .ship-dashboard__kpi-grid,
  .ship-dashboard__chart-grid {
    grid-template-columns: 1fr;
  }

  .ship-kpi-card__value {
    font-size: 1.625rem;
  }

  .ship-widget__body--chart {
    height: 240px;
  }

  .ship-reports__toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .ship-reports__search {
    max-width: none;
  }

  .ship-reports__footer {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}

/* ── Design Rules Preview ── */
.ship-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 44px;
  padding: 0 20px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  border: 1px solid rgba(0, 17, 123, 0.12);
  background: #fff;
  color: var(--ship-text);
  transition: background 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.ship-btn:hover {
  background: #fff;
  color:#fff,
  border-color: rgba(0, 146, 228, 0.35);
  box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.06);
}

.ship-btn--ghost {
  background: #fff;
}

.ship-btn--primary {
  background: var(--ship-accent);
  border-color: var(--ship-accent);
  color: #fff;
}

.ship-btn--primary:hover {
  background: #e55a28;
  border-color: #e55a28;
  box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.10);
}

/* View toggle (detail pages) */
.ship-view-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ship-view-toggle .ship-btn {
  width: 44px;
  padding: 0;
  justify-content: center;
}

.ship-view-toggle .ship-btn i {
  font-size: 18px;
  line-height: 1;
}

.ship-view-toggle .ship-btn.active {
  border-color: rgba(0, 146, 228, 0.45);
  box-shadow: 0 0 0 3px rgba(0, 146, 228, 0.10);
}

.ship-design-rules {
  border: 1px solid var(--ship-border);
  border-radius: var(--ship-radius);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--ship-shadow);
  overflow: hidden;
  margin-bottom: var(--space-2xl);
}

.ship-design-rules__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--ship-border);
}

.ship-design-rules__title {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 600;
  line-height: 24px;
  color: var(--ship-text);
}

.ship-design-rules__subtitle {
  margin: 0;
  font-size: 14px;
  line-height: 20px;
  color: var(--ship-text-muted);
}

.ship-design-rules__body {
  padding: 24px;
}

.ship-rules-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-xl);
}

.ship-rule-card {
  border: 1px solid var(--ship-border);
  border-radius: 16px;
  padding: 16px;
  background: #fff;
}

.ship-rule-card__title {
  font-size: 13px;
  font-weight: 600;
  line-height: 20px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ship-text-muted);
  margin-bottom: 12px;
}

.ship-rule-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: baseline;
  font-size: 14px;
  line-height: 20px;
  padding: 6px 0;
  border-bottom: 1px dashed rgba(226, 232, 240, 0.9);
}

.ship-rule-row:last-child {
  border-bottom: none;
}

.ship-rule-row strong {
  color: var(--ship-text);
  font-weight: 600;
}

.ship-rule-row--meta {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(226, 232, 240, 0.9);
  border-bottom: none;
}

.ship-token-row {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 6px 0;
}

.ship-token-bar {
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(0, 146, 228, 0.35), rgba(0, 17, 123, 0.2));
}

.ship-type-sample {
  padding: 8px 0;
  border-bottom: 1px dashed rgba(226, 232, 240, 0.9);
  color: var(--ship-text);
}
.ship-type-sample:last-child { border-bottom: none; }

.ship-type-sample--title { font-size: 32px; font-weight: 700; line-height: 40px; }
.ship-type-sample--section { font-size: 24px; font-weight: 600; line-height: 32px; }
.ship-type-sample--kpi { font-size: 36px; font-weight: 700; line-height: 40px; }
.ship-type-sample--card { font-size: 18px; font-weight: 600; line-height: 24px; }
.ship-type-sample--tablehead { font-size: 13px; font-weight: 600; line-height: 20px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ship-text-muted); }
.ship-type-sample--cell { font-size: 14px; font-weight: 400; line-height: 20px; color: var(--ship-text-muted); }

@media (max-width: 900px) {
  .ship-rules-grid {
    grid-template-columns: 1fr;
  }
}

/* Grid overlay */
.ship-grid-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.ship-grid-overlay.is-visible {
  opacity: 1;
}

.ship-grid-overlay__inner {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  margin-left: 80px; /* aligns with existing .viewport left offset */
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
  background: transparent;
}

.ship-grid-overlay__cols {
  height: 100%;
  display: grid;
  grid-template-columns: repeat(var(--grid-columns), 1fr);
  gap: var(--grid-gutter);
}

.ship-grid-overlay__col {
  background: rgba(0, 146, 228, 0.06);
  border-left: 1px solid rgba(0, 146, 228, 0.12);
  border-right: 1px solid rgba(0, 146, 228, 0.12);
}

/* ── Multi-dashboard: home, switcher, library, related ── */
.ship-dash-home-subheader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin: -12px 0 24px;
}

.ship-dash-home-subheader__controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ship-dash-view-toggle {
  display: inline-flex;
  border: 1px solid var(--ship-border);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.ship-dash-view-toggle__btn {
  width: 38px;
  height: 36px;
  border: none;
  background: transparent;
  color: var(--ship-text-muted);
  cursor: pointer;
}

.ship-dash-view-toggle__btn.is-active {
  background: rgba(0, 146, 228, 0.1);
  color: var(--ship-primary);
}

.ship-dash-home-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.ship-dash-home-search {
  flex: 1;
  min-width: 240px;
  max-width: 480px;
}

.ship-dash-home-tabs {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ship-dash-home-tab {
  height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--ship-border);
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: var(--ship-text-muted);
  cursor: pointer;
}

.ship-dash-home-tab.is-active {
  background: var(--ship-primary);
  border-color: var(--ship-primary);
  color: #fff;
}

.ship-dash-home-section {
  margin-bottom: 36px;
}

.ship-dash-home-section__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ship-text);
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ship-dash-home-section__icon {
  line-height: 1;
  flex-shrink: 0;
}

.ship-dash-home-section__count {
  font-weight: 600;
  color: var(--ship-text-muted);
}

.ship-dash-home-section__empty {
  font-size: 13px;
  color: var(--ship-text-muted);
  margin: 0;
}

.ship-dash-home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.ship-dash-home-empty {
  text-align: center;
  padding: 32px;
  color: var(--ship-text-muted);
  font-size: 14px;
}

.ship-dash-card {
  background: var(--ship-card);
  border: 1px solid var(--ship-border);
  border-radius: var(--ship-radius);
  box-shadow: var(--ship-shadow);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.ship-dash-card:hover {
  box-shadow: var(--ship-shadow-hover);
  transform: translateY(-1px);
}

.ship-dash-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ship-dash-card__top-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.ship-dash-card__star {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: #cbd5e1;
  cursor: pointer;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ship-dash-card__top-actions .tableGridAction {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  cursor: pointer;
}

.ship-dash-card__link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ship-dash-card__star.is-starred,
.ship-dash-star-btn.is-starred {
  color: #f59e0b;
}

.ship-dash-card__star {
  line-height: 0;
}

.ship-dash-home-section__title .svgViewMore,
.ship-dash-home-section__title svg {
  flex-shrink: 0;
}

.ship-dash-card__vis {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--ship-text-muted);
}

.ship-dash-card__vis--organization {
  background: rgba(0, 146, 228, 0.1);
  color: var(--ship-primary);
}

.ship-dash-card__vis--team {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
}

.ship-dash-card__name {
  font-size: 16px;
  font-weight: 800;
  margin: 0;
  color: var(--ship-text);
}

.ship-dash-card__desc {
  font-size: 13px;
  line-height: 18px;
  color: var(--ship-text-muted);
  margin: 0;
  flex: 1;
}

.ship-dash-card__modules {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ship-dash-chip {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 17, 123, 0.06);
  color: rgba(0, 17, 123, 0.85);
}

.ship-dash-chip--muted {
  background: #f1f5f9;
  color: var(--ship-text-muted);
}

.ship-dash-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 4px;
}

.ship-dash-card__author {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.ship-dash-card__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 146, 228, 0.12);
  color: var(--ship-primary);
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ship-dash-card__author-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.ship-dash-card__author-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--ship-text);
}

.ship-dash-card__updated,
.ship-dash-card__panels {
  font-size: 12px;
  color: var(--ship-text-muted);
}

.ship-dash-card__panels {
  flex-shrink: 0;
  white-space: nowrap;
}

.ship-dash-card__open {
  margin-top: 2px;
  width: 100%;
  text-align: center;
  text-decoration: none;
}

.ship-dashboard__header--builder {
  align-items: center;
}

.ship-dash-builder-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.ship-dash-switcher-label {
  margin: 0;
  font-size: 12px;
  white-space: nowrap;
}

.ship-dash-switcher {
  min-width: 220px;
  max-width: 360px;
  height: 40px;
}

.ship-dash-star-btn {
  width: 44px;
  padding: 0;
  justify-content: center;
}

.ship-dash-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ship-text-muted);
}

.ship-dash-meta-modules {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: 4px;
}

.ship-dash-meta-sep {
  opacity: 0.5;
}

.ship-related-strip {
  margin-bottom: 24px;
  padding: 16px 18px;
  border-radius: var(--ship-radius);
  border: 1px solid rgba(0, 146, 228, 0.2);
  background: rgba(0, 146, 228, 0.04);
}

.ship-related-strip__title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ship-text);
}

.ship-related-strip__list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.ship-related-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid var(--ship-border);
  border-radius: var(--ship-radius-sm);
  flex: 1 1 280px;
  max-width: 100%;
}

.ship-related-item__name {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--ship-text);
}

.ship-related-item__sub {
  display: block;
  font-size: 12px;
  color: var(--ship-text-muted);
}

.ship-library-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 2100;
}

.ship-library-modal {
  position: fixed;
  inset: 0;
  z-index: 2110;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  pointer-events: none;
}

.ship-library-modal__panel {
  pointer-events: auto;
  width: min(720px, 100%);
  max-height: min(80vh, 640px);
  background: #fff;
  border-radius: var(--ship-radius);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ship-library-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 20px 12px;
  gap: 12px;
}

.ship-library-modal__title {
  font-size: 18px;
  font-weight: 800;
  margin: 0;
  color: var(--ship-text);
}

.ship-library-modal__sub {
  font-size: 13px;
  color: var(--ship-text-muted);
  margin: 6px 0 0;
}

.ship-library-modal__filters {
  display: flex;
  gap: 12px;
  padding: 0 20px 12px;
  flex-wrap: wrap;
}

.ship-library-modal__body {
  overflow-y: auto;
  padding: 8px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ship-library-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--ship-border);
  border-radius: var(--ship-radius-sm);
}

.ship-library-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(0, 146, 228, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ship-primary);
  flex-shrink: 0;
}

.ship-library-card__body {
  flex: 1;
  min-width: 0;
}

.ship-library-card__name {
  font-size: 14px;
  font-weight: 700;
  color: var(--ship-text);
}

.ship-library-card__meta {
  font-size: 12px;
  color: var(--ship-text-muted);
  margin-top: 2px;
}

.ship-library-card__tags {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.ship-library-empty {
  padding: 24px;
  text-align: center;
  color: var(--ship-text-muted);
  font-size: 14px;
}

.ship-link-btn {
  border: none;
  background: none;
  padding: 0;
  color: var(--ship-primary-light);
  font-size: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

/* Demo act-as user + restricted panels */
.ship-act-as {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ship-act-as__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ship-text-muted);
  margin: 0;
  white-space: nowrap;
}

.ship-act-as__select {
  min-width: 160px;
  height: 40px;
  font-size: 13px;
}

.ship-widget--restricted {
  border-style: dashed;
  background: #f8fafc;
}

.ship-widget__body--restricted {
  min-height: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  color: var(--ship-text-muted);
}

.ship-widget__body--restricted .fa-lock {
  font-size: 22px;
  color: #94a3b8;
}

.ship-widget__restricted-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ship-text);
}

.ship-widget__restricted-sub {
  font-size: 13px;
  line-height: 18px;
  max-width: 240px;
}

.ship-dashboard-overview__row:last-child {
  margin-bottom: 0;
}

.ship-dashboard-overview .ship-add-report-card {
  width: 100%;
  min-height: 140px;
}

.ship-dashboard-overview [class*='col-'] .ship-add-report-card {
  min-height: 180px;
}

.ship-dashboard-overview .ship-widget--empty .ship-widget__body {
  padding: 0;
  border: none;
  background: transparent;
}

.ship-dashboard-overview .ship-widget--empty .ship-widget__body--chart {
  min-height: 220px;
}

.ship-dashboard-overview .ship-widget--tall .ship-widget__body--chart {
  min-height: 280px;
}

.ship-dashboard-overview .ship-dashboard__kpi-grid .ship-dashboard-overview__slot-wrap,
.ship-dashboard-overview .ship-dashboard__chart-grid .ship-dashboard-overview__slot-wrap {
  min-width: 0;
}

.ship-dashboard-overview .ship-dashboard__kpi-grid .ship-add-report-card {
  min-height: 112px;
}

.ship-dashboard-overview .ship-dashboard__kpi-grid .ship-add-report-card__inner {
  padding: 12px 14px;
  gap: 8px;
}

.ship-dashboard-overview .ship-dashboard__kpi-grid .ship-add-report-card__title {
  font-size: 13px;
}

.ship-dashboard-overview .ship-dashboard__kpi-grid .ship-add-report-card__sub {
  font-size: 11px;
}

.ship-dashboard-overview .ship-dashboard__chart-grid .ship-widget--empty .ship-widget__body--chart {
  min-height: 220px;
}

.ship-dashboard-overview .ship-dashboard__chart-grid .ship-widget--panel .ship-widget__body {
  min-height: 220px;
}

/* Edit mode — compact, consistent empty slot heights (avoid 580px filled-widget sizing) */
.ship-dashboard-overview--edit .ship-dashboard__chart-grid {
  margin-bottom: 16px;
}

/* Edit chart-grid — use compact cards, not preview 580px stretch */
.ship-dashboard-overview--edit .ship-dashboard__chart-grid .ship-report-widget--chart > .ship-widget,
.ship-dashboard-overview--edit .ship-dashboard__chart-grid .ship-report-widget--chart .ship-report-widget-loading.ship-widget {
  flex: 0 0 auto;
  align-self: stretch;
  width: 100%;
  height: 320px;
  min-height: 320px;
  max-height: 320px;
}

.ship-dashboard-overview--edit .ship-dashboard__chart-grid .ship-report-widget--chart .ship-widget__body--chart {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  max-height: none;
  padding: 0 12px 8px;
}

.ship-dashboard-overview--edit .ship-dashboard__chart-grid .ship-report-widget--chart .ship-report-chart {
  flex: 1;
  min-height: 0;
  height: 100%;
}

.ship-dashboard-overview--edit .ship-dashboard__chart-grid.ship-dashboard-overview__row--all-empty
  .ship-dashboard-overview__slot-wrap--empty,
.ship-dashboard-overview--edit .ship-dashboard-overview__row--all-empty
  .ship-dashboard-overview__col--empty.col-6 {
  min-height: 0;
  height: auto;
}

.ship-dashboard-overview--edit .ship-dashboard-overview__slot--empty {
  display: flex;
  flex-direction: column;
  min-height: 240px;
}

.ship-dashboard-overview--edit .ship-dashboard-overview__slot--empty .ship-widget--empty,
.ship-dashboard-overview--edit .ship-dashboard-overview__slot--empty > .ship-add-report-card {
  flex: 1;
  width: 100%;
  min-height: 240px;
  display: flex;
  flex-direction: column;
}

.ship-dashboard-overview--edit .ship-dashboard-overview__slot--empty .ship-widget__body,
.ship-dashboard-overview--edit .ship-dashboard-overview__slot--empty .ship-add-report-card__inner,
.ship-dashboard-overview--edit .ship-dashboard-overview__slot--empty .ship-panel-slot {
  flex: 1;
  width: 100%;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.ship-dashboard-overview--edit .ship-dashboard-overview__slot--empty .ship-widget--empty .ship-widget__body--chart,
.ship-dashboard-overview--edit .ship-dashboard-overview__slot--empty .ship-widget--panel .ship-widget__body {
  min-height: 200px;
  height: auto;
}

.ship-dashboard-overview--edit .ship-dashboard-overview__row--all-empty
  .ship-dashboard-overview__col--empty {
  min-height: 240px;
}

.ship-panel-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px 16px;
  min-height: 200px;
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
}

.ship-panel-slot__label {
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  text-align: center;
}

.ship-panel-slot__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  width: 100%;
}

.ship-panel-slot__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  color: #00117b;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.ship-panel-slot__btn:hover {
  border-color: #0092e4;
  background: #eef8ff;
  box-shadow: 0 2px 8px rgba(0, 146, 228, 0.12);
}

.ship-panel-slot__btn i {
  color: #0092e4;
  font-size: 15px;
}

/* ==========================================================================
   Dashboard New — Layout selection modal (DashboardLayoutChooser)
   Kept at end of file so these rules win over earlier dashboard styles.
   Component: src/Containers/DashboardNewContainer/components/DashboardLayoutChooser
   ========================================================================== */

/* --- Modal shell (rendered outside .ship-dashboard; local tokens required) --- */
.ship-expand-modal--layout-chooser {
  align-items: center;
  overflow-y: auto;
}

.ship-layout-chooser__panel {
  --ship-primary: #00117b;
  --ship-primary-light: #0092e4;
  --ship-accent: #ff6b32;
  --ship-border: #e2e8f0;
  --ship-text: #00117b;
  --ship-text-muted: #64748b;
  --ship-shadow: 0px 1px 2px rgba(0, 0, 0, 0.04), 0px 4px 10px rgba(0, 0, 0, 0.05);

  width: min(1080px, 96vw);
  height: min(820px, 92vh);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.ship-layout-chooser__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 20px 24px;
}

.ship-layout-chooser__footer {
  flex: 0 0 auto;
  padding: 14px 18px;
  border-top: 1px solid var(--ship-border);
  background: #fff;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 2;
}

.ship-layout-chooser__footer .btn.primary_bg:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* --- Layout option cards --- */
.ship-layout-picker-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ship-layout-picker-card {
  position: relative;
  text-align: left;
  border: 2px solid var(--ship-border);
  border-radius: 14px;
  background: #fff;
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  align-items: stretch;
}

.ship-layout-picker-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: linear-gradient(180deg, #00117b 0%, #0092e4 100%);
  transition: width 0.2s ease;
  z-index: 1;
}

.ship-layout-picker-card:hover:not(.is-active) {
  border-color: #94c8eb;
  box-shadow: var(--ship-shadow);
}

.ship-layout-picker-card.is-active {
  /* border-color: #0092e4;
  background: linear-gradient(135deg, #eef8ff 0%, #ffffff 62%); */
  box-shadow:
    0 0 0 4px rgba(0, 146, 228, 0.18),
    0 10px 28px rgba(0, 17, 123, 0.1);
}
/* 
.ship-layout-picker-card.is-active::before {
  width: 3px;
} */

.ship-layout-picker-card__preview-wrap {
  position: relative;
  padding: 14px;
  background: #f1f5f9;
  border-right: 1px solid var(--ship-border);
  min-height: 130px;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.ship-layout-picker-card.is-active .ship-layout-picker-card__preview-wrap {
  background: #dff1fc;
  border-right-color: #b8d9f0;
}

.ship-layout-picker-card__selected {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 800;
  padding: 5px 10px;
  border-radius: 999px;
  background: #0092e4;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 146, 228, 0.35);
}

.ship-layout-picker-card__info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
}

.ship-layout-picker-card__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(0, 146, 228, 0.1);
  color: var(--ship-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.ship-layout-picker-card__icon.is-active {
  background: #0092e4;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 146, 228, 0.35);
}

.ship-layout-picker-card__copy {
  flex: 1;
  min-width: 0;
}

.ship-layout-picker-card__name {
  font-size: 15px;
  font-weight: 800;
  color: var(--ship-text);
  line-height: 20px;
}

.ship-layout-picker-card.is-active .ship-layout-picker-card__name {
  color: #00117b;
}

.ship-layout-picker-card__desc {
  margin-top: 4px;
  font-size: 12px;
  line-height: 17px;
  color: var(--ship-text-muted);
}

.ship-layout-picker-card__radio {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #fff;
  background: #fff;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.ship-layout-picker-card__radio.is-checked {
  border-color: #0092e4;
  background: #0092e4;
  box-shadow: 0 0 0 4px rgba(0, 146, 228, 0.22);
}

@media (max-width: 640px) {
  .ship-layout-picker-card {
    grid-template-columns: 1fr;
  }

  .ship-layout-picker-card__preview-wrap {
    border-right: none;
    border-bottom: 1px solid var(--ship-border);
  }
}




/* --- Layout wireframe previews (LayoutPreview.js) --- */
.ship-layout-preview {
  display: flex;
  flex-direction: column;
  gap: 7px;
  height: 100%;
  min-height: 102px;
  padding: 12px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.ship-layout-preview__row {
  display: grid;
  gap: 7px;
}

.ship-layout-preview__block {
  position: relative;
  display: block;
  border-radius: 6px;
  background: #e8eef5;
  border: 1px solid rgba(148, 163, 184, 0.25);
  overflow: hidden;
  min-height: 14px;
}

.ship-layout-preview__block--kpi {
  min-height: 22px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.ship-layout-preview__block--kpi::before {
  content: '';
  position: absolute;
  top: 5px;
  left: 6px;
  right: 20px;
  height: 3px;
  border-radius: 2px;
  background: rgba(0, 17, 123, 0.12);
}

.ship-layout-preview__block--kpi::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 6px;
  right: 6px;
  height: 7px;
  border-radius: 3px;
  background: linear-gradient(90deg, rgba(0, 146, 228, 0.15) 0%, rgba(0, 146, 228, 0.35) 55%, rgba(0, 146, 228, 0.1) 100%);
}

.ship-layout-preview__block--trend {
  flex: 1;
  min-height: 44px;
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
}

.ship-layout-preview__block--trend::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 10px;
  width: 36%;
  height: 4px;
  border-radius: 2px;
  background: rgba(0, 17, 123, 0.1);
}

.ship-layout-preview__block--trend::after {
  content: '';
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 10px;
  height: 18px;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, rgba(0, 146, 228, 0.28) 0%, rgba(0, 146, 228, 0.04) 100%);
  clip-path: polygon(0% 80%, 18% 55%, 36% 62%, 54% 38%, 72% 48%, 90% 22%, 100% 30%, 100% 100%, 0% 100%);
}

.ship-layout-preview__block--chart {
  min-height: 36px;
  background: #fff;
}

.ship-layout-preview__block--chart::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 22px;
  height: 22px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 5px solid rgba(0, 146, 228, 0.2);
  border-top-color: rgba(0, 146, 228, 0.55);
  border-right-color: rgba(0, 146, 228, 0.35);
}

.ship-layout-preview__block--table {
  min-height: 38px;
  background: #fff;
  padding: 8px;
}

.ship-layout-preview__block--table::before,
.ship-layout-preview__block--table::after {
  content: '';
  display: block;
  height: 4px;
  border-radius: 2px;
  background: rgba(0, 17, 123, 0.08);
}

.ship-layout-preview__block--table::after {
  margin-top: 5px;
  width: 72%;
}

.ship-layout-preview--dashboard_kpi_table .ship-layout-preview__block--table,
.ship-layout-preview--single_table .ship-layout-preview__block--table,
.ship-layout-preview--dashboard_single_table .ship-layout-preview__block--table {
  min-height: 52px;
}

.ship-layout-preview--two_column .ship-layout-preview__row,
.ship-layout-preview--dashboard_two_column .ship-layout-preview__row {
  min-height: 56px;
}

.ship-layout-preview--kpi .ship-layout-preview__row,
.ship-layout-preview--dashboard_kpi .ship-layout-preview__row {
  min-height: 26px;
}

.ship-layout-preview--single_chart .ship-layout-preview__row,
.ship-layout-preview--dashboard_single_chart .ship-layout-preview__row {
  min-height: 72px;
}

.ship-layout-preview--single_chart .ship-layout-preview__block--trend,
.ship-layout-preview--dashboard_single_chart .ship-layout-preview__block--trend {
  min-height: 64px;
}

.ship-layout-preview--overview .ship-layout-preview__row,
.ship-layout-preview--dashboard_overview .ship-layout-preview__row {
  min-height: 18px;
}

.ship-layout-column-card .ship-layout-preview--overview,
.ship-layout-column-card .ship-layout-preview--dashboard_overview {
  min-height: 120px;
}

/* --- Column layout picker (4 / 3 / 2 / 1 boxes per row) --- */
.ship-layout-column-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.ship-layout-column-grid--templates,
.ship-layout-column-grid--layout-type {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ship-layout-chooser__panel--layout-type {
  width: min(800px, 96vw);
  height: min(580px, 90vh);
}

@media (max-width: 900px) {
  .ship-layout-column-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .ship-layout-column-grid {
    grid-template-columns: 1fr;
  }
}

.ship-layout-column-card {
  position: relative;
  text-align: left;
  border: 2px solid var(--ship-border);
  border-radius: 14px;
  background: #fff;
  padding: 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 200px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.ship-layout-column-card:not(.ship-layout-column-card--custom) {
  min-height: 300px;
}

.ship-layout-column-card__preview-wrap {
  flex-shrink: 0;
  width: 100%;
  min-height: 180px;
}

.ship-layout-column-card .ship-layout-preview--custom {
  height: 100px;
  min-height: 100px;
  max-height: 100px;
  box-sizing: border-box;
}

.ship-layout-column-card--custom {
  border-style: dashed;
}

.ship-layout-preview--custom {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100px;
  background: #f8fafc;
  border-style: dashed;
}

.ship-layout-preview__custom-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(0, 146, 228, 0.12);
  color: #0092e4;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.ship-layout-column-card .ship-layout-preview--template_standard,
.ship-layout-column-card .ship-layout-preview--template_kpi_table {
  width: 100%;
  height: 180px;
  min-height: 180px;
  max-height: 180px;
  padding: 10px;
  gap: 6px;
  box-sizing: border-box;
  flex-shrink: 0;
  overflow: hidden;
}

.ship-layout-preview--template_standard {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  height: auto;
  min-height: 0;
}

.ship-layout-preview--template_standard .ship-layout-preview__row {
  min-height: 0;
  flex-shrink: 0;
  align-items: stretch;
}

.ship-layout-preview--template_standard .ship-layout-preview__row:nth-child(1) {
  height: 22px;
  min-height: 22px;
}

.ship-layout-preview--template_standard .ship-layout-preview__row:nth-child(2) {
  height: 44px;
  min-height: 44px;
}

.ship-layout-preview--template_standard .ship-layout-preview__row:nth-child(3) {
  height: 34px;
  min-height: 34px;
}

.ship-layout-preview--template_standard .ship-layout-preview__row:nth-child(4) {
  height: 42px;
  min-height: 42px;
}

.ship-layout-preview--template_standard .ship-layout-preview__block {
  min-height: 0;
  height: 100%;
}

.ship-layout-preview--template_standard .ship-layout-preview__block--kpi {
  min-height: 0;
}

.ship-layout-preview--template_standard .ship-layout-preview__block--trend {
  min-height: 0;
  flex: none;
}

.ship-layout-preview--template_standard .ship-layout-preview__block--chart {
  min-height: 0;
}

.ship-layout-preview--template_standard .ship-layout-preview__block--table {
  min-height: 0;
  padding: 5px 6px;
}

/* --- Create dashboard form --- */
.ship-dash-create {
  display: flex;
  justify-content: center;
  padding: 32px 20px 48px;
}

.ship-dash-create__card {
  width: min(520px, 100%);
  padding: 28px 28px 24px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.ship-dash-create__title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #00117b;
}

.ship-dash-create__sub {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: #64748b;
}

.ship-dash-create__form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 22px;
}

.ship-dash-create__textarea {
  height: auto;
  min-height: 88px;
  padding: 12px;
  resize: vertical;
}

.ship-dash-create__fieldset {
  margin: 0;
  padding: 0;
  border: none;
}

.ship-dash-create__fieldset .ship-form-label {
  margin-bottom: 4px;
}

.ship-dash-create__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
  padding-top: 8px;
}

.ship-dashboard-custom__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 24px 64px;
  min-height: 360px;
}

.ship-dashboard-custom__empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: rgba(0, 146, 228, 0.1);
  color: #0092e4;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 16px;
}

.ship-dashboard-custom__empty-title {
  font-size: 20px;
  font-weight: 700;
  color: #00117b;
  margin: 0 0 8px;
}

.ship-dashboard-custom__empty-desc {
  font-size: 14px;
  color: #64748b;
  max-width: 420px;
  margin: 0 0 20px;
  line-height: 1.5;
}

.ship-dashboard-custom__empty-actions {
  display: flex;
  justify-content: center;
  margin-top: -4px;
  margin-bottom: 8px;
}

.ship-dashboard-composite .ship-dashboard-custom__section {
  margin-top: 8px;
}

.ship-dashboard-custom__section + .ship-dashboard-custom__section {
  margin-top: 8px;
}

.ship-dashboard-custom--edit .ship-dashboard-sections--sortable {
  gap: 32px;
}

.ship-dashboard-custom--edit .ship-dashboard-sections--sortable .ship-dashboard-custom__section + .ship-dashboard-custom__section {
  margin-top: 0;
}

.ship-dashboard-custom__section--editable {
  position: relative;
}

.ship-dashboard-custom__section-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  padding: 4px 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.ship-dashboard-custom__section--editable:hover .ship-dashboard-custom__section-toolbar,
.ship-dashboard-custom__section--editable:focus-within .ship-dashboard-custom__section-toolbar {
  opacity: 1;
  pointer-events: auto;
}

.ship-dashboard-custom__section-label {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--ship-muted, #64748b);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ship-dashboard-custom__section-remove {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #dc2626;
}

.ship-dashboard-custom__section-remove:hover {
  color: #b91c1c;
  background: rgba(220, 38, 38, 0.08);
}

@media (hover: none) {
  .ship-dashboard-custom__section-toolbar {
    opacity: 1;
    pointer-events: auto;
  }

  .ship-slot__drag-handle,
  .ship-layout-row__drag-handle {
    opacity: 1;
    pointer-events: auto;
  }
}

.ship-dashboard-custom__add-row {
  display: flex;
  justify-content: center;
  padding: 20px 0 32px;
}

.ship-dashboard-custom__add-btn {
  border-style: dashed;
  min-width: 180px;
}

.ship-dashboard__header--active {
  margin-bottom: 16px;
}

/* --- Compact section picker (custom dashboard "Add layout") --- */
.ship-expand-modal--section-picker {
  align-items: center;
}

.ship-layout-chooser__panel--section {
  width: min(420px, 92vw);
  height: auto;
  max-height: none;
  padding: 0;
  overflow: visible;
}

.ship-section-picker__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 12px;
  border-bottom: 1px solid #e2e8f0;
}

.ship-section-picker__title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #00117b;
}

.ship-section-picker__close {
  padding: 6px 10px;
  min-width: 0;
}

.ship-section-layout-list {
  list-style: none;
  margin: 0;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ship-section-layout-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  box-sizing: border-box;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.ship-section-layout-item:hover {
  border-color: #0092e4;
  background: #f0f9ff;
}

.ship-section-layout-item__thumb {
  flex-shrink: 0;
  position: relative;
  width: 72px;
  height: 40px;
  border-radius: 6px;
  overflow: hidden;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}

/* Miniature of the same wireframe previews used in the template layout chooser */
.ship-section-layout-item__thumb .ship-layout-preview--thumb {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 118px;
  min-height: 0;
  height: auto;
  padding: 7px;
  gap: 5px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transform: translate(-50%, -50%) scale(0.56);
  transform-origin: center center;
  pointer-events: none;
}

.ship-section-layout-item__thumb .ship-layout-preview__row {
  gap: 4px;
  min-height: 0;
}

.ship-section-layout-item__thumb .ship-layout-preview--kpi .ship-layout-preview__row,
.ship-section-layout-item__thumb .ship-layout-preview--dashboard_kpi .ship-layout-preview__row {
  min-height: 24px;
}

.ship-section-layout-item__thumb .ship-layout-preview--two_column .ship-layout-preview__row,
.ship-section-layout-item__thumb .ship-layout-preview--dashboard_two_column .ship-layout-preview__row {
  min-height: 44px;
}

.ship-section-layout-item__thumb .ship-layout-preview--single_chart .ship-layout-preview__row,
.ship-section-layout-item__thumb .ship-layout-preview--dashboard_single_chart .ship-layout-preview__row {
  min-height: 48px;
}

.ship-section-layout-item__thumb .ship-layout-preview--single_table .ship-layout-preview__row,
.ship-section-layout-item__thumb .ship-layout-preview--dashboard_single_table .ship-layout-preview__row {
  min-height: 44px;
}

.ship-section-layout-item__thumb .ship-layout-preview__block--kpi {
  min-height: 20px;
}

.ship-section-layout-item__thumb .ship-layout-preview__block--trend {
  min-height: 40px;
}

.ship-section-layout-item__thumb .ship-layout-preview__block--chart,
.ship-section-layout-item__thumb .ship-layout-preview__block--panel {
  min-height: 36px;
}

.ship-section-layout-item__thumb .ship-layout-preview__block--table {
  min-height: 36px;
  padding: 6px;
}

.ship-section-layout-item:hover .ship-section-layout-item__thumb {
  border-color: #94c8eb;
  background: #eef8ff;
}

.ship-section-layout-item__label {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  color: #00117b;
}

.ship-section-layout-item__add {
  flex-shrink: 0;
  font-size: 12px;
  color: #94a3b8;
  transition: color 0.15s ease;
}

.ship-section-layout-item:hover .ship-section-layout-item__add {
  color: #0092e4;
}

/* --- Widget picker (custom dashboard "Add widget") --- */
.ship-layout-chooser__panel--widget-picker {
  width: min(560px, 94vw);
  height: auto;
  max-height: min(90vh, 720px);
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.ship-widget-picker__head {
  align-items: flex-start;
  gap: 12px;
}

.ship-widget-picker__subtitle {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 500;
  color: #64748b;
}

.ship-widget-picker__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 18px 0;
}

.ship-widget-picker__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ship-widget-picker__card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  min-height: 0;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.ship-widget-picker__card:hover:not(.is-active) {
  border-color: #94c8eb;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.ship-widget-picker__card.is-active {
  border-color: #0092e4;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0, 146, 228, 0.14);
}

.ship-widget-picker__card-preview {
  position: relative;
  height: 76px;
  border-radius: 8px;
  overflow: hidden;
  background: transparent;
  border: none;
}

.ship-widget-picker__card-preview .ship-layout-preview--picker-fill {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  gap: 6px;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.ship-widget-picker__card-preview .ship-layout-preview--picker-fill .ship-layout-preview__row {
  flex: 1;
  min-height: 0;
  align-items: stretch;
  gap: 5px;
}

.ship-widget-picker__card-preview .ship-layout-preview--picker-fill .ship-layout-preview__block {
  min-height: 0;
  height: 100%;
}

.ship-widget-picker__card-preview .ship-layout-preview--picker-fill .ship-layout-preview__block--kpi {
  min-height: 0;
}

.ship-widget-picker__card-preview .ship-layout-preview--picker-fill .ship-layout-preview__block--trend,
.ship-widget-picker__card-preview .ship-layout-preview--picker-fill .ship-layout-preview__block--chart,
.ship-widget-picker__card-preview .ship-layout-preview--picker-fill .ship-layout-preview__block--table,
.ship-widget-picker__card-preview .ship-layout-preview--picker-fill .ship-layout-preview__block--panel {
  min-height: 0;
}

.ship-widget-picker__card-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  padding-right: 28px;
}

.ship-widget-picker__card-name {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  color: #00117b;
}

.ship-widget-picker__card-desc {
  font-size: 11px;
  line-height: 1.35;
  color: #64748b;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ship-widget-picker__card-radio {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #fff;
  background: #fff;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.ship-widget-picker__card-radio.is-checked {
  border-color: #0092e4;
  background: #0092e4;
  box-shadow: 0 0 0 3px rgba(0, 146, 228, 0.2);
}

.ship-widget-picker__config {
  margin-top: 16px;
  padding: 14px 0 16px;
  border-top: 1px solid #e2e8f0;
}

.ship-widget-picker__config-head {
  margin-bottom: 12px;
}

.ship-widget-picker__config-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.ship-widget-picker__hint {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.45;
  color: #64748b;
  background: #f8fafc;
  border: 1px dashed #e2e8f0;
}

.ship-widget-picker__fields {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ship-widget-picker__select {
  cursor: pointer;
  appearance: auto;
}

.ship-widget-picker__segment {
  display: inline-flex;
  align-self: flex-start;
  padding: 3px;
  border-radius: 12px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  gap: 4px;
}

.ship-widget-picker__segment-btn {
  min-width: 44px;
  height: 36px;
  padding: 0 14px;
  border: none;
  border-radius: 9px;
  background: transparent;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  color: #64748b;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.ship-widget-picker__segment-btn:hover:not(.is-active) {
  color: #00117b;
  background: rgba(255, 255, 255, 0.7);
}

.ship-widget-picker__segment-btn.is-active {
  color: #00117b;
  background: #fff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.1);
}

.ship-widget-picker__footer {
  flex-shrink: 0;
  margin-top: 0;
  border-top: 1px solid #e2e8f0;
  background: #fff;
}

@media (max-width: 520px) {
  .ship-widget-picker__grid {
    grid-template-columns: 1fr;
  }
}

.ship-layout-column-card:hover:not(.is-active) {
  border-color: #94c8eb;
  box-shadow: var(--ship-shadow);
}

.ship-layout-column-card.is-active {
  border-color: #0092e4;
  background: linear-gradient(135deg, #eef8ff 0%, #ffffff 62%);
  box-shadow:
    0 0 0 4px rgba(0, 146, 228, 0.18),
    0 10px 28px rgba(0, 17, 123, 0.1);
}

.ship-layout-column-card__selected {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 800;
  padding: 5px 10px;
  border-radius: 999px;
  background: #0092e4;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 146, 228, 0.35);
}

.ship-layout-column-card__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  position: relative;
  padding-right: 28px;
}

.ship-layout-column-card__icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(0, 146, 228, 0.1);
  color: var(--ship-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  margin-bottom: 2px;
  transition: background 0.2s ease, color 0.2s ease;
}

.ship-layout-column-card__icon.is-active {
  background: #0092e4;
  color: #fff;
}

.ship-layout-column-card__name {
  font-size: 15px;
  font-weight: 800;
  color: var(--ship-text);
  line-height: 20px;
}

.ship-layout-column-card__desc {
  font-size: 12px;
  line-height: 17px;
  color: var(--ship-text-muted);
}

.ship-layout-column-card__radio {
  position: absolute;
  right: 0;
  bottom: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #fff;
  background: #fff;
}

.ship-layout-column-card__radio.is-checked {
  border-color: #0092e4;
  background: #0092e4;
  box-shadow: 0 0 0 3px rgba(0, 146, 228, 0.2);
}

.ship-layout-preview--columns {
  min-height: 56px;
}

.ship-layout-preview__block--slot {
  min-height: 40px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.ship-layout-preview__block--panel {
  min-height: 48px;
  background: linear-gradient(
    180deg,
    rgba(0, 146, 228, 0.12) 0%,
    rgba(0, 146, 228, 0.12) 48%,
    rgba(0, 17, 123, 0.1) 52%,
    rgba(0, 17, 123, 0.1) 100%
  );
}

.ship-layout-preview__block--panel::before {
  content: '';
  position: absolute;
  left: 12%;
  right: 12%;
  top: 22%;
  height: 3px;
  border-radius: 2px;
  background: rgba(0, 146, 228, 0.35);
  box-shadow: 0 8px 0 rgba(0, 146, 228, 0.2), 0 16px 0 rgba(0, 146, 228, 0.12);
}

.ship-layout-preview__block--panel::after {
  content: '';
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 18%;
  height: 4px;
  border-radius: 2px;
  background: rgba(0, 17, 123, 0.15);
  box-shadow: 0 7px 0 rgba(0, 17, 123, 0.1);
}

/* ── Dashboard home catalog (/dashboard-new) ── */
.ship-dash-home-page__body {
  padding-bottom: var(--space-xl);
}

.ship-dash-home-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.ship-dash-home-stat {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: var(--ship-card);
  border: 1px solid var(--ship-border);
  border-radius: var(--ship-radius-sm);
  box-shadow: var(--ship-shadow);
}

.ship-dash-home-stat__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(0, 146, 228, 0.1);
  color: var(--ship-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.ship-dash-home-stat__value {
  font-size: 24px;
  font-weight: 800;
  color: var(--ship-text);
  margin: 0;
  line-height: 1.1;
}

.ship-dash-home-stat__label {
  font-size: 12px;
  color: var(--ship-text-muted);
  margin: 2px 0 0;
}

.ship-dash-card__icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.ship-dash-card__title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-right: 4px;
}

.ship-dash-chip--default {
  background: rgba(0, 146, 228, 0.12);
  color: var(--ship-primary);
}

.ship-dash-skeleton {
  background: linear-gradient(90deg, #f1f5f9 25%, #e8eef5 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: ship-dash-skeleton 1.2s ease-in-out infinite;
}

@keyframes ship-dash-skeleton {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.ship-dash-home-error {
  padding: 14px 16px;
  border-radius: 10px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 14px;
  margin-bottom: 16px;
}

.ship-dash-back-btn {
  padding: 0 8px;
  min-height: 32px;
  font-size: 13px;
}

.ship-report-library-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ship-expand-modal--report-library .ship-layout-chooser__panel--report-library {
  width: min(640px, 94vw);
}

.ship-expand-modal--report-library .ship-widget-picker__body.ship-report-library {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.ship-report-library {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
}

.ship-report-library__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 8px;
  padding: 4px 10px 4px 0;
  border: 0;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
}

.ship-report-library__back:hover:not(:disabled) {
  color: #0092e4;
}

.ship-report-library__toolbar {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ship-report-library__create {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  background: linear-gradient(180deg, #f0f9ff 0%, #fff 100%);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.ship-report-library__create:hover:not(:disabled) {
  border-color: #0092e4;
  box-shadow: 0 4px 14px rgba(0, 146, 228, 0.12);
}

.ship-report-library__create:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.ship-report-library__create-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #0092e4;
  color: #fff;
  font-size: 14px;
}

.ship-report-library__create-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ship-report-library__create-title {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.ship-report-library__create-desc {
  font-size: 12px;
  color: #64748b;
}

.ship-report-library__create-arrow {
  flex-shrink: 0;
  font-size: 12px;
  color: #94a3b8;
}


.ship-report-library-empty__create {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.ship-report-library__search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  min-height: 42px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  color: #94a3b8;
}

.ship-report-library__search:focus-within {
  border-color: #0092e4;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0, 146, 228, 0.12);
}

.ship-report-library__search-input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font-size: 14px;
  color: #0f172a;
  outline: none;
}

.ship-report-library__search-input::placeholder {
  color: #94a3b8;
}

.ship-report-library-filters__btn {
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.ship-report-library-filters__btn:hover:not(:disabled):not(.is-active) {
  border-color: #cbd5e1;
  color: #334155;
}

.ship-report-library-filters__btn.is-active {
  border-color: #0092e4;
  color: #0092e4;
  background: rgba(0, 146, 228, 0.08);
}

.ship-report-library-list {
  --ship-report-library-list-height: min(420px, 52vh);
  position: relative;
  flex: 1 0 var(--ship-report-library-list-height);
  height: var(--ship-report-library-list-height);
  min-height: var(--ship-report-library-list-height);
  max-height: var(--ship-report-library-list-height);
}

.ship-report-library-list__items,
.ship-report-library-list__items--skeleton,
.ship-report-library-empty {
  height: 100%;
  min-height: 100%;
  max-height: 100%;
  overflow-y: auto;
  box-sizing: border-box;
}

.ship-report-library-list--refreshing .ship-report-library-list__items {
  opacity: 0.55;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.ship-report-library-list__refresh {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #e2e8f0;
  color: #0092e4;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.ship-report-library-list__items {
  list-style: none;
  margin: 0;
  padding: 6px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
}

.ship-report-library-list__item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px;
  border: 0;
  border-radius: 10px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.ship-report-library-list__items > li + li {
  margin-top: 6px;
}

.ship-report-library-list__item:hover:not(:disabled) {
  background: #f0f9ff;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.ship-report-library-list__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-size: 15px;
  background: #eff6ff;
  color: #2563eb;
}

.ship-report-library-list__icon--chart {
  background: #f0fdf4;
  color: #16a34a;
}

.ship-report-library-list__icon--summary {
  background: #faf5ff;
  color: #9333ea;
}

.ship-report-library-list__icon--kpi {
  background: #fff7ed;
  color: #ea580c;
}

.ship-report-library-list__icon--tabular {
  background: #eff6ff;
  color: #2563eb;
}

.ship-report-library-list__content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ship-report-library-list__name {
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ship-report-library-list__meta {
  font-size: 12px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ship-report-library-list__type {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #475569;
  background: #f1f5f9;
}

.ship-report-library-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  background: #f8fafc;
  text-align: center;
  color: #64748b;
}

.ship-report-library-empty i {
  font-size: 28px;
  color: #94a3b8;
}

.ship-report-library-empty p {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #334155;
}

.ship-report-library-empty span {
  font-size: 13px;
}

.ship-report-library-empty--error p {
  color: #b91c1c;
}

.ship-report-library-skeleton__row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 10px;
  background: #fff;
}

.ship-report-library-skeleton__row + .ship-report-library-skeleton__row {
  margin-top: 6px;
}

.ship-report-library-skeleton__icon,
.ship-report-library-skeleton__line {
  display: block;
  border-radius: 8px;
  background: linear-gradient(90deg, #e2e8f0 0%, #f1f5f9 50%, #e2e8f0 100%);
  background-size: 200% 100%;
  animation: ship-report-library-shimmer 1.2s ease-in-out infinite;
}

.ship-report-library-skeleton__icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.ship-report-library-skeleton__copy {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ship-report-library-skeleton__line--title {
  width: 62%;
  height: 14px;
}

.ship-report-library-skeleton__line--meta {
  width: 42%;
  height: 10px;
}

.ship-report-library__submitting {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
}

@keyframes ship-report-library-shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

.ship-report-library-list__items--skeleton {
  pointer-events: none;
}

.ship-widget--report {
  min-height: 200px;
}

.ship-widget--report.ship-widget--tall {
  min-height: 320px;
}

.ship-report-widget__body {
  padding: 0;
  overflow: hidden;
  height: 100%;
}

.ship-report-widget__body .single-note-item,
.ship-report-widget__body .note-item {
  margin: 0;
  border: 0;
  box-shadow: none;
}

.ship-report-widget__body .note-item .card-body {
  padding: 12px;
}

.ship-report-widget__status {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  padding: 16px;
  font-size: 14px;
  color: var(--ship-text-muted, #64748b);
}

.ship-report-widget__status--error {
  color: #b91c1c;
  flex-wrap: wrap;
  gap: 8px;
}

.ship-report-widget-loading {
  margin-bottom: 0;
  width: 100%;
}

.ship-dashboard__chart-grid .ship-report-widget-loading.ship-widget,
.ship-dashboard-overview__slot .ship-report-widget-loading.ship-widget {
  margin-bottom: 0;
}

.ship-report-widget-loading__body {
  position: relative;
}

.ship-report-widget-loading__center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 180px;
  padding: 24px;
  text-align: center;
}

.ship-report-widget-loading--kpi .ship-report-widget-loading__center {
  min-height: 112px;
}

.ship-report-widget-loading__body.ship-widget__body--chart .ship-report-widget-loading__center {
  min-height: 220px;
}

.ship-report-widget-loading__body.ship-widget__body--chart.ship-widget__body--tall .ship-report-widget-loading__center {
  min-height: 280px;
}

.ship-report-widget-loading__center .loader11 {
  position: relative;
  top: auto;
  left: auto;
  flex-shrink: 0;
}

.ship-report-widget-loading__text {
  font-size: 13px;
  line-height: 18px;
  color: var(--ship-text-muted, #64748b);
}

.ship-report-widget-loading__title {
  color: var(--ship-text-muted, #94a3b8);
}

.ship-report-widget-loading__meta {
  opacity: 0.7;
}

.ship-report-widget-loading__center--error {
  color: #b91c1c;
}

.ship-report-widget-loading__center--error .fa-exclamation-circle {
  font-size: 1.25rem;
  color: #dc2626;
}

.ship-report-widget-loading__text--error {
  color: #b91c1c;
  max-width: 280px;
}

/* KPI slots — unified height (empty, filled, edit, preview) */
.ship-dashboard__kpi-grid--preview .ship-dashboard-overview__slot-wrap--hidden-preview {
  display: none;
}

/* Preview/view — uniform KPI height (no header); reserve comparison block when enabled */
.ship-dashboard__kpi-grid--preview {
  --ship-kpi-slot-height: 172px;
  align-items: stretch;
}

.ship-dashboard__kpi-grid--preview .ship-dashboard-overview__slot-wrap,
.ship-dashboard__kpi-grid--preview .ship-dashboard-overview__slot--kpi,
.ship-dashboard__kpi-grid--preview .ship-report-widget--kpi {
  height: auto;
  min-height: var(--ship-kpi-slot-height);
  max-height: none;
}

.ship-dashboard__kpi-grid--preview .ship-report-widget--kpi > .ship-kpi-card--slot,
.ship-dashboard__kpi-grid--preview .ship-kpi-card--slot {
  height: 100%;
  min-height: var(--ship-kpi-slot-height);
  max-height: none;
}

.ship-dashboard__kpi-grid--preview .ship-kpi-card--slot .ship-kpi-card__body {
  flex: 1;
  min-height: 0;
}

.ship-kpi-empty-slot__trigger {
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

.ship-kpi-empty-slot__trigger.ship-add-report-card:hover {
  transform: none;
  box-shadow: none;
}

.ship-report-widget--kpi {
  min-height: var(--ship-kpi-slot-height, 216px);
}

.ship-kpi-shell-body {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 20px 24px;
  background: #f8fafc;
}

.ship-kpi-shell-body__main {
  min-width: 0;
}

.ship-kpi-shell-body__label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ship-text-muted);
  margin: 0 0 4px;
}

.ship-kpi-shell-body__value {
  font-size: 36px;
  font-weight: 700;
  color: var(--ship-text);
  margin: 0;
  line-height: 40px;
  letter-spacing: -0.03em;
}

.ship-kpi-shell-body__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--ship-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: #fff;
  border: 1px solid #e2e8f0;
}

.ship-kpi-shell-body__icon svg {
  width: 24px;
  height: 24px;
  fill: rgba(0, 146, 228, 0.8);
}

/* Chart — fixed height (KPI row / two-column panels) */
.ship-report-widget--chart > .ship-widget,
.ship-report-widget--chart .ship-report-widget-loading.ship-widget {
  height: 280px;
  min-height: 280px;
  max-height: 280px;
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
}

.ship-report-widget--chart .ship-widget__body--chart,
.ship-report-widget--chart .ship-report-chart {
  flex: 1;
  min-height: 0;
  height: 100%;
  max-height: 100%;
}

.ship-report-widget--chart .ship-report-chart__canvas {
  min-height: 0;
}

.ship-report-widget--chart .ship-widget__body--chart {
  height: calc(280px - 73px);
  padding: 0 12px 8px;
  box-sizing: border-box;
}

.ship-report-widget--chart-tall > .ship-widget,
.ship-report-widget--chart-tall .ship-report-widget-loading.ship-widget {
  height: 400px;
  min-height: 400px;
  max-height: 400px;
}

.ship-report-widget--chart-tall .ship-widget__body--chart {
  height: calc(400px - 73px);
}

/* Two-column row — match table height so chart + table align */
.ship-report-widget--split-row {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 580px;
  height: 100%;
}

.ship-report-widget--split-row > .ship-widget,
.ship-report-widget--split-row .ship-report-widget-loading.ship-widget,
.ship-report-widget--split-row.ship-report-widget--kpi .ship-kpi-card {
  flex: 1;
  height: auto;
  min-height: 580px;
  max-height: none;
}

.ship-report-widget--split-row.ship-report-widget--chart .ship-widget__body--chart,
.ship-report-widget--split-row.ship-report-widget--chart-tall .ship-widget__body--chart {
  height: auto;
  flex: 1;
  min-height: 420px;
}

.ship-report-widget--split-row .ship-report-chart {
  min-height: 0;
}

.ship-report-widget--split-row .ship-report-widget__table-scroll {
  max-height: 420px;
}

/* Table — fixed widget height with scroll for ~10 rows */
.ship-report-widget--table > .ship-widget,
.ship-report-widget--table .ship-report-widget-loading.ship-widget {
  min-height: 580px;
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
}

.ship-report-widget--table .ship-widget__body,
.ship-report-widget--table .ship-report-widget__table-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding-bottom: 16px;
}

.ship-report-widget--table .ship-report-widget__table-scroll {
  flex: 1;
  min-height: 0;
  max-height: 520px;
  overflow: auto;
}

.ship-report-widget--table .ship-reports__toolbar,
.ship-report-widget--table .ship-reports__footer {
  flex-shrink: 0;
}

.ship-report-widget--table .ship-report-widget-loading__body:not(.ship-widget__body--chart) {
  min-height: 480px;
}

.ship-report-widget--tall .ship-widget__body--chart {
  min-height: 280px;
}

.ship-report-chart {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  max-height: 100%;
  height: 100%;
  overflow: hidden;
  contain: layout;
}

.ship-report-chart__canvas {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
}

/* Chart.js sets canvas height in px — never force height:100% or parent grows in a loop */
.ship-report-chart__canvas canvas {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
}

.ship-report-chart__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--ship-border, #e2e8f0);
  max-height: 72px;
  overflow-y: auto;
  flex-shrink: 0;
}

.ship-report-chart__legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}

.ship-report-chart__legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex-shrink: 0;
}

.ship-report-chart__legend-label {
  font-size: 12px;
  color: var(--ship-text-muted, #64748b);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ship-report-chart--radial {
  min-height: 0;
  justify-content: flex-start;
}

.ship-report-chart--radial .ship-report-chart__canvas {
  min-height: 0;
  flex: 0 0 auto;
  align-self: center;
  margin: 0 auto;
}

/* Edit mode — fixed 280px widgets; explicit JS height on canvas, no flex collapse */
.ship-dashboard-overview--edit .ship-report-chart__canvas {
  flex: 1 1 auto;
  min-height: 120px;
  max-height: 100%;
}

.ship-dashboard-overview--edit .ship-report-chart--ready .ship-report-chart__canvas {
  flex: 0 0 auto;
}

.ship-report-chart__legend--radial {
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 4px;
  padding: 14px 12px 10px;
  border-top: 1px solid var(--ship-border, #e2e8f0);
  max-height: 72px;
  overflow-y: auto;
  flex-shrink: 0;
}

.ship-report-chart__legend--radial .ship-report-chart__legend-swatch {
  width: 12px;
  height: 12px;
}

.ship-report-chart__legend--radial .ship-report-chart__legend-label {
  font-size: 13px;
  font-weight: 500;
  color: #00117b;
}

.ship-kpi-icon-picker,
.ship-kpi-color-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ship-kpi-icon-picker__btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--ship-border);
  background: #fff;
  color: var(--ship-text);
}

.ship-kpi-icon-picker__btn.is-active {
  border-color: var(--ship-primary);
  color: var(--ship-primary);
  background: rgba(0, 146, 228, 0.08);
}

.ship-kpi-color-picker__swatch {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
}

.ship-kpi-color-picker__swatch.is-active {
  border-color: #0f172a;
  box-shadow: 0 0 0 2px #fff inset;
}

.ship-kpi-threshold-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 8px;
  margin-bottom: 8px;
}

.ship-kpi-preview-wrap {
  max-width: 360px;
}

.ship-kpi-card {
  position: relative;
}

.ship-kpi-card__target {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
  font-size: 12px;
  opacity: 0.95;
}

.ship-kpi-card__delta--up {
  color: #bbf7d0;
}

.ship-kpi-card__delta--down {
  color: #fecaca;
}

.ship-kpi-card__actions {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.ship-kpi-card__actions .ship-widget__head-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ship-kpi-card__actions .ship-widget-actions--dashboard-hover {
  opacity: 1;
  pointer-events: auto;
}

.ship-kpi-card--has-actions:hover .ship-kpi-card__actions,
.ship-kpi-card--has-actions:focus-within .ship-kpi-card__actions {
  opacity: 1;
}

.ship-kpi-card--slot.ship-kpi-card--empty {
  border-style: dashed;
}

.ship-kpi-card--error,
.ship-kpi-card--loading {
  min-height: var(--ship-kpi-slot-height, 216px);
}

.ship-kpi-card__error {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 120px;
  color: #b45309;
  font-size: 13px;
}

.ship-kpi-card__loading-center {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
}

.ship-dashboard__kpi-grid--responsive {
  display: grid;
  gap: 16px;
}

@media (max-width: 991px) {
  .ship-dashboard__kpi-grid--responsive {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 575px) {
  .ship-dashboard__kpi-grid--responsive {
    grid-template-columns: 1fr !important;
  }
}

/* Dashboard layout sortable (edit mode) */
.ship-dashboard-custom--edit .ship-dashboard-sections--sortable {
  display: flex;
  flex-direction: column;
  gap: 32px;
  width: 100%;
}

.ship-dashboard__chart-grid .ship-dashboard-overview__slot-wrap--sortable,
.ship-dashboard__kpi-grid .ship-dashboard-overview__slot-wrap--sortable {
  width: 100%;
  min-width: 0;
}

.ship-dashboard-custom__section--sortable .ship-dashboard-custom__section-toolbar--sortable {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ship-layout-row__drag-handle,
.ship-slot__drag-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: rgba(226, 232, 240, 0.65);
  color: var(--ship-text-muted);
  cursor: grab;
  flex-shrink: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.ship-dashboard-custom__section--editable:hover .ship-layout-row__drag-handle,
.ship-dashboard-custom__section--editable:focus-within .ship-layout-row__drag-handle {
  opacity: 1;
  pointer-events: auto;
}

.ship-layout-row__drag-handle:hover,
.ship-slot__drag-handle:hover {
  background: rgba(0, 146, 228, 0.12);
  color: #00117b;
}

.ship-layout-row__drag-handle:active,
.ship-slot__drag-handle:active {
  cursor: grabbing;
}

.ship-dashboard-overview__slot-wrap--sortable,
.ship-dashboard-overview__col--sortable {
  position: relative;
  min-width: 0;
}

.ship-dashboard-overview__slot-wrap--sortable .ship-slot__drag-handle,
.ship-dashboard-overview__col--sortable .ship-slot__drag-handle {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 3;
}

.ship-dashboard-overview__slot-wrap--sortable:hover .ship-slot__drag-handle,
.ship-dashboard-overview__slot-wrap--sortable:focus-within .ship-slot__drag-handle,
.ship-dashboard-overview__col--sortable:hover .ship-slot__drag-handle,
.ship-dashboard-overview__col--sortable:focus-within .ship-slot__drag-handle {
  opacity: 1;
  pointer-events: auto;
}

/* Edit sortable — layout classes live on the DnD container (inline display beats smooth-dnd table) */
.ship-layout-slots--sortable-shell {
  display: block;
  width: 100%;
}

.ship-layout-slots--sortable-shell--kpi {
  margin-bottom: var(--space-2xl, 32px);
}

.ship-dashboard-overview--edit .ship-layout-slots--sortable-shell--chart {
  margin-bottom: 16px;
}

.ship-layout-slots__dnd.smooth-dnd-container.horizontal.ship-dashboard__kpi-grid,
.ship-layout-slots__dnd.smooth-dnd-container.horizontal.ship-dashboard__chart-grid {
  gap: 24px !important;
  margin-bottom: 0 !important;
}

.ship-layout-slots__dnd.smooth-dnd-container.horizontal > .smooth-dnd-draggable-wrapper {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  height: auto !important;
  vertical-align: unset !important;
  box-sizing: border-box;
}

.ship-layout-slots__dnd.smooth-dnd-container.horizontal.ship-dashboard-overview__row
  > .smooth-dnd-draggable-wrapper {
  flex: 0 0 50%;
  max-width: 50%;
  width: auto !important;
}

.ship-layout-slots__dnd.smooth-dnd-container.horizontal.ship-dashboard-overview__row
  > .smooth-dnd-draggable-wrapper:has(> .col-12) {
  flex: 0 0 100%;
  max-width: 100%;
}

.ship-layout-slots__dnd.ship-dashboard__kpi-grid .ship-dashboard-overview__slot-wrap,
.ship-layout-slots__dnd.ship-dashboard__chart-grid .ship-dashboard-overview__slot-wrap,
.ship-layout-slots__dnd.ship-dashboard__chart-grid .ship-dashboard-overview__slot {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.ship-layout-slots__dnd.ship-dashboard__kpi-grid--edit > .smooth-dnd-draggable-wrapper {
  height: var(--ship-kpi-slot-height, 252px);
  min-height: var(--ship-kpi-slot-height, 252px);
  max-height: var(--ship-kpi-slot-height, 252px);
  align-self: stretch;
  display: flex;
  flex-direction: column;
}

.ship-layout-slots__dnd.ship-dashboard__kpi-grid--edit > .smooth-dnd-draggable-wrapper > .ship-dashboard-overview__slot-wrap {
  flex: 1;
  min-height: 100%;
}

.ship-layout-slots__dnd .smooth-dnd-ghost .ship-dashboard-overview__slot-wrap,
.ship-layout-slots__dnd .smooth-dnd-ghost .ship-dashboard-overview__col {
  display: block;
  opacity: 0.92;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
}

@media (max-width: 991px) {
  .ship-layout-slots__dnd.ship-dashboard__kpi-grid--responsive {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 575px) {
  .ship-layout-slots__dnd.ship-dashboard__kpi-grid--responsive {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}


.ship-dashboard-sections__dnd.smooth-dnd-container.vertical {
  display: contents !important;
}

.ship-dashboard-sections__dnd > .smooth-dnd-draggable-wrapper {
  display: block;
  width: 100%;
}

.ship-dashboard-sections__dnd .smooth-dnd-ghost .ship-dashboard-custom__section {
  opacity: 0.94;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.ship-report-widget--empty:hover .ship-slot__drag-handle,
.ship-report-widget--empty:focus-within .ship-slot__drag-handle {
  opacity: 1;
  pointer-events: auto;
}

.ship-report-widget--empty .ship-slot__drag-handle {
  position: absolute;
  top: 8px;
  right: 8px;
  left: auto;
}

.ship-dashboard-custom--edit .ship-dashboard-custom__section-toolbar--sortable
  .ship-dashboard-custom__section-label {
  flex: 1;
  min-width: 0;
}

/* View more: full-width report modal */
.ship-report-view-more-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 0;
}

.ship-report-view-more-modal__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(15, 23, 42, 0.55);
  cursor: pointer;
}

.ship-report-view-more-modal__panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  height: 100%;
  background: var(--ship-bg, #f7f8fa);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.2);
}

.ship-report-view-more-modal__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--ship-border);
  background: #fff;
  flex-shrink: 0;
}

.ship-report-view-more-modal__title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--ship-text, #0f172a);
}

.ship-report-view-more-modal__subtitle {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--ship-text-muted);
}

.ship-report-view-more-modal__close {
  flex-shrink: 0;
}

.ship-report-view-more-modal__body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 16px 24px 24px;
  background: var(--ship-bg, #f7f8fa);
}

.ship-report-view-more-modal__body .ship-reports-detail-layout {
  min-height: 0;
  gap: 16px;
}

/* Main + filter cards — white boxes on grey canvas */
.ship-report-view-more-modal .ship-reports-main-card,
.ship-report-view-more-modal .ship-reports-filters-card {
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.ship-report-view-more-modal .ship-reports-main-card:hover,
.ship-report-view-more-modal .ship-reports-filters-card:hover {
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.ship-report-view-more-modal .ship-reports-main-card .ship-widget__head {
  background: #fff;
  padding: 18px 24px;
  border-bottom: 1px solid var(--ship-border);
}

.ship-report-view-more-modal .ship-reports-tabs-row--filters {
  padding: 8px 24px 12px;
  background: #fff;
  border-bottom: 1px solid var(--ship-border);
}

.ship-report-view-more-modal .ship-reports-tabs-row--filters .ship-reports__tabs--scroll {
  flex: 1;
  min-width: 0;
  padding: 0 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.ship-report-view-more-modal .ship-reports-tabs-row--filters .ship-reports__tabs--scroll::-webkit-scrollbar {
  display: none;
}

.ship-report-view-more-modal .ship-reports-tabs-row--filters .ship-reports__tab {
  flex-shrink: 0;
  cursor: pointer;
  font-family: inherit;
}

.ship-report-view-more-modal .ship-reports-tabs-row--filters .ship-reports__tab-label {
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ship-report-view-more-modal .ship-reports-tabs-row--filters .ship-reports__tab--clear {
  color: rgba(100, 116, 139, 0.95);
  font-weight: 500;
}

.ship-report-view-more-modal .ship-reports-tabs-row--filters .ship-reports__tab--clear:hover {
  background: #f8fafc;
  color: rgba(15, 23, 42, 0.9);
}

.ship-report-view-more-modal .ship-detail-chips--widget {
  background: #fff;
  padding: 0 24px 12px;
  border-bottom: 1px solid var(--ship-border);
}

.ship-report-view-more-modal .ship-detail-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: #fff;
  color: rgba(15, 23, 42, 0.9);
  font-size: 12px;
  line-height: 18px;
}

.ship-report-view-more-modal .ship-report-detail-table-panel .ship-th-sort {
  cursor: pointer;
  user-select: none;
}

/* Chart / graph area */
.ship-report-view-more-modal .ship-report-detail-chart,
.ship-report-view-more-modal .ship-report-widget__detail-body.ship-widget__body--chart {
  background: #fff;
}

.ship-report-view-more-modal .ship-reports-main-card .ship-report-detail-chart {
  height: 420px;
  min-height: 420px;
  padding: 20px 24px 24px;
}

/* Table area */
.ship-report-view-more-modal .ship-report-detail-table-panel {
  background: #fff;
  padding: 0;
}

.ship-report-view-more-modal .ship-report-detail-table-panel .ship-reports__toolbar {
  padding: 14px 24px;
  background: #fff;
  border-bottom: 1px solid var(--ship-border);
}

.ship-report-view-more-modal .ship-report-detail-table-panel .ship-reports__search input {
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: #fff;
  padding: 10px 12px 10px 40px;
  font-size: 13px;
}

.ship-report-view-more-modal .ship-report-detail-table-panel .ship-reports__search input:focus {
  outline: none;
  border-color: rgba(0, 146, 228, 0.55);
  box-shadow: 0 0 0 3px rgba(0, 146, 228, 0.12);
}

.ship-report-view-more-modal .ship-report-detail-table-panel .ship-table-wrap--scroll {
  background: #fff;
  padding: 0 24px;
  max-height: 420px;
}

.ship-report-view-more-modal .ship-report-detail-table-panel .ship-reports__footer {
  padding: 12px 24px 18px;
  background: #fff;
  border-top: 1px solid var(--ship-border);
}

.ship-report-view-more-modal .ship-report-detail-table-panel__page-size {
  height: 40px;
  border-radius: 10px;
  width: 110px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: #fff;
  font-size: 13px;
}

/* KPI detail body */
.ship-report-view-more-modal .ship-report-widget__kpi-detail {
  background: #fff;
  padding: 24px;
}

/* Filter sidebar */
.ship-report-view-more-modal .ship-reports-filters-card__head {
  background: #fff;
  padding: 16px 20px;
  border-bottom: 1px solid var(--ship-border);
}

.ship-report-view-more-modal .ship-reports-filters-card__body {
  background: #fff;
  padding: 16px 20px;
}

.ship-report-view-more-modal .ship-reports-filters-card__footer {
  background: #fff;
  padding: 14px 20px;
}

.ship-report-view-more-modal .ship-reports-filters-card__footer .ship-btn--primary {
  background: var(--ship-accent, #ff6b32);
  border-color: var(--ship-accent, #ff6b32);
  color: #fff;
}

.ship-report-view-more-modal .ship-reports-filters-card__footer .ship-btn--primary:hover {
  background: #e55a28;
  border-color: #e55a28;
}

.ship-report-view-more-modal .ship-reports-filters-card__footer .ship-btn--ghost {
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.95);
  color: var(--ship-primary, #00117b);
}

/* Legacy StandardFilter → reference filter rule UI */
.ship-report-view-more-modal .ship-reports-filters-card .workFlow_Count {
  padding: 0;
  margin: 0;
  list-style: none;
}

.ship-report-view-more-modal .ship-reports-filters-card .workFlow_conditions.workFlow-row {
  padding: 12px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 12px;
  background: #f8fafc;
}

.ship-report-view-more-modal .ship-reports-filters-card .workFlow_conditions .clearfix {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px 8px;
  align-items: start;
}

.ship-report-view-more-modal .ship-reports-filters-card .workFlow_conditions .col-3.float-left {
  grid-column: 1;
}

.ship-report-view-more-modal .ship-reports-filters-card .workFlow_conditions .col-2.float-left {
  grid-column: 2;
}

.ship-report-view-more-modal .ship-reports-filters-card .workFlow_conditions .col-2.float-left + .col-2.float-left {
  grid-column: 1 / -1;
}

.ship-report-view-more-modal .ship-reports-filters-card .workFlow_conditions .col-2.float-left:has(select[name="period"]) {
  grid-column: 1 / -1;
}

.ship-report-view-more-modal .ship-reports-filters-card .workFlow_conditions .col-2.float-left:has(.form-control):not(:has(select[name="field_filter_id"])) {
  grid-column: 1 / -1;
}

.ship-report-view-more-modal .ship-reports-filters-card .workFlow_conditions select.form-control,
.ship-report-view-more-modal .ship-reports-filters-card .workFlow_conditions .form-control,
.ship-report-view-more-modal .ship-reports-filters-card .workFlow_conditions input.form-control {
  width: 100%;
  height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  padding: 8px 10px;
  background: #fff;
  font-size: 13px;
  font-family: inherit;
  color: var(--ship-text, #00117b);
  box-shadow: none;
}

.ship-report-view-more-modal .ship-reports-filters-card .workFlow_conditions textarea.form-control,
.ship-report-view-more-modal .ship-reports-filters-card .workFlow_conditions select[multiple].form-control {
  height: auto;
  min-height: 88px;
  padding: 8px 10px;
}

.ship-report-view-more-modal .ship-reports-filters-card .workFlow_conditions select.form-control:focus,
.ship-report-view-more-modal .ship-reports-filters-card .workFlow_conditions .form-control:focus,
.ship-report-view-more-modal .ship-reports-filters-card .workFlow_conditions input.form-control:focus {
  outline: none;
  border-color: rgba(0, 146, 228, 0.55);
  box-shadow: 0 0 0 3px rgba(0, 146, 228, 0.12);
}

/* Multi-row standard filters (report preview parity) */
.ship-report-view-more-modal .ship-report-detail-filters__toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}

.ship-report-view-more-modal .ship-report-detail-filters__add-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ship-accent, #0092e4);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.ship-report-view-more-modal .ship-report-detail-filters__add-row:hover {
  color: var(--ship-primary, #00117b);
}

.ship-report-view-more-modal .ship-report-detail-filter-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.ship-report-view-more-modal .ship-report-detail-filter-row:last-child {
  margin-bottom: 0;
}

.ship-report-view-more-modal .ship-report-detail-filter-row__logic {
  display: flex;
  justify-content: center;
}

.ship-report-view-more-modal .ship-report-detail-filter-row__logic .selectgroup {
  display: inline-flex;
  gap: 4px;
}

.ship-report-view-more-modal .ship-report-detail-filter-row__delete {
  align-self: flex-end;
  padding: 2px 4px;
  border: 0;
  background: transparent;
  color: #dc3545;
  cursor: pointer;
  line-height: 1;
}

.ship-report-view-more-modal .ship-report-detail-filter-row__field,
.ship-report-view-more-modal .ship-report-detail-filter-row__value {
  width: 100%;
}

.ship-report-view-more-modal .ship-report-detail-filter-row .form-control,
.ship-report-view-more-modal .ship-report-detail-filter-row select.form-control {
  width: 100%;
  min-height: 38px;
  border-radius: 10px;
}

.ship-report-view-more-modal .ship-report-detail-filter-row .clearfix {
  display: block;
}

.ship-report-view-more-modal .ship-report-detail-filter-row .col-2.float-left,
.ship-report-view-more-modal .ship-report-detail-filter-row .col-3.float-left {
  float: none;
  width: 100%;
  max-width: 100%;
}

.ship-report-view-more-modal .ship-reports-head__btn.is-active {
  background: rgba(0, 17, 123, 0.08);
  border-color: rgba(0, 146, 228, 0.45);
  color: var(--ship-primary, #00117b);
}

.ship-report-view-more-modal .ship-view-toggle .ship-btn.active {
  border-color: rgba(0, 146, 228, 0.45);
  background: rgba(0, 146, 228, 0.08);
  box-shadow: 0 0 0 3px rgba(0, 146, 228, 0.1);
}

.ship-report-view-more-modal .ship-report-widget__status {
  background: #fff;
  padding: 24px;
}

.ship-report-detail-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
}

.ship-report-detail-loading--chart {
  min-height: 420px;
}

.ship-report-detail-loading--table {
  min-height: 420px;
}

.ship-report-detail-loading--kpi {
  min-height: 200px;
}

.ship-report-view-more-modal .ship-report-detail-loading .ship-report-widget-loading__center {
  min-height: 200px;
}

/* Embedded dashboard (Account 360 tab inside detail view) */
.ship-dashboard.ship-dashboard--embedded {
  background: var(--ship-bg, #f7f8fa);
  width: 100%;
  min-width: 0;
  min-height: 420px;
  box-sizing: border-box;
  padding: var(--space-lg, 16px) var(--space-lg, 16px) var(--space-xl, 24px);
  margin-left: -1rem;
  margin-right: -1rem;
  margin-top: -0.5rem;
}

.ship-acc-360-tab .ship-dashboard.ship-dashboard--embedded,
.ship-acc-360-tab > .ship-acc-view-panel {
  background: transparent;
  margin: 0;
  padding: 0;
  min-height: 0;
}

.ship-dashboard.ship-dashboard--embedded .ship-dashboard-custom {
  margin-bottom: 0;
}

.ship-dashboard.ship-dashboard--embedded .ship-widget {
  margin-bottom: var(--space-xl, 24px);
}

.ship-dashboard.ship-dashboard--embedded .ship-dashboard-custom--empty {
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ship-kpi-card--preview-empty .ship-kpi-empty-slot__preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-xl, 24px) var(--space-lg, 16px);
  min-height: 120px;
  color: var(--ship-text-muted, #64748b);
}

.ship-kpi-card--preview-empty.ship-kpi-card--slot .ship-kpi-card__body--empty {
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ship-kpi-empty-slot__preview-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-bottom: var(--space-md, 12px);
  border-radius: 50%;
  background: rgba(100, 116, 139, 0.1);
  color: var(--ship-text-muted, #64748b);
  font-size: 16px;
}

.ship-kpi-empty-slot__preview-title {
  margin: 0 0 var(--space-xs, 4px);
  font-size: 14px;
  font-weight: 600;
  color: var(--ship-text, #00117b);
}

.ship-kpi-empty-slot__preview-desc {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--ship-text-muted, #64748b);
}

/* Account 360 — browse CTA (embedded tab; full browse styles in shipCRM_account_360.css) */
.ship-dashboard--account-360 .ship-acc-360-cta {
  margin-top: 20px;
}

/* Keep New Dashboard action dropdown attached to its card */
.ship-dashboard-actions-dropdown {
  position: relative;
}

.ship-dashboard-actions-dropdown .dropdown-menu {
  position: absolute !important;
  top: 100% !important;
  right: 0 !important;
  left: auto !important;
  transform: none !important;
  margin-top: 3px;
}
