/* TulongAral+ - Main Styles */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    max-width: 100%;
}

:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --background: #f8fafc;
    --surface: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

html {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    min-height: 100vh;
    position: relative;
    touch-action: pan-y pinch-zoom;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    word-break: normal;
    overflow-wrap: break-word;
}

body.modal-open {
    overflow: hidden;
    padding-right: 0;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    white-space: normal;
    word-break: normal;
    max-width: 100%;
}

h1 { font-size: clamp(1.75rem, 5vw, 2.5rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.5rem); }

p {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    white-space: normal;
    word-break: normal;
    max-width: 100%;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    word-wrap: break-word;
    white-space: normal;
    max-width: 100%;
}

a:hover {
    text-decoration: underline;
}

/* Global text display fix - prevent vertical text and overflow */
span, div, label, td, th, li, button, input, textarea, select {
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: normal;
    max-width: 100%;
    box-sizing: border-box;
}

/* Prevent horizontal overflow on all elements */
img, video, iframe, canvas {
    max-width: 100%;
    height: auto;
}

/* Buttons */
button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    outline: none;
    transition: all 0.3s ease;
    white-space: normal;
    word-wrap: break-word;
    max-width: 100%;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
}

.btn-secondary:hover {
    background-color: #475569;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
}

.btn-danger:hover {
    background-color: #dc2626;
}

.btn-success {
    background-color: #10b981;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
}

.btn-success:hover {
    background-color: #059669;
}

.btn-text {
    background: none;
    color: var(--text-secondary);
    padding: 0.5rem;
    border-radius: 0.25rem;
}

.btn-text:hover {
    color: var(--primary-color);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-delete {
    background-color: transparent;
    color: var(--danger-color);
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--danger-color);
    border-radius: 0.375rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    margin-left: 1rem;
}

.btn-delete:hover {
    background-color: var(--danger-color);
    color: white;
}

.btn-delete-small {
    background-color: transparent;
    color: var(--danger-color);
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--danger-color);
    border-radius: 0.25rem;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    margin-left: auto;
}

.btn-delete-small:hover {
    background-color: var(--danger-color);
    color: white;
}

.btn-full {
    width: 100%;
}

/* Navigation */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background-color: transparent;
    position: relative;
    z-index: 1;
}

.navbar .logo h1 {
    color: white;
    font-size: 1.8rem;
    margin: 0;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.navbar .nav-buttons .btn-secondary {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.navbar .nav-buttons .btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.3);
    border-color: white;
}

.navbar .nav-buttons .btn-primary {
    background-color: white;
    color: var(--primary-color);
    border: 2px solid white;
}

.navbar .nav-buttons .btn-primary:hover {
    background-color: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.main-navbar {
    background-color: var(--surface);
    box-shadow: var(--shadow);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.main-navbar .logo h1 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin: 0;
}

.nav-links {
    display: flex;
    gap: 2rem;
    min-height: 40px;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    transition: all 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
    background-color: var(--background);
    text-decoration: none;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-buttons {
    display: flex;
    gap: 1rem;
}

/* Landing Page */
.landing-page {
    min-height: 100vh;
}

.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    min-height: 85vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 200%;
    top: 0;
    left: 0;
    background-image: 
        radial-gradient(circle, rgba(255, 255, 255, 0.15) 2px, transparent 2px),
        radial-gradient(circle, rgba(255, 255, 255, 0.12) 3px, transparent 3px),
        radial-gradient(circle, rgba(255, 255, 255, 0.1) 4px, transparent 4px),
        radial-gradient(circle, rgba(255, 255, 255, 0.08) 5px, transparent 5px);
    background-size: 60px 60px, 90px 90px, 120px 120px, 150px 150px;
    background-position: 0 0, 40px 60px, 130px 270px, 70px 100px;
    animation: floatParticles 25s linear infinite;
    pointer-events: none;
    z-index: 0;
}

.hero-content {
    text-align: center;
    padding: 5rem 2rem 4rem;
    max-width: 900px;
    margin: 0 auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.hero-content h2 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-subtitle {
    font-size: 1.3rem !important;
    margin-bottom: 1rem !important;
    opacity: 0.95 !important;
    font-weight: 300;
}

.hero-region {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 2.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2rem;
    display: inline-block;
    backdrop-filter: blur(10px);
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Features Section */
.features-section {
    padding: 3.5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    background: var(--background);
    width: 100%;
    overflow: hidden;
}

.features-section h2 {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    word-wrap: break-word;
}

.features-grid {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
    width: 100%;
    overflow: hidden;
}

.feature-card {
    background: var(--surface);
    padding: 1.5rem 1.25rem;
    border-radius: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    flex: 1;
    min-width: 180px;
    max-width: 220px;
    text-align: center;
    overflow: hidden;
    word-wrap: break-word;
}

.feature-card h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.15);
    border-color: var(--primary-color);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.feature-card h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.5;
    font-size: 0.9rem;
}

/* Stats Section */
.stats-section {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 4rem 2rem;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.05);
}

.stat-item {
    text-align: center;
    min-width: 200px;
}

.stat-item h3 {
    font-size: 3.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(37, 99, 235, 0.1);
}

.stat-item p {
    font-size: 1.1rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* CTA Section */
.cta-section {
    text-align: center;
    padding: 5rem 2rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
}

.cta-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: white;
}

.cta-section p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

/* Footer */
.footer {
    background: #1a202c;
    color: white;
    text-align: center;
    padding: 2rem;
}

/* Auth Pages */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    position: relative;
    overflow: hidden;
}

.auth-page::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 200%;
    top: 0;
    left: 0;
    background-image: 
        radial-gradient(circle, rgba(255, 255, 255, 0.15) 2px, transparent 2px),
        radial-gradient(circle, rgba(255, 255, 255, 0.12) 3px, transparent 3px),
        radial-gradient(circle, rgba(255, 255, 255, 0.1) 4px, transparent 4px),
        radial-gradient(circle, rgba(255, 255, 255, 0.08) 5px, transparent 5px);
    background-size: 60px 60px, 90px 90px, 120px 120px, 150px 150px;
    background-position: 0 0, 40px 60px, 130px 270px, 70px 100px;
    animation: floatParticles 25s linear infinite;
    pointer-events: none;
}

@keyframes floatParticles {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-50%);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-container {
    background: var(--surface);
    padding: 1.5rem 1.75rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 380px;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.4s ease-out;
    border: 1px solid var(--border-color);
}

.modern-login-card {
    background: var(--surface);
}

@media (max-width: 768px) {
    .auth-container {
        max-width: 380px;
        padding: 1.5rem 1.5rem;
    }
    
    .register-container {
        max-width: 520px;
        padding: 1.5rem 1.25rem;
    }
}

@media (max-width: 480px) {
    .auth-container {
        max-width: 360px;
        padding: 1.25rem 1.25rem;
        border-radius: 8px;
        margin: 0 auto;
    }
    
    .register-container {
        max-width: 420px;
        padding: 1.25rem 1rem;
    }
    
    .auth-header h1 {
        font-size: 1.375rem;
    }
    
    .auth-header h2 {
        font-size: 1.125rem;
    }
}

.register-container {
    max-width: 640px;
}

.modern-register-card {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

.form-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 2px;
}

.auth-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-header h1 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.75rem;
    font-weight: 500;
    letter-spacing: -0.5px;
}

.auth-header h2 {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 400;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
}

.auth-footer p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.auth-footer .link {
    color: var(--primary-color);
    font-weight: 500;
    transition: all 0.2s;
}

.auth-footer .link:hover {
    text-decoration: underline;
}

.auth-footer .btn-text {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 0.5rem 0.875rem;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 4px;
}

.auth-footer .btn-text:hover {
    color: var(--primary-color);
    background: rgba(37, 99, 235, 0.04);
}

.auth-divider {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 42%;
    height: 1px;
    background: var(--border-color);
}

.auth-divider::before {
    left: 0;
}

.auth-divider::after {
    right: 0;
}

.auth-divider span {
    background: var(--surface);
    padding: 0 0.75rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    position: relative;
    z-index: 1;
}

.auth-footer .btn-text:hover {
    color: var(--primary-color);
}

/* Auth Form Specific Styles */
.auth-form {
    width: 100%;
    max-width: 100%;
}

.modern-form .form-group {
    margin-bottom: 1.25rem;
}

.auth-form .form-group {
    margin-bottom: 1rem;
}

.modern-form .form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--text-primary);
}

.modern-form .form-group label svg {
    color: var(--text-secondary);
    width: 14px;
    height: 14px;
}

.auth-form .form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: block;
    color: var(--text-primary);
}

.modern-form .form-group input {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0.75rem 0.875rem !important;
    font-size: 1rem;
    box-sizing: border-box;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: all 0.2s ease;
    background: var(--surface);
    color: var(--text-primary);
}

.modern-form .form-group input:hover {
    border-color: #bdc1c6;
}

.modern-form .form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 1px var(--primary-color);
}

.auth-form .form-group input,
.auth-form .form-group select {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0.75rem 0.875rem !important;
    font-size: 1rem;
    box-sizing: border-box;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: all 0.2s ease;
    background: var(--surface);
    color: var(--text-primary);
}

.auth-form .form-group input:hover,
.auth-form .form-group select:hover {
    border-color: #bdc1c6;
}

.auth-form .form-group input:focus,
.auth-form .form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 1px var(--primary-color);
}

/* Password Toggle Styles */
.password-input-wrapper {
    position: relative;
    width: 100%;
}

.password-input-wrapper input {
    padding-right: 2.75rem !important;
}

.password-toggle {
    position: absolute;
    right: 0.625rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: color 0.2s ease;
    border-radius: 4px;
}

.password-toggle:hover {
    color: var(--primary-color);
    background: rgba(37, 99, 235, 0.05);
}

.password-toggle:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.password-toggle svg {
    width: 20px;
    height: 20px;
}

.auth-form .form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.auth-form .form-options .link {
    color: var(--primary-color);
    font-weight: 500;
    font-size: 0.875rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    display: inline-block;
    position: relative;
    transition: all 0.2s;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.auth-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 480px) {
    .auth-form .form-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
}

.modern-btn {
    width: 100%;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 4px;
    background: var(--primary-color);
    transition: all 0.2s ease;
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: none;
    letter-spacing: 0.25px;
}

.modern-btn:hover {
    background: var(--primary-dark);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.modern-btn:active {
    background: var(--primary-dark);
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
}

.auth-form .btn-full {
    width: 100%;
    padding: 0.8rem;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    transition: all 0.3s ease;
}

.auth-form .btn-full:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(37, 99, 235, 0.3);
}

/* Error Message Styling */
.error-message {
    background: linear-gradient(135deg, #fee 0%, #fdd 100%);
    color: #c33;
    padding: 0.875rem 1rem;
    border-radius: 12px;
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
    border-left: 4px solid #c33;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    box-shadow: 0 4px 12px rgba(204, 51, 51, 0.15);
}

.error-message::before {
    content: '⚠';
    font-size: 1.25rem;
    flex-shrink: 0;
}

.success-message {
    background: linear-gradient(135deg, #efe 0%, #dfd 100%);
    color: #2a7c2a;
    padding: 0.875rem 1rem;
    border-radius: 12px;
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
    border-left: 4px solid #2a7c2a;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    box-shadow: 0 4px 12px rgba(42, 124, 42, 0.15);
}

.success-message::before {
    content: '✓';
    font-size: 1.25rem;
    flex-shrink: 0;
    font-weight: bold;
}

/* Avatar Selection in Register */
.avatar-selection {
    margin-bottom: 1.5rem;
}

.avatar-selection label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

/* Collapsible Avatar Section */
.collapsible-header {
    cursor: pointer;
    user-select: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    transition: all 0.3s ease;
}

.collapsible-header:hover {
    color: var(--primary-color);
}

.collapse-icon {
    font-size: 0.875rem;
    transition: transform 0.3s ease;
    color: var(--text-secondary);
}

.avatar-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
    gap: 0.75rem;
}

.imgs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 1rem;
    padding: 1rem;
    background: var(--background);
    border-radius: 12px;
    border: 2px solid var(--border-color);
}

.avatar-option {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid transparent;
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    overflow: hidden;
    position: relative;
}

