@font-face {
  font-family: "OpsHub Roboto Condensed";
  src: url("/opshub-assets/fonts/RobotoCondensed-Regular.ttf?v=w5f20-77") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "OpsHub Roboto Condensed";
  src: url("/opshub-assets/fonts/RobotoCondensed-Bold.ttf?v=w5f20-77") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --navy-950: #06162f;
  --navy-900: #071d3e;
  --navy-800: #0a2c5f;
  --header: #0a1d3d;
  --blue-600: #087be8;
  --blue-500: #10a0ff;
  --cyan-400: #31d9f5;
  --ink: #0b1830;
  --muted: #66748b;
  --line: #dfe6ef;
  --surface: rgba(255, 255, 255, 0.92);
  --danger: #c33434;
  --timeline-indicator-size: 1rem;
  --shadow: 0 24px 70px rgba(6, 22, 47, 0.16);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 5%, rgba(49, 217, 245, 0.12), transparent 30rem),
    linear-gradient(145deg, #f7f9fc 0%, #eaf0f7 100%);
}

button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.hidden { display: none !important; }

.ambient {
  position: fixed;
  z-index: -1;
  border-radius: 999px;
  filter: blur(12px);
  opacity: 0.55;
}

.ambient-one {
  width: 28rem;
  height: 28rem;
  right: -10rem;
  top: -8rem;
  background: rgba(16, 160, 255, 0.14);
}

.ambient-two {
  width: 24rem;
  height: 24rem;
  left: -12rem;
  bottom: -8rem;
  background: rgba(49, 217, 245, 0.12);
}

.app-shell { min-height: 100vh; }

.center-view {
  min-height: 100vh;
  display: grid;
  place-content: center;
  padding: 2rem;
}

.center-view > h1 {
  margin: 0.2rem 0 1.5rem;
  font-size: clamp(2.2rem, 7vw, 4rem);
}

