/* ============================================
   Barber Booking — استایل نوبت‌دهی آرایشگاه مردانه
   RTL / ریسپانسیو / طراحی مدرن
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;700;900&display=swap');

:root {
    --bb-primary: #1a1a2e;
    --bb-accent: #c9a227;
    --bb-accent-2: #e6b93f;
    --bb-gradient: linear-gradient(135deg, #1a1a2e 0%, #16213e 55%, #0f3460 100%);
    --bb-radius: 16px;
    --bb-shadow: 0 10px 30px rgba(0,0,0,.12);
    --bb-text: #22223b;
}

.bb-form-wrap, .bb-dashboard, .bb-auth {
    direction: rtl;
    text-align: right;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    max-width: 720px;
    margin: 24px auto;
    background: #fff;
    border-radius: var(--bb-radius);
    box-shadow: var(--bb-shadow);
    padding: 28px;
    color: var(--bb-text);
}

/* ---------- مراحل ---------- */
.bb-steps {
    display: flex; gap: 6px; margin-bottom: 24px; flex-wrap: wrap;
}
.bb-step {
    flex: 1; min-width: 120px; text-align: center; padding: 10px 6px;
    background: #f1f3f8; border-radius: 10px; font-size: 13px; font-weight: 500;
    color: #667; transition: all .3s ease; position: relative;
}
.bb-step.active {
    background: var(--bb-gradient); color: #fff;
    box-shadow: 0 6px 18px rgba(22,33,62,.35);
}

/* ---------- فیلدها ---------- */
.bb-field { margin-bottom: 18px; }
.bb-field label { display: block; font-weight: 700; margin-bottom: 6px; font-size: 14px; }
.bb-form-wrap input[type="text"],
.bb-form-wrap input[type="tel"],
.bb-form-wrap textarea {
    width: 100%; padding: 12px 14px; border: 2px solid #e4e7f0; border-radius: 10px;
    font-family: inherit; font-size: 15px; transition: border .2s, box-shadow .2s;
    background: #fafbfe;
}
.bb-form-wrap input:focus, .bb-form-wrap textarea:focus {
    outline: none; border-color: var(--bb-accent);
    box-shadow: 0 0 0 4px rgba(201,162,39,.15);
}

/* ---------- کارت خدمات ---------- */
.bb-services { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.bb-service-card {
    border: 2px solid #e4e7f0; border-radius: 14px; padding: 18px; cursor: pointer;
    display: flex; flex-direction: column; gap: 6px; transition: all .25s; background: #fafbfe;
}
.bb-service-card:hover { border-color: var(--bb-accent); transform: translateY(-3px); }
.bb-service-card input { accent-color: var(--bb-accent); }
.bb-service-card input:checked ~ strong { color: var(--bb-accent); }
.bb-service-card span { color: #778; font-size: 13px; }

/* ---------- تقویم و ساعت ---------- */
#bbCalendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 20px; }
.bb-cal-head { grid-column: 1 / -1; font-weight: 900; text-align: center; padding: 8px; color: var(--bb-primary); }
.bb-cal-dayname { text-align: center; font-size: 11px; color: #889; font-weight: 700; }
.bb-cal-cell {
    text-align: center; padding: 10px 4px; border-radius: 10px; cursor: pointer;
    background: #f1f3f8; font-size: 14px; transition: all .2s; border: 2px solid transparent;
}
.bb-cal-cell:hover { background: #e8ecf5; }
.bb-cal-cell.selected { background: var(--bb-gradient); color: #fff; border-color: var(--bb-accent); }
.bb-cal-cell.empty { background: transparent; cursor: default; }
.bb-cal-cell.today { border-color: var(--bb-accent); }

.bb-time-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 10px; }
.bb-slot {
    padding: 10px; text-align: center; border-radius: 10px; cursor: pointer;
    background: #f1f3f8; font-weight: 500; transition: all .2s; border: 2px solid transparent;
}
.bb-slot:hover { border-color: var(--bb-accent); }
.bb-slot.selected { background: var(--bb-accent); color: #fff; }
.bb-slot.taken { opacity: .35; cursor: not-allowed; text-decoration: line-through; }

/* ---------- دکمه‌ها ---------- */
.bb-btn {
    display: inline-block; padding: 12px 28px; border: none; border-radius: 12px;
    background: var(--bb-gradient); color: #fff; font-family: inherit; font-size: 15px;
    font-weight: 700; cursor: pointer; transition: all .25s;
}
.bb-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(22,33,62,.35); }
.bb-nav { display: flex; gap: 10px; margin-top: 24px; }
.bb-prev { background: #e4e7f0; color: var(--bb-text); }

/* ---------- خلاصه و پیام ---------- */
.bb-summary { background: #fafbfe; border: 2px dashed var(--bb-accent); border-radius: 14px; padding: 20px; line-height: 2.2; }
.bb-msg { margin-top: 14px; padding: 12px; border-radius: 10px; display: none; font-weight: 500; }
.bb-msg.success { display: block; background: #e8f8ee; color: #1b7f45; border: 1px solid #b8e6c9; }
.bb-msg.error { display: block; background: #fdeaea; color: #c0392b; border: 1px solid #f5c6c6; }

/* ---------- جدول داشبورد ---------- */
.bb-table { width: 100%; border-collapse: collapse; margin: 10px 0 24px; font-size: 14px; }
.bb-table th { background: var(--bb-gradient); color: #fff; padding: 12px 10px; font-weight: 700; }
.bb-table th:first-child { border-radius: 0 10px 0 0; }
.bb-table th:last-child { border-radius: 10px 0 0 0; }
.bb-table td { padding: 12px 10px; border-bottom: 1px solid #eef0f6; }

/* ---------- نشان وضعیت ---------- */
.bb-badge { display: inline-block; padding: 4px 14px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.bb-pending   { background: #fff6dd; color: #a67c00; }
.bb-confirmed { background: #e8f8ee; color: #1b7f45; }
.bb-cancelled { background: #fdeaea; color: #c0392b; }
.bb-completed { background: #e8eefc; color: #2c4fa3; }

/* ---------- ورود ---------- */
.bb-auth-card { max-width: 420px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.bb-auth-card input {
    padding: 12px 14px; border: 2px solid #e4e7f0; border-radius: 10px; font-family: inherit;
}

/* ---------- ریسپانسیو ---------- */
@media (max-width: 640px) {
    .bb-form-wrap, .bb-dashboard, .bb-auth { padding: 18px; margin: 12px; }
    .bb-steps { flex-direction: column; }
    #bbCalendar { gap: 4px; }
    .bb-cal-cell { padding: 8px 2px; font-size: 12px; }
    .bb-btn { width: 100%; text-align: center; }
}
