/* ============================================
   Crystal Beauty — Premium Manicure Booking
   ============================================ */

/* Theme: Rose Glass (default) */
:root,
[data-theme="rose-glass"] {
    --bg-top: #F9F1F0;
    --bg-bottom: #E8EBF2;
    --glass-bg: rgba(255, 255, 255, 0.5);
    --glass-border: rgba(255, 255, 255, 0.7);
    --text-main: #332D2D;
    --text-secondary: #8E8484;
    --accent-rose: #C68E8E;
    --accent-light: rgba(198, 142, 142, 0.12);
    --accent-dark: #2D241E;
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    --bg-card: #ffffff;
    --bg-input: #F9F4F4;
    --nav-bg: rgba(255, 255, 255, 0.85);

    /* Typography Tokens */
    --fs-xs: 12px;
    --fs-sm: 13px;
    --fs-base: 14px;
    --fs-md: 16px;
    --fs-lg: 18px;
    --fs-xl: 20px;
    --fs-2xl: 24px;
    --fs-3xl: 28px;
    --fs-hero: 32px;
    --fs-avatar: 48px;
}

/* Theme: Nude Beige — warm & earthy */
[data-theme="nude-beige"] {
    --bg-top: #F5EDE3;
    --bg-bottom: #E8DDD0;
    --glass-bg: rgba(255, 252, 247, 0.55);
    --glass-border: rgba(255, 248, 240, 0.7);
    --text-main: #3D3129;
    --text-secondary: #9A8B7A;
    --accent-rose: #B8926A;
    --accent-light: rgba(184, 146, 106, 0.12);
    --accent-dark: #3D3129;
    --card-shadow: 0 4px 20px rgba(60, 40, 20, 0.06);
    --bg-card: #FFFBF6;
    --bg-input: #F5EDE5;
    --nav-bg: rgba(255, 252, 247, 0.88);
}

/* Theme: Lavender Mist — soft purple elegance */
[data-theme="lavender-mist"] {
    --bg-top: #F0EDF6;
    --bg-bottom: #E4E0EE;
    --glass-bg: rgba(255, 255, 255, 0.5);
    --glass-border: rgba(240, 235, 250, 0.75);
    --text-main: #2D2A35;
    --text-secondary: #8A84A0;
    --accent-rose: #9B7EC8;
    --accent-light: rgba(155, 126, 200, 0.12);
    --accent-dark: #2D2A35;
    --card-shadow: 0 4px 20px rgba(80, 60, 120, 0.06);
    --bg-card: #FDFCFF;
    --bg-input: #F0ECF5;
    --nav-bg: rgba(248, 245, 255, 0.88);
}

/* Theme: Mint Breeze — fresh & calm */
[data-theme="mint-breeze"] {
    --bg-top: #EDF5F2;
    --bg-bottom: #E0EDE8;
    --glass-bg: rgba(255, 255, 255, 0.5);
    --glass-border: rgba(235, 248, 243, 0.75);
    --text-main: #2A3530;
    --text-secondary: #7A9A8B;
    --accent-rose: #6BAF92;
    --accent-light: rgba(107, 175, 146, 0.12);
    --accent-dark: #2A3530;
    --card-shadow: 0 4px 20px rgba(30, 80, 60, 0.06);
    --bg-card: #FBFEFC;
    --bg-input: #ECF5F0;
    --nav-bg: rgba(245, 253, 249, 0.88);
}

/* Theme: Dark Luxury — noir & gold */
[data-theme="dark-luxury"] {
    --bg-top: #1A1A1F;
    --bg-bottom: #12121A;
    --glass-bg: rgba(26, 26, 31, 0.65);
    --glass-border: rgba(70, 70, 85, 0.5);
    --text-main: #FFFFFF;
    --text-secondary: #D0CCD5;
    /* Made lighter for better readability */
    --accent-rose: #C8A96E;
    --accent-light: rgba(200, 169, 110, 0.25);
    /* Slightly more prominent */
    --accent-dark: #FFFFFF;
    --card-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
    --bg-card: #242428;
    --bg-input: #2A2A30;
    --nav-bg: rgba(26, 26, 31, 0.92);
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Tenor Sans', sans-serif;
    background: var(--bg-top);
    background-image: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
    background-repeat: no-repeat;
    min-height: 100vh;
    color: var(--text-main);
    display: flex;
    justify-content: center;
    overflow-x: hidden;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
    -webkit-appearance: none;
}

