* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 50%, #d1fae5 100%);
  color: #1b1f23;
  overflow-x: hidden;
  max-width: 100vw;
  min-height: 100vh;
}

html {
  max-width: 100vw;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: #22c55e #e2e8f0;
}

html::-webkit-scrollbar {
  width: 12px;
}

html::-webkit-scrollbar-track {
  background: linear-gradient(180deg, #f0fdf4 0%, #ecfdf5 50%, #dcfce7 100%);
  border-radius: 0;
}

html::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #22c55e 0%, #15803d 100%);
  border-radius: 999px;
  border: 2px solid rgba(240, 253, 244, 0.8);
  min-height: 48px;
}

html::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #16a34a 0%, #166534 100%);
}

html::-webkit-scrollbar-thumb:active {
  background: linear-gradient(180deg, #15803d 0%, #14532d 100%);
  border-width: 2px;
}

html::-webkit-scrollbar-corner {
  background: #f0fdf4;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
  border-bottom: 2px solid rgba(22, 101, 52, 0.15);
  box-shadow: 0 4px 20px rgba(22, 101, 52, 0.1);
  gap: 24px;
  position: relative;
  overflow: hidden;
}

.topbar::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #15803d, #22c55e);
  opacity: 0.9;
}

.header-logo {
  height: 60px;
  width: auto;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.06));
}

.header-title-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.header-title-wrap h1 {
  margin: 0;
  font-size: clamp(1.25rem, 2.5vw, 1.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: #166534;
}

.header-title-wrap .title-app {
  margin: 0;
  font-size: clamp(0.875rem, 1.8vw, 1rem);
  font-weight: 600;
  color: #334155;
  letter-spacing: 0.02em;
}

.subtitle {
  margin: 0;
  color: #5b6772;
  font-size: 13px;
}

.summary {
  text-align: right;
  padding: 14px 20px;
  border-radius: 12px;
  background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
  border: 1px solid rgba(22, 101, 52, 0.2);
  min-width: 130px;
  box-shadow: 0 2px 8px rgba(22, 101, 52, 0.08);
}

.summary-label {
  font-size: 11px;
  font-weight: 600;
  color: #166534;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.summary-value {
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
  margin-top: 2px;
}

.app-footer {
  text-align: center;
  padding: 28px 32px;
  margin-top: 40px;
  border-top: 2px solid rgba(22, 101, 52, 0.12);
  background: linear-gradient(180deg, #ffffff 0%, #f0fdf4 100%);
  color: #15803d;
  font-size: 13px;
  box-shadow: 0 -4px 20px rgba(22, 101, 52, 0.04);
}

.app-footer p {
  margin: 4px 0;
}

.app-footer .year {
  font-size: 12px;
  color: #22c55e;
  margin-top: 8px;
}

.loading-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(21, 128, 61, 0.15);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
}

.loading-overlay.is-visible {
  display: flex;
}

.loading-overlay-content {
  background: #fff;
  padding: 32px 40px;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(22, 101, 52, 0.2);
  border: 1px solid rgba(22, 101, 52, 0.2);
  text-align: center;
  min-width: 280px;
}

.loading-graphic {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 20px;
}

.loading-progress-track {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 5px solid rgba(22, 101, 52, 0.2);
}

.loading-progress-bar {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    #15803d 0deg 100deg,
    transparent 100deg 360deg
  );
  mask: radial-gradient(
    circle,
    transparent 42%,
    black 42%
  );
  -webkit-mask: radial-gradient(
    circle,
    transparent 42%,
    black 42%
  );
  animation: loading-progress-spin 1.2s linear infinite;
}

.loading-logo-wrap {
  position: absolute;
  inset: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(22, 101, 52, 0.1);
}

.loading-logo {
  width: 48px;
  height: auto;
  animation: loading-logo-pulse 1.2s ease-in-out infinite;
}

@keyframes loading-progress-spin {
  to { transform: rotate(360deg); }
}

@keyframes loading-logo-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(1.05); }
}

.loading-text {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 600;
  color: #166534;
}

