:root {
  color-scheme: light;
  --bg: #f4f7f6;
  --surface: #ffffff;
  --surface-soft: #f8fbfa;
  --ink: #17231f;
  --muted: #61706b;
  --line: #d7e0dd;
  --line-strong: #aebdb8;
  --teal: #137c72;
  --teal-deep: #0f625b;
  --teal-soft: #d9efeb;
  --blue: #315f8f;
  --blue-soft: #dbe8f5;
  --red: #b94d3f;
  --red-soft: #f7ddd8;
  --amber: #a36f10;
  --amber-soft: #f8e8c7;
  --green: #377c43;
  --green-soft: #dff1e2;
  --radius: 8px;
  --shadow: 0 14px 34px rgba(23, 35, 31, 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  letter-spacing: 0;
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(244, 247, 246, 0.98)),
    repeating-linear-gradient(90deg, rgba(23, 35, 31, 0.035) 0 1px, transparent 1px 86px);
}

.app-shell {
  width: min(1820px, calc(100vw - 28px));
  margin: 0 auto;
  padding: 18px 0 32px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  padding: 16px 0 14px;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--teal);
  font-size: 0.75rem;
  font-weight: 850;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: clamp(1.85rem, 2.8vw, 3rem);
  line-height: 1.05;
}

h2 {
  margin-bottom: 4px;
  font-size: 1.2rem;
}

.meta-line {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.quick-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.quick-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 850;
  text-decoration: none;
}

.quick-nav a[aria-current="page"] {
  border-color: #8ecdc6;
  background: var(--teal-soft);
  color: var(--teal-deep);
}

.panel,
.kpi-card,
.vessel-card,
.control-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.kpi-card {
  min-height: 0;
  padding: 10px 12px;
  border-radius: 10px;
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 2px;
}

.kpi-card strong {
  display: block;
  margin: 0;
  color: var(--muted);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.kpi-card span {
  display: block;
  font-size: clamp(1.05rem, 1.4vw, 1.4rem);
  font-weight: 800;
  line-height: 1.1;
  font-family: "JetBrains Mono", monospace;
}

.kpi-card small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.66rem;
  line-height: 1.25;
  font-weight: 500;
}

.vessel-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
@media (max-width: 1200px) {
  .vessel-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.vessel-card {
  padding: 12px 14px;
  border-radius: 10px;
}

.vessel-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--line);
}

.vessel-card h3 {
  margin: 0 0 2px;
  font-size: 0.95rem;
  font-weight: 800;
}

.vessel-card .vessel-type {
  color: var(--muted);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.vessel-card .period {
  text-align: right;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.7rem;
  line-height: 1.3;
}

.campaign-list {
  display: grid;
  gap: 5px;
}

.campaign-chip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
  font-size: 0.74rem;
}
.campaign-chip b { font-size: 0.78rem; font-weight: 700; }
.campaign-chip small { color: var(--muted); font-size: 0.66rem; }
.campaign-chip span { color: var(--muted); font-size: 0.7rem; white-space: nowrap; }