* {
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

/* ---- App Container ---- */
.app-container {
    width: 100%;
    max-width: 500px;
    padding: 24px 20px 100px;
}

/* ---- Header ---- */
.profile-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.avatar-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 0.5px solid var(--accent-rose);
    box-shadow: var(--card-shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.avatar-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-info h1 {
    margin: 0;
    font-size: var(--fs-3xl);
    font-weight: 600;
    color: var(--text-main);
}

.profile-info p {
    margin: 4px 0 0;
    font-size: var(--fs-md);
    color: var(--text-secondary);
    font-weight: 400;
}

/* ---- Slots Widget ---- */
.slots-widget {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 18px 20px;
    margin-bottom: 32px;
    box-shadow: var(--card-shadow);
}

.section-title {
    font-size: var(--fs-2xl);
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-heading {
    font-size: var(--fs-3xl);
    font-weight: 500;
    margin: 0 0 30px 0;
    color: var(--text-main);
}

.slot-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: var(--fs-md);
    color: var(--text-secondary);
}

.slot-row:last-child {
    margin-bottom: 0;
}

.slot-row strong {
    font-weight: 600;
    color: var(--accent-rose);
}

/* ---- Services Scroll ---- */
.services-container {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 12px;
    margin-bottom: 24px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    cursor: grab;
}

.services-container::-webkit-scrollbar {
    display: none;
}

.service-card {
    flex: 0 0 240px;
    height: 320px;
    border-radius: 24px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    border: 3px solid transparent;
    background: var(--bg-input);
}

.service-card:active {
    transform: scale(0.97);
}

.service-card.selected {
    border-color: var(--accent-rose);
    box-shadow: var(--card-shadow);
}

.service-img {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

.service-info {
    position: absolute;
    bottom: 12px;
    left: 10px;
    right: 10px;
    background: var(--glass-bg);
    /* Use variable instead of hardcoded white rgba */
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
}

.service-info h3 {
    margin: 0;
    font-weight: 600;
    font-size: var(--fs-md);
    color: var(--text-main);
    margin-bottom: 3px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
    /* Add slight text shadow for better readability over images */
}

.service-desc {
    font-size: var(--fs-xs);
    color: var(--text-main);
    /* Change from --text-secondary for better contrast */
    opacity: 0.9;
    margin: 0 0 8px 0;
    line-height: 1.3;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.service-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.duration {
    font-size: var(--fs-xs);
    color: var(--text-main);
    background: var(--glass-bg);
    padding: 3px 8px;
    border-radius: 6px;
    font-weight: 500;
}

.price {
    font-weight: 600;
    color: var(--accent-rose);
    font-size: var(--fs-md);
}

/* ---- Calendar ---- */
.calendar-wrapper {
    margin-bottom: 24px;
}

.calendar-picker-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--accent-rose);
    cursor: pointer;
    transition: all 0.2s;
    margin-left: 4px;
    flex-shrink: 0;
}

.calendar-picker-icon:active {
    transform: scale(0.9);
    background: var(--accent-light);
}

.calendar-picker-icon input[type="date"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.calendar-strip {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    overflow-y: visible;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding: 4px 2px 12px;
}

.calendar-strip::-webkit-scrollbar {
    display: none;
}

.day-item {
    flex: 0 0 58px;
    height: 74px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    transition: all 0.25s ease;
    cursor: pointer;
}

.day-item:active {
    transform: scale(0.95);
}

.day-item.active {
    background: var(--accent-rose);
    border-color: var(--accent-rose);
    color: white;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--accent-rose) 30%, transparent);
}

.day-item span {
    font-size: var(--fs-xs);
    text-transform: uppercase;
    font-weight: 600;
    opacity: 0.65;
}

.day-item strong {
    font-size: var(--fs-xl);
    font-weight: 600;
}

.day-item.active span {
    opacity: 1;
    color: white;
}

.day-item.disabled {
    opacity: 0.3;
    pointer-events: none;
    filter: grayscale(1);
}

/* ---- Toast Notification ---- */
.toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 90%;
    max-width: 350px;
    pointer-events: none;
}

