:root {
    --primary: #6C63FF;
    --primary-dark: #5A52D5;
    --primary-light: #8B85FF;
    --secondary: #00D9A6;
    --secondary-dark: #00B88C;
    --accent: #FF6B6B;
    --danger: #FF4757;
    --warning: #FFA502;
    --success: #2ED573;
    --dark: #2D3436;
    --gray: #636E72;
    --gray-light: #B2BEC3;
    --light: #F8F9FA;
    --white: #FFFFFF;
    --bg: #F0F2F5;
    --shadow-sm: 0 2px 8px rgba(108, 99, 255, 0.08);
    --shadow-md: 0 4px 20px rgba(108, 99, 255, 0.12);
    --shadow-lg: 0 8px 40px rgba(108, 99, 255, 0.16);
    --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.06);
    --gradient-primary: linear-gradient(135deg, #6C63FF 0%, #8B85FF 50%, #A78BFA 100%);
    --gradient-secondary: linear-gradient(135deg, #00D9A6 0%, #00E6B8 100%);
    --gradient-warm: linear-gradient(135deg, #FF6B6B 0%, #FFA502 100%);
    --gradient-cool: linear-gradient(135deg, #6C63FF 0%, #00D9A6 100%);
    --gradient-hero: linear-gradient(135deg, #667EEA 0%, #764BA2 100%);
    --radius: 16px;
    --radius-sm: 10px;
    --radius-lg: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--dark);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Mobile App Shell */
.app-container {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--white);
    position: relative;
    box-shadow: var(--shadow-lg);
}

/* Top Navigation Bar */
.top-bar {
    background: var(--gradient-primary);
    color: var(--white);
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(108, 99, 255, 0.3);
}

.top-bar h1 {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.top-bar .back-btn {
    color: var(--white);
    text-decoration: none;
    font-size: 22px;
    margin-right: 12px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    transition: var(--transition);
}

.top-bar .back-btn:active {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0.95);
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    max-width: 480px;
    width: 100%;
    background: var(--white);
    border-top: none;
    display: flex;
    justify-content: space-around;
    padding: 8px 12px 12px;
    z-index: 100;
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.08);
    border-radius: 24px 24px 0 0;
}

.bottom-nav a {
    text-decoration: none;
    color: var(--gray-light);
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 10px;
    font-weight: 600;
    padding: 8px 14px;
    transition: var(--transition);
    border-radius: 16px;
    position: relative;
}

.bottom-nav a.active {
    color: var(--primary);
    background: rgba(108, 99, 255, 0.08);
}

.bottom-nav a.active::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: var(--primary);
    border-radius: 0 0 4px 4px;
}

.bottom-nav a .nav-icon {
    font-size: 22px;
    margin-bottom: 4px;
    transition: var(--transition);
}

.bottom-nav a:active .nav-icon {
    transform: scale(1.2);
}

/* Page Content */
.page-content {
    padding: 20px 16px;
    padding-bottom: 100px;
}

/* Hero Section */
.hero {
    background: var(--gradient-hero);
    color: var(--white);
    padding: 28px 24px;
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.35);
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -60%;
    left: -20%;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
}

.hero h2 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
    letter-spacing: -0.5px;
}

.hero p {
    opacity: 0.95;
    font-size: 14px;
    position: relative;
    z-index: 1;
    line-height: 1.5;
}

/* Search Bar */
.search-bar {
    position: relative;
    margin-bottom: 24px;
}

.search-bar input {
    width: 100%;
    padding: 16px 16px 16px 48px;
    border: 2px solid transparent;
    border-radius: var(--radius);
    font-size: 15px;
    background: var(--light);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
    box-shadow: var(--shadow-md);
}

.search-bar .search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: var(--gray-light);
}

/* Category Grid */
.section-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--dark);
    letter-spacing: -0.3px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 28px;
}

