html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #28a745;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
  background-color: #f8fafc;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: #1a202c;
}

/* Modern Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1.2;
    color: #1a202c;
}

h1 { font-size: 2.5rem; font-weight: 700; }
h2 { font-size: 2rem; font-weight: 600; }
h3 { font-size: 1.75rem; font-weight: 600; }
h4 { font-size: 1.5rem; font-weight: 600; }
h5 { font-size: 1.25rem; font-weight: 600; }
h6 { font-size: 1.125rem; font-weight: 600; }

/* Card headers should also be modern */
.card-header h1, .card-header h2, .card-header h3, 
.card-header h4, .card-header h5, .card-header h6 {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 600;
    letter-spacing: -0.025em;
    margin-bottom: 0;
    color: white;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* Dashboard Styles */
.dashboard-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 2rem;
    border-radius: 20px;
    margin-bottom: 2rem;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.dashboard-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 100%);
    pointer-events: none;
}

.dashboard-header h1 {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    text-shadow: none;
    margin-bottom: 0.5rem;
    line-height: 1.1;
    position: relative;
    z-index: 1;
}

.dashboard-header .lead {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 400;
    opacity: 0.9;
    font-size: 1.2rem;
    position: relative;
    z-index: 1;
}

.dashboard-card {
    border: none;
    border-radius: 20px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    background: white;
    overflow: hidden;
}

.dashboard-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.card-icon {
    opacity: 0.8;
}

.card-stats {
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 1rem;
    margin: 1rem 0;
}

.btn-block {
    width: 100%;
    margin-bottom: 0.5rem;
}

/* Navigation Enhancements */
.navbar {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    background: white !important;
    border-bottom: 1px solid #e2e8f0;
    backdrop-filter: blur(10px);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: #667eea !important;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    letter-spacing: -0.025em;
}

.nav-link {
    font-weight: 500;
    transition: all 0.2s ease;
    border-radius: 8px;
    margin: 0 4px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #64748b !important;
}

.nav-link:hover {
    background-color: #f1f5f9;
    color: #667eea !important;
    transform: translateY(-1px);
}

.nav-link i {
    margin-right: 5px;
}

/* Page Specific Styles */
.page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2.5rem 2rem;
    border-radius: 20px;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.3);
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 100%);
    pointer-events: none;
}

.page-header h1, .page-header h2 {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 600;
    letter-spacing: -0.025em;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.page-header h1 {
    font-size: 2.75rem;
    line-height: 1.1;
}

.page-header h2 {
    font-size: 2.5rem;
    line-height: 1.2;
}

.page-header p, .page-header .lead {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    opacity: 0.9;
    font-weight: 400;
    position: relative;
    z-index: 1;
}

.page-card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
    background: white;
    overflow: hidden;
    transition: all 0.3s ease;
}

.page-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12);
}

.page-card .card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 0;
    font-weight: 600;
    border: none;
    padding: 1.5rem 2rem;
    position: relative;
    overflow: hidden;
}

.page-card .card-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent 70%, rgba(255,255,255,0.1) 100%);
    pointer-events: none;
}

.page-card .card-header h5 {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 600;
    letter-spacing: -0.025em;
    margin-bottom: 0;
    position: relative;
    z-index: 1;
}

.page-card .card-body {
    padding: 2rem;
}

/* Calendar Styles */
.calendar-table {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08);
    background: white;
}

.calendar-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1.25rem 1rem;
    font-weight: 600;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    letter-spacing: -0.025em;
    font-size: 0.95rem;
}

.calendar-table td {
    height: 120px;
    vertical-align: top;
    border: 1px solid #e2e8f0;
    position: relative;
    background: white;
    transition: all 0.2s ease;
}

.calendar-table td:hover {
    background-color: #f7fafc;
    border-color: #cbd5e0;
}

/* Calendar Day Modal Header - Modern Purple */
.calendar-day-modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border: none;
    color: white;
    padding: 1.5rem 2rem;
    position: relative;
    overflow: hidden;
}

.calendar-day-modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent 70%, rgba(255,255,255,0.1) 100%);
    pointer-events: none;
}

.calendar-day-modal-header .modal-title {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 600;
    letter-spacing: -0.025em;
    position: relative;
    z-index: 1;
    font-size: 1.4rem;
}

.calendar-day-modal-header .btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.8;
    position: relative;
    z-index: 1;
}

.calendar-day-modal-header .btn-close:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Events Table */
.events-table {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
}

.events-table thead th {
    background-color: #28a745;
    color: white;
    border: none;
}

/* Documents List */
.document-item {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.document-item:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    transform: translateX(5px);
}

/* Upload Form */
.upload-form {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

/* Responsive Improvements */
@media (max-width: 768px) {
    .dashboard-header {
        padding: 2rem 1.5rem;
        margin-bottom: 1.5rem;
        border-radius: 16px;
    }
    
    .dashboard-header h1 {
        font-size: 2.5rem;
        line-height: 1.1;
    }
    
    .page-header {
        padding: 2rem 1.5rem;
        border-radius: 16px;
    }
    
    .page-header h1 {
        font-size: 2.25rem;
        line-height: 1.1;
    }
    
    .page-header h2 {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .card-icon i {
        font-size: 2rem !important;
    }
    
    h1 { font-size: 2.25rem; }
    h2 { font-size: 1.875rem; }
    h3 { font-size: 1.625rem; }
    h4 { font-size: 1.375rem; }
    h5 { font-size: 1.25rem; }
    h6 { font-size: 1.125rem; }
}

/* Modern Button Styles */
.btn {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 500;
    letter-spacing: -0.025em;
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    transition: all 0.2s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
}

.btn-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4);
}

.btn-light {
    background: white;
    color: #64748b;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.btn-light:hover {
    background: #f8fafc;
    border-color: #cbd5e0;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Modern Form Styles */
.form-control {
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    padding: 0.75rem 1rem;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    transition: all 0.2s ease;
    background: white;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: white;
}

.form-label {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

/* Modern Card Styles */
.dashboard-card {
    border: none;
    border-radius: 20px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    background: white;
    overflow: hidden;
}

.dashboard-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}