.toast {
    background: rgba(45, 36, 30, 0.95);
    color: white;
    padding: 12px 20px;
    border-radius: 14px;
    font-size: var(--fs-base);
    font-weight: 500;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: toastIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    display: flex;
    align-items: center;
    gap: 10px;
    pointer-events: auto;
}

.toast.error {
    border-left: 4px solid #D4615E;
}

.toast.success {
    border-left: 4px solid #8BC6A0;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.toast.hiding {
    animation: toastOut 0.3s ease forwards;
}

@keyframes toastOut {
    to {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
}

/* ---- Custom Calendar Modal ---- */
.cal-nav {
    background: none;
    border: none;
    font-size: var(--fs-xl);
    color: var(--accent-rose);
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
}

.cal-nav:active {
    background: var(--accent-light);
}

.cal-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--fs-base);
    font-weight: 500;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-main);
}

.cal-day:active {
    transform: scale(0.9);
}

.cal-day.empty {
    pointer-events: none;
}

.cal-day.today {
    color: var(--accent-rose);
    font-weight: 700;
    background: var(--accent-light);
}

.cal-day.selected {
    background: var(--accent-rose);
    color: white;
    box-shadow: 0 4px 10px color-mix(in srgb, var(--accent-rose) 40%, transparent);
}

.cal-day.disabled {
    opacity: 0.3;
    pointer-events: none;
    filter: grayscale(1);
    background: rgba(0, 0, 0, 0.05);
}

/* ---- Time Grid ---- */
.time-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 24px;
}

.time-item {
    height: 46px;
    background: var(--glass-bg);
    border: 1.5px solid var(--glass-border);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--fs-md);
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
    color: var(--text-main);
}

.time-item:active {
    transform: scale(0.95);
}

.time-item.active {
    border-color: var(--accent-rose);
    color: var(--accent-rose);
    background: var(--bg-card);
    font-weight: 600;
    box-shadow: 0 3px 10px color-mix(in srgb, var(--accent-rose) 20%, transparent);
}

/* ============================================
   Confirmation Overlay (Fixed!)
   ============================================ */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    /* darkened background */
    backdrop-filter: blur(5px);
    z-index: 999999;
    /* Max z-index to stay above everything */
    display: none;
    /* Hide by default using display instead of opacity */
    align-items: center;
    justify-content: center;
}

.overlay.active {
    display: flex;
}

.confirm-card {
    background: var(--bg-card);
    width: 90%;
    max-width: 340px;
    border-radius: 20px;
    padding: 24px;
    text-align: center;
    border: 0.5px solid var(--accent-rose);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    position: relative;
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ============================================
   Skeletons
   ============================================ */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.skeleton {
    animation: shimmer 1.5s infinite linear;
    background: linear-gradient(90deg, var(--glass-bg) 25%, color-mix(in srgb, var(--glass-bg) 80%, white 20%) 50%, var(--glass-bg) 75%);
    background-size: 200% 100%;
    border-radius: 8px;
}

.skeleton-text {
    height: 14px;
    margin-bottom: 8px;
    border-radius: 4px;
}

.skeleton-img {
    height: 180px;
    width: 100%;
    border-radius: 20px;
}

.service-card.skeleton-card {
    background: var(--bg-card);
    display: flex;
    flex-direction: column;
}

.skeleton-full-img {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    flex-shrink: 0;
}

.skeleton-time-btn {
    height: 46px;
    border-radius: 14px;
}

.close-overlay {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: var(--fs-xl);
    color: var(--text-secondary);
    cursor: pointer;
}

.success-icon {
    display: none;
}

.confirm-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--accent-light);
    color: var(--accent-rose);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 16px auto;
}

