/* ═══════════════════════════════════════════════════════
   Yatoon Customer Portal Styles
   ═══════════════════════════════════════════════════════ */

:root {
  --portal-primary:   #ec4899;
  --portal-radius:    14px;
  --portal-shadow:    0 4px 24px rgba(0,0,0,.10);
  --portal-border:    #f0e6ee;
  --portal-bg:        #fff;
  --portal-muted:     #6b7280;
  --portal-success:   #10b981;
  --portal-danger:    #ef4444;
  --portal-upcoming:  #fdf4ff;
  --portal-past:      #f9fafb;
}

/* Wrap */
.sbs-portal-wrap {
  max-width: 680px;
  margin: 0 auto;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #1a1a1a;
}

/* ── Spinner ─────────────────────────────────────────── */
.sbs-portal-loading {
  display: flex;
  justify-content: center;
  padding: 48px 0;
}
.sbs-portal-spinner {
  width: 36px; height: 36px;
  border: 3px solid #f3e8f0;
  border-top-color: var(--portal-primary);
  border-radius: 50%;
  animation: sbs-spin .7s linear infinite;
  display: inline-block;
}
@keyframes sbs-spin { to { transform: rotate(360deg); } }

/* ── Card ────────────────────────────────────────────── */
.sbs-portal-card {
  background: var(--portal-bg);
  border: 1px solid var(--portal-border);
  border-radius: var(--portal-radius);
  box-shadow: var(--portal-shadow);
  padding: 32px 28px;
  margin-bottom: 20px;
}

/* ── Login form ──────────────────────────────────────── */
.sbs-portal-login-icon {
  font-size: 48px;
  text-align: center;
  margin-bottom: 10px;
}
.sbs-portal-login h2 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 700;
  text-align: center;
}
.sbs-portal-login p.subtitle {
  color: var(--portal-muted);
  text-align: center;
  margin: 0 0 24px;
  font-size: 14px;
}
.sbs-portal-input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  font-size: 16px;
  box-sizing: border-box;
  margin-bottom: 12px;
  transition: border-color .2s;
  outline: none;
}
.sbs-portal-input:focus {
  border-color: var(--portal-primary);
  box-shadow: 0 0 0 3px rgba(236,72,153,.12);
}
.sbs-portal-btn {
  width: 100%;
  padding: 13px;
  background: var(--portal-primary);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .2s, transform .1s;
}
.sbs-portal-btn:hover  { opacity: .9; }
.sbs-portal-btn:active { transform: scale(.98); }
.sbs-portal-btn:disabled { opacity: .55; cursor: default; }

.sbs-portal-btn-sm {
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: opacity .2s;
}
.sbs-portal-btn-sm:hover { opacity: .85; }

.sbs-portal-btn-outline {
  background: transparent;
  border: 1.5px solid var(--portal-primary);
  color: var(--portal-primary);
}

.sbs-portal-msg {
  text-align: center;
  font-size: 13px;
  margin-top: 10px;
  min-height: 18px;
}
.sbs-portal-msg.success { color: var(--portal-success); }
.sbs-portal-msg.error   { color: var(--portal-danger); }

.sbs-portal-link {
  background: none;
  border: none;
  color: var(--portal-primary);
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

/* ── Header bar ──────────────────────────────────────── */
.sbs-portal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--portal-border);
  flex-wrap: wrap;
  gap: 10px;
}
.sbs-portal-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
}
.sbs-portal-header .greeting {
  color: var(--portal-muted);
  font-size: 13px;
}

