/* ============================================
   EPB SCHOLARSHIP PORTAL - Main Stylesheet
   ============================================ */

/* ========== GOOGLE FONTS ========== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ========== CSS VARIABLES ========== */
:root {
    --primary-color: #1a5632;
    --primary-dark: #0d3b1e;
    --primary-light: #2d8a4e;
    --secondary-color: #d4a843;
    --secondary-dark: #b8912e;
    --accent-color: #e8c96a;
    
    --sidebar-width: 280px;
    --sidebar-collapsed: 70px;
    --topbar-height: 60px;
    
    --bg-body: #f5f7fa;
    --bg-white: #ffffff;
    --bg-light: #f8f9fa;
    --bg-dark: #1a1f36;
    
    --text-dark: #1a1f36;
    --text-medium: #4a5568;
    --text-light: #a0aec0;
    --text-white: #ffffff;
    
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    
    --success-color: #48bb78;
    --warning-color: #ed8936;
    --danger-color: #f56565;
    --info-color: #4299e1;
    
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
    --shadow-xl: 0 20px 50px rgba(0,0,0,0.2);
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ========== RESET & BASE ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-body);
    color: var(--text-dark);
    line-height: 1.6;
    font-size: 14px;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

.sidebar-menu li a[href*="reports"] {
    text-decoration: none !important;
    border-bottom: none !important;
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--text-light);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-medium);
}

/* ========== ADMIN LAYOUT ========== */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ========== SIDEBAR ========== */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    color: var(--text-white);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1000;
    overflow-y: auto;
    overflow-x: hidden;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-lg);
}

.sidebar-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-logo {
    width: 190px;
    height: auto;
    background: var(--secondary-color);
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    padding: 15px 10px;
}

.logo-text {
    text-align: center;
    color: var(--primary-dark);
}

.logo-main {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: 2px;
    margin-bottom: 5px;
}

.logo-full {
    font-size: 10px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.sidebar-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.sidebar-subtitle {
    font-size: 11px;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar-menu {
    padding: 15px 0;
    list-style: none;
}

.sidebar-menu li {
    margin: 0;
}

.sidebar-menu .menu-header {
    padding: 15px 20px 8px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255,255,255,0.5);
    font-weight: 600;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: rgba(255,255,255,0.8);
    transition: all var(--transition-fast);
    border-left: 3px solid transparent;
    font-size: 13px;
    font-weight: 400;
    text-decoration: none !important;
    
}

.sidebar-menu a:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
    border-left-color: var(--secondary-color);
}

.sidebar-menu a.active {
    background: rgba(255,255,255,0.12);
    color: #fff;
    border-left-color: var(--secondary-color);
    font-weight: 500;
}

.sidebar-menu a i {
    width: 24px;
    font-size: 16px;
    margin-right: 10px;
    text-align: center;
}

.sidebar-menu .badge {
    margin-left: auto;
    background: var(--secondary-color);
    color: var(--primary-dark);
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 20px;
    font-weight: 600;
}

/* ========== MAIN CONTENT ========== */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: margin-left var(--transition-normal);
    min-height: 100vh;
}

/* ========== TOP BAR ========== */
.topbar {
    background: var(--bg-white);
    height: var(--topbar-height);
    padding: 0 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 999;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.toggle-sidebar {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-medium);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

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

.page-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.notification-btn {
    position: relative;
    background: none;
    border: none;
    font-size: 18px;
    color: var(--text-medium);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
}

.notification-btn .count {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--danger-color);
    color: white;
    font-size: 10px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.admin-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-light);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

/* ========== CONTENT AREA ========== */
.content-area {
    padding: 25px;
}

/* ========== CARDS ========== */
.card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-fast);
    margin-bottom: 20px;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-white);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.card-body {
    padding: 20px;
}

/* ========== STATS CARDS ========== */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.stat-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 20px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: var(--transition-fast);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.stat-icon.primary {
    background: rgba(26,86,50,0.1);
    color: var(--primary-color);
}

.stat-icon.success {
    background: rgba(72,187,120,0.1);
    color: var(--success-color);
}

.stat-icon.warning {
    background: rgba(237,137,54,0.1);
    color: var(--warning-color);
}

.stat-icon.danger {
    background: rgba(245,101,101,0.1);
    color: var(--danger-color);
}

.stat-info h3 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    color: var(--text-dark);
}

.stat-info p {
    margin: 0;
    color: var(--text-medium);
    font-size: 12px;
}

/* ========== TABLES ========== */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table thead {
    background: var(--bg-light);
}

table th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-medium);
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
}

table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-light);
    font-size: 13px;
}

table tbody tr:hover {
    background: rgba(26,86,50,0.02);
}



/* ========== BUTTONS ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    white-space: nowrap;
}

.btn i {
    font-size: 14px;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-secondary {
    background: var(--secondary-color);
    color: var(--primary-dark);
    border-color: var(--secondary-color);
}

.btn-secondary:hover {
    background: var(--secondary-dark);
}

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

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

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

.btn-outline-primary {
    background: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

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

.btn-sm {
    padding: 5px 10px;
    font-size: 11px;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 15px;
}

.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: var(--radius-sm);
}

/* ========== FORMS ========== */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 13px;
    color: var(--text-dark);
}

.form-label .required {
    color: var(--danger-color);
}

.form-control {
    width: 100%;
    padding: 9px 14px;
    font-size: 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-white);
    color: var(--text-dark);
    transition: all var(--transition-fast);
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26,86,50,0.1);
}

.form-control:disabled {
    background: var(--bg-light);
    cursor: not-allowed;
}