.confirm-icon svg {
    width: 32px;
    height: 32px;
    stroke: var(--accent-rose);
}

.confirm-icon.tick-mode {
    animation: pulseIconTick 1s ease-in-out infinite alternate;
}

.confirm-icon.hourglass-mode {
    animation: pulseIconHourglass 0.8s ease-in-out infinite alternate;
}

.confirm-icon.hourglass-mode svg {
    animation: shrinkIconHourglass 0.8s ease-in-out infinite alternate;
}

@keyframes pulseIconTick {
    from {
        transform: scale(0.95);
    }

    to {
        transform: scale(1.08);
    }
}

@keyframes pulseIconHourglass {
    from {
        transform: scale(0.9);
        box-shadow: 0 0 0 rgba(198, 142, 142, 0);
    }

    to {
        transform: scale(1.15);
        box-shadow: 0 0 15px rgba(198, 142, 142, 0.5);
    }
}

@keyframes shrinkIconHourglass {
    from {
        transform: scale(1.05);
    }

    to {
        transform: scale(0.85);
    }
}

.confirm-card h2 {
    margin: 0 0 16px 0;
    color: var(--text-main);
    font-size: var(--fs-xl);
}

#confirm-details {
    text-align: left;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 16px;
    font-size: var(--fs-md);
    line-height: 1.6;
    font-family: inherit;
    color: var(--text-main);
}

.confirm-note {
    font-size: var(--fs-sm);
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.done-btn {
    width: 100%;
    background: var(--accent-rose);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 12px;
    font-size: var(--fs-lg);
    font-weight: 600;
    cursor: pointer;
}

/* Promo Section */
.promo-section {
    margin-top: 24px;
    padding: 0 4px;
}

.input-field-compact {
    display: flex;
    gap: 10px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 6px;
    border-radius: 12px;
}

.input-field-compact input {
    flex: 1;
    background: none;
    border: none;
    padding: 8px 12px;
    font-family: inherit;
    font-size: var(--fs-md);
    color: var(--text-main);
    outline: none;
}

.input-field-compact button {
    background: var(--accent-rose);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: var(--fs-base);
    font-weight: 500;
    cursor: pointer;
}

.promo-msg {
    font-size: var(--fs-sm);
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.03);
    text-align: center;
    font-weight: 500;
}

.promo-msg.success {
    color: var(--accent-rose);
    background: var(--accent-light);
    /* light rose background */
}

.promo-msg.error {
    color: #e57373;
    background: rgba(229, 115, 115, 0.1);
}

