/* ==========================================================================
   Phase 24 Schedule Side Panel & Traveler Pool Styles (schedule-panel.css)
   Uses theme tokens from index.css (supports dark and light themes).
   ========================================================================== */

.sched-panel {
  width: 400px;
  flex: 0 0 400px;
  background: var(--bg-secondary, #131c2e);
  border-left: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  color: var(--text-primary, #f8fafc);
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  font-family: var(--font-sans, 'Inter', -apple-system, BlinkMacSystemFont, sans-serif);
  font-size: 13px;
  line-height: 1.4;
  box-sizing: border-box;
}

.sched-panel[hidden] {
  display: none !important;
}

.sched-panel *,
.sched-panel *::before,
.sched-panel *::after {
  box-sizing: border-box;
}

.sched-panel button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.sched-panel input,
.sched-panel select,
.sched-panel textarea {
  font: inherit;
  color: var(--text-primary, #f8fafc);
  background: var(--bg-primary, #0a0f18);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.14));
  border-radius: 7px;
  padding: 6px 8px;
  min-width: 0;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.sched-panel input:focus,
.sched-panel select:focus,
.sched-panel textarea:focus {
  outline: none;
  border-color: var(--accent-blue, #3b82f6);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.18);
}

.sched-panel input:disabled,
.sched-panel select:disabled,
.sched-panel textarea:disabled {
  opacity: 0.68;
  cursor: default;
}

.sched-panel input:not([type="checkbox"]),
.sched-panel select,
.sched-panel textarea {
  width: 100%;
}

.sched-panel input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent-blue, #3b82f6);
  padding: 0;
  cursor: pointer;
}

/* Segmented controls & buttons inside panel */
.sched-panel .sp-seg {
  display: inline-flex;
  background: var(--bg-primary, #0a0f18);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}

.sched-panel .sp-seg button {
  background: none;
  border: 0;
  padding: 5px 10px;
  border-radius: 6px;
  color: var(--text-secondary, #94a3b8);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.sched-panel .sp-seg button:hover:not(:disabled):not(.on) {
  color: var(--text-primary, #f8fafc);
  background: var(--bg-card-hover, rgba(255, 255, 255, 0.05));
}

.sched-panel .sp-seg button.on {
  background: var(--accent-blue-solid, #2563eb);
  color: #ffffff;
  font-weight: 600;
}

.sched-panel .sp-seg button:disabled {
  opacity: 0.45;
  cursor: default;
}

.sched-panel .sp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.14));
  background: var(--bg-card, rgba(255, 255, 255, 0.04));
  color: var(--text-primary, #f8fafc);
  border-radius: 8px;
  padding: 6px 11px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.sched-panel .sp-btn:hover:not(:disabled) {
  background: var(--bg-card-hover, rgba(255, 255, 255, 0.08));
}

.sched-panel .sp-btn.primary {
  background: var(--accent-blue-solid, #2563eb);
  border-color: var(--accent-blue-solid, #2563eb);
  color: #ffffff;
}

.sched-panel .sp-btn.primary:hover:not(:disabled) {
  filter: brightness(1.08);
}

.sched-panel .sp-btn.green {
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(16, 185, 129, 0.4);
  color: var(--accent-green, #10b981);
}

.sched-panel .sp-btn.green.on {
  background: var(--accent-green-solid, #047857);
  border-color: var(--accent-green-solid, #047857);
  color: #ffffff;
}

.sched-panel .sp-btn.danger {
  color: var(--accent-red, #ef4444);
  border-color: rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.1);
}

.sched-panel .sp-btn.danger:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.18);
}

.sched-panel .sp-btn.ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-secondary, #94a3b8);
}

.sched-panel .sp-btn.ghost:hover:not(:disabled) {
  background: var(--bg-card, rgba(255, 255, 255, 0.05));
  color: var(--text-primary, #f8fafc);
}

.sched-panel .sp-btn.sm {
  padding: 3px 8px;
  font-size: 11px;
}

.sched-panel .sp-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.sched-panel .sp-btn[hidden] {
  display: none !important;
}

.sched-panel .sp-count {
  background: rgba(255, 255, 255, 0.14);
  color: var(--text-primary, #f8fafc);
  border-radius: 999px;
  padding: 0 6px;
  font-size: 11px;
  font-weight: 700;
}

.light-theme .sched-panel .sp-count,
[data-theme="light"] .sched-panel .sp-count {
  background: rgba(15, 23, 42, 0.1);
}

.sched-panel .sp-count.part {
  background: rgba(245, 158, 11, 0.18);
  color: var(--accent-yellow, #f59e0b);
}

/* Top tabs bar */
.sched-panel .ptabs {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  background: var(--bg-secondary, #131c2e);
}

.sched-panel .ptabs .sp-seg {
  flex: 1;
}

.sched-panel .ptabs .sp-seg button {
  flex: 1;
  padding: 6px 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.sched-panel .ptabs .sp-seg button.on.pool {
  background: var(--accent-green-solid, #047857);
  color: #ffffff;
}

.sched-panel .ptabs .sp-seg button.on .sp-count {
  background: rgba(0, 0, 0, 0.22);
  color: #ffffff;
}

.sched-panel .xbtn {
  background: none;
  border: 0;
  color: var(--text-secondary, #94a3b8);
  font-size: 16px;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 6px;
}

.sched-panel .xbtn:hover {
  background: var(--bg-card-hover, rgba(255, 255, 255, 0.08));
  color: var(--text-primary, #f8fafc);
}

/* Body & Footer */
.sched-panel .pbody {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sched-panel .pbody > * {
  flex-shrink: 0;
}

.sched-panel .pfoot {
  border-top: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bg-secondary, #131c2e);
}

.sched-panel .pfoot .row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.sched-panel .pfoot .row .sp {
  flex: 1;
}

/* Panel Header & Kicker */
.sched-panel .phead {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.sched-panel .phead > div:first-child {
  flex: 1;
  min-width: 0;
}

.sched-panel .phead .kicker {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent-blue, #3b82f6);
}

.sched-panel .phead .kicker.new {
  color: var(--accent-green, #10b981);
}

.sched-panel .phead h3 {
  margin: 2px 0 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary, #f8fafc);
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 5-kind selector */
.sched-panel .kinds {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}

.sched-panel .kinds button {
  padding: 6px 2px;
  font-size: 11.5px;
  text-align: center;
}

/* Form fields & boxes */
.sched-panel .f {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sched-panel .f label,
.sched-panel .lbl {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary, #94a3b8);
}

.sched-panel .f2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.sched-panel .f3 {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 8px;
}

.sched-panel .box {
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  background: var(--bg-primary, #0a0f18);
  border-radius: 10px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sched-panel .box-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sched-panel .box-h .t {
  font-weight: 700;
  font-size: 12px;
  color: var(--text-primary, #f8fafc);
}

.sched-panel .hint {
  color: var(--text-muted, #64748b);
  font-size: 11px;
}

.sched-panel .nudges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

/* Per-person cards */
.sched-panel .person {
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  border-radius: 9px;
  padding: 8px;
  background: var(--bg-secondary, #131c2e);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sched-panel .person.focus {
  border-color: var(--accent-blue, #3b82f6);
  box-shadow: 0 0 0 1px var(--accent-blue, #3b82f6) inset;
}

.sched-panel .person .top {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.sched-panel .person .top .who {
  font-weight: 600;
  flex: 1;
  min-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sched-panel .person .dates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.sched-panel .person .meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: var(--text-secondary, #94a3b8);
  flex-wrap: wrap;
}

.sched-panel .person .meta label {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  cursor: pointer;
}

/* Tags & Badges */
.sched-panel .sp-tag {
  display: inline-flex;
  align-items: center;
  font-size: 10.5px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 5px;
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.12));
  color: var(--text-secondary, #94a3b8);
  background: var(--bg-card, rgba(255, 255, 255, 0.04));
  white-space: nowrap;
}

.sched-panel .sp-tag.me {
  background: rgba(59, 130, 246, 0.2);
  border-color: var(--accent-blue, #3b82f6);
  color: var(--accent-blue, #3b82f6);
}

.sched-panel .sp-tag.full {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.45);
  color: var(--accent-green, #10b981);
}

.sched-panel .sp-tag.part {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.45);
  color: var(--accent-yellow, #f59e0b);
}

.sched-panel .sp-tag.standby {
  background: var(--standby-bg, rgba(245, 158, 11, 0.18));
  border-color: var(--standby-border, rgba(245, 158, 11, 0.55));
  color: var(--standby-text, #fcd34d);
  font-weight: 700;
}

.light-theme .sched-panel .sp-tag.standby,
[data-theme="light"] .sched-panel .sp-tag.standby {
  background: rgba(217, 119, 6, 0.14);
  border-color: rgba(180, 83, 9, 0.45);
  color: #92400e;
}

.sched-panel .sp-tag.ontrip {
  background: rgba(6, 182, 212, 0.15);
  border-color: rgba(6, 182, 212, 0.45);
  color: var(--accent-cyan, #06b6d4);
}

.sched-panel .sp-tag.holiday {
  background: var(--color-timeoff, rgba(99, 102, 241, 0.15));
  border-color: var(--accent-indigo, #6366f1);
  color: var(--text-primary, #f8fafc);
}

/* Banners & Alerts */
.sched-panel .warn {
  border: 1px solid rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.12);
  color: var(--accent-red, #ef4444);
  border-radius: 8px;
  padding: 7px 9px;
  font-size: 11.5px;
}

.sched-panel .note {
  border: 1px solid rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.12);
  color: var(--accent-yellow, #f59e0b);
  border-radius: 8px;
  padding: 7px 9px;
  font-size: 11.5px;
}

.sched-panel .holiday-banner {
  border: 1px solid var(--accent-indigo, #6366f1);
  background: var(--color-timeoff, rgba(99, 102, 241, 0.12));
  color: var(--text-primary, #f8fafc);
  border-radius: 8px;
  padding: 7px 9px;
  font-size: 11.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sched-panel .overlap-banner {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.sched-panel .past-date-banner {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 4px 8px;
  font-size: 11px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sched-panel .past-date-banner .past-date-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.sched-panel .sp-site-details {
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  background: var(--bg-primary, #0a0f18);
  border-radius: 9px;
  overflow: hidden;
}

.sched-panel .sp-site-details-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  font-size: 11.5px;
}

.sched-panel .sp-site-details-summary::-webkit-details-marker {
  display: none;
}

.sched-panel .sp-sd-title {
  font-weight: 700;
  color: var(--text-primary, #f8fafc);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.sched-panel .sp-sd-title::before {
  content: '▸';
  display: inline-block;
  font-size: 11px;
  color: var(--text-secondary, #94a3b8);
  transition: transform 0.15s ease;
}

.sched-panel .sp-site-details[open] .sp-sd-title::before {
  transform: rotate(90deg);
}

.sched-panel .sp-sd-preview {
  color: var(--text-muted, #64748b);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.sched-panel .sp-site-details-body {
  padding: 8px 10px 10px;
  border-top: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sched-panel .same-jo-banner {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sched-panel .same-jo-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.sched-panel .field-error {
  color: var(--accent-red, #ef4444);
  font-size: 11px;
  font-weight: 600;
  margin-top: 2px;
}

/* User 2026-11-11: a missing site address is a reminder, never a save blocker. */
.sched-panel .sp-site-reminder {
  color: var(--accent-amber, #d97706);
  font-size: 11px;
  font-weight: 600;
  margin-top: 2px;
}

.sched-panel .travel-legs {
  font-size: 11px;
  color: var(--accent-cyan, #06b6d4);
}

/* JO Live Lookup Suggestions */
.sched-panel .jo-sug {
  border: 1px solid var(--border-color-focus, rgba(59, 130, 246, 0.5));
  background: var(--bg-card, #1a263d);
  border-radius: 8px;
  overflow: hidden;
  margin-top: -4px;
}

.sched-panel .jo-sug[hidden] {
  display: none !important;
}

.sched-panel .jo-sug-h {
  font-size: 10.5px;
  color: var(--text-muted, #64748b);
  padding: 5px 9px;
  border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
}

.sched-panel .jo-opt {
  display: grid;
  grid-template-columns: 76px 1fr auto;
  gap: 8px;
  align-items: center;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  border-top: 1px solid var(--border-color, rgba(255, 255, 255, 0.06));
  padding: 8px 9px;
  color: var(--text-primary, #f8fafc);
  font-size: 12px;
  cursor: pointer;
}

.sched-panel .jo-opt:first-of-type {
  border-top: 0;
}

.sched-panel .jo-opt span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sched-panel .jo-opt:hover,
.sched-panel .jo-opt.hi {
  background: rgba(59, 130, 246, 0.16);
}

.sched-panel .jo-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sched-panel .info {
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.12));
  background: var(--bg-card, rgba(255, 255, 255, 0.03));
  color: var(--text-secondary, #94a3b8);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 11.5px;
}

.sched-panel .pd {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  margin-bottom: 3px;
}

.sched-panel .pd b {
  color: var(--accent-green, #10b981);
}

.sched-panel .addrow {
  display: flex;
  gap: 6px;
}

.sched-panel .addrow select {
  flex: 1;
}

.sched-panel .empty-panel {
  text-align: center;
  color: var(--text-secondary, #94a3b8);
  padding: 30px 10px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

/* Traveler Pool Tab */
.sched-panel .pool-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary, #94a3b8);
  flex-wrap: wrap;
}

.sched-panel .pgroup {
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-primary, #0a0f18);
}

.sched-panel .pgroup-h {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: var(--bg-card, rgba(255, 255, 255, 0.04));
  border-left: 3px solid var(--c, var(--accent-green, #10b981));
}

.sched-panel .pgroup-h .tog {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 0;
  padding: 2px 0;
  font-weight: 700;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary, #94a3b8);
  text-align: left;
  min-width: 0;
}

.sched-panel .pgroup-h .tog span.l {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sched-panel .prow {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border-top: 1px solid var(--border-color, rgba(255, 255, 255, 0.06));
}

.sched-panel .prow .who {
  flex: 1;
  min-width: 0;
}

.sched-panel .prow .who .n {
  font-weight: 600;
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  color: var(--text-primary, #f8fafc);
}

.sched-panel .prow .who .r {
  color: var(--text-muted, #64748b);
  font-size: 11px;
}

.sched-panel .prow.sel {
  background: rgba(16, 185, 129, 0.08);
}

.sched-panel .prow.partial .who .n {
  font-weight: 500;
  color: var(--text-secondary, #94a3b8);
}

.sched-panel .seg-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 5px;
}

.sched-panel .seg-pill {
  border: 1px solid rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.1);
  color: var(--accent-yellow, #f59e0b);
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 600;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.sched-panel .seg-pill:hover:not(:disabled) {
  background: rgba(245, 158, 11, 0.2);
}

.sched-panel .seg-pill.on {
  background: #f59e0b;
  border-color: #f59e0b;
  color: #0a0f18;
}

.sched-panel .psub {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border-top: 1px dashed rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.06);
  color: var(--accent-yellow, #f59e0b);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sched-panel .psub .hint {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
}

.sched-panel .picker-banner {
  border: 1px solid rgba(16, 185, 129, 0.45);
  background: rgba(16, 185, 129, 0.1);
  border-radius: 9px;
  padding: 8px 10px;
  font-size: 12px;
  color: var(--accent-green, #10b981);
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.sched-panel .pool-sel-foot {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sched-panel .pool-sel-foot b {
  color: var(--accent-green, #10b981);
}

.sched-panel .linkbtn {
  background: none;
  border: 0;
  padding: 0;
  white-space: nowrap;
  color: var(--accent-green, #10b981);
  font-size: 12px;
  font-weight: 600;
}

.sched-panel .linkbtn:hover {
  text-decoration: underline;
}

/* Responsive full-screen sheet on <= 1024px */
@media (max-width: 1100px) {
  .gantt-controls.sched-v24-toolbar {
    flex-wrap: wrap !important;
  }
}

@media (max-width: 1024px) {
  .content-container:has(.sched-panel:not([hidden])) {
    z-index: 120;
  }

  .sched-panel {
    position: fixed;
    inset: 0;
    width: auto;
    flex: none;
    z-index: 120;
    border-left: 0;
  }
}

@media (max-width: 640px) {
  .sched-panel .pbody {
    padding: 12px;
  }

  .sched-panel input,
  .sched-panel select,
  .sched-panel textarea {
    font-size: 16px;
  }

  .sched-panel .f3 {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Phase 24 Schedule Toast, Toolbar, Team Chips, Status Pills, & Board Extras
   ========================================================================== */

.sched-toast {
  position: fixed;
  bottom: 76px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-secondary, #131c2e);
  border: 1px solid var(--accent-blue, #3b82f6);
  color: var(--text-primary, #f8fafc);
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 500;
  z-index: 150;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  pointer-events: none;
  max-width: calc(100vw - 32px);
}

.sched-toast[hidden] {
  display: none !important;
}

/* Phase 24 Modern Toolbar (when Classic Scheduler is OFF) */
.gantt-controls.sched-v24-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap !important;
  padding: 6px 10px;
  background: var(--bg-secondary, #131c2e);
  border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
}

.gantt-controls.sched-v24-toolbar .sched-tb-seg {
  display: inline-flex;
  background: var(--bg-primary, #0a0f18);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
  align-items: center;
  flex-shrink: 0;
}

.gantt-controls.sched-v24-toolbar .sched-tb-seg button {
  background: none;
  border: 0;
  padding: 4px 6.5px;
  border-radius: 6px;
  color: var(--text-secondary, #94a3b8);
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
}

.gantt-controls.sched-v24-toolbar .sched-tb-seg button:hover:not(.active):not(.on) {
  color: var(--text-primary, #f8fafc);
  background: var(--bg-card-hover, rgba(255, 255, 255, 0.06));
}

.gantt-controls.sched-v24-toolbar .sched-tb-seg button.active,
.gantt-controls.sched-v24-toolbar .sched-tb-seg button.on {
  background: var(--accent-blue-solid, #2563eb);
  color: #ffffff;
  font-weight: 600;
}

.gantt-controls.sched-v24-toolbar .gantt-title-date {
  font-weight: 700;
  font-size: 12px;
  min-width: 108px;
  text-align: center;
  padding: 3px 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.gantt-controls.sched-v24-toolbar .gantt-toolbar-search {
  width: 128px;
  flex: 0 1 128px;
  min-width: 80px;
  background: var(--bg-primary, #0a0f18);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.14));
  color: var(--text-primary, #f8fafc);
  border-radius: 7px;
  padding: 5px 8px;
  font-size: 11.5px;
}

@media (max-width: 1360px) {
  .gantt-controls.sched-v24-toolbar .gantt-lbl-prefix {
    display: none;
  }
}

.gantt-controls.sched-v24-toolbar .gantt-dropdown-group {
  position: relative;
}

.gantt-controls.sched-v24-toolbar #gantt-btn-sort .gantt-lbl-prefix {
  display: none;
}

.gantt-controls.sched-v24-toolbar .gantt-toolbar-actions {
  flex-shrink: 0;
}

.gantt-controls.sched-v24-toolbar .gantt-toolbar-search:focus {
  outline: none;
  border-color: var(--accent-blue, #3b82f6);
}

.gantt-controls.sched-v24-toolbar .sched-teams-seg {
  overflow: visible;
  max-width: 100%;
  flex-shrink: 0;
  min-width: 0;
}

.gantt-controls.sched-v24-toolbar .sched-show-all-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.14));
  background: var(--bg-card, rgba(255, 255, 255, 0.04));
  color: var(--text-secondary, #94a3b8);
  border-radius: 7px;
  padding: 5px 8px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
  min-height: 28px;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.gantt-controls.sched-v24-toolbar .sched-show-all-btn:hover:not(.active):not(.on) {
  color: var(--text-primary, #f8fafc);
  border-color: rgba(59, 130, 246, 0.45);
  background: var(--bg-card-hover, rgba(255, 255, 255, 0.08));
}

.gantt-controls.sched-v24-toolbar .sched-show-all-btn.active,
.gantt-controls.sched-v24-toolbar .sched-show-all-btn.on {
  background: var(--accent-blue-solid, #2563eb);
  border-color: var(--accent-blue-solid, #2563eb);
  color: #ffffff;
}

@media (max-width: 1400px) {
  .gantt-controls.sched-v24-toolbar {
    gap: 4px;
    padding: 6px 8px;
  }
  .gantt-controls.sched-v24-toolbar .gantt-title-date {
    min-width: 96px;
    font-size: 11.5px;
    padding: 2px 2px;
  }
  .gantt-controls.sched-v24-toolbar .gantt-toolbar-search {
    width: 96px;
    flex: 0 1 96px;
    min-width: 68px;
    padding: 4px 6px;
    font-size: 11px;
  }
  .gantt-controls.sched-v24-toolbar .sched-tb-seg button {
    padding: 3.5px 5.5px;
    font-size: 11px;
  }
  .gantt-controls.sched-v24-toolbar .sched-show-all-btn,
  .gantt-controls.sched-v24-toolbar .sched-group-site-btn,
  .gantt-controls.sched-v24-toolbar .gantt-pool-btn,
  .gantt-controls.sched-v24-toolbar .gantt-add-entry-btn {
    padding: 4px 7px;
    font-size: 11px;
  }
}

.gantt-controls.sched-v24-toolbar .sched-tb-grow {
  flex: 1;
}

.gantt-controls.sched-v24-toolbar .gantt-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
}

.gantt-controls.sched-v24-toolbar .sched-group-site-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.14));
  background: var(--bg-card, rgba(255, 255, 255, 0.04));
  color: var(--text-primary, #f8fafc);
  border-radius: 7px;
  padding: 5px 8px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.gantt-controls.sched-v24-toolbar .sched-group-site-btn.active,
.gantt-controls.sched-v24-toolbar .sched-group-site-btn.on,
.gantt-controls.sched-v24-toolbar .sched-group-site-btn.has-group-active {
  border-color: var(--accent-cyan, #06b6d4);
  color: var(--accent-cyan, #06b6d4);
  background: rgba(6, 182, 212, 0.14);
}

/* Status Pills Bar */
.sched-pills-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 5px;
  padding: 5px 10px;
  background: var(--bg-secondary, rgba(15, 22, 35, 0.6));
  border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  overflow-x: visible;
  flex-shrink: 0;
}

.sched-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.12));
  background: var(--bg-primary, #0a0f18);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary, #94a3b8);
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.sched-pill:hover:not(.legend):not(.legend-only):not(.on):not(.active) {
  color: var(--text-primary, #f8fafc);
  border-color: rgba(59, 130, 246, 0.4);
}

.sched-pill.on,
.sched-pill.active {
  border-color: var(--accent-blue, #3b82f6);
  color: #ffffff;
  background: rgba(37, 99, 235, 0.24);
  box-shadow: 0 0 0 1px var(--accent-blue, #3b82f6);
}

.light-theme .sched-pill.on,
.light-theme .sched-pill.active,
[data-theme="light"] .sched-pill.on,
[data-theme="light"] .sched-pill.active {
  background: var(--accent-blue-solid, #1d4ed8);
  color: #ffffff;
}

.sched-pill .dot,
.sched-pill .sw {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.sched-pill .n,
.sched-pill .cnt {
  color: var(--text-muted, #64748b);
  font-size: 10.5px;
  font-weight: 600;
}

.sched-pill.on .n,
.sched-pill.on .cnt,
.sched-pill.active .n,
.sched-pill.active .cnt {
  color: #ffffff;
}

.sched-pill.legend,
.sched-pill.legend-only {
  border-style: dashed;
  cursor: help;
}

.sched-pill.legend-standby {
  border-color: rgba(245, 158, 11, 0.55);
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
}

.sched-pill.legend-home {
  border-color: rgba(148, 163, 184, 0.42);
  background: rgba(100, 116, 139, 0.12);
  color: #cbd5e1;
}

.light-theme .sched-pill.legend-standby,
[data-theme="light"] .sched-pill.legend-standby {
  color: #b45309;
  border-color: rgba(217, 119, 6, 0.55);
  background: rgba(245, 158, 11, 0.14);
}

.light-theme .sched-pill.legend-home,
[data-theme="light"] .sched-pill.legend-home {
  color: #475569;
  border-color: rgba(100, 116, 139, 0.45);
  background: rgba(100, 116, 139, 0.12);
}

.sched-help {
  margin-left: auto;
  color: var(--text-muted, #64748b);
  font-size: 10.5px;
  white-space: nowrap;
}

.sched-help .ctrl-on {
  display: none;
  color: #ffffff;
  background: var(--accent-blue-solid, #2563eb);
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 600;
}

body.ctrl-held .sched-help .ctrl-on {
  display: inline;
}

body.ctrl-held .sched-help .ctrl-off {
  display: none;
}

body.ctrl-held .gantt-grid-panel .gantt-cell {
  cursor: crosshair;
}

body.ctrl-held .gantt-grid-panel .gantt-cell:hover {
  background: rgba(37, 99, 235, 0.14);
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.45);
}

.gantt-grid-panel.can-edit-cells .gantt-cell:hover {
  background: rgba(59, 130, 246, 0.08);
}

/* Status Dot next to Technician Name */
.sdot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: 0 0 8px;
  background: #3b82f6;
  display: inline-block;
  margin-right: 5px;
}

.sdot.free {
  background: #10b981;
}

.sdot.shop {
  background: var(--bar-shop);
}

.sdot.standby,
.sched-pill[data-status="standby"] .dot {
  background-color: var(--bar-standby) !important;
  background-image: var(--standby-dot-bg) !important;
  border: 1px solid var(--color-standby-border);
}

.sdot.conflict {
  background: var(--red, #ef4444);
  animation: sdotPulse 1.6s infinite;
}

.gantt-standby-badge {
  background-color: var(--color-standby);
  background-image: var(--standby-stripe-bg);
  color: var(--color-standby-text);
  border: 1px dashed var(--color-standby-border);
  font-family: inherit;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.2;
  margin-left: 4px;
  padding: 0.08rem 0.32rem;
  border-radius: 4px;
  display: inline-block;
  flex-shrink: 0;
  white-space: nowrap;
  cursor: pointer;
}

.gantt-standby-badge:hover,
.gantt-standby-badge:focus-visible {
  border-style: solid;
  border-color: var(--color-standby-border);
}

.gantt-tech-row {
  position: relative;
}

.gantt-tech-row.v3-team-tinted {
  box-shadow: none !important;
  padding-left: 18px !important;
}

.gantt-team-bar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8.5px;
  font-weight: 800;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.48);
  line-height: 1;
  letter-spacing: 0;
  pointer-events: auto;
}

.gantt-dept-corner-tag {
  position: absolute;
  top: 3px;
  right: 4px;
  font-size: 7.5px;
  font-weight: 700;
  line-height: 1;
  padding: 1.5px 3.5px;
  border-radius: 3px;
  background: rgba(59, 130, 246, 0.14);
  color: var(--accent-blue, #60a5fa);
  border: 1px solid rgba(59, 130, 246, 0.28);
  letter-spacing: 0.02em;
  white-space: nowrap;
  pointer-events: auto;
}

.gantt-dept-corner-tag.dept-test {
  background: rgba(168, 85, 247, 0.14);
  color: #c084fc;
  border-color: rgba(168, 85, 247, 0.28);
}

.gantt-dept-corner-tag.dept-prod {
  background: rgba(245, 158, 11, 0.14);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.28);
}

.gantt-dept-corner-tag.dept-eng {
  background: rgba(6, 182, 212, 0.14);
  color: #22d3ee;
  border-color: rgba(6, 182, 212, 0.28);
}

.light-theme .gantt-dept-corner-tag.dept-test,
[data-theme="light"] .gantt-dept-corner-tag.dept-test {
  color: #6b21a8;
}

.light-theme .gantt-dept-corner-tag.dept-prod,
[data-theme="light"] .gantt-dept-corner-tag.dept-prod {
  color: #92400e;
}

.light-theme .gantt-dept-corner-tag.dept-eng,
[data-theme="light"] .gantt-dept-corner-tag.dept-eng {
  color: #0e7490;
}

.gantt-dept-corner-tag.dept-office {
  background: rgba(100, 116, 139, 0.16);
  color: var(--text-secondary, #94a3b8);
  border-color: rgba(100, 116, 139, 0.35);
}

.gantt-tech-row.non-traveler-row .gantt-tech-name-text {
  color: var(--text-secondary, #94a3b8);
  font-style: italic;
}

.gantt-tech-name-main {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  max-width: 100%;
}

.gantt-standby-popover {
  position: fixed;
  z-index: 3200;
  width: min(310px, calc(100vw - 16px));
  background: var(--bg-secondary, #131c2e);
  color: var(--text-primary, #f8fafc);
  border: 1px solid var(--color-standby-border);
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.48);
  padding: 10px 12px;
  font-size: 0.78rem;
  line-height: 1.4;
}

.gantt-standby-popover .gsp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.gantt-standby-popover .gsp-title {
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--color-standby-text);
}

.gantt-standby-popover .gsp-close {
  background: transparent;
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.14));
  color: var(--text-secondary, #94a3b8);
  border-radius: 6px;
  width: 24px;
  height: 24px;
  line-height: 1;
  font-size: 15px;
  cursor: pointer;
  flex-shrink: 0;
}

.gantt-standby-popover .gsp-sub {
  margin: 0 0 5px 0;
  color: var(--text-primary, #f8fafc);
}

.gantt-standby-popover .gsp-note {
  margin: 0;
  font-size: 0.72rem;
  color: var(--text-secondary, #94a3b8);
}

.gantt-standby-popover .gsp-foot {
  margin-top: 8px;
  display: flex;
  justify-content: flex-end;
}

.gantt-standby-popover .gsp-view-tech-btn {
  padding: 4px 9px;
  font-size: 0.72rem;
}

@keyframes sdotPulse {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6); }
  70% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Crew count & JO pill on Gantt bars */
.gantt-bar-jo {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 10px;
  background: rgba(0, 0, 0, 0.26);
  padding: 1px 5px;
  border-radius: 4px;
  flex-shrink: 0;
}

/* width:auto beats index.css `.gantt-event span { width:100% }`, which otherwise squeezes the bar's title to nothing. */
.gantt-event .gantt-bar-crew {
  width: auto;
  margin-left: auto;
  font-size: 10.5px;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.3);
  padding: 0 6px;
  border-radius: 999px;
  flex-shrink: 0;
}

.light-theme .gantt-bar-jo,
[data-theme="light"] .gantt-bar-jo,
.light-theme .gantt-event .gantt-bar-crew,
[data-theme="light"] .gantt-event .gantt-bar-crew {
  background: rgba(255, 255, 255, 0.78);
}

/* Short bars in Month / narrow views show the crew count cleanly and keep full title in tooltip + sr-only */
.gantt-event.is-short-bar {
  padding: 0 4px !important;
  justify-content: center;
  gap: 2px;
}

.gantt-event.is-short-bar > i,
.gantt-event.is-short-bar > svg {
  display: none !important;
}

.gantt-event.is-short-bar .gantt-bar-title {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.gantt-event.is-short-bar .gantt-bar-crew {
  margin-left: 0;
  padding: 0 5px;
  font-size: 10px;
}

.gantt-name-short {
  display: none;
}

.gantt-event.panel-active-bar {
  box-shadow: 0 0 0 2px #ffffff, 0 4px 12px rgba(0, 0, 0, 0.45) !important;
  z-index: 6 !important;
}

.light-theme .gantt-event.panel-active-bar,
[data-theme="light"] .gantt-event.panel-active-bar {
  box-shadow: 0 0 0 2px #0f172a, 0 4px 12px rgba(0, 0, 0, 0.25) !important;
}

.gantt-event.panel-dim-bar {
  filter: grayscale(0.55);
}

.gantt-group-band {
  line-height: 1;
}

.gantt-group-band-label {
  vertical-align: top;
  margin: -8px 0 0 8px;
}

/* Ctrl+drag range selection & chip */
.gantt-cell.cell-range-selected {
  background: rgba(37, 99, 235, 0.28) !important;
  box-shadow: inset 0 0 0 1px var(--accent-blue, #3b82f6);
}

.gantt-range-chip {
  grid-row: 1;
  align-self: start;
  justify-self: start;
  margin-top: 4px;
  margin-left: 4px;
  z-index: 8;
  background: var(--accent-blue-solid, #2563eb);
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 5px;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

@media (max-width: 1100px) {
  .gantt-controls.sched-v24-toolbar {
    flex-wrap: wrap !important;
  }
}

@media (max-width: 1024px) {
  .sched-help {
    display: none;
  }
}

@media (max-width: 640px) {
  .gantt-controls.sched-v24-toolbar {
    padding: 6px 8px;
    gap: 5px;
  }

  .gantt-controls.sched-v24-toolbar .gantt-title-date {
    min-width: 0;
    font-size: 12px;
  }

  .gantt-controls.sched-v24-toolbar .gantt-toolbar-search {
    width: 100%;
    flex: 1 1 100%;
    order: 5;
  }

  .gantt-controls.sched-v24-toolbar .sched-tb-grow {
    display: none;
  }

  .gantt-controls.sched-v24-toolbar .sched-teams-seg {
    order: 4;
    width: auto;
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
  }

  .gantt-controls.sched-v24-toolbar .sched-show-all-btn {
    order: 4;
    padding: 4px 7px;
    font-size: 11px;
  }

  .gantt-controls.sched-v24-toolbar .gantt-toolbar-actions {
    order: 3;
    width: 100%;
    justify-content: space-between;
  }

  .gantt-controls.sched-v24-toolbar .gantt-pool-btn-label,
  .gantt-controls.sched-v24-toolbar .gantt-add-btn-label {
    display: inline !important;
  }

  .sched-pills-bar {
    padding: 5px 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .gantt-techs-panel {
    width: 106px !important;
    min-width: 106px !important;
    max-width: 106px !important;
  }

  .gantt-techs-header {
    padding: 0 6px !important;
    font-size: 0.7rem !important;
  }

  .gantt-tech-row {
    padding: 2px 5px 2px 6px !important;
  }

  .gantt-tech-row.v3-team-tinted {
    padding-left: 15px !important;
  }

  .gantt-team-bar {
    width: 11px;
    font-size: 0.56rem;
  }

  .gantt-tech-name {
    font-size: 11px !important;
    flex-wrap: wrap;
    gap: 2px 3px;
  }

  .gantt-tech-name-main {
    width: 100%;
    gap: 3px;
  }

  .gantt-name-full {
    display: none !important;
  }

  .gantt-name-short {
    display: inline !important;
  }

  .gantt-dept-corner-tag {
    font-size: 0.48rem;
    padding: 0 2.5px;
  }

  .gantt-standby-badge {
    font-size: 0.58rem;
    padding: 0 3px;
    margin-left: 0;
  }

  .gantt-standby-lbl {
    display: none;
  }
}

@media (max-width: 1024px), (max-height: 560px) {
  .content-container:has(> .gantt-page) {
    padding: 0.35rem 0.45rem calc(4px + env(safe-area-inset-bottom, 0px)) 0.45rem;
  }
}

/* G3: Mobile top-left back control & horizontal overscroll containment */
.sched-panel .sp-back-btn {
  display: none;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.14));
  border-radius: 8px;
  color: var(--text-primary, #f8fafc);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  min-width: 44px;
  min-height: 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  flex-shrink: 0;
}

.sched-panel .sp-back-btn:hover {
  background: var(--bg-card-hover, rgba(255, 255, 255, 0.08));
}

.sched-pills-bar,
.sched-teams-seg,
#gantt-grid-scroll-panel {
  overscroll-behavior-x: contain;
}

@media (max-width: 1024px) {
  .sched-panel .sp-back-btn {
    display: inline-flex;
  }

  .sched-panel .xbtn {
    min-width: 44px;
    min-height: 44px;
    width: 44px;
    height: 44px;
  }

  .sched-panel {
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
}

@media (display-mode: standalone) {
  .sched-panel .sp-back-btn {
    display: inline-flex;
  }
}

body.is-standalone-pwa .sched-panel .sp-back-btn {
  display: inline-flex;
}




/* ============================================================================
   W19 — Site location, hotels and other locations (js/location/location-ui.js)
   ============================================================================ */
.sched-panel .sp-loc-row {
  display: flex;
  gap: 6px;
  align-items: center;
}

.sched-panel .sp-loc-row input {
  flex: 1 1 auto;
  min-width: 0;
}

.sched-panel .sp-loc-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
}

.sched-panel .sp-loc-tools a.sp-btn {
  text-decoration: none;
}

.sched-panel .sp-loc-note {
  flex: 1 1 160px;
  min-width: 0;
}

.sched-panel .sp-loc-note:empty {
  display: none;
}

.sched-panel .sp-loc-menu,
.sched-panel .sp-loc-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.sched-panel .sp-loc-menu {
  padding: 6px;
  border: 1px dashed var(--border-color, rgba(255, 255, 255, 0.14));
  border-radius: 8px;
}

.sched-panel .sp-loc-photos {
  flex-basis: 100%;
}

.sched-panel .sp-loc-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sched-panel .sp-loc-other {
  padding: 8px;
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  border-radius: 8px;
}

.sched-panel .sp-loc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.sched-panel .sp-chip {
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.14));
  background: transparent;
  color: var(--text-secondary, #94a3b8);
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.sched-panel .sp-chip.on {
  background: rgba(37, 99, 235, 0.16);
  border-color: var(--accent-blue, #3b82f6);
  color: var(--text-primary, #f8fafc);
}

/* "Check on map" dialog: appended to <body>, so it repeats the panel's button rules. */
.sp-map-dlg {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(2, 6, 23, 0.6);
  font-family: var(--font-sans, 'Inter', -apple-system, BlinkMacSystemFont, sans-serif);
  font-size: 13px;
}

.sp-map-box {
  width: min(640px, 100%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.12));
  background: var(--bg-secondary, #131c2e);
  color: var(--text-primary, #f8fafc);
  overflow: auto;
}

.sp-map-head,
.sp-map-foot,
.sp-map-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sp-map-head {
  justify-content: space-between;
}

.sp-map-foot {
  justify-content: flex-end;
}

.sp-map-search input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 36px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.14));
  background: var(--bg-primary, #0a0f18);
  color: var(--text-primary, #f8fafc);
  font: inherit;
}

.sp-map {
  height: min(60vh, 420px);
  min-height: 240px;
  border-radius: 8px;
}

.sp-map-hint {
  margin: 0;
  color: var(--text-secondary, #94a3b8);
  font-size: 12px;
}

.sp-map-dlg .xbtn {
  min-width: 36px;
  min-height: 36px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary, #94a3b8);
  font-size: 16px;
  cursor: pointer;
}

.sp-map-dlg .sp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.14));
  background: var(--bg-card, rgba(255, 255, 255, 0.04));
  color: var(--text-primary, #f8fafc);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.sp-map-dlg .sp-btn.primary {
  background: var(--accent-blue-solid, #2563eb);
  border-color: var(--accent-blue-solid, #2563eb);
  color: #ffffff;
}

.sp-map-dlg .sp-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

@media (max-width: 640px) {
  .sp-map-dlg {
    padding: 0;
    align-items: stretch;
  }
  .sp-map-box {
    border-radius: 0;
  }
  .sp-map-foot .sp-btn {
    min-height: 44px;
    flex: 1 1 0;
  }
}

/* W19c: "Edit site details" sheet on My day: the panel's location fields inside a modal. */
.sched-panel.sp-sheet {
  width: auto;
  flex: none;
  height: auto;
  min-height: 0;
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sp-sheet-status {
  margin: 8px 0 0;
  min-height: 1.2em;
  font-size: 12px;
  color: var(--text-secondary, #94a3b8);
}

.sp-sheet-status:empty {
  display: none;
}

/* G28: Training entry, JO TBD tag, Open/Closed JO tags & closed JO inline prompt */
.sched-panel .sp-tag.jo-tbd {
  background: rgba(245, 158, 11, 0.2);
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.5);
  font-weight: 700;
}

.light-theme .sched-panel .sp-tag.jo-tbd,
[data-theme="light"] .sched-panel .sp-tag.jo-tbd {
  background: rgba(217, 119, 6, 0.14);
  color: #92400e;
  border-color: rgba(180, 83, 9, 0.45);
}

.sched-panel .sp-tag.jo-status-open {
  background: rgba(16, 185, 129, 0.16);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.4);
  font-weight: 700;
}

.light-theme .sched-panel .sp-tag.jo-status-open,
[data-theme="light"] .sched-panel .sp-tag.jo-status-open {
  background: rgba(5, 150, 105, 0.14);
  color: #065f46;
  border-color: rgba(5, 150, 105, 0.45);
}

.sched-panel .sp-tag.jo-status-closed {
  background: rgba(148, 163, 184, 0.18);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.45);
  font-weight: 700;
}

.light-theme .sched-panel .sp-tag.jo-status-closed,
[data-theme="light"] .sched-panel .sp-tag.jo-status-closed {
  background: rgba(100, 116, 139, 0.15);
  color: #334155;
  border-color: rgba(100, 116, 139, 0.45);
}

.sched-panel .sp-closed-jo-confirm {
  margin-top: 6px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: var(--text-primary, #f8fafc);
  font-size: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.light-theme .sched-panel .sp-closed-jo-confirm,
[data-theme="light"] .sched-panel .sp-closed-jo-confirm {
  background: rgba(217, 119, 6, 0.1);
  border-color: rgba(180, 83, 9, 0.4);
  color: #78350f;
}

.sched-panel .sp-closed-jo-confirm .sp-closed-jo-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.sched-panel .sp-readiness-item.is-scheduled {
  border-left: 3px solid #38bdf8;
  background: rgba(56, 189, 248, 0.08);
}

.light-theme .sched-panel .sp-readiness-item.is-scheduled,
[data-theme="light"] .sched-panel .sp-readiness-item.is-scheduled {
  border-left-color: #0284c7;
  background: rgba(2, 132, 199, 0.08);
}

/* Step G35: Travel ban flag in Schedule Panel */
.sched-panel .sp-tag.travel-ban {
  background: rgba(239, 68, 68, 0.18);
  color: #fecaca;
  border: 1px solid rgba(239, 68, 68, 0.45);
  font-weight: 700;
}

.light-theme .sched-panel .sp-tag.travel-ban,
[data-theme="light"] .sched-panel .sp-tag.travel-ban {
  background: rgba(220, 38, 38, 0.14);
  color: #991b1b;
  border-color: rgba(220, 38, 38, 0.45);
}

.sched-panel select option[data-travel-banned="true"] {
  color: var(--text-muted, #94a3b8);
}

/* Step G34: Nominated & Weekdays-Only badges in Schedule Panel Pool tab */
.sched-panel .sp-tag.nominated {
  background: rgba(16, 185, 129, 0.16);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.4);
  font-weight: 600;
}

.light-theme .sched-panel .sp-tag.nominated,
[data-theme="light"] .sched-panel .sp-tag.nominated {
  background: rgba(5, 150, 105, 0.12);
  color: #065f46;
  border-color: rgba(5, 150, 105, 0.4);
}

.sched-panel .sp-tag.weekdays {
  background: rgba(56, 189, 248, 0.15);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.38);
  font-weight: 600;
}

.light-theme .sched-panel .sp-tag.weekdays,
[data-theme="light"] .sched-panel .sp-tag.weekdays {
  background: rgba(2, 132, 199, 0.12);
  color: #075985;
  border-color: rgba(2, 132, 199, 0.38);
}