.campaign-chip b {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.campaign-chip span {
  color: var(--muted);
  font-size: 0.8rem;
}

.panel {
  overflow: hidden;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.legend i {
  width: 18px;
  height: 10px;
  border-radius: 999px;
}

.legend .mpsv {
  background: var(--teal);
}

.legend .dlb {
  background: var(--blue);
}

.legend .rig {
  background: #6f6f77;
}

.legend .barge {
  background: #8a6f35;
}

.legend .critical {
  background: var(--red);
}

.legend .port {
  background: #d69a2d;
}

.legend .install {
  background: var(--teal-deep);
}

.legend .survey {
  background: #6b8fb8;
}

.simulation-panel {
  margin-bottom: 14px;
}

.movement-overview-panel {
  margin-bottom: 14px;
}

.type-toggle-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.type-toggle-bar > span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 950;
  text-transform: uppercase;
}

.type-toggle {
  min-height: 32px;
  padding: 6px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font: inherit;
  font-size: 0.76rem;
  font-weight: 900;
  cursor: pointer;
}

.type-toggle.active {
  border-color: var(--teal);
  background: var(--teal-soft);
  color: var(--ink);
}

.type-toggle.dlb.active {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.type-toggle.pre-comm-vessel.active {
  border-color: var(--green);
  background: var(--green-soft);
}

.type-toggle.rig.active {
  border-color: #6f6f77;
  background: #ececef;
}

.type-toggle.barge.active,
.type-toggle.ahts.active,
.type-toggle.support-vessel.active {
  border-color: #8a6f35;
  background: #f4ead3;
}

.overview-head {
  align-items: center;
}

.overview-detail {
  display: grid;
  justify-items: end;
  min-width: 240px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.overview-detail b {
  color: var(--ink);
  font-size: 0.92rem;
}

.overview-detail small {
  text-align: right;
}

.overview-timeline {
  position: relative;
  padding: 14px 18px 16px;
  background: linear-gradient(180deg, #ffffff, #fbfcfc);
}

.overview-scale {
  position: relative;
  height: 24px;
  margin-left: 150px;
  border-bottom: 1px solid var(--line);
}

.overview-scale span {
  position: absolute;
  top: 0;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 950;
  text-transform: uppercase;
  transform: translateX(3px);
}

.overview-focus {
  position: absolute;
  top: 38px;
  bottom: 16px;
  left: 150px;
  width: 14%;
  border: 2px solid rgba(241, 91, 34, 0.68);
  border-radius: 10px;
  background: rgba(241, 91, 34, 0.08);
  box-shadow: 0 10px 24px rgba(241, 91, 34, 0.12);
  pointer-events: none;
  transition: left 140ms ease, width 140ms ease;
  z-index: 3;
}

.overview-lanes {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.overview-lane {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.overview-label {
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.overview-label .vessel-mark {
  min-width: 42px;
  height: 28px;
  font-size: 0.68rem;
}

.overview-label b {
  overflow: hidden;
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-track {
  position: relative;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background:
    repeating-linear-gradient(90deg, rgba(28, 36, 44, 0.05) 0 1px, transparent 1px 9%),
    #f8faf9;
  overflow: hidden;
}

.overview-bar {
  position: absolute;
  top: 5px;
  height: 18px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: var(--teal);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 0.62rem;
  font-weight: 900;
  line-height: 18px;
  padding: 0 8px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-bar.dlb {
  background: var(--blue);
}

.overview-bar.pre-comm-vessel {
  background: var(--green);
}

.overview-bar.rig {
  background: #6f6f77;
}

.overview-bar.barge,
.overview-bar.ahts,
.overview-bar.support-vessel {
  background: #8a6f35;
}

.simulation-head {
  align-items: center;
}

.simulation-controls {
  display: grid;
  grid-template-columns: auto minmax(260px, 420px);
  gap: 12px;
  align-items: end;
}

.simulation-play {
  min-height: 46px;
  padding: 10px 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.simulation-range {
  min-width: 260px;
}

.simulation-range input {
  min-height: 34px;
  padding: 0;
  accent-color: var(--teal);
}

.simulation-layout {
  display: grid;
  grid-template-columns: minmax(440px, 1fr) minmax(360px, 0.42fr);
  gap: 16px;
  padding: 18px;
}

.marine-map {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 24% 72%, rgba(241, 91, 34, 0.1), transparent 18%),
    radial-gradient(circle at 68% 42%, rgba(38, 74, 128, 0.12), transparent 24%),
    linear-gradient(135deg, #f8fbfd, #eaf2f7 58%, #f8fbfd);
}

.marine-map::before {
  content: "Campaign route map";
  position: absolute;
  left: 16px;
  top: 14px;
  color: rgba(28, 36, 44, 0.42);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.route-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.route-layer line {
  stroke: rgba(38, 74, 128, 0.26);
  stroke-width: 0.8;
  stroke-dasharray: 3 3;
}

.map-node,
.vessel-pin {
  position: absolute;
  transform: translate(-50%, -50%);
}

.map-node {
  display: grid;
  gap: 6px;
  justify-items: center;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 850;
  text-align: center;
  white-space: nowrap;
}

.map-node span {
  width: 18px;
  height: 18px;
  border: 3px solid #fff;
  border-radius: 999px;
  background: var(--blue);
  box-shadow: 0 8px 20px rgba(28, 36, 44, 0.18);
}

.map-node.port-node span {
  width: 24px;
  height: 24px;
  background: var(--teal);
}

.vessel-pin {
  z-index: 3;
  display: grid;
  min-width: 126px;
  gap: 2px;
  justify-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 36px rgba(28, 36, 44, 0.18);
  text-align: center;
  transition: left 220ms ease, top 220ms ease;
}

.vessel-pin.dlb {
  border-color: rgba(38, 74, 128, 0.24);
}

.vessel-pin.critical {
  outline: 3px solid rgba(200, 68, 46, 0.2);
}

.vessel-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 30px;
  border-radius: 18px 18px 8px 8px;
  background: var(--teal);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 950;
}

.vessel-pin.dlb .vessel-icon {
  background: var(--blue);
}

.vessel-pin.rig .vessel-icon,
.vessel-mark.rig {
  background: #6f6f77;
}

.vessel-pin.barge .vessel-icon,
.vessel-pin.ahts .vessel-icon,
.vessel-pin.support-vessel .vessel-icon,
.vessel-mark.barge,
.vessel-mark.ahts,
.vessel-mark.support-vessel {
  background: #8a6f35;
}

.vessel-pin.pre-comm-vessel .vessel-icon,
.vessel-mark.pre-comm-vessel {
  background: var(--green);
}

.vessel-pin b {
  max-width: 140px;
  overflow: hidden;
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vessel-pin small {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 850;
}

.simulation-info {
  display: grid;
  align-content: start;
  gap: 12px;
}

.simulation-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.simulation-card-head {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.simulation-card h3,
.simulation-card p {
  margin: 0;
}

.simulation-card p {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.simulation-activity {
  display: grid;
  gap: 8px;
}

.simulation-activity b {
  line-height: 1.32;
}

.simulation-activity small {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.flow-panel {
  margin-bottom: 14px;
}

.full-toggle {
  min-height: 40px;
  padding: 9px 13px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}

.flow-panel.is-full-view {
  position: fixed;
  inset: 12px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 24px);
  background: var(--surface);
}

.flow-panel.is-full-view .panel-head > div:first-child {
  display: none;
}

.full-type-toggle-bar {
  flex: 1;
  padding: 0;
  border-bottom: 0;
  background: transparent;
}

.flow-panel.is-full-view .panel-head {
  align-items: center;
}

.flow-panel.is-full-view:fullscreen {
  inset: 0;
  max-height: 100vh;
  border-radius: 0;
}

.flow-panel.is-full-view .flow-board {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.full-overview {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.full-overview .overview-detail {
  justify-items: start;
  min-width: 0;
}

.full-overview .overview-timeline {
  padding: 0;
}

.full-overview .overview-scale {
  height: 18px;
}

.full-overview .overview-lanes {
  gap: 5px;
}

.full-overview .overview-track {
  height: 22px;
}

.full-overview .overview-bar {
  top: 4px;
  height: 14px;
  font-size: 0;
}

.full-overview .overview-focus {
  top: 20px;
  bottom: 0;
}

.flow-panel.is-full-view .vessel-day-board,
.flow-panel.is-full-view .flow-scroll {
  height: 100%;
}

.flow-panel.is-full-view .flow-scroll {
  overflow: auto;
}

.flow-board {
  display: grid;
  gap: 14px;
  padding: 16px 18px 18px;
}

.flow-campaign {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface-soft), #ffffff);
  overflow: hidden;
}

.flow-head {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.flow-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.vessel-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 34px;
  border-radius: var(--radius);
  background: var(--teal);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 900;
}

.vessel-mark.dlb {
  background: var(--blue);
}

.vessel-mark.pre-comm-vessel {
  background: var(--green);
}

.vessel-mark.rig {
  background: #6f6f77;
}

.vessel-mark.barge,
.vessel-mark.ahts,
.vessel-mark.support-vessel {
  background: #8a6f35;
}

.flow-title h3 {
  margin: 0 0 2px;
  font-size: 1.04rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.flow-title p,
.flow-summary p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.flow-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(96px, 1fr));
  gap: 8px;
  min-width: 340px;
}

.flow-summary article {
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  text-align: right;
}

.flow-summary b {
  display: block;
  font-size: 1.05rem;
}

.phase-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  padding: 12px 14px 0;
}

.phase-chip {
  min-width: 0;
  padding: 9px 10px;
  border-radius: var(--radius);
  background: #eef5f3;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 850;
}

.phase-chip b {
  display: block;
  color: var(--ink);
  font-size: 0.92rem;
}

.phase-chip.port {
  background: var(--amber-soft);
  color: #6e4a07;
}

.phase-chip.installation {
  background: var(--teal-soft);
  color: var(--teal-deep);
}

.phase-chip.survey-spool {
  background: var(--blue-soft);
  color: var(--blue);
}

.phase-chip.demob {
  background: #ececef;
  color: #555862;
}

.phase-chip.critical {
  background: var(--red-soft);
  color: var(--red);
}

.flow-scroll {
  overflow-x: auto;
  padding: 14px;
  cursor: grab;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
  user-select: none;
}

.flow-scroll.is-grabbing {
  cursor: grabbing;
  scroll-behavior: auto;
}

.flow-scroll.is-grabbing * {
  cursor: grabbing !important;
}

.vessel-day-board {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
}

.flow-selection {
  display: grid;
  grid-template-columns: auto minmax(280px, 1fr) minmax(260px, 360px);
  gap: 14px;
  align-items: center;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(255, 245, 238, 0.92), rgba(255, 255, 255, 0.98));
}

.flow-selected-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.flow-selected-copy {
  min-width: 0;
}

.flow-selected-copy b {
  display: block;
  margin-bottom: 3px;
  overflow: hidden;
  font-size: 0.95rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flow-selected-copy small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 760;
}

.flow-search {
  display: grid;
  gap: 5px;
  text-transform: none;
}

.flow-search span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.flow-search input {
  min-height: 38px;
  border-radius: 999px;
  font-size: 0.84rem;
  padding: 8px 13px;
}

.flow-search-nav {
  display: grid;
  grid-template-columns: auto minmax(54px, 1fr) auto;
  gap: 7px;
  align-items: center;
}

.flow-search-nav button {
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 0.7rem;
  font-weight: 900;
  cursor: pointer;
}

.flow-search-nav button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.flow-search-nav small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-align: center;
}

.daily-grid {
  display: grid;
  grid-template-columns: 210px 230px var(--board-width);
  width: calc(440px + var(--board-width));
  min-width: calc(440px + var(--board-width));
}

.daily-corner,
.daily-area-corner,
.daily-axis,
.daily-vessel-label,
.daily-area-label,
.daily-track {
  border-bottom: 1px solid var(--line);
}

.daily-corner,
.daily-area-corner {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  min-height: 60px;
  padding: 12px 14px;
  border-right: 1px solid var(--line);
  background: #fff8f3;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.daily-corner {
  left: 0;
  z-index: 60;
}

.daily-corner,
.daily-vessel-label {
  box-shadow: 8px 0 16px rgba(28, 36, 44, 0.055);
}

.daily-area-corner {
  left: 210px;
  z-index: 58;
  box-shadow: 8px 0 16px rgba(28, 36, 44, 0.055);
}

.daily-axis {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: 60px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 245, 238, 0.98), rgba(255, 255, 255, 0.98));
}

.daily-axis .date-cell {
  position: absolute;
  top: 0;
  bottom: 0;
  display: grid;
  align-content: center;
  gap: 1px;
  width: var(--day-width);
  padding: 6px 6px;
  border-left: 1px solid rgba(28, 36, 44, 0.1);
  color: var(--muted);
  text-align: center;
}

.daily-axis .date-cell small,
.daily-axis .date-cell em {
  overflow: hidden;
  font-size: 0.58rem;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.daily-axis .date-cell b {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 950;
  line-height: 1.05;
}

.daily-axis .date-cell.major {
  color: var(--ink);
}

.daily-axis .date-cell.month-start {
  background: linear-gradient(180deg, rgba(255, 229, 214, 0.88), rgba(255, 255, 255, 0.94));
  border-left: 2px solid rgba(241, 91, 34, 0.72);
}

.daily-axis .date-cell.weekend {
  background: linear-gradient(180deg, rgba(226, 235, 247, 0.95), rgba(245, 249, 255, 0.98));
  box-shadow: inset 0 -3px 0 rgba(38, 74, 128, 0.22);
}

.daily-axis .date-cell.weekend b {
  color: var(--blue);
}

.daily-axis .date-cell.weekend small,
.daily-axis .date-cell.weekend em {
  color: var(--blue);
}

.daily-vessel-label {
  position: sticky;
  left: 0;
  z-index: 46;
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 104px;
  padding: 11px 14px;
  border-right: 1px solid var(--line);
  background: #ffffff;
}

.daily-vessel-label b {
  display: block;
  margin: 0 0 5px;
  font-size: 0.9rem;
  line-height: 1.12;
}

.daily-vessel-label small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 760;
  line-height: 1.35;
}

.daily-area-label {
  position: sticky;
  left: 210px;
  z-index: 44;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 104px;
  padding: 12px 16px;
  border-right: 1px solid var(--line);
  background: #ffffff;
  box-shadow: 8px 0 16px rgba(28, 36, 44, 0.055);
}

.daily-area-label b {
  display: block;
  margin-bottom: 6px;
  font-size: 0.98rem;
  line-height: 1.15;
}

.daily-area-label small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 760;
  line-height: 1.35;
}

.daily-track {
  position: relative;
  z-index: 0;
  min-height: 104px;
  background:
    repeating-linear-gradient(90deg, rgba(28, 36, 44, 0.06) 0 1px, transparent 1px var(--day-width)),
    linear-gradient(180deg, rgba(249, 250, 251, 0.52), rgba(255, 255, 255, 0.96));
}

.weekend-column {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 0;
  background: rgba(38, 74, 128, 0.045);
  pointer-events: none;
}

.dated-flow {
  width: var(--board-width);
  min-width: var(--board-width);
  padding-bottom: 4px;
}

.dated-axis {
  position: relative;
  height: 48px;
  margin-left: 210px;
  border-bottom: 1px solid var(--line);
  background: repeating-linear-gradient(90deg, rgba(28, 36, 44, 0.08) 0 1px, transparent 1px var(--day-width));
}

.dated-axis span {
  position: absolute;
  bottom: 7px;
  width: var(--day-width);
  color: rgba(94, 106, 118, 0.72);
  font-size: 0.62rem;
  font-weight: 850;
  text-align: center;
  transform: translateX(-1px);
}

.dated-axis span::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 1px;
  height: 48px;
  background: rgba(28, 36, 44, 0.08);
}

.dated-axis span.major {
  color: var(--ink);
  font-size: 0.68rem;
}

.dated-axis span.major::before {
  background: rgba(241, 91, 34, 0.36);
}

.dated-sequence-row {
  display: grid;
  grid-template-columns: 210px 1fr;
  min-height: 278px;
  border-bottom: 1px solid var(--line);
}

.dated-vessel-label {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 14px 14px 14px 0;
  border-right: 1px solid var(--line);
}

.dated-vessel-label b {
  display: block;
  margin-bottom: 4px;
  font-size: 0.9rem;
}

.dated-vessel-label small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 760;
  line-height: 1.35;
}

.dated-sequence-track {
  position: relative;
  min-height: 278px;
  background:
    repeating-linear-gradient(90deg, rgba(28, 36, 44, 0.055) 0 1px, transparent 1px var(--day-width)),
    linear-gradient(180deg, rgba(249, 250, 251, 0.62), rgba(255, 255, 255, 0.92));
}

.dated-activity {
  position: absolute;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
  min-height: 24px;
  height: 24px;
  padding: 3px 7px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 7px 16px rgba(28, 36, 44, 0.11);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  text-align: center;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease, background 160ms ease;
  z-index: 1;
}

.dated-activity:hover,
.dated-activity:focus-visible {
  border-color: rgba(241, 91, 34, 0.58);
  border-left-color: var(--teal);
  box-shadow: 0 12px 22px rgba(28, 36, 44, 0.16);
  transform: translateY(-1px);
  outline: none;
}

.dated-activity.selected {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(241, 91, 34, 0.16), 0 12px 24px rgba(28, 36, 44, 0.16);
}

.dated-activity.search-dimmed {
  opacity: 0.22;
  filter: grayscale(0.55);
}

.dated-activity.search-match {
  box-shadow: 0 0 0 3px rgba(38, 74, 128, 0.12), 0 12px 24px rgba(28, 36, 44, 0.18);
}

.dated-activity .bar-title {
  display: -webkit-box;
  overflow: hidden;
  font-size: 0.66rem;
  font-weight: 850;
  line-height: 1.12;
  text-overflow: ellipsis;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.dated-activity .bar-type,
.dated-activity .bar-days {
  justify-self: center;
  color: var(--muted);
  font-size: 0.54rem;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.dated-activity.transit,
.dated-activity.port {
  border-left-color: #d69a2d;
  background: #fffaf0;
}

.dated-activity.installation {
  border-left-color: var(--teal-deep);
  background: #fff7f2;
}

.dated-activity.survey-spool {
  border-left-color: var(--blue);
  background: #f6f9fd;
}

.dated-activity.demob {
  border-left-color: #6f6f77;
  background: #fafafa;
}

.dated-activity.critical {
  border-color: #e7bbb5;
  border-left-color: var(--red);
  background: #fff7f5;
}

.flow-steps {
  display: flex;
  gap: 10px;
  min-width: max-content;
  padding-bottom: 2px;
}

.flow-step {
  position: relative;
  width: 198px;
  min-height: 132px;
  padding: 13px 12px 12px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--teal);
  border-radius: var(--radius);
  background: #fff;
}

.flow-step::after {
  content: "";
  position: absolute;
  top: 35px;
  right: -11px;
  width: 10px;
  height: 2px;
  background: var(--line-strong);
}

.flow-step:last-child::after {
  display: none;
}

.flow-step.transit {
  border-top-color: #d69a2d;
}

.flow-step.port {
  border-top-color: #d69a2d;
}

.flow-step.installation {
  border-top-color: var(--teal-deep);
}

.flow-step.survey-spool {
  border-top-color: var(--blue);
}

.flow-step.demob {
  border-top-color: #6f6f77;
}

.flow-step.critical {
  border-color: #e7bbb5;
  border-top-color: var(--red);
  background: linear-gradient(180deg, #fff7f5, #ffffff);
}

.step-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.step-title {
  display: -webkit-box;
  min-height: 44px;
  margin-bottom: 9px;
  overflow: hidden;
  font-size: 0.83rem;
  font-weight: 820;
  line-height: 1.32;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.step-bottom {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 750;
}

.movement-panel {
  margin-bottom: 14px;
}

.timeline-scroll {
  overflow-x: auto;
  padding: 0 18px 18px;
}

.timeline {
  position: relative;
  min-width: 1480px;
  padding-top: 56px;
}

.month-axis {
  position: absolute;
  inset: 0 0 auto 210px;
  height: 56px;
  border-bottom: 1px solid var(--line);
}

.month-cell {
  position: absolute;
  top: 0;
  bottom: 0;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  padding: 9px 8px;
  text-transform: uppercase;
}

.timeline-row {
  display: grid;
  grid-template-columns: 210px minmax(900px, 1fr);
  min-height: 156px;
  border-bottom: 1px solid var(--line);
}

.timeline-label {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 12px 12px 12px 0;
}

.timeline-label b {
  font-size: 0.92rem;
}

.timeline-label span {
  color: var(--muted);
  font-size: 0.78rem;
}

.timeline-track {
  position: relative;
  min-height: 156px;
  background:
    repeating-linear-gradient(90deg, rgba(23, 35, 31, 0.06) 0 1px, transparent 1px 92px),
    repeating-linear-gradient(180deg, transparent 0 23px, rgba(23, 35, 31, 0.045) 23px 24px);
}

.lane-label {
  position: absolute;
  left: 8px;
  color: rgba(97, 112, 107, 0.72);
  font-size: 0.66rem;
  font-weight: 850;
  text-transform: uppercase;
}

.campaign-bar,
.activity-bar {
  position: absolute;
  border-radius: 7px;
}

.campaign-bar {
  top: 16px;
  height: 20px;
  color: #fff;
  font-size: 0.74rem;
  font-weight: 850;
  line-height: 20px;
  overflow: hidden;
  padding: 0 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.campaign-bar.mpsv {
  background: var(--teal);
}

.campaign-bar.dlb {
  background: var(--blue);
}

.campaign-bar.pre-comm-vessel {
  background: var(--green);
}

.campaign-bar.rig {
  background: #6f6f77;
}

.campaign-bar.barge,
.campaign-bar.ahts,
.campaign-bar.support-vessel {
  background: #8a6f35;
}

.activity-bar {
  min-width: 7px;
  height: 17px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 6px 18px rgba(23, 35, 31, 0.12);
  color: #fff;
  font-size: 0.66rem;
  font-weight: 850;
  line-height: 15px;
  overflow: hidden;
  padding: 0 6px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-bar.port,
.activity-bar.transit {
  background: #d69a2d;
}

.activity-bar.installation {
  background: var(--teal-deep);
}

.activity-bar.survey,
.activity-bar.spool,
.activity-bar.survey-spool {
  background: #6b8fb8;
}

.activity-bar.demob {
  background: #6f6f77;
}

.activity-bar.other {
  background: #8fb5aa;
}

.activity-bar.critical {
  background: var(--red);
}

.current-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #c99b4a;
  z-index: 2;
}

.current-line span {
  position: absolute;
  top: 6px;
  left: 6px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #f8e8c7;
  color: #6e4a07;
  font-size: 0.72rem;
  font-weight: 850;
  white-space: nowrap;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
  gap: 14px;
  margin-bottom: 14px;
}

.watch-list,
.area-load {
  display: grid;
  gap: 9px;
  padding: 14px;
}

.watch-item,
.area-row {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.watch-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

.watch-item b {
  display: block;
  margin-bottom: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.watch-item small,
.area-row span {
  color: var(--muted);
  font-size: 0.8rem;
}

.tag {
  align-self: start;
  padding: 6px 8px;
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal-deep);
  font-size: 0.75rem;
  font-weight: 850;
  white-space: nowrap;
}

.tag.dlb {
  background: var(--blue-soft);
  color: var(--blue);
}

.tag.pre-comm-vessel {
  background: var(--green-soft);
  color: var(--green);
}

.tag.rig {
  background: #ececef;
  color: #555862;
}

.tag.barge,
.tag.ahts,
.tag.support-vessel {
  background: #f4ead3;
  color: #6d521f;
}

.tag.port,
.tag.transit {
  background: var(--amber-soft);
  color: var(--amber);
}

.tag.installation {
  background: var(--teal-soft);
  color: var(--teal-deep);
}

.tag.survey-spool {
  background: var(--blue-soft);
  color: var(--blue);
}

.tag.demob {
  background: #ececef;
  color: #555862;
}

.tag.critical {
  background: var(--red-soft);
  color: var(--red);
}

.area-row-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font-weight: 850;
}

.area-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7eeec;
}

.area-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--teal);
}

.control-panel {
  display: grid;
  grid-template-columns: minmax(320px, 2fr) repeat(3, minmax(170px, 0.8fr));
  gap: 10px;
  margin-bottom: 14px;
  padding: 14px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
  text-transform: uppercase;
}

input,
select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.96rem;
  outline: none;
  padding: 10px 12px;
}

input:focus,
select:focus {
  border-color: #8ecdc6;
  box-shadow: 0 0 0 3px rgba(19, 124, 114, 0.14);
}

.count-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal-deep);
  font-size: 0.78rem;
  font-weight: 850;
}

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

table {
  width: 100%;
  min-width: 1220px;
  border-collapse: collapse;
}

th,
td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #e6eeeb;
  font-size: 0.74rem;
  text-transform: uppercase;
}

td {
  font-size: 0.86rem;
}

td.number {
  text-align: right;
  white-space: nowrap;
  font-weight: 850;
}

.activity-cell {
  min-width: 360px;
  max-width: 620px;
  font-weight: 760;
  line-height: 1.35;
}

.muted {
  color: var(--muted);
}

@media (max-width: 1180px) {
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .vessel-cards,
  .dashboard-grid,
  .control-panel,
  .simulation-layout,
  .flow-head {
    grid-template-columns: 1fr;
  }

  .simulation-controls {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .flow-summary,
  .phase-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 0;
  }
}

@media (max-width: 760px) {
  .app-shell {
    width: min(100% - 16px, 1820px);
    padding-top: 10px;
  }

  .topbar {
    display: block;
  }

  .quick-nav {
    justify-content: flex-start;
    margin-top: 14px;
  }

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

  .flow-summary,
  .phase-strip {
    grid-template-columns: 1fr;
  }

  .simulation-head {
    display: grid;
  }

  .simulation-layout {
    padding: 12px;
  }

  .marine-map {
    min-height: 420px;
  }

  .map-node {
    font-size: 0.68rem;
  }

  .vessel-pin {
    min-width: 104px;
    padding: 8px;
  }
}
/* Tuah brand theme layer */
:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-soft: #f9fafb;
  --surface-strong: #ffffff;
  --ink: #1c242c;
  --muted: #5e6a76;
  --line: #dce3ea;
  --line-strong: #aeb8c3;
  --teal: #f15b22;
  --teal-deep: #c74412;
  --teal-soft: #ffe5d6;
  --coral: #f15b22;
  --coral-soft: #ffe5d6;
  --amber: #f15b22;
  --amber-soft: #fff0e7;
  --blue: #264a80;
  --blue-soft: #e2ebf7;
  --green: #2f7a4f;
  --green-soft: #e1f1e8;
  --red: #c8442e;
  --red-soft: #fde4de;
  --charcoal: #1c242c;
  --shadow: 0 18px 42px rgba(28, 36, 44, 0.11);
}

body {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(244, 246, 248, 0.98)),
    repeating-linear-gradient(90deg, rgba(38, 74, 128, 0.035) 0 1px, transparent 1px 86px);
}

