/* College Fee Management System - custom styles
   A single, cohesive palette applied through Bootstrap's own CSS
   variables, so every bg-primary / btn-success / badge etc. across the
   whole app picks it up automatically - re-color the whole app for a
   different college by editing the values below. */

:root {
    --bs-primary: #4338ca;
    --bs-primary-rgb: 67, 56, 202;
    --bs-secondary: #64748b;
    --bs-secondary-rgb: 100, 116, 139;
    --bs-success: #15803d;
    --bs-success-rgb: 21, 128, 61;
    --bs-info: #0891b2;
    --bs-info-rgb: 8, 145, 178;
    --bs-warning: #d97706;
    --bs-warning-rgb: 217, 119, 6;
    --bs-danger: #dc2626;
    --bs-danger-rgb: 220, 38, 38;
    --bs-border-radius: 0.6rem;
    --bs-border-radius-sm: 0.45rem;
    --bs-border-radius-lg: 0.85rem;
    --cfms-gradient: linear-gradient(135deg, #4338ca 0%, #6d28d9 100%);
}

body {
    background-color: #f3f4f8;
}

/* ---- Navbar ---- */
.navbar.bg-primary {
    background: var(--cfms-gradient) !important;
    box-shadow: 0 2px 10px rgba(67, 56, 202, 0.25);
}

.navbar-brand span {
    font-weight: 700;
    letter-spacing: 0.2px;
}

.navbar .nav-link {
    font-weight: 500;
    border-radius: 6px;
    transition: background-color 0.15s ease;
}

.navbar .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.12);
}

/* ---- Page titles ---- */
main h3:first-of-type,
main > h3.mb-3, main > div h3.mb-0, main > div h3.mb-1 {
    color: #312e81;
    font-weight: 700;
}

/* ---- Cards ---- */
.card {
    border: none;
    border-radius: var(--bs-border-radius);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: box-shadow 0.15s ease;
}

.card:hover {
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.10), 0 2px 6px rgba(15, 23, 42, 0.06);
}

.card-header {
    border-bottom: 1px solid #eef0f4;
    font-weight: 600;
    border-top-left-radius: var(--bs-border-radius) !important;
    border-top-right-radius: var(--bs-border-radius) !important;
}

/* ---- Stat cards (dashboard) ---- */
.stat-card {
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    background: var(--cfms-gradient);
}

.stat-card.bg-success { background: linear-gradient(135deg, #15803d 0%, #16a34a 100%) !important; }
.stat-card.bg-info { background: linear-gradient(135deg, #0e7490 0%, #0891b2 100%) !important; }
.stat-card.bg-warning { background: linear-gradient(135deg, #b45309 0%, #d97706 100%) !important; }
.stat-card.bg-primary { background: var(--cfms-gradient) !important; }

.stat-card .stat-value {
    font-size: 1.9rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.stat-card .card-body {
    position: relative;
}

.stat-card .stat-icon {
    position: absolute;
    right: 14px;
    top: 14px;
    font-size: 2.1rem;
    opacity: 0.28;
}

/* ---- Buttons ---- */
.btn {
    border-radius: 8px;
    font-weight: 500;
}

.btn-primary {
    background: var(--cfms-gradient);
    border: none;
}

.btn-primary:hover, .btn-primary:focus {
    background: linear-gradient(135deg, #3730a3 0%, #5b21b6 100%);
}

/* ---- Tables ---- */
table.table thead {
    background-color: #eef0fb;
}

table.table thead th {
    color: #3730a3;
    font-weight: 700;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    border-bottom-width: 1px;
}

table.table-hover tbody tr:hover {
    background-color: #f5f5ff;
}

/* ---- Badges ---- */
.badge {
    font-weight: 600;
    letter-spacing: 0.2px;
}

.due-badge {
    font-size: 0.85rem;
}

/* ---- Login page ---- */
body.login-bg {
    background: var(--cfms-gradient);
}

/* ---- Printable receipt / TC / Bonafide ---- */
.receipt-box {
    max-width: 720px;
    margin: 0 auto;
    border: 1px solid #ccc;
    padding: 30px;
    background: #fff;
}

.receipt-header {
    text-align: center;
    border-bottom: 2px solid #333;
    padding-bottom: 12px;
    margin-bottom: 16px;
}

.receipt-header img {
    max-height: 70px;
    margin-bottom: 8px;
}

@media print {
    .no-print { display: none !important; }
    nav, footer { display: none !important; }
    body { background: #fff !important; }
    .receipt-box { border: none; }
}
