:root {
  --bg: #0f172a;
  --panel: #111827;
  --panel-2: #1f2937;
  --muted: #94a3b8;
  --text: #f8fafc;
  --border: #334155;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --success: #16a34a;
  --danger: #dc2626;
  --warning: #d97706;
  --card: #020617;
}

* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: linear-gradient(135deg, #020617, #0f172a 45%, #111827);
  color: var(--text);
  min-height: 100vh;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
.hidden {
  display: none !important;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-card {
  width: min(440px, 100%);
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}
.logo-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.logo {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #2563eb;
  font-weight: 800;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
.subtle {
  color: var(--muted);
  line-height: 1.5;
}
.form-grid {
  display: grid;
  gap: 14px;
}
label {
  display: grid;
  gap: 7px;
  color: #dbeafe;
  font-size: 14px;
  font-weight: 700;
}
input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: #020617;
  color: var(--text);
  border-radius: 14px;
  padding: 11px 12px;
  outline: none;
}
input:focus,
select:focus,
textarea:focus {
  border-color: #93c5fd;
}
.primary-btn,
.secondary-btn,
.danger-btn,
.success-btn,
.warning-btn,
.ghost-btn {
  border: 0;
  border-radius: 14px;
  padding: 10px 14px;
  color: white;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.primary-btn {
  background: var(--primary);
}
.primary-btn:hover {
  background: var(--primary-dark);
}
.secondary-btn {
  background: #475569;
}
.secondary-btn:hover {
  background: #334155;
}
.success-btn {
  background: var(--success);
}
.danger-btn {
  background: var(--danger);
}
.warning-btn {
  background: var(--warning);
}
.ghost-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: #cbd5e1;
}
.full-btn {
  width: 100%;
  padding: 13px;
}
.error-box,
.success-box {
  padding: 12px;
  border-radius: 14px;
  margin-top: 14px;
  font-weight: 700;
}
.error-box {
  background: rgba(220, 38, 38, 0.12);
  border: 1px solid rgba(220, 38, 38, 0.45);
  color: #fecaca;
}
.success-box {
  background: rgba(22, 163, 74, 0.12);
  border: 1px solid rgba(22, 163, 74, 0.45);
  color: #bbf7d0;
}
.app-shell {
  display: grid;
  grid-template-columns: 270px 1fr;
  min-height: 100vh;
}
.sidebar {
  background: rgba(2, 6, 23, 0.92);
  border-right: 1px solid var(--border);
  padding: 20px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.sidebar h2 {
  margin: 0;
  font-size: 19px;
}
.nav {
  display: grid;
  gap: 8px;
  margin-top: 24px;
}
.nav button {
  text-align: left;
  border: 0;
  background: transparent;
  color: #cbd5e1;
  border-radius: 14px;
  padding: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.nav-notification-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 0 0 2px rgba(127, 29, 29, .35);
}
.nav button.active,
.nav button:hover {
  background: #1e293b;
  color: white;
}
.sidebar-bottom {
  position: absolute;
  bottom: 20px;
  left: 20px;
  right: 20px;
}
.main {
  padding: 24px;
  max-width: 1500px;
  width: 100%;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 22px;
}
.topbar h1 {
  margin-bottom: 6px;
  font-size: clamp(28px, 3vw, 42px);
}
.grid {
  display: grid;
  gap: 16px;
}
.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.two-col {
  grid-template-columns: 390px 1fr;
}
.card {
  background: rgba(15, 23, 42, 0.94);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.card-title {
  font-size: 20px;
  font-weight: 900;
  margin: 0;
}
.stat-card .stat-value {
  font-size: 38px;
  font-weight: 900;
  margin: 8px 0 4px;
}

/*Schedule toolbar*/
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}
.toolbar input {
  max-width: 360px;
}
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 18px;
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}
th,
td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
th {
  background: #020617;
  color: #cbd5e1;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
tr:hover td {
  background: rgba(30, 41, 59, 0.5);
}
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.pill {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}
.pill-active,
.pill-approved,
.pill-scheduled,
.pill-completed {
  background: rgba(22, 163, 74, 0.18);
  color: #bbf7d0;
}
.pill-pending,
.pill-open,
.pill-clocked-in {
  background: rgba(217, 119, 6, 0.18);
  color: #fed7aa;
}
.pill-denied,
.pill-inactive {
  background: rgba(220, 38, 38, 0.18);
  color: #fecaca;
}
.item-list {
  display: grid;
  gap: 12px;
}
.list-item {
  background: rgba(2, 6, 23, 0.6);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 14px;
}
.item-title {
  font-weight: 900;
  margin-bottom: 4px;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.76);
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 30;
}
.modal {
  /* origina width was 620px */
  width: min(820px, 100%);
  max-height: 92vh;
  overflow: auto;
  background: #0f172a;
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 20px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.close-btn {
  background: transparent;
  color: #cbd5e1;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 7px 10px;
}
.empty-state {
  border: 1px dashed var(--border);
  border-radius: 18px;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}
.small {
  font-size: 13px;
}
.mobile-menu {
  display: none;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: static;
    height: auto;
  }
  .sidebar-bottom {
    position: static;
    margin-top: 18px;
  }
  .stats-grid,
  .two-col {
    grid-template-columns: 1fr;
  }
  .topbar {
    flex-direction: column;
  }
}
.info-box {
  padding: 12px;
  border-radius: 14px;
  margin: 10px 0;
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(147, 197, 253, 0.35);
  color: #bfdbfe;
  line-height: 1.4;
}
.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #dbeafe;
  font-size: 14px;
  font-weight: 700;
}
.check-row input {
  width: auto;
}
.calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  gap: 8px;
}
.cal-head {
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 8px;
}
.cal-head div {
  background: #020617;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  text-align: center;
}
.cal-day {
  height: 260px;
  min-height: 260px;
  background: rgba(2, 6, 23, 0.58);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.cal-muted {
  opacity: 0.42;
}
.cal-today {
  border-color: #93c5fd;
  box-shadow: inset 0 0 0 1px rgba(147, 197, 253, 0.35);
}
.cal-date {
  font-weight: 900;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.cal-date-actions {
  display: flex;
  gap: 5px;
  align-items: center;
}
.cal-events-scroll {
  overflow-y: auto;
  padding-right: 3px;
  flex: 1;
  min-height: 0;
  scrollbar-width: thin;
}
.cal-events-scroll::-webkit-scrollbar {
  width: 7px;
}
.cal-events-scroll::-webkit-scrollbar-thumb {
  background: #475569;
  border-radius: 999px;
}
.view-all-day,
.mini-view {
  border: 0;
  border-radius: 999px;
  background: rgba(147, 197, 253, 0.18);
  color: #bfdbfe;
  font-weight: 900;
}
.mini-view {
  padding: 4px 7px;
  font-size: 11px;
}
.view-all-day {
  margin-top: 6px;
  padding: 6px 8px;
  font-size: 12px;
  width: 100%;
}
.cal-event {
  border-radius: 10px;
  padding: 5px 7px;
  margin-bottom: 5px;
  font-size: 12px;
  line-height: 1.25;
  font-weight: 800;
}
.cal-event.shift {
  background: rgba(37, 99, 235, 0.22);
  color: #bfdbfe;
}
.cal-event.off {
  background: rgba(217, 119, 6, 0.2);
  color: #fed7aa;
}
.cal-event.blackout {
  background: rgba(220, 38, 38, 0.22);
  color: #fecaca;
}
@media (max-width: 980px) {
  .calendar-grid {
    grid-template-columns: repeat(7, minmax(150px, 1fr));
    overflow-x: auto;
  }
  .cal-day {
    height: 230px;
    min-height: 230px;
  }
}
.cal-event.clickable {
  cursor: pointer;
  border: 1px solid rgba(147, 197, 253, 0.35);
}
.cal-event.clickable:hover {
  filter: brightness(1.18);
  transform: translateY(-1px);
}
.cal-date {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.mini-add {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(37, 99, 235, 0.35);
  color: white;
  font-weight: 900;
  line-height: 1;
}
.two-inputs {
  grid-template-columns: 1fr 1fr;
}
.weekday-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
@media (max-width: 700px) {
  .two-inputs,
  .weekday-grid {
    grid-template-columns: 1fr;
  }
}
.pill-day-off {
  background: rgba(217, 119, 6, 0.18);
  color: #fed7aa;
}
.soft-sep {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 18px 0;
}
.data-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.mini-stat {
  background: rgba(2, 6, 23, 0.6);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  display: grid;
  gap: 4px;
}
.mini-stat strong {
  font-size: 28px;
}
.mini-stat span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
@media (max-width: 980px) {
  .data-stats {
    grid-template-columns: 1fr 1fr;
  }
}
.view-toggle {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}
.toggle-btn {
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.8);
  color: #bfdbfe;
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 900;
  cursor: pointer;
}
.toggle-btn.active {
  background: #2563eb;
  color: white;
  border-color: #60a5fa;
}
.weekly-calendar {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 18px;
}
.weekly-header,
.weekly-row {
  display: grid;
  grid-template-columns: 210px repeat(7, minmax(150px, 1fr));
  min-width: 1260px;
}
.weekly-header {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #020617;
  color: #dbeafe;
  font-weight: 900;
}
.weekly-header-name,
.weekly-head-day {
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  padding: 12px;
}
.weekly-head-day {
  text-align: center;
  display: grid;
  gap: 2px;
}
.weekly-head-day span {
  color: var(--muted);
  font-size: 12px;
}
.weekly-row {
  border-bottom: 1px solid var(--border);
}
.weekly-row:last-child {
  border-bottom: 0;
}
.weekly-name {
  position: sticky;
  left: 0;
  z-index: 1;
  background: #020617;
  border-right: 1px solid var(--border);
  /*
  original padding = 12px
  */
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.weekly-name span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.weekly-cell {
  position: relative;
  /* 
  original min-height = 90px
  original padding = 9px  
  */
  min-height: 11px;
  padding: 1px;
  border-right: 1px solid rgba(51, 65, 85, 0.75);
  background: rgba(2, 6, 23, 0.42);
}
.weekly-cell:last-child {
  border-right: 0;
}
.weekly-today {
  box-shadow: inset 0 0 0 2px rgba(147, 197, 253, 0.35);
}
.weekly-event {
  border-radius: 10px;
  padding: 6px 8px;
  margin-bottom: 6px;
  font-size: 12px;
  line-height: 1.25;
  font-weight: 900;
}
.weekly-event.shift {
  background: rgba(37, 99, 235, 0.24);
  color: #bfdbfe;
}
.weekly-event.off {
  background: rgba(217, 119, 6, 0.22);
  color: #fed7aa;
}
.weekly-event.blackout {
  background: rgba(220, 38, 38, 0.24);
  color: #fecaca;
}
.weekly-event.clickable {
  cursor: pointer;
  border: 1px solid rgba(147, 197, 253, 0.35);
}

.weekly-event.draggable {
  user-select: none;
}
.weekly-event.draggable:active {
  cursor: grabbing;
}
.weekly-drop-target {
  outline: 2px dashed #93c5fd;
  outline-offset: -4px;
  background: rgba(37, 99, 235, 0.18) !important;
}

.weekly-event.clickable:hover {
  filter: brightness(1.18);
  transform: translateY(-1px);
}
.weekly-empty {
  color: #64748b;
  font-weight: 900;
}
.weekly-add {
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(37, 99, 235, 0.35);
  color: white;
  font-weight: 900;
  line-height: 1;
}
@media (max-width: 980px) {
  .weekly-header,
  .weekly-row {
    grid-template-columns: 170px repeat(7, minmax(135px, 1fr));
    min-width: 1115px;
  }
}
.shift-color-list {
  display: grid;
  gap: 10px;
}
.shift-color-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.75);
}
.shift-color-row span {
  display: grid;
  gap: 2px;
}
.shift-color-row small {
  color: var(--muted);
  font-weight: 700;
}
.shift-color-row input[type="color"] {
  width: 52px;
  min-width: 52px;
  height: 38px;
  padding: 3px;
  border-radius: 10px;
  cursor: pointer;
}
.cal-event.shift,
.weekly-event.shift {
  border: 1px solid var(--shift-color, rgba(147, 197, 253, 0.35));
}

.day-detail-modal {
  display: grid;
  gap: 12px;
}
.section-subtitle {
  margin: 12px 0 6px;
  font-size: 18px;
}
.day-detail-list {
  display: grid;
  gap: 8px;
}
.day-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid #334155;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.8);
}
.day-detail-row.blackout-row {
  border-color: #92400e;
  background: rgba(120, 53, 15, 0.35);
}
@media (max-width: 700px) {
  .day-detail-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

.pill-draft,
.pill-changed-after-publishing {
  background: rgba(217, 119, 6, 0.18);
  color: #fed7aa;
}
.pill-published {
  background: rgba(22, 163, 74, 0.18);
  color: #bbf7d0;
}
.pill-cancelled {
  background: rgba(220, 38, 38, 0.18);
  color: #fecaca;
}

/* Schedule template tools */
.template-list {
  display: grid;
  gap: 14px;
}
.template-card {
  border: 1px solid #334155;
  border-radius: 18px;
  background: rgba(15, 23, 42, .72);
  padding: 14px;
}
.template-card-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.template-card h3 {
  margin: 0 0 4px;
}
.template-days {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.template-day {
  border: 1px solid #334155;
  background: rgba(30, 41, 59, .85);
  border-radius: 12px;
  padding: 8px 10px;
  font-size: 13px;
}
.template-day.muted {
  opacity: .65;
}
.template-editor {
  display: grid;
  gap: 10px;
}
.template-edit-row {
  display: grid;
  grid-template-columns: 150px 120px 100px 100px 130px minmax(180px, 1fr) minmax(150px, 1fr);
  gap: 8px;
  align-items: end;
  padding: 10px;
  border: 1px solid #334155;
  border-radius: 16px;
  background: rgba(15, 23, 42, .72);
}
.template-check {
  align-self: center;
  margin-bottom: 8px;
}
.template-select-list {
  display: grid;
  gap: 8px;
  border: 1px solid #334155;
  border-radius: 16px;
  padding: 10px;
  background: rgba(15, 23, 42, .72);
  max-height: 260px;
  overflow: auto;
}
@media (max-width: 1100px) {
  .template-edit-row {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 700px) {
  .template-card-header {
    flex-direction: column;
  }
  .template-edit-row {
    grid-template-columns: 1fr;
  }
}

/* v17 notification center */
.notification-list {
  display: grid;
  gap: 10px;
}
.notification-list.compact {
  max-height: 420px;
  overflow: auto;
  padding-right: 4px;
}
.notification-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line, #334155);
  border-radius: 16px;
  background: rgba(15, 23, 42, .72);
}
.notification-item.unread {
  border-color: #2563eb;
  background: rgba(37, 99, 235, .16);
}
.notification-item p {
  margin: 8px 0 0;
  white-space: pre-wrap;
  color: var(--text, #e5e7eb);
}
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line, #334155);
  background: rgba(15, 23, 42, .75);
  color: var(--muted, #94a3b8);
  font-size: 12px;
  font-weight: 700;
}
@media (max-width: 700px) {
  .notification-item {
    flex-direction: column;
  }
}

.smtp-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
  padding: 12px;
  border: 1px solid #334155;
  border-radius: 16px;
  background: rgba(15, 23, 42, .65);
  font-size: 13px;
}
.badge.good {
  background: rgba(22, 163, 74, .18);
  color: #86efac;
  border-color: rgba(34, 197, 94, .35);
}
.badge.warning {
  background: rgba(245, 158, 11, .16);
  color: #fcd34d;
  border-color: rgba(245, 158, 11, .35);
}
.error-text {
  color: #fca5a5;
}

/* Request page filters */
.request-filter-toolbar {
  align-items: end;
}
.inline-filter-label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
}
.inline-filter-label select {
  min-width: 190px;
}


/* Calendar print support */
@media print {
  @page {
    size: landscape;
    margin: 0.35in;
  }

  body.printing-calendar {
    background: #ffffff !important;
    color: #000000 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body.printing-calendar .sidebar,
  body.printing-calendar .topbar,
  body.printing-calendar .calendar-toolbar,
  body.printing-calendar .info-box,
  body.printing-calendar .mini-add,
  body.printing-calendar .weekly-add,
  body.printing-calendar .mini-view,
  body.printing-calendar .view-all-day,
  body.printing-calendar .print-calendar-btn,
  body.printing-calendar .modal-backdrop {
    display: none !important;
  }

  body.printing-calendar .app-shell {
    display: block !important;
    min-height: auto !important;
  }

  body.printing-calendar .main {
    padding: 0 !important;
    max-width: none !important;
    width: 100% !important;
  }

  body.printing-calendar .card {
    background: #ffffff !important;
    color: #000000 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
  }

  body.printing-calendar .calendar-grid,
  body.printing-calendar .weekly-calendar,
  body.printing-calendar .weekly-header,
  body.printing-calendar .weekly-row {
    overflow: visible !important;
  }

  body.printing-calendar .calendar-grid {
    gap: 3px !important;
    grid-template-columns: repeat(7, 1fr) !important;
  }

  body.printing-calendar .cal-head div,
  body.printing-calendar .cal-day,
  body.printing-calendar .weekly-name,
  body.printing-calendar .weekly-header,
  body.printing-calendar .weekly-head-day,
  body.printing-calendar .weekly-cell {
    background: #ffffff !important;
    color: #000000 !important;
    border-color: #000000 !important;
  }

  body.printing-calendar .cal-day {
    height: auto !important;
    min-height: 115px !important;
    border-radius: 0 !important;
    padding: 4px !important;
    overflow: visible !important;
  }

  body.printing-calendar .cal-events-scroll {
    overflow: visible !important;
    max-height: none !important;
  }

  body.printing-calendar .cal-muted {
    opacity: 0.5 !important;
  }

  body.printing-calendar .cal-date,
  body.printing-calendar .item-title,
  body.printing-calendar .card-title {
    color: #000000 !important;
  }

  body.printing-calendar .cal-event,
  body.printing-calendar .weekly-event {
    color: #000000 !important;
    border: 1px solid #475569 !important;
    box-shadow: none !important;
    margin-bottom: 2px !important;
    padding: 3px 4px !important;
    font-size: 10px !important;
    line-height: 1.15 !important;
  }

  body.printing-calendar .cal-event.shift,
  body.printing-calendar .weekly-event.shift {
    background: #dbeafe !important;
  }

  body.printing-calendar .cal-event.off,
  body.printing-calendar .weekly-event.off {
    background: #ffedd5 !important;
  }

  body.printing-calendar .cal-event.blackout,
  body.printing-calendar .weekly-event.blackout {
    background: #fee2e2 !important;
  }

  body.printing-calendar .weekly-calendar {
    border: 1px solid #000000 !important;
    border-radius: 0 !important;
  }

  body.printing-calendar .weekly-header,
  body.printing-calendar .weekly-row {
    grid-template-columns: 145px repeat(7, minmax(90px, 1fr)) !important;
    min-width: 0 !important;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  body.printing-calendar .weekly-name {
    position: static !important;
    padding: 4px !important;
    border-left-width: 4px !important;
  }

  body.printing-calendar .weekly-name span,
  body.printing-calendar .weekly-head-day span,
  body.printing-calendar .subtle,
  body.printing-calendar .small {
    color: #111827 !important;
  }

  body.printing-calendar .weekly-cell {
    min-height: 34px !important;
    padding: 3px !important;
  }
}

/* Schedule page date filters and pagination */
.schedule-filter-toolbar {
  align-items: end;
  grid-template-columns: minmax(220px, 360px) minmax(160px, 1fr) repeat(2, minmax(160px, 220px)) auto;
}

.date-filter-label,
.inline-label {
  display: grid;
  gap: 6px;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 700;
}

.inline-label {
  align-items: center;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  gap: 8px;
}

.inline-label select {
  min-width: 88px;
}

.schedule-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.45);
}

@media (max-width: 1000px) {
  .schedule-filter-toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .schedule-pagination {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .schedule-filter-toolbar {
    grid-template-columns: 1fr;
  }
}

.list-item-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

@media (max-width: 700px) {
  .list-item-header {
    flex-direction: column;
  }
}


/* v41.3 - sidebar only. Original v41 calendar layout remains unchanged. */
.sidebar-toggle {
  border: 1px solid var(--border); border-radius: 10px;
  background: #1e293b; color: #f8fafc;
  font-size: 13px; font-weight: 700; padding: 9px 13px; cursor: pointer;
}
.sidebar-toggle:hover, .sidebar-toggle:focus-visible { background: #334155; }
.sidebar-top { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.sidebar-show-btn { display: none; margin-bottom: 18px; }
.app-shell.sidebar-collapsed .sidebar { display: none; }
.app-shell.sidebar-collapsed .sidebar-show-btn { display: inline-flex; }
@media (min-width: 981px) {
  .app-shell.sidebar-collapsed { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
  /* Preserve the original wide v41 calendar rather than squeezing its columns.
     Horizontal document scroll and native Safari pinch-zoom remain available. */
  .app-shell.sidebar-collapsed .main { min-width: 1180px; }
}
@media print { .sidebar-toggle { display: none !important; } }


/* v50.1: independently scrolling navigation on shorter screens.
   Preserve original calendar and responsive content behavior. */
@media (min-width: 981px) {
  .sidebar {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
  }
  .sidebar-top { flex: 0 0 auto; }
  .sidebar .nav {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    padding-right: 4px;
    padding-bottom: 8px;
  }
  .sidebar .nav button { flex: 0 0 auto; }
  .sidebar-bottom {
    position: static;
    flex: 0 0 auto;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
  }
}
