:root {
  --bg: #f3f5f9;
  --panel: #ffffff;
  --panel-alt: #fbfdff;
  --surface: #f7f9fd;
  --surface-2: #f9fbff;
  --text: #1a2433;
  --muted: #5c6675;
  --line: #d8e0eb;
  --primary: #125bb6;
  --danger: #ad1f1f;
  --ok: #157347;
  --input-bg: #ffffff;
  --shadow-soft: rgba(15, 23, 42, 0.12);
  --overlay: rgba(17, 24, 39, 0.45);
  --hover-bg: #f7f9fd;
}
html[data-dark-mode-effective="dark"] {
  --bg: #0f172a;
  --panel: #162033;
  --panel-alt: #1b2638;
  --surface: #101928;
  --surface-2: #152033;
  --text: #e5edf7;
  --muted: #98a6ba;
  --line: #334155;
  --primary: #60a5fa;
  --danger: #f87171;
  --ok: #34d399;
  --input-bg: #0f172a;
  --shadow-soft: rgba(2, 6, 23, 0.45);
  --overlay: rgba(2, 6, 23, 0.68);
  --hover-bg: #22304a;
}
a { color: var(--primary); }
* { box-sizing: border-box; }
body { margin: 0; font-family: Arial, sans-serif; background: var(--bg); color: var(--text); }
.container { max-width: 1200px; margin: 24px auto; padding: 0 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin-bottom: 14px; }
h1,h2,h3 { margin: 0 0 12px; }
label { display: block; font-weight: 600; margin-bottom: 6px; }
input,select,button,textarea { font: inherit; }
input:not([type="checkbox"]):not([type="radio"]),select,textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 8px; background: var(--input-bg); color: var(--text); }
button { border: 1px solid var(--primary); background: var(--primary); color: #fff; padding: 8px 12px; border-radius: 8px; cursor: pointer; }
button.secondary { background: var(--panel); color: var(--primary); }
button.danger { border-color: var(--danger); background: var(--danger); }
.button-link { display: inline-block; border: 1px solid var(--primary); background: var(--primary); color: #fff; padding: 8px 12px; border-radius: 8px; text-decoration: none; }
.button-link.secondary { background: var(--panel); color: var(--primary); }
table { width: 100%; border-collapse: collapse; }
th, td { border-bottom: 1px solid var(--line); text-align: left; padding: 8px; vertical-align: top; }
.small { font-size: 12px; color: var(--muted); }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
[hidden] { display: none !important; }
.col { flex: 1 1 220px; }
.alert { border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; }
.alert-error { background: #fdecec; border: 1px solid #f5c2c2; color: #7d1717; }
.alert-ok { background: #ecf9f0; border: 1px solid #bde5ca; color: #0f5f31; }
.alert-warning { background: #fff6e5; border: 1px solid #f3d39b; color: #8a5200; }
.alert-meta { margin-left: 8px; color: inherit; opacity: 0.9; }
.alert a { margin-left: 10px; font-weight: 600; color: inherit; }
.nav { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.nav a { text-decoration: none; border: 1px solid var(--line); padding: 7px 10px; border-radius: 8px; color: var(--text); background: var(--panel); }
.nav-dropdown { position: relative; }
.nav-dropdown > summary { list-style: none; text-decoration: none; border: 1px solid var(--line); padding: 7px 10px; border-radius: 8px; color: var(--text); background: var(--panel); cursor: pointer; user-select: none; }
.nav-dropdown > summary::-webkit-details-marker { display: none; }
.nav-dropdown > summary::after { content: " ▾"; font-size: 11px; color: #64748b; }
.nav-dropdown[open] > summary::after { content: " ▴"; }
.nav-dropdown-menu { position: absolute; top: calc(100% + 4px); left: 0; min-width: 180px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 4px 16px var(--shadow-soft); padding: 6px; z-index: 30; display: flex; flex-direction: column; gap: 4px; }
.nav-dropdown-menu a { border-radius: 6px; }
.nav-user-menu { margin-left: auto; }
.nav-user-menu > summary { padding: 6px 8px; min-width: 40px; display: flex; align-items: center; justify-content: center; }
.nav-user-menu > summary::after { content: ""; }
.nav-user-icon { display: inline-flex; width: 20px; height: 20px; color: var(--text); }
.nav-user-icon svg { width: 20px; height: 20px; display: block; }
.nav-user-icon circle,
.nav-user-icon path { fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.nav-user-dropdown { left: auto; right: 0; min-width: 160px; }
.nav-menu-form { margin: 0; }
.nav-menu-button { width: 100%; border: 1px solid transparent; background: var(--panel); color: var(--text); padding: 7px 10px; border-radius: 6px; text-align: left; font: inherit; font-weight: 400; }
.nav-menu-button:hover { background: var(--hover-bg); }
.nav-session-meta { display: flex; align-items: center; gap: 18px; margin: -4px 0 12px; font-size: 12px; color: var(--muted); }
.nav-session-meta-left { margin-right: auto; text-align: left; }
.nav-session-meta-right { margin-left: auto; text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.nav-session-user-line { display: block; }
.nav-session-delegation-line { display: block; color: #1f4f91; font-weight: 600; }
.inline { display: inline; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.app-settings-page { max-width: none; }
.app-settings-form { margin-top: 4px; }
.settings-section {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  margin-top: 12px;
  background: var(--panel-alt);
}
.settings-section:first-of-type { margin-top: 0; }
.settings-section-secondary { margin-top: 16px; background: var(--surface-2); }
.settings-section-title {
  margin: 0 0 10px 0;
  font-size: 20px;
  line-height: 1.2;
  color: var(--text);
}
.settings-subtitle {
  margin: 8px 0 8px 0;
  font-size: 16px;
  line-height: 1.2;
  color: var(--text);
}
.settings-hint { margin: 4px 0 8px 0; }
.settings-section-divider {
  margin: 14px 0 14px 0;
  border-top: 1px solid var(--line);
}
.settings-weekday-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(4, auto);
  grid-auto-flow: column;
  gap: 6px 10px;
  max-width: 420px;
}
.settings-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-weight: 400;
}
.user-settings-list {
  display: grid;
  gap: 30px;
  margin-top: 18px;
}
.user-settings-row {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) minmax(180px, auto);
  column-gap: 30px;
  align-items: center;
}
.user-settings-label-col {
  min-width: 0;
}
.user-settings-control-col {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}
.user-settings-label {
  display: block;
  margin: 0;
  font-weight: 600;
  color: var(--text);
}
.user-settings-select {
  min-width: 220px;
}
.settings-switch-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  cursor: pointer;
  margin: 0;
}
.settings-switch-label {
  font-weight: 600;
  color: var(--text);
}
.settings-switch {
  position: relative;
  display: inline-flex;
  width: 46px;
  min-width: 46px;
  height: 26px;
}
.settings-switch input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
}
.settings-switch-slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #c9d3e2;
  transition: background-color 0.18s ease;
}
.settings-switch-slider::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.28);
  transition: transform 0.18s ease;
}
.settings-switch input:checked + .settings-switch-slider {
  background: #2f7d32;
}
.settings-switch input:checked + .settings-switch-slider::after {
  transform: translateX(20px);
}
.settings-switch input:focus-visible + .settings-switch-slider {
  outline: 2px solid #1d4ed8;
  outline-offset: 2px;
}
@media (max-width: 720px) {
  .user-settings-row {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 12px;
  }
  .user-settings-control-col {
    justify-content: flex-start;
  }
}
.settings-branding-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(220px, 320px);
  gap: 14px;
  align-items: start;
}
.settings-logo-preview { margin: 6px 0 8px 0; min-height: 80px; display: flex; align-items: center; justify-content: flex-start; }
.settings-logo-image { max-height: 100px; max-width: 100%; object-fit: contain; border: 0; background: transparent; }
.settings-logo-remove { margin: 0 0 8px 0; }
.settings-actions { margin-top: 14px; }
.settings-actions-inline { justify-content: flex-end; }
.settings-save-row { margin-top: 10px; }
.event-sections-order-list {
  list-style: none;
  margin: 0 0 10px 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.event-sections-order-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 7px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: move;
}
.event-sections-order-item.is-dragging { opacity: 0.6; }
.event-sections-order-handle {
  color: #73839b;
  font-size: 13px;
  line-height: 1;
}
.event-sections-order-label {
  font-weight: 600;
  color: #1f2f46;
}
.event-sections-matrix-wrap { overflow-x: auto; }
.event-sections-matrix th,
.event-sections-matrix td { padding: 6px 8px; }
.event-sections-matrix th { white-space: nowrap; }
.event-sections-matrix-check { text-align: center; }
.rotation-pdf-col { max-width: 52px; display: flex; align-items: flex-end; justify-content: flex-start; }
.pdf-icon-link {
  width: 30px;
  height: 30px;
  border: 1px solid #a31d1d;
  border-radius: 4px;
  background: #c62828;
  color: #ffffff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 9px;
  line-height: 1;
}
.pdf-icon-link:hover { background: #ad2323; }
.pdf-icon-text { letter-spacing: 0.2px; }
.day-name { font-size: 18px; font-weight: 700; line-height: 1.2; color: var(--text); }
.day-date { font-size: 13px; color: var(--muted); margin-top: 2px; }
.show-slot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.show-time { width: 110px; min-width: 110px; padding: 6px 8px; }
.show-option { display: inline-flex; align-items: center; gap: 10px; margin: 0; font-weight: 400; white-space: nowrap; }
.show-option input[type="checkbox"] { margin: 0; width: auto; }
.dark-cell { vertical-align: middle; }
.week-divider-row td { background: var(--surface-2); color: var(--text); font-weight: 700; border-top: 2px solid var(--line); border-bottom: 1px solid var(--line); padding: 7px 10px; }
.schedule-grid { border-collapse: separate; border-spacing: 0; }
.schedule-grid th, .schedule-grid td { border: 1px solid var(--line); padding: 6px; background: var(--panel); vertical-align: top; }
.schedule-grid .crew-col { min-width: 220px; background: var(--surface); font-weight: 700; }
.schedule-grid .crew-col.is-copy-source { background: #eef8ee; }
.crew-copy-actions { margin-top: 6px; display: flex; gap: 4px; justify-content: flex-end; }
.split-shift-toggle.crew-week-copy-btn,
.split-shift-toggle.crew-week-paste-btn {
  min-width: 16px;
  width: 16px;
  height: 16px;
  padding: 0;
  line-height: 1;
  font-size: 11px;
  font-weight: 700;
  border: none !important;
  background: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: #111111;
}
.crew-week-copy-btn::before {
  content: "";
  display: block;
  width: 12px;
  height: 12px;
  margin: 0 auto;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Crect x='3.5' y='1.5' width='6' height='7' rx='0.75' fill='%23fff' stroke='%23000' stroke-width='1'/%3E%3Crect x='1.5' y='3.5' width='6' height='7' rx='0.75' fill='%23fff' stroke='%23000' stroke-width='1'/%3E%3C/svg%3E");
}
.crew-week-copy-btn.is-active::before {
  content: "x";
  width: auto;
  height: auto;
  background-image: none;
  font-size: 12px;
  line-height: 1;
  color: currentColor;
}
.split-shift-toggle.crew-week-copy-btn:hover,
.split-shift-toggle.crew-week-paste-btn:hover { opacity: 0.7; background: transparent !important; }
.split-shift-toggle.crew-week-copy-btn.is-active { color: #2f7d32; }
.split-shift-toggle.crew-week-paste-btn { color: #0b4a8b; }
.schedule-grid .perf-col { min-width: 220px; background: var(--surface-2); }
.schedule-grid .sticky-col { position: sticky; left: 0; z-index: 2; }
.schedule-grid thead .sticky-col { z-index: 3; }
.schedule-grid .section-row { background: var(--surface-2); font-weight: 700; }
.schedule-grid .section-row-day { text-align: center; vertical-align: middle; }
.required-complete-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #18a957;
  box-shadow: 0 0 0 1px rgba(17, 24, 39, 0.08);
}
.required-complete-dot.is-hidden { visibility: hidden; }
.schedule-grid .assign-box { min-height: 102px; border: 1px solid #e2e8f2; border-radius: 8px; padding: 6px; background: #fcfdff; }
.missing-tracks { color: #ad1f1f; margin-top: 4px; }
.schedule-grid-wrap { overflow: hidden; }
.rotation-week-nav-target { position: relative; }
.rotation-week-nav {
  position: absolute;
  top: 20px;
  transform: none;
  width: 18px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #1d4ed8;
  font-size: 26px;
  line-height: 26px;
  z-index: 4;
}
.rotation-week-nav:hover { color: #1e40af; }
.rotation-week-nav-prev { left: -18px; }
.rotation-week-nav-next { right: -18px; }
.rotation-week-nav.is-disabled { color: #93c5fd; pointer-events: none; }
.rotation-mobile-day-nav { display: none; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 10px; }
.rotation-mobile-day-btn { min-width: 40px; min-height: 36px; border: 1px solid #cfd6e2; background: #ffffff; border-radius: 8px; color: #1d4ed8; font-size: 20px; line-height: 1; }
.rotation-mobile-day-btn:disabled { color: #93c5fd; border-color: #dbe3f0; background: #f8fafc; }
.rotation-mobile-day-label { flex: 1; text-align: center; font-size: 14px; font-weight: 700; color: #17243a; }
.compact-grid { table-layout: fixed; width: 100%; }
.compact-grid .crew-col { width: 102px; min-width: 102px; font-size: 16px; overflow: hidden; }
.compact-grid .day-group { font-size: 12px; text-align: center; background: #eef3ff; }
.schedule-day-header { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; line-height: 1.05; }
.schedule-day-name { font-size: 14px; font-weight: 700; color: #17243a; }
.schedule-day-date { position: relative; display: block; width: 100%; margin-top: 2px; text-align: center; font-size: 14px; font-weight: 600; color: #24334d; }
.event-day-btn {
  position: absolute;
  top: 1px;
  right: 2px;
  margin: 0;
  border: none;
  background: transparent;
  color: #111111;
  border-radius: 0;
  padding: 0;
  width: 14px;
  height: 14px;
  min-width: 14px;
}
.event-day-btn::before {
  content: "";
  display: block;
  width: 14px;
  height: 14px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 14px 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Crect x='1.5' y='2.5' width='11' height='10' rx='1.2' fill='%23fff' stroke='%23000' stroke-width='1'/%3E%3Cline x1='1.5' y1='5' x2='12.5' y2='5' stroke='%23000' stroke-width='1'/%3E%3Cline x1='4.25' y1='1.25' x2='4.25' y2='4' stroke='%23000' stroke-width='1.2' stroke-linecap='round'/%3E%3Cline x1='9.75' y1='1.25' x2='9.75' y2='4' stroke='%23000' stroke-width='1.2' stroke-linecap='round'/%3E%3Cline x1='7' y1='7' x2='7' y2='10.5' stroke='%23000' stroke-width='1' stroke-linecap='round'/%3E%3Cline x1='5.25' y1='8.75' x2='8.75' y2='8.75' stroke='%23000' stroke-width='1' stroke-linecap='round'/%3E%3C/svg%3E");
}
.event-day-btn:hover { opacity: 0.72; }
.schedule-events-wrap { padding: 8px; }
.schedule-events-columns { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0; }
@media (min-width: 768px) {
  .rotation-pdf-col { display: flex !important; }
}
@media (max-width: 767px) {
  .rotation-mobile-day-nav { display: flex; }
  .rotation-week-nav { display: none; }
  .rotation-pdf-col { display: none !important; }
}
.events-day-column { border-left: 2px solid #000000; }
.events-day-column:last-child { border-right: 2px solid #000000; }
.events-day-head { background: #eef3ff; text-align: center; border-top: 2px solid #000000; border-bottom: 2px solid #000000; padding: 4px; }
.events-day-body { position: relative; height: 900px; min-height: 900px; padding: 0; background: #ffffff; }
.events-day-empty { position: absolute; top: 8px; left: 8px; }
.events-block { position: absolute; border: 1px solid #000000; background: #f9fbff; border-radius: 0; padding: 4px 5px 3px; overflow: hidden; }
.events-block-show { background: #f1f6ff; }
.events-block-option { background: #ffef6b; border-color: #d8c23f; }
.events-block-warning { background: #fff4f4; border-color: #c2410c; }
.events-block-time { font-size: 12px; font-weight: 700; color: #102340; line-height: 1.1; }
.events-block-title { margin-top: 2px; font-size: 14px; font-weight: 700; color: #111827; line-height: 1.2; }
.events-badge-option { margin-left: 6px; font-size: 10px; font-weight: 700; color: #6b5400; }
.events-block-meta { margin-top: 3px; font-size: 11px; color: #334155; }
.events-block-assignments { margin-top: 4px; border-top: 1px solid #d8e0eb; padding-top: 3px; }
.events-block-assignment-line { font-size: 11px; color: #1f2937; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.events-block .event-inline-edit { position: absolute; top: 4px; right: 4px; margin-left: 0; font-size: 12px; }
.compact-grid .perf-col { min-width: 72px; width: 72px; font-size: 11px; text-align: center; }
.compact-grid .perf-col.perf-col-option { background: #ffef6b !important; color: #111111; }
.compact-grid .perf-col-dark { min-width: 42px; width: 42px; font-size: 10px; }
.compact-grid .perf-col-dark-cell { min-width: 42px; width: 42px; }
.compact-grid .perf-col-dark,
#dept-schedule-grid .assignment-row .perf-col-dark-cell,
.overall-readonly-grid .assignment-row .perf-col-dark-cell { background: #000000 !important; color: #ffffff !important; }
.compact-grid .perf-col-dark.perf-col-dark-work,
#dept-schedule-grid .assignment-row .perf-col-dark-cell.perf-col-dark-work-cell,
.overall-readonly-grid .assignment-row .perf-col-dark-cell.perf-col-dark-work-cell {
  background: #243b5a !important;
  color: #ffffff !important;
}
#dept-schedule-grid .perf-col-dark-cell .muted { color: #ffffff !important; }
.overall-readonly-grid .assignment-row .perf-col-dark-cell .readonly-track-cell { background: #000000 !important; color: #ffffff !important; border-color: #000000 !important; }
.overall-readonly-grid .assignment-row .perf-col-dark-cell .readonly-track-cell .muted { color: #ffffff !important; }
.worked-dark-label {
  background: #243b5a !important;
  color: #ffffff !important;
  border-color: #243b5a !important;
}
.day-time-cell.perf-col-dark-work-cell {
  background-color: #fbfcff !important;
  color: inherit !important;
}
.day-time-cell.perf-col-dark-work-cell .events-list {
  border-top-color: #cfd6e2 !important;
}
.day-time-cell.perf-col-dark-work-cell .event-line,
.day-time-cell.perf-col-dark-work-cell .event-time,
.day-time-cell.perf-col-dark-work-cell .event-title,
.day-time-cell.perf-col-dark-work-cell .event-role,
.day-time-cell.perf-col-dark-work-cell .event-inline-edit {
  color: inherit !important;
}
.day-time-cell.perf-col-dark-work-cell .event-time { color: #111827 !important; }
.day-time-cell.perf-col-dark-work-cell .event-title { color: #1f2937 !important; }
.day-time-cell.perf-col-dark-work-cell .event-role { color: #4b5563 !important; }
.day-time-cell.perf-col-dark-work-cell .event-inline-edit { color: #2b3f63 !important; }
.day-time-cell.perf-col-dark-work-cell .event-line.is-warning .event-time,
.day-time-cell.perf-col-dark-work-cell .event-line.is-warning .event-title,
.day-time-cell.perf-col-dark-work-cell .event-line.is-warning .event-role {
  color: #b91c1c !important;
}
.day-time-cell.perf-col-dark-work-cell .personal-event-detail {
  border-bottom-color: #e5ebf5 !important;
}
.day-time-cell.perf-col-dark-work-cell .personal-event-title {
  color: #14223b !important;
}
.day-time-cell.perf-col-dark-work-cell .personal-event-meta {
  color: #364152 !important;
}
.day-time-cell.perf-col-dark-work-cell .personal-event-detail.is-warning .personal-event-title,
.day-time-cell.perf-col-dark-work-cell .personal-event-detail.is-warning .personal-event-meta {
  color: #b91c1c !important;
}
.compact-grid th, .compact-grid td { padding: 3px; }
.compact-grid .assignment-row td { padding: 1px; }
.compact-grid .assignment-row td { height: 20px; vertical-align: middle; }
.compact-box { min-height: 58px; padding: 3px; border-radius: 6px; }
.compact-box-flat { min-height: 0; padding: 0; border: none; background: transparent; }
.schedule-grid .assign-box.compact-box-flat { min-height: 0; padding: 0; border: none; background: transparent; }
.compact-grid .assignment-row .assign-box { min-height: 0 !important; padding: 0 !important; border: none !important; background: transparent !important; margin: 0; }
.compact-select { font-size: 11px; padding: 3px 4px; height: 24px; }
.compact-select-sheet { height: 18px; border-radius: 0; border: 1px solid #cfd6e2; background: #c6ccd4; font-size: 14px; padding: 0 1px; line-height: 16px; font-weight: 700; }
.schedule-grid .assignment-picker.compact-select-sheet { -webkit-appearance: none; -moz-appearance: none; appearance: none; background-image: none; padding-right: 0; text-align: center; text-align-last: center; }
.schedule-grid .assignment-picker.compact-select-sheet:disabled { opacity: 1; -webkit-text-fill-color: currentColor; }
.schedule-grid .assignment-picker.compact-select-sheet option {
  background: #ffffff;
  color: #111111;
}
.schedule-grid .assignment-picker.is-unassigned { color: #99a4b5; font-weight: 400; font-size: 11px; }
.schedule-grid .full-day-assignment-picker.compact-select-sheet {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: none;
  text-align: center;
  text-align-last: center;
  padding-right: 0;
}
.schedule-grid .full-day-assignment-picker.compact-select-sheet option {
  background: #ffffff;
  color: #111111;
}
.full-day-picker-wrap { margin-bottom: 2px; }
.full-day-assigned-cell { background: transparent; }
.muted { color: #99a4b5; text-align: center; }
#dept-schedule-grid tbody tr.assignment-row td,
#dept-schedule-grid tbody tr.day-time-row td,
.overall-readonly-grid tbody tr.assignment-row td,
.overall-readonly-grid tbody tr.day-time-row td { border-color: #000000; }
#dept-schedule-grid tbody tr.day-time-row td,
.overall-readonly-grid tbody tr.day-time-row td,
#dept-schedule-grid tbody tr.assignment-row td[rowspan]:not(.crew-col),
.overall-readonly-grid tbody tr.assignment-row td[rowspan]:not(.crew-col) {
  border-bottom-color: transparent;
  background-image: linear-gradient(
    to bottom,
    transparent calc(100% - 7px),
    #000000 calc(100% - 7px),
    #000000 calc(100% - 5px),
    transparent calc(100% - 5px),
    transparent calc(100% - 2px),
    #000000 calc(100% - 2px),
    #000000 100%
  );
  background-repeat: no-repeat;
  background-size: 100% 100%;
}
#dept-schedule-grid tbody tr.assignment-row td.crew-col[rowspan],
.overall-readonly-grid tbody tr.assignment-row td.crew-col[rowspan] {
  background-image: none;
  border-bottom-color: #000000;
}
#dept-schedule-grid tbody tr.day-time-row td,
.overall-readonly-grid tbody tr.day-time-row td { padding-bottom: 9px; }
#dept-schedule-grid tbody tr.day-time-row + tr.assignment-row td,
.overall-readonly-grid tbody tr.day-time-row + tr.assignment-row td { border-top-color: transparent; }
.crew-first,
.crew-last {
  font-weight: 700;
  line-height: 1.1;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
}
.schedule-page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.schedule-page-title-wrap { flex: 1 1 auto; min-width: 0; }
.schedule-page-logo-wrap { flex: 0 0 auto; min-width: 120px; display: flex; justify-content: flex-end; align-items: flex-start; }
.schedule-page-logo { max-height: 72px; max-width: 220px; object-fit: contain; border: 0; background: transparent; }
.day-time-block { margin-top: 2px; border-top: 1px solid #e6edf8; padding-top: 3px; }
.time-row { display: flex; align-items: center; gap: 4px; margin-top: 2px; }
.time-mini { width: 54px; min-width: 54px; padding: 2px 4px; font-size: 10px; }
.break-mini { width: 50px; min-width: 50px; padding: 2px 4px; font-size: 10px; }
.day-time-row td { background: #fbfcff; }
.day-time-cell { padding-top: 2px; padding-bottom: 4px; }
.day-time-cell .day-time-block { margin-top: 0; border-top: none; padding-top: 0; }
.time-grid-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-bottom: 2px; }
.time-grid-row.slots { grid-template-columns: repeat(var(--slot-count, 2), minmax(0, 1fr)); }
.time-inline-row { display: grid; grid-template-columns: 1fr 1fr 33px; gap: 0; margin-bottom: 2px; }
.split-shift-row { display: none; }
.split-shift-row.is-visible { display: grid; }
.time-cell-in { grid-column: 1; }
.time-cell-out { grid-column: 2; }
.time-cell-meal { grid-column: 2; }
.time-inline-row .time-cell-meal { grid-column: 3; width: 31px; max-width: 31px; margin-left: 2px; text-align: center; text-align-last: center; padding-left: 0 !important; padding-right: 0 !important; }
input.sheet-time-input { width: 100%; height: 18px; border: 1px solid #cfd6e2; border-radius: 0 !important; background: #fff; font-size: 14px; padding: 0 1px; line-height: 16px; margin: 0; box-shadow: none; font-weight: 700; }
input.sheet-time-input.coverage-amber { background: #fff4ce; border-color: #d8b250; }
input.sheet-time-input.coverage-red { background: #fbe4e4; border-color: #c96b6b; color: #6f1212; }
#dept-schedule-grid .day-time-input.time-cell-in,
#dept-schedule-grid .day-time-input.time-cell-out,
#me-schedule-grid .sheet-time-input.readonly.time-cell-in,
#me-schedule-grid .sheet-time-input.readonly.time-cell-out {
  -webkit-appearance: none;
  appearance: none;
  text-align: center !important;
  text-align-last: center !important;
  text-indent: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  min-width: 0;
}
input.sheet-time-input::placeholder { font-weight: 400; color: #99a4b5; font-size: 10px; }
.sheet-time-input.meal { max-width: none; }
input.sheet-time-input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
input.sheet-time-input[type="number"]::-webkit-outer-spin-button,
input.sheet-time-input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.sheet-time-input.readonly { display: block; height: 18px; border: 1px solid #cfd6e2; border-radius: 0 !important; background: #ffffff; font-size: 14px; font-weight: 700; line-height: 16px; padding: 0 1px; color: #111111; }
.time-grid-total { font-size: 14px; font-weight: 700; color: #125bb6; min-height: 16px; padding-top: 3px; text-align: center; border-top: 1px solid #cfd6e2; margin-top: 1px; }
.time-grid-total.with-split-toggle {
  display: grid;
  grid-template-columns: 1fr 18px;
  align-items: center;
  gap: 4px;
}
.time-grid-total.with-split-toggle .day-total-output {
  justify-self: center;
}
.split-shift-toggle {
  width: 18px;
  min-width: 18px;
  height: 18px;
  border: 1px solid #8aa7d1;
  border-radius: 999px;
  background: #eef5ff;
  color: #125bb6;
  font-size: 14px;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  justify-self: end;
}
.split-shift-toggle:hover { background: #dfeeff; }
.schedule-layout-vertical .vertical-time-block {
  display: grid;
  grid-template-columns: repeat(var(--slot-count, 2), minmax(0, 1fr));
  column-gap: 0;
  row-gap: 2px;
}
.schedule-layout-vertical .vertical-time-stack {
  grid-column: 1;
  display: grid;
  grid-template-columns: 1fr;
  row-gap: 2px;
}
.schedule-layout-vertical .vertical-time-stack.split-shift-row.is-visible { display: grid; }
.schedule-layout-vertical .vertical-time-stack .time-cell-in,
.schedule-layout-vertical .vertical-time-stack .time-cell-out,
.schedule-layout-vertical .vertical-time-stack .time-cell-meal {
  grid-column: 1;
}
.schedule-layout-vertical .vertical-time-total {
  grid-column: 2;
  grid-row: 1 / -1;
  display: flex;
  align-items: stretch;
}
.schedule-layout-vertical .vertical-time-total .day-total-output {
  display: flex;
  width: 100%;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  border-left: 1px solid #cfd6e2;
  font-size: 14px;
  font-weight: 700;
  color: #125bb6;
  padding-left: 2px;
}
.schedule-layout-vertical .vertical-time-total {
  position: relative;
}
.split-shift-toggle-vertical {
  position: absolute;
  top: 4px;
  right: 3px;
}
.schedule-layout-vertical .vertical-events-list {
  grid-column: 1 / -1;
}
.schedule-layout-vertical .overall-readonly-grid .vertical-time-total .day-total-output,
.schedule-layout-vertical .overall-readonly-grid .vertical-time-total .sheet-time-input.readonly {
  display: flex;
}
.events-list { margin-top: 3px; border-top: 1px solid #cfd6e2; padding-top: 2px; }
.event-line { display: flex; align-items: baseline; gap: 4px; font-size: 10px; line-height: 1.2; color: #1f2937; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.event-time { font-weight: 700; color: #111827; flex: 0 0 auto; }
.event-title { font-weight: 600; color: #1f2937; overflow: hidden; text-overflow: ellipsis; }
.event-role { color: #4b5563; overflow: hidden; text-overflow: ellipsis; }
.event-inline-edit { margin-left: auto; border: none; background: transparent; color: #2b3f63; padding: 0; font-size: 10px; line-height: 1; cursor: pointer; }
.event-inline-edit:hover { color: #102340; }
.event-line.is-warning .event-time,
.event-line.is-warning .event-title,
.event-line.is-warning .event-role { color: #b91c1c; }
.dark-events-list { border-top-color: rgba(255, 255, 255, 0.4); }
.perf-col-dark-cell .event-line,
.perf-col-dark-cell .event-time,
.perf-col-dark-cell .event-title,
.perf-col-dark-cell .event-role,
.perf-col-dark-cell .event-inline-edit { color: #ffffff; }
.perf-col-dark-cell .event-line.is-warning .event-time,
.perf-col-dark-cell .event-line.is-warning .event-title,
.perf-col-dark-cell .event-line.is-warning .event-role { color: #ff8b8b; }
.personal-event-detail { padding: 1px 0 2px; border-bottom: 1px solid #e5ebf5; }
.personal-event-detail:last-child { border-bottom: none; }
.personal-event-title { font-size: 10px; font-weight: 700; color: #14223b; line-height: 1.2; }
.personal-event-meta { font-size: 10px; color: #364152; line-height: 1.2; }
.personal-event-detail.is-warning .personal-event-title,
.personal-event-detail.is-warning .personal-event-meta { color: #b91c1c; }
.perf-col-dark-cell .personal-event-detail { border-bottom-color: rgba(255, 255, 255, 0.28); }
.perf-col-dark-cell .personal-event-title,
.perf-col-dark-cell .personal-event-meta { color: #ffffff; }
.perf-col-dark-cell .personal-event-detail.is-warning .personal-event-title,
.perf-col-dark-cell .personal-event-detail.is-warning .personal-event-meta { color: #ff8b8b; }
.week-total-col { min-width: 84px; width: 84px; text-align: center; }
.week-total-cell { text-align: center; vertical-align: middle; background: #f8fbff; }
.week-total-header-sum { margin-top: 4px; font-size: 12px; font-weight: 700; color: #1f2937; }
.week-total-output { font-weight: 700; font-size: 12px; color: #1f2937; display: inline-block; min-width: 56px; }
.week-total-output.is-over-limit { color: #ad1f1f; }
.readonly-track-cell { height: 18px; border: 1px solid #cfd6e2; border-radius: 0; font-size: 14px; font-weight: 700; line-height: 16px; padding: 0 1px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; background: var(--panel); text-align: center; }
.overall-readonly-grid .readonly-track-cell .muted { font-weight: 400; font-size: 12px; }
.dept-pill { text-decoration: none; border: 1px solid var(--line); color: var(--text); background: var(--panel); border-radius: 999px; padding: 4px 10px; font-size: 12px; }
.dept-pill.status-white { background: #ffffff; color: var(--text); border-color: var(--line); }
.dept-pill.status-red { background: #fbe4e4; color: #4b1515; border-color: #d17373; }
.dept-pill.status-green { background: #e5f5e9; color: #15452b; border-color: #73b18a; }
.dept-pill.active { border-width: 3px; font-weight: 700; padding: 3px 9px; box-shadow: inset 0 0 0 1px rgba(17, 24, 39, 0.06); }
.me-name { font-size: 22px; font-weight: 700; margin: 6px 0 0; }
.me-print-events-card { margin-top: 10px; }
.me-print-events-heading { margin: 0 0 8px; font-size: 18px; line-height: 1.2; }
.me-print-event-day { margin-top: 8px; }
.me-print-event-day:first-of-type { margin-top: 0; }
.me-print-event-day-label { font-size: 12px; font-weight: 700; color: #14223b; margin-bottom: 4px; }
.audit-block pre { margin: 4px 0 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px; max-width: 100%; overflow: auto; font-size: 12px; }
.audit-action-col { width: 88px; }
.audit-view-btn { border: none; background: transparent; color: #4a4f57; padding: 0; font-size: 18px; line-height: 1; cursor: pointer; }
.audit-view-btn:hover { color: #1f2a3a; }
.audit-action-stack { display: grid; grid-template-columns: 18px 31px; gap: 15px; justify-content: end; align-items: center; min-width: 64px; }
.audit-revert-btn { position: relative; top: -2px; border: none; background: transparent; color: #4a4f57; padding: 0; font-size: 31px; line-height: 1; cursor: pointer; }
.audit-revert-btn:hover { color: #1f2a3a; }
.audit-action-slot { display: inline-block; width: 31px; height: 31px; }
.audit-modal[hidden] { display: none; }
.audit-modal { position: fixed; inset: 0; z-index: 1000; }
.audit-modal__overlay { position: absolute; inset: 0; background: var(--overlay); }
.audit-modal__dialog { position: relative; max-width: 860px; margin: 6vh auto 0; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px; max-height: 86vh; overflow: auto; }
.audit-modal__header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.audit-modal__close { border: none; background: transparent; color: #475467; font-size: 24px; padding: 0 4px; line-height: 1; }
.audit-detail-section { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; }
.audit-detail-section:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }
.audit-detail-section__title { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.audit-detail-grid { display: grid; grid-template-columns: 130px 1fr; gap: 6px 12px; }
.audit-detail-label { font-size: 12px; font-weight: 700; color: #5c6675; }
.audit-detail-value { font-size: 13px; color: var(--text); white-space: pre-wrap; }
.audit-detail-pre { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px; overflow: auto; font-size: 12px; white-space: pre-wrap; }
body.modal-open { overflow: hidden; }
.event-modal[hidden] { display: none; }
.event-modal { position: fixed; inset: 0; z-index: 1100; }
.event-modal__overlay { position: absolute; inset: 0; background: var(--overlay); }
.event-modal__dialog { position: relative; max-width: 980px; margin: 4vh auto 0; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px; max-height: 90vh; overflow: auto; }
.event-modal__header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.event-day-list { border: 1px solid var(--line); border-radius: 8px; padding: 8px; margin-bottom: 10px; background: var(--surface-2); }
.event-day-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 0; border-bottom: 1px solid #e6edf8; }
.event-day-item.is-warning { background: #fff4f4; border-radius: 6px; padding-left: 6px; padding-right: 6px; }
.event-day-item:last-child { border-bottom: none; }
.event-day-item-main { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; font-size: 13px; font-weight: 600; color: #1f2937; }
.event-day-item-time { flex: 0 0 auto; min-width: 96px; color: #0f172a; font-variant-numeric: tabular-nums; }
.event-day-item-title { flex: 1 1 auto; min-width: 0; }
.event-day-item-warning { flex: 1 0 100%; font-size: 11px; font-weight: 600; color: #b42318; }
.event-postpone-panel { border: 1px solid #d8e2f0; border-radius: 8px; padding: 10px; margin-bottom: 10px; background: var(--surface-2); }
.event-postpone-panel__title { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.event-postpone-preview { display: grid; gap: 6px; }
.event-postpone-preview__row { display: grid; grid-template-columns: 70px 1fr; gap: 10px; align-items: baseline; }
.event-postpone-preview__label { font-size: 12px; font-weight: 700; color: #5c6675; }
.event-postpone-preview__value { font-size: 13px; color: var(--text); }
.event-assignment-title { margin-top: 6px; margin-bottom: 6px; font-weight: 700; color: var(--text); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.event-assignment-quick { border: none; background: transparent; padding: 0; margin: 0; color: #5c6b80; font-size: 11px; line-height: 1; cursor: pointer; font-weight: 500; text-decoration: none; }
.event-assignment-quick:hover { color: #344258; }
.event-assignment-quick:disabled { color: #9aa5b5; cursor: default; }
.event-assignment-split { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 10px; align-items: start; }
.event-assignment-grid { border: 1px solid var(--line); border-radius: 8px; padding: 6px; max-height: 280px; overflow: auto; background: var(--panel); }
.event-required-tracks-panel { border: 1px solid var(--line); border-radius: 8px; padding: 8px; max-height: 180px; overflow: auto; background: var(--panel); display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 6px 10px; }
.event-assignment-row { display: grid; grid-template-columns: minmax(180px, 1fr) 150px 160px; gap: 6px; align-items: center; padding: 3px 0; border-bottom: 1px solid #eff3f9; }
.event-assignment-row:last-child { border-bottom: none; }
.event-assignment-check { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-weight: 500; }
.event-assignment-check input[type="checkbox"] { margin: 0; width: auto; }
.event-required-track-check { font-weight: inherit; font-size: 12px; }
.event-departments-panel { border: 1px solid var(--line); border-radius: 8px; padding: 6px; background: var(--panel); display: grid; grid-template-columns: 1fr; gap: 4px; }
.event-dept-check { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-weight: inherit; font-size: inherit; }
.event-dept-check input[type="checkbox"] { margin: 0; width: auto; }
html[data-dark-mode-effective="dark"] .alert-error {
  background: #3b171b;
  border-color: #7f1d1d;
  color: #fecaca;
}
html[data-dark-mode-effective="dark"] .alert-ok {
  background: #0f2d23;
  border-color: #166534;
  color: #bbf7d0;
}
html[data-dark-mode-effective="dark"] .alert-warning {
  background: #38250f;
  border-color: #92400e;
  color: #fcd34d;
}
html[data-dark-mode-effective="dark"] .schedule-grid .crew-col.is-copy-source {
  background: #183226;
}
html[data-dark-mode-effective="dark"] .split-shift-toggle.crew-week-copy-btn,
html[data-dark-mode-effective="dark"] .split-shift-toggle.crew-week-paste-btn,
html[data-dark-mode-effective="dark"] .audit-view-btn,
html[data-dark-mode-effective="dark"] .audit-revert-btn,
html[data-dark-mode-effective="dark"] .edit-icon-link,
html[data-dark-mode-effective="dark"] .crew-drag-handle {
  color: var(--muted);
}
html[data-dark-mode-effective="dark"] .dept-pill.status-white {
  background: #1e3a5f;
  color: #ffffff;
  border-color: #4b5f7b;
}
html[data-dark-mode-effective="dark"] .dept-pill.status-red {
  background: #1e3a5f;
  color: #ffffff;
  border-color: #dc6b6b;
  border-width: 3px;
  padding: 3px 9px;
}
html[data-dark-mode-effective="dark"] .dept-pill.status-green {
  background: #1e3a5f;
  color: #ffffff;
  border-color: #5cc28a;
  border-width: 3px;
  padding: 3px 9px;
}
html[data-dark-mode-effective="dark"] .dept-pill.active {
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}
html[data-dark-mode-effective="dark"] .audit-modal__close {
  color: var(--muted);
}
html[data-dark-mode-effective="dark"] .event-day-item {
  border-bottom-color: var(--line);
}
html[data-dark-mode-effective="dark"] .event-day-item-main,
html[data-dark-mode-effective="dark"] .event-day-item-time,
html[data-dark-mode-effective="dark"] .event-postpone-preview__label,
html[data-dark-mode-effective="dark"] .audit-detail-label,
html[data-dark-mode-effective="dark"] .me-print-event-day-label {
  color: var(--muted);
}
html[data-dark-mode-effective="dark"] .event-day-item.is-warning {
  background: #3b171b;
}
html[data-dark-mode-effective="dark"] .rotation-week-nav,
html[data-dark-mode-effective="dark"] .rotation-mobile-day-btn,
html[data-dark-mode-effective="dark"] .rotation-mobile-day-label,
html[data-dark-mode-effective="dark"] .schedule-day-name,
html[data-dark-mode-effective="dark"] .schedule-day-date,
html[data-dark-mode-effective="dark"] .compact-grid .perf-col,
html[data-dark-mode-effective="dark"] .compact-grid .perf-col.perf-col-option,
html[data-dark-mode-effective="dark"] .week-total-header-sum,
html[data-dark-mode-effective="dark"] .week-total-output,
html[data-dark-mode-effective="dark"] .time-grid-total,
html[data-dark-mode-effective="dark"] .event-line,
html[data-dark-mode-effective="dark"] .event-time,
html[data-dark-mode-effective="dark"] .event-title,
html[data-dark-mode-effective="dark"] .event-role,
html[data-dark-mode-effective="dark"] .event-inline-edit,
html[data-dark-mode-effective="dark"] .personal-event-title,
html[data-dark-mode-effective="dark"] .personal-event-meta,
html[data-dark-mode-effective="dark"] .me-print-event-day-label,
html[data-dark-mode-effective="dark"] .crew-first,
html[data-dark-mode-effective="dark"] .crew-last,
html[data-dark-mode-effective="dark"] .readonly-track-cell,
html[data-dark-mode-effective="dark"] .show-time,
html[data-dark-mode-effective="dark"] .muted {
  color: var(--text) !important;
}
html[data-dark-mode-effective="dark"] .rotation-mobile-day-btn {
  border-color: var(--line);
  background: var(--panel);
}
html[data-dark-mode-effective="dark"] .rotation-mobile-day-btn:disabled {
  border-color: var(--line);
  background: var(--surface);
  color: var(--muted) !important;
}
html[data-dark-mode-effective="dark"] .compact-grid .day-group,
html[data-dark-mode-effective="dark"] .events-day-head,
html[data-dark-mode-effective="dark"] .week-total-cell,
html[data-dark-mode-effective="dark"] .day-time-row td,
html[data-dark-mode-effective="dark"] .schedule-grid .assign-box,
html[data-dark-mode-effective="dark"] .events-block,
html[data-dark-mode-effective="dark"] .events-day-body {
  background: var(--panel) !important;
}
html[data-dark-mode-effective="dark"] .events-day-head {
  border-top-color: var(--line);
  border-bottom-color: var(--line);
}
html[data-dark-mode-effective="dark"] .events-block,
html[data-dark-mode-effective="dark"] .events-day-body,
html[data-dark-mode-effective="dark"] .schedule-grid .assign-box,
html[data-dark-mode-effective="dark"] .personal-event-detail {
  border-color: var(--line);
}
html[data-dark-mode-effective="dark"] .events-block-show,
html[data-dark-mode-effective="dark"] .compact-grid .perf-col,
html[data-dark-mode-effective="dark"] .compact-grid .day-group,
html[data-dark-mode-effective="dark"] .show-slot {
  background: var(--surface-2) !important;
}
html[data-dark-mode-effective="dark"] .events-block-option,
html[data-dark-mode-effective="dark"] .compact-grid .perf-col.perf-col-option {
  background: #5b4a14 !important;
  border-color: #8f7a28 !important;
}
html[data-dark-mode-effective="dark"] .events-block-warning {
  background: #3b171b !important;
  border-color: #9f3a1b !important;
}
html[data-dark-mode-effective="dark"] .compact-select-sheet:not(.assignment-picker):not(.full-day-assignment-picker),
html[data-dark-mode-effective="dark"] input.sheet-time-input,
html[data-dark-mode-effective="dark"] .sheet-time-input.readonly {
  background: var(--input-bg) !important;
  border-color: var(--line) !important;
  color: var(--text) !important;
}
html[data-dark-mode-effective="dark"] .schedule-grid .assignment-picker.is-unassigned,
html[data-dark-mode-effective="dark"] input.sheet-time-input::placeholder,
html[data-dark-mode-effective="dark"] .overall-readonly-grid .readonly-track-cell .muted {
  color: var(--muted) !important;
}
html[data-dark-mode-effective="dark"] .time-grid-total {
  border-top-color: var(--line);
}
html[data-dark-mode-effective="dark"] .event-line.is-warning .event-time,
html[data-dark-mode-effective="dark"] .event-line.is-warning .event-title,
html[data-dark-mode-effective="dark"] .event-line.is-warning .event-role,
html[data-dark-mode-effective="dark"] .personal-event-detail.is-warning .personal-event-title,
html[data-dark-mode-effective="dark"] .personal-event-detail.is-warning .personal-event-meta,
html[data-dark-mode-effective="dark"] .events-block-warning .events-block-time,
html[data-dark-mode-effective="dark"] .events-block-warning .events-block-title,
html[data-dark-mode-effective="dark"] .events-block-warning .events-block-meta,
html[data-dark-mode-effective="dark"] .events-block-warning .events-block-assignment-line {
  color: #fca5a5 !important;
}
html[data-dark-mode-effective="dark"] .compact-grid .perf-col-dark,
html[data-dark-mode-effective="dark"] #dept-schedule-grid .assignment-row .perf-col-dark-cell,
html[data-dark-mode-effective="dark"] .overall-readonly-grid .assignment-row .perf-col-dark-cell,
html[data-dark-mode-effective="dark"] .worked-dark-label,
html[data-dark-mode-effective="dark"] .perf-col-dark-cell .muted,
html[data-dark-mode-effective="dark"] #dept-schedule-grid .perf-col-dark-cell .muted {
  color: #e5edf7 !important;
}
@media (max-width: 980px) {
  .event-assignment-split { grid-template-columns: 1fr; }
}
.edit-icon-link { text-decoration: none; color: #4a4f57; display: inline-flex; align-items: center; }
.edit-icon-link svg { width: 16px; height: 16px; display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.crew-drag-cell { width: 34px; text-align: center; }
.crew-drag-handle { border: none; background: transparent; color: #6b7280; cursor: grab; font-size: 16px; line-height: 1; padding: 0; }
.crew-row-dragging { opacity: 0.55; }
.crew-edit-card .row { margin-bottom: 12px; }
.crew-edit-card .row:last-of-type { margin-bottom: 0; }
@media (max-width: 767px) {
  .events-list { margin-top: 5px; padding-top: 4px; }
  .event-line { font-size: 12px; line-height: 1.35; gap: 6px; }
  .event-time { font-size: 12px; }
  .event-title { font-size: 12px; }
  .event-role { font-size: 12px; }
  .personal-event-detail { padding: 4px 0 5px; }
  .personal-event-title { font-size: 12px; line-height: 1.35; }
  .personal-event-meta { font-size: 12px; line-height: 1.35; }
}
