/* assets/css/style.css */
/* MEDIC Fees Management System - Main Stylesheet */

:root {
    --primary: #2596be;
    --primary-dark: #1d7a9a;
    --primary-light: #e8f4f8;
    --secondary: #6c757d;
    --sidebar-width: 260px;
    --sidebar-collapsed: 0px;
    --topbar-height: 60px;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: #f0f2f5;
    color: #333;
    overflow-x: hidden;
}

/* ========== LOGIN PAGE ========== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2596be 0%, #1d7a9a 50%, #155d75 100%);
    padding: 20px;
}

.login-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
    width: 100%;
    max-width: 420px;
    animation: fadeInUp 0.5s ease;
}

.login-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 10px;
}

.login-title {
    color: var(--primary);
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.login-subtitle {
    color: #666;
    font-size: 0.85rem;
    margin-bottom: 30px;
}

.login-card .form-control {
    border-radius: 10px;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.login-card .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 150, 190, 0.15);
}

.login-card .btn-primary {
    background: var(--primary);
    border: none;
    border-radius: 10px;
    padding: 12px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s;
}

.login-card .btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 150, 190, 0.4);
}

.login-card .input-group-text {
    border-radius: 10px 0 0 10px;
    background: var(--primary-light);
    border: 2px solid #e0e0e0;
    border-right: none;
    color: var(--primary);
}

.login-card .input-group .form-control {
    border-radius: 0 10px 10px 0;
    border-left: none;
}

/* ========== SIDEBAR ========== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
    z-index: 1040;
    transition: transform 0.3s ease;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-header {
    padding: 24px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
    margin-bottom: 8px;
    filter: brightness(0) invert(1);
}

.sidebar-brand {
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: 2px;
    color: var(--primary);
    margin-bottom: 2px;
}

.sidebar-nav {
    padding: 15px 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.sidebar-link:hover {
    color: #fff;
    background: rgba(37, 150, 190, 0.15);
    border-left-color: var(--primary);
}

.sidebar-link.active {
    color: #fff;
    background: rgba(37, 150, 190, 0.2);
    border-left-color: var(--primary);
}

.sidebar-link i {
    font-size: 1.1rem;
    width: 30px;
    margin-right: 10px;
    text-align: center;
}

/* ========== MAIN CONTENT ========== */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: margin-left 0.3s ease;
    display: flex;
    flex-direction: column;
}

.content-wrapper {
    padding: 24px;
    flex: 1;
}

/* ========== TOP NAVBAR ========== */
.top-navbar {
    height: var(--topbar-height);
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 1030;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.sidebar-toggle {
    color: #333;
    font-size: 1.3rem;
    padding: 0;
    text-decoration: none;
}

.sidebar-toggle:hover {
    color: var(--primary);
}

/* ========== CARDS ========== */
.stat-card {
    background: #fff;
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.04);
    height: 100%;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.stat-card .stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #fff;
}

.stat-card .stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: #333;
    margin-top: 12px;
}

.stat-card .stat-label {
    font-size: 0.82rem;
    color: #888;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, #2596be, #1d7a9a);
}

