:root{
  --primary: #2563EB;
  --primaryDark: #1E40AF;
  --accent: #38BDF8;
  --background: #F8FAFC;

  --text: #0f172a;
  --muted: #64748b;
  --card: #ffffff;
  --border: #e2e8f0;
  --shadow: 0 12px 30px rgba(2, 6, 23, 0.08);
  --radius: 18px;
}

*{ box-sizing:border-box; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  color: var(--text);
  background: var(--background);
}

.page{ min-height:100vh; display:flex; flex-direction:column; }

.topbar{
  padding: 16px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primaryDark) 60%);
  color: white;
}

.brand{ display:flex; gap:12px; align-items:center; max-width:980px; margin:0 auto; }
.logo{
  width:44px; height:44px; border-radius:14px;
  background: rgba(255,255,255,0.18);
  display:grid; place-items:center;
  font-weight:800; font-size:18px;
  border: 1px solid rgba(255,255,255,0.25);
}
.brand-title{ font-weight:800; font-size:18px; line-height:1.1; }
.brand-subtitle{ font-size:12px; opacity:0.9; }

.container{
  width:100%;
  max-width:980px;
  margin: 18px auto;
  padding: 0 14px 28px;
  display:grid;
  gap: 14px;
  grid-template-columns: 1fr;
}

.card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
}

.tabs{
  display:flex;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow:hidden;
  background: #f1f5f9;
}

.tab{
  flex:1;
  border:0;
  padding: 12px 10px;
  background: transparent;
  font-weight: 700;
  color: var(--muted);
  cursor:pointer;
}

.tab.active{
  background: white;
  color: var(--primaryDark);
  box-shadow: 0 6px 18px rgba(2, 6, 23, 0.06);
}

.section{ margin-top: 14px; }
.label{ display:block; font-weight: 700; margin-bottom: 6px; }
.hint{ color: var(--muted); font-size: 12px; margin-bottom: 8px; }

.input{
  width:100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 12px;
  font-size: 16px;
  outline: none;
  background: white;
}
.input:focus{
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.22);
}

