/* ============================================
   Modern Activity Management System Styles
   Theme: Violet Gradient - Modern & Clean
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@300;400;500;600;700&display=swap');

* {
    font-family: 'Kanit', sans-serif;
}

/* CSS Variables - Unified Theme */
:root {
    /* Primary Theme Colors */
    --primary-50: #f5f3ff;
    --primary-100: #ede9fe;
    --primary-200: #ddd6fe;
    --primary-300: #c4b5fd;
    --primary-400: #a78bfa;
    --primary-500: #8b5cf6;
    --primary-600: #7c3aed;
    --primary-700: #6d28d9;
    --primary-800: #5b21b6;
    --primary-900: #4c1d95;
    
    /* Secondary Colors */
    --secondary-500: #10b981;
    --secondary-600: #059669;
    
    /* Semantic Colors */
    --danger: #ef4444;
    --warning: #f59e0b;
    --success: #22c55e;
    --info: #3b82f6;
    
    /* Neutrals */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-purple: 0 10px 40px rgba(139, 92, 246, 0.15);
    --shadow-purple-hover: 0 20px 50px rgba(139, 92, 246, 0.25);
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;
}

/* ============================================
   Base Styles & Animations
   ============================================ */

body {
    font-size: 16px;
    line-height: 1.6;
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 50%, #e0e7ff 100%);
    min-height: 100vh;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-400), var(--primary-600));
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(139, 92, 246, 0.5);
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.fade-in-up {
    animation: fadeInUp 0.5s ease-out forwards;
}

.slide-in-right {
    animation: slideInRight 0.5s ease-out forwards;
}

/* Staggered animation delays */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* ============================================
   Navigation
   ============================================ */

.navbar {
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-800) 100%);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-lg), 0 0 30px rgba(139, 92, 246, 0.2);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.navbar-brand-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.9) 100%);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
}

.navbar-brand-icon svg {
    width: 24px;
    height: 24px;
    color: var(--primary-600);
}

.navbar-title {
    color: white;
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.025em;
}

.nav-link {
    color: rgba(255, 255, 255, 0.85);
    padding: 0.625rem 1rem;
    border-radius: var(--radius-lg);
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: white;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.nav-link:hover::before {
    width: 60%;
}

.nav-link-active {
    color: white;
    background: rgba(255, 255, 255, 0.2);
    font-weight: 600;
}

.nav-link-active::before {
    width: 60%;
}

/* Register button in nav */
.btn-register-nav {
    background: linear-gradient(135deg, var(--secondary-500) 0%, var(--secondary-600) 100%);
    color: white;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.btn-register-nav:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
    color: white;
}

/* Mobile menu button */
.mobile-menu-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
}

.mobile-menu-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.mobile-menu-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: white;
    margin: 2px 0;
    border-radius: var(--radius-full);
    transition: all 0.3s ease;
}

/* ============================================
   Cards
   ============================================ */

.card {
    background: white;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(139, 92, 246, 0.05);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-purple-hover);
}

.card-header {
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 50%, var(--primary-800) 100%);
    color: white;
    padding: 1.5rem 2rem;
    position: relative;
    overflow: hidden;
}

.card-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
}

.card-header::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -30%;
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
}

.card-body {
    padding: 1.5rem 2rem;
}

/* ============================================
   Statistics Cards
   ============================================ */

.stat-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-500), var(--primary-700));
    border-radius: var(--radius-full);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-card-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-card-value {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    background: linear-gradient(135deg, var(--primary-600), var(--primary-800));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card-label {
    color: var(--gray-500);
    font-weight: 500;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* ============================================
   Buttons
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 0.9375rem;
    border-radius: var(--radius-lg);
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.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 ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
    color: white;
    box-shadow: var(--shadow-md), 0 0 20px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 0 30px rgba(139, 92, 246, 0.4);
    color: white;
}

.btn-secondary {
    background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-200) 100%);
    color: var(--gray-700);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, var(--gray-200) 0%, var(--gray-300) 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: var(--gray-800);
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #16a34a 100%);
    color: white;
    box-shadow: var(--shadow-md), 0 0 20px rgba(34, 197, 94, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 0 30px rgba(34, 197, 94, 0.4);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 0 20px rgba(239, 68, 68, 0.4);
    color: white;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.0625rem;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* ============================================
   Form Elements
   ============================================ */

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
    font-size: 0.9375rem;
}

.form-label-required::after {
    content: ' *';
    color: var(--danger);
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    font-weight: 400;
    color: var(--gray-800);
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15);
}

.form-control::placeholder {
    color: var(--gray-400);
}

.form-control:hover:not(:focus) {
    border-color: var(--gray-300);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.25rem;
    padding-right: 3rem;
}

/* Checkbox Custom */
.form-check {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.form-check-input {
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
    background: white;
}

.form-check-input:checked {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    border-color: var(--primary-500);
}

.form-check-input:checked::after {
    content: '✓';
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.form-check-input:focus {
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15);
}

/* ============================================
   Calendar
   ============================================ */

.calendar-header {
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 50%, #7c3aed 100%);
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.calendar-nav-btn {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-xl);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: 600;
    transition: all 0.3s ease;
}

.calendar-nav-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
    color: white;
}

.calendar-month-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.9) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Calendar Input Field */
.calendar-input-field {
    padding: 16px 24px;
    font-size: 18px;
    border: 2px solid var(--primary-500);
    border-radius: 16px;
    background: white;
    color: var(--gray-800);
    font-family: 'Kanit', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.15);
    min-width: 280px;
}

.calendar-input-field:hover {
    border-color: var(--primary-600);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.25);
}

.calendar-input-field:focus {
    outline: none;
    border-color: var(--primary-700);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.35);
}

/* Activity Card */
.activity-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 16px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 16px;
}

