/* ===== SIDEBAR ===== */
.sidebar {
    width: 250px;
    min-height: 100vh;
    transition: all 0.3s ease;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    overflow-y: auto;
    background: linear-gradient(180deg, #1a1d23 0%, #2d3139 100%);
}

.sidebar.collapsed {
    margin-left: -250px;
}

#page-content {
    margin-left: 250px;
    transition: all 0.3s ease;
    min-height: 100vh;
    background-color: #f0f2f5;
}

#page-content.expanded {
    margin-left: 0;
}

.sidebar-link {
    border-radius: 8px;
    padding: 10px 16px;
    margin: 2px 0;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.sidebar-link:hover {
    background-color: rgba(255, 255, 255, 0.12);
    transform: translateX(3px);
}

.sidebar-link.active {
    background: linear-gradient(135deg, rgba(102,126,234,0.3), rgba(118,75,162,0.3));
    border-left: 3px solid #667eea;
}

.sidebar-section {
    font-size: 0.7rem;
    letter-spacing: 1px;
    font-weight: 600;
}

.sidebar-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    padding: 1rem;
}

/* ===== DASHBOARD CARDS ===== */
.stat-card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.stat-card .card-body {
    padding: 1.25rem;
}

.stat-card .stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.stat-card .stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.2;
}

.stat-card .stat-label {
    font-size: 0.82rem;
    color: #6c757d;
    font-weight: 500;
}

/* ===== CARDS & TABLES ===== */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.2s;
}

.card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.card-header {
    border-radius: 12px 12px 0 0 !important;
    font-weight: 600;
}

.table th {
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #495057;
    border-top: none;
}

.table td {
    vertical-align: middle;
    font-size: 0.9rem;
}

.table-hover tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.04);
}

/* ===== BADGES ===== */
.badge {
    font-weight: 500;
    padding: 0.4em 0.8em;
    border-radius: 6px;
}

/* ===== BUTTONS ===== */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-group .btn {
    border-radius: 0;
}

.btn-group .btn:first-child {
    border-radius: 8px 0 0 8px;
}

.btn-group .btn:last-child {
    border-radius: 0 8px 8px 0;
}

/* ===== LOGIN PAGE ===== */
.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 420px;
}

.login-card .login-logo {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: white;
}

/* ===== FORM ===== */
.form-control, .form-select {
    border-radius: 8px;
    padding: 0.6rem 0.75rem;
    border: 1px solid #dee2e6;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus, .form-select:focus {
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    border-color: #667eea;
}

/* ===== RECEIPT ===== */
.receipt-wrapper {
    max-width: 700px;
    margin: 0 auto;
}

.receipt-card {
    max-width: 700px;
    margin: 0 auto;
    border: none;
    border-radius: 0;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    font-family: 'Segoe UI', Arial, sans-serif;
}

.receipt-header {
    background: linear-gradient(135deg, #1a237e, #283593);
    color: #fff;
    padding: 1.5rem 2rem;
    text-align: center;
}

.receipt-header h3 {
    margin: 0;
    font-weight: 700;
    letter-spacing: 1px;
}

.receipt-header .receipt-subtitle {
    font-size: 0.85rem;
    opacity: 0.85;
    margin-top: 4px;
}

.receipt-body {
    padding: 1.5rem 2rem;
}

.receipt-info-row {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e9ecef;
}

.receipt-info-row:last-child {
    border-bottom: none;
}

.receipt-info-label {
    color: #6c757d;
    font-size: 0.82rem;
    font-weight: 500;
}

.receipt-info-value {
    font-weight: 600;
    font-size: 0.9rem;
}

.receipt-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.receipt-table th {
    background: #f8f9fa;
    padding: 0.6rem 0.75rem;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
    text-align: left;
}

.receipt-table th.text-end {
    text-align: right;
}

.receipt-table td {
    padding: 0.7rem 0.75rem;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.9rem;
}

.receipt-table td.text-end {
    text-align: right;
}

.receipt-total-row td {
    font-weight: 700;
    border-top: 2px solid #1a237e;
    border-bottom: none;
    padding-top: 0.75rem;
}

.receipt-footer {
    background: #f8f9fa;
    padding: 1rem 2rem;
    text-align: center;
    font-size: 0.78rem;
    color: #6c757d;
    border-top: 1px dashed #dee2e6;
}

.receipt-balance-box {
    border: 2px solid #dc3545;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    background: #fff5f5;
    margin-top: 0.75rem;
}

.receipt-balance-box.paid {
    border-color: #198754;
    background: #f0fdf4;
}

.rupee {
    font-family: 'Segoe UI', Arial, sans-serif;
    font-weight: 600;
}

/* ===== PROGRESS BARS ===== */
.progress {
    border-radius: 10px;
    background-color: #f0f2f5;
    overflow: hidden;
}

.progress-bar {
    border-radius: 10px;
    transition: width 0.6s ease;
}

/* ===== PROMOTION ===== */
.promotion-class-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.promotion-class-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(102, 126, 234, 0.3);
}

/* ===== FEE STATUS INDICATORS ===== */
.table-danger.bg-opacity-10 {
    background-color: rgba(220, 53, 69, 0.05) !important;
}

/* ===== BORDER-START ACCENT ===== */
.border-start.border-4 {
    border-left-width: 4px !important;
}

/* ===== STICKY SIDEBAR PANEL ===== */
.sticky-top {
    z-index: 1;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .sidebar {
        margin-left: -250px;
    }

    .sidebar.show {
        margin-left: 0;
    }

    #page-content {
        margin-left: 0;
    }

    .stat-card .stat-value {
        font-size: 1.2rem;
    }

    .stat-card .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

    .btn-group-sm .btn {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }

    .receipt-body {
        padding: 1rem;
    }

    .receipt-header {
        padding: 1rem;
    }
}

/* ===== MISC ===== */
.avatar-sm {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
}

.text-gradient {
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ===== SCROLLBAR ===== */
.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

/* ===== PRINT ===== */
@media print {
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    body {
        background: #fff !important;
        margin: 0;
        padding: 0;
    }

    .sidebar,
    #sidebar,
    nav.navbar,
    .no-print,
    .btn,
    .alert,
    .btn-group {
        display: none !important;
    }

    #page-content {
        margin-left: 0 !important;
        padding: 0 !important;
        background: #fff !important;
    }

    .container-fluid {
        padding: 0 !important;
    }

    .card {
        box-shadow: none !important;
        border: none !important;
    }

    .receipt-wrapper {
        max-width: 100%;
    }

    .receipt-card {
        box-shadow: none !important;
        max-width: 100%;
        margin: 0;
    }

    .receipt-header {
        background: #1a237e !important;
        color: #fff !important;
    }

    .receipt-table th {
        background: #f0f0f0 !important;
    }

    .receipt-balance-box {
        border-width: 1px;
    }

    .receipt-footer {
        background: #f5f5f5 !important;
    }
}