:root {
    --brand: #7c3aed;
    --brand-dark: #6d28d9;
    --brand-light: #f5f3ff;
    --brand-gradient: linear-gradient(135deg, #7c3aed 0%, #a855f7 50%, #ec4899 100%);
    --surface: #ffffff;
    --surface-muted: #fafafa;
    --text: #1f2937;
    --text-muted: #6b7280;
    --border: #e5e7eb;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(124, 58, 237, 0.08);
    --shadow-lg: 0 12px 32px rgba(124, 58, 237, 0.12);
    --radius: 0.75rem;
}

body {
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    background: var(--surface-muted);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Bootstrap overrides */
.text-primary { color: var(--brand) !important; }
.bg-primary { background-color: var(--brand) !important; }
.border-primary { border-color: var(--brand) !important; }

.btn-primary {
    background: var(--brand);
    border-color: var(--brand);
    font-weight: 500;
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--brand-dark);
    border-color: var(--brand-dark);
}

.btn-outline-primary {
    color: var(--brand);
    border-color: var(--brand);
    font-weight: 500;
}

.btn-outline-primary:hover {
    background: var(--brand);
    border-color: var(--brand);
}

/* Header */
.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.navbar-brand {
    letter-spacing: -0.02em;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    background: var(--brand-gradient);
    color: #fff;
    font-size: 1rem;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 500;
    color: var(--text-muted) !important;
    border-radius: 0.5rem;
    padding: 0.4rem 0.75rem !important;
    transition: color 0.15s, background 0.15s;
}

.nav-link:hover {
    color: var(--brand) !important;
    background: var(--brand-light);
}

.header-search {
    max-width: 420px;
    min-width: 0;
}

.header-search .form-control:focus {
    border-color: var(--border);
    box-shadow: none;
}

.header-search .input-group:focus-within {
    box-shadow: 0 0 0 0.2rem rgba(124, 58, 237, 0.15);
    border-radius: 999px;
}

.header-search .input-group {
    border-radius: 999px;
    overflow: hidden;
    background: var(--surface-muted);
}

.header-search .input-group-text,
.header-search .form-control {
    border-color: var(--border);
    background: transparent;
}

.header-search .input-group-text {
    border-left: none;
    color: var(--text-muted);
}

.header-search .form-control {
    border-right: none;
}

/* Search suggestions */
.search-suggestions {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 1050;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    max-height: 320px;
    overflow-y: auto;
}

.search-suggestion-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
}

.search-suggestion-item:last-child {
    border-bottom: none;
}

.search-suggestion-item:hover,
.search-suggestion-item.active {
    background: var(--brand-light);
}

.search-suggestion-item .label {
    font-weight: 500;
    font-size: 0.9rem;
}

.search-suggestion-item .meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.search-suggestion-type {
    font-size: 0.7rem;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    background: #f3f4f6;
    color: var(--text-muted);
}

.search-suggestions-empty {
    padding: 0.75rem 0.85rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Hero */
.hero-section {
    background: var(--brand-gradient);
    border-radius: 1.25rem;
    padding: 2.5rem 2rem;
    color: #fff;
    position: relative;
    overflow: hidden;
    margin-bottom: 2.5rem;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -40%;
    left: -10%;
    width: 280px;
    height: 280px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    right: -5%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 50%;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 5rem;
    height: 5rem;
    border-radius: 1.25rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    font-size: 2.25rem;
    margin-bottom: 1.25rem;
}

.hero-section h1 {
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.hero-section .lead {
    color: rgba(255, 255, 255, 0.88);
    margin-bottom: 1.5rem;
}

.hero-section .btn-light {
    font-weight: 600;
    color: var(--brand-dark);
}

.hero-section .btn-outline-light {
    font-weight: 500;
    border-width: 2px;
}

.hero-section .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

/* Section titles */
.section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-title .bi {
    color: var(--brand);
    font-size: 1.1rem;
}

/* Cards */
.card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.salon-card {
    padding: 1.25rem;
}

.salon-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.65rem;
    background: var(--brand-light);
    color: var(--brand);
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.review-card {
    padding: 1.25rem;
}

.review-author {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
    margin: 0;
}

.review-author .bi {
    color: var(--brand);
    font-size: 1.1rem;
}

.review-card-footer {
    border-top: 1px solid #f3f4f6;
    padding-top: 0.75rem;
    margin-top: 0.75rem;
}

/* Service pills */
.badge-service {
    background: var(--brand-light);
    color: var(--brand);
    font-weight: 500;
}

.service-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1rem;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.service-pill .bi {
    color: var(--brand);
    font-size: 1rem;
}

.service-pill:hover {
    background: var(--brand-light);
    border-color: var(--brand);
    color: var(--brand);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* Stars */
.rating-stars {
    display: inline-flex;
    gap: 0.25rem;
    direction: ltr;
}

.rating-stars input {
    display: none;
}

.rating-stars label {
    font-size: 2rem;
    color: #d1d5db;
    cursor: pointer;
    transition: color 0.15s;
    user-select: none;
}

.rating-stars label.is-active {
    color: #f59e0b;
}

.star-rating {
    display: inline-flex;
    gap: 0.1rem;
    direction: ltr;
}

.star-rating .bi-star-fill {
    color: #f59e0b;
    font-size: 0.85rem;
}

.star-rating .bi-star {
    color: #d1d5db;
    font-size: 0.85rem;
}

.star-rating-lg .bi-star-fill,
.star-rating-lg .bi-star {
    font-size: 1.1rem;
}

.review-snippet {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Page headers */
.page-header {
    margin-bottom: 1.75rem;
}

.page-header-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    background: var(--brand-light);
    color: var(--brand);
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
}

/* Forms */
.form-section-title {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.form-section-title .bi {
    color: var(--brand);
}

.optional-block summary {
    cursor: pointer;
    color: var(--brand);
    font-weight: 500;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

/* Empty states */
.empty-state {
    text-align: center;
    padding: 2.5rem 1.5rem;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px dashed var(--border);
}

.empty-state .bi {
    font-size: 2.5rem;
    color: var(--brand);
    opacity: 0.6;
    margin-bottom: 1rem;
}

/* Footer */
.site-footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    margin-top: 3rem;
}

.site-footer a {
    color: var(--brand);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.site-footer a:hover {
    text-decoration: underline;
}

/* Meta info rows */
.meta-row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.meta-row .bi {
    color: var(--brand);
    opacity: 0.7;
}

/* Login card */
.auth-card {
    border-radius: 1rem;
    border: none;
    box-shadow: var(--shadow-md);
}

.auth-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background: var(--brand-light);
    color: var(--brand);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* Salon searchable picker (create review) */
.salon-picker {
    position: relative;
}

.salon-picker-list {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 1050;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    max-height: 280px;
    overflow-y: auto;
}

.salon-picker-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 0;
    border-bottom: 1px solid #f3f4f6;
    background: transparent;
    text-align: right;
    cursor: pointer;
}

.salon-picker-item:last-child {
    border-bottom: none;
}

.salon-picker-item:hover,
.salon-picker-item.active {
    background: var(--brand-light);
}

.salon-picker-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
}

.salon-picker-district {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.salon-picker-empty {
    padding: 0.85rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

@media (max-width: 991.98px) {
    .header-search {
        max-width: none;
        width: 100%;
    }

    .hero-section {
        padding: 2rem 1.25rem;
    }
}
