:root {
    --purple-50: #faf5ff;
    --purple-100: #f3e8ff;
    --purple-200: #e9d5ff;
    --purple-300: #d8b4fe;
    --purple-400: #c084fc;
    --purple-500: #a855f7;
    --purple-600: #9333ea;
    --purple-700: #7c3aed;
    --purple-800: #6b21a8;
    --purple-900: #581c87;
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --green-500: #10b981;
    --red-500: #ef4444;
    --orange-500: #f59e0b;
    --blue-500: #3b82f6;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, var(--white) 0%, var(--purple-50) 100%);
    color: var(--gray-800);
    min-height: 100vh;
    line-height: 1.6;
}

/* Header */
.header {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 0 24px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--gray-900);
}

.header-logo {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--purple-600), var(--purple-800));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    color: var(--white);
}

.header-title {
    font-size: 20px;
    font-weight: 700;
}

.header-subtitle {
    font-size: 13px;
    color: var(--gray-500);
    font-weight: 400;
}

/* Steps */
.steps {
    display: flex;
    justify-content: center;
    gap: 0;
    padding: 32px 24px 24px;
    max-width: 600px;
    margin: 0 auto;
}

.step {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.step:not(:last-child)::after {
    content: '';
    width: 60px;
    height: 2px;
    background: var(--gray-200);
    margin: 0 16px;
}

.step.active:not(:last-child)::after {
    background: var(--purple-500);
}

.step.completed:not(:last-child)::after {
    background: var(--purple-600);
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    border: 2px solid var(--gray-300);
    color: var(--gray-400);
    background: var(--white);
    transition: all 0.3s ease;
}

.step.active .step-number {
    border-color: var(--purple-500);
    background: var(--purple-500);
    color: var(--white);
}

.step.completed .step-number {
    border-color: var(--purple-600);
    background: var(--purple-600);
    color: var(--white);
}

.step-label {
    font-size: 13px;
    color: var(--gray-400);
    font-weight: 500;
    display: none;
}

.step.active .step-label,
.step.completed .step-label {
    color: var(--gray-700);
    display: block;
}

/* Main Container */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 24px 80px;
}

/* Cards */
.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 32px;
    margin-bottom: 16px;
    border: 1px solid var(--gray-200);
}

.card-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.card-subtitle {
    font-size: 15px;
    color: var(--gray-500);
    margin-bottom: 24px;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.service-card {
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--service-color, var(--purple-500));
    opacity: 0;
    transition: opacity 0.2s ease;
}

.service-card:hover {
    border-color: var(--service-color, var(--purple-300));
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.service-card.selected {
    border-color: var(--service-color, var(--purple-500));
    background: var(--purple-50);
}

.service-card.selected::before {
    opacity: 1;
}

.service-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.service-desc {
    font-size: 13px;
    color: var(--gray-500);
    margin-bottom: 12px;
    line-height: 1.4;
}

.service-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.service-duration {
    font-size: 13px;
    color: var(--gray-400);
    display: flex;
    align-items: center;
    gap: 4px;
}

.service-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-900);
}

/* Calendar */
.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.calendar-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-900);
}

.calendar-nav {
    display: flex;
    gap: 8px;
}

.calendar-nav button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--gray-200);
    background: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--gray-600);
    transition: all 0.2s;
}

.calendar-nav button:hover {
    background: var(--purple-50);
    border-color: var(--purple-300);
    color: var(--purple-600);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 16px;
}

.calendar-day-header {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-400);
    padding: 8px 0;
    text-transform: uppercase;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 500;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--gray-700);
    position: relative;
}

.calendar-day:hover:not(.disabled):not(.empty) {
    background: var(--purple-100);
    color: var(--purple-700);
}

.calendar-day.selected {
    background: var(--purple-600);
    color: var(--white);
    font-weight: 600;
}

.calendar-day.today {
    border: 2px solid var(--purple-300);
}

.calendar-day.disabled {
    color: var(--gray-300);
    cursor: not-allowed;
}

.calendar-day.empty {
    cursor: default;
}

.calendar-day.has-slots::after {
    content: '';
    position: absolute;
    bottom: 4px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--purple-500);
}

.calendar-day.selected::after {
    background: var(--white);
}

/* Time Slots */
.time-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
}

.time-slot {
    padding: 12px 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    text-align: center;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
    transition: all 0.2s;
    background: var(--white);
}

.time-slot:hover {
    border-color: var(--purple-300);
    background: var(--purple-50);
}

.time-slot.selected {
    border-color: var(--purple-600);
    background: var(--purple-600);
    color: var(--white);
}

.time-slot.disabled {
    border-color: var(--gray-100);
    background: var(--gray-50);
    color: var(--gray-300);
    cursor: not-allowed;
}

/* Form */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 6px;
}

.form-group label .required {
    color: var(--red-500);
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 15px;
    color: var(--gray-800);
    background: var(--white);
    transition: all 0.2s;
    outline: none;
    font-family: inherit;
}

.form-input:focus {
    border-color: var(--purple-500);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.form-input::placeholder {
    color: var(--gray-400);
}

textarea.form-input {
    min-height: 80px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-decoration: none;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--purple-600), var(--purple-700));
    color: var(--white);
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--white);
    color: var(--gray-700);
    border: 2px solid var(--gray-200);
}