.avatar-option img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-option:hover {
    transform: scale(1.1);
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.avatar-option.selected {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
    transform: scale(1.05);
}

.avatar-option.selected::after {
    content: '✓';
    position: absolute;
    bottom: -2px;
    right: -2px;
    background: var(--primary-color);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    border: 2px solid white;
}

/* Role Selection */
.role-selection {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.role-option {
    padding: 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.role-option:hover {
    border-color: var(--primary-color);
    background: rgba(37, 99, 235, 0.05);
}

.role-option.selected {
    border-color: var(--primary-color);
    background: rgba(37, 99, 235, 0.1);
}

.role-option input[type="radio"] {
    display: none;
}

.role-option strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.role-option span {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Forms */
.form-container {
    background: var(--surface);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
}

.form-section {
    margin-bottom: 2rem;
}

.form-section h3 {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    max-width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.9375rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
    overflow: hidden;
    word-wrap: break-word;
    white-space: normal;
    background: var(--surface);
}

.form-group textarea {
    resize: vertical;
    max-width: 100%;
    min-height: 100px;
    max-height: 400px;
    overflow-wrap: break-word;
    white-space: normal;
    line-height: 1.6;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.form-help {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* File Upload */
.file-upload-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background 0.2s;
}

.file-upload-label:hover {
    background: var(--primary-dark);
}

.file-upload-label input[type="file"] {
    display: none;
}

.files-list {
    margin-top: 1rem;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--background);
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
}

.file-name {
    font-size: 0.875rem;
}

/* Google Drive Instructions */
.gdrive-instructions {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.instruction-header,
.instructions-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.instruction-header svg,
.instructions-header svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    color: var(--primary-color);
}

.instruction-header h3,
.instructions-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.instruction-steps {
    margin: 1rem 0 1.25rem 0;
    padding-left: 1.5rem;
}

.instruction-steps li {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.instruction-steps li strong {
    color: var(--text-primary);
}

.instruction-tip {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    background: rgba(255, 255, 255, 0.7);
    border-left: 3px solid var(--primary-color);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-top: 1rem;
}

.instruction-tip svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 0.125rem;
    color: var(--primary-color);
}

.instruction-tip p,
.instruction-tip span {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Documents Checklist */
.documents-checklist {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.documents-checklist h3,
.documents-checklist h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
}

.documents-checklist .checklist-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0 0 1rem 0;
}

.checklist-items {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.checklist-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    flex-shrink: 0;
}

.checklist-item input[type="checkbox"]:checked {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.checklist-item label {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin: 0;
    cursor: pointer;
}

.checklist-item .doc-label {
    transition: color 0.3s ease;
}

.checklist-item .doc-label.required-doc {
    color: #ea580c;
    font-weight: 600;
}

/* AI Document Analysis Indicators */
.ai-analyzing {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.875rem 1rem;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--primary-color);
    font-weight: 500;
}

.ai-analyzing svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* AI Document Requirements Box */
.ai-document-requirements {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 2px solid #3b82f6;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.ai-requirements-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
    font-size: 1.125rem;
}

.ai-requirements-header svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.ai-requirements-subtitle {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin: 0 0 1rem 0;
}

.ai-requirements-list {
    margin: 0 0 1rem 0;
    padding-left: 1.5rem;
    list-style: none;
}

.ai-requirements-list li {
    position: relative;
    font-size: 0.9375rem;
    color: var(--text-primary);
    line-height: 1.7;
    margin-bottom: 0.625rem;
    padding-left: 0.5rem;
}

.ai-requirements-list li:before {
    content: '✓';
    position: absolute;
    left: -1.25rem;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1rem;
}

.ai-requirements-tip {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    background: rgba(255, 255, 255, 0.6);
    border-left: 3px solid var(--primary-color);
    border-radius: 6px;
    padding: 0.75rem;
    margin-top: 1rem;
}

.ai-requirements-tip svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 0.125rem;
    color: var(--primary-color);
}

.ai-requirements-tip span {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.ai-requirements-fallback {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.875rem 1rem;
    background: #fef3c7;
    border: 1px solid #fbbf24;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: #92400e;
}

.ai-requirements-fallback svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.ai-success-msg {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.875rem 1rem;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: #16a34a;
    font-weight: 500;
}

.ai-success-msg svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.ai-suggested {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: var(--primary-color);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 12px;
    margin-left: auto;
}

.checklist-item {
    position: relative;
}

.checklist-item .ai-suggested {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

/* Application Page Styles */
.application-page-header {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    padding: 2rem 0;
    margin: -2rem -2rem 2rem -2rem;
    border-radius: 0 0 24px 24px;
}

.application-header-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

.btn-back-header {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 1.5rem;
}

.btn-back-header:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateX(-4px);
}

.btn-back-header svg {
    flex-shrink: 0;
}

.application-header-title {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    color: white;
}

.application-header-title .header-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    opacity: 0.9;
}

.application-header-title h1 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: white;
}

.application-subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    font-weight: 500;
}

.application-form-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--surface);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.form-actions button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.2s;
}

.form-actions button svg {
    flex-shrink: 0;
}

.form-actions .btn-secondary {
    flex: 0 0 auto;
}

.form-actions .btn-primary {
    flex: 1;
    justify-content: center;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .application-page-header {
        margin: -1rem -1rem 1.5rem -1rem;
        padding: 1.5rem 0;
    }
    
    .application-header-content {
        padding: 0 1rem;
    }
    
    .application-header-title {
        gap: 0.75rem;
    }
    
    .application-header-title .header-icon {
        width: 36px;
        height: 36px;
    }
    
    .application-header-title h1 {
        font-size: 1.5rem;
    }
    
    .application-subtitle {
        font-size: 0.9375rem;
    }
    
    .application-form-container {
        padding: 1.5rem;
        border-radius: 12px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn-secondary,
    .form-actions .btn-primary {
        flex: 1;
        width: 100%;
        justify-content: center;
    }
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    min-width: 0;
    box-sizing: border-box;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
    width: 100%;
    overflow: hidden;
    min-width: 0;
}

.page-header h1 {
    margin: 0;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    flex: 1 1 auto;
    min-width: 0;
}

.page-header p {
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    margin: 0;
    width: 100%;
}

/* Search Section */
.search-section {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.search-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.search-bar input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
}

.filter-bar {
    display: flex;
    gap: 1rem;
}

.filter-bar select {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background: white;
}

/* Scholarships Grid */
.scholarships-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 400px), 1fr));
    gap: 2rem;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.scholarship-card {
    background: var(--surface);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    transition: transform 0.2s;
    overflow: hidden;
    word-wrap: break-word;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.scholarship-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* Modern Scholarship Cards */
.scholarship-card-modern {
    background: var(--surface);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 100%;
}

.scholarship-card-modern:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
    border-color: var(--primary-color);
}

.scholarship-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.scholarship-type-badge {
    padding: 0.375rem 0.875rem;
    border-radius: 12px;
    font-size: 0.8125rem;
    font-weight: 600;
    white-space: nowrap;
}