select.form-control {
    cursor: pointer;
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-check-input {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

/* ========== BADGES ========== */
.badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 500;
    border-radius: 20px;
}

.badge-success {
    background: rgba(72,187,120,0.15);
    color: #22543d;
}

.badge-warning {
    background: rgba(237,137,54,0.15);
    color: #7b341e;
}

.badge-danger {
    background: rgba(245,101,101,0.15);
    color: #742a2a;
}

.badge-info {
    background: rgba(66,153,225,0.15);
    color: #2a4365;
}

.badge-primary {
    background: rgba(26,86,50,0.15);
    color: var(--primary-dark);
}
#eligibilityFailCard {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* ========== ALERTS ========== */
.alert {
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 15px;
    font-size: 13px;
    border-left: 4px solid;
}

.alert-success {
    background: rgba(72,187,120,0.1);
    border-color: var(--success-color);
    color: #22543d;
}

.alert-danger {
    background: rgba(245,101,101,0.1);
    border-color: var(--danger-color);
    color: #742a2a;
}

.alert-warning {
    background: rgba(237,137,54,0.1);
    border-color: var(--warning-color);
    color: #7b341e;
}

.alert-info {
    background: rgba(66,153,225,0.1);
    border-color: var(--info-color);
    color: #2a4365;
}

/* ========== MODAL ========== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.modal-box {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.3s ease;
}

.modal-header {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 17px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-medium);
    padding: 5px;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ========== LOADER ========== */
.loader {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 15px;
}

/* ========== CHAT BOX ========== */
.chat-container {
    display: flex;
    height: calc(100vh - 200px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.chat-sidebar {
    width: 300px;
    border-right: 1px solid var(--border-color);
    background: var(--bg-light);
    overflow-y: auto;
}

.chat-list-item {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    transition: var(--transition-fast);
}

.chat-list-item:hover,
.chat-list-item.active {
    background: var(--bg-white);
}

.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-white);
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: var(--bg-light);
}

.message {
    display: flex;
    margin-bottom: 15px;
}

.message.sent {
    justify-content: flex-end;
}

.message-bubble {
    max-width: 70%;
    padding: 10px 15px;
    border-radius: 18px;
    font-size: 13px;
}

.message.received .message-bubble {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-bottom-left-radius: 5px;
}

.message.sent .message-bubble {
    background: var(--primary-color);
    color: white;
    border-bottom-right-radius: 5px;
}

.chat-input-area {
    padding: 15px;
    background: var(--bg-white);
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 10px;
}

.chat-input-area input {
    flex: 1;
}

/* ========== LOGIN PAGE ========== */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 50%, #1a5632 100%);
    padding: 20px;
}

.login-card {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-xl);
}

.login-logo {
    text-align: center;
    margin-bottom: 25px;
}

.login-logo .icon {
    width: 70px;
    height: 70px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    font-weight: 800;
    margin-bottom: 10px;
}

.login-title {
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 5px;
}

.login-subtitle {
    color: var(--text-medium);
    text-align: center;
    font-size: 13px;
    margin-bottom: 25px;
}

/* ========== PUBLIC APPLICATION PAGE ========== */
.public-header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    padding: 40px 0;
    color: white;
    text-align: center;
}

.public-header h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
}

.public-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 30px 20px;
}

.section-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 25px;
    margin-bottom: 20px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

/* ========== FOOTER ========== */
.footer {
    text-align: center;
    padding: 20px;
    color: var(--text-light);
    font-size: 12px;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

/* ========== ANIMATIONS ========== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

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

/* ========== RESPONSIVE ========== */
@media (max-width: 992px) {
    .sidebar {
        width: var(--sidebar-collapsed);
    }
    
    .sidebar .sidebar-title,
    .sidebar .sidebar-subtitle,
    .sidebar-menu a span,
    .sidebar-menu .menu-header,
    .sidebar-menu .badge {
        display: none;
    }
    
    .sidebar-menu a {
        justify-content: center;
        padding: 15px;
    }
    
    .sidebar-menu a i {
        margin: 0;
        font-size: 18px;
    }
    
    .main-content {
        margin-left: var(--sidebar-collapsed);
    }
    
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .chat-sidebar {
        width: 80px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width);
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .sidebar .sidebar-title,
    .sidebar .sidebar-subtitle,
    .sidebar-menu a span,
    .sidebar-menu .menu-header,
    .sidebar-menu .badge {
        display: block;
    }
    
    .sidebar-menu a {
        justify-content: flex-start;
        padding: 12px 20px;
    }
    
    .sidebar-menu a i {
        margin-right: 10px;
        font-size: 16px;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .content-area {
        padding: 15px;
    }
    
    .stats-row {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .login-card {
        padding: 25px;
    }
    
    .chat-container {
        flex-direction: column;
        height: auto;
    }
    
    .chat-sidebar {
        width: 100%;
        max-height: 200px;
    }
}

/* ========== PRINT ========== */
@media print {
    .sidebar, .topbar, .no-print {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
    }
    
    .content-area {
        padding: 0;
    }
}

/* ========== UTILITY CLASSES ========== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-primary { color: var(--primary-color); }
.text-success { color: var(--success-color); }
.text-warning { color: var(--warning-color); }
.text-danger { color: var(--danger-color); }

.bg-white { background: var(--bg-white); }
.bg-light { background: var(--bg-light); }

.mt-0 { margin-top: 0; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mb-0 { margin-bottom: 0; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }

.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-10 { gap: 10px; }
.gap-15 { gap: 15px; }
.gap-20 { gap: 20px; }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

.rounded { border-radius: var(--radius-sm); }
.shadow { box-shadow: var(--shadow-sm); }
.border { border: 1px solid var(--border-color); }

.cursor-pointer { cursor: pointer; }
.font-bold { font-weight: 600; }
.font-sm { font-size: 12px; }
.font-xs { font-size: 11px; }

.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }

