/* ============================================
   DR. BHUMIKA PATEL'S WOMEN'S HOSPITAL
   Global Styles — all screens
   ============================================ */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #F8F9FA;
  color: #1A1A2E;
  min-height: 100vh;
}

/* ============ PAGE CONTAINER ============ */
.page {
  max-width: 420px;
  margin: 0 auto;
  padding: 16px;
}

.page-wide {
  max-width: 960px;
  margin: 0 auto;
  padding: 16px;
}

/* ============ CLINIC HEADER ============ */
.clinic-header {
  text-align: center;
  padding: 18px 0 14px;
  border-bottom: 1px solid #E2E8F0;
  margin-bottom: 18px;
}

.clinic-name {
  font-size: 17px;
  font-weight: 600;
  color: #1A1A2E;
  line-height: 1.4;
}

.clinic-badge {
  display: inline-block;
  margin-top: 8px;
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 11px;
  background: #E1F5EE;
  color: #0F6E56;
}

.clinic-badge.closed {
  background: #FCEBEB;
  color: #A32D2D;
}

/* ============ TODAY BAR ============ */
.today-bar {
  background: #F1F5F9;
  border-radius: 8px;
  padding: 9px 13px;
  margin-bottom: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.today-label {
  font-size: 13px;
  font-weight: 500;
  color: #1A1A2E;
}

.today-date {
  font-size: 12px;
  color: #64748B;
}

/* ============ FORM ELEMENTS ============ */
.section-label {
  font-size: 11px;
  font-weight: 600;
  color: #64748B;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.field-group {
  margin-bottom: 13px;
}

.field-label {
  font-size: 13px;
  font-weight: 500;
  color: #1A1A2E;
  margin-bottom: 5px;
}

.field-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
  color: #1A1A2E;
  outline: none;
  appearance: none;
  font-family: inherit;
  transition: border-color 0.15s;
}

.field-input:focus {
  border-color: #185FA5;
}

.req {
  color: #E24B4A;
  margin-left: 2px;
}

/* ============ DIVIDERS ============ */
.section-divider {
  border: none;
  border-top: 1px solid #E2E8F0;
  margin: 16px 0;
}

.session-divider {
  border: none;
  border-top: 1px solid #E2E8F0;
  margin: 16px 0;
}

/* ============ SLOT LEGEND ============ */
.legend {
  display: flex;
  gap: 14px;
  margin-bottom: 13px;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #64748B;
}

.legend-dot {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  flex-shrink: 0;
}

