/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* Login Page */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-form {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.login-form h1 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 2.5em;
}

.subtitle {
    color: #666;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
}

.btn-primary {
    background-color: #667eea;
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background-color: #5a6fd8;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.demo-credentials {
    margin-top: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 5px;
    text-align: left;
}

.demo-credentials h3 {
    margin-bottom: 10px;
    color: #495057;
}

/* Header */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.style-selector {
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 0.9rem;
    margin-right: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.style-selector:hover {
    background: rgba(255, 255, 255, 0.2);
}

.style-selector option {
    background: #333;
    color: white;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    font-size: 1.8em;
}

.header-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Main Content */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.calendar-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.calendar-controls h2 {
    min-width: 200px;
    text-align: center;
    color: #333;
    font-size: 1.5em;
}

.calendar-controls .btn {
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
}

/* Calendar */
.calendar {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.calendar-header-day {
    padding: 15px 10px;
    text-align: center;
    font-weight: 600;
    color: #495057;
    border-right: 1px solid #dee2e6;
}

.calendar-header-day:last-child {
    border-right: none;
}

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

.calendar-day {
    min-height: 120px;
    max-height: 120px;
    border-right: 1px solid #dee2e6;
    border-bottom: 1px solid #dee2e6;
    padding: 10px;
    position: relative;
    cursor: pointer;
    transition: background-color 0.2s;
    overflow-y: auto;
}

.calendar-day:last-child {
    border-right: none;
}

.calendar-day:hover {
    background-color: #f8f9fa;
}

.calendar-day.other-month {
    background-color: #f8f9fa;
    color: #6c757d;
}

.calendar-day.today {
    background-color: #e3f2fd;
    border: 2px solid #2196f3;
}

.calendar-day.holiday {
    background-color: #f5f5f5;
    border: 2px solid #d1d5db;
}

.holiday-info {
    font-size: 0.7rem;
    color: #374151;
    font-weight: bold;
    text-align: center;
    margin-top: 2px;
    padding: 1px 2px;
    background-color: rgba(107, 114, 128, 0.2);
    border-radius: 2px;
}

.hours-info {
    font-size: 0.6rem;
    color: #666;
    text-align: center;
    margin-top: 2px;
    padding: 1px 2px;
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 2px;
}

.office-hours-item .hours-inputs {
    display: flex;
    gap: 10px;
    margin-top: 5px;
}

.office-hours-item .hours-inputs label {
    display: flex;
    flex-direction: column;
    font-size: 0.9rem;
}

.office-hours-item .hours-inputs input[type="time"] {
    margin-top: 2px;
    padding: 4px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.day-number {
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 0.75em;
    position: absolute;
    top: 5px;
    right: 8px;
    line-height: 1;
}

.doctor-entry {
    background-color: #e3f2fd;
    margin: 1px 0;
    padding: 1px 2px;
    border-radius: 3px;
    font-size: 0.64em;
    position: relative;
    border-left: 3px solid #2196f3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.doctor-entry .doctor-name {
    font-weight: 500;
}

.doctor-entry .role-initial {
    display: inline-block;
    width: 20px;
    font-weight: bold;
    color: #666;
}

.doctor-entry .delete-btn {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    font-size: 10px;
    cursor: pointer;
    display: none;
}

.doctor-entry:hover .delete-btn {
    display: block;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Prevent background scrolling when modal is open */
body.modal-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-height: 90vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #333;
}

.close {
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
}

.close:hover {
    color: #000;
}

.modal-body {
    padding: 20px;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

select {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    background-color: white;
}

select:focus {
    outline: none;
    border-color: #667eea;
}

/* Admin Modal */
.admin-modal {
    max-width: 800px;
}

.admin-tabs {
    display: flex;
    flex-wrap: wrap;
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 20px;
    gap: 5px;
}

.tab-btn {
    padding: 6px 12px;
    border: none;
    background: none;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    font-weight: 500;
    font-size: 12px;
    white-space: nowrap;
}

.tab-btn.active {
    border-bottom-color: #667eea;
    color: #667eea;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.admin-section h4 {
    margin-bottom: 15px;
    color: #333;
}

.admin-list {
    margin-top: 20px;
}

.admin-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    margin-bottom: 10px;
    background-color: #f8f9fa;
}

.admin-item-info {
    flex: 1;
}

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

.btn-sm {
    padding: 6px 12px;
    font-size: 14px;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}

/* Selectable role list styling for doctor roles */
.role-selection-container {
    max-height: 150px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #fafafa;
}

.role-selection-item {
    padding: 12px 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid #eee;
    user-select: none;
}

.role-selection-item:last-child {
    border-bottom: none;
}

.role-selection-item:hover {
    background-color: #e3f2fd;
}

.role-selection-item.selected {
    background-color: #2196f3;
    color: white;
}

.role-selection-item.selected:hover {
    background-color: #1976d2;
}

/* Color palette selector */
.color-palette {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 6px;
    margin-bottom: 15px;
    max-width: 320px;
}

.color-option {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

@media (max-width: 480px) {
    .color-palette {
        grid-template-columns: repeat(6, 1fr);
        max-width: 240px;
    }
    
    .color-option {
        width: 24px;
        height: 24px;
    }
}

.color-option:hover {
    transform: scale(1.1);
    border-color: #333;
}

.color-option.selected {
    border-color: #000;
    transform: scale(1.15);
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #000;
}

.custom-color-section {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.custom-color-input {
    width: 60px !important;
    height: 32px !important;
    padding: 0 !important;
    border: 2px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
}

.preview-btn {
    padding: 6px 12px;
    background-color: #2196f3;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .header h1 {
        font-size: 1.5em;
    }

    .header-buttons {
        gap: 8px;
    }

    .header-buttons .btn {
        padding: 8px 12px;
        font-size: 14px;
    }

    .calendar-controls {
        flex-direction: row;
        gap: 15px;
        align-items: center;
    }

    .calendar-controls h2 {
        min-width: 180px;
        font-size: 1.3em;
    }

    .calendar-controls .btn {
        min-width: 50px;
        min-height: 50px;
        font-size: 20px;
        border-radius: 8px;
    }

    .calendar-day {
        min-height: 80px;
        padding: 5px;
    }

    .doctor-entry {
        font-size: 0.75em;
        padding: 2px 4px;
        margin: 1px 0;
        line-height: 1.1;
        min-height: 16px;
        display: block !important;
        visibility: visible !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .doctor-entry .role-initial {
        font-size: 0.9em;
        font-weight: bold;
        margin-right: 2px;
        display: inline !important;
    }

    .doctor-entry .doctor-name {
        font-size: 0.85em;
        display: inline !important;
    }

    .role-initial {
        display: inline-block !important;
    }

    .modal-content {
        width: 95%;
        margin: 10% auto;
    }

    .admin-tabs {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 2px;
    }

    .tab-btn {
        padding: 4px 8px;
        font-size: 11px;
        text-align: center;
        border-bottom: 2px solid transparent;
    }

    .tab-btn.active {
        border-bottom-color: #667eea;
        color: #667eea;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 10px;
    }

    .header h1 {
        font-size: 1.3em;
    }

    .header-buttons .btn {
        padding: 6px 10px;
        font-size: 13px;
    }

    .calendar-controls h2 {
        min-width: 150px;
        font-size: 1.2em;
    }

    .calendar-controls .btn {
        min-width: 45px;
        min-height: 45px;
        font-size: 18px;
    }

    .calendar-day {
        min-height: 65px;
        max-height: 65px;
        padding: 4px;
        overflow-y: auto;
    }

    .day-number {
        font-size: 0.7em;
        margin-bottom: 3px;
        position: absolute;
        top: 3px;
        right: 5px;
        line-height: 1;
    }

    .doctor-entry {
        font-size: 0.43em;
        padding: 1px 2px;
        margin: 0px 0;
        line-height: 1;
        display: flex;
        align-items: center;
        min-height: auto;
    }

    .doctor-entry .role-initial {
        font-size: 0.8em;
        width: 15px;
    }

    .doctor-entry .doctor-name {
        font-size: 0.8em;
    }

    .doctor-entry .delete-btn {
        width: 14px;
        height: 14px;
        font-size: 8px;
    }

    .holiday-info {
        font-size: 0.6rem !important;
        padding: 1px 2px !important;
        margin-top: 1px !important;
        display: block !important;
        visibility: visible !important;
        background-color: rgba(244, 67, 54, 0.2) !important;
        color: #d32f2f !important;
        font-weight: bold !important;
        text-align: center !important;
        border-radius: 2px !important;
        line-height: 1.1 !important;
    }
}

/* Theme Styles */

/* Flat Theme */
body.theme-flat {
    /* Design tokens for Flat (Palette A) */
    --bg: linear-gradient(135deg, #0f172a 0%, #111827 100%);
    --surface: #ffffff;
    --surface-2: #f5f7fb;
    --text: #1f2937;
    --muted: #6b7280;
    --primary: #6366f1; /* indigo-500 */
    --primary-600: #4f46e5; /* indigo-600 */
    --accent: #7c3aed; /* violet-600 */
    --border: #e5e7eb;
    --elev: rgba(0, 0, 0, 0.08);

    background: var(--bg);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

body.theme-flat .header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
}

body.theme-flat .calendar {
    background: #ffffff;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 20px;
    overflow: hidden;
}

body.theme-flat .calendar-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 2px solid #dee2e6;
}

body.theme-flat .calendar-header-day {
    font-weight: 700;
    color: #495057;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
}

body.theme-flat .calendar-day {
    border-color: #f1f3f4;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

body.theme-flat .calendar-day:hover {
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
}

body.theme-flat .btn {
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    position: relative;
    overflow: hidden;
}

body.theme-flat .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

body.theme-flat .btn:hover::before {
    left: 100%;
}

body.theme-flat .btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

body.theme-flat .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4);
}

body.theme-flat .btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    box-shadow: 0 8px 25px rgba(108, 117, 125, 0.3);
}

body.theme-flat .doctor-entry {
    border-radius: 12px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid #e9ecef;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

body.theme-flat .doctor-entry::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

body.theme-flat .doctor-entry:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

/* Glass Theme */
body.theme-glass {
    /* Design tokens for Glass (Palette A on cosmic dark) */
    --bg: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    --surface: rgba(255, 255, 255, 0.08);
    --surface-2: rgba(255, 255, 255, 0.05);
    --text: rgba(255, 255, 255, 0.9);
    --muted: rgba(255, 255, 255, 0.7);
    --primary: #9d8cff;
    --primary-600: #7c6cff;
    --accent: #78dbff;
    --border: rgba(255, 255, 255, 0.15);
    --elev: rgba(0, 0, 0, 0.3);

    background: var(--bg);
    min-height: 100vh;
}

body.theme-glass::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

body.theme-glass .header {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(25px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

body.theme-glass .calendar {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border-radius: 24px;
}

body.theme-glass .calendar-header {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

body.theme-glass .calendar-header-day {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

body.theme-glass .calendar-day {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

body.theme-glass .calendar-day:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-4px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

body.theme-glass .day-number {
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

body.theme-glass .doctor-entry {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

body.theme-glass .doctor-entry:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

body.theme-glass .btn {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

body.theme-glass .btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
}

body.theme-glass .modal-content {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(40px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

/* Aqua Theme */
body.theme-aqua {
    /* Design tokens for Aqua (Palette C: ocean teal/cyan) */
    --bg: 
        radial-gradient(circle at 25% 25%, #00d4ff 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, #0099cc 0%, transparent 50%),
        linear-gradient(135deg, #001f3f 0%, #003d5c 50%, #004d6b 100%);
    --surface: #ffffff;
    --surface-2: #f0f8ff;
    --text: #073b4c;
    --muted: #3a7d88;
    --primary: #00b4d8;
    --primary-600: #0096c7;
    --accent: #40e0ff;
    --border: rgba(0, 180, 216, 0.25);
    --elev: rgba(0, 153, 204, 0.25);

    background: var(--bg);
    min-height: 100vh;
    position: relative;
}

body.theme-aqua::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 20%, rgba(0, 212, 255, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(0, 153, 204, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(64, 224, 255, 0.05) 0%, transparent 60%);
    animation: aquaFlow 20s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes aquaFlow {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-10px) rotate(1deg); }
    66% { transform: translateY(5px) rotate(-1deg); }
}

body.theme-aqua .header {
    background: 
        linear-gradient(135deg, rgba(0, 212, 255, 0.2) 0%, rgba(0, 153, 204, 0.3) 100%),
        rgba(0, 31, 63, 0.8);
    backdrop-filter: blur(20px);
    box-shadow: 
        0 8px 32px rgba(0, 212, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(0, 212, 255, 0.3);
}

body.theme-aqua .calendar {
    background: 
        linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(240, 248, 255, 0.9) 100%);
    backdrop-filter: blur(20px);
    box-shadow: 
        0 25px 50px rgba(0, 153, 204, 0.3),
        0 0 0 1px rgba(0, 212, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border-radius: 24px;
    border: none;
    position: relative;
    overflow: hidden;
}

body.theme-aqua .calendar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-600), var(--accent));
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

body.theme-aqua .calendar-header {
    background: 
        linear-gradient(135deg, rgba(0, 212, 255, 0.1) 0%, rgba(0, 153, 204, 0.15) 100%);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 212, 255, 0.2);
}

body.theme-aqua .calendar-header-day {
    color: #003d5c;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 1px 2px rgba(0, 212, 255, 0.3);
}

body.theme-aqua .calendar-day {
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(0, 212, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

body.theme-aqua .calendar-day::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.1), transparent);
    transition: left 0.6s ease;
}

body.theme-aqua .calendar-day:hover::before {
    left: 100%;
}

body.theme-aqua .calendar-day:hover {
    background: 
        linear-gradient(135deg, rgba(0, 212, 255, 0.1) 0%, rgba(64, 224, 255, 0.05) 100%),
        rgba(255, 255, 255, 0.8);
    border-color: rgba(0, 212, 255, 0.4);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 
        0 15px 35px rgba(0, 153, 204, 0.25),
        0 5px 15px rgba(0, 212, 255, 0.1);
}

body.theme-aqua .day-number {
    color: #003d5c;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 212, 255, 0.2);
}

body.theme-aqua .doctor-entry {
    background: 
        linear-gradient(135deg, #00d4ff 0%, #0099cc 50%, #40e0ff 100%);
    color: white;
    border: none;
    border-radius: 16px;
    box-shadow: 
        0 8px 25px rgba(0, 153, 204, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

body.theme-aqua .doctor-entry::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

body.theme-aqua .doctor-entry:hover::before {
    left: 100%;
}

body.theme-aqua .doctor-entry:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 
        0 15px 40px rgba(0, 153, 204, 0.5),
        0 5px 15px rgba(0, 212, 255, 0.3);
}

body.theme-aqua .btn {
    border-radius: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    position: relative;
    overflow: hidden;
}

body.theme-aqua .btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-600) 100%);
    box-shadow: 0 8px 25px rgba(0, 153, 204, 0.4);
    color: white;
}

body.theme-aqua .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(0, 153, 204, 0.5);
}

body.theme-aqua .btn-secondary {
    background: linear-gradient(135deg, #40e0ff 0%, #00b4db 100%);
    box-shadow: 0 8px 25px rgba(64, 224, 255, 0.4);
    color: white;
}

body.theme-aqua .btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(64, 224, 255, 0.5);
}

body.theme-aqua .modal-content {
    background: 
        linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(240, 248, 255, 0.9) 100%);
    backdrop-filter: blur(30px);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 24px;
    box-shadow: 
        0 25px 50px rgba(0, 153, 204, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