.client-promo-item {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.client-promo-item:active {
    background: var(--bg-input);
}

.promo-code-text {
    font-size: var(--fs-md);
    font-weight: 600;
    color: var(--accent-rose);
    background: var(--accent-light);
    padding: 4px 12px;
    border-radius: 8px;
    margin-bottom: 6px;
    display: inline-block;
}

.promo-label-text {
    font-size: var(--fs-sm);
    color: var(--text-secondary);
    text-align: center;
}

.loading {
    padding: 40px;
    text-align: center;
    color: var(--text-secondary);
    font-size: var(--fs-md);
    grid-column: 1 / -1;
}

/* ---- Contact Info Form ---- */
.contact-field {
    margin-bottom: 14px;
}

.contact-field label {
    display: block;
    font-size: var(--fs-sm);
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.contact-input {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: var(--fs-md);
    color: var(--text-main);
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
    user-select: text;
    -webkit-user-select: text;
    box-sizing: border-box;
}

.contact-input:focus {
    border-color: var(--accent-rose);
}

/* ---- Bottom Nav Bar & Tabs ---- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    justify-content: space-around;
    padding: 12px 10px 24px;
    border-top: 1px solid var(--glass-border);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.04);
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
}

.nav-item:active {
    transform: scale(0.92);
}

.nav-item .nav-icon {
    width: 24px;
    height: 24px;
    transition: stroke 0.2s ease;
}

.nav-item span {
    font-size: var(--fs-xs);
    font-weight: 500;
}

.nav-item.active {
    color: var(--accent-rose);
}

.nav-item.active .nav-icon {
    stroke: var(--accent-rose);
}

/* ---- Tab Content ---- */
.tab-content {
    display: none;
    width: 100%;
}

.tab-content.active {
    display: block;
    animation: fadeUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---- Full Services List ---- */
.full-service-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 14px 16px 16px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    box-shadow: var(--card-shadow);
    transition: transform 0.2s;
    cursor: pointer;
}

.full-service-card:active {
    transform: scale(0.97);
}

.full-service-img {
    width: 90px;
    height: 90px;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    background-color: var(--bg-input);
    flex-shrink: 0;
}

.full-service-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.full-service-content h3 {
    margin: -2px 0 4px 0;
    font-size: var(--fs-lg);
    font-weight: 600;
}

.full-service-content p {
    margin: 0 0 10px 0;
    font-size: var(--fs-sm);
    color: var(--text-secondary);
    line-height: 1.3;
}

.full-service-content .meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--fs-base);
}

/* ---- Client Profile ---- */
.profile-header-client {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.client-avatar-mini {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1.5px solid var(--accent-rose);
    color: var(--accent-rose);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 28px;
    font-weight: 500;
    font-family: 'Cormorant Garamond', serif;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.client-avatar-large {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1.5px solid var(--accent-rose);
    color: var(--accent-rose);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: var(--fs-avatar);
    font-weight: 500;
    font-family: 'Cormorant Garamond', serif;
    margin: 0 auto 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

/* ---- Loyalty Card ---- */
.loyalty-card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 30px;
    box-shadow: var(--card-shadow);
}

.loyalty-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.loyalty-header h3 {
    margin: 0 0 4px 0;
    font-size: var(--fs-xl);
    font-weight: 600;
}

.loyalty-header p {
    margin: 0;
    font-size: var(--fs-base);
    color: var(--text-secondary);
}

.loyalty-icon {
    width: 36px;
    height: 36px;
    background: var(--accent-light);
    color: var(--accent-rose);
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loyalty-icon svg {
    width: 20px;
    height: 20px;
}

.loyalty-circles {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 16px;
    align-items: center;
}

.loyalty-circle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 1px;
    font-size: var(--fs-md);
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-input);
    border: none;
    transition: all 0.3s;
    line-height: 1;
}

.loyalty-circle svg {
    width: 22px;
    height: 22px;
}

.loyalty-circle.done {
    background: var(--accent-rose);
    color: white;
    border: none;
    box-shadow: var(--card-shadow);
}

.loyalty-circle.done svg {
    fill: white;
    stroke: none;
}

.loyalty-circle.gift {
    width: 46px;
    height: 46px;
    border: 2px dashed var(--accent-rose);
    background: transparent;
    color: var(--accent-rose);
    font-size: var(--fs-xl);
}

.loyalty-promo {
    background: var(--bg-input);
    padding: 10px 12px;
    border-radius: 10px;
    text-align: center;
    font-size: var(--fs-base);
    color: var(--text-main);
}

/* ---- History List ---- */
.history-item {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--card-shadow);
}

.history-icon-wrapper {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--bg-input);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-secondary);
}

.history-info {
    flex: 1;
}

.history-info h4 {
    margin: 0 0 4px 0;
    font-size: var(--fs-md);
    font-weight: 600;
}

.history-info p {
    margin: 0;
    font-size: var(--fs-sm);
    color: var(--text-secondary);
}