.ld-available   { background: #fff; border: 1px solid #CBD5E1; }
.ld-selected    { background: #E6F1FB; border: 1px solid #185FA5; }
.ld-unavailable { background: #ECEEF2; border: 1px solid #B0B7C3; }
.ld-walkin      { background: #FAEEDA; border: 1px solid #BA7517; }

/* ============ SESSION HEADER ============ */
.session-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.session-title {
  font-size: 13px;
  font-weight: 500;
  color: #1A1A2E;
}

.session-count {
  font-size: 11px;
  color: #1D9E75;
}

/* ============ SLOT GRID ============ */
.slots-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
  margin-bottom: 16px;
}

.slot {
  padding: 7px 2px;
  border-radius: 6px;
  text-align: center;
  font-size: 11px;
  line-height: 1.2;
  border: 1px solid transparent;
  transition: all 0.1s;
}

.slot.available {
  background: #fff;
  border-color: #CBD5E1;
  color: #1A1A2E;
  cursor: pointer;
}

.slot.available:hover {
  border-color: #185FA5;
}

.slot.selected {
  background: #E6F1FB;
  border-color: #185FA5;
  color: #185FA5;
  font-weight: 500;
  cursor: pointer;
}

.slot.unavailable {
  background: #ECEEF2;
  border-color: #B0B7C3;
  color: #7A8099;
  cursor: not-allowed;
}

.slot.walkin {
  background: #FAEEDA;
  border-color: #EF9F27;
  color: #854F0B;
  cursor: not-allowed;
}

/* Admin slot colours — high contrast */
.slot.open   { background: #22C55E; border-color: #16A34A; color: #fff; font-weight: 500; }
.slot.closed { background: #EF4444; border-color: #DC2626; color: #fff; font-weight: 500; }
.slot.booked { background: #3B82F6; border-color: #2563EB; color: #fff; cursor: not-allowed; }

/* ============ SELECTED BAR ============ */
.selected-bar {
  background: #E6F1FB;
  border: 1px solid #185FA5;
  border-radius: 8px;
  padding: 9px 13px;
  margin-bottom: 12px;
  font-size: 13px;
  color: #185FA5;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.change {
  font-size: 11px;
  cursor: pointer;
  text-decoration: underline;
}

/* ============ BUTTONS ============ */
.book-btn {
  width: 100%;
  padding: 13px;
  background: #185FA5;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  margin-bottom: 10px;
  transition: background 0.15s;
}

.book-btn:hover { background: #1450847; }
.book-btn:disabled { background: #94A3B8; cursor: not-allowed; }

.btn-secondary {
  width: 100%;
  padding: 11px;
  background: #F1F5F9;
  color: #1A1A2E;
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
}

/* ============ ERROR MESSAGE ============ */
.error-msg {
  background: #FCEBEB;
  border: 1px solid #F09595;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  color: #A32D2D;
  margin-bottom: 12px;
}

/* ============ PRIVACY NOTE ============ */
.privacy-note {
  text-align: center;
  font-size: 11px;
  color: #64748B;
  margin-top: 10px;
  line-height: 1.6;
}

/* ============ TOKEN HERO ============ */
.token-hero {
  border: 1px solid #CBD5E1;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
}

.token-hero-top {
  background: #185FA5;
  padding: 22px 16px 18px;
  text-align: center;
}

.hero-name {
  font-size: 13px;
  color: rgba(255,255,255,0.8);
  margin-bottom: 4px;
}

.hero-token-label {
  font-size: 11px;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.hero-token {
  font-size: 56px;
  font-weight: 600;
  color: #fff;
  line-height: 1;
}

.hero-status-pill {
  display: inline-block;
  margin-top: 10px;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  background: rgba(255,255,255,0.2);
  color: #fff;
}

.token-hero-bottom {
  padding: 0;
  background: #fff;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
}

.stat-cell {
  padding: 14px 8px;
  text-align: center;
  border-right: 1px solid #E2E8F0;
}

.stat-cell:last-child { border-right: none; }

.stat-label {
  font-size: 11px;
  color: #64748B;
  margin-bottom: 5px;
  line-height: 1.3;
}

.stat-value {
  font-size: 20px;
  font-weight: 500;
}

.stat-unit {
  font-size: 11px;
  color: #64748B;
  margin-top: 2px;
}

.stat-value.warn { color: #BA7517; }
.stat-value.blue { color: #185FA5; }
.stat-value.good { color: #1D9E75; }

/* ============ LIVE BAR ============ */
.live-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.live-dot-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #1D9E75;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #1D9E75;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.last-updated {
  font-size: 11px;
  color: #64748B;
}

/* ============ DELAY NOTICE ============ */
.delay-notice {
  background: #FAEEDA;
  border: 1px solid #EF9F27;
  border-radius: 10px;
  padding: 13px 14px;
  margin-bottom: 16px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.delay-icon {
  font-size: 15px;
  flex-shrink: 0;
  margin-top: 1px;
}

.delay-text {
  font-size: 13px;
  color: #633806;
  line-height: 1.6;
}

/* ============ CONFIRMATION PAGE ============ */
.success-icon {
  text-align: center;
  margin-bottom: 12px;
}

.check-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #E1F5EE;
  border: 2px solid #1D9E75;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.success-title {
  text-align: center;
  font-size: 18px;
  font-weight: 500;
  color: #1A1A2E;
  margin-bottom: 4px;
}

.success-sub {
  text-align: center;
  font-size: 13px;
  color: #64748B;
  margin-bottom: 24px;
}

.token-card {
  border: 1px solid #CBD5E1;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
}

.token-top {
  background: #185FA5;
  padding: 16px;
  text-align: center;
}

.token-label {
  font-size: 11px;
  color: rgba(255,255,255,0.75);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.token-number {
  font-size: 52px;
  font-weight: 600;
  color: #fff;
  line-height: 1;
}

.token-bottom {
  padding: 14px 16px;
  background: #fff;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid #E2E8F0;
  font-size: 13px;
}

.detail-row:last-child { border-bottom: none; }
.detail-label { color: #64748B; }
.detail-value { font-weight: 500; color: #1A1A2E; text-align: right; }

.link-box {
  border: 1px solid #CBD5E1;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 16px;
}

.link-label {
  font-size: 11px;
  font-weight: 600;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.link-desc {
  font-size: 12px;
  color: #64748B;
  margin-bottom: 12px;
  line-height: 1.5;
}

.link-url {
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  border-radius: 7px;
  padding: 9px 12px;
  font-size: 12px;
  color: #185FA5;
  word-break: break-all;
  margin-bottom: 10px;
  font-family: monospace;
}

.btn-row {
  display: flex;
  gap: 8px;
}

.btn-primary {
  flex: 1;
  padding: 10px;
  background: #185FA5;
  color: #fff;
  border: none;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
}

.btn-copy {
  flex: 1;
  padding: 10px;
  background: #F1F5F9;
  color: #1A1A2E;
  border: 1px solid #CBD5E1;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
}

.info-box {
  background: #F1F5F9;
  border-radius: 10px;
  padding: 13px 14px;
  margin-bottom: 16px;
}

.info-row {
  display: flex;
  gap: 10px;
  font-size: 12px;
  color: #64748B;
  margin-bottom: 8px;
  align-items: flex-start;
  line-height: 1.5;
}

.info-row:last-child { margin-bottom: 0; }

.highlight-row {
  background: #FAEEDA;
  border: 1px solid #EF9F27;
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  gap: 10px;
  font-size: 12px;
  color: #633806;
  margin-bottom: 8px;
  align-items: flex-start;
  line-height: 1.5;
}

/* ============ THANK YOU PAGE ============ */
.thankyou-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  text-align: center;
}

.thankyou-check {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #E1F5EE;
  border: 2px solid #1D9E75;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.thankyou-title {
  font-size: 22px;
  font-weight: 500;
  color: #1A1A2E;
  margin-bottom: 10px;
}

.thankyou-sub {
  font-size: 15px;
  color: #64748B;
  margin-bottom: 40px;
}

.thankyou-footer {
  font-size: 11px;
  color: #94A3B8;
  line-height: 1.7;
}

/* ============ REASON PILLS ============ */
.pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 500;
}

.pill-new    { background: #E6F1FB; color: #185FA5; }
.pill-follow { background: #E1F5EE; color: #0F6E56; }
.pill-follic { background: #EEEDFE; color: #534AB7; }

/* ============ STATUS BADGES ============ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 500;
}

.badge-current  { background: rgba(29,158,117,0.15); color: #0F6E56; }
.badge-arrived  { background: #E6F1FB; color: #185FA5; }
.badge-waiting  { background: #F1F5F9; color: #64748B; }
.badge-late     { background: #FAEEDA; color: #854F0B; }
.badge-done     { background: #F1F5F9; color: #94A3B8; }

/* ============ BOTTOM NOTE ============ */
.bottom-note {
  text-align: center;
  font-size: 11px;
  color: #64748B;
  line-height: 1.7;
  padding-top: 12px;
  border-top: 1px solid #E2E8F0;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 480px) {
  .slots-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .token-hero-bottom {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

@media (min-width: 768px) {
  .slots-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}