.sp-public-schedule-page {
  --schedule-text: #172033;
  --schedule-muted: #64748b;
  --schedule-border: #dbe3ee;
  --schedule-bg: #f7fafc;
  --schedule-surface: #ffffff;
  --schedule-green: #0f9f6e;
  --schedule-red: #dc2626;
  --schedule-amber: #b7791f;
  --schedule-gray: #64748b;

  min-height: 100vh;
  background: var(--schedule-bg);
  color: var(--schedule-text);
  padding-bottom: 48px;
}

.sp-schedule-container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.sp-schedule-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 20px 0;
  font-size: 14px;
}

.sp-schedule-breadcrumb a {
  color: var(--schedule-muted);
  text-decoration: none;
  font-weight: 600;
}

.sp-schedule-breadcrumb a:hover {
  color: var(--schedule-green);
}

.sp-schedule-hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: stretch;
  padding: 24px;
  border: 1px solid var(--schedule-border);
  border-radius: 8px;
  background: var(--schedule-surface);
}

.sp-eyebrow {
  margin: 0 0 8px;
  color: var(--schedule-green);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.sp-schedule-hero h1 {
  margin: 0;
  font-size: 32px;
  line-height: 1.2;
  font-weight: 800;
}

.sp-muted {
  max-width: 700px;
  margin: 10px 0 0;
  color: var(--schedule-muted);
  line-height: 1.6;
}

.sp-schedule-summary {
  min-width: 180px;
  display: grid;
  place-items: center;
  text-align: center;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  background: #f0fdf4;
  padding: 16px;
}

.sp-schedule-summary span,
.sp-schedule-summary small {
  color: #166534;
  font-weight: 700;
}

.sp-schedule-summary strong {
  font-size: 34px;
  line-height: 1.1;
  color: #14532d;
}

.sp-filter-band {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--schedule-border);
  border-radius: 8px;
  background: var(--schedule-surface);
}

.sp-date-form {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.sp-date-form label {
  font-weight: 800;
}

.sp-date-form input {
  min-height: 40px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0 12px;
  font-family: inherit;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.sp-date-form input:focus {
  outline: none;
  border-color: var(--schedule-green);
  box-shadow: 0 0 0 3px rgba(15, 159, 110, 0.2);
}

.sp-date-form button,
.sp-refresh-action,
.sp-policy-action,
.sp-book-action {
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  background: var(--schedule-green);
  color: #ffffff;
  font-weight: 800;
  padding: 0 16px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.sp-date-form button:hover,
.sp-refresh-action:hover,
.sp-policy-action:hover,
.sp-book-action:hover {
  background: #0b825a;
  color: #ffffff;
}

.sp-book-action.is-disabled {
  background: #e2e8f0;
  color: #64748b;
  cursor: not-allowed;
}

.sp-refresh-action {
  background: #2563eb;
}

.sp-refresh-action:hover {
  background: #1d4ed8;
}

.sp-policy-action {
  background: #0f766e;
}

.sp-policy-action:hover {
  background: #0d5f59;
}

.sp-legend {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--schedule-muted);
  font-weight: 700;
}

.sp-legend span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.sp-legend i {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: inline-block;
}

.sp-legend .available { background: #22c55e; }
.sp-legend .booked { background: #ef4444; }
.sp-legend .maintenance { background: #f59e0b; }
.sp-legend .past { background: #94a3b8; }

.sp-message-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.sp-message {
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1e40af;
  border-radius: 8px;
  padding: 12px 14px;
  font-weight: 700;
}

.sp-message.is-warning {
  border-color: #facc15;
  background: #fffbeb;
  color: #92400e;
}

.sp-sync-note {
  margin: 10px 0 0;
  color: var(--schedule-muted);
  font-size: 13px;
  font-weight: 600;
}

.sp-slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.sp-slot-card {
  border: 1px solid var(--schedule-border);
  border-left: 5px solid var(--schedule-gray);
  border-radius: 12px;
  background: var(--schedule-surface);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 245px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.sp-slot-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.sp-slot-card.is-available { 
  border-left-color: var(--schedule-green); 
  border-color: #bbf7d0;
  background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
}

.sp-slot-card.is-available:hover {
  border-color: var(--schedule-green);
  box-shadow: 0 10px 20px -5px rgba(16, 185, 129, 0.15);
}

.sp-slot-card.is-booked { 
  border-left-color: #94a3b8; 
  border-color: #e2e8f0;
  background: repeating-linear-gradient(45deg, #f8fafc, #f8fafc 10px, #f1f5f9 10px, #f1f5f9 20px);
  opacity: 0.85;
}

.sp-slot-card.is-booked .sp-book-action {
  background: #cbd5e1;
  color: #64748b;
  cursor: not-allowed;
}

.sp-slot-card.is-maintenance { 
  border-left-color: var(--schedule-amber); 
  border-color: #fde68a;
  background: linear-gradient(135deg, #ffffff 0%, #fffbeb 100%);
}

.sp-slot-card.is-maintenance:hover {
  border-color: var(--schedule-amber);
  box-shadow: 0 10px 20px -5px rgba(245, 158, 11, 0.15);
}

.sp-slot-card.is-past,
.sp-slot-card.is-unavailable { 
  border-left-color: #cbd5e1;
  border-color: #e2e8f0;
  background: #f8fafc;
  opacity: 0.65;
}

.sp-slot-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.sp-slot-name {
  margin: 0 0 4px;
  color: var(--schedule-muted);
  font-weight: 700;
  font-size: 13px;
}

.sp-slot-card h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 800;
}

.sp-status-pill {
  white-space: nowrap;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
  background: #e2e8f0;
  color: var(--schedule-gray);
}

.is-available .sp-status-pill {
  background: #dcfce7;
  color: #166534;
}

.is-booked .sp-status-pill {
  background: #fee2e2;
  color: #991b1b;
}

.is-maintenance .sp-status-pill {
  background: #fef3c7;
  color: #92400e;
}

.sp-slot-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.sp-slot-meta div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  border-top: 1px solid #eef2f7;
  padding-top: 8px;
}

.sp-slot-meta span {
  color: var(--schedule-muted);
  font-size: 13px;
}

.sp-slot-meta strong {
  text-align: right;
  font-size: 14px;
}

.sp-slot-note {
  margin: 0;
  color: var(--schedule-muted);
  line-height: 1.5;
  font-size: 14px;
  flex: 1;
}

.sp-empty-state {
  margin-top: 16px;
  padding: 28px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: var(--schedule-surface);
  text-align: center;
}

.sp-empty-state h2 {
  margin: 0 0 8px;
}

.sp-empty-state p {
  margin: 0;
  color: var(--schedule-muted);
}

@media (max-width: 760px) {
  .sp-schedule-hero,
  .sp-filter-band {
    flex-direction: column;
    align-items: stretch;
  }

  .sp-schedule-hero h1 {
    font-size: 26px;
  }

  .sp-schedule-summary {
    min-width: 0;
  }
}

/* ==========================================
   BATCH 6: MOBILE PUBLIC SCHEDULE POLISH
   ========================================== */
@media (max-width: 480px) {
  .sp-schedule-container {
    width: 100% !important;
    padding: 0 10px !important;
  }
  
  .sp-schedule-hero {
    padding: 16px !important;
  }
  
  .sp-schedule-hero h1 {
    font-size: 20px !important;
  }

  .sp-filter-band {
    padding: 12px !important;
  }

  .sp-legend {
    gap: 8px !important;
  }

  .sp-legend span {
    font-size: 11px !important;
  }

  .sp-slot-card {
    padding: 14px !important;
    min-height: auto !important;
  }
}

