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

:root {
    --primary: #c5a059;
    --primary-dark: #a68545;
    --secondary: #2c2c2c;
    --accent: #f8f1e5;
    --text-main: #1a1a1a;
    --text-muted: #666666;
    --bg-main: #fcfcfc;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.4);
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.05);
    --shadow-bold: 0 20px 40px rgba(197, 160, 89, 0.15);
    --radius-lg: 24px;
    --radius-md: 16px;
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* --- Layout --- */
.app {
    display: flex;
    /* Sidebar and Main side by side */
    min-height: 100vh;
}

@media (max-width: 991px) {
    .app {
        display: block;
        /* Stack on mobile */
    }
}

.sidebar {
    width: 280px;
    flex-shrink: 0;
    background: var(--secondary);
    min-height: 100vh;
    position: sticky;
    top: 0;
}

@media (max-width: 991px) {
    .sidebar {
        display: none;
        /* Hide sidebar on mobile */
    }
}

.main {
    flex-grow: 1;
    background: #fcfcfc;
    min-width: 0;
    /* Prevents flex items from overflowing */
}

/* --- Sticky Navbar Fix --- */
.navbar {
    z-index: 1000;
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
    font-weight: 500;
    transition: var(--transition);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary) !important;
}

.navbar-brand {
    color: var(--primary) !important;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.7;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
.salon-name {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
}

/* Background Elements */
body::before {
    content: '';
    position: fixed;
    top: -10%;
    right: -10%;
    width: 40%;
    height: 40%;
    background: radial-gradient(circle, rgba(197, 160, 89, 0.05) 0%, transparent 70%);
    z-index: -1;
}

body::after {
    content: '';
    position: fixed;
    bottom: -10%;
    left: -10%;
    width: 40%;
    height: 40%;
    background: radial-gradient(circle, rgba(44, 44, 44, 0.03) 0%, transparent 70%);
    z-index: -1;
}

/* --- Layout --- */
.container-fluid,
.container {
    max-width: 1400px;
}

/* --- Header (Hero) Section --- */
.salon-header {
    height: 95vh;
    min-height: 650px;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    padding: 0 20px;
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
        url('../hero_bg.png') no-repeat center center fixed;
    background-size: cover;
    position: relative;
    color: white;
    margin-bottom: 0;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    /* Force full width regardless of container */
}

.salon-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(to top, var(--bg-main), transparent);
}

.salon-name {
    font-size: clamp(3rem, 10vw, 5.5rem);
    background: linear-gradient(135deg, #ffffff 0%, #c5a059 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -3px;
    margin-bottom: 1rem;
    font-weight: 800;
    text-transform: uppercase;
    animation: fadeInUp 1.2s ease-out;
}

.salon-slogan {
    font-size: 1.4rem;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 300;
    margin-bottom: 3.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    letter-spacing: 1px;
    animation: fadeInUp 1.2s ease-out 0.3s backwards;
}

.contact-info {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 3.5rem;
    animation: fadeInUp 1.2s ease-out 0.6s backwards;
}

.contact-info p {
    font-weight: 500;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 12px 25px;
    border-radius: 99px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 0 !important;
    font-size: 0.95rem;
    color: white;
}

.contact-info p strong {
    color: var(--primary);
    margin-right: 5px;
}

/* --- Buttons --- */
.btn {
    padding: 16px 40px;
    border-radius: 99px;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 0.5px;
    transition: var(--transition);
    border: none;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.book-appointment-btn {
    background: var(--secondary);
    color: white;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.book-appointment-btn:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow-bold);
}

.btn-primary {
    background: var(--primary);
    border: none;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-outline-primary {
    border: 2px solid var(--primary);
    color: var(--primary);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary);
    color: white;
}

/* --- Price List Section --- */
.price-list {
    background: var(--bg-main);
    padding: 80px 0;
}

.category-header {
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
}

.category-header h3 {
    font-size: 2.5rem;
    color: var(--secondary);
    display: inline-block;
    position: relative;
    padding-bottom: 15px;
}

.category-header h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 25%;
    width: 50%;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

.category-header p {
    font-style: italic;
    color: var(--text-muted);
    margin-top: 10px;
}

/* --- Service Cards --- */
.service-card {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.05);
    /* Very subtle border */
    border-radius: var(--radius-md);
    padding: 40px 30px;
    height: 100%;
    position: relative;
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary);
    transform: scaleX(0);
    transition: transform 0.5s ease;
    transform-origin: left;
}

.service-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 30px 60px rgba(197, 160, 89, 0.15);
    border-color: rgba(197, 160, 89, 0.3);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card .card-title {
    font-size: 1.4rem;
    margin-bottom: 2rem;
    color: var(--secondary);
    font-weight: 600;
    letter-spacing: -0.5px;
}

