:root {
    --primary: #3b82f6;
    --primary-light: #dbeafe;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --neutral-light: #f3f4f6;
    --neutral-dark: #4b5563;
    --white: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --radius: 8px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--neutral-light);
    color: var(--neutral-dark);
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Navigation */
header {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.logo i {
    font-size: 1.8rem;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

nav a {
    text-decoration: none;
    color: var(--neutral-dark);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    transition: all 0.3s ease;
}

nav a:hover, nav a.active {
    background-color: var(--primary-light);
    color: var(--primary);
}

/* Main Content */
main {
    padding: 2rem 0;
    min-height: calc(100vh - 180px);
}

.view {
    display: none;
    animation: fadeIn 0.5s ease;
}

.view.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.dashboard-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--neutral-dark);
}

.card {
    background-color: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.card-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--neutral-dark);
}

/* Calendar */
#calendar {
    margin-bottom: 2rem;
    min-height: 400px;
}

/* FullCalendar responsive adjustments */
.fc-toolbar {
    flex-wrap: wrap;
    gap: 1rem;
}

.fc-toolbar-chunk {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.fc-button {
    min-height: 44px;
    min-width: 44px;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
}

.fc-button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.fc-today-button {
    margin-left: 0.5rem;
}

/* Enhanced Calendar Responsiveness */
/* Tablet Calendar Adjustments */
@media (min-width: 768px) and (max-width: 1023px) {
    .fc-toolbar {
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    
    .fc-toolbar-title {
        font-size: 1.5rem !important;
        margin: 0.5rem 0;
    }
    
    .fc-button {
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
        min-height: 42px;
    }
    
    .fc-daygrid-day-number,
    .fc-col-header-cell-cushion {
        font-size: 0.9rem;
        padding: 0.375rem;
    }
    
    .fc-event {
        font-size: 0.8rem;
        padding: 0.2rem 0.4rem;
    }
    
    .fc-timegrid-slot {
        height: 2.5rem;
    }
    
    .fc-timegrid-axis {
        width: 3.5rem;
    }
}

/* Mobile Calendar Adjustments */
@media (max-width: 767px) {
    .fc-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding: 0.5rem;
    }
    
    .fc-toolbar-chunk {
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .fc-toolbar-title {
        font-size: 1.25rem !important;
        text-align: center;
        margin: 0.5rem 0;
        order: -1;
        width: 100%;
    }
    
    .fc-button {
        font-size: 0.75rem;
        padding: 0.5rem 0.75rem;
        min-height: 44px;
        min-width: 44px;
    }
    
    .fc-button-group {
        display: flex;
        flex-wrap: wrap;
        gap: 0.25rem;
        justify-content: center;
    }
    
    .fc-button-group .fc-button {
        flex: 1;
        min-width: auto;
        max-width: 80px;
    }
    
    .fc-daygrid-day-number,
    .fc-col-header-cell-cushion {
        font-size: 0.8rem;
        padding: 0.25rem;
    }
    
    .fc-event {
        font-size: 0.7rem;
        padding: 0.125rem 0.25rem;
        line-height: 1.2;
    }
    
    .fc-timegrid-slot {
        height: 2rem;
    }
    
    .fc-timegrid-axis {
        width: 3rem;
    }
    
    .fc-timegrid-slot-label {
        font-size: 0.7rem;
    }
    
    .fc-timegrid-event {
        font-size: 0.7rem;
    }
    
    /* Improve calendar container on mobile */
    #calendar {
        min-height: 350px;
        margin: 0 -1rem;
        padding: 0 1rem;
    }
    
    .fc-view-harness {
        border-radius: var(--radius);
    }
}

@media (max-width: 480px) {
    .fc-toolbar-title {
        font-size: 1rem !important;
    }
    
    .fc-button {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
        min-height: 36px;
    }
    
    .fc-daygrid-day-number {
        font-size: 0.75rem;
    }
    
    .fc-event {
        font-size: 0.7rem;
        padding: 0.1rem 0.2rem;
    }
}

/* Services Management */
.services-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.service-item {
    background-color: var(--neutral-light);
    padding: 1rem;
    border-radius: var(--radius);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.service-info h3 {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.service-info p {
    color: var(--neutral-dark);
    font-size: 0.9rem;
}

.service-actions {
    display: flex;
    gap: 0.5rem;
}

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

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

input, select, textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: var(--white);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
    transform: translateY(-1px);
}

input:invalid, select:invalid, textarea:invalid {
    border-color: var(--error);
}

input:valid, select:valid, textarea:valid {
    border-color: var(--success);
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-row .form-group {
    flex: 1;
}

/* Form validation styles */
.form-group.error input,
.form-group.error select,
.form-group.error textarea {
    border-color: var(--error);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

.form-group.success input,
.form-group.success select,
.form-group.success textarea {
    border-color: var(--success);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.error-message {
    color: var(--error);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: none;
}

.form-group.error .error-message {
    display: block;
}

/* Enhanced Form Responsiveness */
/* Tablet Form Optimizations */
@media (min-width: 768px) and (max-width: 1023px) {
    .form-row {
        gap: 1.5rem;
    }
    
    .form-row .form-group {
        flex: 1;
    }
    
    input, select, textarea {
        padding: 0.875rem 1rem;
        font-size: 1rem;
        min-height: 46px;
    }
    
    label {
        font-size: 0.9rem;
        margin-bottom: 0.6rem;
    }
    
    .form-group {
        margin-bottom: 1.5rem;
    }
}

/* Mobile Form Optimizations */
@media (max-width: 767px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .form-row .form-group {
        flex: none;
    }
    
    input, select, textarea {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 1rem 0.75rem;
        min-height: 48px;
        border-radius: var(--radius);
        border: 2px solid #e5e7eb;
        transition: all 0.3s ease;
    }
    
    input:focus, select:focus, textarea:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
        transform: none;
    }
    
    label {
        font-size: 0.875rem;
        margin-bottom: 0.75rem;
        font-weight: 600;
        color: var(--neutral-dark);
    }
    
    .form-group {
        margin-bottom: 1.5rem;
    }
    
    /* Improve form spacing on mobile */
    .modal-body form {
        padding: 0.5rem 0;
    }
    
    /* Better checkbox styling on mobile */
    input[type="checkbox"] {
        min-height: 20px;
        width: 20px;
        margin-right: 0.75rem;
    }
    
    label[for] {
        display: flex;
        align-items: center;
        cursor: pointer;
    }
}

@media (max-width: 480px) {
    input, select, textarea {
        padding: 1rem 0.75rem;
        font-size: 16px;
        min-height: 50px;
    }
    
    .form-group {
        margin-bottom: 1.25rem;
    }
    
    label {
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
    }
    
    /* Stack form actions on very small screens */
    .actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.btn-primary:hover {
    background-color: #2563eb;
}

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

.btn-success:hover {
    background-color: #059669;
}

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

.btn-warning:hover {
    background-color: #d97706;
}

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

.btn-error:hover {
    background-color: #dc2626;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid #d1d5db;
    color: var(--neutral-dark);
}

.btn-outline:hover {
    background-color: var(--neutral-light);
}

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

/* Enhanced Button Responsiveness */
/* Tablet Button Adjustments */
@media (min-width: 768px) and (max-width: 1023px) {
    .btn {
        padding: 0.875rem 1.75rem;
        font-size: 1rem;
        min-height: 46px;
    }
    
    .btn-sm {
        padding: 0.625rem 1.25rem;
        font-size: 0.9rem;
        min-height: 42px;
    }
    
    .btn-primary:hover,
    .btn-success:hover,
    .btn-warning:hover,
    .btn-error:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    }
}

/* Mobile Button Adjustments */
@media (max-width: 767px) {
    .btn {
        padding: 1rem 1.5rem;
        font-size: 1rem;
        min-height: 48px;
        font-weight: 600;
        border-radius: var(--radius);
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
    }
    
    .btn-sm {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
        min-height: 44px;
    }
    
    /* Improve button touch targets */
    .btn:active {
        transform: scale(0.98);
    }
    
    .btn-primary:active {
        background-color: #2563eb;
    }
    
    .btn-success:active {
        background-color: #059669;
    }
    
    .btn-warning:active {
        background-color: #d97706;
    }
    
    .btn-error:active {
        background-color: #dc2626;
    }
    
    .btn-outline:active {
        background-color: var(--neutral-light);
    }
    
    /* Full width buttons on mobile for primary actions */
    .actions .btn-primary {
        width: 100%;
        margin-bottom: 0.75rem;
    }
    
    .actions .btn-outline {
        width: 100%;
    }
    
    /* Dashboard header button adjustments */
    .dashboard-header .btn {
        width: 100%;
        margin-top: 1rem;
    }
    
    /* Service card buttons */
    .service-actions .btn {
        min-width: 44px;
        min-height: 44px;
        padding: 0.5rem;
    }
}

@media (max-width: 480px) {
    .btn {
        padding: 1.125rem 1.5rem;
        font-size: 1rem;
        min-height: 50px;
    }
    
    .btn-sm {
        padding: 0.875rem 1rem;
        font-size: 0.8rem;
        min-height: 46px;
    }
    
    /* Stack action buttons vertically on very small screens */
    .actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .actions .btn {
        width: 100%;
        margin: 0;
    }
}

/* Client Booking View */
.booking-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    position: relative;
    padding: 0 1rem;
}

.booking-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 2rem;
    right: 2rem;
    height: 2px;
    background-color: #e5e7eb;
    z-index: 1;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    flex: 1;
    max-width: 120px;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #e5e7eb;
    color: var(--neutral-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.step.active .step-number {
    background-color: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    transform: scale(1.1);
}

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

.step.completed .step-number::after {
    content: '✓';
    font-size: 0.875rem;
}

.step-label {
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
    color: var(--neutral-dark);
}

.step.active .step-label {
    color: var(--primary);
    font-weight: 600;
}

.step.completed .step-label {
    color: var(--success);
}

/* Mobile booking steps */
@media (max-width: 767px) {
    .booking-steps {
        flex-direction: column;
        gap: 1.5rem;
        padding: 0;
        margin-bottom: 1.5rem;
    }
    
    .booking-steps::before {
        display: none;
    }
    
    .step {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        max-width: none;
        gap: 1rem;
        padding: 1rem;
        background-color: var(--white);
        border-radius: var(--radius);
        box-shadow: var(--shadow);
        transition: all 0.3s ease;
    }
    
    .step.active {
        background-color: var(--primary-light);
        border: 2px solid var(--primary);
    }
    
    .step.completed {
        background-color: #d1fae5;
        border: 2px solid var(--success);
    }
    
    .step-number {
        margin-bottom: 0;
        flex-shrink: 0;
    }
    
    .step-label {
        text-align: left;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .booking-steps {
        gap: 1rem;
        margin-bottom: 1rem;
    }
    
    .step {
        padding: 0.75rem;
        gap: 0.75rem;
    }
    
    .step-number {
        width: 36px;
        height: 36px;
        font-size: 0.875rem;
    }
    
    .step-label {
        font-size: 0.875rem;
    }
}

.service-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.service-card {
    background-color: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--success));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

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

.service-card.selected {
    border-color: var(--primary);
    background-color: var(--primary-light);
}

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

.service-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    transform: scale(1.1);
}

.service-card h3 {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--neutral-dark);
}

.service-card p {
    color: var(--neutral-dark);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

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

.time-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.time-slot {
    padding: 0.75rem;
    text-align: center;
    background-color: var(--white);
    border: 1px solid #e5e7eb;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.time-slot:hover {
    border-color: var(--primary);
    background-color: var(--primary-light);
    transform: translateY(-2px);
}

.time-slot.selected {
    background-color: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.time-slot.unavailable {
    background-color: var(--neutral-light);
    color: #9ca3af;
    cursor: not-allowed;
    opacity: 0.6;
}

.time-slot.unavailable:hover {
    transform: none;
    border-color: #e5e7eb;
    background-color: var(--neutral-light);
}

/* Enhanced Grid Responsiveness */
/* Tablet Service Cards and Time Slots */
@media (min-width: 768px) and (max-width: 1023px) {
    .service-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .service-card {
        padding: 1.5rem;
    }
    
    .service-icon {
        font-size: 2.25rem;
        margin-bottom: 1rem;
    }
    
    .service-card h3 {
        font-size: 1.25rem;
        margin-bottom: 0.75rem;
    }
    
    .time-slots {
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem;
    }
    
    .time-slot {
        padding: 1rem 0.75rem;
        font-size: 0.9rem;
        min-height: 46px;
    }
    
    .services-list {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Mobile Service Cards and Time Slots */
@media (max-width: 767px) {
    .service-cards {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .service-card {
        padding: 1.5rem;
        border: 2px solid transparent;
        transition: all 0.3s ease;
    }
    
    .service-card:active {
        transform: scale(0.98);
        border-color: var(--primary);
    }
    
    .service-icon {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }
    
    .service-card h3 {
        font-size: 1.25rem;
        margin-bottom: 0.75rem;
        font-weight: 700;
    }
    
    .service-card p {
        font-size: 0.9rem;
        margin-bottom: 0.75rem;
    }
    
    .service-card .price {
        font-size: 1.5rem;
        font-weight: 800;
    }
    
    .time-slots {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
    }
    
    .time-slot {
        padding: 1rem 0.5rem;
        font-size: 0.875rem;
        min-height: 48px;
        font-weight: 600;
        border: 2px solid #e5e7eb;
        transition: all 0.3s ease;
    }
    
    .time-slot:active {
        transform: scale(0.95);
    }
    
    .time-slot.selected {
        background-color: var(--primary);
        color: var(--white);
        border-color: var(--primary);
        transform: scale(0.95);
    }
    
    .services-list {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .service-item {
        padding: 1.25rem;
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .service-info {
        text-align: center;
    }
    
    .service-actions {
        justify-content: center;
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .service-cards {
        gap: 0.75rem;
        margin-bottom: 1.25rem;
    }
    
    .service-card {
        padding: 1.25rem;
    }
    
    .service-icon {
        font-size: 2rem;
        margin-bottom: 0.75rem;
    }
    
    .service-card h3 {
        font-size: 1.125rem;
        margin-bottom: 0.5rem;
    }
    
    .service-card p {
        font-size: 0.85rem;
        margin-bottom: 0.5rem;
    }
    
    .service-card .price {
        font-size: 1.375rem;
    }
    
    .time-slots {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .time-slot {
        padding: 0.875rem 0.25rem;
        font-size: 0.8rem;
        min-height: 44px;
    }
    
    .service-item {
        padding: 1rem;
    }
    
    .service-actions .btn {
        min-width: 40px;
        min-height: 40px;
        padding: 0.5rem;
    }
}

/* Appointments List */
.filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-group label {
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
}

.table-container {
    overflow-x: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    background-color: var(--white);
}

table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--white);
    min-width: 600px;
}

thead {
    background-color: var(--primary-light);
    position: sticky;
    top: 0;
    z-index: 10;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;
}

th {
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--neutral-dark);
}

td {
    font-size: 0.875rem;
}

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

tr:hover {
    background-color: var(--neutral-light);
}

/* Enhanced Table Responsiveness */
/* Tablet Table Adjustments */
@media (min-width: 768px) and (max-width: 1023px) {
    .filters {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .filter-group {
        flex: 1;
        min-width: 200px;
    }
    
    .table-container {
        border-radius: var(--radius);
        box-shadow: var(--shadow);
    }
    
    table {
        min-width: 700px;
    }
    
    th, td {
        padding: 0.875rem 0.75rem;
        font-size: 0.9rem;
    }
    
    th {
        font-size: 0.85rem;
    }
}

/* Mobile Table Adjustments */
@media (max-width: 767px) {
    .filters {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        margin-bottom: 1.5rem;
        padding: 1rem;
        background-color: var(--white);
        border-radius: var(--radius);
        box-shadow: var(--shadow);
    }
    
    .filter-group {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .filter-group label {
        margin-bottom: 0.5rem;
        font-weight: 600;
        font-size: 0.875rem;
    }
    
    .filter-group select,
    .filter-group input {
        padding: 0.75rem;
        font-size: 16px;
        min-height: 48px;
        border: 2px solid #e5e7eb;
        border-radius: var(--radius);
    }
    
    .table-container {
        border-radius: var(--radius);
        box-shadow: var(--shadow);
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        background-color: var(--white);
        margin: 0 -1rem;
        border: none;
    }
    
    table {
        min-width: 600px;
        border-collapse: collapse;
    }
    
    th, td {
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
        white-space: nowrap;
    }
    
    th {
        font-size: 0.75rem;
        background-color: var(--primary-light);
        position: sticky;
        top: 0;
        z-index: 10;
    }
    
    /* Improve button visibility in table */
    .btn-sm {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
        min-height: 36px;
    }
    
    /* Add scroll indicator */
    .table-container::after {
        content: '← Scroll to see more →';
        display: block;
        text-align: center;
        padding: 0.5rem;
        font-size: 0.75rem;
        color: var(--neutral-dark);
        background-color: var(--neutral-light);
        border-top: 1px solid #e5e7eb;
    }
}

@media (max-width: 480px) {
    .filters {
        margin-bottom: 1rem;
        padding: 0.75rem;
    }
    
    .filter-group label {
        font-size: 0.8rem;
    }
    
    .filter-group select,
    .filter-group input {
        padding: 0.875rem 0.75rem;
        font-size: 16px;
        min-height: 50px;
    }
    
    th, td {
        padding: 0.5rem 0.25rem;
        font-size: 0.75rem;
    }
    
    th {
        font-size: 0.7rem;
    }
    
    table {
        min-width: 500px;
    }
    
    .btn-sm {
        padding: 0.375rem 0.5rem;
        font-size: 0.7rem;
        min-height: 32px;
    }
    
    /* Hide scroll indicator on very small screens */
    .table-container::after {
        display: none;
    }
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-pending {
    background-color: #fef3c7;
    color: #92400e;
}

.status-confirmed {
    background-color: #d1fae5;
    color: #065f46;
}

status-completed {
    background-color: #e5e7eb;
    color: #374151;
}

.status-cancelled {
    background-color: #fee2e2;
    color: #b91c1c;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background-color: var(--white);
    border-radius: var(--radius);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalFadeIn 0.3s ease;
    position: relative;
}

@keyframes modalFadeIn {
    from { 
        transform: translateY(-20px) scale(0.95); 
        opacity: 0; 
    }
    to { 
        transform: translateY(0) scale(1); 
        opacity: 1; 
    }
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background-color: var(--white);
    z-index: 10;
    border-radius: var(--radius) var(--radius) 0 0;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--neutral-dark);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--neutral-dark);
    padding: 0.5rem;
    border-radius: var(--radius);
    transition: all 0.3s ease;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background-color: var(--neutral-light);
    color: var(--error);
}

.modal-close:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.modal-body {
    padding: 1.5rem;
    max-height: calc(90vh - 140px);
    overflow-y: auto;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    position: sticky;
    bottom: 0;
    background-color: var(--white);
    z-index: 10;
    border-radius: 0 0 var(--radius) var(--radius);
}

/* Enhanced Modal Responsiveness */
/* Tablet Modal Adjustments */
@media (min-width: 768px) and (max-width: 1023px) {
    .modal {
        max-width: 90%;
        max-height: 90vh;
        margin: 1rem;
    }
    
    .modal-header {
        padding: 1.5rem;
    }
    
    .modal-title {
        font-size: 1.25rem;
    }
    
    .modal-body {
        padding: 1.5rem;
        max-height: calc(90vh - 140px);
    }
    
    .modal-footer {
        padding: 1.5rem;
        gap: 1rem;
    }
    
    .modal-footer .btn {
        min-height: 46px;
        padding: 0.75rem 1.5rem;
    }
}

/* Mobile Modal Adjustments */
@media (max-width: 767px) {
    .modal-overlay {
        padding: 0;
        align-items: flex-end;
        background-color: rgba(0, 0, 0, 0.6);
    }
    
    .modal {
        max-width: 100%;
        max-height: 95vh;
        border-radius: var(--radius) var(--radius) 0 0;
        margin: 0;
        animation: modalSlideUp 0.3s ease;
        box-shadow: 0 -10px 25px -5px rgba(0, 0, 0, 0.1), 0 -4px 6px -2px rgba(0, 0, 0, 0.05);
    }
    
    .modal-header {
        padding: 1.25rem 1.5rem;
        border-bottom: 2px solid #e5e7eb;
        position: sticky;
        top: 0;
        background-color: var(--white);
        z-index: 10;
    }
    
    .modal-title {
        font-size: 1.125rem;
        font-weight: 700;
    }
    
    .modal-close {
        font-size: 1.75rem;
        min-width: 48px;
        min-height: 48px;
    }
    
    .modal-body {
        padding: 1.5rem;
        max-height: calc(95vh - 140px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .modal-footer {
        padding: 1.25rem 1.5rem;
        flex-direction: column;
        gap: 0.75rem;
        border-top: 2px solid #e5e7eb;
        position: sticky;
        bottom: 0;
        background-color: var(--white);
        z-index: 10;
    }
    
    .modal-footer .btn {
        width: 100%;
        justify-content: center;
        min-height: 48px;
        font-size: 1rem;
        font-weight: 600;
    }
    
    /* Improve modal content spacing */
    .modal-body .form-group {
        margin-bottom: 1.5rem;
    }
    
    .modal-body .form-row {
        flex-direction: column;
        gap: 0;
    }
}

@keyframes modalSlideUp {
    from { 
        transform: translateY(100%); 
        opacity: 0; 
    }
    to { 
        transform: translateY(0); 
        opacity: 1; 
    }
}

@media (max-width: 480px) {
    .modal-overlay {
        padding: 0;
    }
    
    .modal {
        border-radius: 0;
        max-height: 100vh;
    }
    
    .modal-header {
        padding: 1rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .modal-footer {
        padding: 1rem;
    }
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1100;
}

.toast {
    background-color: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 300px;
    animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
}

.toast-success {
    border-left: 4px solid var(--success);
}

.toast-error {
    border-left: 4px solid var(--error);
}

.toast-warning {
    border-left: 4px solid var(--warning);
}

.toast-info {
    border-left: 4px solid var(--primary);
}

.toast-icon {
    font-size: 1.5rem;
}

.toast-success .toast-icon {
    color: var(--success);
}

.toast-error .toast-icon {
    color: var(--error);
}

.toast-warning .toast-icon {
    color: var(--warning);
}

.toast-info .toast-icon {
    color: var(--primary);
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.toast-message {
    font-size: 0.875rem;
    color: var(--neutral-dark);
}

@keyframes toastIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes toastOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

/* Footer */
footer {
    background-color: var(--white);
    padding: 2rem 0;
    border-top: 1px solid #e5e7eb;
    margin-top: 3rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--neutral-dark);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.3s ease;
    padding: 0.25rem 0;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-copyright {
    font-size: 0.875rem;
    color: var(--neutral-dark);
    margin: 0;
}

/* Mobile footer adjustments */
@media (max-width: 767px) {
    footer {
        padding: 1.5rem 0;
        margin-top: 2rem;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    
    .footer-links {
        justify-content: center;
        gap: 1rem;
    }
    
    .footer-links a {
        font-size: 0.8rem;
    }
    
    .footer-copyright {
        font-size: 0.8rem;
        order: 2;
    }
}

@media (max-width: 480px) {
    footer {
        padding: 1rem 0;
    }
    
    .footer-content {
        gap: 1rem;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .footer-links a {
        padding: 0.5rem 0;
        border-bottom: 1px solid #e5e7eb;
    }
    
    .footer-links a:last-child {
        border-bottom: none;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    nav ul {
        gap: 0.5rem;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .service-cards {
        grid-template-columns: 1fr;
    }
    
    .booking-steps {
        flex-direction: column;
        gap: 1rem;
    }
    
    .booking-steps::before {
        display: none;
    }
    
    .step {
        flex-direction: row;
        gap: 1rem;
    }
    
    .filters {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Tablet Devices (768px and up) */
@media (min-width: 768px) {
    .container {
        padding: 0 30px;
    }
    
    .service-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .filters {
        flex-direction: row;
    }
    
    .booking-steps {
        flex-direction: row;
    }
    
    .booking-steps::before {
        display: block;
    }
    
    .step {
        flex-direction: column;
    }
}

/* Small laptops (1024px and up) */
@media (min-width: 1024px) {
    .service-cards {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .services-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Large screens (1200px and up) */
@media (min-width: 1200px) {
    .service-cards {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Mobile-specific adjustments (767px and below) */
@media (max-width: 767px) {
    /* Navigation */
    nav ul {
        flex-direction: column;
        gap: 0;
        width: 100%;
    }
    
    nav a {
        display: block;
        padding: 1rem;
        border-radius: 0;
        border-bottom: 1px solid #e5e7eb;
    }
    
    /* Header layout */
    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    /* Calendar */
    .fc-toolbar {
        flex-direction: column;
        gap: 1rem;
    }
    
    .fc-toolbar-title {
        font-size: 1.5rem !important;
    }
    
    /* Forms */
    .form-row {
        flex-direction: column;
    }
    
    /* Tables */
    .table-container {
        overflow-x: auto;
    }
    
    table {
        min-width: 600px;
    }
    
    /* Modal adjustments */
    .modal {
        margin: 0.5rem;
        width: calc(100% - 1rem);
    }
    
    /* Footer */
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    /* Time slots grid */
    .time-slots {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Dashboard header */
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

/* Enhanced Typography Responsiveness */
/* Tablet Typography */
@media (min-width: 768px) and (max-width: 1023px) {
    .container {
        padding: 0 30px;
    }
    
    .logo {
        font-size: 1.6rem;
    }
    
    .dashboard-title {
        font-size: 2rem;
    }
    
    .card-title {
        font-size: 1.3rem;
    }
    
    .card {
        padding: 1.75rem;
    }
    
    .step-label {
        font-size: 0.9rem;
    }
    
    .footer-copyright {
        font-size: 0.9rem;
    }
    
    .footer-links a {
        font-size: 0.9rem;
    }
}

/* Mobile Typography */
@media (max-width: 767px) {
    .container {
        padding: 0 20px;
    }
    
    .logo {
        font-size: 1.4rem;
        font-weight: 700;
    }
    
    .dashboard-title {
        font-size: 1.75rem;
        font-weight: 700;
        line-height: 1.3;
    }
    
    .card-title {
        font-size: 1.25rem;
        font-weight: 600;
    }
    
    .card {
        padding: 1.5rem;
        margin-bottom: 1.25rem;
    }
    
    .step-label {
        font-size: 0.9rem;
        font-weight: 500;
    }
    
    .footer-copyright {
        font-size: 0.85rem;
    }
    
    .footer-links a {
        font-size: 0.85rem;
    }
    
    /* Improve text readability on mobile */
    body {
        font-size: 16px;
        line-height: 1.6;
    }
    
    h1, h2, h3, h4, h5, h6 {
        line-height: 1.3;
        margin-bottom: 0.75rem;
    }
    
    p {
        line-height: 1.6;
        margin-bottom: 1rem;
    }
}

/* Very small devices (480px and below) */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .logo {
        font-size: 1.3rem;
    }
    
    .dashboard-title {
        font-size: 1.5rem;
        line-height: 1.2;
    }
    
    .card-title {
        font-size: 1.125rem;
    }
    
    .card {
        padding: 1.25rem;
        margin-bottom: 1rem;
    }
    
    .step-label {
        font-size: 0.85rem;
    }
    
    .footer-copyright {
        font-size: 0.8rem;
    }
    
    .footer-links a {
        font-size: 0.8rem;
    }
    
    /* Improve readability on very small screens */
    body {
        font-size: 15px;
    }
    
    h1, h2, h3, h4, h5, h6 {
        line-height: 1.2;
        margin-bottom: 0.5rem;
    }
    
    p {
        line-height: 1.5;
        margin-bottom: 0.875rem;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .modal-footer .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .modal-footer .btn:last-child {
        margin-bottom: 0;
    }
    
    .toast {
        min-width: auto;
        width: calc(100vw - 2rem);
    }
}

/* Orientation-specific adjustments */
@media (max-height: 500px) and (orientation: landscape) {
    .modal {
        max-height: 80vh;
    }
    
    .booking-steps {
        margin-bottom: 1rem;
    }
}

/* High-resolution displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Refine styles for retina displays if needed */
}

/* Print styles */
@media print {
    header, footer, .btn, .modal-overlay {
        display: none !important;
    }
    
    .view.active {
        display: block !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* ===== ENHANCED MOBILE NAVIGATION ===== */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--neutral-dark);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius);
    transition: all 0.3s ease;
    min-width: 44px;
    min-height: 44px;
    z-index: 101;
}

.nav-toggle:hover {
    background-color: var(--primary-light);
    color: var(--primary);
}

.nav-toggle:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.nav-toggle.active {
    background-color: var(--primary);
    color: var(--white);
}

/* Navigation icons */
.nav-link i {
    margin-right: 0.5rem;
    width: 16px;
    text-align: center;
}

/* Enhanced mobile navigation */
@media (max-width: 767px) {
    .nav-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
    }
    
    nav ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
        z-index: 100;
        flex-direction: column;
        border-radius: 0 0 var(--radius) var(--radius);
        overflow: hidden;
        border-top: 1px solid #e5e7eb;
    }
    
    nav ul.active {
        display: flex;
        animation: slideDown 0.3s ease;
    }
    
    .header-content {
        position: relative;
        min-height: 70px;
        padding: 1rem 0;
    }
    
    .nav-link {
        display: flex;
        align-items: center;
        padding: 1rem 1.5rem;
        border-bottom: 1px solid #e5e7eb;
        border-radius: 0;
        min-height: 50px;
        font-size: 1rem;
        transition: all 0.3s ease;
    }
    
    .nav-link:last-child {
        border-bottom: none;
    }
    
    .nav-link:hover {
        background-color: var(--primary-light);
        color: var(--primary);
    }
    
    .nav-link span {
        margin-left: 0.75rem;
        font-weight: 500;
    }
    
    .logo {
        font-size: 1.4rem;
        z-index: 101;
    }
}

/* Tablet navigation */
@media (min-width: 768px) and (max-width: 1023px) {
    .header-content {
        padding: 1.25rem 0;
    }
    
    nav ul {
        gap: 1.5rem;
    }
    
    .nav-link {
        padding: 0.75rem 1.25rem;
        font-size: 0.95rem;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== TOUCH DEVICE OPTIMIZATIONS ===== */

.touch-device .service-card:hover {
    transform: none;
}

.touch-device .service-card.touch-active {
    transform: scale(0.98);
    background-color: var(--primary-light);
}

@media (hover: none) and (pointer: coarse) {
    /* Increase tap target sizes for touch devices */
    .btn, .nav-link, .service-card, .time-slot {
        min-height: 44px;
        min-width: 44px;
    }
    
    .time-slot {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Reduce hover effects on touch devices */
    .service-card:hover {
        transform: none;
    }
    
    .time-slot:hover {
        transform: none;
    }
    
    /* Improve touch scrolling */
    .modal-body {
        -webkit-overflow-scrolling: touch;
    }
    
    .table-container {
        -webkit-overflow-scrolling: touch;
    }
}

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

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--primary);
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Focus management for accessibility */
.focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --primary: #0000ff;
        --success: #008000;
        --warning: #ff8c00;
        --error: #ff0000;
        --neutral-dark: #000000;
        --neutral-light: #ffffff;
    }
    
    .btn {
        border: 2px solid currentColor;
    }
    
    .service-card, .time-slot {
        border: 2px solid var(--neutral-dark);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .service-card:hover {
        transform: none;
    }
    
    .time-slot:hover {
        transform: none;
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    :root {
        --white: #1f2937;
        --neutral-light: #374151;
        --neutral-dark: #f9fafb;
    }
    
    body {
        background-color: #111827;
        color: var(--neutral-dark);
    }
    
    .card, .modal, .service-card {
        background-color: var(--white);
        border: 1px solid #374151;
    }
    
    input, select, textarea {
        background-color: var(--white);
        border-color: #4b5563;
        color: var(--neutral-dark);
    }
}