.grid2{
  display:grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.btn{
  width:100%;
  border:0;
  border-radius: 14px;
  padding: 12px 12px;
  font-weight: 800;
  cursor:pointer;
  font-size: 15px;
}

.btn-primary{
  background: var(--primary);
  color: white;
}
.btn-primary:hover{ background: var(--primaryDark); }

.btn-dark{
  background: #0f172a;
  color: white;
}
.btn-dark:hover{ opacity:0.92; }

.btn-outline{
  background: white;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-outline:hover{ background: #f1f5f9; }

.status{
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #f8fafc;
  color: var(--text);
  font-size: 13px;
}
.status.error{
  border-color: rgba(220, 38, 38, 0.35);
  background: rgba(220, 38, 38, 0.06);
}
.status.success{
  border-color: rgba(22, 163, 74, 0.35);
  background: rgba(22, 163, 74, 0.06);
}

.result{
  margin-top: 12px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(22, 163, 74, 0.25);
  background: rgba(22, 163, 74, 0.05);
}
.result-title{ font-weight: 900; margin-bottom: 6px; }
.result-text{ font-size: 13px; color: var(--text); word-break: break-word; }

.footer-note{
  margin-top: 14px;
  font-size: 12px;
  color: var(--muted);
  text-align:center;
}

.help{
  background: white;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
}
.help-title{ font-weight: 900; margin-bottom: 6px; }
.help-text{ color: var(--muted); font-size: 13px; line-height: 1.45; }
code{
  padding: 2px 6px;
  border-radius: 8px;
  background: #f1f5f9;
  border: 1px solid var(--border);
}

.hidden{ display:none !important; }

.recaptcha{ margin-top: 12px; }

/* desktop layout */
@media (min-width: 860px){
  .container{
    grid-template-columns: 1fr;
    justify-content: center;
  }

  .card{
    max-width: 520px;
    margin: 0 auto;
    padding: 18px;
  }

  .grid2{
    grid-template-columns: 1fr 1fr;
  }
}

/* ===== Bottom Navigation (Mobile App Style) ===== */

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: white;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 100;
}

.bottom-nav a {
  flex: 1;
  text-align: center;
  text-decoration: none;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.bottom-nav a .icon {
  display: block;
  font-size: 20px;
  margin-bottom: 2px;
}

.bottom-nav a.active {
  color: var(--primary);
}

.page-with-nav {
  padding-bottom: 80px; /* space for bottom nav */
}

/* ===== Dashboard Bookings ===== */

.section-title {
  font-weight: 900;
  margin-bottom: 12px;
}

.booking-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px;
  margin-bottom: 10px;
  background: white;
}

.booking-salon {
  font-weight: 800;
  margin-bottom: 4px;
}

.booking-time {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}

.booking-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.booking-price {
  font-weight: 800;
}

/* Status badges */
.status {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.status.PENDING {
  background: rgba(245, 158, 11, 0.15);
  color: #b45309;
}

.status.CONFIRMED {
  background: rgba(34, 197, 94, 0.15);
  color: #15803d;
}

.status.INPROGRESS {
  background: rgba(37, 99, 235, 0.15);
  color: #1e40af;
}

.empty-state {
  text-align: center;
  padding: 20px 10px;
  color: var(--muted);
}

.empty-state a {
  display: inline-block;
  margin-top: 8px;
  color: var(--primary);
  font-weight: 800;
  text-decoration: none;
}
/* ===== Welcome Header ===== */

.welcome {
  font-size: 18px;
  font-weight: 900;
  margin-bottom: 6px;
}

.welcome-sub {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
}
/* ===== Nearby Salons ===== */

.salon-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px;
  margin-bottom: 10px;
  background: white;
}

.salon-name {
  font-weight: 800;
  margin-bottom: 4px;
}

.salon-address {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}

.salon-rating {
  font-size: 13px;
  font-weight: 800;
  color: #f59e0b;
}
/* ===== Salon Actions ===== */

.salon-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

.salon-actions {
  display: flex;
  gap: 10px;
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
}

.icon-btn.primary {
  background: var(--primary);
  color: white;
  border: none;
}

/* ===== Stylist Cards ===== */

.stylist-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px;
  margin-bottom: 10px;
  background: white;
}

.stylist-name {
  font-weight: 800;
}

.stylist-meta {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}

.stylist-footer {
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
/* ===== Map Section ===== */

.map-container {
  margin-top: 14px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.map-container iframe {
  width: 100%;
  height: 220px;
  border: none;
}

/* ===== Bottom Sheet (Reviews) ===== */

.bottom-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: -100%;
  background: white;
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
  box-shadow: 0 -10px 30px rgba(0,0,0,0.15);
  transition: bottom 0.3s ease;
  z-index: 200;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
}

.bottom-sheet.open {
  bottom: 0;
}

.sheet-header {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 800;
}

.sheet-content {
  padding: 12px;
  overflow-y: auto;
}

.review-card {
  border-bottom: 1px solid var(--border);
  padding: 8px 0;
}

.review-name {
  font-weight: 800;
  font-size: 13px;
}

.review-comment {
  font-size: 13px;
  margin: 4px 0;
}

.review-rating {
  font-size: 12px;
  color: #f59e0b;
}

/* ===== Services ===== */

.service-card {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 10px;
  cursor: pointer;
}

.service-card input {
  transform: scale(1.2);
}

.service-name {
  font-weight: 800;
}

.service-meta {
  font-size: 13px;
  color: var(--muted);
}
/* ===== Billing Sheet ===== */

.bill-sheet {
  position: fixed;
  bottom: 64px; /* above bottom nav */
  left: 0;
  right: 0;
  background: white;
  border-top: 1px solid var(--border);
  padding: 12px 16px;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
}

.bill-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin-bottom: 6px;
}

.bill-total {
  font-weight: 900;
  font-size: 16px;
  margin-top: 6px;
}
/* ===== Slots ===== */

.slots-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.slot-btn {
  padding: 10px 0;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: white;
  font-weight: 700;
  cursor: pointer;
}

.slot-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}
/* ===== Rating Modal ===== */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
}

.modal-content {
  background: white;
  border-radius: 16px;
  padding: 16px;
  width: 90%;
  max-width: 400px;
}

.stars span {
  font-size: 28px;
  cursor: pointer;
  color: #e5e7eb;
}

.stars span.active {
  color: #facc15;
}
/* ===== Profile ===== */

.profile-row {
  margin-bottom: 12px;
}

.referral {
  display: flex;
  align-items: center;
  gap: 8px;
}

.discount-item {
  border-bottom: 1px solid var(--border);
  padding: 8px 0;
}

.discount-item:last-child {
  border-bottom: none;
}
/* ===== Home Promo ===== */

.home-promo {
  background: var(--background);
  border: 1px dashed var(--primary);
  border-radius: 12px;
  padding: 10px;
  margin: 10px 0;
  font-size: 14px;
}

.home-promo strong {
  color: var(--primary-dark);
}

.home-promo .referral {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}
.review-item {
  border-bottom: 1px solid var(--border);
  padding: 8px 0;
}

.review-item:last-child {
  border-bottom: none;
}

.review-name {
  font-weight: 600;
}

.review-comment {
  font-size: 14px;
  margin-top: 2px;
  color: #374151;
}
/* ===== Phone Input ===== */

.phone-input {
  display: flex;
  align-items: center;
}

.phone-prefix {
  padding: 10px 12px;
  background: #e5e7eb;
  border-radius: 10px 0 0 10px;
  font-weight: 600;
}

.phone-field {
  border-radius: 0 10px 10px 0;
  border-left: none;
}

/* Resend */
.btn-outline[disabled] {
  opacity: 0.5;
}