.btn-secondary:hover {
    border-color: var(--purple-300);
    color: var(--purple-700);
    background: var(--purple-50);
}

.btn-danger {
    background: var(--red-500);
    color: var(--white);
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-block {
    width: 100%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Summary */
.summary-card {
    background: var(--purple-50);
    border: 1px solid var(--purple-200);
    border-radius: var(--radius-sm);
    padding: 20px;
    margin-bottom: 24px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.summary-item:not(:last-child) {
    border-bottom: 1px solid var(--purple-200);
}

.summary-label {
    font-size: 14px;
    color: var(--gray-600);
}

.summary-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-800);
}

/* Message */
.message {
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 14px;
    display: none;
}

.message.show {
    display: block;
}

.message.error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

.message.success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
}

/* Loading */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--purple-500);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Booking Step */
.booking-step {
    display: none;
}

.booking-step.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* No slots */
.no-slots {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray-500);
}

.no-slots-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.no-slots-text {
    font-size: 16px;
    font-weight: 500;
}

/* Step actions */
.step-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 24px;
    gap: 12px;
}

/* ============ ADMIN ============ */
.admin-body {
    background: var(--gray-50);
}

/* Login */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    border: 1px solid var(--gray-200);
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--purple-600), var(--purple-800));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    color: var(--white);
    margin: 0 auto 16px;
}

.login-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-900);
}

.login-subtitle {
    font-size: 14px;
    color: var(--gray-500);
    margin-top: 4px;
}

/* Admin Layout */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 260px;
    background: var(--white);
    border-right: 1px solid var(--gray-200);
    padding: 24px;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 50;
}

.admin-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
    text-decoration: none;
}

.admin-sidebar-brand .mini-logo {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--purple-600), var(--purple-800));
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: var(--white);
}

.admin-sidebar-brand span {
    font-size: 16px;
    font-weight: 700;
    color: var(--gray-900);
}

.admin-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
}

.nav-item:hover {
    background: var(--purple-50);
    color: var(--purple-700);
}

.nav-item.active {
    background: var(--purple-50);
    color: var(--purple-700);
    font-weight: 600;
}

.nav-icon {
    width: 20px;
    text-align: center;
}

.admin-main {
    flex: 1;
    margin-left: 260px;
    padding: 32px;
}

.admin-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.admin-page-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-900);
}

.admin-page-subtitle {
    font-size: 14px;
    color: var(--gray-500);
}

/* Admin Table */
.admin-table-container {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
    overflow: hidden;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th {
    padding: 14px 20px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
}

.admin-table td {
    padding: 14px 20px;
    font-size: 14px;
    color: var(--gray-700);
    border-bottom: 1px solid var(--gray-100);
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.admin-table tr:hover td {
    background: var(--gray-50);
}

/* Status badges */
.badge {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.badge-confirmed {
    background: #f0fdf4;
    color: #16a34a;
}

.badge-pending {
    background: #fffbeb;
    color: #d97706;
}

.badge-cancelled {
    background: #fef2f2;
    color: #dc2626;
}

.badge-completed {
    background: #eff6ff;
    color: #2563eb;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 24px;
}

.modal-overlay.show {
    display: flex;
}

.modal {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 24px 24px 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-900);
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--gray-100);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--gray-500);
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--gray-200);
}

.modal-body {
    padding: 16px 24px 24px;
}

.modal-footer {
    padding: 0 24px 24px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Admin services list */
.admin-list {
    display: grid;
    gap: 8px;
}

.admin-list-item {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}

.admin-list-item:hover {
    border-color: var(--purple-200);
}

.admin-list-item-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.service-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.admin-list-item-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-900);
}

.admin-list-item-subtitle {
    font-size: 13px;
    color: var(--gray-500);
}

.admin-list-item-actions {
    display: flex;
    gap: 8px;
}

/* WhatsApp Float */
.wa-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(37,211,102,.4);
    transition: transform .2s;
    z-index: 999;
    cursor: pointer;
    color: #fff;
    font-size: 28px;
    text-decoration: none;
}

.wa-float:hover {
    transform: scale(1.1);
    color: #fff;
}

/* Responsive */
    @media (max-width: 768px) {
    .header {
        padding: 0 16px;
    }

    .header-title {
        font-size: 16px;
    }

    .header-subtitle {
        display: none;
    }

    .steps {
        padding: 16px 12px 12px;
        gap: 2px;
    }

    .step:not(:last-child)::after {
        width: 20px;
        margin: 0 6px;
    }

    .step-number {
        width: 26px;
        height: 26px;
        font-size: 12px;
    }

    .step-label {
        display: none !important;
    }

    .container {
        padding: 0 16px 60px;
    }

    .card {
        padding: 20px;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .time-slots {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .admin-sidebar {
        width: 60px;
        padding: 16px 8px;
    }

    .admin-sidebar-brand span {
        display: none;
    }

    .admin-sidebar-brand .mini-logo {
        margin: 0 auto;
    }

    .nav-item span {
        display: none;
    }

    .nav-item {
        justify-content: center;
        padding: 12px;
    }

    .admin-main {
        margin-left: 60px;
        padding: 16px;
    }

    .admin-table-container {
        overflow-x: auto;
    }
}
