/* ================================
   Vibrant Essence - Wellness Website Styles
   Professional wellness theme with soft blues, whites, natural tones
   ================================ */

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

/* Global focus styles for keyboard navigation (WCAG 2.1 AA) */
*:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

*:focus:not(:focus-visible) {
    outline: none;
}

*:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* Skip to main content link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    z-index: 10000;
    border-radius: 0 0 8px 0;
    font-weight: 600;
}

.skip-link:focus {
    top: 0;
    outline: 3px solid var(--text-dark);
}

:root {
    /* Primary Colors - Soft Blues & Natural Tones */
    --primary-color: #6B9BD1;
    --primary-dark: #4A7BA7;
    --primary-light: #8FB4DC;
    --secondary-color: #9DB4C0;
    --accent-color: #C8A882;
    --accent-green: #A4C2A8;
    
    /* Neutrals */
    --text-dark: #2C3E50;
    --text-light: #7F8C8D;
    --bg-light: #F8F9FA;
    --bg-white: #FFFFFF;
    --bg-cream: #FAF8F5;
    --border-color: #E8ECF0;
    
    /* Status Colors */
    --success-color: #A4C2A8;
    --warning-color: #E8B86D;
    --danger-color: #D98880;
    --info-color: #6B9BD1;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 12px 32px rgba(0, 0, 0, 0.15);
    
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-dark);
    line-height: 1.7;
    background-color: var(--bg-light);
    /* Minimum 16px to prevent iOS zoom on focus */
    font-size: clamp(16px, 1rem, 18px);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    /* Prevent horizontal overflow */
    overflow-x: hidden;
    width: 100%;
}

/* Better mobile padding for thumb zones */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.875rem;
    }
}

/* ================================
   Typography
   ================================ */

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-dark);
}

/* Responsive typography using clamp() */
h1 { font-size: clamp(1.75rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 2rem); }
h4 { font-size: clamp(1.125rem, 2.5vw, 1.5rem); }
h5 { font-size: clamp(1rem, 2vw, 1.25rem); }
h6 { font-size: clamp(0.875rem, 1.5vw, 1rem); }

/* Improve readability on mobile */
p, li, td, th {
    line-height: 1.75;
}

/* ================================
   Navigation
   ================================ */

.navbar {
    background: var(--bg-white);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-brand a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-brand i {
    font-size: 2rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
    background-color: rgba(107, 155, 209, 0.1);
}

.mobile-menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-color);
    /* 48x48px touch target */
    min-width: 48px;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.mobile-menu-toggle:hover,
.mobile-menu-toggle:focus {
    background-color: rgba(107, 155, 209, 0.1);
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.mobile-menu-toggle:active {
    background-color: rgba(107, 155, 209, 0.2);
}

/* ================================
   Hero Section
   ================================ */

.hero {
    position: relative;
    min-height: 600px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="wellness-pattern" width="50" height="50" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="2" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23wellness-pattern)"/></svg>');
    opacity: 0.5;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.15);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 2.5rem;
    font-weight: 300;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-scroll {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 2rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

/* ================================
   Buttons
   ================================ */

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    /* Minimum 48px height for touch targets */
    min-height: 48px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Poppins', sans-serif;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

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

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

.btn-secondary {
    background: var(--bg-white);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

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

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

.btn-light:hover {
    background: var(--bg-cream);
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-block {
    display: block;
    width: 100%;
}

/* ================================
   Sections
   ================================ */

.section {
    padding: 5rem 0;
}

.section-alt {
    background: var(--bg-white);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

.page-header {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 100%);
    padding: 4rem 0;
    text-align: center;
    color: white;
}

.page-header h1 {
    color: white;
    margin-bottom: 0.5rem;
}

.page-header p {
    font-size: 1.2rem;
    opacity: 0.95;
}

/* ================================
   Features Grid
   ================================ */

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--bg-white);
    padding: 2.5rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: white;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--text-light);
    line-height: 1.8;
}

/* ================================
   Services
   ================================ */

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--bg-white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.service-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary-color) 100%);
}

.service-content {
    padding: 1.5rem;
}