.history-price {
    font-weight: 600;
    font-size: var(--fs-md);
}

/* ---- Upcoming Appointment ---- */
.upcoming-card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 16px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--accent-rose);
}

.upcoming-thumb {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    background-size: cover;
    background-position: center;
    margin-right: 16px;
    flex-shrink: 0;
    background-color: var(--bg-top);
}

.upcoming-details {
    flex: 1;
}

.upcoming-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 6px;
}

.upcoming-title {
    font-weight: 600;
    font-size: var(--fs-xl);
    line-height: 1.0;
    margin: 0 0 4px 0;
    flex: 1;
}

.upcoming-badge {
    width: 22px;
    height: 22px;
    min-width: 22px;
    border-radius: 50%;
    background: #C8E6C9;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-left: 8px;
}

.upcoming-badge svg {
    width: 12px;
    height: 12px;
    stroke: #4CAF50;
    stroke-width: 3;
    fill: none;
}

.upcoming-badge.pending {
    background: #FFF9C4;
    animation: pulse-yellow 2s infinite ease-in-out;
}

.upcoming-badge.pending svg {
    stroke: #FBC02D;
}

@keyframes pulse-yellow {
    0% {
        box-shadow: 0 0 0 0 rgba(251, 192, 45, 0.4);
    }

    70% {
        box-shadow: 0 0 0 8px rgba(251, 192, 45, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(251, 192, 45, 0);
    }
}

.upcoming-row {
    font-size: var(--fs-base);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
    line-height: 1;
}

.upcoming-row svg {
    width: 14px;
    height: 14px;
    margin-top: -2px;
}

/* ---- Contact Master Button ---- */
.contact-master-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--accent-rose) !important;
    border-radius: 14px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    width: 100%;
    margin: 30px 0 20px;
}

.contact-master-btn svg {
    width: 20px;
    height: 20px;
}

/* ---- Client Profile Modal ---- */
.profile-modal-card {
    text-align: center;
    padding: 24px 24px 28px;
}

.profile-modal-card .close-overlay {
    top: 12px;
    right: 14px;
}

.profile-modal-card .client-avatar-large {
    margin: 0 auto 12px;
}

.profile-modal-name {
    font-size: var(--fs-2xl);
    font-weight: 600;
    color: var(--text-main);
    margin: 0 0 2px 0;
    background: transparent;
    border: none;
    outline: none;
    font-family: inherit;
    text-align: center;
    width: 100%;
    padding: 4px 0;
    border-bottom: 1.5px solid transparent;
    transition: border-color 0.2s;
}

.profile-modal-name:focus {
    border-bottom-color: var(--accent-rose);
}

/* ---- Headers & Accents ---- */
h1,
h2,
h3,
.section-title,
.upcoming-title {
    font-family: 'Cormorant Garamond', serif;
}

h1,
h2,
h3 {
    margin: 0;
}

h1 {
    font-size: var(--fs-hero);
    font-weight: 600;
    margin-bottom: 24px;
}

h2 {
    font-size: var(--fs-3xl);
}

h3 {
    font-size: var(--fs-xl);
}

.profile-modal-tg {
    font-size: var(--fs-md);
    color: var(--text-secondary);
    margin: 0 0 20px 0;
}

.profile-modal-fields {
    text-align: left;
    margin-bottom: 16px;
}

.profile-field {
    margin-bottom: 16px;
}

.profile-field:last-child {
    margin-bottom: 0;
}

