/* ═══════════════════════════════════════════════════════════════
   Orchid Booking — Design System v2.1
   Font: Nunito (headings) + Be Vietnam Pro (body)
   Theme: Elegant Purple-Blue with warm accents
═══════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --primary:    #4F46E5;
    --primary-d:  #3730a3;
    --primary-l:  #818cf8;
    --secondary:  #7C3AED;
    --accent:     #EC4899;
    --success:    #10b981;
    --warning:    #f59e0b;
    --danger:     #ef4444;
    --info:       #3b82f6;
    --light:      #f8faff;
    --dark:       #1e1b4b;
    --muted:      #6b7280;
    --border:     #e5e7f0;
    --radius:     12px;
    --radius-sm:  8px;
    --radius-lg:  20px;
    --shadow:     0 1px 3px rgba(79,70,229,.08), 0 4px 16px rgba(79,70,229,.06);
    --shadow-md:  0 4px 24px rgba(79,70,229,.12);
    --shadow-lg:  0 12px 48px rgba(79,70,229,.18);
    --gradient:   linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
    --gradient-r: linear-gradient(135deg, #7C3AED 0%, #4F46E5 100%);
    --gradient-w: linear-gradient(135deg, #4F46E5 0%, #7C3AED 50%, #EC4899 100%);
    --font-head:  -apple-system, 'Segoe UI', system-ui, BlinkMacSystemFont, sans-serif;
    --font-body:  -apple-system, 'Segoe UI', system-ui, BlinkMacSystemFont, sans-serif;
}

body {
    font-family: var(--font-body);
    color: var(--dark);
    background: #f4f4ff;
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1,h2,h3,h4,h5 { font-family: var(--font-head); font-weight: 800; line-height: 1.25; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; }

/* ── Scrollbar ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f0f0ff; }
::-webkit-scrollbar-thumb { background: var(--primary-l); border-radius: 10px; }

/* ── Navbar ──────────────────────────────────────────────── */
.navbar {
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 var(--border), var(--shadow);
    padding: 0 28px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky; top: 0; z-index: 200;
}
.navbar-brand {
    font-family: var(--font-head);
    font-size: 1.2rem; font-weight: 900;
    color: var(--primary);
    display: flex; align-items: center; gap: 8px;
    text-decoration: none; letter-spacing: -.3px;
}
.navbar-brand:hover { text-decoration: none; opacity: .85; }
.navbar-links { display: flex; gap: 20px; align-items: center; }
.navbar-links a {
    color: #4b5563; font-size: .875rem; font-weight: 500;
    padding: 4px 0;
    position: relative; transition: color .18s;
}
.navbar-links a::after {
    content: ''; position: absolute; bottom: -2px; left: 0; right: 0;
    height: 2px; background: var(--primary);
    transform: scaleX(0); transition: transform .2s;
    border-radius: 2px;
}
.navbar-links a:hover { color: var(--primary); text-decoration: none; }
.navbar-links a:hover::after { transform: scaleX(1); }