.service-category {
    display: inline-block;
    background: rgba(107, 155, 209, 0.1);
    color: var(--primary-color);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.service-card p {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.7;
}

.service-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1rem 0;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.service-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.service-note {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.services-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--border-color);
    background: var(--bg-white);
    color: var(--text-dark);
    border-radius: 50px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* ================================
   CTA Section
   ================================ */

.cta-section {
    background: linear-gradient(135deg, var(--accent-green) 0%, var(--primary-color) 100%);
    padding: 5rem 0;
    text-align: center;
    color: white;
}

.cta-content h2 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

/* ================================
   Testimonials
   ================================ */

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.testimonial-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
}

.testimonial-stars {
    color: var(--accent-color);
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.testimonial-text {
    font-style: italic;
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.testimonial-author strong {
    display: block;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.testimonial-author span {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* ================================
   Footer
   ================================ */

.footer {
    background: var(--text-dark);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
}

.footer-section i {
    margin-right: 0.5rem;
    color: var(--primary-light);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary-color);
    transform: scale(1.1);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* ================================
   Forms
   ================================ */

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-dark);
}

.form-input,
.form-textarea,
.form-select,
select.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    /* Minimum 48px height for touch targets */
    min-height: 48px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    /* Minimum 16px to prevent iOS zoom */
    font-size: max(16px, 1rem);
    font-family: 'Poppins', sans-serif;
    transition: var(--transition);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(107, 155, 209, 0.1);
}

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

/* ================================
   Auth Pages
   ================================ */

.auth-section {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    padding: 4rem 0;
}

.auth-container {
    max-width: 500px;
    margin: 0 auto;
}

.auth-card {
    background: var(--bg-white);
    padding: 3rem;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
}

.auth-card h2 {
    text-align: center;
    margin-bottom: 0.5rem;
}

.auth-card > p {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.auth-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.auth-footer a {
    color: var(--primary-color);
    font-weight: 600;
}

.forgot-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
}

/* ================================
   Messages
   ================================ */

.error-message {
    background: #FFE5E5;
    color: var(--danger-color);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid var(--danger-color);
}

.success-message {
    background: #E8F5E9;
    color: #2E7D32;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid var(--success-color);
}

.loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
}

.loading i {
    font-size: 2rem;
    margin-bottom: 1rem;
    display: block;
}

/* ================================
   Booking & Calendar
   ================================ */

.booking-container {
    max-width: 900px;
    margin: 0 auto;
}

.booking-step {
    background: var(--bg-white);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
}