.loading-subtext {
  margin: 0;
  font-size: 13px;
  color: #64748b;
}

main {
  padding: 28px 40px 56px;
  display: grid;
  gap: 20px;
  max-width: 1600px;
  margin: 0 auto;
  width: min(1600px, 100%);
  overflow-x: hidden;
}

.is-hidden {
  display: none !important;
}

#currentView,
#projectionsView {
  display: grid;
  gap: 16px;
  min-width: 0;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}

.card {
  background: #ffffff;
  border: 1px solid rgba(22, 101, 52, 0.15);
  border-radius: 16px;
  padding: 22px 24px;
  box-shadow: 0 4px 20px rgba(22, 101, 52, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
  box-shadow: 0 8px 30px rgba(22, 101, 52, 0.1), 0 2px 6px rgba(0, 0, 0, 0.05);
}

.card-title {
  font-weight: 600;
  margin-bottom: 16px;
  font-size: 15px;
  color: #1e293b;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
  width: 100%;
  position: relative;
  padding-left: 18px;
  letter-spacing: -0.01em;
}

.card-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 20px;
  border-radius: 999px;
  background: linear-gradient(180deg, #15803d, #22c55e);
  box-shadow: 0 0 8px rgba(22, 197, 94, 0.3);
}

.controls {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.controls .hint {
  grid-column: 1 / -1;
}

.thresholds-unlock-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.thresholds-unlock-inline .thresholds-unlock-row {
  margin: 0;
}

.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  align-items: end;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
}

.filters > * {
  min-width: 0;
  max-width: 100%;
}

.checkbox-group {
  display: grid;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid #cfd6dd;
  border-radius: 10px;
  background: #f8fafc;
  font-size: 12px;
  color: #4a5560;
}

.checkbox-title {
  font-weight: 600;
  color: #39414a;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
}

.holiday-panel {
  display: grid;
  gap: 6px;
}

.checkbox-group.collapsed .holiday-panel {
  display: none;
}

.holiday-detail-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 12px;
  color: #4a5560;
}

.holiday-detail-header .toggle-button {
  padding: 2px 6px;
}

.holiday-detail-list {
  margin-top: 6px;
  padding-left: 4px;
  border-left: 2px solid #e5e7eb;
  display: grid;
  gap: 8px;
}

.holiday-detail-list.collapsed {
  display: none;
}

.holiday-detail-group {
  display: grid;
  gap: 4px;
}

.holiday-detail-group-title {
  font-weight: 600;
  font-size: 11px;
  color: #6b7680;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 2px;
}

.holiday-detail-checkbox {
  margin-left: 0;
}

label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: #4a5560;
  min-width: 0;
}

select,
input[type="date"],
input[type="number"],
input[type="text"] {
  padding: 9px 12px;
  border: 1px solid rgba(22, 101, 52, 0.2);
  border-radius: 10px;
  font-size: 13px;
  background: #fff;
  width: 100%;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  min-width: 0;
  max-width: 100%;
  display: block;
}

select:focus,
input[type="date"]:focus,
input[type="number"]:focus,
input[type="text"]:focus {
  outline: none;
  border-color: #15803d;
  box-shadow: 0 0 0 3px rgba(22, 101, 52, 0.15);
}

button {
  padding: 10px 18px;
  border: none;
  background: linear-gradient(135deg, #15803d 0%, #16a34a 100%);
  color: #fff;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(22, 101, 52, 0.3);
  transition: all 0.2s ease;
}

button:hover {
  box-shadow: 0 6px 20px rgba(22, 101, 52, 0.35);
  transform: translateY(-1px);
}

button.ghost {
  background: #ffffff;
  color: #15803d;
  border: 1px solid #86efac;
  box-shadow: none;
}

button.ghost:hover {
  background: #f0fdf4;
  box-shadow: 0 2px 8px rgba(22, 101, 52, 0.1);
}

.tab-bar {
  display: inline-flex;
  gap: 6px;
  background: rgba(22, 101, 52, 0.08);
  padding: 6px;
  border-radius: 12px;
  border: 1px solid rgba(22, 101, 52, 0.1);
}

.tab-button {
  border: none;
  background: transparent;
  color: #64748b;
  padding: 8px 18px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  box-shadow: none;
  transition: all 0.2s ease;
}

.tab-button:hover {
  color: #15803d;
  background: rgba(255, 255, 255, 0.6);
}

.tab-button.is-active {
  background: #ffffff;
  color: #15803d;
  box-shadow: 0 2px 8px rgba(22, 101, 52, 0.15);
}

.projection-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  align-items: end;
}

