@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=Inter:wght@300;400;500;600&display=swap');

:root {
  --red: #dc2626;
  --red-dark: #991b1b;
  --silver: #cbd5e1;
  --silver-bright: #f1f5f9;
  --silver-muted: #94a3b8;
  --silver-dark: #64748b;
  --gold: #cbd5e1; /* silver alias for backwards compatibility */
  --bg: #0b090a;
  --bg-card: rgba(22, 22, 28, 0.92);
  --bg-card2: #1a1a22;
  --border: rgba(203, 213, 225, 0.12);
  --border-hover: rgba(203, 213, 225, 0.26);
  --border-active: rgba(220, 38, 38, 0.6);
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --success: #4caf7d;
  --danger: #e05c5c;
  --danger-bg: rgba(224, 92, 92, 0.08);
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.65), 0 0 1px rgba(255, 255, 255, 0.08);
  --transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}
html {
  scroll-behavior: smooth;
  background-color: #0b090a;
  min-height: 100%;
}

/* ── CINEMATIC RED & BLACK FADE ── */
body {
  font-family: 'Inter', sans-serif;
  background-color: #0b090a;
  background-image:
    radial-gradient(ellipse 120% 70% at 80% 0%,   #2d0d0f 0%, #160809 50%, transparent 80%),
    radial-gradient(ellipse 100% 65% at 0%  100%, #26090c 0%, #120708 50%, transparent 80%),
    radial-gradient(ellipse 80%  50% at 50% 50%,  #140708 0%, transparent 100%);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: #0c090a; }
::-webkit-scrollbar-thumb { background: rgba(203, 213, 225, 0.25); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(220, 38, 38, 0.7); }

/* ── PROGRESS LABELS ── */
.progress-label {
  font-size: 0.68rem;
  color: var(--text-dim);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: var(--transition);
}
.progress-label.active { color: var(--silver-bright); }
.progress-label.done   { color: var(--red); }

/* ── TYPOGRAPHY ── */
h1, h2, h3 { font-family: 'Playfair Display', serif; font-weight: 700; line-height: 1.2; }

/* ── BRAND ── */
.brand { display: flex; align-items: center; gap: 12px; }
.brand-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
  letter-spacing: 0.2px;
}
.brand-sub {
  font-size: 0.65rem;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 2.5px;
  font-weight: 500;
}

/* ── CARD ── */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

/* ── THIN RULE ── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 20px 0;
}

/* ── BUTTON ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-decoration: none;
  letter-spacing: 0.5px;
}
.btn-red {
  background: var(--red);
  color: #fff;
  box-shadow: 0 4px 18px rgba(220, 38, 38, 0.35);
}
.btn-red:hover { background: #b91c1c; transform: translateY(-1px); box-shadow: 0 6px 22px rgba(220, 38, 38, 0.45); }
.btn-red:active { transform: translateY(0); }
.btn-red:disabled { opacity: 0.35; cursor: not-allowed; transform: none; box-shadow: none; }

/* alias for old code */
.btn-gold {
  background: var(--red);
  color: #fff;
  box-shadow: 0 4px 18px rgba(220, 38, 38, 0.35);
}
.btn-gold:hover { background: #b91c1c; transform: translateY(-1px); box-shadow: 0 6px 22px rgba(220, 38, 38, 0.45); }
.btn-gold:active { transform: translateY(0); }
.btn-gold:disabled { opacity: 0.35; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-outline {
  background: rgba(203, 213, 225, 0.04);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.btn-outline:hover {
  border-color: rgba(203, 213, 225, 0.35);
  color: var(--silver-bright);
  background: rgba(203, 213, 225, 0.08);
}
.btn-danger {
  background: var(--danger-bg);
  border: 1px solid rgba(224, 92, 92, 0.25);
  color: var(--danger);
}
.btn-danger:hover { background: rgba(224, 92, 92, 0.16); }
.btn-sm { padding: 8px 14px; font-size: 0.78rem; }
.btn-full { width: 100%; }

/* ── INPUT ── */
.input-group { display: flex; flex-direction: column; gap: 6px; }
.input-group label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.input-group input,
.input-group select {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 12px 14px;
  font-family: 'Inter', sans-serif;
  font-size: 0.92rem;
  transition: var(--transition);
  outline: none;
  width: 100%;
}
.input-group input:focus,
.input-group select:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}
.input-group input::placeholder { color: var(--text-dim); }

/* ── PROGRESS BAR STEPS ── */
.progress-wrap {
  margin-bottom: 32px;
}
.progress-bar {
  height: 2px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 10px;
}
.progress-fill {
  height: 100%;
  background: var(--red);
  border-radius: 2px;
  transition: width 0.4s ease;
  box-shadow: 0 0 8px rgba(220, 38, 38, 0.6);
}
.progress-labels {
  display: flex;
  justify-content: space-between;
}

/* ── SERVICE CARDS ── */
.service-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 16px;
}
.service-item {
  display: flex;
  align-items: center;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
  gap: 16px;
  background: var(--bg-card2);
}
.service-item:hover {
  background: #23232c;
  border-color: var(--border-hover);
}
.service-item.selected {
  background: rgba(220, 38, 38, 0.08);
  border-color: var(--red);
}
.service-dot {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid var(--text-dim);
  flex-shrink: 0;
  transition: var(--transition);
  display: flex; align-items: center; justify-content: center;
}
.service-item.selected .service-dot {
  border-color: var(--red);
  background: var(--red);
}
.service-dot::after {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #fff;
  opacity: 0;
  transition: var(--transition);
}
.service-item.selected .service-dot::after { opacity: 1; }
.service-name {
  flex: 1;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
}
.service-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.service-dur {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}
.service-price {
  font-size: 0.8rem;
  color: #f1f5f9;
  font-weight: 600;
  background: linear-gradient(135deg, rgba(203, 213, 225, 0.12), rgba(148, 163, 184, 0.05));
  border: 1px solid rgba(203, 213, 225, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  padding: 3px 9px;
  border-radius: 12px;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.service-total-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding: 12px 16px;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
}
.service-total-label {
  color: var(--text-muted);
}
.service-total-val {
  font-weight: 600;
  color: var(--text);
}

/* ── EXTRA SERVICE CHECKBOX & BADGES ── */
.service-check {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 2px solid var(--text-dim);
  flex-shrink: 0;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}
.service-item.selected .service-check {
  border-color: var(--red);
  background: var(--red);
}
.service-item.disabled {
  opacity: 0.38;
  cursor: not-allowed !important;
  background: rgba(255, 255, 255, 0.02);
  border-color: transparent !important;
}
.service-badge-included {
  font-size: 0.68rem;
  color: #f87171;
  background: rgba(220, 38, 38, 0.12);
  border: 1px solid rgba(220, 38, 38, 0.25);
  padding: 3px 8px;
  border-radius: 10px;
  font-weight: 500;
  white-space: nowrap;
}

/* ── DATE GRID (BRUSHED STEEL EFFECT) ── */
.date-cell {
  aspect-ratio: 1;
  border-radius: 8px;
  border: 1px solid rgba(203, 213, 225, 0.12);
  background: linear-gradient(135deg, #1f1f26, #16161c);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  transition: var(--transition);
  user-select: none;
}
.date-cell:hover:not(.disabled):not(.selected) {
  border-color: rgba(203, 213, 225, 0.32);
  background: linear-gradient(135deg, #272732, #1c1c24);
}
.date-cell.selected {
  border-color: var(--silver-bright);
  background: linear-gradient(135deg, #2c2f38, #1c1d24);
  box-shadow: 0 0 16px rgba(203, 213, 225, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.date-cell.disabled { opacity: 0.18; cursor: not-allowed; }
.date-cell.today:not(.selected) { border-color: rgba(203, 213, 225, 0.28); }
.date-day { font-size: 0.5rem; color: #64748b; text-transform: uppercase; font-weight: 600; letter-spacing: 0.5px; }
.date-num { font-size: 1rem; font-weight: 600; color: #e2e8f0; line-height: 1; }
.date-cell.selected .date-day { color: #cbd5e1; }
.date-cell.selected .date-num { color: #ffffff; }

/* ── TIME SLOTS ── */
.slot {
  padding: 11px 6px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-card2);
  text-align: center;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  transition: var(--transition);
  position: relative;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}
.slot:hover:not(.booked):not(.selected) {
  border-color: rgba(203, 213, 225, 0.3);
  color: #ffffff;
}
.slot.selected {
  border-color: var(--red);
  background: rgba(220, 38, 38, 0.14);
  color: #ff6b6b;
  box-shadow: 0 0 12px rgba(220, 38, 38, 0.22);
}
.slot.booked {
  background: rgba(220, 38, 38, 0.05);
  border-color: rgba(220, 38, 38, 0.18);
  color: rgba(220, 38, 38, 0.45);
  cursor: not-allowed;
  text-decoration: line-through;
  font-weight: 400;
}
.slot.booked::after {
  content: attr(data-booked);
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.55rem;
  color: rgba(220, 38, 38, 0.6);
  font-weight: 500;
  letter-spacing: 0.2px;
  text-decoration: none;
}

/* ── SUMMARY BOX ── */
.summary-box {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-top: 20px;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  font-size: 0.87rem;
  border-bottom: 1px solid var(--border);
}
.summary-row:last-child { border-bottom: none; }
.summary-label { color: var(--text-muted); }
.summary-value { color: var(--text); font-weight: 600; }

/* ── TOAST ── */
.toast-container {
  position: fixed;
  bottom: 20px; right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  background: #181822;
  border: 1px solid rgba(203, 213, 225, 0.18);
  border-radius: var(--radius-sm);
  padding: 13px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow);
  animation: slideIn 0.3s ease;
  min-width: 240px; max-width: 320px;
}
.toast.success { border-color: rgba(76, 175, 125, 0.35); }
.toast.error { border-color: rgba(224, 92, 92, 0.35); }
.toast-icon { font-size: 1rem; flex-shrink: 0; }
.toast-msg { font-size: 0.85rem; color: var(--text); }

@keyframes slideIn {
  from { transform: translateX(110%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes fadeOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(110%); }
}

/* ── MODAL ── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}
.modal {
  background: #16161f;
  border: 1px solid rgba(203, 213, 225, 0.18);
  border-radius: var(--radius);
  padding: 28px;
  max-width: 480px; width: 100%;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  animation: scaleIn 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn { from { transform: scale(0.93); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  .card { padding: 18px; }
  .btn { padding: 13px 20px; }
  .modal { padding: 22px; }
}

/* ── AYLIK RANDEVU AVANTAJ KARTI (KOMPAKT) ── */
.loyalty-card {
  margin-top: 10px;
  background: rgba(22, 22, 28, 0.85);
  border: 1px solid rgba(203, 213, 225, 0.14);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  animation: fadeIn 0.3s ease;
}
.loyalty-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.loyalty-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: var(--silver-bright);
  text-transform: uppercase;
}
.loyalty-subtitle {
  font-size: 0.66rem;
  color: var(--text-dim);
}
.loyalty-stamps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 6px;
}
.stamp {
  height: 38px;
  background: var(--bg-card2);
  border: 1px dashed rgba(203, 213, 225, 0.16);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: var(--transition);
  position: relative;
}
.stamp .stamp-check { display: none; font-size: 0.9rem; color: #4caf7d; font-weight: 700; }
.stamp .stamp-num { font-size: 0.8rem; font-weight: 600; color: var(--text-dim); }

.stamp.completed {
  background: rgba(76, 175, 125, 0.1);
  border: 1px solid rgba(76, 175, 125, 0.4);
}
.stamp.completed .stamp-check { display: inline-block; }
.stamp.completed .stamp-num { display: none; }

.stamp.current {
  background: rgba(220, 38, 38, 0.12);
  border: 1px solid var(--red);
  box-shadow: 0 0 10px rgba(220, 38, 38, 0.25);
}
.stamp.current .stamp-num { color: #ff6b6b; font-weight: 700; }

.stamp-reward {
  border: 1px dashed rgba(220, 38, 38, 0.4);
  background: rgba(220, 38, 38, 0.05);
}
.stamp-reward .stamp-star { font-size: 0.82rem; }
.stamp-reward .stamp-reward-text { font-size: 0.66rem; color: #fca5a5; font-weight: 600; }

.stamp-reward.reward-active {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.25), rgba(153, 27, 27, 0.35));
  border: 1px solid var(--red);
  box-shadow: 0 0 14px rgba(220, 38, 38, 0.45);
  animation: pulseGlow 1.8s infinite;
}
.stamp-reward.reward-active .stamp-star { font-size: 0.95rem; }
.stamp-reward.reward-active .stamp-reward-text { color: #ffffff; font-weight: 700; }

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 10px rgba(220, 38, 38, 0.3); }
  50% { box-shadow: 0 0 18px rgba(220, 38, 38, 0.65); }
}

.loyalty-msg {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.3;
  text-align: center;
}
.loyalty-pill {
  display: inline-block;
  background: rgba(220, 38, 38, 0.15);
  border: 1px solid rgba(220, 38, 38, 0.35);
  color: #ff6b6b;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
  margin-left: 6px;
  vertical-align: middle;
}

/* Mobile phone entry and translated content. */
.phone-hint { font-size: .75rem; color: var(--text-muted); line-height: 1.45; }
input[aria-invalid="true"] { border-color: var(--danger); }
.summary-value { min-width: 0; text-align: right; overflow-wrap: anywhere; }
.summary-row { gap: 12px; }
.cancel-item .btn { white-space: normal; }
@media (max-width: 640px) {
  input[type="tel"], .input-group input { font-size: 16px; }
  .service-item { padding: 12px 10px; gap: 8px; flex-wrap: wrap; }
  .service-name { min-width: 0; overflow-wrap: anywhere; }
  .service-meta { flex-wrap: wrap; gap: 6px; }
  .loyalty-header { flex-wrap: wrap; gap: 4px 8px; }
  .stamp { height: auto; min-height: 38px; padding: 5px 2px; flex-wrap: wrap; }
  .stamp-reward-text { text-align: center; }
}
@media (max-width: 380px) {
  .service-meta { flex-basis: 100%; justify-content: flex-end; }
  .cancel-item { flex-wrap: wrap; gap: 8px; }
  .cancel-item-info { flex-basis: 100%; }
}