.login-card {
  width: min(29rem, calc(100vw - 2rem));
  padding: clamp(1.6rem, 5vw, 2.5rem);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 2rem;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.loading-wordmark,
.login-wordmark {
  display: block;
  width: min(15rem, 72vw);
  height: auto;
  object-fit: contain;
}

.loading-wordmark { margin-bottom: 1.65rem; }
.login-wordmark { width: min(14.5rem, 100%); }

.eyebrow {
  margin: 0;
  color: var(--blue-600);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.19em;
}

.login-copy { margin: 3rem 0 2rem; }
.login-copy h2 { margin: 0 0 0.4rem; font-size: 2rem; letter-spacing: -0.035em; }
.login-copy p, .page-heading > p:last-child { margin: 0; color: var(--muted); }

form { display: grid; gap: 0.65rem; }
label { margin-top: 0.65rem; font-size: 0.84rem; font-weight: 750; }

input {
  width: 100%;
  height: 3.45rem;
  padding: 0 1rem;
  border: 1px solid var(--line);
  border-radius: 0.95rem;
  color: var(--ink);
  outline: none;
  background: #f9fbfd;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

input:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 4px rgba(16, 160, 255, 0.12);
}

.password-field { position: relative; }
.password-field input { padding-right: 4.5rem; }

.text-button {
  position: absolute;
  right: 0.65rem;
  top: 50%;
  translate: 0 -50%;
  border: 0;
  color: var(--blue-600);
  font-size: 0.78rem;
  font-weight: 800;
  background: transparent;
  cursor: pointer;
}

.primary-button, .secondary-button {
  border: 0;
  border-radius: 0.95rem;
  font-weight: 800;
  cursor: pointer;
}

.primary-button {
  min-height: 3.55rem;
  margin-top: 1rem;
  color: white;
  background: linear-gradient(120deg, var(--navy-900), var(--blue-600));
  box-shadow: 0 12px 28px rgba(8, 123, 232, 0.2);
}

.primary-button:disabled { opacity: 0.65; cursor: wait; }

.secondary-button {
  padding: 0.75rem 1rem;
  color: var(--navy-900);
  border: 1px solid var(--line);
  background: white;
}

.form-error {
  margin: 0.55rem 0 0;
  color: var(--danger);
  font-size: 0.84rem;
}

.loader {
  width: 1.8rem;
  height: 1.8rem;
  margin: 0 auto;
  border: 3px solid rgba(8, 123, 232, 0.16);
  border-top-color: var(--blue-600);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

@keyframes spin { to { rotate: 360deg; } }

.topbar {
  position: relative;
  z-index: 20;
  height: 3.35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.34rem clamp(0.75rem, 2vw, 1.5rem);
  color: white;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--header);
  box-shadow: 0 6px 18px rgba(6, 22, 47, 0.16);
}

.topbar-left,
.topbar-actions,
.roster-header-context { display: flex; align-items: center; }
.topbar-left,
.topbar-actions { position: relative; z-index: 2; }
.topbar-left { min-width: 0; gap: 0; }
.topbar-actions { gap: 0.55rem; }
.header-clock {
  position: absolute;
  left: 50%;
  top: 50%;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  transform: translate(-50%, -50%);
  color: #dce8f6;
  font-variant-numeric: tabular-nums;
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.055em;
  pointer-events: none;
  white-space: nowrap;
}
.header-clock i { width: 1px; height: 0.85rem; background: rgba(255,255,255,0.28); }
.header-clock strong { color: white; font-size: inherit; }

.wordmark {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  text-decoration: none;
}

.wordmark img { display: block; width: 7.4rem; height: 2.2rem; object-fit: contain; }

.roster-header-context { min-width: 0; gap: 0.72rem; }
.roster-header-context > a { color: #69c8ff; text-decoration: none; font-size: 0.72rem; font-weight: 800; }
.roster-header-context > strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.94rem; }
.header-divider { width: 1px; height: 1.25rem; margin-left: 0.72rem; background: rgba(255,255,255,0.2); }
.roster-header-context .live-chip { padding: 0.26rem 0.45rem; font-size: 0.52rem; }

.header-command-button {
  min-height: 2.25rem;
  padding: 0 0.8rem;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 0.72rem;
  color: white;
  background: rgba(255,255,255,0.08);
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
}
.header-command-button:hover,
.header-command-button[aria-expanded="true"] { background: rgba(255,255,255,0.16); }

.profile-control { position: relative; }
.profile-avatar {
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  place-items: center;
  padding: 0;
  border: 2px solid rgba(255,255,255,0.72);
  border-radius: 50%;
  color: var(--header);
  background: linear-gradient(145deg, #ffffff, #bfe7ff);
  box-shadow: 0 5px 14px rgba(0,0,0,0.2);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  cursor: pointer;
}
.profile-avatar:hover,
.profile-avatar[aria-expanded="true"] { border-color: #69c8ff; }
.profile-popover {
  position: absolute;
  z-index: 1001;
  top: calc(100% + 0.48rem);
  right: 0;
  width: 13rem;
  overflow: hidden;
  padding: 0.4rem;
  border: 1px solid #d7e1eb;
  border-radius: 0.85rem;
  color: var(--ink);
  background: white;
  box-shadow: 0 18px 48px rgba(6,22,47,0.24);
}
.profile-popover-head { display: grid; gap: 0.12rem; padding: 0.55rem 0.62rem 0.65rem; border-bottom: 1px solid var(--line); }
.profile-popover-head strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.78rem; }
.profile-popover-head span { color: var(--muted); font-size: 0.62rem; font-weight: 750; }
.profile-popover > button {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.58rem 0.62rem;
  border: 0;
  border-radius: 0.55rem;
  color: #b42318;
  background: transparent;
  font-size: 0.72rem;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}
.profile-popover > button:hover { background: #fff1f0; }

.content {
  width: min(76rem, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 6rem) 0;
}

.page-heading h2 {
  margin: 0.4rem 0 0.65rem;
  font-size: clamp(2.3rem, 6vw, 4.5rem);
  letter-spacing: -0.055em;
}

.page-heading.compact h2 { font-size: clamp(2.2rem, 5vw, 3.6rem); }

.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
  gap: 0.75rem;
  margin-top: 2rem;
}

.module-card {
  min-width: 0;
  min-height: 4.6rem;
  display: grid;
  grid-template-columns: 2.55rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 1rem;
  color: white;
  text-decoration: none;
  box-shadow: 0 12px 28px rgba(6, 22, 47, 0.13);
  transition: translate 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.module-card:not(.is-disabled):hover { translate: 0 -2px; box-shadow: 0 18px 36px rgba(6, 22, 47, 0.2); filter: saturate(1.08); }
.module-card.is-disabled { cursor: default; opacity: 0.82; }
.module-theme-rostering { background: linear-gradient(135deg, #071d3e, #124f82); }
.module-theme-documents { background: linear-gradient(135deg, #0b5360, #168295); }
.module-theme-crew { background: linear-gradient(135deg, #452869, #7750a4); }
.module-theme-training { background: linear-gradient(135deg, #75460c, #ba7418); }
.module-theme-payroll { background: linear-gradient(135deg, #15533d, #2d8060); }
.module-icon {
  width: 2.55rem;
  height: 2.55rem;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 0.75rem;
  background: rgba(255,255,255,0.13);
}
.module-icon svg { width: 1.45rem; height: 1.45rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.module-copy { min-width: 0; display: grid; gap: 0.14rem; }
.module-kicker { color: rgba(255,255,255,0.62); font-size: 0.46rem; font-weight: 900; letter-spacing: 0.13em; }
.module-name { overflow: hidden; font-size: 0.94rem; line-height: 1.1; text-overflow: ellipsis; white-space: nowrap; }
.module-state { color: rgba(255,255,255,0.78); font-size: 0.5rem; font-weight: 900; letter-spacing: 0.08em; }
.module-card:not(.is-disabled) .module-state { color: #45ddf4; font-size: 1.25rem; letter-spacing: 0; }

.back-link {
  display: inline-block;
  margin-bottom: 2rem;
  color: var(--blue-600);
  text-decoration: none;
  font-weight: 750;
}

.roster-placeholder {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.25rem;
  margin-top: 3rem;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 1.4rem;
  background: var(--surface);
  box-shadow: 0 18px 50px rgba(6, 22, 47, 0.08);
}

.roster-placeholder p { margin: 0.35rem 0 0; color: var(--muted); }
.roster-icon { display: grid; grid-template-columns: 1fr 1fr; gap: 0.3rem; }
.roster-icon span { width: 1.1rem; height: 1.1rem; border-radius: 0.35rem; background: var(--blue-600); }
.roster-icon span:nth-child(2), .roster-icon span:nth-child(3) { background: var(--cyan-400); }

.status-chip {
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  color: var(--blue-600);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  background: rgba(16, 160, 255, 0.1);
}

.roster-content {
  width: 100%;
  height: calc(100vh - 3.35rem);
  max-width: none;
  margin-inline: 0;
  padding-inline: clamp(0.4rem, 0.65vw, 0.8rem);
  padding-top: 0.5rem;
  padding-bottom: 0.75rem;
  overflow: hidden;
}
#roster-workspace { height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr); }

.roster-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.55rem;
}

.roster-heading > div:first-child { display: flex; align-items: center; gap: 1rem; }
.roster-heading .back-link { margin: 0; font-size: 0.75rem; }
.roster-title-line { display: flex; align-items: center; gap: 0.55rem; }
.roster-title-line .eyebrow { display: none; }
.roster-title-line h2 { margin: 0; font-size: 1.65rem; letter-spacing: -0.035em; }

.live-chip,
.revision-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0.48rem 0.72rem;
  border-radius: 999px;
  color: #087b45;
  background: #dff7e9;
  font-size: 0.69rem;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.live-chip { margin: 0; padding: 0.32rem 0.52rem; font-size: 0.58rem; }
.live-chip i { width: 0.45rem; height: 0.45rem; border-radius: 50%; background: #14a35e; box-shadow: 0 0 0 4px rgba(20,163,94,0.12); }
.revision-chip { color: var(--muted); background: #eef2f7; }

.roster-nav { display: flex; align-items: center; gap: 0.55rem; flex-wrap: wrap; justify-content: flex-end; }
.icon-button {
  width: 2.85rem;
  height: 2.85rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  color: var(--navy-900);
  background: white;
  font-weight: 850;
  cursor: pointer;
}

.roster-state {
  min-height: 24rem;
  display: grid;
  place-content: center;
  gap: 1rem;
  text-align: center;
  color: var(--muted);
}

.roster-state p { margin: 0; }
.error-state strong { color: var(--danger); font-size: 1.1rem; }
.error-state .secondary-button { justify-self: center; margin-top: 0.5rem; }

.week-radar {
  container-type: inline-size;
  display: grid;
  grid-template-columns: repeat(7, minmax(11.5rem, 1fr));
  gap: 0.3rem;
  overflow-x: auto;
  padding: 0 0 0.3rem;
  scrollbar-width: thin;
}

.week-card {
  min-width: 11.5rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 0.18rem;
  gap: clamp(0.18rem, 0.09rem + 0.075cqw, 0.27rem);
  padding: 0.32rem;
  padding: clamp(0.32rem, 0.16rem + 0.1333cqw, 0.48rem);
  font-size: 1rem;
  font-size: clamp(1rem, 0.5rem + 0.4167cqw, 1.5rem);
  text-align: left;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 0.35rem;
  background: rgba(255,255,255,0.78);
  transition: border-color 140ms ease, translate 140ms ease, box-shadow 140ms ease;
}

.week-card:is(button) { cursor: pointer; }
.week-card:hover { translate: 0 -2px; box-shadow: 0 9px 22px rgba(6,22,47,0.08); }
.week-card.active { border-color: #72c8f7; background: linear-gradient(145deg, #f8fdff, #eaf8ff); box-shadow: inset 0 0 0 1px rgba(16,160,255,0.15); }
.radar-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem;
}
.week-label { color: var(--navy-800); font-size: 0.62em; font-weight: 900; letter-spacing: 0.04em; white-space: nowrap; }
.radar-head-stats { display: flex; gap: 0.18rem; }
.radar-stat { min-width: 2rem; min-width: clamp(2rem, 1rem + 0.8333cqw, 3rem); padding: 0.12rem 0.22rem; border: 1px solid #d7e0eb; border-radius: 0.2rem; background: #fff; color: #52657f; font-size: 0.52em; font-weight: 850; text-align: center; white-space: nowrap; }
.week-period { overflow: hidden; color: #6b7b92; font-size: 0.5em; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.week-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.16rem; }
.radar-metric { min-width: 0; padding: 0.18rem 0.22rem; border: 1px solid #b8e2c8; border-radius: 0.18rem; background: #effaf3; }
.radar-metric-label { display: block; overflow: hidden; color: #62738b; font-size: 0.42em; font-weight: 850; letter-spacing: 0.025em; text-transform: uppercase; text-overflow: ellipsis; white-space: nowrap; }
.radar-metric-value { display: block; margin-top: 0.05rem; color: #16754c; font-size: 0.66em; line-height: 1; }
.radar-metric.bad { border-color: #efb8b8; background: #fff2f2; }
.radar-metric.bad .radar-metric-value { color: var(--danger); }
.radar-metric.warn { border-color: #efd59a; background: #fff8e9; }
.radar-metric.warn .radar-metric-value { color: #a66c00; }
.radar-metric.override { border-color: #d1c0ef; background: #f7f1ff; }
.radar-metric.override .radar-metric-value { color: #7251a7; }
.week-card.radar-agg { border-color: #cdbdea; background: #faf7ff; }
.week-card.radar-outlook { background: #f4f6f8; }
.week-card.radar-outlook .radar-metric { border-color: #d9e0e8; background: #fff; }

.timeline-card {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.9);
  border-radius: 1.35rem;
  background: rgba(255,255,255,0.86);
  box-shadow: 0 18px 50px rgba(6,22,47,0.08);
}

.timeline-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.58rem 0.8rem;
  border-bottom: 1px solid var(--line);
}

.timeline-card-head h3 { margin: 0; font-size: 0.82rem; }
.timeline-scroll { min-height: 0; overflow: auto; max-height: none; scrollbar-width: thin; user-select: none; -webkit-user-select: none; }
.timeline-canvas {
  --day-width: 5.75rem;
  position: relative;
  min-width: calc(10rem + (var(--day-count) * var(--day-width)));
}

.timeline-row {
  display: grid;
  grid-template-columns: 10rem repeat(var(--day-count), var(--day-width));
  min-height: 3.25rem;
  border-bottom: 1px solid #e7edf4;
}

.timeline-label {
  position: sticky;
  left: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.18rem;
  padding: 0.65rem 0.8rem;
  border-right: 1px solid var(--line);
  color: var(--ink);
  background: #f5f8fb;
}

.timeline-label strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.74rem; }
.timeline-label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 0.56rem; font-weight: 700; }
.timeline-day { min-width: 0; padding: 0.32rem; border-right: 1px solid #e7edf4; background: rgba(255,255,255,0.72); }

.header-row {
  position: sticky;
  top: 0;
  z-index: 5;
  min-height: 4rem;
  box-shadow: 0 2px 9px rgba(6,22,47,0.05);
}

.fixed-timeline-row {
  position: sticky;
  top: var(--sticky-top);
  z-index: 8;
}
.fixed-simulator-row { z-index: 7; height: 3.5rem; min-height: 3.5rem; }
.crew-timeline-row { height: 4.5rem; min-height: 4.5rem; }
.fixed-simulator-row .resource-cell { padding-top: 0.68rem; padding-bottom: 0.04rem; }
.day-grid-row.fixed-simulator-row .day-session-block { top: calc(50% + 0.32rem); }
.fixed-crew-divider { z-index: 9; box-shadow: 0 2px 7px rgba(6,22,47,0.08); }
.fixed-timeline-row .timeline-day,
.fixed-timeline-row .day-time-track { background-color: #fcfbf6; }
.timeline-row.alternate-row .timeline-label,
.day-grid-row.alternate-row .timeline-label { background-color: #edf3f8; }
.timeline-row.alternate-row .timeline-day,
.day-grid-row.alternate-row .day-time-track { background-color: #f4f7fa; }

.header-row .timeline-label { z-index: 6; color: var(--muted); font-size: 0.6rem; font-weight: 850; letter-spacing: 0.08em; }
.day-header { display: grid; place-items: center; align-content: center; gap: 0.15rem; background: #f8fafc; }
.day-weekday { color: var(--muted); font-size: 0.55rem; font-weight: 800; }
.day-number { font-size: 0.9rem; }
.day-counters { display: flex; gap: 0.15rem; margin-top: 0.2rem; }
.counter { width: 0.9rem; height: 0.9rem; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--navy-900); font-size: 0.45rem; font-style: normal; font-weight: 850; }
.counter.uncovered { background: #e3a20b; }
.counter.hard { background: #d34b4b; }
.counter.warning { background: #8c70cf; }
.counter:not(.on):not(.sessions) { opacity: 0.2; }

.section-row { min-height: 1.75rem; }
.section-row .timeline-label { color: var(--blue-600); font-size: 0.61rem; font-weight: 850; letter-spacing: 0.1em; background: #eaf2fb; }
.section-row .timeline-day { background: #edf3f9; }
.resource-cell, .crew-cell { display: flex; flex-direction: column; justify-content: center; gap: 0.22rem; }
.crew-cell { position: relative; }
.crew-day-indicators {
  position: absolute;
  top: 12.5%;
  left: 50%;
  right: auto;
  transform: translate(-50%, -50%);
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 0.12rem;
  pointer-events: none;
}
.crew-day-indicator {
  flex: 0 0 var(--timeline-indicator-size);
  width: var(--timeline-indicator-size);
  min-width: var(--timeline-indicator-size);
  height: var(--timeline-indicator-size);
  min-height: var(--timeline-indicator-size);
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 0;
  color: #26323c;
  background: transparent;
}
button.crew-day-indicator { pointer-events: auto; cursor: pointer; }
.ops-note-indicator { border-radius: 0.2rem; background: transparent; box-shadow: none; }
.crew-day-indicator svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.iwoff-indicator { color: #071d3e; }
.iwoff-indicator[data-roster-context] { pointer-events: auto; cursor: context-menu; }
.day-time-track > .crew-day-indicators { top: 12.5%; left: 50%; right: auto; transform: translate(-50%, -50%); }
.month-timeline-canvas .crew-day-indicators { top: 12.5%; left: 50%; right: auto; transform: translate(-50%, -50%); }
.crew-day-indicators > .special-duty-note-marker {
  position: static;
  transform: none;
}
.day-session-strip {
  position: relative;
  z-index: 3;
  width: 100%;
  height: 2rem;
  background-image: linear-gradient(to right, rgba(151, 169, 188, 0.22) 1px, transparent 1px);
  background-size: 25% 100%;
}
.session-card,
.duty-badge {
  min-width: 0;
  display: grid;
  justify-items: start;
  overflow: hidden;
  padding: 0.27rem 0.38rem;
  border-radius: 0;
  line-height: 1.05;
}

.session-card { position: relative; color: #0a1d3d; background: #e8f4fd; border: 1px solid #0a1d3d; font-family: "OpsHub Roboto Condensed", "Arial Narrow", sans-serif; font-stretch: condensed; font-variant-numeric: tabular-nums; }
.session-card.range-session-card { position: absolute; top: 50%; min-width: 0; height: 2.35rem; padding: 0; transform: translateY(-50%); }
.session-card.crew-session-puck,
.day-session-block.crew-session-puck { height: 37.5%; min-height: 0; margin: 0; padding: 0; border-left-width: 1px; }
.crew-session-puck .session-primary { gap: 0; padding: 0; }
.crew-session-puck .session-product { min-width: max-content; padding: 0; }
.session-card.range-session-card:not(.crew-session-puck),
.day-session-block:not(.crew-session-puck) { height: 2.35rem; align-content: center; row-gap: 0; padding: 0; }
.session-card.simulator-session-puck,
.day-session-block.simulator-session-puck { container: simulator-session-puck / inline-size; }
.simulator-session-puck .session-primary { gap: 0; padding: 0; line-height: 0.92; }
.simulator-session-puck .session-product,
.simulator-session-puck .session-window { min-width: 0; overflow: hidden; text-align: left; text-overflow: ellipsis; }
.simulator-session-puck .session-crew { margin-top: 0; line-height: 0.92; }
.simulator-session-puck .session-crew strong { overflow: hidden; text-overflow: ellipsis; }
.crew-cell > .range-session-card { z-index: 4; }
.crew-cell > .availability-status-badge { z-index: 1; }
.crew-cell > .duty-badge.special { z-index: 2; }
.session-card.md82,
.session-card.uncovered { background: #e8f4fd; }
.session-primary { width: 100%; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: 0; padding: 0; color: #0a1d3d; font-size: 0.58rem; font-weight: 400; line-height: 0.92; white-space: nowrap; }
.session-product { overflow: hidden; text-align: left; text-overflow: ellipsis; font-weight: 700; }
.session-window { overflow: hidden; text-align: left; text-overflow: ellipsis; font-weight: 400; }
.session-crew { width: 100%; overflow: hidden; margin-top: 0; color: #0a1d3d; font-size: 0.46rem; font-weight: 700; line-height: 0.92; text-overflow: ellipsis; white-space: nowrap; }
.session-crew-code { font-weight: 700; }
.session-crew-code.unassigned { color: #c33434; }
.session-note-markers {
  position: absolute;
  top: auto;
  bottom: calc(100% + 0.09rem);
  left: 50%;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 0.18rem;
  padding: 0 0.08rem;
  border-radius: 0.2rem;
  background: transparent;
  overflow: visible;
  transform: translateX(-50%);
  pointer-events: none;
}
.session-note-markers.session-aligned-indicators {
  top: 12.5%;
  bottom: auto;
  justify-content: center;
  padding: 0;
  transform: translateY(-50%);
}
.session-note-marker {
  flex: 0 0 var(--timeline-indicator-size);
  width: var(--timeline-indicator-size);
  min-width: var(--timeline-indicator-size);
  height: var(--timeline-indicator-size);
  min-height: var(--timeline-indicator-size);
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 0;
  color: #26323c;
  background: transparent;
  pointer-events: auto;
}
button.session-note-marker { pointer-events: auto; cursor: pointer; }
.session-note-marker svg { width: 100%; height: 100%; overflow: visible; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.customer-note-marker { color: #d92d20; }
.crew-timeline-row:has(.session-note-markers),
.crew-timeline-row:has(.crew-day-indicators.has-ops-note) { min-height: 4.5rem; }
.duty-badge { color: #11233d; background: #dce7f4; border-left: 3px solid #7ea7cf; }
.duty-badge strong { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.57rem; font-weight: 400; }
.duty-badge span { color: inherit; opacity: 0.7; font-size: 0.46rem; }
.duty-badge.off { color: #4e5966; background: #e4e7ea; border-left-color: #a7adb4; }
.duty-badge.available { color: #0a1d3d; background: #ffc107; border-left-color: #ffc107; }
.duty-badge.standby { color: #075b35; background: #c6efce; border-left-color: #c6efce; }
.duty-badge.duty { color: white; background: #0b376d; border-left-color: #2ed28a; }
.duty-badge.special { height: 37.5%; min-height: 0; align-content: center; justify-items: start; margin: 0; padding: 0; color: #d0d7de; background: #26323c; border-left-color: #26323c; }
.duty-badge.special strong { width: 100%; font-weight: 400; text-align: left; }
.duty-badge.centered-availability-badge { justify-items: center; }
.duty-badge.centered-availability-badge strong { width: 100%; text-align: center; }
.duty-badge.special.range-status-badge { position: relative; }
.duty-badge.special:has(.special-duty-note-marker),
.day-special-duty-block:has(.special-duty-note-marker) { overflow: visible; }
.special-duty-note-marker {
  position: absolute;
  bottom: calc(100% + 0.24rem);
  left: 50%;
  z-index: 7;
  flex: 0 0 var(--timeline-indicator-size);
  width: var(--timeline-indicator-size);
  min-width: var(--timeline-indicator-size);
  height: var(--timeline-indicator-size);
  min-height: var(--timeline-indicator-size);
  display: inline-grid;
  place-items: center;
  color: #26323c;
  background: transparent;
  transform: translateX(-50%);
  pointer-events: auto;
  opacity: 1;
}
.special-duty-note-marker svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.operational-issue-indicator { position: relative; color: #d73a49; }
.operational-issue-indicator.issue-warning { color: #f2c94c; }
.operational-issue-indicator svg .issue-fill { fill: currentColor; stroke: none; }
.operational-issue-indicator svg .issue-mark { fill: none; stroke: white; stroke-width: 2; stroke-linecap: round; }
.operational-issue-indicator.issue-warning svg .issue-mark { stroke: #0a1d3d; }
.operational-issue-indicator svg circle.issue-mark { fill: white; stroke: none; }
.operational-issue-indicator.issue-warning svg circle.issue-mark { fill: #0a1d3d; }
.operational-issue-count {
  position: absolute;
  top: -0.26rem;
  right: -0.3rem;
  min-width: 0.66rem;
  height: 0.66rem;
  padding: 0 0.12rem;
  border: 1px solid white;
  border-radius: 999px;
  color: white;
  background: #0a1d3d;
  font-size: 0.43rem;
  font-weight: 900;
  line-height: 0.58rem;
  text-align: center;
}

.duty-badge.session { color: white; background: #0a5ea8; border-left-color: #37d99a; }
.range-duty-badge { position: absolute; top: 50%; min-width: 0; height: 37.5%; min-height: 0; align-content: center; transform: translateY(-50%); }
.range-status-badge { width: 20%; min-width: 0; height: 37.5%; min-height: 0; align-self: center; align-content: center; justify-items: center; }
.range-status-badge.availability-status-badge { width: min(7rem, calc(100% - 0.8rem)); }
.month-timeline-canvas .availability-status-badge strong {
  max-width: none;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Keep roster captions physically legible on high-density wide displays.
   Values stay at the current size through 1920px and grow smoothly to 1.5x at 3840px. */
.timeline-canvas .duty-badge strong {
  font-size: clamp(0.57rem, 0.285rem + 0.2375vw, 0.855rem);
}
.timeline-canvas .duty-badge span {
  font-size: clamp(0.46rem, 0.23rem + 0.1917vw, 0.69rem);
}
.month-timeline-canvas .availability-status-badge.range-status-badge {
  min-width: clamp(2.6rem, 1.3rem + 1.0833vw, 3.9rem);
  padding-inline: clamp(0.32rem, 0.16rem + 0.1333vw, 0.48rem);
}

.timeline-label:has(.crew-identity) { justify-content: flex-start; padding: 0.22rem 0.45rem 0.18rem; }
.crew-identity { width: 100%; min-width: 0; height: 100%; display: flex; flex-direction: column; gap: 0.1rem; }
.crew-identity[data-roster-context] { cursor: context-menu; }
.crew-identity-head { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) 2.55rem; align-items: start; gap: 0.25rem; }
.crew-code { overflow: hidden; color: var(--ink); font-size: 0.74rem; font-weight: 900; line-height: 1rem; text-overflow: ellipsis; white-space: nowrap; }
.crew-rank { display: grid; place-items: center; min-height: 1rem; padding: 0.08rem 0.22rem; border: 1px solid #b8c4d1; border-radius: 0; color: #172033 !important; background: #dce5ed; font-size: 0.56rem !important; font-weight: 900 !important; }
.crew-rank.rank-ht { background: #f2dfaa; }
.crew-rank.rank-sai { background: #c8dae8; }
.crew-rank.rank-jai { background: #cfe3ef; }
.crew-rank.rank-sbi { background: #ddd6ef; }
.crew-rank.rank-jbi { background: #e5d9ee; }
.timeline-label .crew-name { overflow: hidden; color: #26323c; font-size: 0.56rem; font-weight: 850; line-height: 1.08; text-overflow: ellipsis; white-space: nowrap; }
.crew-hour-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.06rem 0.12rem; margin-top: auto; padding-bottom: 0.08rem; }
.timeline-label .crew-hour-value { overflow: visible; color: #111827; font-size: 0.54rem; font-weight: 900; line-height: 1.05; text-align: center; }

.timeline-tools { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; justify-content: flex-end; }
.zoom-controls,
.view-controls,
.timeline-nav-controls {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.72rem;
  background: white;
}

.zoom-controls button,
.view-controls button,
.timeline-nav-controls button {
  min-width: 2.25rem;
  height: 2.15rem;
  padding: 0 0.65rem;
  border: 0;
  border-right: 1px solid var(--line);
  color: var(--navy-900);
  background: white;
  font-size: 0.72rem;
  font-weight: 850;
  cursor: pointer;
}

.zoom-controls button:last-child { border-right: 0; color: var(--blue-600); }
.view-controls button:last-child { border-right: 0; }
.timeline-nav-controls button:last-child { border-right: 0; }
.timeline-nav-controls button:nth-child(2),
.timeline-nav-controls button:last-child { min-width: 3.5rem; }
.timeline-nav-controls #roster-set-day { min-width: 4.6rem; }
.view-controls button { min-width: 2.4rem; padding-inline: 0.48rem; }
.zoom-controls button:hover,
.view-controls button:hover,
.timeline-nav-controls button:hover { background: #f1f6fb; }
.zoom-controls button:disabled,
.timeline-nav-controls button:disabled { color: #9aa6b4; background: #f5f7fa; cursor: default; }
.view-controls button.active { color: white; background: var(--navy-900); }

.day-timeline-canvas {
  --hour-count: 12;
  --hour-width: 8.5rem;
  position: relative;
  min-width: calc(10rem + (var(--hour-count) * var(--hour-width)));
}
.timeline-now-line {
  position: absolute;
  top: 4rem;
  bottom: 0;
  z-index: 12;
  width: 2px;
  transform: translateX(-1px);
  background: #ff3b57;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.8), 0 0 9px rgba(255,59,87,0.35);
  pointer-events: none;
}
.day-timeline-canvas .timeline-now-line { top: 2.2rem; }
.timeline-now-line span {
  position: sticky;
  top: 0.22rem;
  display: block;
  width: max-content;
  margin-left: 0.3rem;
  padding: 0.18rem 0.34rem;
  border-radius: 0.32rem;
  color: white;
  background: #ff3b57;
  box-shadow: 0 2px 7px rgba(118,14,33,0.25);
  font-size: 0.49rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.day-grid-row,
.day-section-row {
  display: grid;
  grid-template-columns: 10rem minmax(0, 1fr);
  min-height: 3.25rem;
  border-bottom: 1px solid #e0e7ef;
}

.day-hours-row { position: sticky; top: 0; z-index: 5; min-height: 2.2rem; box-shadow: 0 2px 9px rgba(6,22,47,0.05); }
.day-hours-row .timeline-label { z-index: 6; }
.day-hours-track {
  display: grid;
  grid-template-columns: repeat(var(--hour-count), var(--hour-width));
  align-items: stretch;
  color: #627087;
  background: #f7f5ed;
}
.day-hours-track span { display: flex; align-items: center; padding: 0 0 0 0.5rem; border-left: 1px solid #dbe3ea; font-size: 0.58rem; font-weight: 800; }
.day-section-row { min-height: 1.75rem; }
.day-section-row .timeline-label { color: var(--blue-600); font-size: 0.61rem; font-weight: 850; letter-spacing: 0.1em; background: #eaf2fb; }
.day-section-fill { background: #edf3f9; }
.day-time-track {
  position: relative;
  overflow: hidden;
  min-width: calc(var(--hour-count) * var(--hour-width));
  background-color: #fcfbf6;
  background-image: linear-gradient(to right, #dbe3ea 1px, transparent 1px);
  background-size: var(--hour-width) 100%;
}
.day-session-block,
.day-special-duty-block,
.day-availability-block {
  position: absolute;
  top: 50%;
  min-width: 0;
  height: 1.85rem;
  display: grid;
  align-items: center;
  gap: 0.35rem;
  padding: 0 0.48rem;
  transform: translateY(-50%);
  overflow: hidden;
  border: 1px solid #afbed0;
  border-left: 1px solid #afbed0;
  border-radius: 0;
  color: #11233d;
  background: #f7f9fc;
  box-shadow: 0 1px 2px rgba(6,22,47,0.06);
  white-space: nowrap;
}
.day-session-block { z-index: 4; gap: 0; color: #0a1d3d; background: #e8f4fd; border-color: #0a1d3d; font-family: "OpsHub Roboto Condensed", "Arial Narrow", sans-serif; font-stretch: condensed; font-variant-numeric: tabular-nums; }
.session-card,
.day-session-block {
  align-items: center;
  justify-items: stretch;
  line-height: normal;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(6,22,47,0.06);
}
.session-card:has(.session-note-markers),
.day-session-block:has(.session-note-markers) { overflow: visible; }
.day-session-block.md82,
.day-session-block.uncovered { background: #e8f4fd; }
.day-special-duty-block { z-index: 2; height: 37.5%; min-height: 0; margin: 0; padding: 0; gap: 0; grid-template-columns: 1fr; justify-items: start; color: #d0d7de; background: #26323c; border-color: transparent; }
.day-availability-block { z-index: 2; height: 37.5%; min-height: 0; justify-items: center; padding-block: 0.06rem; border-left-width: 3px; }
.day-special-duty-block.without-times { grid-template-columns: 1fr; }
.session-card.range-session-card.simulator-session-puck,
.session-card.range-session-card.crew-session-puck,
.day-session-block.simulator-session-puck,
.day-session-block.crew-session-puck,
.duty-badge.special,
.range-status-badge,
.day-special-duty-block,
.day-availability-block { padding-left: 1px; }
.day-special-duty-block[data-roster-context],
.duty-badge[data-roster-context] { pointer-events: auto; cursor: context-menu; }
.day-special-duty-block span { font-size: 0.58rem; font-weight: 400; }
.day-special-duty-block strong { width: 100%; overflow: hidden; text-align: left; text-overflow: ellipsis; font-size: 0.63rem; font-weight: 400; }
.day-timeline-canvas .duty-badge strong {
  font-size: clamp(0.57rem, 0.285rem + 0.2375vw, 0.855rem);
}
.day-timeline-canvas .duty-badge span {
  font-size: clamp(0.46rem, 0.23rem + 0.1917vw, 0.69rem);
}
.day-timeline-canvas .day-special-duty-block span {
  font-size: clamp(0.58rem, 0.29rem + 0.2417vw, 0.87rem);
}
.day-timeline-canvas .day-special-duty-block strong {
  font-size: clamp(0.63rem, 0.315rem + 0.2625vw, 0.945rem);
}
.operational-issue-list .issue-warning strong { color: #8a5a00; }
.day-duty-window {
  position: absolute;
  top: 50%;
  z-index: 1;
  height: 0.95rem;
  transform: translateY(-50%);
  border-radius: 0;
  background: #754575;
  opacity: 0.88;
}
.day-status-badge { position: absolute; top: 50%; left: 50%; width: 7rem; justify-items: center; transform: translate(-50%, -50%); }
.crew-cell > .range-status-badge { position: absolute; left: 40%; transform: translate(-50%, -50%); }
.crew-cell > .crew-activity-lane-1,
.day-time-track > .crew-activity-lane-1 { top: 43.75%; }
.crew-cell > .crew-activity-lane-2,
.day-time-track > .crew-activity-lane-2 { top: 81.25%; }

.context-menu {
  position: fixed;
  z-index: 1000;
  width: min(15.5rem, calc(100vw - 1rem));
  overflow: visible;
  padding: 0.3rem;
  border: 1px solid #cbd7e4;
  border-radius: 0.72rem;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 44px rgba(6, 22, 47, 0.22);
  backdrop-filter: blur(16px);
}
.context-menu-head { display: grid; gap: 0.1rem; padding: 0.45rem 0.58rem 0.38rem; }
.context-menu-head strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.78rem; }
.context-menu-head span { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; font-size: 0.6rem; font-weight: 700; }
.context-menu-head .context-menu-meta { color: var(--ink); font-size: 0.58rem; font-weight: 900; }
.context-menu-separator { height: 1px; margin: 0.2rem 0.16rem; background: #e3eaf1; }
.context-menu-item {
  width: 100%;
  min-height: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  padding: 0.26rem 0.58rem;
  border: 0;
  border-radius: 0.45rem;
  color: var(--ink);
  background: transparent;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 750;
  line-height: 1.05;
  text-align: left;
  cursor: pointer;
}
.context-menu-item:hover,
.context-menu-item:focus-visible { outline: 0; background: #edf5fc; }
.context-menu-item.danger { color: #b42318; }
.context-menu-item:disabled { color: #8b97a7; cursor: default; }
.context-menu-item:disabled:hover { background: transparent; }
.context-menu-next { color: #9aa6b4; font-size: 0.46rem; font-weight: 850; letter-spacing: 0.08em; }
.context-menu-reason { max-width: 7rem; font-size: 0.52rem; font-weight: 400; line-height: 1.15; text-align: right; }
#roster-context-menu { max-height: calc(100vh - 1rem); overflow-y: auto; }
.context-menu-section { padding: 0.25rem 0.58rem 0.14rem; color: var(--blue-600); font-size: 0.5rem; font-weight: 850; letter-spacing: 0.1em; }
.context-menu-submenu { position: relative; width: 100%; }
.context-menu-submenu-toggle { color: var(--blue-600); font-size: 0.62rem; font-weight: 850; letter-spacing: 0.06em; }
.context-menu-duty-badge { display: inline-grid; place-items: center; min-width: 2.8rem; min-height: 1.28rem; padding: 0.12rem 0.38rem; border-left: 3px solid currentColor; border-radius: 0; color: #d0d7de; background: #26323c; letter-spacing: 0.04em; }
.context-menu-chevron { font-size: 1rem; line-height: 1; }
.context-menu-submenu-panel {
  position: absolute;
  top: -0.38rem;
  left: calc(100% + 0.42rem);
  z-index: 1002;
  width: 10.5rem;
  display: none;
  padding: 0.3rem;
  border: 1px solid #cbd7e4;
  border-radius: 0.72rem;
  background: rgba(255,255,255,0.99);
  box-shadow: 0 14px 34px rgba(6,22,47,0.22);
}
.context-menu-submenu.open > .context-menu-submenu-panel { display: block; }
.context-menu-submenu.open-left > .context-menu-submenu-panel { right: calc(100% + 0.42rem); left: auto; }
.context-menu-submenu.open-left .context-menu-chevron { transform: rotate(180deg); }
.context-menu-submenu-item { min-height: 1.65rem; font-size: 0.67rem; }
.roster-command-menu { position: relative; }
.publication-menu { width: min(18rem, calc(100vw - 1rem)); }
.context-toast {
  position: fixed;
  z-index: 1001;
  right: 1rem;
  bottom: 1rem;
  padding: 0.65rem 0.85rem;
  border-radius: 0.55rem;
  color: white;
  background: var(--navy-900);
  box-shadow: 0 10px 28px rgba(6, 22, 47, 0.2);
  font-size: 0.7rem;
  font-weight: 750;
}
.note-tooltip {
  position: fixed;
  z-index: 1200;
  max-width: min(30rem, calc(100vw - 1rem));
  padding: 0.5rem 0.62rem;
  border: 1px solid #f0a22e;
  border-radius: 0.28rem;
  color: white;
  background: #0b376d;
  box-shadow: 0 8px 24px rgba(6,22,47,0.26);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.4;
  white-space: pre-wrap;
  pointer-events: none;
}
.note-tooltip.structured-note-tooltip {
  inline-size: max-content;
  max-inline-size: min(52ch, calc(100vw - 1rem));
  max-block-size: min(50vh, 24rem);
  overflow-y: auto;
  padding: 0.58rem 0.7rem;
  border-color: #69727d;
  color: #fff;
  background: #222426;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-weight: 400;
  line-height: 1.35;
  overflow-wrap: break-word;
}
.note-tooltip-section {
  padding-top: 0.28rem;
  border-top: 1px dashed rgba(255,255,255,0.82);
}
.note-tooltip-section + .note-tooltip-section { margin-top: 0.72rem; }
.note-tooltip-section-label {
  display: block;
  padding: 0.16rem 0 0.28rem;
  border-bottom: 1px dashed rgba(255,255,255,0.82);
  font: inherit;
}
.note-tooltip-section-copy {
  margin-top: 0.42rem;
  white-space: pre-wrap;
}
.note-tooltip.structured-note-tooltip.session-detail-tooltip {
  inline-size: min(28rem, calc(100vw - 1rem));
  max-inline-size: min(28rem, calc(100vw - 1rem));
  max-block-size: min(60vh, 30rem);
  padding: 0.58rem 0.72rem;
  border-color: #f0a22e;
  color: #fff;
  background: rgba(11, 55, 109, 0.97);
  font-family: "OpsHub Roboto Condensed", "Arial Narrow", sans-serif;
  font-weight: 400;
  line-height: 1.2;
}
.session-detail-tooltip .note-tooltip-section { padding-top: 0.34rem; border-top: 1px solid rgba(255,255,255,0.38); }
.session-detail-tooltip .note-tooltip-section + .note-tooltip-section { margin-top: 0.5rem; }
.session-detail-tooltip .note-tooltip-section-label { padding: 0 0 0.3rem; border-bottom: 0; color: #fff; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; }
.session-tooltip-grid { display: grid; grid-template-columns: 5.2rem minmax(0, 1fr); gap: 0.16rem 0.62rem; margin: 0; }
.session-tooltip-key,
.session-tooltip-value { margin: 0; font-size: 0.69rem; }
.session-tooltip-key { color: rgba(255,255,255,0.68); font-weight: 400; }
.session-tooltip-value { min-width: 0; color: #fff; font-weight: 700; overflow-wrap: anywhere; }
.session-tooltip-value.tone-hard,
.session-tooltip-value.tone-unassigned { color: #ff9b91; }
.session-tooltip-value.tone-warning { color: #ffe082; }
.session-tooltip-value.tone-caution { color: #ffd27a; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(10, 29, 61, 0.42);
  backdrop-filter: blur(3px);
}
.assignment-dialog {
  width: min(31rem, calc(100vw - 2rem));
  display: grid;
  gap: 1rem;
  padding: 1.2rem;
  border: 1px solid #cbd7e4;
  border-radius: 1rem;
  color: var(--ink);
  background: white;
  box-shadow: 0 24px 64px rgba(6, 22, 47, 0.28);
}
.assignment-dialog.compact-dialog { width: min(25rem, calc(100vw - 2rem)); }
.assignment-dialog.special-duty-dialog { width: min(36rem, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); overflow: auto; }
.assignment-dialog.legality-override-dialog { width: min(44rem, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); overflow: auto; }
.assignment-dialog.auto-assign-dialog { width: min(58rem, calc(100vw - 2rem)); }
.assignment-dialog.publication-dialog { width: min(64rem, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); overflow: auto; }
.assignment-dialog.crew-panel-dialog { width: min(58rem, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); }
.assignment-dialog.session-details-dialog { width: min(48rem, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); overflow: auto; }
.assignment-dialog.roster-date-dialog { width: min(28rem, calc(100vw - 2rem)); }
.assignment-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.assignment-dialog-head h2 { margin: 0.18rem 0 0; font-size: 1.15rem; }
.assignment-session-label { margin: 0.28rem 0 0; color: var(--muted); font-size: 0.72rem; font-weight: 750; }
.assignment-dialog-head .icon-button { flex: 0 0 auto; font-size: 1.2rem; }
.roster-calendar-head {
  display: grid;
  grid-template-columns: 2.2rem minmax(0, 1fr) 2.2rem;
  align-items: center;
  gap: 0.45rem;
}
.roster-calendar-head strong {
  color: var(--navy-900);
  font-size: 0.82rem;
  text-align: center;
}
.roster-calendar-head .icon-button {
  width: 2.2rem;
  height: 2.2rem;
  font-size: 0.9rem;
}
.roster-calendar-grid {
  display: grid;
  grid-template-columns: 2.55rem repeat(7, minmax(0, 1fr));
  gap: 0.22rem;
  align-items: center;
}
.roster-calendar-week-heading,
.roster-calendar-weekday,
.roster-calendar-week {
  color: #728096;
  font-size: 0.53rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-align: center;
}
.roster-calendar-week {
  color: var(--blue-600);
  letter-spacing: 0;
}
.roster-calendar-day {
  aspect-ratio: 1;
  min-width: 0;
  border: 1px solid transparent;
  border-radius: 0.42rem;
  color: var(--navy-900);
  background: transparent;
  font-size: 0.7rem;
  font-weight: 800;
  cursor: pointer;
}
.roster-calendar-day:hover { border-color: #b9d7f2; background: #eef6fd; }
.roster-calendar-day.outside-month { color: #9ba7b5; }
.roster-calendar-day.today { border-color: var(--blue-600); }
.roster-calendar-day.selected { border-color: var(--navy-900); color: white; background: var(--navy-900); }
.roster-calendar-day:focus-visible { outline: 2px solid rgba(8, 123, 232, 0.38); outline-offset: 1px; }
.assignment-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem; }
.assignment-fields label { display: grid; gap: 0.35rem; }
.assignment-fields label > span { color: var(--muted); font-size: 0.62rem; font-weight: 850; letter-spacing: 0.04em; }
.assignment-fields select,
.assignment-fields input,
.assignment-fields textarea {
  width: 100%;
  min-height: 2.75rem;
  padding: 0 0.7rem;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  color: var(--ink);
  background: #f8fbfe;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 700;
}
.assignment-fields textarea { min-height: 4.8rem; padding: 0.7rem; resize: vertical; }
.assignment-fields select:focus,
.assignment-fields input:focus,
.assignment-fields textarea:focus { outline: 2px solid rgba(8, 123, 232, 0.22); border-color: var(--blue-600); }
.assignment-fields .assignment-field-wide { grid-column: 1 / -1; }
.assignment-fields .check-field { display: flex; align-items: center; gap: 0.55rem; }
.assignment-fields .check-field input { width: 1.05rem; min-height: 1.05rem; padding: 0; }
.assignment-fields .check-field span { color: var(--ink); }
.session-assignment-fields { grid-template-columns: minmax(0, 1fr); }
.assignment-instructor-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.7rem; align-items: end; }
.assignment-fields .assignment-lock { min-height: 2.75rem; margin: 0; }
.assignment-error { margin: -0.25rem 0 0; color: var(--danger); font-size: 0.72rem; font-weight: 700; }
.legality-override-summary { margin: 0; padding: 0.7rem 0.8rem; border-radius: 0.62rem; color: #7a3e00; background: #fff2de; font-size: 0.68rem; font-weight: 750; line-height: 1.45; }
.legality-override-conflicts { display: grid; gap: 0.38rem; max-height: 10rem; overflow: auto; padding: 0.15rem; }
.legality-override-conflict { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 0.5rem; align-items: baseline; padding: 0.48rem 0.58rem; border: 1px solid #dbe3ec; border-radius: 0.55rem; background: #f7f9fc; font-size: 0.62rem; }
.legality-override-conflict strong { color: #a13b32; font-size: 0.55rem; letter-spacing: 0.04em; }
.legality-override-conflict b { font-size: 0.58rem; }
.legality-override-conflict span { color: #4b5870; line-height: 1.35; }
.legality-override-dialog.remove-mode .legality-override-summary { color: #8f2f28; background: #fde9e7; }
.legality-override-dialog.remove-mode #legality-override-save { background: var(--danger); }
.assignment-actions { display: flex; justify-content: flex-end; gap: 0.55rem; }
.assignment-actions .primary-button,
.assignment-actions .secondary-button { min-height: 2.55rem; margin: 0; padding: 0.65rem 1rem; border-radius: 0.65rem; }
.assignment-actions .secondary-button:disabled,
.assignment-dialog-head .icon-button:disabled { opacity: 0.55; cursor: wait; }
.session-details-content { display: grid; gap: 0.7rem; }
.session-detail-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.55rem; }
.session-detail-field { min-width: 0; display: grid; gap: 0.22rem; padding: 0.65rem; border: 1px solid #d7e1eb; border-radius: 0.65rem; background: #f8fbfe; }
.session-detail-field span,
.session-detail-note > span { color: var(--blue-600); font-size: 0.52rem; font-weight: 900; letter-spacing: 0.06em; }
.session-detail-field strong { overflow: hidden; font-size: 0.7rem; text-overflow: ellipsis; white-space: nowrap; }
.session-detail-note { padding: 0.72rem; border: 1px solid #d7e1eb; border-radius: 0.65rem; background: #f8fbfe; }
.session-detail-note p { margin: 0.34rem 0 0; font-size: 0.72rem; font-weight: 700; line-height: 1.45; white-space: pre-wrap; }
.session-detail-note.customer { border-color: #f0b5b5; background: #fff6f6; }
.session-detail-note.customer > span { color: #c62828; }
.session-detail-history { overflow: hidden; border: 1px solid #d7e1eb; border-radius: 0.65rem; }
.session-detail-history-head { display: flex; align-items: center; justify-content: space-between; padding: 0.6rem 0.72rem; background: #eef4fa; }
.session-detail-history-head strong { color: var(--blue-600); font-size: 0.58rem; letter-spacing: 0.06em; }
.session-detail-history-head span { min-width: 1.5rem; padding: 0.18rem 0.35rem; border-radius: 999px; color: #166534; background: #e8f5ec; font-size: 0.55rem; font-weight: 900; text-align: center; }
.session-detail-history-rows { max-height: 14rem; overflow: auto; }
.session-detail-history-row { display: grid; grid-template-columns: 8.8rem minmax(0, 1fr) auto; gap: 0.65rem; align-items: center; padding: 0.55rem 0.7rem; border-top: 1px solid #e6edf4; }
.session-detail-history-row time,
.session-detail-history-row span { color: var(--muted); font-size: 0.56rem; font-weight: 700; }
.session-detail-history-row strong { font-size: 0.66rem; }
.session-detail-history-empty { margin: 0; padding: 1rem; color: var(--muted); font-size: 0.68rem; text-align: center; }
.auto-assign-loading,
.auto-assign-empty {
  margin: 0;
  padding: 1.1rem;
  border: 1px dashed #cbd7e4;
  border-radius: 0.7rem;
  color: var(--muted);
  background: #f8fbfe;
  font-size: 0.72rem;
  font-weight: 750;
  text-align: center;
}
.auto-assign-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.55rem; }
.auto-assign-metric { display: grid; gap: 0.2rem; padding: 0.65rem 0.72rem; border: 1px solid #d7e1eb; border-radius: 0.7rem; background: #f8fbfe; }
.auto-assign-metric span { color: var(--muted); font-size: 0.52rem; font-weight: 850; letter-spacing: 0.06em; }
.auto-assign-metric strong { font-size: 1.05rem; }
.auto-assign-metric.changed { border-color: #9dd8b6; background: #effaf3; }
.auto-assign-metric.warning { border-color: #efc6a0; background: #fff8ee; }
.auto-assign-results { max-height: min(52vh, 28rem); overflow: auto; border: 1px solid #d7e1eb; border-radius: 0.7rem; }
.auto-assign-row { min-height: 3.25rem; display: grid; grid-template-columns: minmax(9rem, 1fr) minmax(10rem, 1fr) auto auto; align-items: center; gap: 0.8rem; padding: 0.48rem 0.7rem; border-bottom: 1px solid #e6edf4; }
.auto-assign-row:last-child { border-bottom: 0; }
.auto-assign-row:nth-child(even) { background: #f7fafd; }
.auto-assign-row.unfilled { background: #fff7ee; }
.auto-assign-row-identity { min-width: 0; display: grid; gap: 0.14rem; }
.auto-assign-row-identity strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.72rem; }
.auto-assign-row-identity span { color: var(--muted); font-size: 0.56rem; font-weight: 750; }
.auto-assign-row-assignment { display: flex; align-items: center; gap: 0.48rem; font-size: 0.7rem; }
.auto-assign-row-assignment span { color: var(--muted); }
.auto-assign-row-assignment b { color: var(--blue-600); }
.auto-assign-row-assignment strong { color: var(--header); }
.auto-assign-score { padding: 0.24rem 0.42rem; border-radius: 999px; color: #166534; background: #e8f5ec; font-size: 0.5rem; font-weight: 850; white-space: nowrap; }
.auto-assign-row.unfilled .auto-assign-score { color: #9a4f00; background: #ffead3; }
.auto-assign-row-actions { display: flex; justify-content: flex-end; gap: 0.35rem; }
.auto-assign-row-actions button { min-height: 1.8rem; padding: 0.3rem 0.58rem; border: 1px solid #cbd7e4; border-radius: 0.48rem; color: var(--ink); background: white; font: inherit; font-size: 0.58rem; font-weight: 850; cursor: pointer; }
.auto-assign-row-actions button[data-auto-assign-action="apply"] { border-color: #087be8; color: white; background: #087be8; }
.auto-assign-row-actions button:disabled { opacity: 0.5; cursor: not-allowed; }
.auto-assign-safety { margin-right: auto; color: #16754c; font-size: 0.56rem; font-weight: 900; letter-spacing: 0.05em; }
.publication-details { display: grid; gap: 0.65rem; }
.publication-details > div { padding: 0.72rem; border: 1px solid #d7e1eb; border-radius: 0.7rem; background: #f8fbfe; }
.publication-details span { color: var(--muted); font-size: 0.52rem; font-weight: 850; letter-spacing: 0.06em; }
.publication-details p { margin: 0.28rem 0 0; font-size: 0.68rem; font-weight: 750; line-height: 1.5; }
.publication-notification-review { overflow: hidden; border: 1px solid #d7e1eb; border-radius: 0.7rem; background: white; }
.publication-notification-review-head { display: flex; align-items: center; justify-content: space-between; gap: 0.7rem; padding: 0.55rem 0.65rem; background: #f8fbfe; }
.publication-notification-review-head > strong { color: var(--muted); font-size: 0.56rem; letter-spacing: 0.06em; }
.publication-notification-review-head > div { display: flex; gap: 0.4rem; }
.publication-notification-review .compact-button { min-height: 1.9rem; margin: 0; padding: 0.32rem 0.58rem; border-radius: 0.48rem; font-size: 0.58rem; }
.publication-notification-table { max-height: min(42vh, 24rem); overflow: auto; }
.publication-notification-grid { min-width: 54rem; display: grid; grid-template-columns: 5.5rem 6rem minmax(12rem, 1fr) minmax(12rem, 1fr) 8.5rem; align-items: stretch; }
.publication-notification-grid > * { min-width: 0; padding: 0.48rem 0.55rem; border-right: 1px solid #dce5ee; }
.publication-notification-grid > *:last-child { border-right: 0; }
.publication-notification-grid-head { position: sticky; top: 0; z-index: 1; color: var(--muted); background: #eef4fa; font-size: 0.52rem; font-weight: 900; letter-spacing: 0.05em; text-transform: uppercase; }
.publication-notification-row { border-top: 1px solid #dce5ee; font-size: 0.62rem; }
.publication-notification-row:nth-child(even) { background: #f8fbfe; }
.publication-notification-row > span { font-size: inherit; letter-spacing: normal; }
.publication-notification-crew { color: var(--ink); }
.publication-notification-crew.missing-phone { color: var(--danger); }
.publication-notification-date { color: var(--ink); font-weight: 800; }
.publication-notification-duties { color: var(--ink); font-weight: 700; line-height: 1.45; white-space: pre-line; }
.publication-notification-ocb { display: flex; align-items: center; gap: 0.42rem; color: var(--muted); font-size: 0.5rem; font-weight: 850; cursor: pointer; }
.publication-notification-ocb input { flex: 0 0 auto; width: 1rem; height: 1rem; margin: 0; accent-color: #087be8; }
.publication-notification-ocb > span { color: inherit; font-size: inherit; letter-spacing: normal; }
.publication-notification-ocb:has(input:disabled) { opacity: 0.55; cursor: default; }
.publication-state { padding: 0.58rem 0.72rem; border-radius: 0.6rem; color: #166534; background: #e8f5ec; }
.publication-state.blocked { color: #9a4f00; background: #ffead3; }
.publication-safety { margin-right: auto; color: #16754c; font-size: 0.56rem; font-weight: 900; letter-spacing: 0.05em; }
.crew-panel-body { min-height: 8rem; overflow: auto; }
.crew-panel-error,
.crew-panel-empty { margin: 0; padding: 1rem; border: 1px dashed #cbd7e4; border-radius: 0.7rem; background: #f8fbfe; text-align: center; }
.crew-profile-card { display: grid; gap: 0.18rem; padding: 0.85rem; border-radius: 0.75rem; color: white; background: var(--header); }
.crew-profile-card strong { font-size: 1.05rem; }
.crew-profile-card span { color: #dce8f6; font-size: 0.66rem; font-weight: 750; }
.crew-profile-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.55rem; margin-top: 0.7rem; }
.crew-profile-metric { display: grid; gap: 0.2rem; padding: 0.62rem 0.7rem; border: 1px solid #d7e1eb; border-radius: 0.65rem; background: #f8fbfe; }
.crew-profile-metric span { color: var(--muted); font-size: 0.52rem; font-weight: 850; letter-spacing: 0.05em; }
.crew-profile-metric strong { font-size: 0.88rem; }
.published-roster-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 0.7rem; }
.published-roster-meta span { color: var(--muted); font-size: 0.62rem; font-weight: 750; }
.published-roster-table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 0.68rem; }
.published-roster-table th,
.published-roster-table td { padding: 0.28rem 0.5rem; border: 1px solid #dce5ee; line-height: 1; text-align: left; vertical-align: top; }
.published-roster-table th { position: sticky; top: 0; z-index: 1; color: var(--muted); background: #eef4fa; font-size: 0.52rem; letter-spacing: 0.06em; }
.published-roster-table th:nth-child(1) { width: 21%; }
.published-roster-table th:nth-child(2),
.published-roster-table th:nth-child(4) { width: 12%; }
.published-roster-table th:nth-child(3) { width: 40%; }
.published-roster-table th:nth-child(5) { width: 15%; }
.published-roster-table .published-roster-date,
.published-roster-table .published-roster-clock,
.published-roster-table .published-roster-role { white-space: nowrap; }
.published-roster-table .published-roster-day-duties { padding-inline: 0; }
.published-roster-duty-line { display: grid; grid-template-columns: 12fr 40fr 12fr 15fr; gap: 0; margin: 0; line-height: 1; }
.published-roster-duty-line > span { min-width: 0; padding: 0 0.5rem; }
.published-roster-duty-label { overflow-wrap: break-word; }
.published-roster-table tbody tr { break-inside: avoid; }
.published-roster-table .alternate-roster-day td { background: #f8fbfe; }
.annual-leave-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 0; }
.annual-leave-assign { display: flex; align-items: end; gap: 0.65rem; margin: 0.8rem 0; padding: 0.7rem; border: 1px solid #d7e1eb; border-radius: 0.7rem; background: #f8fbfe; }
.annual-leave-warning { margin: 0.7rem 0 0; padding: 0.55rem 0.7rem; border-radius: 0.6rem; color: #9a4f00; background: #ffead3; font-size: 0.62rem; font-weight: 750; text-transform: uppercase; }
.annual-leave-assign label { flex: 1; display: grid; gap: 0.3rem; }
.annual-leave-assign label > span { color: var(--muted); font-size: 0.52rem; font-weight: 850; }
.annual-leave-assign input { min-height: 2.45rem; padding: 0 0.65rem; border: 1px solid var(--line); border-radius: 0.6rem; background: white; font: inherit; }
.annual-leave-assign .primary-button { min-height: 2.45rem; margin: 0; }
.annual-leave-requests { display: grid; gap: 0.4rem; }
.annual-leave-requests h3 { margin: 0.2rem 0; font-size: 0.7rem; }
.annual-leave-request { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 0.65rem; padding: 0.55rem 0.65rem; border: 1px solid #dce5ee; border-radius: 0.65rem; }
.annual-leave-request-identity { min-width: 0; display: grid; gap: 0.12rem; }
.annual-leave-request-identity strong { font-size: 0.68rem; }
.annual-leave-request-identity span { overflow: hidden; color: var(--muted); font-size: 0.54rem; text-overflow: ellipsis; white-space: nowrap; }
.annual-leave-status { padding: 0.22rem 0.42rem; border-radius: 999px; color: #475467; background: #e9edf1; font-size: 0.5rem; font-weight: 900; }
.status-approved .annual-leave-status { color: #166534; background: #e8f5ec; }
.status-pending .annual-leave-status { color: #9a4f00; background: #ffead3; }
.status-rejected .annual-leave-status { color: #9f2f29; background: #fde9e7; }
.annual-leave-request-actions { display: flex; gap: 0.35rem; }
.annual-leave-request-actions .primary-button,
.annual-leave-request-actions .secondary-button { min-height: 2rem; margin: 0; padding: 0.35rem 0.55rem; }
.crew-notification-list { display: grid; gap: 0.4rem; }
.crew-notification-row { display: grid; grid-template-columns: 7rem 1fr 1fr; gap: 0.7rem; padding: 0.65rem; border: 1px solid #dce5ee; border-radius: 0.65rem; font-size: 0.65rem; }
.crew-notification-row span { color: var(--muted); font-weight: 750; }

@media print {
  body.print-roster > :not(#crew-panel-modal) { display: none !important; }
  body.print-roster #crew-panel-modal { position: static; display: block; padding: 0; background: white; }
  body.print-roster .crew-panel-dialog { width: 100%; max-height: none; padding: 0; border: 0; box-shadow: none; }
  body.print-roster #crew-panel-actions,
  body.print-roster #crew-panel-close { display: none !important; }
  body.print-roster .crew-panel-body { overflow: visible; }
  body.print-roster .published-roster-table th { position: static; }
}

@media (max-width: 640px) {
  .topbar { height: 3.2rem; gap: 0.45rem; padding-inline: 0.55rem; }
  .wordmark img { width: 5.65rem; height: 1.9rem; }
  .topbar-left { gap: 0.48rem; }
  .roster-header-context { gap: 0.4rem; }
  .roster-header-context > a,
  .header-divider { display: none; }
  .roster-header-context > strong { max-width: 5.8rem; font-size: 0.82rem; }
  .roster-header-context .live-chip { display: none; }
  .header-command-button { min-height: 2.1rem; padding-inline: 0.58rem; }
  .profile-avatar { width: 2.1rem; height: 2.1rem; }
  .header-clock { display: none; }
  .content { padding-top: 1rem; }
  .roster-placeholder { grid-template-columns: auto 1fr; }
  .status-chip { grid-column: 1 / -1; justify-self: start; }
  .week-radar { grid-template-columns: repeat(7, 11.5rem); }
  .roster-content { height: calc(100vh - 3.2rem); }
  .timeline-card-head { align-items: flex-start; flex-direction: column; }
  .timeline-tools { justify-content: flex-start; }
  .assignment-fields { grid-template-columns: 1fr; }
  .session-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auto-assign-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auto-assign-row { grid-template-columns: 1fr auto; }
  .auto-assign-row-assignment { grid-column: 1 / -1; }
  .auto-assign-row-actions { grid-column: 1 / -1; }
  .auto-assign-safety { width: 100%; margin: 0 0 0.25rem; text-align: right; }
  .crew-profile-metrics,
  .annual-leave-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .annual-leave-request { grid-template-columns: minmax(0, 1fr) auto; }
  .annual-leave-request-actions { grid-column: 1 / -1; justify-content: flex-end; }
}