.activity-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.15);
    border-color: var(--primary-500);
}

.activity-date-badge {
    display: inline-block;
    background: var(--gray-100);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 14px;
    color: var(--gray-500);
    margin-bottom: 12px;
}

.activity-details {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--gray-100);
}

.calendar-day-header {
    text-align: center;
    font-weight: 700;
    padding: 1rem;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
    color: var(--gray-600);
    font-size: 0.9375rem;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 0.5rem;
    border-radius: var(--radius-lg);
    background: white;
    border: 1px solid var(--gray-100);
    transition: all 0.3s ease;
    cursor: pointer;
    min-height: 80px;
}

.calendar-day:hover {
    background: var(--primary-50);
    border-color: var(--primary-200);
    transform: scale(1.02);
}

.calendar-day-number {
    font-weight: 600;
    font-size: 1rem;
    color: var(--gray-700);
    margin-bottom: 0.25rem;
}

.calendar-day-event {
    font-size: 0.6875rem;
    padding: 0.125rem 0.5rem;
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    color: white;
    border-radius: var(--radius-full);
    text-align: center;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-day-empty {
    background: var(--gray-50);
    border-color: transparent;
}

.calendar-day-today {
    background: linear-gradient(135deg, var(--primary-50), #ede9fe);
    border-color: var(--primary-300);
}

.calendar-day-today .calendar-day-number {
    color: var(--primary-600);
    font-weight: 700;
}

/* Calendar Grid Container */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
    margin-bottom: 2rem;
}

/* Calendar Day Activity Count Badge */
.calendar-day-activity-count {
    margin-top: 0.25rem;
}

/* Calendar Day Activities Container */
.calendar-day-activities {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    justify-content: center;
    margin-top: 0.25rem;
}

/* Calendar Activity Dot */
.calendar-activity-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

/* Calendar Day Has Activity */
.calendar-day-has-activity {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border-color: #bae6fd;
}

/* Calendar Day Events Container */
.calendar-day-events {
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: 100%;
    margin-top: 4px;
    max-height: 60px;
    overflow-y: auto;
}

/* Calendar Day Event Item */
.calendar-day-event-item {
    font-size: 0.65rem;
    padding: 2px 4px;
    color: white;
    border-radius: 4px;
    text-align: center;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: transform 0.2s ease;
}

.calendar-day-event-item:hover {
    transform: scale(1.05);
}

/* ============================================
   Tables
   ============================================ */

.table-container {
    overflow-x: auto;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
}

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
}

.table thead th {
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
    color: white;
    font-weight: 600;
    padding: 1rem 1.5rem;
    text-align: left;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table thead th:first-child {
    border-top-left-radius: var(--radius-xl);
}

.table thead th:last-child {
    border-top-right-radius: var(--radius-xl);
}

.table tbody tr {
    transition: all 0.2s ease;
}

.table tbody tr:hover {
    background: var(--primary-50);
}

.table tbody td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--gray-100);
    font-size: 0.9375rem;
    color: var(--gray-700);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table tbody tr:last-child td:first-child {
    border-bottom-left-radius: var(--radius-xl);
}

.table tbody tr:last-child td:last-child {
    border-bottom-right-radius: var(--radius-xl);
}

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.badge-primary {
    background: linear-gradient(135deg, var(--primary-100), var(--primary-200));
    color: var(--primary-700);
}

.badge-success {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    color: #166534;
}

.badge-warning {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
}

.badge-danger {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #991b1b;
}

/* ============================================
   Modal
   ============================================ */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
    animation: fadeInUp 0.3s ease;
}

.modal-content {
    background: white;
    border-radius: var(--radius-2xl);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-2xl), 0 0 60px rgba(139, 92, 246, 0.2);
    animation: fadeInUp 0.4s ease;
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
    color: white;
    padding: 1.5rem 2rem;
    border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    padding: 1rem 2rem 2rem;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* ============================================
   Loading & States
   ============================================ */

.spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary-500);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    z-index: 9999;
}

.loading-text {
    color: var(--primary-600);
    font-weight: 600;
}

/* ============================================
   Responsive Utilities
   ============================================ */

@media (max-width: 768px) {
    .navbar-title {
        font-size: 1rem;
    }
    
    .navbar-brand-icon {
        width: 36px;
        height: 36px;
    }
    
    .calendar-month-title {
        font-size: 1.5rem;
    }
    
    .calendar-nav-btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-card-value {
        font-size: 2rem;
    }
    
    .table thead th,
    .table tbody td {
        padding: 0.75rem;
        font-size: 0.8125rem;
    }
}

@media (max-width: 640px) {
    .calendar-day {
        min-height: 60px;
        padding: 0.25rem;
    }
    
    .calendar-day-number {
        font-size: 0.875rem;
    }
    
    .calendar-day-event {
        font-size: 0.5625rem;
        padding: 0.125rem 0.25rem;
    }
}

/* ============================================
   Dark Mode Support
   ============================================ */

@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #1f2937 0%, #111827 50%, #0f172a 100%);
    }
    
    .card {
        background: #1f2937;
        box-shadow: var(--shadow-lg);
    }
    
    .form-control {
        background: #374151;
        border-color: #4b5563;
        color: #f3f4f6;
    }
    
    .table {
        background: #1f2937;
    }
    
    .table tbody tr:hover {
        background: #374151;
    }
    
    .table tbody td {
        border-color: #374151;
        color: #d1d5db;
    }
    
    .stat-card {
        background: #1f2937;
    }
    
    .stat-card-label {
        color: #9ca3af;
    }
}

/* ============================================
   Accessibility
   ============================================ */

*:focus-visible {
    outline: 3px solid var(--primary-500);
    outline-offset: 2px;
}

.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;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