.topbar {
  border-bottom: 4px solid var(--teal);
}

.eyebrow {
  color: var(--teal);
  letter-spacing: 0.02em;
}

h1,
h2,
h3 {
  color: var(--ink);
}

.quick-nav a,
button,
.action-button,
.open-button,
.full-toggle {
  border-color: var(--line-strong);
  color: var(--ink);
}

.quick-nav a:hover,
.quick-nav a[aria-current="page"],
button:hover,
.action-button:hover,
.open-button:hover,
.full-toggle:hover {
  border-color: var(--teal);
  background: var(--teal-soft);
  color: var(--ink);
}

.panel,
.kpi-card,
.control-panel,
.stat-card,
.metric-card,
.money-focus,
.progress-hero,
.curve-hero,
.countdown-card,
.manhours-card,
.timeline-card,
.vessel-card {
  border-color: var(--line);
  box-shadow: var(--shadow);
}

.panel-head,
th {
  background: linear-gradient(90deg, rgba(255, 229, 214, 0.82), rgba(249, 250, 251, 0.96));
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(241, 91, 34, 0.28);
  border-color: var(--teal);
}

.status-chip.critical,
.status-pill.state-rejected,
.variance.bad,
.variance-pill.bad {
  background: var(--red-soft);
  color: var(--red);
}