/* ── Layout ─────────────────────────────────────────────── */
.main-content { min-height: calc(100vh - 64px - 80px); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 48px 0; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 10px 22px; border-radius: 50px;
    border: none; cursor: pointer; font-size: .875rem;
    font-weight: 600; font-family: var(--font-body);
    transition: all .2s cubic-bezier(.4,0,.2,1);
    text-decoration: none; white-space: nowrap;
    letter-spacing: .01em;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
    background: var(--gradient);
    color: #fff;
    box-shadow: 0 4px 14px rgba(79,70,229,.35);
}
.btn-primary:hover { box-shadow: 0 6px 20px rgba(79,70,229,.45); color: #fff; }
.btn-secondary { background: var(--secondary); color: #fff; box-shadow: 0 4px 14px rgba(124,58,237,.3); }
.btn-secondary:hover { opacity: .9; color: #fff; }
.btn-success   { background: var(--success); color: #fff; }
.btn-danger    { background: var(--danger); color: #fff; }
.btn-outline {
    background: transparent;
    border: 1.5px solid var(--primary);
    color: var(--primary);
    box-shadow: none;
}
.btn-outline:hover { background: var(--primary); color: #fff; box-shadow: 0 4px 14px rgba(79,70,229,.25); }
.btn-ghost {
    background: rgba(79,70,229,.08); color: var(--primary);
    box-shadow: none;
}
.btn-ghost:hover { background: rgba(79,70,229,.14); }
.btn-white { background: #fff; color: var(--primary); box-shadow: var(--shadow-md); }
.btn-white:hover { box-shadow: var(--shadow-lg); color: var(--primary); }
.btn-sm  { padding: 6px 14px; font-size: .8rem; }
.btn-lg  { padding: 14px 32px; font-size: 1rem; }
.btn-xl  { padding: 16px 40px; font-size: 1.05rem; }
.btn-block { width: 100%; justify-content: center; }

/* ── Cards ───────────────────────────────────────────────── */
.card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: box-shadow .2s, transform .2s;
}
.card-body { padding: 22px; }
.card-title { font-family: var(--font-head); font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; }

/* ── Salon Cards ─────────────────────────────────────────── */
.salon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.salon-card { transition: all .25s cubic-bezier(.4,0,.2,1); border-radius: 16px !important; cursor: pointer; }
.salon-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.salon-card img { width: 100%; height: 190px; object-fit: cover; }
.salon-card .card-body { padding: 16px 18px 18px; }
.salon-card .name { font-family: var(--font-head); font-weight: 700; font-size: 1rem; margin-bottom: 2px; color: var(--dark); }
.salon-card .rating { color: #f59e0b; font-size: .875rem; font-weight: 600; }

/* ── Forms ───────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label {
    display: block; font-size: .85rem; font-weight: 600;
    margin-bottom: 7px; color: #374151; letter-spacing: .01em;
}
.form-control {
    width: 100%; padding: 11px 16px;
    border: 1.5px solid #e5e7eb;
    border-radius: var(--radius-sm);
    font-size: .9rem; font-family: var(--font-body);
    transition: all .18s; background: #fff;
    color: var(--dark);
}
.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79,70,229,.12);
}
.form-control::placeholder { color: #9ca3af; }
.form-control:disabled { background: #f9fafb; color: #9ca3af; cursor: not-allowed; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
textarea.form-control { resize: vertical; min-height: 90px; }

/* ── Alerts ──────────────────────────────────────────────── */
.alert {
    padding: 13px 18px; border-radius: var(--radius-sm);
    margin: 14px 0; font-size: .875rem;
    border-left: 4px solid transparent;
    display: flex; align-items: flex-start; gap: 10px;
}
.alert-success { background: #ecfdf5; color: #065f46; border-color: var(--success); }
.alert-danger   { background: #fef2f2; color: #7f1d1d; border-color: var(--danger); }
.alert-warning  { background: #fffbeb; color: #78350f; border-color: var(--warning); }
.alert-info     { background: #eff6ff; color: #1e3a8a; border-color: var(--info); }

/* ── Tables ──────────────────────────────────────────────── */
.table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.table th {
    padding: 11px 14px; text-align: left;
    background: #f8faff; color: #4b5563;
    font-weight: 600; font-size: .8rem;
    text-transform: uppercase; letter-spacing: .05em;
    border-bottom: 2px solid var(--border);
}
.table td { padding: 12px 14px; border-bottom: 1px solid #f3f4f6; vertical-align: middle; }
.table tbody tr:hover { background: #f8faff; }
.table tbody tr:last-child td { border-bottom: none; }

/* ── Badges ──────────────────────────────────────────────── */
.badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 10px; border-radius: 30px;
    font-size: .75rem; font-weight: 600;
}
.badge-pending   { background: #fef3c7; color: #92400e; }
.badge-confirmed { background: #dbeafe; color: #1e40af; }
.badge-completed { background: #d1fae5; color: #065f46; }
.badge-cancelled { background: #fee2e2; color: #7f1d1d; }
.badge-no_show   { background: #f3f4f6; color: #4b5563; }

/* ── Hero ────────────────────────────────────────────────── */
.hero-section {
    background: var(--gradient);
    color: #fff; padding: 88px 0 72px;
    text-align: center; position: relative; overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute; inset: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(255,255,255,.07) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(236,72,153,.15) 0%, transparent 40%),
        url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='30' cy='30' r='25' fill='none' stroke='rgba(255,255,255,0.04)' stroke-width='1.5'/%3E%3C/svg%3E") repeat;
    pointer-events: none;
}
.hero-section h1 {
    font-family: var(--font-head); font-size: 2.8rem; font-weight: 900;
    letter-spacing: -.03em; line-height: 1.1;
    text-shadow: 0 2px 12px rgba(0,0,0,.15);
}
.hero-section p { font-size: 1.1rem; opacity: .9; font-weight: 300; }

.hero-search-bar {
    display: flex; gap: 0; max-width: 600px; margin: 0 auto;
    background: #fff;
    border-radius: 60px;
    box-shadow: 0 8px 32px rgba(0,0,0,.2);
    overflow: hidden;
    padding: 6px 6px 6px 22px;
}
.hero-search-bar input {
    flex: 1; border: none; background: transparent; color: var(--dark);
    font-size: .975rem; font-family: var(--font-body); outline: none;
}
.hero-search-bar input::placeholder { color: #9ca3af; }
.hero-search-bar button {
    padding: 10px 26px;
    background: var(--gradient); color: #fff;
    border: none; border-radius: 50px;
    font-weight: 700; cursor: pointer; font-size: .9rem;
    font-family: var(--font-body); white-space: nowrap;
    transition: opacity .18s;
}
.hero-search-bar button:hover { opacity: .9; }

.stats-bar { display: flex; gap: 0; justify-content: center; flex-wrap: wrap; padding: 20px 0 0; }
.stat-item { text-align: center; padding: 0 28px; }
.stat-item + .stat-item { border-left: 1px solid rgba(255,255,255,.25); }
.stat-num  { font-family: var(--font-head); font-size: 1.6rem; font-weight: 900; }
.stat-lbl  { font-size: .78rem; opacity: .75; font-weight: 300; margin-top: 1px; }

/* ── Category Pills ──────────────────────────────────────── */
.cat-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.cat-pill {
    padding: 7px 18px; border-radius: 30px;
    border: 1.5px solid #e0e2f5;
    color: var(--primary); font-size: .85rem; font-weight: 600;
    background: #fff; text-decoration: none;
    transition: all .18s; cursor: pointer;
    display: inline-flex; align-items: center; gap: 5px;
    font-family: var(--font-body);
}
.cat-pill:hover { background: var(--primary); color: #fff; border-color: var(--primary); text-decoration: none; transform: translateY(-1px); }
.cat-pill.active { background: var(--gradient); color: #fff; border-color: transparent; box-shadow: 0 3px 10px rgba(79,70,229,.3); }

/* ── Section headings ────────────────────────────────────── */
.section-title {
    font-family: var(--font-head); font-size: 1.5rem; font-weight: 900;
    color: var(--dark); letter-spacing: -.02em;
}
.section-subtitle { color: var(--muted); font-size: .9rem; font-weight: 400; margin-top: 4px; }

/* ── Feature tiles ───────────────────────────────────────── */
.feature-tile {
    background: #fff; border-radius: 16px;
    padding: 28px 22px; text-align: center;
    border: 1px solid var(--border);
    transition: all .22s;
}
.feature-tile:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.feature-tile .ico {
    width: 58px; height: 58px; border-radius: 16px;
    background: linear-gradient(135deg,#ede9fe,#ddd6fe);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem; margin: 0 auto 14px;
}

/* ── Footer ──────────────────────────────────────────────── */
footer {
    background: #0f0c2e; color: #a0a0c0;
    padding: 52px 0 24px; margin-top: 72px;
    font-size: .875rem;
}
footer a { color: #a0a0c0; transition: color .18s; }
footer a:hover { color: #fff; text-decoration: none; }
.foot-brand { color: #fff; font-family: var(--font-head); font-size: 1.2rem; font-weight: 800; display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.foot-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 40px; margin-bottom: 40px; }
.foot-col-title { color: #fff; font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 14px; }
.foot-links { display: flex; flex-direction: column; gap: 8px; }
.foot-divider { border: none; border-top: 1px solid rgba(255,255,255,.08); margin-bottom: 20px; }

/* ── Auth pages ──────────────────────────────────────────── */
.auth-wrap {
    min-height: 100vh; display: flex;
    align-items: center; justify-content: center;
    background: linear-gradient(135deg, #f0f0ff 0%, #ede9fe 100%);
    padding: 24px;
}
.auth-card {
    width: 100%; max-width: 440px;
    background: #fff; border-radius: 24px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.8);
}
.auth-header {
    background: var(--gradient);
    padding: 32px 32px 24px;
    text-align: center; color: #fff;
}
.auth-header h2 { font-family: var(--font-head); font-size: 1.5rem; font-weight: 900; margin-top: 10px; }
.auth-header p  { opacity: .85; font-size: .9rem; margin-top: 4px; }
.auth-body { padding: 28px 32px 32px; }
.auth-logo {
    width: 64px; height: 64px; border-radius: 18px;
    background: rgba(255,255,255,.2);
    backdrop-filter: blur(10px);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto; overflow: hidden;
}
.auth-logo img { width: 100%; height: 100%; object-fit: contain; }
.auth-divider {
    text-align: center; position: relative; margin: 20px 0;
    color: var(--muted); font-size: .82rem;
}
.auth-divider::before {
    content: ''; position: absolute;
    top: 50%; left: 0; right: 0;
    height: 1px; background: var(--border);
}
.auth-divider span { background: #fff; padding: 0 12px; position: relative; }

/* ── Booking confirm ─────────────────────────────────────── */
.confirm-wrap {
    min-height: 80vh; display: flex;
    align-items: center; justify-content: center;
    padding: 40px 20px;
}
.confirm-card {
    width: 100%; max-width: 520px;
    background: #fff; border-radius: 24px;
    box-shadow: var(--shadow-lg);
    overflow: hidden; border: 1px solid var(--border);
}
.confirm-header {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    padding: 36px 32px 24px; text-align: center;
}

/* ── My Bookings tabs ────────────────────────────────────── */
.tab-bar {
    display: flex; gap: 0;
    background: #f3f4f6; border-radius: 12px;
    padding: 4px; margin-bottom: 28px;
}
.tab-item {
    flex: 1; padding: 10px 16px;
    text-align: center; border-radius: 9px;
    font-size: .875rem; font-weight: 600;
    color: var(--muted); cursor: pointer;
    text-decoration: none; transition: all .18s;
}
.tab-item:hover { color: var(--primary); text-decoration: none; }
.tab-item.active {
    background: #fff; color: var(--primary);
    box-shadow: var(--shadow);
}

/* ── Booking card ─────────────────────────────────────────── */
.booking-card {
    background: #fff; border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition: box-shadow .2s;
    overflow: hidden;
}
.booking-card:hover { box-shadow: var(--shadow-md); }
.booking-card-stripe {
    height: 4px;
    background: var(--gradient);
}
.booking-card.status-completed .booking-card-stripe { background: linear-gradient(90deg, var(--success), #34d399); }
.booking-card.status-cancelled .booking-card-stripe { background: linear-gradient(90deg, var(--danger), #f87171); }

/* ── Profile ─────────────────────────────────────────────── */
.profile-avatar {
    width: 88px; height: 88px; border-radius: 50%;
    background: var(--gradient);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-head); font-size: 2.2rem; font-weight: 900;
    color: #fff; margin: 0 auto 14px;
    box-shadow: 0 6px 20px rgba(79,70,229,.3);
}
.stat-pill {
    background: #f8faff; border-radius: 12px;
    padding: 14px; text-align: center;
    border: 1px solid var(--border);
}
.stat-pill-num { font-family: var(--font-head); font-size: 1.4rem; font-weight: 900; color: var(--primary); }
.stat-pill-lbl { font-size: .75rem; color: var(--muted); margin-top: 2px; }

/* ── Salon detail ─────────────────────────────────────────── */
.salon-hero { position: relative; height: 280px; overflow: hidden; border-radius: 20px; margin-bottom: 28px; }
.salon-hero img { width: 100%; height: 100%; object-fit: cover; }
.salon-hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(15,12,46,.7) 0%, transparent 60%);
}
.salon-hero-info {
    position: absolute; bottom: 0; left: 0; right: 0;
    padding: 24px; color: #fff;
}

.service-row {
    display: flex; align-items: center;
    padding: 14px 20px;
    transition: background .15s; cursor: default;
}
.service-row:hover { background: #f8faff; }
.service-row + .service-row { border-top: 1px solid #f3f4f6; }

/* ── Slot buttons ─────────────────────────────────────────── */
.slot-btn {
    padding: 7px 14px !important;
    border-radius: 10px !important;
    font-size: .82rem !important; font-weight: 600 !important;
    border: 1.5px solid var(--border) !important;
    background: #fff !important; color: var(--dark) !important;
    transition: all .15s !important;
}
.slot-btn:hover { border-color: var(--primary) !important; color: var(--primary) !important; background: #f0f0ff !important; }
.slot-btn.btn-primary { background: var(--gradient) !important; color: #fff !important; border-color: transparent !important; }
.slot-btn:disabled { opacity: .35 !important; cursor: not-allowed !important; }

/* ── Loading spinner ─────────────────────────────────────── */
.spinner {
    width: 28px; height: 28px;
    border: 3px solid #e5e7f0;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin .7s linear infinite;
    margin: 8px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
    .hero-section h1 { font-size: 1.9rem; }
    .hero-search-bar { margin: 0 4px; }
    .salon-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
    .form-row { grid-template-columns: 1fr; }
    .stats-bar { gap: 0; }
    .stat-item { padding: 0 16px; }
    .foot-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
    .container { padding: 0 16px; }
    .auth-card { border-radius: 20px; }
    .auth-body { padding: 22px 22px 28px; }
    .auth-header { padding: 24px 22px 18px; }
}
@media (max-width: 480px) {
    .salon-grid { grid-template-columns: 1fr; }
    .navbar { padding: 0 16px; }
    .navbar-links a:not(.btn) { display: none; }
    .foot-grid { grid-template-columns: 1fr; }
}