.service-card:hover .card-title {
    color: var(--primary);
}

.price-tag {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
    font-family: 'Montserrat', sans-serif;
}

.duration-tag {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* --- Booking Page Specifics --- */
.booking-step {
    animation: fadeIn 0.5s ease-out;
}

.card {
    border: none;
    border-radius: var(--radius-lg);
    background: white;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

/* --- Admin Stat Cards --- */
.stat-card-premium {
    border-radius: var(--radius-md);
    padding: 25px;
    height: 100%;
    border: 1px solid var(--glass-border);
    background: white;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.stat-card-premium:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-bold);
}

.stat-card-premium::after {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 80px;
    height: 80px;
    background: var(--primary);
    opacity: 0.05;
    border-radius: 50%;
    z-index: -1;
}

.stat-card-premium .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary);
    line-height: 1;
    margin-bottom: 5px;
}

.stat-card-premium .stat-label {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    font-weight: 600;
    color: var(--text-muted);
}

.stat-card-premium .stat-icon {
    position: absolute;
    top: 25px;
    right: 25px;
    font-size: 1.5rem;
    color: var(--primary);
    opacity: 0.5;
}

.card-header {
    background: var(--secondary);
    color: white;
    padding: 25px;
    border-bottom: none;
}

.card-header h4 {
    margin: 0;
    font-weight: 600;
}

.form-check {
    padding: 25px;
    /* Clean padding without radio overlap */
    border: 2px solid rgba(0, 0, 0, 0.08);
    /* Slightly thicker border */
    border-radius: var(--radius-md);
    margin-bottom: 15px;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    cursor: pointer;
    background: white;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Highlight the whole card when the hidden radio inside is checked */
.form-check:has(input:checked) {
    border-color: var(--primary) !important;
    background: var(--accent) !important;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(197, 160, 89, 0.15);
}

.form-check:has(input:checked)::after {
    content: '\f058';
    /* FontAwesome check-circle icon */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 15px;
    right: 15px;
    color: var(--primary);
    font-size: 1.2rem;
}

.form-check:hover {
    border-color: var(--primary);
    background: var(--accent);
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(197, 160, 89, 0.1);
}

.form-check-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.form-check-input:checked+.form-check-label {
    font-weight: 600;
}

.form-check:has(.form-check-input:checked) {
    border-color: var(--primary);
    background: var(--accent);
    box-shadow: 0 4px 12px rgba(197, 160, 89, 0.1);
}

.form-control {
    border-radius: 12px;
    padding: 14px 20px;
    border: 1px solid #ddd;
    box-shadow: none;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(197, 160, 89, 0.1);
}

/* Time Slots */
.time-slot {
    padding: 12px 24px;
    border-radius: 12px;
    border: 1px solid #eee;
    margin: 5px;
    background: white;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    font-size: 0.95rem;
}

.time-slot:hover {
    border-color: var(--primary);
    background: var(--accent);
    transform: scale(1.05);
}

.time-slot.selected {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 15px rgba(197, 160, 89, 0.3);
}

.time-slot.busy {
    background: #ffe5e5;
    color: #cc0000;
    border-color: #ffcccc;
    cursor: not-allowed;
    opacity: 0.7;
}

.time-slot.busy:hover {
    transform: none;
    box-shadow: none;
}

/* Stylist Selection */
.stylist-card {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--radius-md);
    padding: 30px 20px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    background: white;
}

.stylist-card:hover {
    border-color: var(--primary);
    background: var(--accent);
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(197, 160, 89, 0.12);
}

.stylist-card.selected {
    border-color: var(--primary) !important;
    background: var(--accent) !important;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(197, 160, 89, 0.15);
    position: relative;
}