/* ════════════════════════════════════════
   UNIFIED LAYOUT OVERRIDES (20260524)
   ════════════════════════════════════════ */
:root {
  --bg: #f0f4f8;
  --surface: #ffffff;
  --surface-soft: #f7f9fb;
  --surface-strong: #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.72);
  --ink: #1a202c;
  --muted: #64748b;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --teal: #f15b22;
  --teal-deep: #c74412;
  --teal-soft: #fff1eb;
  --coral: #f15b22;
  --coral-soft: #fff1eb;
  --amber: #d97706;
  --amber-soft: #fffbeb;
  --green: #16a34a;
  --green-soft: #f0fdf4;
  --blue: #2563eb;
  --blue-soft: #eff6ff;
  --red: #dc2626;
  --red-soft: #fef2f2;
  --charcoal: #1e293b;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 6px 16px rgba(0,0,0,0.04);
}
html, body { background: var(--bg); color: var(--ink); }
.app-shell {
  display: grid !important;
  grid-template-columns: 250px minmax(0, 1fr);
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  min-height: 100vh;
}
.main-content .topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 28px;
  background: var(--surface-glass);
  backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.main-content .topbar h1 { font-size: 1.2rem; margin-bottom: 0; }
.main-content main {
  padding: 24px 28px 40px;
  display: flex; flex-direction: column; gap: 20px;
  width: auto;
  max-width: none;
}
.quick-nav, .nav-pill, .status-stack { display: none !important; }

