:root {
    --primary: #1e3a5f;
    --primary-light: #2c5282;
    --accent: #e53e3e;
    --success: #38a169;
    --warning: #d69e2e;
    --info: #3182ce;
    --light-bg: #f7fafc;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--light-bg);
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    min-height: 100vh;
    background: linear-gradient(180deg, var(--primary) 0%, #0f2744 100%);
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.sidebar-brand {
    padding: 1.5rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-brand h4 {
    color: #fff;
    margin: 0;
    font-weight: 700;
    font-size: 1.15rem;
}

.sidebar-brand small {
    color: rgba(255,255,255,0.6);
    font-size: 0.75rem;
}

.sidebar-nav {
    padding: 1rem 0;
}

.sidebar-nav .nav-link {
    color: rgba(255,255,255,0.75);
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link.active {
    color: #fff;
    background: rgba(255,255,255,0.1);
    border-left-color: #63b3ed;
}

.sidebar-nav .nav-link i {
    width: 20px;
    text-align: center;
}

/* Main content */
.main-content {
    margin-left: 260px;
    padding: 1.5rem;
    min-height: 100vh;
}

.page-header {
    margin-bottom: 1.5rem;
}

.page-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
}

/* Cards */
.stat-card {
    border: none;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-3px);
}

.stat-card .card-body {
    padding: 1.25rem;
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.stat-card .stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.2;
}

.stat-card .stat-label {
    font-size: 0.85rem;
    color: #718096;
    margin-top: 0.15rem;
}

/* Content cards */
.content-card {
    border: none;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    background: #fff;
}

.content-card .card-header {
    background: transparent;
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem 1.25rem;
    font-weight: 600;
    color: var(--primary);
}

/* Tables */
.table thead th {
    background: #edf2f7;
    border-bottom: 2px solid #e2e8f0;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #4a5568;
}

.table td {
    vertical-align: middle;
}

.institute-logo {
    width: 42px;
    height: 42px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.institute-logo-placeholder {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: #edf2f7;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a0aec0;
    font-size: 1.1rem;
}

/* Badges */
.badge-pending {
    background: #fed7d7;
    color: #c53030;
}

.badge-paid {
    background: #c6f6d5;
    color: #276749;
}

/* Forms */
.form-label {
    font-weight: 500;
    color: #4a5568;
    font-size: 0.9rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 0.2rem rgba(44, 82, 130, 0.15);
}

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

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

/* Login page */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e3a5f 0%, #2c5282 50%, #3182ce 100%);
}

.login-card {
    width: 100%;
    max-width: 420px;
    border: none;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.login-card .card-body {
    padding: 2.5rem;
}

/* Modal */
.modal-header {
    background: var(--primary);
    color: #fff;
    border-radius: 0.5rem 0.5rem 0 0;
}

.modal-header .btn-close {
    filter: invert(1);
}

/* Responsive */
@media (max-width: 991.98px) {
    .sidebar {
        margin-left: -260px;
    }
    .sidebar.show {
        margin-left: 0;
    }
    .main-content {
        margin-left: 0;
    }
}

/* Utility */
.text-primary-dark {
    color: var(--primary) !important;
}

.bg-primary-soft {
    background: rgba(30, 58, 95, 0.1);
}

.bg-success-soft {
    background: rgba(56, 161, 105, 0.1);
}

.bg-warning-soft {
    background: rgba(214, 158, 46, 0.1);
}

.bg-danger-soft {
    background: rgba(229, 62, 62, 0.1);
}

.bg-info-soft {
    background: rgba(49, 130, 206, 0.1);
}