/* ── Stats strip ─────────────────────────────────────── */
.sbs-portal-stats {
  display: flex;
  gap: 12px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.sbs-portal-stat {
  flex: 1;
  min-width: 120px;
  background: linear-gradient(135deg, #fdf4ff, #fff0fa);
  border: 1px solid #f3d6ef;
  border-radius: 12px;
  padding: 14px 16px;
  text-align: center;
}
.sbs-portal-stat .value {
  font-size: 22px;
  font-weight: 800;
  color: var(--portal-primary);
  line-height: 1.2;
}
.sbs-portal-stat .label {
  font-size: 11px;
  color: var(--portal-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-top: 2px;
}

.sbs-portal-next {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid #bbf7d0;
  background: linear-gradient(135deg, #f0fdf4, #fff);
  border-radius: 12px;
  padding: 14px 16px;
  margin: -6px 0 20px;
}
.sbs-portal-next > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.sbs-portal-next strong {
  color: #111827;
  font-size: 15px;
}
.sbs-portal-next span:not(.sbs-status-badge) {
  color: #6b7280;
  font-size: 12px;
}
.sbs-portal-next .sbs-portal-kicker {
  color: #15803d;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* ── Section tabs ────────────────────────────────────── */
.sbs-portal-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 18px;
  border-bottom: 2px solid #f0e6ee;
  padding-bottom: 0;
}
.sbs-portal-tab {
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--portal-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  margin-bottom: -2px;
  transition: color .2s, border-color .2s;
}
.sbs-portal-tab.active {
  color: var(--portal-primary);
  border-bottom-color: var(--portal-primary);
}

/* ── Booking card ────────────────────────────────────── */
.sbs-portal-booking {
  border: 1px solid var(--portal-border);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 12px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--portal-bg);
  transition: box-shadow .2s;
}
.sbs-portal-booking:hover { box-shadow: 0 2px 12px rgba(236,72,153,.10); }
.sbs-portal-booking.upcoming { background: var(--portal-upcoming); }
.sbs-portal-booking.past     { background: var(--portal-past); }
.sbs-portal-booking.cancelled { opacity: .6; }

.sbs-portal-date-badge {
  min-width: 52px;
  text-align: center;
  background: var(--portal-primary);
  color: #fff;
  border-radius: 10px;
  padding: 8px 6px;
  flex-shrink: 0;
}
.sbs-portal-date-badge .month {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .06em;
  opacity: .85;
}
.sbs-portal-date-badge .day {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.1;
}
.past .sbs-portal-date-badge   { background: #9ca3af; }
.cancelled .sbs-portal-date-badge { background: #d1d5db; }

.sbs-portal-booking-info { flex: 1; }
.sbs-portal-booking-info .service-name {
  font-weight: 700;
  font-size: 15px;
  margin: 0 0 3px;
}
.sbs-portal-booking-info .staff-name {
    font-size: 13px;
    color: #9d174d;
    margin-bottom: 2px;
}
.sbs-portal-booking-info .time {
  color: var(--portal-muted);
  font-size: 13px;
  margin: 0 0 8px;
}
.sbs-portal-booking-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 6px;
}
.sbs-portal-mini-pill {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #4b5563;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}
.sbs-portal-booking-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.sbs-status-badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 6px;
}
.sbs-status-confirmed  { background: #d1fae5; color: #065f46; }
.sbs-status-pending    { background: #fef3c7; color: #92400e; }
.sbs-status-cancelled  { background: #fee2e2; color: #991b1b; }
.sbs-status-no_show    { background: #f3f4f6; color: #374151; }

/* ── Empty state ─────────────────────────────────────── */
.sbs-portal-empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--portal-muted);
  font-size: 14px;
}
.sbs-portal-empty .icon { font-size: 36px; margin-bottom: 8px; }

/* ── Reschedule modal ────────────────────────────────── */
.sbs-portal-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.sbs-portal-modal {
  background: #fff;
  border-radius: 16px;
  padding: 28px 24px;
  max-width: 460px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  max-height: 90vh;
  overflow-y: auto;
}
.sbs-portal-modal h3 {
  margin: 0 0 18px;
  font-size: 18px;
  font-weight: 700;
}
.sbs-portal-modal-close {
  float: right;
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: #9ca3af;
  margin-top: -4px;
}
.sbs-portal-slot-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}
.sbs-portal-slot {
  padding: 9px;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  background: #fff;
}
.sbs-portal-slot:hover,
.sbs-portal-slot.selected {
  background: var(--portal-primary);
  color: #fff;
  border-color: var(--portal-primary);
}

/* ── Book new button ─────────────────────────────────── */
.sbs-portal-book-new {
  text-align: center;
  margin-top: 16px;
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 480px) {
  .sbs-portal-card { padding: 20px 16px; }
  .sbs-portal-booking { flex-direction: column; gap: 10px; }
  .sbs-portal-slot-grid { grid-template-columns: repeat(2, 1fr); }
  .sbs-portal-stats { flex-direction: column; }
}

.sbs-portal-login .brand-subtitle {
    font-size: 13px;
    color: var(--portal-primary, #ec4899);
    margin: -8px 0 12px;
    font-style: italic;
    opacity: 0.85;
}

/* ============================================================
   4.8.7 UI Polish: customer portal clarity
   ============================================================ */
.sbs-portal-wrap {
  --portal-shadow: 0 12px 34px rgba(15, 23, 42, .08);
  --portal-border: #e5e7eb;
  --portal-muted: #6b7280;
  max-width: 720px;
}

.sbs-portal-card {
  border-radius: 16px;
  box-shadow: var(--portal-shadow);
}

.sbs-portal-login-icon {
  display: none;
}

.sbs-portal-login h2,
.sbs-portal-header h2 {
  color: #111827;
  letter-spacing: 0;
}

.sbs-portal-input {
  border-width: 1px;
  border-radius: 12px;
  min-height: 46px;
}

.sbs-portal-btn,
.sbs-portal-btn-sm {
  border-radius: 999px;
}

.sbs-portal-btn {
  min-height: 46px;
  font-weight: 700;
  box-shadow: 0 10px 22px rgba(236, 72, 153, .16);
}

.sbs-portal-btn-outline {
  background: #fff;
}

.sbs-portal-stats {
  gap: 10px;
}

.sbs-portal-stat {
  background: #f8fafc;
  border-color: #e5e7eb;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.sbs-portal-stat .value {
  color: #111827;
}

.sbs-portal-tabs {
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  padding: 4px;
  background: #f8fafc;
}

.sbs-portal-tab {
  flex: 1;
  border: none;
  border-radius: 999px;
  margin: 0;
}

.sbs-portal-tab.active {
  background: #111827;
  color: #fff;
  border-bottom-color: transparent;
  box-shadow: 0 4px 12px rgba(17, 24, 39, .14);
}

.sbs-portal-booking {
  border-color: #e5e7eb;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.sbs-portal-booking.upcoming {
  background: #fff;
  border-left: 4px solid var(--portal-primary);
}

.sbs-portal-booking.past {
  background: #f8fafc;
}

.sbs-portal-booking:hover {
  box-shadow: 0 12px 28px rgba(15, 23, 42, .08);
}

.sbs-portal-date-badge {
  border-radius: 12px;
  background: #111827;
}

.sbs-status-badge {
  letter-spacing: 0;
  text-transform: none;
}

.sbs-portal-modal {
  border-radius: 18px;
}

.sbs-portal-slot {
  border-width: 1px;
  border-radius: 999px;
}

@media (max-width: 480px) {
  .sbs-portal-wrap {
    padding: 0 10px;
  }

  .sbs-portal-tabs {
    border-radius: 14px;
  }

  .sbs-portal-next {
    align-items: flex-start;
    flex-direction: column;
  }
}


/* ═══════════════════════════════════════════════════════════════════
   YATOON APPLE-STYLE - Customer Portal Refresh
   ═══════════════════════════════════════════════════════════════════ */

.sbs-portal-wrap {
  --portal-primary:    #ec4899;
  --portal-shadow:     0 12px 40px rgba(15,23,42,.10);
  --portal-border:     rgba(0,0,0,.08);
  --portal-bg:         #ffffff;
  --portal-muted:      #6b7280;
  --portal-success:    #10b981;
  --portal-danger:     #ef4444;
  --portal-surface2:   #f8fafc;
  --portal-radius:     18px;
  --portal-ease:       cubic-bezier(.4,0,.2,1);
  -webkit-font-smoothing: antialiased;
}

/* Page bg */
.sbs-portal-wrap {
  max-width: 700px;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', Arial, sans-serif;
}

/* Card */
.sbs-portal-card {
  background: rgba(255,255,255,.96);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid var(--portal-border);
  border-radius: var(--portal-radius);
  box-shadow: var(--portal-shadow), 0 1px 0 rgba(255,255,255,.9) inset;
  padding: 32px 28px;
}

/* Login */
.sbs-portal-login h2 { letter-spacing: -.025em; font-weight: 800; }

.sbs-portal-input {
  border: 1px solid rgba(0,0,0,.14);
  border-radius: 12px;
  background: #f8fafc;
  min-height: 48px;
  font-size: 16px;
  transition: border-color .18s, box-shadow .18s, background .18s;
}

.sbs-portal-input:focus {
  border-color: var(--portal-primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(236,72,153,.12);
}

/* Buttons */
.sbs-portal-btn {
  border-radius: 999px;
  min-height: 48px;
  font-weight: 800;
  letter-spacing: -.01em;
  background: var(--portal-primary);
  box-shadow: 0 8px 22px rgba(236,72,153,.22);
  transition: all .18s var(--portal-ease);
}

.sbs-portal-btn:hover {
  opacity: 1;
  filter: brightness(1.06);
  box-shadow: 0 12px 28px rgba(236,72,153,.28);
  transform: translateY(-1px);
}

.sbs-portal-btn:active { transform: scale(.98); }

.sbs-portal-btn-sm {
  border-radius: 999px;
  font-weight: 700;
}

/* Header */
.sbs-portal-header h2 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.02em;
  color: #111827;
}

/* Stats */
.sbs-portal-stats { gap: 10px; }

.sbs-portal-stat {
  background: var(--portal-surface2);
  border: 1px solid rgba(0,0,0,.07);
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(15,23,42,.05);
  transition: box-shadow .18s, transform .18s;
}

.sbs-portal-stat:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15,23,42,.08);
}

.sbs-portal-stat .value {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -.03em;
  color: #111827;
}

.sbs-portal-stat .label {
  font-size: 11px;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* Tabs - pill style */
.sbs-portal-tabs {
  display: flex;
  gap: 4px;
  background: #f2f4f8;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 20px;
}

.sbs-portal-tab {
  flex: 1;
  border-radius: 999px;
  border: none;
  margin: 0;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  color: #6b7280;
  background: transparent;
  transition: all .18s var(--portal-ease);
}

.sbs-portal-tab.active {
  background: #111827;
  color: #fff;
  font-weight: 700;
  border-bottom-color: transparent;
  box-shadow: 0 4px 14px rgba(17,24,39,.18);
}

/* Booking cards */
.sbs-portal-booking {
  background: var(--portal-bg);
  border: 1px solid rgba(0,0,0,.07);
  border-radius: 16px;
  padding: 16px 18px;
  margin-bottom: 10px;
  box-shadow: 0 1px 3px rgba(15,23,42,.04);
  transition: box-shadow .18s var(--portal-ease), transform .18s var(--portal-ease);
}

.sbs-portal-booking:hover {
  box-shadow: 0 10px 26px rgba(15,23,42,.09);
  transform: translateY(-1px);
}

.sbs-portal-booking.upcoming {
  background: #fff;
  border-left: 4px solid var(--portal-primary);
}

.sbs-portal-booking.past {
  background: var(--portal-surface2);
  opacity: .88;
}

/* Date badge */
.sbs-portal-date-badge {
  background: #111827;
  border-radius: 12px;
  min-width: 54px;
  box-shadow: 0 4px 12px rgba(17,24,39,.18);
}

.past .sbs-portal-date-badge { background: #9ca3af; }
.cancelled .sbs-portal-date-badge { background: #d1d5db; }

/* Mini pill */
.sbs-portal-mini-pill {
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.08);
  background: var(--portal-surface2);
  font-weight: 700;
}

/* Modal */
.sbs-portal-modal {
  background: rgba(255,255,255,.97);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border-radius: 22px;
  box-shadow: 0 28px 80px rgba(15,23,42,.22);
}

.sbs-portal-modal h3 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.02em;
  color: #111827;
}

.sbs-portal-slot {
  border: 1px solid rgba(0,0,0,.10);
  border-radius: 999px;
  background: var(--portal-surface2);
  font-weight: 700;
  transition: all .15s;
}

.sbs-portal-slot:hover,
.sbs-portal-slot.selected {
  background: var(--portal-primary);
  color: #fff;
  border-color: var(--portal-primary);
  box-shadow: 0 4px 14px rgba(236,72,153,.25);
}

/* Status badges */
.sbs-status-confirmed  { background: #dcfce7; color: #15803d; }
.sbs-status-pending    { background: #fef9c3; color: #a16207; }
.sbs-status-cancelled  { background: #fee2e2; color: #991b1b; }
.sbs-status-no_show    { background: #f3f4f6; color: #374151; }

@media (max-width: 480px) {
  .sbs-portal-card { padding: 22px 18px; }
  .sbs-portal-tabs { border-radius: 16px; }
}