.projection-locations {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.projection-title {
  font-weight: 600;
  color: #39414a;
  font-size: 12px;
}

.projection-rate-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 160px auto auto;
  gap: 12px;
  align-items: center;
}

.projection-rate-row input:disabled {
  cursor: not-allowed;
  background: #f1f5f9;
  color: #64748b;
}

.projection-rate-suffix {
  color: #6b7680;
  font-size: 14px;
}

.projection-rate-reset {
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  box-shadow: none;
}

button.projection-rate-reset:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.projection-source-tooltip {
  position: fixed;
  z-index: 10000;
  padding: 10px 14px;
  background: #1e293b;
  color: #f1f5f9;
  font-size: 12px;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  pointer-events: none;
  max-width: 220px;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.projection-source-tooltip.is-visible {
  opacity: 1;
}

.projection-source-tooltip .tooltip-title {
  font-weight: 600;
  color: #94a3b8;
  margin-bottom: 6px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.projection-source-tooltip .tooltip-row {
  margin-bottom: 2px;
}

.projection-source-tooltip .tooltip-row:last-child {
  margin-bottom: 0;
}

.projection-holiday {
  font-size: 12px;
  color: #6b7680;
}

.projection-holiday table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.projection-holiday th,
.projection-holiday td {
  border: 1px solid #e2e6ea;
  padding: 6px 8px;
  text-align: left;
}

.projection-holiday th {
  background: #f8fafc;
}

.toggle-button {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
}

.card.collapsed .collapsible-panel {
  display: none;
}

#fileDropZone.is-dragover {
  border-color: #15803d;
  background: rgba(34, 197, 94, 0.06);
  box-shadow: 0 0 0 2px rgba(22, 101, 52, 0.2);
}

.file-input input {
  display: none;
}

.file-input span {
  display: inline-block;
  padding: 10px 18px;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: #ffffff;
  background: linear-gradient(135deg, #15803d 0%, #16a34a 100%);
  box-shadow: 0 4px 14px rgba(22, 101, 52, 0.3);
  transition: all 0.2s ease;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease, filter 0.15s ease;
}

.file-input span:hover {
  filter: brightness(0.96);
  transform: translateY(-1px);
}

.file-name {
  font-size: 12px;
  color: #6b7680;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hint {
  font-size: 12px;
  color: #6b7680;
}

.legend {
  display: grid;
  gap: 8px;
}

.thresholds {
  display: grid;
  gap: 16px;
}

.thresholds-unlock {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.thresholds-unlock-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.thresholds-unlock-row.is-hidden {
  display: none;
}

.thresholds-lock-status {
  font-size: 13px;
  color: #6b7680;
}

.thresholds-password-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.thresholds-password-label {
  font-size: 12px;
  color: #6b7680;
}

.thresholds-password-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.thresholds-password-input-row input {
  width: 120px;
  padding: 6px 10px;
  font-size: 13px;
}

.thresholds-pct {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.thresholds-pct.is-hidden {
  display: none;
}

.thresholds-pct label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: #6b7680;
}

.thresholds-pct input {
  width: 70px;
  padding: 6px 8px;
  font-size: 13px;
}

.thresholds-meta {
  font-size: 12px;
  color: #6b7680;
}

.threshold-group {
  border: 1px solid #e2e6ea;
  border-radius: 12px;
  padding: 12px;
  background: #f8fafc;
  display: grid;
  gap: 10px;
}

.threshold-title {
  font-weight: 600;
  color: #39414a;
  font-size: 13px;
}

.threshold-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.threshold-controls input {
  direction: ltr;
  text-align: left;
}

.threshold-controls input:disabled {
  cursor: not-allowed;
  background: #f1f5f9;
  color: #64748b;
}

.threshold-error {
  font-size: 12px;
  color: #dc2626;
  min-height: 16px;
}

.legend-item {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
}

.tier-double-ok,
.tier-single-ok {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.tier-double-yellow,
.tier-single-yellow {
  background: #fef08a;
  border: 1px solid #eab308;
}

.tier-double-orange,
.tier-single-orange {
  background: #fdba74;
  border: 1px solid #ea580c;
}

.tier-single {
  background: #fef08a;
  border: 1px solid #eab308;
}

.tier-none {
  background: #f87171;
  border: 1px solid #b91c1c;
}

.table-wrap {
  overflow: auto;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  max-width: 100%;
  max-height: 90vh;
  min-height: 690px;
  width: 100%;
  display: block;
  scrollbar-width: thin;
  scrollbar-color: #86efac transparent;
  contain: layout;
}

.table-scrollbar {
  overflow-x: auto;
  overflow-y: hidden;
  height: 12px;
  border-radius: 999px;
  background: #dcfce7;
  margin-bottom: 8px;
  display: none !important;
  width: 100%;
  max-width: 100%;
  contain: layout;
}

.table-scrollbar-inner {
  height: 1px;
  width: 0;
}

.table-scrollbar::-webkit-scrollbar {
  height: 10px;
}

.table-scrollbar::-webkit-scrollbar-thumb {
  background: #86efac;
  border-radius: 999px;
}

.table-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}

.table-wrap::-webkit-scrollbar {
  height: 10px;
  width: 10px;
}

.table-wrap::-webkit-scrollbar-thumb {
  background: #86efac;
  border-radius: 999px;
}

.table-wrap::-webkit-scrollbar-track {
  background: transparent;
}

table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

thead th {
  position: sticky;
  top: 0;
  background: #f0fdf4;
  text-align: center;
  padding: 6px 8px;
  border-bottom: 1px solid #e2e6ea;
  border-right: 1px solid #eef1f4;
  white-space: nowrap;
}

.date-clickable {
  cursor: pointer;
}

.holiday-header {
  background: #dcfce7;
  position: sticky;
}

.holiday-header::after {
  content: "";
  display: block;
  width: 18px;
  height: 3px;
  background: #15803d;
  border-radius: 999px;
  margin-top: 4px;
}

tbody td {
  padding: 6px 8px;
  border-bottom: 1px solid #eef1f4;
  border-right: 1px solid #eef1f4;
  white-space: nowrap;
  text-align: center;
}

thead th:first-child,
tbody td:first-child {
  position: sticky;
  left: 0;
  background: #f0fdf4;
  z-index: 2;
  text-align: left;
}

tbody td:first-child {
  font-weight: 600;
}

.date-header {
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.date-header:hover {
  box-shadow: inset 0 0 0 2px rgba(22, 101, 52, 0.3);
}

/* Warning bands: white (<90%), yellow (90-95%), orange (95-100%) */
.cell-single-ok,
.cell-double-ok {
  background: #f8fafc;
}

.cell-single-yellow,
.cell-double-yellow {
  background: #fef08a;
}

.cell-single-orange,
.cell-double-orange {
  background: #fdba74;
}

.cell-none {
  background: #f87171;
}

.cell-unknown {
  background: #f3f4f6;
  color: #6b7280;
}

.cell-na {
  background: #fef2f2;
  color: #b91c1c;
  font-weight: 700;
}

/* Thick vertical border when month changes */
th.month-boundary,
tbody td.month-boundary {
  border-left: 3px solid #166534;
}

/* Month labels above date headers */
th.month-label {
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #334155;
  background: #e2e8f0;
  border-bottom: 1px solid #cbd5e1;
  border-right: 1px solid #eef1f4;
  padding: 4px 8px;
}

th.month-label-clickable {
  cursor: pointer;
}

th.month-label-clickable:hover {
  background: #cbd5e1;
}

.na-summary {
  display: grid;
  gap: 8px;
}

.na-summary-count {
  font-size: 12px;
  color: #39414a;
  font-weight: 600;
}

.na-summary-list {
  font-size: 12px;
  color: #6b7680;
  max-height: 200px;
  overflow-y: auto;
}

.na-summary-list ul {
  margin: 0;
  padding-left: 16px;
}

.table-meta {
  font-size: 12px;
  color: #6b7680;
  margin-bottom: 8px;
}

.closure-schedule-toggles {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.closure-toggle-btn {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid rgba(22, 101, 52, 0.3);
  background: #fff;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
}

.closure-toggle-btn:hover {
  border-color: rgba(22, 101, 52, 0.5);
  background: rgba(240, 253, 244, 0.5);
}

.closure-toggle-btn.is-active {
  background: #15803d;
  border-color: #15803d;
  color: #fff;
}

.closure-schedule-meta {
  font-size: 12px;
  color: #6b7680;
  margin-bottom: 4px;
}

.closure-schedule-hint {
  font-size: 12px;
  color: #475569;
  margin-bottom: 8px;
  line-height: 1.5;
}

.closure-schedule-layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.closure-schedule-tables {
  display: flex;
  gap: 20px;
  flex: 1;
  min-width: 0;
}

.closure-schedule-wrap {
  flex: 1;
  min-width: 280px;
  overflow-x: auto;
  border: 1px solid rgba(22, 101, 52, 0.15);
  border-radius: 10px;
  background: #fff;
}

.closure-schedule-table-title {
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #166534;
  padding: 8px 10px;
  background: #dcfce7;
  border-bottom: 1px solid rgba(22, 101, 52, 0.15);
  border-radius: 10px 10px 0 0;
}

.closure-schedule-legend {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.5;
  margin-bottom: 12px;
}

.closure-schedule-legend-title {
  font-weight: 700;
  font-size: 13px;
  color: #334155;
  flex-shrink: 0;
}

.closure-schedule-colorbar {
  flex: 1;
  min-width: 180px;
  max-width: 420px;
}

.closure-schedule-colorbar-strip {
  position: relative;
  height: 18px;
  border-radius: 6px;
  background-color: #f8fafc;
}

.closure-schedule-colorbar-hover-wrap {
  position: absolute;
  inset: 0;
  border-radius: 6px;
}

.closure-schedule-colorbar-hover {
  position: absolute;
  top: 0;
  bottom: 0;
  cursor: default;
}

.closure-schedule-colorbar-extra {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 500;
  color: #475569;
}

.closure-schedule-legend-swatch {
  width: 16px;
  height: 14px;
  border-radius: 3px;
  flex-shrink: 0;
  border: 1px solid rgba(0,0,0,0.08);
  display: inline-block;
  vertical-align: middle;
}

.closure-schedule-legend-any {
  background: #e2e8f0;
}

.closure-schedule-legend-nodata {
  background: #cbd5e1;
}

.closure-schedule-wrap table {
  font-size: 12px;
  table-layout: fixed;
  width: 100%;
}

.closure-schedule-wrap th:first-child,
.closure-schedule-wrap td:first-child {
  width: 92px;
  white-space: nowrap;
}

.closure-schedule-wrap thead th {
  background: #f0fdf4;
  padding: 10px 14px;
}

.closure-schedule-wrap tbody td {
  padding: 8px 14px;
}

.closure-section-header {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #dcfce7 !important;
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #166534;
  padding: 10px 12px !important;
  min-width: 0;
}

.closure-day-label {
  font-weight: 600;
  color: #334155;
  min-width: 0;
}

.closure-cell-no-data {
  background: #cbd5e1;
}

.closure-cell-any {
  background: #e2e8f0;
  color: #64748b;
}

@media (max-width: 720px) {
  .controls {
    grid-template-columns: 1fr;
  }

  .closure-schedule-layout {
    flex-direction: column;
  }

  .closure-schedule-tables {
    flex-direction: column;
  }
}