.stylist-card.selected::after {
    content: '\f058';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 10px;
    right: 10px;
    color: var(--primary);
    font-size: 1.1rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* --- Responsive --- */
/* --- Mobile Optimization --- */
@media (max-width: 991px) {
    .salon-header {
        height: 70vh;
        min-height: 400px;
        padding: 40px 20px;
        width: 100%;
        margin-left: 0;
    }

    .salon-name {
        font-size: clamp(2.2rem, 10vw, 3.5rem);
        letter-spacing: -1px;
    }

    .salon-slogan {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }

    .contact-info {
        gap: 0.8rem;
        margin-bottom: 2rem;
    }

    .contact-info p {
        padding: 8px 15px;
        font-size: 0.85rem;
    }

    .price-list {
        padding: 40px 0;
    }
}

@media (max-width: 768px) {
    .category-header {
        margin-bottom: 2rem;
    }

    .category-header h3 {
        font-size: 1.8rem;
    }

    .service-card {
        padding: 20px;
        margin-bottom: 10px;
    }

    .service-card .card-title {
        font-size: 1.1rem;
        margin-bottom: 1.2rem;
    }

    .price-tag {
        font-size: 1.4rem;
    }

    .duration-tag {
        font-size: 0.8rem;
    }

    .hero-actions .btn {
        width: 100%;
        padding: 14px 25px;
    }

    /* Booking Specific Optimization */
    .form-check {
        padding: 15px;
    }

    .time-slot {
        width: 31%;
        margin: 1%;
        text-align: center;
        padding: 8px 1px;
        font-size: 0.8rem;
    }

    .stylist-card {
        padding: 20px 15px;
    }

    .booking-step h5 {
        font-size: 1.1rem;
    }

    .booking-step .mt-5.pt-3.border-top {
        display: flex;
        flex-direction: column-reverse;
        gap: 15px;
    }

    .booking-step .btn {
        width: 100%;
        margin: 0 !important;
    }
}

@media (max-width: 576px) {
    .navbar-brand {
        font-size: 1rem;
    }

    .container {
        padding-left: 15px;
        padding-right: 15px;
    }

    .time-slot {
        width: 31%;
        margin: 1%;
        font-size: 0.7rem;
        padding: 6px 0;
    }

    .form-check-label .d-flex {
        flex-direction: column;
        align-items: flex-start !important;
    }

    .form-check-label .text-primary {
        margin-top: 5px;
    }
}

/* Admin Sidebar Modernization */
.sidebar {
    background: var(--secondary) !important;
    border-right: none !important;
}

.sidebar-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    padding: 2rem !important;
}

.sidebar-header h4 {
    color: white !important;
    letter-spacing: 1px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
}

.sidebar-nav a {
    color: rgba(255, 255, 255, 0.7) !important;
    padding: 15px 2rem !important;
    font-weight: 400 !important;
    display: flex !important;
    align-items: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    color: white !important;
    background: rgba(197, 160, 89, 0.2) !important;
    border-left: 4px solid var(--primary);
}

.main {
    background: #fcfcfc;
}

/* --- Admin Mobile Nav --- */
.admin-mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--secondary);
    z-index: 1050;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 0;
    display: none;
    box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.3);
}

@media (max-width: 991px) {
    .admin-mobile-nav {
        display: block;
    }

    body.admin-body {
        padding-bottom: 70px;
    }

    .main {
        padding-top: 20px;
    }
}

.admin-nav-wrapper {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    /* Add MS prefix */
    padding: 0 10px;
    gap: 10px;
}

.admin-nav-wrapper::-webkit-scrollbar {
    display: none;
}

.admin-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    min-width: 80px;
    text-align: center;
    transition: var(--transition);
}

/* --- Admin Mobile Scroll --- */
@media (max-width: 991px) {
    .mobile-scroll-row {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 20px;
        margin-left: -5px;
        margin-right: -5px;
        scrollbar-width: none;
    }

    .mobile-scroll-row::-webkit-scrollbar {
        display: none;
    }

    .mobile-scroll-row>[class*="col-"] {
        flex: 0 0 auto;
        width: 135px;
        /* Better balanced width */
        padding-left: 5px;
        padding-right: 5px;
    }
}

/* --- Admin Mobile Table --- */
@media (max-width: 768px) {
    .table-responsive {
        font-size: 0.75rem;
        /* Smaller font for table */
    }

    .table th,
    .table td {
        padding: 8px 4px !important;
        white-space: nowrap;
    }

    .stat-card-premium {
        padding: 15px 10px;
        text-align: center;
        overflow: hidden;
        position: relative;
    }

    .stat-card-premium .stat-label {
        font-size: 0.65rem;
        letter-spacing: 0.5px;
        white-space: normal;
        line-height: 1.1;
        opacity: 0.8;
        position: relative;
        z-index: 2;
    }

    .stat-card-premium .stat-value {
        font-size: 1.5rem;
        margin-bottom: 3px;
        font-weight: 800;
        display: block;
        position: relative;
        z-index: 2;
    }

    .stat-card-premium .stat-icon {
        display: block !important;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        font-size: 2.8rem;
        opacity: 0.07 !important;
        z-index: 1;
        color: var(--secondary);
    }

    .hide-on-mobile {
        display: none !important;
    }

    /* Smaller buttons in tables on mobile */
    .table .btn-sm {
        padding: 4px 6px !important;
        font-size: 0.65rem !important;
    }

    .table td {
        vertical-align: middle;
    }
}

.admin-nav-item i {
    font-size: 1.25rem;
    margin-bottom: 3px;
}

.admin-nav-item span {
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
    letter-spacing: 0.5px;
}

.admin-nav-item.active {
    color: var(--primary);
}