@media (max-width: 1024px) {
  .app-shell { grid-template-columns: 1fr !important; }
  .main-content main { padding: 18px 16px 32px; }
  .main-content .topbar { padding: 12px 16px; }
}

/* ── Vessel offshore theme ── */
body.theme-offshore .vessel-cards,
body.theme-offshore .vessel-card,
body.theme-offshore .movement-overview-panel,
body.theme-offshore .flow-panel,
body.theme-offshore .movement-panel,
body.theme-offshore .flow-board,
body.theme-offshore .overview-timeline,
body.theme-offshore .timeline-scroll,
body.theme-offshore .type-toggle-bar {
  background: var(--surface);
  border-color: var(--line);
}
body.theme-offshore .overview-detail,
body.theme-offshore .vessel-stat,
body.theme-offshore .vessel-summary,
body.theme-offshore .flow-step,
body.theme-offshore .flow-card,
body.theme-offshore .type-toggle {
  background: rgba(255,255,255,0.03);
  border-color: var(--line);
}
body.theme-offshore .full-toggle {
  background: rgba(249, 115, 22, 0.1);
  border-color: rgba(249, 115, 22, 0.3);
  color: #f97316;
}
body.theme-offshore .full-toggle:hover {
  background: #f97316;
  color: #fff;
}
body.theme-offshore .timeline { background: var(--surface-soft); }

/* ── Vessel mobile responsive ── */
@media (max-width: 900px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .vessel-cards { grid-template-columns: 1fr; }
  .panel-head { flex-direction: column; align-items: stretch; gap: 10px; }
  .overview-detail { width: 100%; }
  .legend { flex-wrap: wrap; }
  .timeline-scroll { overflow-x: auto; }
  .flow-board { grid-template-columns: 1fr; }
  .type-toggle-bar { flex-wrap: wrap; }
}
@media (max-width: 640px) {
  .kpi-grid { grid-template-columns: 1fr; }
}

/* ════════════════════════════════════════
   VESSEL MODERN POLISH (20260524-pro)
   Refined palette for management view
   ════════════════════════════════════════ */

/* ── Refined vessel-type palette (light theme) ── */
.overview-bar {
  background: linear-gradient(135deg, #f97316, #ea580c);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08), inset 0 1px 0 rgba(255,255,255,0.18);
  font-weight: 800;
  letter-spacing: 0.01em;
}
.overview-bar.dlb {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}
.overview-bar.pre-comm-vessel {
  background: linear-gradient(135deg, #10b981, #059669);
}
.overview-bar.rig {
  background: linear-gradient(135deg, #64748b, #475569);
}
.overview-bar.barge,
.overview-bar.ahts,
.overview-bar.support-vessel {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}
.overview-bar.critical,
.overview-bar.danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

.overview-bar:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,0.22);
}

/* Refined toggle pills */
.type-toggle.active {
  border-color: rgba(241, 91, 34, 0.4);
  background: rgba(241, 91, 34, 0.12);
  color: var(--ink);
}
.type-toggle.dlb.active {
  border-color: rgba(59, 130, 246, 0.45);
  background: rgba(59, 130, 246, 0.12);
}
.type-toggle.pre-comm-vessel.active {
  border-color: rgba(16, 185, 129, 0.45);
  background: rgba(16, 185, 129, 0.12);
}
.type-toggle.rig.active {
  border-color: rgba(100, 116, 139, 0.5);
  background: rgba(100, 116, 139, 0.12);
}
.type-toggle.barge.active,
.type-toggle.ahts.active,
.type-toggle.support-vessel.active {
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.12);
}