.booking-step h2 {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.step-number {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 600;
}

.services-list {
    display: grid;
    gap: 1rem;
}

.service-option {
    padding: 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.service-option:hover,
.service-option.selected {
    border-color: var(--primary-color);
    background: rgba(107, 155, 209, 0.05);
}

.calendar-container {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 12px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.calendar-month-year {
    font-size: 1.5rem;
    font-weight: 600;
}

.calendar-nav-btn {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.calendar-nav-btn:hover {
    background: var(--primary-dark);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.calendar-day:hover {
    background: rgba(107, 155, 209, 0.1);
}

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

.calendar-day.disabled {
    color: var(--text-light);
    cursor: not-allowed;
    opacity: 0.4;
}

.time-slots-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
}

.time-slot {
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.time-slot:hover,
.time-slot.selected {
    border-color: var(--primary-color);
    background: rgba(107, 155, 209, 0.1);
}

.booking-summary {
    background: var(--bg-cream);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.booking-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* ================================
   Dashboard
   ================================ */

.dashboard-section {
    min-height: calc(100vh - 300px);
}

.dashboard-welcome {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.dashboard-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.overview-card {
    background: var(--bg-white);
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.overview-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.overview-icon.icon-calendar { background: var(--primary-color); }
.overview-icon.icon-list { background: var(--accent-green); }
.overview-icon.icon-profile { background: var(--accent-color); }

.overview-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
    margin-bottom: 0.2rem;
}

.overview-value {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.overview-subtext {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.overview-action {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: var(--primary-color);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    text-decoration: none;
}

.overview-action i {
    font-size: 0.85rem;
}

.overview-action:hover,
.overview-action:focus {
    text-decoration: underline;
}

.overview-action:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.dashboard-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
    flex-wrap: wrap;
}

.dashboard-tab {
    padding: 1rem 2rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-light);
    transition: var(--transition);
    margin-bottom: -2px;
}

.dashboard-tab:hover,
.dashboard-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.dashboard-panel {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.appointment-card {
    background: var(--bg-cream);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.appointment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    border-left: 4px solid var(--primary-color);
    padding-left: 1rem;
}

.appointment-details {
    margin-bottom: 1rem;
}

.appointment-details p {
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

.status-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-pending { background: #FFF4E6; color: var(--warning-color); }
.status-confirmed { background: #E8F5E9; color: var(--success-color); }
.status-cancelled { background: #FFE5E5; color: var(--danger-color); }
.status-completed { background: #E3F2FD; color: var(--info-color); }

/* ================================
   Utilities
   ================================ */

.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* ================================
   Responsive Design
   ================================ */

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 280px;
        max-width: 80%;
        background: var(--bg-white);
        flex-direction: column;
        padding: 5rem 2rem 2rem;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
        z-index: 1000;
        overflow-y: auto;
        gap: 0;
    }
    
    .nav-menu.mobile-active {
        right: 0;
    }
    
    .nav-menu li {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .nav-link {
        display: block;
        width: 100%;
        padding: 1rem;
        /* 48px minimum height for touch */
        min-height: 48px;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
    
    .mobile-menu-toggle {
        display: flex !important;
    }
    
    /* Close button in mobile menu */
    .mobile-menu-close {
        position: absolute;
        top: 1rem;
        right: 1rem;
        font-size: 1.5rem;
        color: var(--text-dark);
        cursor: pointer;
        /* 48x48px touch target */
        min-width: 48px;
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 8px;
        transition: background-color 0.3s ease;
    }
    
    .mobile-menu-close:hover,
    .mobile-menu-close:focus {
        background-color: rgba(0, 0, 0, 0.05);
        outline: 2px solid var(--primary-color);
        outline-offset: 2px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .features-grid,
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .dashboard-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
        position: sticky;
        top: 70px;
        background: white;
        z-index: 100;
        padding: 1rem 0;
        margin: -1rem 0 1rem;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
        /* Hide scrollbar but keep functionality */
        scrollbar-width: none;
    }
    
    .dashboard-tabs::-webkit-scrollbar {
        display: none;
    }
    
    .dashboard-tab {
        flex-shrink: 0;
        min-width: 120px;
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
    
    .calendar-grid {
        gap: 0.25rem;
    }
    
    .time-slots-container {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    
    /* Admin metrics stacking */
    .payment-metrics-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .metric-card {
        padding: 1.25rem;
    }
    
    /* Table responsiveness for tablet */
    .data-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }
    
    .data-table thead {
        position: sticky;
        left: 0;
    }
}

@media (max-width: 480px) {
    .hero {
        min-height: 400px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .section {
        padding: 3rem 0;
    }
    
    .auth-card {
        padding: 2rem;
    }
    
    /* Convert tables to cards on mobile */
    .data-table,
    .data-table thead,
    .data-table tbody,
    .data-table th,
    .data-table td,
    .data-table tr {
        display: block;
    }
    
    .data-table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    
    .data-table tr {
        margin-bottom: 1rem;
        background: white;
        border-radius: 8px;
        padding: 1rem;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    }
    
    .data-table td {
        border: none;
        position: relative;
        padding: 0.75rem 0.75rem 0.75rem 50%;
        text-align: right;
        white-space: normal;
    }
    
    .data-table td:before {
        content: attr(data-label);
        position: absolute;
        left: 0.75rem;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        text-align: left;
        font-weight: 600;
        color: var(--text-dark);
    }
    
    .data-table td:last-child {
        border-bottom: 0;
    }
    
    /* Button groups in cards */
    .data-table td .btn-small {
        margin: 0.25rem 0;
        display: block;
        width: 100%;
    }
}


/* Content Management Styles */
.content-section {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.content-section h3 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Data Table Styles */
.data-table {
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.data-table thead {
    background: var(--primary);
    color: white;
}

.data-table th,
.data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
}

.data-table tbody tr:hover {
    background: var(--bg-cream);
}

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

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-small:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Admin Calendar Styles */
.calendar-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1.5rem 0;
}

.calendar-legend {
    display: flex;
    gap: 2rem;
    margin: 1rem 0;
    padding: 1rem;
    background: var(--bg-cream);
    border-radius: 8px;
}

.calendar-legend span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.calendar-view-toggle {
    display: flex;
    gap: 0.5rem;
}

.admin-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: var(--border-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.calendar-day-header {
    background: var(--primary);
    color: white;
    text-align: center;
    padding: 0.75rem;
    font-weight: 600;
}

.calendar-day {
    background: white;
    min-height: 120px;
    padding: 0.5rem;
    position: relative;
}

.calendar-day.empty {
    background: var(--bg-light);
}

.calendar-day.today {
    background: #E3F2FD;
}

.calendar-day.today .day-number {
    background: var(--primary);
    color: white;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-day.has-events {
    background: #F5F5F5;
}

.day-number {
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.day-events {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.calendar-event {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    border-left: 3px solid;
    cursor: pointer;
    transition: all 0.2s ease;
}

.calendar-event:hover {
    transform: translateX(2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.calendar-event.appointment {
    background: var(--primary-light);
}

.calendar-event.gmail-event {
    background: #E3F2FD;
    border-left-color: #90CAF9;
}

.event-time {
    font-weight: 600;
    margin-right: 0.25rem;
}

.event-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.more-events {
    font-size: 0.75rem;
    color: var(--text-light);
    text-align: center;
    padding: 0.25rem;
}

/* Weekly Schedule Grid */
.weekly-schedule {
    display: grid;
    grid-template-columns: 80px repeat(7, 1fr);
    gap: 1px;
    background: var(--border-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.time-column,
.day-column {
    background: white;
}

.time-header,
.day-header {
    background: var(--primary);
    color: white;
    text-align: center;
    padding: 1rem;
    font-weight: 600;
}

.day-header {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.day-num {
    font-size: 1.5rem;
}

.time-slot {
    padding: 0.5rem;
    min-height: 60px;
    border-top: 1px solid var(--border-color);
    position: relative;
}

.time-column .time-slot {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: var(--text-light);
}

.schedule-appointment {
    padding: 0.5rem;
    border-radius: 4px;
    border-left: 3px solid;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 0.25rem;
}

.schedule-appointment:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Payment Metrics Grid */
.payment-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.metric-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border-left: 4px solid var(--primary);
}

.metric-card h3 {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0.5rem 0;
}

.metric-label {
    font-size: 0.75rem;
    color: var(--text-light);
    margin: 0;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
}

.modal-close:hover {
    color: var(--text-dark);
}

.appointment-detail p,
.payment-detail p {
    margin: 0.5rem 0;
}

.payment-detail h4 {
    color: var(--primary);
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
}

.loading i {
    font-size: 2rem;
    animation: spin 1s linear infinite;
}

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

@media (max-width: 768px) {
    .admin-calendar-grid {
        font-size: 0.75rem;
    }
    
    .calendar-day {
        min-height: 80px;
    }
    
    .weekly-schedule {
        grid-template-columns: 60px repeat(7, 1fr);
        font-size: 0.75rem;
    }
    
    .payment-metrics-grid {
        grid-template-columns: 1fr;
    }
    
    .calendar-view-toggle {
        flex-direction: column;
    }
}

/* ================================
   Accessibility & Performance
   ================================ */

/* Respect user's motion preferences (WCAG 2.1) */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Screen reader only content */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.sr-only-focusable:focus,
.sr-only-focusable:active {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #0051A3;
        --text-dark: #000000;
        --bg-white: #FFFFFF;
        --border-color: #000000;
    }
    
    .btn {
        border: 2px solid currentColor;
    }
}

/* Improve focus visibility in high contrast */
@media (prefers-contrast: high) {
    *:focus-visible {
        outline-width: 4px;
        outline-style: solid;
    }
}