.profile-field-label {
    text-align: left;
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.profile-field-input {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: var(--fs-md);
    color: var(--text-main);
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.profile-field-input:focus {
    border-color: var(--accent-rose);
}

.profile-promos-list {
    min-height: 20px;
    font-size: var(--fs-md);
    color: var(--text-main);
    text-align: left;
}

.modal-promo-card {
    background: var(--bg-card);
    border: 2px dashed color-mix(in srgb, var(--accent-rose) 60%, transparent);
    padding: 10px 14px;
    border-radius: 12px;
    margin-bottom: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: all 0.2s;
}

.modal-promo-card:active {
    transform: scale(0.97);
    background: var(--accent-light);
    /* slight rose tint on press */
}

.modal-promo-code {
    font-weight: 600;
    color: var(--accent-rose);
    font-size: var(--fs-md);
    letter-spacing: 0.5px;
}

.modal-promo-label {
    font-size: var(--fs-sm);
    color: var(--text-secondary);
    line-height: 1.3;
}

/* ---- Empty History State ---- */
.history-empty {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 40px 20px;
    text-align: center;
    box-shadow: var(--card-shadow);
}

.history-empty-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    color: var(--accent-rose);
    opacity: 0.4;
}

.history-empty-icon svg {
    width: 100%;
    height: 100%;
}

.history-empty-title {
    font-size: var(--fs-md);
    color: var(--text-secondary);
    margin: 0 0 8px;
}

.history-empty-link {
    font-size: var(--fs-base);
    color: var(--accent-rose);
    cursor: pointer;
    text-decoration: none;
}

/* Loyalty badge number on gift */
.loyalty-circle.gift {
    position: relative;
}

.loyalty-badge-num {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #4CAF50;
    color: white;
    font-size: var(--fs-xs);
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    animation: badgePulse 1.5s ease-in-out infinite;
}

@keyframes badgePulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.15);
    }
}

/* History photo thumb */
.history-icon-wrapper {
    cursor: pointer;
}

.history-photo-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* ---- Portfolio Classes ---- */
#portfolio-tab {
    padding-bottom: 80px;
    /* same as others for nav clearance */
}

.portfolio-category {
    margin-bottom: 24px;
}

.portfolio-category-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 12px;
}

.portfolio-category-header h2 {
    font-size: var(--fs-xl);
    font-weight: 500;
    margin: 0;
    color: var(--accent-rose);
    font-family: 'Cormorant Garamond', serif;
}

.portfolio-count {
    font-size: var(--fs-md);
    font-weight: 600;
    color: var(--accent-rose);
    background: var(--accent-light);
    padding: 2px 8px;
    border-radius: 8px;
}

.portfolio-scroll-container {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding-bottom: 8px;
    /* For scrollbar */
    -webkit-overflow-scrolling: touch;
    width: 100%;
}

/* Hide scrollbar within scrollable containers */
.portfolio-scroll-container::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.portfolio-card {
    min-width: 140px;
    /* Fixed card size for sliding */
    width: 140px;
    scroll-snap-align: start;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.portfolio-card img {
    width: 100%;
    height: 180px;
    /* Portrait orientation typically better for nails */
    object-fit: cover;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    background: var(--bg-input);
}

.portfolio-caption {
    font-size: var(--fs-sm);
    color: var(--text-main);
    text-align: center;
    font-weight: 500;
    line-height: 1.2;
}



input,
textarea {
    caret-color: var(--accent-rose);
}

/* ---- Lightbox ---- */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.92);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    touch-action: pan-y;
    user-select: none;
}

.lightbox-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

#lightbox-img {
    max-width: 85%;
    max-height: 75vh;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    transform: scale(0.95);
    transition: transform 0.3s ease, opacity 0.25s ease;
    pointer-events: none;
}

.lightbox-overlay.active #lightbox-img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: var(--fs-xl);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    backdrop-filter: blur(8px);
    z-index: 10001;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.12);
    color: white;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: var(--fs-xl);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    backdrop-filter: blur(8px);
    z-index: 10001;
    transition: background 0.2s ease, opacity 0.2s ease;
    opacity: 0.7;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.25);
    opacity: 1;
}

.lightbox-nav.prev {
    left: 12px;
}

.lightbox-nav.next {
    right: 12px;
}

.lightbox-counter {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.6);
    font-size: var(--fs-sm);
    font-family: 'Tenor Sans', sans-serif;
    letter-spacing: 1px;
    z-index: 10001;
}