@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700;800&family=Lalezar&display=swap');

/* ===== Design tokens — هویت بصری AvalSalon ===== */
:root {
  --bg: #FBF2F5;
  --surface: #FFFFFF;
  --surface-alt: #FDF6F8;
  --ink: #2B1620;
  --ink-soft: #8a6472;
  --primary: #6E2142;
  --primary-dark: #4E1730;
  --primary-tint: #F3E1EA;
  --gold: #C79A3E;
  --gold-soft: #F4E4BC;
  --gold-deep: #9C7526;
  --line: #F0DEE6;
  --success-bg: #E4F5EC;
  --success: #227A55;
  --error-bg: #FBE6EA;
  --error: #C1394B;
  --radius-lg: 22px;
  --radius-md: 15px;
  --radius-sm: 10px;
  --shadow: 0 12px 34px rgba(110, 33, 66, 0.10);
  --shadow-sm: 0 4px 14px rgba(110, 33, 66, 0.08);
}

* { box-sizing: border-box; }

body {
  font-family: 'Vazirmatn', Tahoma, sans-serif;
  background:
    radial-gradient(1200px 500px at 90% -10%, #f6e3ea 0%, transparent 60%),
    radial-gradient(900px 400px at -10% 10%, #fdf0da 0%, transparent 55%),
    var(--bg);
  color: var(--ink);
  margin: 0;
  direction: rtl;
  min-height: 100vh;
}

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 16px 70px;
}

/* ===== برند ===== */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(150deg, var(--primary), var(--primary-dark));
  color: var(--gold-soft);
  font-family: 'Lalezar', sans-serif;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(110, 33, 66, 0.35);
  flex-shrink: 0;
}
.brand-text {
  font-family: 'Lalezar', sans-serif;
  font-size: 24px;
  letter-spacing: 0.3px;
  color: var(--primary-dark);
}
.brand-accent { color: var(--gold-deep); }

/* ===== کارت‌ها ===== */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 18px;
  border: 1px solid var(--line);
}

h1, h2, h3 { color: var(--primary-dark); margin-top: 0; font-family: 'Vazirmatn', sans-serif; }
h1 { font-size: 21px; font-weight: 800; }
h2 { font-size: 17px; font-weight: 700; }
a { color: var(--primary); }
p { line-height: 1.9; }

.btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(110, 33, 66, 0.28);
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(110, 33, 66, 0.35); }
.btn.secondary { background: var(--surface-alt); color: var(--primary-dark); box-shadow: none; border: 1px solid var(--line); }
.btn.danger { background: linear-gradient(135deg, #d95a6d, #b8394d); box-shadow: 0 6px 14px rgba(184,57,77,.25); }
.btn.small { padding: 7px 16px; font-size: 13px; }

input[type=text], input[type=password], input[type=tel], input[type=time], input[type=date], input[type=number] {
  width: 100%;
  padding: 11px 13px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 15px;
  margin-top: 5px;
  background: var(--surface-alt);
  color: var(--ink);
  transition: border-color .12s ease, box-shadow .12s ease;
}
input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(199, 154, 62, 0.18);
}
label { font-weight: 600; font-size: 13.5px; display: block; margin-top: 12px; color: var(--ink-soft); }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.day-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); flex-wrap: wrap; }
.day-row:last-child { border-bottom: none; }
.day-name { width: 84px; font-weight: 700; color: var(--primary-dark); }

.header-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.msg-error { background: var(--error-bg); color: var(--error); padding: 12px 14px; border-radius: var(--radius-sm); margin-bottom: 14px; font-weight: 600; }
.msg-ok { background: var(--success-bg); color: var(--success); padding: 12px 14px; border-radius: var(--radius-sm); margin-bottom: 14px; font-weight: 600; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: right; padding: 10px 8px; color: var(--ink-soft); font-weight: 700; border-bottom: 2px solid var(--line); }
td { text-align: right; padding: 10px 8px; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: none; }
.tag { background: var(--primary-tint); color: var(--primary-dark); padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }

.copy-box { display: flex; gap: 8px; }
.copy-box input { flex: 1; font-family: 'Courier New', monospace; direction: ltr; text-align: left; }
.muted { color: var(--ink-soft); font-size: 13.5px; }

nav.tabs { display: flex; gap: 8px; margin-bottom: 18px; overflow-x: auto; }
nav.tabs a {
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
}
nav.tabs a.active { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; border-color: transparent; }

/* ===== المان امضادار: بلیت رزرو نوبت ===== */
.ticket {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  padding: 24px;
  margin-bottom: 20px;
  position: relative;
}
.ticket-divider {
  position: relative;
  border-top: 2px dashed var(--gold-soft);
  margin: 26px -24px 22px;
}
.ticket-divider::before, .ticket-divider::after {
  content: "";
  position: absolute;
  top: -12px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg);
}
.ticket-divider::before { left: -12px; }
.ticket-divider::after { right: -12px; }

.section-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--gold-deep);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  letter-spacing: .2px;
}

/* نوار تاریخ افقی */
.date-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px 10px;
  scroll-snap-type: x proximity;
}
.date-strip::-webkit-scrollbar { height: 6px; }
.date-strip::-webkit-scrollbar-thumb { background: var(--line); border-radius: 10px; }
.date-chip {
  min-width: 62px;
  text-align: center;
  padding: 10px 6px 12px;
  border-radius: 16px;
  border: 1.5px solid var(--line);
  background: var(--surface-alt);
  cursor: pointer;
  scroll-snap-align: start;
  transition: all .12s ease;
  flex-shrink: 0;
}
.date-chip:hover { border-color: var(--gold); }
.date-chip .dow { font-size: 12px; color: var(--ink-soft); font-weight: 600; display: block; }
.date-chip .dom { font-size: 21px; font-weight: 800; color: var(--primary-dark); font-family: 'Lalezar', sans-serif; display: block; line-height: 1.5; }
.date-chip .mon { font-size: 10.5px; color: var(--ink-soft); display: block; }
.date-chip.selected {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-color: transparent;
  box-shadow: 0 6px 16px rgba(110, 33, 66, 0.3);
}
.date-chip.selected .dow, .date-chip.selected .dom, .date-chip.selected .mon { color: #fff; }

/* گروه‌های زمانی و اسلات‌ها */
.slot-group-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 18px 0 10px;
}
.slot-group-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.slots-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.slot-pill {
  padding: 10px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--primary-tint);
  background: var(--surface);
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  transition: all .12s ease;
}
.slot-pill:hover { border-color: var(--gold); background: var(--gold-soft); }
.slot-pill.selected {
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  border-color: transparent;
  color: #3a2a05;
  box-shadow: 0 6px 16px rgba(199, 154, 62, 0.4);
}
.slot-empty {
  text-align: center;
  padding: 30px 10px;
  color: var(--ink-soft);
}
.slot-empty .big-icon { font-size: 34px; display: block; margin-bottom: 8px; opacity: .6; }

.selected-summary {
  background: var(--primary-tint);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--primary-dark);
}

@media (max-width: 480px) {
  .brand-text { font-size: 20px; }
  .ticket { padding: 18px; }
  .ticket-divider { margin: 22px -18px 18px; }
}