.scholarship-type-badge.badge-full-scholarship {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.scholarship-type-badge.badge-partial-scholarship {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

.scholarship-type-badge.badge-merit-based {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.scholarship-deadline-badge {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8125rem;
    font-weight: 600;
}

.scholarship-deadline-badge svg {
    width: 14px;
    height: 14px;
}

.scholarship-deadline-badge.urgent {
    background: #fef2f2;
    color: var(--danger-color);
}

.scholarship-deadline-badge.soon {
    background: #fffbeb;
    color: var(--warning-color);
}

.scholarship-deadline-badge.normal {
    background: #f0fdf4;
    color: var(--success-color);
}

.scholarship-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.scholarship-card-description {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.scholarship-card-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.meta-item svg {
    width: 16px;
    height: 16px;
    stroke: var(--primary-color);
    flex-shrink: 0;
}

.scholarship-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: auto;
}

.scholarship-slots {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

.scholarship-slots svg {
    width: 18px;
    height: 18px;
    stroke: var(--primary-color);
}

.btn-view-scholarship {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: linear-gradient(135deg, var(--primary-color), #1e40af);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-view-scholarship:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-view-scholarship svg {
    width: 16px;
    height: 16px;
    stroke-width: 2.5;
}

/* Keep old scholarship-card for backwards compatibility */

.scholarship-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
    width: 100%;
    max-width: 100%;
    flex-direction: row;
    box-sizing: border-box;
}

.scholarship-header h3 {
    margin: 0;
    font-size: clamp(1.125rem, 3vw, 1.5rem);
    flex: 1 1 auto;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
    min-width: 0;
    max-width: 100%;
    white-space: normal;
    display: inline-block;
}

.scholarship-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: clamp(0.875rem, 2vw, 1rem);
    line-height: 1.6;
    min-height: 80px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.scholarship-info {
    margin-bottom: 1.5rem;
    width: 100%;
    max-width: 100%;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
    font-size: clamp(0.825rem, 2vw, 0.95rem);
    gap: 1rem;
    flex-wrap: nowrap;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
    word-wrap: normal;
    flex-shrink: 0;
    display: inline-block;
    max-width: 50%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.info-item span:last-child {
    font-weight: 500;
    color: var(--text);
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    flex: 1 1 auto;
    text-align: right;
    min-width: 0;
    max-width: 100%;
    display: inline-block;
}

.scholarship-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    width: 100%;
    max-width: 100%;
}

.scholarship-actions button {
    flex: 1 1 auto;
    min-width: 100px;
    white-space: nowrap;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    vertical-align: middle;
    margin: 0;
    line-height: 1.2;
    white-space: nowrap;
    word-wrap: normal;
    overflow-wrap: normal;
    writing-mode: horizontal-tb;
}

.badge-full { background: #dbeafe; color: #1e40af; }
.badge-full-scholarship { background: #dbeafe; color: #1e40af; }
.badge-partial { background: #fef3c7; color: #92400e; }
.badge-partial-scholarship { background: #fef3c7; color: #92400e; }
.badge-allowance { background: #d1fae5; color: #065f46; }
.badge-grant { background: #e0e7ff; color: #3730a3; }
.badge-financial { background: #fce7f3; color: #831843; }
.badge-financial-aid { background: #fce7f3; color: #831843; }

.badge-active { background: #d1fae5; color: #065f46; }
.badge-inactive { background: #fee2e2; color: #991b1b; }
.badge-closed { background: #e5e7eb; color: #374151; }

.badge-pending { background: #fef3c7; color: #92400e; }
.badge-reviewing { background: #dbeafe; color: #1e40af; }
.badge-resolved { background: #d1fae5; color: #065f46; }
.badge-approved { background: #d1fae5; color: #065f46; }
.badge-rejected { background: #fee2e2; color: #991b1b; }

.badge-student { background: #dbeafe; color: #1e40af; }
.badge-sponsor { background: #fef3c7; color: #92400e; }
.badge-admin { background: #fee2e2; color: #991b1b; }
.badge-co-admin { background: #e0e7ff; color: #3730a3; }

/* Dashboard Stats */
/* Dashboard Page Header */
.dashboard-page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e40af 100%);
    color: white;
    padding: 2rem;
    border-radius: 16px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.dashboard-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.dashboard-page-header h1 {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
}

.dashboard-subtitle {
    margin: 0.5rem 0 0 0;
    font-size: 1rem;
    opacity: 0.95;
}

/* Sponsor Dashboard Specific Styles */
.sponsor-header {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.header-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-create,
.btn-refresh {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.btn-create:hover,
.btn-refresh:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-create svg,
.btn-refresh svg {
    width: 18px;
    height: 18px;
}

.sponsor-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.modern-stat-card {
    background: var(--surface);
    padding: 1.75rem;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.3s ease;
}

.modern-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon.blue {
    background: linear-gradient(135deg, var(--primary-color), #1e40af);
}

.stat-icon.purple {
    background: linear-gradient(135deg, #9333ea, #7c3aed);
}

.stat-icon.orange {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.stat-icon.green {
    background: linear-gradient(135deg, #10b981, #059669);
}

.stat-icon svg {
    width: 28px;
    height: 28px;
    stroke: white;
    stroke-width: 2.5;
}

.stat-content {
    flex: 1;
    min-width: 0;
}

.stat-content h3 {
    font-size: 2rem;
    margin: 0 0 0.25rem 0;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-content p {
    font-size: 0.875rem;
    margin: 0;
    color: var(--text-secondary);
    font-weight: 500;
}

.modern-section {
    background: var(--surface);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
}

.section-header-modern {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    padding-bottom: 0.875rem;
    border-bottom: 2px solid var(--border-color);
    flex-wrap: wrap;
    gap: 1rem;
}

.section-title-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-title-group svg {
    width: 24px;
    height: 24px;
    stroke: var(--primary-color);
    stroke-width: 2;
    flex-shrink: 0;
}

.section-title-group h2 {
    margin: 0;
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--text-primary);
}

.modern-select {
    padding: 0.625rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--background);
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%232563eb' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
}

.modern-select:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.modern-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.modern-table-container {
    overflow-x: visible;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.modern-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
    table-layout: fixed;
}

.modern-table thead {
    background: var(--background);
}

.modern-table thead th {
    padding: 0.625rem 0.5rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
    font-size: 0.8125rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.modern-table tbody td {
    padding: 0.625rem 0.5rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.8125rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.modern-table tbody tr {
    transition: background-color 0.2s ease;
}

.modern-table tbody tr:hover {
    background-color: var(--background);
}

.modern-table tbody tr:last-child td {
    border-bottom: none;
}

.modern-table .btn-sm {
    padding: 0.3rem 0.6rem;
    font-size: 0.75rem;
    border-radius: 6px;
    white-space: nowrap;
    margin: 0.125rem;
}

/* Scholarship Carousel */
.scholarship-carousel-container {
    background: linear-gradient(135deg, #f8fafc 0%, #e0e7ff 100%);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(37, 99, 235, 0.1);
}

.carousel-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.carousel-header-icon {
    width: 28px;
    height: 28px;
    stroke: var(--primary-color);
    stroke-width: 2;
}

.carousel-header h2 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.scholarship-carousel {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    min-height: 200px;
    max-height: 200px;
    display: flex;
    align-items: center;
}

.carousel-slides {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 200px;
    max-height: 200px;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    pointer-events: none;
    display: flex;
    align-items: center;
}

.carousel-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.carousel-content {
    padding: 1.5rem 2.5rem;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
}

.carousel-content.loading {
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.carousel-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    width: fit-content;
}

.carousel-badge.featured {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.carousel-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.2;
}

.carousel-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.carousel-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.carousel-meta-item svg {
    width: 16px;
    height: 16px;
    stroke: var(--primary-color);
}

.carousel-description {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.4;
    margin: 0 auto;
    max-width: 600px;
}

.carousel-actions {
    display: flex;
    justify-content: center;
    gap: 0.625rem;
    margin-top: 0;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.95);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.carousel-nav:hover {
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.carousel-nav svg {
    width: 20px;
    height: 20px;
    stroke: var(--primary-color);
    stroke-width: 2.5;
}

.carousel-prev {
    left: 0.75rem;
}

.carousel-next {
    right: 0.75rem;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.3);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.carousel-dot.active {
    width: 24px;
    border-radius: 4px;
    background: var(--primary-color);
}

.carousel-dot:hover {
    background: var(--primary-color);
}

/* Deadline Tracker */
.deadline-section {
    margin-bottom: 2rem;
}
.section-header-deadline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
}

.deadline-title-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.deadline-icon {
    width: 28px;
    height: 28px;
    stroke: var(--primary-color);
    stroke-width: 2;
}

.section-header-deadline h2 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.deadlines-list {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.deadline-card {
    background: var(--background);
    border-radius: 12px;
    padding: 1.25rem;
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--primary-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.3s ease;
}

.deadline-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateX(4px);
}

.deadline-card.urgent {
    border-left-color: var(--danger-color);
    background: linear-gradient(to right, #fef2f2 0%, var(--background) 100%);
}

.deadline-card.soon {
    border-left-color: var(--warning-color);
    background: linear-gradient(to right, #fffbeb 0%, var(--background) 100%);
}

.deadline-card.ok {
    border-left-color: var(--success-color);
    background: linear-gradient(to right, #f0fdf4 0%, var(--background) 100%);
}

.deadline-info {
    flex: 1;
    min-width: 0;
}

.deadline-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.deadline-status.urgent {
    background: #fef2f2;
    color: var(--danger-color);
}

.deadline-status.soon {
    background: #fffbeb;
    color: var(--warning-color);
}

.deadline-status.ok {
    background: #f0fdf4;
    color: var(--success-color);
}

.deadline-status svg {
    width: 14px;
    height: 14px;
}

.deadline-scholarship-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0.25rem 0;
}

.deadline-date-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: 0.375rem;
}

.deadline-countdown {
    text-align: center;
    min-width: 80px;
}

.countdown-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
    display: block;
    line-height: 1;
}

.deadline-card.urgent .countdown-number {
    color: var(--danger-color);
}

.deadline-card.soon .countdown-number {
    color: var(--warning-color);
}

.deadline-card.ok .countdown-number {
    color: var(--success-color);
}

.countdown-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.deadline-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.deadline-loading,
.deadlines-empty {
    text-align: center;
    padding: 2rem 1.5rem;
    color: var(--text-secondary);
}

.deadline-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    min-height: 150px;
    justify-content: center;
}

.deadlines-empty {
    background: var(--background);
    border-radius: 12px;
    border: 2px dashed var(--border-color);
}

.deadlines-empty .empty-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1rem;
    stroke: var(--success-color);
    opacity: 0.5;
}

.deadlines-empty h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.125rem;
    color: var(--text-primary);
}

.deadlines-empty p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

/* Loading Spinner */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(37, 99, 235, 0.1);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Dashboard Stats - Enhanced */
.dashboard-stats {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
}

.dashboard-subtitle {
    margin: 0.5rem 0 0 0;
    font-size: 1rem;
    opacity: 0.95;
}

/* Dashboard Stats - Enhanced */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
    width: 100%;
}

.stat-card {
    background: var(--surface);
    padding: 1.75rem;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
    text-align: center;
    width: 100%;
    min-width: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

.stat-icon-wrapper {
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, var(--primary-color), #1e40af);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon-wrapper.success {
    background: linear-gradient(135deg, var(--success-color), #059669);
}

.stat-icon-wrapper.warning {
    background: linear-gradient(135deg, var(--warning-color), #d97706);
}

.stat-icon-wrapper.danger {
    background: linear-gradient(135deg, var(--danger-color), #dc2626);
}

.stat-icon {
    width: 28px;
    height: 28px;
    stroke: white;
    stroke-width: 2.5;
}

.stat-card h3 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin: 0.5rem 0;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.2;
    font-weight: 700;
}

.stat-card.success h3 { color: var(--success-color); }
.stat-card.warning h3 { color: var(--warning-color); }
.stat-card.danger h3 { color: var(--danger-color); }

.stat-card p {
    color: var(--text-secondary);
    margin: 0;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    font-size: 0.95rem;
    line-height: 1.4;
    font-weight: 500;
}

/* Dashboard Section */
.dashboard-section {
    background: var(--surface);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
}

/* AI Section Header */
.section-header-ai {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.ai-section-title {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.ai-icon {
    width: 32px;
    height: 32px;
    stroke: var(--primary-color);
    stroke-width: 2;
}

.section-header-ai h2 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.ai-description {
    margin: 0.25rem 0 0 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.ai-toggle-icon {
    font-size: 1.25rem;
    color: var(--text-secondary);
    transition: transform 0.3s ease;
}

/* Applications Section Header */
.section-header-applications {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header-applications h2 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.section-description {
    margin: 0.25rem 0 0 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.filter-select {
    padding: 0.625rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--background);
    color: var(--text-primary);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Application Card - Enhanced */
.application-card {
    background: var(--background);
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary-color);
    width: 100%;
    min-width: 0;
    overflow: hidden;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.application-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateX(4px);
}

.application-card.scholarship-deleted {
    opacity: 0.7;
    border-left-color: #e74c3c;
    background: #fff5f5;
}

/* Empty State - Enhanced */
.empty-state-enhanced {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--background);
    border-radius: 16px;
    border: 2px dashed var(--border-color);
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    stroke: var(--text-secondary);
    opacity: 0.5;
}

.empty-state-enhanced h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.empty-state-enhanced p {
    margin: 0 0 1.5rem 0;
    color: var(--text-secondary);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* Section */
.section {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    width: 100%;
    min-width: 0;
    overflow: hidden;
}

.section h2 {
    margin-bottom: 1.5rem;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    display: block;
    width: 100%;
    max-width: 100%;
    flex-direction: row;
    writing-mode: horizontal-tb;
    text-orientation: mixed;
}

.section p {
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.section-header h2 {
    margin: 0;
    white-space: normal;
    word-wrap: break-word;
    flex: 1 1 auto;
    min-width: 0;
}

/* Tables */

.table-container {
    overflow-x: auto;
    width: 100%;
    -webkit-overflow-scrolling: touch;
    max-width: 100vw;
}

/* Only show scrollbar when content overflows */
.table-container::-webkit-scrollbar {
    height: 8px;
}

.table-container::-webkit-scrollbar-track {
    background: transparent;
}

.table-container::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 0;
    display: table;
    table-layout: auto;
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .data-table {
        min-width: 600px;
    }
}

.data-table thead {
    display: table-header-group;
}

.data-table tbody {
    display: table-row-group;
}

.data-table tr {
    display: table-row;
}

.data-table th,
.data-table td {
    padding: 0.4rem 0.25rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
    word-wrap: normal;
    overflow-wrap: normal;
    vertical-align: middle;
    min-width: 40px;
    display: table-cell;
    font-size: 0.8rem;
}

.data-table th {
    background: var(--background);
    font-weight: 600;
    white-space: nowrap;
    font-size: 0.8rem;
}

.data-table td {
    font-size: 0.8rem;
    line-height: 1.2;
    white-space: nowrap;
}

.data-table td button {
    white-space: nowrap;
    margin: 0.125rem;
    font-size: 0.8rem;
    padding: 0.375rem 0.625rem;
}

.data-table tr:hover {
    background: var(--background);
}

.empty-cell {
    text-align: center;
    color: var(--text-secondary);
    padding: 2rem;
    white-space: normal;
}

/* Applications List */
.applications-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
}

/* Removed - now using enhanced version above */

.application-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.application-header h3 {
    margin: 0;
    font-size: 1.1rem;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    flex: 1 1 auto;
    min-width: 0;
}

.application-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    width: 100%;
}

.application-info > div {
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    min-width: 0;
}

.application-notes {
    background: white;
    padding: 0.75rem;
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.application-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: var(--surface);
    margin: 5vh auto;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    position: relative;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color);
    scrollbar-gutter: stable;
}

.modal-content::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-track {
    background: transparent;
    margin: 0.5rem 0;
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

.modal-content h2 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-color);
    font-size: 1.5rem;
    font-weight: 600;
}

.modal-large {
    max-width: 900px;
}

.modal-small {
    max-width: 400px;
}

.close {
    color: var(--text-secondary);
    float: right;
    font-size: 1.75rem;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s ease;
    margin-top: -0.5rem;
    margin-right: -0.5rem;
}

.close:hover {
    color: var(--danger-color);
}

.modal-actions { 
    display: flex; 
    flex-direction: row; 
    gap: 1rem; 
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* Scholarship Detail */
.scholarship-detail-content {
    margin-top: 0;
}

.detail-section {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--background);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.detail-section h3 {
    margin: 0 0 1rem 0;
    padding: 0;
    border-bottom: none;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.detail-label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.sponsor-info {
    background: var(--background);
    padding: 1rem;
    border-radius: 0.5rem;
}

/* ===== FORUM PAGE STYLES ===== */

/* Forum Page Header */
.forum-page-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.forum-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.forum-title-section {
    flex: 1;
    min-width: 250px;
}

.forum-title-section h1 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 700;
}

.forum-title-section p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin: 0;
}

.forum-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.forum-actions button {
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
}

/* Forum Search Section */
.forum-search-section {
    margin-bottom: 2rem;
}

.search-input-wrapper {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-input-wrapper .search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
}

.search-input-wrapper input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 0.9375rem;
    transition: all 0.3s ease;
    background: var(--surface);
}

.search-input-wrapper input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Forum Posts List */
.forum-posts-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.forum-post-card {
    background: var(--surface);
    padding: 1.75rem;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    word-wrap: break-word;
    word-break: break-word;
}

.forum-post-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    border-color: var(--primary-color);
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 1rem;
}

.post-author {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    cursor: pointer;
    transition: opacity 0.2s;
    flex: 1;
    min-width: 0;
}

.post-author:hover {
    opacity: 0.8;
}

.post-author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--border-color);
    flex-shrink: 0;
    position: relative;
    background: var(--background);
    transition: border-color 0.3s ease;
}

.post-author-avatar.clickable:hover {
    border-color: var(--primary-color);
}

.post-author-avatar img {
    width: 120%;
    height: 120%;
    object-fit: cover;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.post-author-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
    flex: 1;
}

.post-author-info strong {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
}

.clickable-name {
    cursor: pointer;
    transition: color 0.2s;
}

.clickable-name:hover {
    color: var(--primary-color);
}

.post-date {
    color: var(--text-secondary);
    font-size: 0.8125rem;
}

.post-title {
    margin: 0 0 0.75rem 0;
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--text-primary);
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    line-height: 1.4;
}

.post-content {
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    line-height: 1.6;
    font-size: 0.9375rem;
}

.post-footer {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.post-footer-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

/* Forum Empty State */
.forum-empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.forum-empty-state svg {
    margin-bottom: 1.5rem;
    opacity: 0.8;
}

.forum-empty-state h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.forum-empty-state p {
    font-size: 1rem;
    margin-bottom: 0;
}

/* Comment Styles */
.comment-form {
    margin: 1rem 0 2rem 0;
}

.comment-form textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 0.75rem;
    resize: vertical;
    max-width: 100%;
    min-height: 100px;
    max-height: 300px;
    font-size: 0.9375rem;
    transition: border-color 0.3s ease;
}

.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.comment-item {
    background: var(--surface);
    padding: 1.25rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    display: flex;
    gap: 1rem;
    transition: box-shadow 0.2s ease;
}

.comment-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.comment-author-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--border-color);
    flex-shrink: 0;
    position: relative;
    background: var(--background);
    transition: border-color 0.3s ease;
}

.comment-author-avatar.clickable {
    cursor: pointer;
}

.comment-author-avatar.clickable:hover {
    border-color: var(--primary-color);
}

.comment-author-avatar img {
    width: 120%;
    height: 120%;
    object-fit: cover;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.comment-content {
    flex: 1;
    min-width: 0;
}

.comment-content strong {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9375rem;
}

.comment-content p {
    margin: 0.5rem 0 0 0;
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.9375rem;
}

/* Post Detail Styles */
.post-detail-header {
    margin-bottom: 1.5rem;
    margin-top: 2.5rem;
}

.post-detail-author {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.post-detail-author .post-author-avatar {
    width: 60px;
    height: 60px;
    border: 3px solid var(--border);
}

.post-detail-meta {
    flex: 1;
}

.post-detail-meta h2 {
    margin: 0 0 0.5rem 0;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.post-detail-content {
    margin-bottom: 2rem;
    line-height: 1.6;
}

.comment-header { display: flex; flex-direction: row; align-items: center; gap: 0.75rem; margin-bottom: 0.5rem; font-size: 0.875rem; flex-wrap: wrap;
}

.comment-date {
    color: var(--text-secondary);
}

.comment-text {
    margin: 0;
}

/* ===== PROFILE PAGE STYLES ===== */

/* Profile Page Header */
.profile-page-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.profile-header-content h1 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 700;
}

.profile-header-content p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin: 0;
}

/* Profile Container */
.profile-container {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 2rem;
    align-items: start;
}

.profile-sidebar {
    position: sticky;
    top: 2rem;
}

.profile-sidebar-card {
    background: var(--surface);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
    text-align: center;
}

.profile-picture {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
}

.profile-avatar-display {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--background);
    position: relative;
    transition: transform 0.3s ease;
}

.profile-avatar-display:hover {
    transform: scale(1.05);
}

.profile-avatar-display img {
    width: 120%;
    height: 120%;
    object-fit: cover;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.profile-info {
    padding-top: 0.5rem;
}

.profile-info h3 {
    margin-bottom: 0.75rem;
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--text-primary);
}

.profile-role-badge {
    display: inline-block;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    color: var(--primary-color);
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 0.375rem 0.875rem;
    border-radius: 12px;
    text-transform: capitalize;
    border: 1px solid #bfdbfe;
    margin-bottom: 1rem;
}

.profile-email {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin: 0;
    word-break: break-word;
}

/* Profile Main Form */
.profile-main {
    min-width: 0;
}

.profile-form-card {
    background: var(--surface);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
}

.form-section-header {
    padding-bottom: 1.25rem;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 2rem;
}

.form-section-header h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.form-section-header p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.form-section-body {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Profile value display (for view-profile page) */
.profile-value {
    padding: 0.75rem;
    background: var(--background);
    border-radius: 0.5rem;
    color: var(--text-primary);
    margin-top: 0.25rem;
    min-height: 2.5rem;
}

/* Messages */
.error-message {
    background: #fee2e2;
    color: #991b1b;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.success-message {
    background: #d1fae5;
    color: #065f46;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.empty-message {
    color: var(--text-secondary);
    text-align: center;
    padding: 2rem;
}

.text-muted {
    color: var(--text-secondary);
}

/* Activity Log */
.activity-log {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.activity-log::-webkit-scrollbar {
    width: 8px;
}

.activity-log::-webkit-scrollbar-track {
    background: var(--background);
    border-radius: 4px;
}

.activity-log::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.activity-log::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

.activity-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--background);
    border-radius: 0.5rem;
}

.activity-loading,
.activity-empty,
.activity-error {
    padding: 2rem;
    text-align: center;
    color: var(--text-secondary);
}

.activity-error {
    color: var(--danger-color);
}

.activity-user {
    color: var(--text-secondary);
    margin-left: 0.5rem;
}

.activity-time {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* ========================================
   OVERFLOW & COLLISION PREVENTION
   Universal fixes for all screen sizes
   ======================================== */

/* Prevent horizontal scroll on all elements */
*, *::before, *::after {
    max-width: 100%;
}

/* Ensure all containers respect viewport width */
.container,
.main-navbar,
.features-section,
.scholarships-grid,
.dashboard-stats,
.profile-container,
.modal-content,
.scholarship-card,
.application-card,
.stat-card,
.feature-card,
.page-header,
.search-section,
.filter-section {
    max-width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* Fix for long text content */
h1, h2, h3, h4, h5, h6,
p, span, div, a, li, td, th,
label, button, input, textarea, select {
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* Prevent images from overflowing */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Ensure tables are responsive */
table {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    display: block;
}

/* Fix for flex containers */
.flex, [class*="flex"] {
    min-width: 0;
    min-height: 0;
}

/* Fix for grid containers */
.grid, [class*="grid"] {
    min-width: 0;
}

/* Ensure buttons don't overflow */
button, .btn-primary, .btn-secondary, .btn-danger {
    max-width: 100%;
    white-space: normal;
    word-wrap: break-word;
}

/* Fix for modals on small screens */
.modal {
    padding: 1rem;
}

.modal-content {
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Fix for navigation */
.nav-links {
    max-width: 100%;
    flex-wrap: wrap;
}

/* Prevent content from being cut off */
.scholarship-card,
.application-card,
.stat-card {
    min-height: fit-content;
    height: auto;
}

/* Fix for long URLs and emails */
a[href^="http"],
a[href^="mailto"] {
    word-break: break-all;
}

/* ======================================== */

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0.75rem;
        max-width: 100%;
        overflow-x: hidden;
    }

    .main-navbar {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0.75rem;
        align-items: center;
    }
    
    .main-navbar .logo {
        flex: 0 0 auto;
        margin-right: auto;
    }
    
    .main-navbar .logo h1 {
        font-size: 1.25rem;
        white-space: nowrap;
    }

    .nav-links {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        width: auto;
        gap: 0.25rem;
        order: 3;
        flex-basis: 100%;
    }
    
    .nav-links a {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
        white-space: nowrap;
    }
    
    .nav-user {
        flex: 0 0 auto;
        order: 2;
        gap: 0.5rem;
    }
    
    .nav-user span {
        font-size: 0.875rem;
        white-space: nowrap;
    }
    
    .nav-user button {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
        white-space: nowrap;
    }

    .hero-content h2 {
        font-size: 1.5rem;
        word-wrap: break-word;
        white-space: normal;
        line-height: 1.3;
    }
    
    h1 {
        font-size: 1.75rem;
        white-space: normal;
    }
    
    h2 {
        font-size: 1.5rem;
        white-space: normal;
    }
    
    h3 {
        font-size: 1.25rem;
        white-space: normal;
    }
    
    p, span, a, button {
        white-space: normal;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .features-grid {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    
    .feature-card {
        min-width: 150px;
        max-width: 200px;
        flex: 1 1 calc(50% - 0.5rem);
    }

    .scholarships-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .scholarship-card {
        padding: 1rem;
        width: 100%;
        overflow: hidden;
    }

    /* Modern Scholarship Card Mobile */
    .scholarship-card-modern {
        padding: 1.25rem;
    }

    .scholarship-card-header {
        flex-wrap: wrap;
    }

    .scholarship-type-badge,
    .scholarship-deadline-badge {
        font-size: 0.75rem;
        padding: 0.3125rem 0.625rem;
    }

    .scholarship-card-title {
        font-size: 1.125rem;
    }

    .scholarship-card-description {
        font-size: 0.875rem;
    }

    .scholarship-card-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .btn-view-scholarship {
        width: 100%;
        justify-content: center;
    }
    
    .scholarship-header {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.5rem;
    }
    
    .scholarship-header h3 {
        font-size: 1.125rem;
        flex: 1 1 100%;
        white-space: normal;
    }
    
    .scholarship-card p,
    .scholarship-card .info-item {
        white-space: normal;
        font-size: 0.9rem;
    }

    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        width: 100%;
    }
    
    .stat-card {
        padding: 1rem;
        width: 100%;
        min-width: 0;
        text-align: center;
    }
    
    .stat-card h3 {
        font-size: 1.75rem;
        white-space: normal;
        word-wrap: break-word;
        line-height: 1.2;
        display: block;
    }
    
    .stat-card p {
        font-size: 0.875rem;
        white-space: normal;
        word-wrap: break-word;
        display: block;
        line-height: 1.3;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        width: 100%;
        padding: 0.75rem 0;
    }
    
    .page-header h1 {
        margin-bottom: 0.25rem;
    }
    
    .page-header p {
        margin: 0;
    }

    /* Forum responsive */
    .forum-header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .forum-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .forum-actions button {
        flex: 1;
        min-width: 120px;
    }

    /* Profile responsive */
    .profile-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .profile-sidebar {
        position: static;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
    
    .page-actions {
        width: 100%;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .page-actions button {
        flex: 1 1 calc(50% - 0.25rem);
        min-width: 120px;
        white-space: nowrap;
        font-size: 0.875rem;
        padding: 0.625rem 0.75rem;
    }

    .hero-actions {
        flex-direction: row;
        width: 100%;
        gap: 0.5rem;
        flex-wrap: wrap;
    }
    
    .hero-actions button {
        flex: 1 1 calc(50% - 0.25rem);
        min-width: 130px;
        white-space: nowrap;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .profile-container {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
        margin: 5% auto;
    }

    /* Dashboard Mobile Styles */
    .dashboard-page-header {
        padding: 1.5rem;
    }

    .dashboard-page-header h1 {
        font-size: 1.5rem;
    }

    .dashboard-subtitle {
        font-size: 0.9rem;
    }

    /* Sponsor Dashboard Mobile */
    .sponsor-header {
        padding: 1.5rem;
    }

    .header-actions {
        width: 100%;
        flex-direction: column;
        gap: 0.75rem;
    }

    .btn-create,
    .btn-refresh {
        width: 100%;
        justify-content: center;
        padding: 0.875rem 1.25rem;
    }

    .sponsor-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .modern-stat-card {
        padding: 1.25rem;
        flex-direction: row;
    }

    .stat-icon {
        width: 48px;
        height: 48px;
    }

    .stat-icon svg {
        width: 24px;
        height: 24px;
    }

    .stat-content h3 {
        font-size: 1.75rem;
    }

    .stat-content p {
        font-size: 0.8125rem;
    }

    .modern-section {
        padding: 1.5rem;
    }

    .section-header-modern {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .section-title-group {
        width: 100%;
    }

    .section-title-group h2 {
        font-size: 1.25rem;
    }

    .modern-select {
        width: 100%;
    }

    .modern-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .modern-table {
        min-width: 600px;
    }

    .modern-table thead th,
    .modern-table tbody td {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }

    .dashboard-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .stat-card {
        padding: 1.5rem;
    }

    .stat-card h3 {
        font-size: 2rem;
    }

    .dashboard-section {
        padding: 1.5rem;
    }

    .section-header-ai {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .ai-section-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .section-header-applications {
        flex-direction: column;
        align-items: flex-start;
    }

    .filter-select {
        width: 100%;
    }

    .application-card {
        padding: 1.25rem;
        max-width: 95vw;
    }

    /* Carousel Mobile Styles */
    .scholarship-carousel-container {
        padding: 1.5rem;
    }

    .carousel-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .carousel-header h2 {
        font-size: 1.25rem;
    }

    .scholarship-carousel {
        min-height: 320px;
    }

    .carousel-content {
        padding: 2rem 1.5rem;
    }

    .carousel-title {
        font-size: 1.5rem;
    }

    .carousel-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .carousel-actions {
        flex-direction: column;
        width: 100%;
    }

    .carousel-actions button {
        width: 100%;
    }

    .carousel-nav {
        width: 40px;
        height: 40px;
    }

    .carousel-prev {
        left: 0.5rem;
    }

    .carousel-next {
        right: 0.5rem;
    }

    /* Deadline Mobile Styles */
    .deadline-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 1.25rem;
    }

    .deadline-countdown {
        width: 100%;
        text-align: left;
        display: flex;
        align-items: baseline;
        gap: 0.5rem;
    }

    .countdown-number {
        font-size: 1.5rem;
    }

    .deadline-actions {
        width: 100%;
        flex-direction: column;
    }

    .deadline-actions button {
        width: 100%;
    }

    .deadline-title-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .search-bar,
    .filter-bar {
        flex-direction: column;
    }
    
    .search-bar input,
    .filter-bar select {
        width: 100%;
    }
    
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        max-width: 100%;
    }
    
    .data-table {
        font-size: 0.875rem;
        min-width: 600px;
        display: table;
        table-layout: auto;
    }
    
    .data-table thead {
        display: table-header-group;
    }
    
    .data-table tbody {
        display: table-row-group;
    }
    
    .data-table tr {
        display: table-row;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.75rem 0.5rem;
        white-space: nowrap;
        word-wrap: normal;
        overflow-wrap: normal;
        display: table-cell;
        vertical-align: middle;
    }
    
    .data-table th {
        font-size: 0.85rem;
        white-space: nowrap;
    }
    
    .data-table td {
        white-space: nowrap;
    }
    
    /* Messages tablet fixes */
    .messages-container {
        grid-template-columns: 1fr;
        height: auto;
        gap: 1rem;
    }
    
    .conversations-panel {
        max-height: 280px;
    }
    
    .chat-panel {
        min-height: 480px;
    }
    
    .messages-area {
        padding: 1rem;
        min-height: 280px;
    }
    
    .message {
        max-width: 80%;
    }
    
    .message-form input[type="text"] {
        padding: 0.625rem 0.875rem;
        font-size: 0.925rem;
    }
}

@media (max-width: 480px) {
    .btn-delete {
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
        white-space: nowrap;
        min-width: 64px;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        margin-top: 1rem;
    }

    /* Sponsor Dashboard Extra Small Mobile */
    .sponsor-header {
        padding: 1.25rem;
    }

    .sponsor-header h1 {
        font-size: 1.35rem;
    }

    .dashboard-subtitle {
        font-size: 0.85rem;
    }

    .btn-create,
    .btn-refresh {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }

    .btn-create svg,
    .btn-refresh svg {
        width: 16px;
        height: 16px;
    }

    .sponsor-stats {
        grid-template-columns: 1fr;
        gap: 0.875rem;
    }

    .modern-stat-card {
        padding: 1rem;
        gap: 1rem;
    }

    .stat-icon {
        width: 42px;
        height: 42px;
    }

    .stat-icon svg {
        width: 22px;
        height: 22px;
    }

    .stat-content h3 {
        font-size: 1.5rem;
    }

    .stat-content p {
        font-size: 0.75rem;
    }

    .modern-section {
        padding: 1.25rem;
    }

    .section-title-group svg {
        width: 20px;
        height: 20px;
    }

    .section-title-group h2 {
        font-size: 1.125rem;
    }

    .modern-select {
        padding: 0.5rem 0.875rem;
        font-size: 0.875rem;
        padding-right: 2.25rem;
    }

    .modern-table {
        min-width: 500px;
        font-size: 0.8125rem;
    }

    .modern-table thead th,
    .modern-table tbody td {
        padding: 0.625rem 0.875rem;
        font-size: 0.8125rem;
    }

    .modern-table .btn-sm {
        padding: 0.375rem 0.75rem;
        font-size: 0.8125rem;
    }
    
    body {
        overflow-x: hidden;
        font-size: 14px;
    }
    
    .container {
        padding: 0.5rem;
    }
    
    .main-navbar {
        padding: 0.5rem;
        gap: 0.375rem;
    }
    
    .main-navbar .logo h1 {
        font-size: 1.125rem;
    }
    
    .nav-links {
        gap: 0.25rem;
    }
    
    .nav-links a {
        padding: 0.375rem 0.625rem;
        font-size: 0.8rem;
    }
    
    .nav-user {
        gap: 0.375rem;
    }
    
    .nav-user span {
        font-size: 0.8rem;
        max-width: 80px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .nav-user button {
        padding: 0.375rem 0.625rem;
        font-size: 0.8rem;
    }
    
    .auth-container {
        padding: 1.25rem 1.25rem;
        max-width: 360px;
        margin: 0 auto;
        overflow: hidden;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.25rem;
    }
    
    h3 {
        font-size: 1.125rem;
    }

    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
        width: 100%;
    }
    
    .stat-card {
        width: 100%;
        padding: 0.75rem;
        min-width: 0;
        text-align: center;
    }
    
    .stat-card h3 {
        font-size: 1.5rem;
        white-space: normal;
        word-wrap: break-word;
        line-height: 1.2;
        display: block;
    }
    
    .stat-card p {
        font-size: 0.8rem;
        white-space: normal;
        word-wrap: break-word;
        display: block;
        line-height: 1.3;
    }

    .application-info {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .application-card {
        padding: 0.75rem;
        width: 100%;
        overflow: hidden;
    }
    
    .application-header {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .application-header h3 {
        font-size: 1rem;
        white-space: normal;
        word-wrap: break-word;
        flex: 1 1 100%;
    }
    
    .section {
        padding: 1rem;
        width: 100%;
        overflow: hidden;
    }
    
    .section h2 {
        font-size: 1.25rem;
        white-space: normal;
        word-wrap: break-word;
    }
    
    /* Messages mobile fixes - Messenger style */
    .messages-container {
        height: calc(100vh - 160px);
        min-height: calc(100vh - 160px);
        margin-top: 0.5rem;
    }
    
    .conversations-panel {
        height: 100%;
        max-height: 100%;
    }
    
    .conversations-header {
        padding: 1rem;
    }
    
    .conversations-header h3 {
        font-size: 1.125rem;
    }
    
    .conversation-item {
        padding: 0.75rem 1rem;
    }
    
    .conversation-avatar {
        width: 40px;
        height: 40px;
    }
    
    .conversation-info h4 {
        font-size: 0.9rem;
    }
    
    .chat-panel {
        height: 100%;
        min-height: 100%;
    }
    
    .chat-header {
        padding: 0.75rem 1rem;
    }
    
    .chat-avatar {
        width: 40px;
        height: 40px;
    }
    
    .chat-user-info h3 {
        font-size: 1rem;
    }
    
    .messages-area {
        flex: 1;
        padding: 0.75rem;
        gap: 0.75rem;
    }
    
    .message {
        max-width: 90%;
    }
    
    .message-avatar {
        width: 32px;
        height: 32px;
    }
    
    .message-content {
        padding: 0.625rem 0.875rem;
        font-size: 0.9rem;
    }
    
    .message-input-container {
        padding: 0.625rem;
    }
    
    .message-form {
        gap: 0.375rem;
    }
    
    .message-form input[type="text"] {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
        border-radius: 20px;
    }
    
    .message-form button[type="submit"] {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
        height: auto;
    }
    
    .btn-icon {
        font-size: 1.25rem;
        padding: 0.375rem;
    }
    
    .mobile-back-button {
        font-size: 1.25rem;
    }
    
    .section p {
        font-size: 1.25rem;
        white-space: normal;
        word-wrap: break-word;
    }
    
    .section p {
        font-size: 0.875rem;
        white-space: normal;
        word-wrap: break-word;
    }
    
    .info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
        padding: 0.5rem 0;
    }
    
    .info-item span:last-child {
        text-align: left;
        font-size: 0.875rem;
    }
    
    .scholarship-header {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.375rem;
    }
    
    .scholarship-header h3 {
        font-size: 1rem;
        width: 100%;
        flex: 1 1 100%;
    }
    
    .badge {
        margin-top: 0;
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
    
    .btn-primary,
    .btn-secondary,
    .btn-danger {
        width: 100%;
        padding: 0.625rem;
        font-size: 0.875rem;
        white-space: nowrap;
    }
    
    .page-actions button {
        flex: 1 1 calc(50% - 0.25rem);
        font-size: 0.8rem;
        padding: 0.5rem 0.625rem;
    }
    
    .feature-card {
        min-width: calc(50% - 0.375rem);
        max-width: calc(50% - 0.375rem);
        flex: 1 1 calc(50% - 0.375rem);
        padding: 0.875rem;
    }
    
    .feature-card h3 {
        font-size: 0.9rem;
    }
    
    .feature-card p {
        font-size: 0.8rem;
    }
    
    .hero-content {
        padding: 2rem 1rem;
    }
    
    .hero-content h2 {
        font-size: 1.375rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .hero-actions {
        flex-direction: row;
        gap: 0.375rem;
    }
    
    .hero-actions button {
        flex: 1 1 calc(50% - 0.25rem);
        min-width: 110px;
        font-size: 0.875rem;
        padding: 0.625rem 0.75rem;
    }
    
    table {
        font-size: 0.8rem;
        display: table;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .data-table {
        min-width: 400px;
        font-size: 0.75rem;
    }
    .data-table th, .data-table td {
        padding: 0.18rem 0.08rem;
        font-size: 0.65rem;
        min-width: 24px;
    }
    /* Aggressively hide less important columns on mobile */
    .data-table td.hide-mobile, .data-table th.hide-mobile {
        display: none;
    }
    /* removed stray table-layout: auto; */
}
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

/* Avatar Selection Styles - Avataaars.io Integration */
.avatar-selection.imgs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--surface);
    border-radius: 12px;
    border: 2px solid var(--border);
    max-height: 400px;
    overflow-y: auto;
}

.avatar-option.img-wrap {
    width: 100px;
    height: 100px;
    transition: all 300ms ease;
    position: relative;
    cursor: pointer;
    border-radius: 50%;
    margin: 0 auto;
}

.avatar-option.img-wrap:hover {
    transform: scale(1.1);
}

.avatar-option.img-wrap.selected {
    transform: scale(1.15);
    box-shadow: 0 0 0 4px var(--primary-color);
}

.avatar-option.img-wrap img {
    border-radius: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 3px solid transparent;
    transition: border-color 300ms ease;
}

.avatar-option.img-wrap:hover img {
    border-color: var(--primary-color);
}

.avatar-option.img-wrap.selected img {
    border-color: var(--primary-color);
}

.avatar-option.img-wrap::before {
    content: "";
    z-index: -1;
    position: absolute;
    width: 90%;
    height: 80%;
    bottom: 0;
    left: 50%;
    border-radius: 100%;
    transform: translateX(-50%);
    background-color: #e0e0e0;
}

/* Scrollbar styling for avatar selection */
.avatar-selection.imgs::-webkit-scrollbar {
    width: 8px;
}

.avatar-selection.imgs::-webkit-scrollbar-track {
    background: var(--background);
    border-radius: 4px;
}

.avatar-selection.imgs::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

.avatar-selection.imgs::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Register page avatar styling - smaller and more compact */
.auth-page .avatar-selection.imgs {
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 1rem;
    padding: 1rem;
    max-height: 300px;
}

.auth-page .avatar-option.img-wrap {
    width: 70px;
    height: 70px;
}

.auth-page .avatar-option.img-wrap:hover {
    transform: scale(1.05);
}

.auth-page .avatar-option.img-wrap.selected {
    transform: scale(1.1);
    box-shadow: 0 0 0 3px var(--primary-color);
}

/* Change Avatar Button Styling */
#changeAvatarBtn {
    margin-bottom: 0.5rem;
}

/* Profile Avatar Display */
.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid var(--surface);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--background);
    position: relative;
}

.profile-avatar img {
    width: 120%;
    height: 120%;
    object-fit: cover;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.profile-avatar-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--surface);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--background);
}

.profile-avatar-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Scholarship Deadline Status Rows */
.deadline-expired {
    background-color: #fee2e2 !important;
    opacity: 0.7;
}

.deadline-today {
    background-color: #fef3c7 !important;
}

.deadline-urgent {
    background-color: #fef3c7;
}

.deadline-soon {
    background-color: #dbeafe;
}

/* Documents List */
.documents-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.document-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background-color: var(--background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.2s;
}

.document-item:hover {
    background-color: #f1f5f9;
    border-color: var(--primary-color);
}

.document-item a {
    flex: 1;
    font-weight: 500;
    color: var(--primary-color);
}

.document-item small {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Messages / Chat Interface */
/* ===== MESSAGES PAGE STYLES ===== */

/* Messages Page Header */
.messages-page-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.messages-title-section h1 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 700;
}

.messages-title-section p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin: 0;
}

/* Messages Container */
.messages-container {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 1.5rem;
    height: calc(100vh - 280px);
    min-height: 500px;
    max-height: 750px;
    width: 100%;
}

/* Conversations Panel */
.conversations-panel {
    background: var(--surface);
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
    height: 100%;
}

.conversations-header {
    padding: 1.5rem;
    border-bottom: 2px solid var(--border-color);
    background: linear-gradient(to bottom, #ffffff 0%, #f8fafc 100%);
    flex-shrink: 0;
}

.conversations-header h3 {
    margin: 0 0 0.25rem 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.conversations-subtitle {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.conversations-list {
    flex: 1;
    overflow-y: auto;
    min-height: 200px;
    background: var(--surface);
}

.conversations-list::-webkit-scrollbar {
    width: 6px;
}

.conversations-list::-webkit-scrollbar-track {
    background: transparent;
}

.conversations-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.conversations-list::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.conversation-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.conversation-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: var(--primary-color);
    transition: width 0.2s ease;
}

.conversation-item:hover {
    background-color: #f8fafc;
}

.conversation-item:hover::before {
    width: 4px;
}

.conversation-item.active {
    background-color: #eff6ff;
    border-left: 4px solid var(--primary-color);
}

.conversation-item.active::before {
    width: 4px;
}

.conversation-item.ai-assistant {
    background: linear-gradient(to right, #faf5ff 0%, #ffffff 100%);
    border-bottom: 1px solid #e9d5ff;
}

.conversation-item.ai-assistant:hover {
    background: linear-gradient(to right, #f3e8ff 0%, #faf5ff 100%);
}

.conversation-item.ai-assistant.active {
    background: linear-gradient(to right, #e9d5ff 0%, #eff6ff 100%);
    border-left: 4px solid #9333ea;
}

.conversation-item.ai-assistant::before {
    background: #9333ea;
}

.ai-message .message-avatar {
    background: linear-gradient(135deg, #9333ea 0%, #7c3aed 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(147, 51, 234, 0.3);
}

.typing-indicator .message-text {
    font-style: italic;
    color: var(--text-secondary);
}

.conversation-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid #e2e8f0;
    transition: border-color 0.2s ease;
}

.conversation-item:hover .conversation-avatar {
    border-color: var(--primary-color);
}

.conversation-item.ai-assistant .conversation-avatar {
    border-color: #9333ea;
}

.conversation-info {
    flex: 1;
    min-width: 0;
}

.conversation-header-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.conversation-info h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conversation-role {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin: 0;
    font-weight: 500;
}

.conversation-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin: 0;
    white-space: nowrap;
}

.unread-badge {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e40af 100%);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    min-width: 22px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

/* Chat Panel */
.chat-panel {
    background: var(--surface);
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
    max-height: 100%;
    min-width: 0;
}

.chat-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
}

.placeholder-content {
    text-align: center;
    color: var(--text-secondary);
    max-width: 400px;
    padding: 2rem;
}

.placeholder-content svg {
    margin-bottom: 1.5rem;
    opacity: 0.8;
}

.placeholder-content h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.placeholder-content p {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.placeholder-hint {
    font-size: 0.875rem !important;
    color: var(--text-secondary);
    font-style: italic;
}

.chat-window {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 100%;
}

.chat-header {
    padding: 1.5rem;
    border-bottom: 2px solid var(--border-color);
    background: linear-gradient(to bottom, #ffffff 0%, #f8fafc 100%);
    flex-shrink: 0;
}

.chat-user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.chat-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
    flex-shrink: 0;
}

.chat-user-info h3 {
    margin: 0 0 0.25rem 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.user-role-badge {
    display: inline-block;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    color: var(--primary-color);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    text-transform: capitalize;
    border: 1px solid #bfdbfe;
}

/* Messages Area */
.messages-area {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: linear-gradient(to bottom, #f8fafc 0%, #ffffff 100%);
    min-height: 0;
}

.messages-area::-webkit-scrollbar {
    width: 8px;
}

.messages-area::-webkit-scrollbar-track {
    background: transparent;
}

.messages-area::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.messages-area::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.messages-area .empty-state {
    text-align: center;
    color: var(--text-secondary);
    padding: 3rem 2rem;
    font-style: italic;
}

.conversations-list .loading,
.messages-area .loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* Typing indicator animation */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 0.75rem 1rem;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: var(--text-secondary);
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        opacity: 0.3;
        transform: translateY(0);
    }
    30% {
        opacity: 1;
        transform: translateY(-8px);
    }
}

/* Messages */
.message {
    display: flex;
    gap: 0.75rem;
    max-width: 75%;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-own {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-other {
    align-self: flex-start;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid #e2e8f0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.message-content {
    background: #ffffff;
    padding: 0.875rem 1.125rem;
    border-radius: 16px;
    position: relative;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
}

.message-own .message-content {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e40af 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.message-content p {
    margin: 0;
    word-wrap: break-word;
    line-height: 1.5;
    font-size: 0.9375rem;
}

.message-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    display: block;
    font-weight: 500;
}

.message-own .message-time {
    color: rgba(255, 255, 255, 0.85);
}

.message-attachment {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
}

.message-own .message-attachment {
    background-color: rgba(255, 255, 255, 0.2);
}

.message-attachment a {
    color: var(--primary-color);
    font-weight: 500;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.message-own .message-attachment a {
    color: white;
}

.message-attachment small {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.message-own .message-attachment small {
    color: rgba(255, 255, 255, 0.8);
}



/* Message Input Container */
.message-input-container {
    padding: 1.25rem 1.5rem;
    border-top: 2px solid var(--border-color);
    background: linear-gradient(to top, #ffffff 0%, #f8fafc 100%);
    flex-shrink: 0;
}

.message-form {
    display: flex;
    gap: 0;
    align-items: stretch;
    flex-wrap: nowrap;
}

.input-wrapper {
    display: flex;
    align-items: center;
    flex: 1;
    background: #ffffff;
    border: 2px solid var(--border-color);
    border-radius: 28px;
    padding: 0.375rem 0.375rem 0.375rem 1.25rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.input-wrapper:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.message-form input[type="text"] {
    flex: 1;
    padding: 0.75rem 0;
    border: none;
    background: transparent;
    font-size: 0.9375rem;
    outline: none;
    min-width: 0;
    width: 100%;
    color: var(--text-primary);
}

.message-form input[type="text"]::placeholder {
    color: #94a3b8;
}

.btn-send {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e40af 100%);
    color: white;
    border: none;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-send:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

.btn-send:active {
    transform: scale(0.95);
}

.btn-send svg {
    transform: rotate(0deg);
    transition: transform 0.3s ease;
}

.btn-send:hover svg {
    transform: rotate(15deg);
}

.btn-icon {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: transform 0.2s;
}

.btn-icon:hover {
    transform: scale(1.1);
}

.attachment-preview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    margin-top: 0.5rem;
    background-color: #f1f5f9;
    border-radius: 8px;
    font-size: 0.875rem;
}

/* Responsive - Messenger Style Mobile */
@media (max-width: 968px) {
    .messages-container {
        grid-template-columns: 1fr;
        height: calc(100vh - 180px);
        min-height: calc(100vh - 180px);
        gap: 0;
        position: relative;
    }
    
    /* Initially show conversations, hide chat */
    .conversations-panel {
        height: 100%;
        max-height: 100%;
        display: flex;
    }
    
    .chat-panel {
        display: none;
        height: 100%;
        min-height: 100%;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 10;
    }
    
    /* When chat is active, hide conversations and show chat */
    .messages-container.chat-active .conversations-panel {
        display: none;
    }
    
    .messages-container.chat-active .chat-panel {
        display: flex;
    }
    
    .messages-area {
        min-height: 0;
        flex: 1;
        padding: 1rem;
    }
    
    .message {
        max-width: 85%;
    }
    
    .chat-header {
        padding: 1rem;
        position: relative;
    }
    
    /* Add back button on mobile */
    .mobile-back-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, var(--primary-color) 0%, #1e40af 100%);
        border: none;
        font-size: 0.875rem;
        font-weight: 600;
        cursor: pointer;
        padding: 0.625rem 1.125rem;
        margin-right: 0.75rem;
        color: white;
        border-radius: 12px;
        transition: all 0.3s ease;
        box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
    }
    
    .mobile-back-button:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
    }
    
    .mobile-back-button:active {
        transform: translateY(0);
    }
    
    .message-input-container {
        padding: 0.75rem;
    }
    
    .message-form {
        gap: 0.5rem;
    }
    
    .message-form input[type="text"] {
        padding: 0.625rem 0.875rem;
        font-size: 0.95rem;
    }
}

/* Desktop - hide back button */
@media (min-width: 969px) {
    .mobile-back-button {
        display: none !important;
    }
}

/* ==================== LANDING PAGE ENHANCEMENTS ==================== */

/* Hero Section Enhancements */
.hero-subtitle {
    font-size: 1.25rem !important;
    margin-bottom: 1rem !important;
    opacity: 0.95 !important;
}

.hero-region {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 2rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2rem;
    display: inline-block;
}

/* Trust Badges */
.trust-badges {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2rem;
    backdrop-filter: blur(10px);
    font-size: 0.95rem;
}

.badge-icon {
    font-size: 1.25rem;
}

/* How It Works Section */
.how-it-works-section {
    padding: 5rem 2rem;
    background: var(--surface);
    text-align: center;
}

.how-it-works-section h2 {
    font-size: 2.5rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.2rem;
    margin-bottom: 3rem;
}

.steps-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
    text-align: left;
}

.step-column {
    background: var(--background);
    padding: 2.5rem;
    border-radius: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.step-column:hover {
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.12);
    transform: translateY(-5px);
}

.step-title {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 2rem;
    font-size: 1.8rem;
    font-weight: 600;
}

.steps {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.step {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    padding: 0.5rem;
    transition: all 0.3s ease;
}

.step:hover {
    background: var(--surface);
    border-radius: 0.75rem;
    padding: 0.75rem;
}

.step-number {
    min-width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}

.step-content h4 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.step-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Testimonials Section */
.testimonials-section {
    padding: 5rem 2rem;
    background: var(--surface);
    text-align: center;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    margin-top: 3rem;
}

.testimonial-card {
    background: var(--background);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    text-align: left;
    transition: transform 0.3s;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.testimonial-rating {
    color: #f59e0b;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.testimonial-text {
    color: var(--text-primary);
    font-style: italic;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.testimonial-author {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.testimonial-author strong {
    color: var(--text-primary);
}

.testimonial-author span {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Mobile App Section */
.mobile-app-section {
    padding: 5rem 2rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
}

.mobile-app-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 3rem;
    align-items: center;
}

.mobile-app-text h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.mobile-features {
    list-style: none;
    margin: 2rem 0;
}

.mobile-features li {
    padding: 0.75rem 0;
    font-size: 1.1rem;
}

.coming-soon-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.75rem 1.5rem;
    border-radius: 2rem;
    margin-top: 1rem;
    font-weight: 500;
}

.phone-mockup {
    font-size: 15rem;
    text-align: center;
    opacity: 0.3;
}

/* Enhanced Footer */
.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    text-align: left;
    padding: 3rem 2rem;
}

.footer-section h3 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.footer-section h4 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

.footer-region {
    margin-top: 0.5rem;
    font-size: 0.95rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
    text-decoration: none;
}

.footer-regions {
    list-style: none;
    color: rgba(255, 255, 255, 0.8);
}

.footer-regions li {
    margin-bottom: 0.5rem;
}

/* Support Content Styling */
.support-content {
    color: rgba(255, 255, 255, 0.8);
}

.support-content h5 {
    color: white;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.about-message,
.privacy-info {
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 0;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--surface);
    margin: 5% auto;
    padding: 2rem;
    border-radius: 1rem;
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: slideDown 0.3s ease-out;
    scrollbar-gutter: stable;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-content::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-track {
    background: transparent;
    margin: 0.5rem 0;
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

.modal-close {
    color: var(--text-secondary);
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
    line-height: 1;
}

.modal-close:hover,
.modal-close:focus {
    color: var(--text-primary);
}

.modal-content h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    padding-right: 2rem;
}

.modal-content h3 {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.modal-body {
    color: var(--text-primary);
    line-height: 1.6;
}

.modal-body p {
    margin-bottom: 1rem;
}

.modal-body ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.modal-body li {
    margin-bottom: 0.5rem;
}

/* Review Application Modal Styles */
.review-modal-content {
    max-width: 800px;
}

.review-modal-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.header-icon-wrapper {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.header-icon-wrapper svg {
    stroke: white;
}

.review-modal-header h2 {
    margin: 0;
    padding: 0;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.review-modal-subtitle {
    margin: 0.25rem 0 0 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.review-application-detail {
    margin-bottom: 2rem;
}

.review-decision-section {
    background: var(--background);
    padding: 1.5rem;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.section-title-review {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 1.25rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title-review::before {
    content: '';
    width: 4px;
    height: 24px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 2px;
}

.form-group-modern {
    margin-bottom: 1.25rem;
}

.form-group-modern:last-child {
    margin-bottom: 0;
}

.form-group-modern label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.select-wrapper-review {
    position: relative;
}

.modern-select-review {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary);
    background: var(--surface);
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%232563eb' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 3rem;
}

.modern-select-review:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.modern-select-review:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.modern-textarea-review {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 0.9375rem;
    color: var(--text-primary);
    background: var(--surface);
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
    line-height: 1.6;
    transition: all 0.3s ease;
}

.modern-textarea-review:hover {
    border-color: var(--primary-color);
}

.modern-textarea-review:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.field-hint {
    display: block;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    font-style: italic;
}

.modal-actions-modern {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding-top: 1.5rem;
    border-top: 2px solid var(--border-color);
}

.btn-secondary-modern,
.btn-primary-modern {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    border-radius: 12px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-secondary-modern {
    background: var(--background);
    color: var(--text-secondary);
    border: 2px solid var(--border-color);
}

.btn-secondary-modern:hover {
    background: var(--surface);
    color: var(--text-primary);
    border-color: var(--text-secondary);
    transform: translateY(-1px);
}

.btn-primary-modern {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-primary-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

.btn-secondary-modern svg,
.btn-primary-modern svg {
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .review-modal-content {
        max-width: 95%;
        padding: 1.5rem;
    }
    
    .review-modal-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .header-icon-wrapper {
        width: 48px;
        height: 48px;
    }
    
    .header-icon-wrapper svg {
        width: 24px;
        height: 24px;
    }
    
    .review-modal-header h2 {
        font-size: 1.25rem;
    }
    
    .modal-actions-modern {
        flex-direction: column;
    }
    
    .btn-secondary-modern,
    .btn-primary-modern {
        width: 100%;
        justify-content: center;
    }
}

.footer-bottom {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive Enhancements */
@media (max-width: 968px) {
    .hero-content h2 {
        font-size: 2.2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem !important;
    }
    
    .hero-actions {
        flex-direction: column;
        gap: 1rem;
    }
    
    .btn-large {
        width: 100%;
        max-width: 300px;
    }
    
    .steps-container {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        justify-content: center;
    }
    
    .feature-card {
        min-width: 140px;
        max-width: 180px;
    }
    
    .stats-section {
        gap: 2rem;
    }
    
    .stat-item h3 {
        font-size: 2.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero-content h2 {
        font-size: 1.8rem;
    }
    
    .hero-content {
        padding: 3rem 1.5rem 3rem;
    }
    
    .features-section,
    .how-it-works-section,
    .cta-section {
        padding: 2rem 1rem;
    }
    
    .features-grid {
        gap: 0.75rem;
        justify-content: center;
    }
    
    .feature-card {
        min-width: 120px;
        max-width: 150px;
        padding: 1rem 0.75rem;
    }
    
    .feature-icon {
        font-size: 2rem;
    }
    
    .feature-card h3 {
        font-size: 0.95rem;
    }
    
    .feature-card p {
        font-size: 0.8rem;
    }

    /* Fix delete button text wrapping on small screens */
    .btn-delete,
    .btn-delete-small {
        white-space: nowrap;
        min-width: 64px;
        max-width: 100px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* Loading Spinner */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-overlay.hidden {
    display: none;
}

/* Toast Notification System */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    pointer-events: none;
}

.toast {
    background: white;
    color: var(--text-primary);
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-bottom: 10px;
    min-width: 300px;
    max-width: 400px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    animation: slideIn 0.3s ease-out;
    pointer-events: auto;
    border-left: 4px solid var(--primary-color);
}

.toast.success {
    border-left-color: var(--success-color);
}

.toast.error {
    border-left-color: var(--danger-color);
}

.toast.warning {
    border-left-color: var(--warning-color);
}

.toast.info {
    border-left-color: var(--primary-color);
}

.toast-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.toast.success .toast-icon {
    color: var(--success-color);
}

.toast.error .toast-icon {
    color: var(--danger-color);
}

.toast.warning .toast-icon {
    color: var(--warning-color);
}

.toast.info .toast-icon {
    color: var(--primary-color);
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.toast-message {
    font-size: 14px;
    color: var(--text-secondary);
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 20px;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toast-close:hover {
    color: var(--text-primary);
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.toast.removing {
    animation: slideOut 0.3s ease-in forwards;
}

@media (max-width: 768px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }
    
    .toast {
        min-width: unset;
        width: 100%;
    }
}

/* Custom Confirm Dialog */
.confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    animation: fadeIn 0.2s ease-out;
}

.confirm-dialog {
    background: white;
    border-radius: 12px;
    padding: 24px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: scaleIn 0.2s ease-out;
}

.confirm-icon {
    font-size: 48px;
    text-align: center;
    margin-bottom: 16px;
}

.confirm-message {
    font-size: 16px;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 24px;
    line-height: 1.5;
}

.confirm-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.confirm-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.confirm-btn-cancel {
    background: var(--secondary-color);
    color: white;
}

.confirm-btn-cancel:hover {
    background: #475569;
}

.confirm-btn-confirm {
    background: var(--danger-color);
    color: white;
}

.confirm-btn-confirm:hover {
    background: #dc2626;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* ========================================
   COMPREHENSIVE RESPONSIVE DESIGN
   For Desktop, Tablet, and Mobile Devices
   ======================================== */

/* Large Desktop (1920px and above) */
@media (min-width: 1920px) {
    .container {
        max-width: 1800px;
    }
    
    .hero-content h2 {
        font-size: 3.5rem;
    }
    
    .dashboard-stats {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Desktop (1200px - 1919px) */
@media (min-width: 1200px) and (max-width: 1919px) {
    .container {
        max-width: 1140px;
    }
    
    .dashboard-stats {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .scholarships-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Laptop/Small Desktop (992px - 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    .container {
        max-width: 960px;
    }
    
    .dashboard-stats {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .scholarships-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .profile-container {
        grid-template-columns: 300px 1fr;
    }
    
    .hero-content h2 {
        font-size: 2.5rem;
    }
}

/* Tablet Landscape (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .container {
        max-width: 720px;
        padding: 1.5rem;
    }
    
    .main-navbar {
        padding: 1rem;
    }
    
    .nav-links a {
        font-size: 0.95rem;
        padding: 0.5rem 1rem;
    }
    
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .scholarships-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }
    
    .features-grid {
        gap: 1rem;
    }
    
    .feature-card {
        min-width: 140px;
        max-width: 180px;
        padding: 1.25rem 1rem;
    }
    
    .profile-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .hero-content h2 {
        font-size: 2.25rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 90%;
        padding: 1.5rem;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .page-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

/* Tablet Portrait (600px - 767px) */
@media (min-width: 600px) and (max-width: 767px) {
    .container {
        max-width: 100%;
        padding: 1rem;
    }
    
    .main-navbar {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.75rem;
        padding: 0.875rem;
        align-items: center;
    }
    
    .main-navbar .logo {
        flex: 0 0 auto;
        margin-right: auto;
    }
    
    .main-navbar .logo h1 {
        font-size: 1.375rem;
    }
    
    .nav-links {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        width: auto;
        order: 3;
        flex-basis: 100%;
    }
    
    .nav-links a {
        width: auto;
        text-align: center;
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
        white-space: nowrap;
    }
    
    .nav-user {
        flex: 0 0 auto;
        order: 2;
    }
    
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.875rem;
    }
    
    .stat-card {
        padding: 1.125rem;
    }
    
    .stat-card h3 {
        font-size: 1.75rem;
        white-space: normal;
    }
    
    .stat-card p {
        font-size: 0.9rem;
        white-space: normal;
    }
    
    .scholarships-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .scholarship-card {
        padding: 1rem;
    }
    
    .scholarship-header {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .scholarship-header h3 {
        flex: 1 1 100%;
        white-space: normal;
    }
    
    .features-grid {
        gap: 0.75rem;
        justify-content: center;
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .feature-card {
        min-width: calc(50% - 0.5rem);
        max-width: calc(50% - 0.5rem);
        padding: 1rem;
        flex: 0 1 calc(50% - 0.5rem);
    }
    
    .feature-card h3 {
        font-size: 1rem;
        white-space: normal;
    }
    
    .feature-card p {
        font-size: 0.875rem;
        white-space: normal;
    }
    
    .hero-content h2 {
        font-size: 1.875rem;
        white-space: normal;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        white-space: normal;
    }
    
    .hero-actions {
        flex-direction: row;
        gap: 0.625rem;
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .btn-large {
        width: auto;
        flex: 1 1 calc(50% - 0.375rem);
        min-width: 140px;
        white-space: nowrap;
    }
    
    .profile-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .auth-container {
        padding: 1.5rem 1.5rem;
        max-width: 380px;
    }
    
    .modal-content {
        width: 92%;
        padding: 1rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .page-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.625rem;
    }
    
    .page-actions {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .page-actions button {
        flex: 1 1 calc(50% - 0.25rem);
        white-space: nowrap;
        min-width: 120px;
    }
    
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .data-table {
        min-width: 500px;
        display: table;
    }
    
    .data-table tr {
        display: table-row;
    }
    
    .data-table th,
    .data-table td {
        white-space: nowrap;
        display: table-cell;
        padding: 0.75rem 0.5rem;
    }
}

/* Mobile Landscape (480px - 599px) */
@media (min-width: 480px) and (max-width: 599px) {
    .container {
        padding: 0.875rem;
    }
    
    .main-navbar {
        flex-direction: row;
        flex-wrap: wrap;
        padding: 0.75rem;
        align-items: center;
    }
    
    .main-navbar .logo {
        flex: 0 0 auto;
        margin-right: auto;
    }
    
    .navbar .logo h1 {
        font-size: 1.375rem;
        white-space: nowrap;
    }
    
    .nav-links {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        width: auto;
        gap: 0.375rem;
        order: 3;
        flex-basis: 100%;
    }
    
    .nav-links a {
        padding: 0.5rem 0.875rem;
        flex: 0 1 auto;
        font-size: 0.875rem;
        white-space: nowrap;
    }
    
    .nav-user {
        flex: 0 0 auto;
        order: 2;
    }
    
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-card h3 {
        font-size: 1.625rem;
        white-space: normal;
    }
    
    .stat-card p {
        font-size: 0.875rem;
        white-space: normal;
    }
    
    .scholarships-grid {
        grid-template-columns: 1fr;
        gap: 0.875rem;
    }
    
    .scholarship-card {
        padding: 1rem;
    }
    
    .scholarship-header {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .scholarship-header h3 {
        flex: 1 1 100%;
        white-space: normal;
    }
    
    .features-grid {
        gap: 0.75rem;
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .feature-card {
        min-width: calc(50% - 0.5rem);
        max-width: calc(50% - 0.5rem);
        padding: 1.25rem;
        flex: 0 1 calc(50% - 0.5rem);
    }
    
    .hero-content {
        padding: 2.5rem 1.5rem;
    }
    
    .hero-content h2 {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
    }
    
    .hero-actions {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
        width: 100%;
        gap: 0.75rem;
    }
    
    .btn-large {
        flex: 1 1 calc(50% - 0.5rem);
        min-width: 140px;
        padding: 0.875rem 1rem;
        font-size: 0.95rem;
    }
    
    .auth-container {
        padding: 1.5rem 1.5rem;
        max-width: 380px;
    }
    
    .auth-container h2 {
        font-size: 1.5rem;
    }
    
    .form-group label {
        font-size: 0.9rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 0.95rem;
        padding: 0.75rem;
    }
    
    .profile-container {
        grid-template-columns: 1fr;
    }
    
    .profile-sidebar {
        padding: 1.25rem;
    }
    
    .modal-content {
        width: 95%;
        padding: 1rem;
        margin: 5% auto;
    }
    
    .modal-header h3 {
        font-size: 1.25rem;
    }
    
    .application-info {
        grid-template-columns: 1fr;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .page-actions {
        flex-direction: row;
        flex-wrap: wrap;
        width: 100%;
        gap: 0.5rem;
    }
    
    .page-actions button {
        flex: 1 1 auto;
        min-width: 120px;
    }
    
    .scholarship-actions,
    .application-actions {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .scholarship-actions button,
    .application-actions button {
        flex: 1 1 calc(50% - 0.25rem);
        min-width: 100px;
    }
    
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .data-table {
        min-width: 480px;
        display: table;
    }
    
    .data-table tr {
        display: table-row;
    }
    
    .data-table th,
    .data-table td {
        white-space: nowrap;
        display: table-cell;
        padding: 0.625rem 0.375rem;
        font-size: 0.85rem;
    }
}

/* Mobile Portrait (320px - 479px) */
@media (max-width: 479px) {
    body {
        font-size: 14px;
        overflow-x: hidden;
        -webkit-text-size-adjust: 100%;
    }
    
    .container {
        padding: 0.75rem;
    }
    
    .main-navbar {
        flex-direction: column;
        padding: 0.75rem;
        gap: 0.75rem;
    }
    
    .navbar .logo h1 {
        font-size: 1.35rem;
    }
    
    .nav-links {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
        gap: 0.375rem;
    }
    
    .nav-links a {
        flex: 1 1 calc(50% - 0.25rem);
        min-width: 100px;
        text-align: center;
        padding: 0.5rem 0.25rem;
        font-size: 0.85rem;
    }
    
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-card h3 {
        font-size: 1.5rem;
    }
    
    .stat-card p {
        font-size: 0.85rem;
    }
    
    .scholarships-grid {
        grid-template-columns: 1fr;
        gap: 0.875rem;
    }
    
    .scholarship-card {
        padding: 1rem;
    }
    
    .scholarship-card h3 {
        font-size: 1.1rem;
    }
    
    .features-grid {
        gap: 0.625rem;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
    }
    
    .feature-card {
        min-width: calc(50% - 0.375rem);
        max-width: calc(50% - 0.375rem);
        padding: 1rem 0.75rem;
        flex: 0 1 calc(50% - 0.375rem);
    }
    
    .feature-card h3 {
        font-size: 0.95rem;
    }
    
    .feature-card p {
        font-size: 0.8rem;
    }
    
    .hero-content {
        padding: 2rem 1rem;
    }
    
    .hero-content h2 {
        font-size: 1.5rem;
        line-height: 1.3;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .hero-actions {
        flex-direction: row;
        flex-wrap: wrap;
        width: 100%;
        gap: 0.625rem;
        justify-content: center;
    }
    
    .btn-large {
        flex: 1 1 calc(50% - 0.375rem);
        min-width: 130px;
        padding: 0.75rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .auth-container {
        padding: 1.25rem 1.25rem;
        max-width: 360px;
        margin: 0 auto;
    }
    
    .auth-container h2 {
        font-size: 1.35rem;
    }
    
    .form-group {
        margin-bottom: 0.875rem;
    }
    
    .form-group label {
        font-size: 0.85rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 0.9rem;
        padding: 0.625rem;
    }
    
    .btn-primary,
    .btn-secondary,
    .btn-danger {
        padding: 0.625rem 1rem;
        font-size: 0.9rem;
    }
    
    .profile-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .profile-sidebar {
        padding: 1rem;
    }
    
    .profile-avatar {
        width: 100px;
        height: 100px;
    }
    
    .profile-content {
        padding: 1rem;
    }
    
    .modal-content {
        width: 100%;
        padding: 0.875rem;
        margin: 2% auto;
        max-height: 96vh;
        overflow-y: auto;
    }
    
    .modal-header h3 {
        font-size: 1.1rem;
    }
    
    .modal-body {
        padding: 0.75rem 0;
    }
    
    .modal-footer {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .modal-footer button {
        flex: 1 1 calc(50% - 0.25rem);
        min-width: 100px;
    }
    
    .application-info {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .application-card,
    .scholarship-card {
        padding: 0.875rem;
    }
    
    .application-actions,
    .scholarship-actions {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .application-actions button,
    .scholarship-actions button {
        flex: 1 1 calc(50% - 0.25rem);
        min-width: 90px;
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
    
    .page-header {
        flex-direction: row !important;
        align-items: center !important;
        flex-wrap: wrap !important;
        gap: 0.75rem;
    }

    .page-header h1 {
        font-size: 1.35rem;
    }    .page-actions {
        flex-direction: row;
        flex-wrap: wrap;
        width: 100%;
        gap: 0.5rem;
    }
    
    .page-actions button {
        flex: 1 1 calc(50% - 0.25rem);
        min-width: 100px;
    }
    
    .filter-section {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .filter-section select,
    .filter-section input {
        width: 100%;
    }
    
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    
    table {
        font-size: 0.85rem;
    }
    
    .btn-sm {
        padding: 0.375rem 0.625rem;
        font-size: 0.8rem;
    }
    
    /* Fix for specific UI elements that were appearing as vertical lines */
    .search-bar {
        flex-direction: column;
    }
    
    .search-bar button {
        width: 100%;
    }
    
    .filter-bar {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .filter-bar select {
        flex: 1 1 calc(50% - 0.5rem);
        min-width: 120px;
    }
}

/* Extra Small Mobile (< 320px) */
@media (max-width: 319px) {
    .hero-content h2 {
        font-size: 1.35rem;
    }
    
    .features-grid {
        gap: 0.5rem;
    }
    
    .feature-card {
        padding: 0.875rem;
    }
    
    .stat-card {
        padding: 0.875rem;
    }
    
    .auth-container {
        margin: 0 auto;
        padding: 1.25rem 1.125rem;
        max-width: 340px;
    }
    
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .data-table {
        min-width: 400px;
        display: table;
        font-size: 0.8rem;
    }
    
    .data-table tr {
        display: table-row;
    }
    
    .data-table th,
    .data-table td {
        white-space: nowrap;
        display: table-cell;
        padding: 0.5rem 0.25rem;
        font-size: 0.75rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .nav-links,
    .page-actions,
    .btn-primary,
    .btn-secondary,
    .btn-danger,
    .modal,
    .loading-overlay {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
    
    .scholarship-card,
    .application-card,
    .profile-container {
        border: 1px solid #000;
        page-break-inside: avoid;
    }
}

/* ================================
   Certificate & Approval Modal
   ================================ */

.approval-modal {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.approval-modal > div {
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(50px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

.certificate-container {
    margin: 20px auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    max-width: 100%;
    overflow: hidden;
}

/* Mobile responsive certificate */
@media (max-width: 768px) {
    .approval-modal > div {
        padding: 20px !important;
        max-width: 95% !important;
    }
    
    .certificate-container {
        transform: scale(0.85);
        transform-origin: top center;
        margin: 10px auto;
    }
}

@media (max-width: 480px) {
    .certificate-container {
        transform: scale(0.65);
        transform-origin: top center;
    }
    
    .approval-modal h2 {
        font-size: 1.5rem !important;
    }
    
    .approval-modal button {
        font-size: 0.875rem !important;
        padding: 0.5rem 1rem !important;
    }
    
    .approval-modal > div {
        padding: 15px !important;
    }
}

/* Badge success style */
.badge-approved {
    background-color: #10b981;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Application card approved highlight */
.application-card .badge-approved {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Confetti Animation - Surprise Feature */
@keyframes confettiFall {
    0% {
        top: -10px;
        opacity: 1;
        transform: translateX(0) translateY(0) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: translateX(var(--drift, 0)) translateY(50vh) rotate(180deg);
    }
    100% {
        top: 100vh;
        opacity: 0;
        transform: translateX(calc(var(--drift, 0) * 2)) translateY(100vh) rotate(360deg);
    }
}

.confetti {
    --drift: calc((var(--random) - 0.5) * 200px);
}

/* Mobile fixes for message input and header */
@media (max-width: 479px) {
    /* Fix message form to use flex equally for input */
    .message-form {
        display: flex;
        gap: 0.5rem;
        align-items: center;
    }

    .message-form input[type="text"] {
        flex: 1 1 auto !important;
        min-width: 0;
        padding: 0.75rem 1rem !important;
        font-size: 1rem !important;
        height: 44px;
    }

    .message-form button[type="submit"] {
        flex: 0 0 55px !important;
        width: 55px !important;
        padding: 0.5rem 0.25rem !important;
        font-size: 0.8rem !important;
        height: 44px !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        min-width: unset !important;
        max-width: unset !important;
    }

    /* Keep page header horizontal on mobile */
    .page-header {
        flex-direction: row !important;
        align-items: center !important;
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
    }

    .page-header h1 {
        flex: 1 1 auto;
        font-size: 1.25rem !important;
    }

    .page-header p {
        flex: 1 1 100%;
        margin: 0 !important;
        font-size: 0.875rem;
    }
}

/* User Profile Modal Styles */
.user-profile-view {
    padding: 0;
}

.profile-header-modal {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--background);
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

.profile-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--primary-color);
    flex-shrink: 0;
    background: white;
}

.profile-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-info-modal h2 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    color: var(--text-primary);
    font-weight: 600;
}

.profile-info-modal .badge {
    margin-bottom: 0.5rem;
}

.profile-email {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin: 0.5rem 0 0 0;
}

.profile-details-modal {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.profile-section {
    padding: 1rem;
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.profile-section h3 {
    margin: 0 0 0.75rem 0;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    border-bottom: none;
    padding-bottom: 0;
}

.profile-section p {
    margin: 0.5rem 0;
    line-height: 1.6;
    font-size: 0.9rem;
}

.profile-section strong {
    color: var(--text-primary);
    margin-right: 0.5rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 0.5rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.info-label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.info-value {
    color: var(--text-primary);
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .profile-header-modal {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        padding: 1rem;
    }

    .profile-avatar-large {
        width: 70px;
        height: 70px;
    }

    .profile-info-modal h2 {
        font-size: 1.1rem;
    }

    .profile-section {
        padding: 0.75rem;
    }

    .user-profile-view {
        padding: 0;
    }
}

/* Scholarship Detail Page */
.scholarship-detail-page {
    min-height: calc(100vh - 70px);
    background: var(--background);
    padding: 2rem 0;
}

.detail-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.detail-back-nav {
    margin-bottom: 2rem;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.btn-back:hover {
    background: var(--surface);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.scholarship-detail-header {
    background: var(--surface);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.scholarship-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 1rem 0;
    line-height: 1.3;
}

.scholarship-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.scholarship-type,
.scholarship-status {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
}

.scholarship-type {
    background: var(--surface);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.scholarship-status.active {
    background: var(--success-color);
    color: white;
}

.scholarship-status.inactive {
    background: var(--text-secondary);
    color: white;
}

.scholarship-detail-body {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
}

.scholarship-main-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.detail-card {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.detail-card h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 1rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
}

.detail-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 1rem 0;
}

.detail-card p {
    color: var(--text-primary);
    line-height: 1.7;
    margin: 0;
}

.scholarship-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-card {
    position: sticky;
    top: 2rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.info-value {
    color: var(--text-primary);
    font-weight: 500;
    text-align: right;
}

.action-card {
    background: var(--surface);
    border-color: var(--border-color);
    padding: 1.5rem;
}

.action-card .btn-block {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    background: var(--primary-color);
    color: white;
    border: none;
}

.action-card .btn-block:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

@media (max-width: 968px) {
    .scholarship-detail-body {
        grid-template-columns: 1fr;
    }
    
    .sidebar-card {
        position: static;
    }
    
    .scholarship-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .detail-container {
        padding: 0 1rem;
    }
    
    .scholarship-detail-page {
        padding: 1rem 0;
    }
    
    .scholarship-detail-header {
        padding: 1.5rem;
    }
    
    .detail-card {
        padding: 1rem;
    }
    
    .scholarship-title {
        font-size: 1.25rem;
    }
}

/* Professional Scholarship Form Styles */
.scholarship-form-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.scholarship-form-header {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.2);
}

.header-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header-icon {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-icon svg {
    color: white;
}

.header-text h1 {
    color: white;
    margin: 0 0 0.5rem 0;
    font-size: 1.75rem;
    font-weight: 700;
}

.header-text p {
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    font-size: 1rem;
}

.modern-scholarship-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-card {
    background: var(--surface);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.form-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.card-header {
    background: linear-gradient(to right, #f8fafc, #f1f5f9);
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.card-icon {
    background: var(--primary-color);
    border-radius: 10px;
    padding: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-icon svg {
    color: white;
}

.card-title h2 {
    margin: 0 0 0.25rem 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.card-title p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.card-body {
    padding: 2rem;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.9375rem;
}

.label-text {
    font-weight: 500;
}

.label-required {
    color: #ef4444;
    font-weight: 600;
}

.form-input,
.form-select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
    background: var(--surface);
    color: var(--text-primary);
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-input::placeholder {
    color: #94a3b8;
}

.form-hint {
    display: block;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-top: 0.375rem;
}

.input-with-action {
    display: flex;
    gap: 0.5rem;
}

.input-with-action .form-input {
    flex: 1;
}

.btn-icon {
    background: var(--surface);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-icon:hover svg {
    color: white;
}

.btn-icon svg {
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.btn-text-action {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.5rem 0;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: 0.5rem;
    transition: opacity 0.2s ease;
}

.btn-text-action:hover {
    opacity: 0.8;
}

.btn-text-action svg {
    width: 16px;
    height: 16px;
}

.form-row-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.input-with-prefix {
    position: relative;
    display: flex;
    align-items: center;
}

.input-prefix {
    position: absolute;
    left: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    pointer-events: none;
}

.input-with-prefix .form-input {
    padding-left: 2.25rem;
}

.map-container {
    margin-top: 1rem;
}

.map-info {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.875rem 1rem;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.map-info svg {
    flex-shrink: 0;
    color: var(--primary-color);
}

.map-info p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.scholarship-map {
    height: 400px;
    width: 100%;
    border-radius: 10px;
    border: 2px solid var(--border-color);
}

.coordinates-display {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    font-family: 'Courier New', monospace;
}

.gdrive-info-box {
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.info-icon {
    background: var(--primary-color);
    border-radius: 10px;
    padding: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    height: fit-content;
}

.info-icon svg {
    color: white;
}

.info-content h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.info-content p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon svg {
    position: absolute;
    left: 1rem;
    color: var(--text-secondary);
    pointer-events: none;
}

.form-input.with-icon {
    padding-left: 2.75rem;
}

.form-actions-modern {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem 0;
}

.btn-cancel {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background: var(--surface);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-cancel:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.btn-submit {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    background: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    font-size: 0.9375rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

.btn-submit:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    transform: translateY(-1px);
}

.btn-submit svg,
.btn-cancel svg {
    width: 18px;
    height: 18px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .scholarship-form-container {
        padding: 1rem 0.75rem;
    }

    .scholarship-form-header {
        padding: 1.5rem 1rem;
    }

    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .header-text h1 {
        font-size: 1.5rem;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .card-body {
        padding: 1.25rem;
    }

    .form-row-2 {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .form-actions-modern {
        flex-direction: column-reverse;
    }

    .btn-cancel,
    .btn-submit {
        width: 100%;
        justify-content: center;
    }

    .input-with-action {
        flex-direction: column;
    }

    .btn-icon {
        width: 100%;
    }

    .gdrive-info-box {
        flex-direction: column;
        text-align: center;
    }

    .info-icon {
        margin: 0 auto;
    }
}

/* Custom Duplicate Warning Modal Styles */
.custom-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 30px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.modal-header svg {
    margin: 0 auto 15px;
    display: block;
}

.modal-header.warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-bottom: 3px solid var(--warning-color);
}

.modal-header.warning svg {
    color: var(--warning-color);
}

.modal-header.danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-bottom: 3px solid var(--danger-color);
}

.modal-header.danger svg {
    color: var(--danger-color);
}

.modal-header h2 {
    font-size: 24px;
    color: var(--text-primary);
    margin: 0;
    font-weight: 600;
}

.modal-body {
    padding: 30px;
}

.warning-details {
    background: var(--background);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid var(--warning-color);
}

.detail-item {
    margin-bottom: 15px;
}

.detail-item:last-child {
    margin-bottom: 0;
}

.detail-item strong {
    display: block;
    color: var(--text-primary);
    font-size: 14px;
    margin-bottom: 5px;
    font-weight: 600;
}

.detail-item p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.6;
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-warning {
    background: var(--warning-color);
    color: white;
}

.matched-title {
    color: var(--primary-color);
    font-weight: 600;
    font-style: italic;
}

.warning-question {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 20px 0 0 0;
    text-align: center;
}

.danger-text {
    font-size: 16px;
    font-weight: 600;
    color: var(--danger-color);
    margin-bottom: 15px;
}

.modal-body ul {
    margin: 15px 0;
    padding-left: 25px;
}

.modal-body ul li {
    color: var(--text-secondary);
    margin-bottom: 8px;
    line-height: 1.6;
}

.final-question {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 20px;
    text-align: center;
}

.modal-actions {
    display: flex;
    gap: 12px;
    padding: 20px 30px 30px;
    border-top: 1px solid var(--border-color);
}

.modal-actions .btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.modal-actions .btn svg {
    width: 18px;
    height: 18px;
}

.modal-actions .btn-primary {
    background: var(--primary-color);
    color: white;
}

.modal-actions .btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.modal-actions .btn-warning {
    background: var(--warning-color);
    color: white;
}

.modal-actions .btn-warning:hover {
    background: #d97706;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.modal-actions .btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.modal-actions .btn-secondary:hover {
    background: #475569;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(100, 116, 139, 0.3);
}

.modal-actions .btn-danger {
    background: var(--danger-color);
    color: white;
}

.modal-actions .btn-danger:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .modal-header,
    .modal-body {
        padding: 20px;
    }

    .modal-actions {
        flex-direction: column;
        padding: 15px 20px 20px;
    }

    .modal-actions .btn {
        width: 100%;
    }
}










 
 