.category-card {
    background: var(--white);
    border: 1px solid rgba(108, 99, 255, 0.08);
    border-radius: var(--radius);
    padding: 14px 8px;
    text-align: center;
    text-decoration: none;
    color: var(--dark);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.category-card:active {
    transform: scale(0.93);
    background: var(--light);
    box-shadow: var(--shadow-md);
}

.category-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.category-card .cat-icon {
    font-size: 30px;
    margin-bottom: 8px;
    display: block;
}

.category-card .cat-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--gray);
}

/* Service Card */
.service-card {
    background: var(--white);
    border: 1px solid rgba(108, 99, 255, 0.06);
    border-radius: var(--radius);
    padding: 18px;
    margin-bottom: 14px;
    text-decoration: none;
    color: var(--dark);
    display: block;
    transition: var(--transition);
    box-shadow: var(--shadow-card);
}

.service-card:active {
    transform: scale(0.98);
    box-shadow: var(--shadow-md);
}

.service-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.service-card .vendor-info {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.service-card .vendor-avatar {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: var(--gradient-primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-right: 12px;
    font-size: 16px;
    box-shadow: 0 4px 12px rgba(108, 99, 255, 0.25);
}

.service-card .vendor-name {
    font-weight: 700;
    font-size: 14px;
    color: var(--dark);
}

.service-card .vendor-rating {
    color: var(--warning);
    font-size: 12px;
    font-weight: 600;
}

.service-card h3 {
    font-size: 16px;
    margin-bottom: 6px;
    font-weight: 700;
    color: var(--dark);
}

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

.service-card .service-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--light);
}

.service-card .price {
    font-size: 18px;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.service-card .duration {
    font-size: 12px;
    color: var(--gray-light);
    font-weight: 600;
    background: var(--light);
    padding: 4px 10px;
    border-radius: 20px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 16px 28px;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    border: none;
    cursor: pointer;
    width: 100%;
    text-align: center;
    transition: var(--transition);
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(108, 99, 255, 0.35);
}

.btn-primary:active {
    box-shadow: 0 2px 8px rgba(108, 99, 255, 0.4);
}

.btn-secondary {
    background: var(--light);
    color: var(--dark);
    box-shadow: none;
}

.btn-success {
    background: var(--gradient-secondary);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(0, 217, 166, 0.35);
}

.btn-danger {
    background: var(--gradient-warm);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.35);
}

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

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

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--dark);
    letter-spacing: 0.2px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--light);
    border-radius: var(--radius-sm);
    font-size: 15px;
    background: var(--white);
    transition: var(--transition);
    color: var(--dark);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(108, 99, 255, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--gray-light);
}

/* Auth Pages */
.auth-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 32px 24px;
    background: var(--gradient-hero);
    position: relative;
}

.auth-page::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
}