.bg-gradient-success {
    background: linear-gradient(135deg, #28a745, #20903b);
}

.bg-gradient-warning {
    background: linear-gradient(135deg, #ffc107, #e0a800);
}

.bg-gradient-info {
    background: linear-gradient(135deg, #17a2b8, #138496);
}

.bg-gradient-danger {
    background: linear-gradient(135deg, #dc3545, #c82333);
}

/* ========== DATA CARD / TABLE CARD ========== */
.data-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.04);
    overflow: hidden;
    margin-bottom: 24px;
}

.data-card .card-header {
    background: #fff;
    border-bottom: 1px solid #eee;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.data-card .card-header h5 {
    margin: 0;
    font-weight: 600;
    font-size: 1.05rem;
    color: #333;
}

.data-card .card-body {
    padding: 24px;
}

/* ========== TABLES ========== */
.table-responsive {
    border-radius: 0 0 14px 14px;
}

.table {
    margin-bottom: 0;
}

.table thead th {
    background: #f8f9fa;
    border-bottom: 2px solid #e0e0e0;
    font-weight: 600;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #666;
    padding: 14px 16px;
    white-space: nowrap;
}

.table tbody td {
    padding: 14px 16px;
    vertical-align: middle;
    font-size: 0.9rem;
    border-bottom: 1px solid #f0f0f0;
}

.table tbody tr:hover {
    background-color: rgba(37, 150, 190, 0.04);
}

/* ========== BADGES ========== */
.badge-paid {
    background: #d4edda;
    color: #155724;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
}

.badge-pending {
    background: #fff3cd;
    color: #856404;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
}

.badge-partial {
    background: #cce5ff;
    color: #004085;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
}

.badge-failed {
    background: #f8d7da;
    color: #721c24;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
}

/* ========== FORMS ========== */
.form-label {
    font-weight: 500;
    font-size: 0.88rem;
    color: #555;
    margin-bottom: 6px;
}

.form-control, .form-select {
    border-radius: 10px;
    padding: 10px 14px;
    border: 2px solid #e0e0e0;
    font-size: 0.92rem;
    transition: all 0.3s;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 150, 190, 0.15);
}

/* ========== BUTTONS ========== */
.btn {
    border-radius: 10px;
    font-weight: 500;
    padding: 8px 18px;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline-primary:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.btn-sm {
    padding: 5px 12px;
    font-size: 0.8rem;
    border-radius: 8px;
}

/* ========== FOOTER ========== */
.dashboard-footer {
    padding: 16px 24px;
    background: #fff;
    border-top: 1px solid #e0e0e0;
    font-size: 0.82rem;
    color: #888;
}

/* ========== PAYMENT SECTION ========== */
.payment-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(37, 150, 190, 0.3);
}

.payment-card .form-control {
    background: rgba(255, 255, 255, 0.95);
    border: none;
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
}

.payment-card .btn-pay {
    background: #fff;
    color: var(--primary);
    font-weight: 700;
    border: none;
    padding: 14px 30px;
    font-size: 1.1rem;
    border-radius: 12px;
    transition: all 0.3s;
}

.payment-card .btn-pay:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ========== LOADING SPINNER ========== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    background: #fff;
    padding: 40px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.loading-spinner .spinner-border {
    width: 3rem;
    height: 3rem;
    color: var(--primary);
}

/* ========== SEMESTER PROGRESS ========== */
.semester-progress {
    height: 8px;
    border-radius: 4px;
    background: #e9ecef;
    overflow: hidden;
}

.semester-progress .progress-bar {
    background: var(--primary);
    border-radius: 4px;
    transition: width 0.6s ease;
}

/* ========== ANIMATIONS ========== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.4s ease;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1035;
        display: none;
    }

    .sidebar-overlay.active {
        display: block;
    }
}

@media (max-width: 575.98px) {
    .content-wrapper {
        padding: 16px;
    }

    .stat-card {
        padding: 18px;
    }

    .stat-card .stat-value {
        font-size: 1.3rem;
    }

    .data-card .card-header {
        padding: 14px 16px;
    }

    .data-card .card-body {
        padding: 16px;
    }

    .login-card {
        padding: 30px 24px;
    }
}

/* ========== SEARCH BOX ========== */
.search-box {
    position: relative;
}

.search-box .form-control {
    padding-left: 40px;
}

.search-box i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
}

/* ========== CHART CONTAINER ========== */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* ========== QUICK PAY BUTTONS ========== */
.quick-pay-btn {
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 10px;
    padding: 8px 16px;
    font-weight: 500;
    transition: all 0.3s;
    cursor: pointer;
}

.quick-pay-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
}

/* ========== PRINT STYLES ========== */
@media print {
    .sidebar, .top-navbar, .dashboard-footer, .btn, .no-print {
        display: none !important;
    }
    .main-content {
        margin-left: 0 !important;
    }
}