/* Legend dots match new palette */
.legend i.mpsv      { background: #f97316; }
.legend i.dlb       { background: #3b82f6; }
.legend i.rig       { background: #475569; }
.legend i.barge     { background: #d97706; }
.legend i.port      { background: #14b8a6; }
.legend i.install   { background: #ea580c; }
.legend i.survey    { background: #6366f1; }
.legend i.critical  { background: #dc2626; }

.legend span {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.74rem;
}
.legend i {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  margin-right: 6px;
}

/* Overview track refined */
.overview-track {
  height: 26px;
  border-color: var(--line);
  background:
    repeating-linear-gradient(90deg, rgba(28, 36, 44, 0.04) 0 1px, transparent 1px 9%),
    #f8fafc;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.03);
}
.overview-bar {
  top: 4px;
  height: 18px;
}

.overview-timeline {
  background: linear-gradient(180deg, #f8fafc, #ffffff);
  padding: 18px 22px 20px;
}

.overview-focus {
  border-color: rgba(249, 115, 22, 0.55);
  background: rgba(249, 115, 22, 0.07);
  box-shadow: 0 8px 24px rgba(249, 115, 22, 0.14), inset 0 0 0 1px rgba(255,255,255,0.4);
  border-radius: 12px;
}

/* Lane label refresh */
.overview-label b {
  color: var(--ink);
  font-weight: 700;
}
.overview-label .vessel-mark {
  min-width: 44px;
  height: 26px;
  font-size: 0.66rem;
  font-weight: 800;
  border-radius: 6px;
  letter-spacing: 0.04em;
}

/* ════════════════════════════════════════
   OFFSHORE — Activity Flow & Daily Grid fix
   The main "messy white card on dark" issue
   ════════════════════════════════════════ */

body.theme-offshore .type-toggle-bar {
  background: rgba(255,255,255,0.02);
  border-bottom-color: var(--line);
}
body.theme-offshore .type-toggle {
  background: rgba(255,255,255,0.04);
  border-color: var(--line);
  color: var(--muted);
}
body.theme-offshore .type-toggle:hover {
  background: rgba(255,255,255,0.07);
  color: var(--ink);
}
body.theme-offshore .type-toggle.active {
  background: rgba(249, 115, 22, 0.16);
  border-color: rgba(249, 115, 22, 0.5);
  color: #fff;
}
body.theme-offshore .type-toggle.dlb.active {
  background: rgba(59, 130, 246, 0.18);
  border-color: rgba(59, 130, 246, 0.55);
  color: #fff;
}
body.theme-offshore .type-toggle.pre-comm-vessel.active {
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(16, 185, 129, 0.55);
  color: #fff;
}
body.theme-offshore .type-toggle.rig.active {
  background: rgba(148, 163, 184, 0.18);
  border-color: rgba(148, 163, 184, 0.55);
  color: #fff;
}
body.theme-offshore .type-toggle.barge.active,
body.theme-offshore .type-toggle.ahts.active,
body.theme-offshore .type-toggle.support-vessel.active {
  background: rgba(251, 191, 36, 0.18);
  border-color: rgba(251, 191, 36, 0.55);
  color: #fff;
}

body.theme-offshore .overview-timeline {
  background: linear-gradient(180deg, #0c1221, #151d2e);
  border-color: var(--line);
}

body.theme-offshore .overview-track {
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.04) 0 1px, transparent 1px 9%),
    rgba(255,255,255,0.02);
  border-color: var(--line);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.4);
}

body.theme-offshore .overview-scale,
body.theme-offshore .overview-scale span {
  border-color: var(--line);
  color: var(--muted);
}

body.theme-offshore .overview-bar {
  background: linear-gradient(135deg, #fb923c, #ea580c);
  box-shadow: 0 2px 6px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.12);
}
body.theme-offshore .overview-bar.rig {
  background: linear-gradient(135deg, #94a3b8, #64748b);
  color: #0c1221;
}
body.theme-offshore .overview-bar.barge,
body.theme-offshore .overview-bar.ahts,
body.theme-offshore .overview-bar.support-vessel {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #0c1221;
}
body.theme-offshore .overview-bar.dlb {
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
}
body.theme-offshore .overview-bar.pre-comm-vessel {
  background: linear-gradient(135deg, #34d399, #10b981);
}

body.theme-offshore .overview-focus {
  border-color: rgba(249, 115, 22, 0.7);
  background: rgba(249, 115, 22, 0.1);
  box-shadow: 0 8px 24px rgba(249, 115, 22, 0.25), inset 0 0 0 1px rgba(255,255,255,0.08);
}

/* ── Daily Activity Flow grid (FIX: white card on dark page) ── */
body.theme-offshore .flow-board {
  background: var(--surface);
}
body.theme-offshore .daily-corner,
body.theme-offshore .daily-area-corner {
  background: rgba(249, 115, 22, 0.06);
  border-right-color: var(--line);
  color: var(--muted);
}
body.theme-offshore .daily-corner,
body.theme-offshore .daily-vessel-label {
  box-shadow: 8px 0 16px rgba(0,0,0,0.3);
}
body.theme-offshore .daily-area-corner {
  box-shadow: 8px 0 16px rgba(0,0,0,0.3);
}
body.theme-offshore .daily-axis {
  background: linear-gradient(180deg, rgba(249, 115, 22, 0.08), rgba(21, 29, 46, 0.95));
  border-bottom-color: var(--line);
}
body.theme-offshore .daily-axis .date-cell {
  border-left-color: rgba(255,255,255,0.06);
  color: var(--muted);
}
body.theme-offshore .daily-axis .date-cell b {
  color: var(--ink);
}
body.theme-offshore .daily-axis .date-cell.major {
  color: var(--ink);
}
body.theme-offshore .daily-axis .date-cell.month-start {
  background: linear-gradient(180deg, rgba(249, 115, 22, 0.18), rgba(21, 29, 46, 0.95));
  border-left-color: rgba(249, 115, 22, 0.7);
}
body.theme-offshore .daily-axis .date-cell.weekend {
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.12), rgba(21, 29, 46, 0.95));
  box-shadow: inset 0 -3px 0 rgba(56, 189, 248, 0.3);
}
body.theme-offshore .daily-axis .date-cell.weekend b,
body.theme-offshore .daily-axis .date-cell.weekend small,
body.theme-offshore .daily-axis .date-cell.weekend em {
  color: #38bdf8;
}
body.theme-offshore .daily-vessel-label,
body.theme-offshore .daily-area-label {
  background: var(--surface);
  border-right-color: var(--line);
  color: var(--ink);
}
body.theme-offshore .daily-vessel-label b,
body.theme-offshore .daily-area-label b {
  color: var(--ink);
}
body.theme-offshore .daily-vessel-label small,
body.theme-offshore .daily-area-label small {
  color: var(--muted);
}
body.theme-offshore .daily-track {
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.04) 0 1px, transparent 1px var(--day-width)),
    linear-gradient(180deg, rgba(255,255,255,0.015), rgba(21, 29, 46, 0.98));
  border-bottom-color: var(--line);
}
body.theme-offshore .weekend-column {
  background: rgba(56, 189, 248, 0.06);
}

body.theme-offshore .dated-flow,
body.theme-offshore .dated-axis {
  background: var(--surface);
  border-bottom-color: var(--line);
}
body.theme-offshore .dated-axis {
  background: repeating-linear-gradient(90deg, rgba(255,255,255,0.06) 0 1px, transparent 1px var(--day-width));
}
body.theme-offshore .dated-axis span {
  color: rgba(255,255,255,0.4);
}

/* Flow search + nav */
body.theme-offshore .flow-search input {
  background: rgba(255,255,255,0.04);
  border-color: var(--line);
  color: var(--ink);
}
body.theme-offshore .flow-search input::placeholder {
  color: var(--muted);
}
body.theme-offshore .flow-search-nav button {
  background: rgba(255,255,255,0.04);
  border-color: var(--line);
  color: var(--ink);
}
body.theme-offshore .flow-search-nav button:hover:not(:disabled) {
  background: rgba(249, 115, 22, 0.12);
  border-color: rgba(249, 115, 22, 0.4);
  color: #f97316;
}

/* Flow step accent colors get refreshed in dark */
body.theme-offshore .flow-step.transit { background: rgba(59, 130, 246, 0.1); border-color: rgba(59, 130, 246, 0.35); }
body.theme-offshore .flow-step.port { background: rgba(20, 184, 166, 0.1); border-color: rgba(20, 184, 166, 0.35); }
body.theme-offshore .flow-step.installation { background: rgba(249, 115, 22, 0.1); border-color: rgba(249, 115, 22, 0.35); }
body.theme-offshore .flow-step.survey-spool { background: rgba(99, 102, 241, 0.1); border-color: rgba(99, 102, 241, 0.35); }
body.theme-offshore .flow-step.demob { background: rgba(148, 163, 184, 0.08); border-color: rgba(148, 163, 184, 0.3); }
body.theme-offshore .flow-step.critical { background: rgba(239, 68, 68, 0.12); border-color: rgba(239, 68, 68, 0.4); }

/* Selected/highlighted flow card */
body.theme-offshore .flow-selected-copy small {
  color: var(--muted);
}

/* KPI / Vessel card numbers in offshore */
body.theme-offshore .vessel-card strong,
body.theme-offshore .vessel-stat strong,
body.theme-offshore .kpi-card div > span {
  color: #f97316;
}

/* Vessel mark badges */
body.theme-offshore .vessel-mark {
  background: rgba(255,255,255,0.06);
  border-color: var(--line);
  color: var(--ink);
}

/* ════════════════════════════════════════
   VESSEL PROFESSIONAL POLISH v2 (20260524-pro2)
   - Eliminate dated gradients & cream tints
   - Flat modern surfaces everywhere
   - Unified vessel palette for all bar variants
   ════════════════════════════════════════ */

/* ── LIGHT theme: clean modern surfaces ── */

/* Top "Rig-Up | RIG / KURMA MANIS" selection bar — remove cream gradient */
.flow-selection {
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line);
  padding: 12px 18px;
}
.flow-selected-copy b {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 700;
}
.flow-selected-copy small {
  color: var(--muted);
  font-weight: 500;
}

/* White wrapper card — make it match surface */
.vessel-day-board {
  background: var(--surface);
  border-color: var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

/* "VESSEL" / "AREA" sticky header cells — clean modern */
.daily-corner,
.daily-area-corner {
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  border-right: 1px solid var(--line);
  box-shadow: none;
}

/* Date axis (top row with SAT 06, SUN 07) — REMOVE the cream gradient */
.daily-axis {
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line-strong);
}
.daily-axis .date-cell {
  border-left: 1px solid var(--line);
  color: var(--muted);
}
.daily-axis .date-cell b {
  color: var(--ink);
  font-weight: 800;
  font-size: 0.88rem;
}
.daily-axis .date-cell.major {
  color: var(--ink);
}
/* Month start = clean orange accent strip */
.daily-axis .date-cell.month-start {
  background: rgba(241, 91, 34, 0.06);
  border-left: 2px solid var(--teal);
}
/* Weekend = clean blue accent strip, no fade */
.daily-axis .date-cell.weekend {
  background: rgba(37, 99, 235, 0.05);
  box-shadow: inset 0 -2px 0 rgba(37, 99, 235, 0.3);
}
.daily-axis .date-cell.weekend b,
.daily-axis .date-cell.weekend small,
.daily-axis .date-cell.weekend em {
  color: var(--blue);
}

/* Vessel/area labels — flat surface, clear typography */
.daily-vessel-label,
.daily-area-label {
  background: var(--surface);
  border-right: 1px solid var(--line);
  box-shadow: none;
}
.daily-vessel-label b,
.daily-area-label b {
  color: var(--ink);
  font-weight: 700;
  font-size: 0.92rem;
}
.daily-vessel-label small,
.daily-area-label small {
  color: var(--muted);
  font-weight: 500;
}

/* Track rows — REMOVE the vertical fade gradient. Just clean grid lines. */
.daily-track {
  background:
    repeating-linear-gradient(90deg, rgba(28, 36, 44, 0.05) 0 1px, transparent 1px var(--day-width)),
    var(--surface);
}

/* Weekend overlay column — subtle stripe, not a fade */
.weekend-column {
  background: rgba(37, 99, 235, 0.03);
}

/* Row striping for readability */
.daily-grid .daily-vessel-label:nth-of-type(2n),
.daily-grid .daily-area-label:nth-of-type(2n),
.daily-grid .daily-track:nth-of-type(2n) {
  background-color: var(--surface-soft);
}

/* ── Refresh ALL bar palettes (modern unified) ── */

/* Campaign bars (in detail timeline below) */
.campaign-bar.mpsv {
  background: linear-gradient(135deg, #f97316, #ea580c);
}
.campaign-bar.dlb {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}
.campaign-bar.pre-comm-vessel {
  background: linear-gradient(135deg, #10b981, #059669);
}
.campaign-bar.rig {
  background: linear-gradient(135deg, #64748b, #475569);
}
.campaign-bar.barge,
.campaign-bar.ahts,
.campaign-bar.support-vessel {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

/* Activity bars (the small per-day pills on each row) */
.activity-bar {
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  font-weight: 700;
}
.activity-bar.port,
.activity-bar.transit {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}
.activity-bar.installation {
  background: linear-gradient(135deg, #ea580c, #c2410c);
}
.activity-bar.survey,
.activity-bar.spool,
.activity-bar.survey-spool {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
}
.activity-bar.demob {
  background: linear-gradient(135deg, #64748b, #475569);
}
.activity-bar.other {
  background: linear-gradient(135deg, #14b8a6, #0d9488);
}
.activity-bar.critical {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

/* Current-line indicator — refined */
.current-line {
  background: var(--teal);
  box-shadow: 0 0 8px rgba(241, 91, 34, 0.5);
}

/* Phase chips refreshed */
.phase-chip {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  color: var(--muted);
  font-weight: 600;
}
.phase-chip b {
  color: var(--ink);
  font-weight: 700;
}
.phase-chip.port {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.25);
  color: #92400e;
}
.phase-chip.installation {
  background: rgba(234, 88, 12, 0.1);
  border-color: rgba(234, 88, 12, 0.25);
  color: var(--teal-deep);
}
.phase-chip.survey-spool {
  background: rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.25);
  color: #4338ca;
}
.phase-chip.demob {
  background: rgba(100, 116, 139, 0.1);
  border-color: rgba(100, 116, 139, 0.25);
  color: #334155;
}
.phase-chip.critical {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: var(--red);
}

/* ════════════════════════════════════════
   OFFSHORE — clean flat surfaces everywhere
   ════════════════════════════════════════ */

/* Top selection bar */
body.theme-offshore .flow-selection {
  background: rgba(255,255,255,0.02);
  border-bottom-color: var(--line);
}
body.theme-offshore .flow-selected-copy b {
  color: var(--ink);
}
body.theme-offshore .flow-selected-copy small {
  color: var(--muted);
}

/* The wrapper card */
body.theme-offshore .vessel-day-board {
  background: var(--surface);
  border-color: var(--line);
}

/* VESSEL / AREA sticky headers */
body.theme-offshore .daily-corner,
body.theme-offshore .daily-area-corner {
  background: var(--surface-soft);
  color: var(--muted);
  border-right-color: var(--line);
  box-shadow: none;
}

/* Date axis — REMOVE the dramatic gradient, use flat surface */
body.theme-offshore .daily-axis {
  background: var(--surface-soft);
  border-bottom-color: var(--line-strong);
}
body.theme-offshore .daily-axis .date-cell {
  border-left-color: var(--line);
  color: var(--muted);
}
body.theme-offshore .daily-axis .date-cell b {
  color: var(--ink);
}
body.theme-offshore .daily-axis .date-cell.major {
  color: var(--ink);
}
body.theme-offshore .daily-axis .date-cell.month-start {
  background: rgba(249, 115, 22, 0.1);
  border-left: 2px solid rgba(249, 115, 22, 0.6);
  box-shadow: none;
}
body.theme-offshore .daily-axis .date-cell.weekend {
  background: rgba(56, 189, 248, 0.07);
  box-shadow: inset 0 -2px 0 rgba(56, 189, 248, 0.4);
}
body.theme-offshore .daily-axis .date-cell.weekend b,
body.theme-offshore .daily-axis .date-cell.weekend small,
body.theme-offshore .daily-axis .date-cell.weekend em {
  color: #38bdf8;
}

/* Vessel/area labels — solid surface */
body.theme-offshore .daily-vessel-label,
body.theme-offshore .daily-area-label {
  background: var(--surface);
  border-right-color: var(--line);
  box-shadow: none;
}
body.theme-offshore .daily-vessel-label b,
body.theme-offshore .daily-area-label b {
  color: var(--ink);
}
body.theme-offshore .daily-vessel-label small,
body.theme-offshore .daily-area-label small {
  color: var(--muted);
}

/* Track rows — FLAT surface, no vertical fade gradient */
body.theme-offshore .daily-track {
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.04) 0 1px, transparent 1px var(--day-width)),
    var(--surface);
}

/* Weekend overlay — subtle, no shine */
body.theme-offshore .weekend-column {
  background: rgba(56, 189, 248, 0.04);
}

/* Row striping for readability */
body.theme-offshore .daily-grid .daily-vessel-label:nth-of-type(2n),
body.theme-offshore .daily-grid .daily-area-label:nth-of-type(2n),
body.theme-offshore .daily-grid .daily-track:nth-of-type(2n) {
  background-color: var(--surface-soft);
}

/* Campaign bars in offshore */
body.theme-offshore .campaign-bar.mpsv {
  background: linear-gradient(135deg, #fb923c, #ea580c);
}
body.theme-offshore .campaign-bar.dlb {
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
}
body.theme-offshore .campaign-bar.pre-comm-vessel {
  background: linear-gradient(135deg, #34d399, #10b981);
}
body.theme-offshore .campaign-bar.rig {
  background: linear-gradient(135deg, #94a3b8, #64748b);
  color: #0c1221;
}
body.theme-offshore .campaign-bar.barge,
body.theme-offshore .campaign-bar.ahts,
body.theme-offshore .campaign-bar.support-vessel {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #0c1221;
}

/* Activity bars in offshore */
body.theme-offshore .activity-bar {
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}
body.theme-offshore .activity-bar.port,
body.theme-offshore .activity-bar.transit {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #0c1221;
}
body.theme-offshore .activity-bar.installation {
  background: linear-gradient(135deg, #fb923c, #ea580c);
}
body.theme-offshore .activity-bar.survey,
body.theme-offshore .activity-bar.spool,
body.theme-offshore .activity-bar.survey-spool {
  background: linear-gradient(135deg, #a78bfa, #6366f1);
}
body.theme-offshore .activity-bar.demob {
  background: linear-gradient(135deg, #94a3b8, #64748b);
  color: #0c1221;
}
body.theme-offshore .activity-bar.other {
  background: linear-gradient(135deg, #2dd4bf, #14b8a6);
  color: #0c1221;
}
body.theme-offshore .activity-bar.critical {
  background: linear-gradient(135deg, #f87171, #dc2626);
}

/* Current-line in offshore */
body.theme-offshore .current-line {
  background: #f97316;
  box-shadow: 0 0 12px rgba(249, 115, 22, 0.6);
}

/* Phase chips offshore */
body.theme-offshore .phase-chip {
  background: rgba(255,255,255,0.03);
  border-color: var(--line);
  color: var(--muted);
}
body.theme-offshore .phase-chip b {
  color: var(--ink);
}
body.theme-offshore .phase-chip.port {
  background: rgba(251, 191, 36, 0.12);
  border-color: rgba(251, 191, 36, 0.3);
  color: #fbbf24;
}
body.theme-offshore .phase-chip.installation {
  background: rgba(249, 115, 22, 0.12);
  border-color: rgba(249, 115, 22, 0.3);
  color: #fb923c;
}
body.theme-offshore .phase-chip.survey-spool {
  background: rgba(167, 139, 250, 0.12);
  border-color: rgba(167, 139, 250, 0.3);
  color: #a78bfa;
}
body.theme-offshore .phase-chip.demob {
  background: rgba(148, 163, 184, 0.1);
  border-color: rgba(148, 163, 184, 0.3);
  color: #cbd5e1;
}
body.theme-offshore .phase-chip.critical {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.3);
  color: #f87171;
}

/* Flow scroll container */
body.theme-offshore .flow-scroll {
  background: var(--surface);
}

/* Phase strip wrapper */
body.theme-offshore .phase-strip {
  background: transparent;
}

/* ════════════════════════════════════════
   VESSEL CALM-DOWN (20260524-pro3)
   Unify ALL grid surfaces. Remove visual
   noise. Let activity bars be the focus.
   ════════════════════════════════════════ */

/* ── LIGHT theme: calm uniform table ── */

/* Top selection bar — completely flat */
.flow-selection {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

/* Wrapper card */
.vessel-day-board {
  background: var(--surface);
  border: 1px solid var(--line);
}

/* Unify ALL cells to var(--surface). No contrast between sticky & data. */
.daily-corner,
.daily-area-corner,
.daily-axis,
.daily-vessel-label,
.daily-area-label,
.daily-track {
  background: var(--surface);
  box-shadow: none !important;
}

/* Sticky column boundaries — single subtle line, no shadow */
.daily-corner,
.daily-vessel-label {
  border-right: 1px solid var(--line);
}
.daily-area-corner,
.daily-area-label {
  border-right: 1px solid var(--line-strong);
}

/* Date axis — flat, just a bottom border */
.daily-axis {
  border-bottom: 1px solid var(--line);
}
.daily-axis .date-cell {
  border-left: 1px solid rgba(28, 36, 44, 0.04);
  color: var(--muted);
  background: transparent;
}
.daily-axis .date-cell b {
  color: var(--ink);
  font-weight: 700;
  font-size: 0.85rem;
}

/* Remove weekend / month-start visual accents — they were too loud */
.daily-axis .date-cell.month-start {
  background: transparent;
  border-left: 1px solid rgba(28, 36, 44, 0.08);
}
.daily-axis .date-cell.weekend {
  background: transparent;
  box-shadow: none;
}
.daily-axis .date-cell.weekend b,
.daily-axis .date-cell.weekend small,
.daily-axis .date-cell.weekend em {
  color: var(--muted);
}

/* Vessel/area labels — clean */
.daily-vessel-label b,
.daily-area-label b {
  color: var(--ink);
  font-weight: 700;
}
.daily-vessel-label small,
.daily-area-label small {
  color: var(--muted);
  font-weight: 500;
}

/* Track rows — barely visible per-day grid, clear row dividers */
.daily-track {
  border-bottom: 1px solid var(--line);
  background:
    repeating-linear-gradient(90deg,
      rgba(28, 36, 44, 0.025) 0 1px,
      transparent 1px var(--day-width)),
    var(--surface);
}
.daily-vessel-label,
.daily-area-label {
  border-bottom: 1px solid var(--line);
}

/* Weekend overlay — almost invisible */
.weekend-column {
  background: rgba(28, 36, 44, 0.02);
}

/* Remove row striping — it added noise */
.daily-grid .daily-vessel-label:nth-of-type(2n),
.daily-grid .daily-area-label:nth-of-type(2n),
.daily-grid .daily-track:nth-of-type(2n) {
  background-color: var(--surface);
}

/* "VESSEL" / "AREA" headers — subtle */
.daily-corner,
.daily-area-corner {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--line);
}

/* ════════════════════════════════════════
   OFFSHORE — same calm treatment
   ════════════════════════════════════════ */

body.theme-offshore .flow-selection {
  background: var(--surface);
  border-bottom-color: var(--line);
}

body.theme-offshore .vessel-day-board {
  background: var(--surface);
  border-color: var(--line);
}

/* Single unified surface for entire grid */
body.theme-offshore .daily-corner,
body.theme-offshore .daily-area-corner,
body.theme-offshore .daily-axis,
body.theme-offshore .daily-vessel-label,
body.theme-offshore .daily-area-label,
body.theme-offshore .daily-track {
  background: var(--surface);
  box-shadow: none !important;
}

body.theme-offshore .daily-corner,
body.theme-offshore .daily-vessel-label {
  border-right: 1px solid var(--line);
}
body.theme-offshore .daily-area-corner,
body.theme-offshore .daily-area-label {
  border-right: 1px solid var(--line-strong);
}

body.theme-offshore .daily-axis {
  border-bottom: 1px solid var(--line);
}
body.theme-offshore .daily-axis .date-cell {
  border-left: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--muted);
  background: transparent;
}
body.theme-offshore .daily-axis .date-cell b {
  color: var(--ink);
}

/* Remove weekend/month-start accents in offshore too */
body.theme-offshore .daily-axis .date-cell.month-start {
  background: transparent;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}
body.theme-offshore .daily-axis .date-cell.weekend {
  background: transparent;
  box-shadow: none;
}
body.theme-offshore .daily-axis .date-cell.weekend b,
body.theme-offshore .daily-axis .date-cell.weekend small,
body.theme-offshore .daily-axis .date-cell.weekend em {
  color: var(--muted);
}

body.theme-offshore .daily-vessel-label b,
body.theme-offshore .daily-area-label b {
  color: var(--ink);
}
body.theme-offshore .daily-vessel-label small,
body.theme-offshore .daily-area-label small {
  color: var(--muted);
}

/* Track rows — subtle row separation, near-invisible grid */
body.theme-offshore .daily-track {
  border-bottom: 1px solid var(--line);
  background:
    repeating-linear-gradient(90deg,
      rgba(255, 255, 255, 0.025) 0 1px,
      transparent 1px var(--day-width)),
    var(--surface);
}
body.theme-offshore .daily-vessel-label,
body.theme-offshore .daily-area-label {
  border-bottom: 1px solid var(--line);
}

/* Weekend overlay — almost invisible */
body.theme-offshore .weekend-column {
  background: rgba(255, 255, 255, 0.015);
}

/* No row striping */
body.theme-offshore .daily-grid .daily-vessel-label:nth-of-type(2n),
body.theme-offshore .daily-grid .daily-area-label:nth-of-type(2n),
body.theme-offshore .daily-grid .daily-track:nth-of-type(2n) {
  background-color: var(--surface);
}

body.theme-offshore .daily-corner,
body.theme-offshore .daily-area-corner {
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

/* Vessel badge (RIG, BG, etc) — refined */
body.theme-offshore .vessel-mark {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.06em;
}

/* "Rig-Up" / activity bar styling — make it pop more since background is calm */
.activity-bar,
.campaign-bar {
  border-radius: 5px;
  border: 0;
}
body.theme-offshore .activity-bar.other,
body.theme-offshore .campaign-bar.other {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.18), rgba(234, 88, 12, 0.22));
  border: 1px solid rgba(249, 115, 22, 0.6);
  color: #fb923c;
  font-weight: 700;
}