.auth-page::after {
    content: '';
    position: absolute;
    bottom: -150px;
    left: -100px;
    width: 250px;
    height: 250px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.auth-logo {
    font-size: 64px;
    margin-bottom: 12px;
    animation: bounceIn 0.6s ease;
}

@keyframes bounceIn {
    0% { transform: scale(0.5); opacity: 0; }
    60% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.auth-title {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 6px;
    color: var(--white);
    letter-spacing: -0.5px;
}

.auth-subtitle {
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    margin-bottom: 28px;
}

.auth-form {
    width: 100%;
    max-width: 400px;
    background: var(--white);
    padding: 28px 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.auth-footer {
    text-align: center;
    margin-top: 16px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.auth-footer a {
    color: var(--white);
    text-decoration: none;
    font-weight: 700;
}

/* Role Toggle */
.role-toggle {
    display: flex;
    background: var(--light);
    border-radius: var(--radius);
    padding: 4px;
    margin-bottom: 24px;
}

.role-toggle button {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    background: transparent;
    color: var(--gray);
    transition: var(--transition);
}

.role-toggle button.active {
    background: var(--white);
    color: var(--primary);
    box-shadow: var(--shadow-md);
}

/* Status Badges */
.badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.badge-pending {
    background: linear-gradient(135deg, #FFECD2 0%, #FCB69F 100%);
    color: #C0392B;
}

.badge-confirmed {
    background: linear-gradient(135deg, #A8E6CF 0%, #88D8A8 100%);
    color: #1E7E34;
}

.badge-completed {
    background: linear-gradient(135deg, #A8D8EA 0%, #87CEEB 100%);
    color: #1565C0;
}

.badge-cancelled {
    background: linear-gradient(135deg, #FFB3B3 0%, #FF8A8A 100%);
    color: #C0392B;
}

/* Booking Card */
.booking-card {
    background: var(--white);
    border: 1px solid rgba(108, 99, 255, 0.06);
    border-radius: var(--radius);
    padding: 18px;
    margin-bottom: 14px;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
}

.booking-card:active {
    transform: scale(0.99);
}

.booking-card .booking-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 12px;
}

.booking-card .booking-service {
    font-weight: 700;
    font-size: 16px;
    color: var(--dark);
}

.booking-card .booking-detail {
    font-size: 13px;
    color: var(--gray);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.booking-card .booking-actions {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}

.booking-card .booking-actions .btn {
    padding: 12px 18px;
    font-size: 13px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--gray);
}

.empty-state .empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.empty-state h3 {
    color: var(--dark);
    margin-bottom: 8px;
    font-weight: 700;
    font-size: 18px;
}

/* Dashboard Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--white);
    border: 1px solid rgba(108, 99, 255, 0.06);
    border-radius: var(--radius);
    padding: 20px 16px;
    text-align: center;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
}

.stat-card:active {
    transform: scale(0.97);
}

.stat-card .stat-value {
    font-size: 28px;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card .stat-label {
    font-size: 12px;
    color: var(--gray);
    margin-top: 6px;
    font-weight: 600;
}

/* Alert */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 18px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: linear-gradient(135deg, #A8E6CF 0%, #88D8A8 100%);
    color: #1E7E34;
    border: none;
}

.alert-error {
    background: linear-gradient(135deg, #FFB3B3 0%, #FF8A8A 100%);
    color: #C0392B;
    border: none;
}

/* Loading Spinner */
.loading {
    text-align: center;
    padding: 24px;
}

.spinner {
    width: 36px;
    height: 36px;
    border: 4px solid var(--light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

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

/* Tab Bar */
.tab-bar {
    display: flex;
    background: var(--white);
    border-bottom: none;
    margin-bottom: 20px;
    padding: 6px;
    background: var(--light);
    border-radius: var(--radius);
    gap: 4px;
}

.tab-bar a {
    flex: 1;
    padding: 12px;
    border: none;
    background: none;
    font-size: 13px;
    font-weight: 700;
    color: var(--gray);
    cursor: pointer;
    border-radius: 12px;
    transition: var(--transition);
    text-align: center;
    text-decoration: none;
}

.tab-bar a.active {
    color: var(--white);
    background: var(--gradient-primary);
    box-shadow: 0 4px 12px rgba(108, 99, 255, 0.3);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 200;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.modal-content {
    background: var(--white);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: 28px 24px;
    width: 100%;
    max-width: 480px;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.modal-handle {
    width: 40px;
    height: 4px;
    background: var(--gray-light);
    border-radius: 2px;
    margin: 0 auto 20px;
}

/* Vendor Avatar */
.vendor-avatar {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: var(--gradient-primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    box-shadow: 0 4px 12px rgba(108, 99, 255, 0.25);
}

/* Responsive for larger screens */
@media (min-width: 481px) {
    body {
        background: linear-gradient(135deg, #667EEA 0%, #764BA2 100%);
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 20px;
    }
    .app-container {
        border-radius: 32px;
        overflow: hidden;
        max-height: 90vh;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    }
    .bottom-nav {
        border-radius: 0 0 32px 32px;
    }
}

/* Smooth Scrollbar */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: var(--light);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 4px;
}

/* Touch Feedback */
@media (hover: none) {
    .service-card:active,
    .category-card:active,
    .booking-card:active,
    .stat-card:active {
        transform: scale(0.97);
        opacity: 0.9;
    }
}
