/**
 * SIS - Student Information System
 * Academic/University Theme
 */

/* ==================== CSS Variables ==================== */
:root {
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 70px;
    --topbar-height: 70px;

    /* Academic Color Palette */
    --primary-color: #1a365d;
    /* Navy Blue - Main brand */
    --primary-light: #2c5282;
    --primary-dark: #0d1b2a;
    --secondary-color: #744210;
    /* Academic Brown/Gold */
    --accent-color: #b7791f;
    /* Gold accent */
    --accent-light: #d69e2e;

    /* Status Colors */
    --success-color: #276749;
    --info-color: #2b6cb0;
    --warning-color: #c05621;
    --danger-color: #9b2c2c;

    /* Neutrals */
    --light-color: #f7fafc;
    --dark-color: #1a202c;
    --gray-100: #f7fafc;
    --gray-200: #edf2f7;
    --gray-300: #e2e8f0;
    --gray-400: #cbd5e0;
    --gray-500: #a0aec0;
    --gray-600: #718096;
    --gray-700: #4a5568;
    --gray-800: #2d3748;

    /* Sidebar */
    --sidebar-bg: linear-gradient(180deg, #1a365d 0%, #0d1b2a 100%);
    --sidebar-hover: rgba(255, 255, 255, 0.1);
    --sidebar-active: rgba(183, 121, 31, 0.3);
    --sidebar-border: rgba(255, 255, 255, 0.1);
}

/* ==================== Base Styles ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--gray-100);
    color: var(--dark-color);
    font-size: 14px;
    line-height: 1.6;
    overflow-x: hidden;
}

.wrapper {
    display: flex;
    min-height: 100vh;
}

/* ==================== Typography ==================== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    color: var(--primary-color);
    line-height: 1.3;
}

/* ==================== Sidebar ==================== */
.sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    background: var(--sidebar-bg);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    overflow-y: auto;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 2px solid var(--accent-color);
    text-align: center;
}

.sidebar-brand {
    color: #fff;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.sidebar-brand .logo-circle {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--secondary-color) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.sidebar-brand .logo-circle i {
    font-size: 1.8rem;
    color: #fff;
}

.sidebar-brand .brand-text {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.sidebar-brand:hover {
    color: #fff;
    text-decoration: none;
}

.sidebar-portal-name {
    padding: 15px 20px;
    color: var(--accent-light);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    border-bottom: 1px solid var(--sidebar-border);
    background: rgba(0, 0, 0, 0.1);
    text-align: center;
}

.sidebar-header-text {
    padding: 20px 20px 10px;
    color: var(--gray-400);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
}

/* Sidebar Navigation */
.sidebar-nav {
    list-style: none;
    padding: 15px 0;
    margin: 0;
}

.sidebar-item {
    position: relative;
    margin: 2px 10px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: all 0.2s ease;
    gap: 12px;
    border-radius: 8px;
    font-size: 0.9rem;
}

.sidebar-link i {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
    color: var(--accent-light);
}

.sidebar-link:hover {
    background: var(--sidebar-hover);
    color: #fff;
    transform: translateX(5px);
}

.sidebar-item.active>.sidebar-link {
    background: var(--sidebar-active);
    color: #fff;
    border-left: 3px solid var(--accent-color);
}

.sidebar-item.active>.sidebar-link i {
    color: var(--accent-color);
}

/* Submenu */
.sidebar-item.has-sub>.sidebar-link::after {
    content: '\F282';
    font-family: 'bootstrap-icons';
    margin-left: auto;
    transition: transform 0.2s ease;
    font-size: 0.8rem;
    opacity: 0.7;
}

.sidebar-item.has-sub.open>.sidebar-link::after {
    transform: rotate(90deg);
}

.submenu {
    list-style: none;
    padding: 5px 0;
    margin: 5px 0 5px 20px;
    display: none;
    border-left: 2px solid var(--sidebar-border);
}

.sidebar-item.has-sub.open .submenu {
    display: block;
}

.submenu li a {
    display: block;
    padding: 8px 15px 8px 20px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    border-radius: 0 5px 5px 0;
}

.submenu li a:hover {
    color: #fff;
    background: var(--sidebar-hover);
    padding-left: 25px;
}

.submenu li a.active {
    color: var(--accent-light);
    border-left: 2px solid var(--accent-color);
}

/* ==================== Main Content ==================== */
.main {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s ease;
    background: var(--gray-100);
}

/* ==================== Top Navbar ==================== */
.topbar {
    height: var(--topbar-height);
    padding: 0 1.5rem;
    background: #fff;
    border-bottom: 3px solid var(--primary-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.topbar .nav-link {
    color: var(--gray-600);
    position: relative;
    padding: 0.5rem 0.75rem;
}

.topbar .nav-link:hover {
    color: var(--primary-color);
}

.badge-counter {
    position: absolute;
    top: 0;
    right: 0;
    font-size: 0.6rem;
    padding: 0.2rem 0.4rem;
    background: var(--danger-color);
}

.topbar-divider {
    width: 0;
    border-right: 1px solid var(--gray-300);
    height: 2.5rem;
    margin: auto 1rem;
}

.avatar-circle {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--accent-color);
}

.avatar-circle .initials {
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
}

.icon-circle {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Institution Badge in Navbar */
.institution-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 15px;
    background: var(--gray-100);
    border-radius: 20px;
    border: 1px solid var(--gray-300);
}

.institution-badge .badge-icon {
    width: 32px;
    height: 32px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.institution-badge .badge-text {
    font-size: 0.85rem;
    color: var(--gray-700);
    font-weight: 500;
}

/* ==================== Content ==================== */
.content {
    flex: 1;
    padding: 0 2rem 2rem;
}

/* Page Header */
.page-header-academic {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: #fff;
    padding: 1.25rem 2rem;
    margin: -0.5rem -2rem 1.5rem;
    border-bottom: 4px solid var(--accent-color);
}

.page-header-academic h1 {
    color: #fff;
    font-size: 1.4rem;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.page-header-academic h1 i {
    opacity: 0.8;
}

/* ==================== Cards - Academic Style ==================== */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.card-header {
    background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-200) 100%);
    border-bottom: 2px solid var(--primary-color);
    padding: 1rem 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-header.bg-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%) !important;
    color: #fff;
    border-bottom: 2px solid var(--accent-color);
}

.card-header.bg-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #2f855a 100%) !important;
    color: #fff;
    border-bottom: 2px solid var(--accent-color);
}

.card-header.bg-info {
    background: linear-gradient(135deg, var(--info-color) 0%, #3182ce 100%) !important;
    color: #fff;
    border-bottom: 2px solid var(--accent-color);
}

.card-header.bg-warning {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--secondary-color) 100%) !important;
    color: #fff;
    border-bottom: 2px solid var(--primary-color);
}

.card-header.bg-secondary {
    background: linear-gradient(135deg, var(--gray-600) 0%, var(--gray-700) 100%) !important;
    color: #fff;
    border-bottom: 2px solid var(--accent-color);
}

.card-header.bg-dark {
    background: linear-gradient(135deg, var(--gray-800) 0%, var(--dark-color) 100%) !important;
    color: #fff;
    border-bottom: 2px solid var(--accent-color);
}

.card-body {
    padding: 1.5rem;
}

/* Stats Cards - Academic */
.stats-card {
    border-radius: 10px;
    border: none;
    overflow: hidden;
    position: relative;
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.stats-card.primary::before {
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
}

.stats-card.success::before {
    background: linear-gradient(90deg, var(--success-color), #38a169);
}

.stats-card.info::before {
    background: linear-gradient(90deg, var(--info-color), #4299e1);
}

.stats-card.warning::before {
    background: linear-gradient(90deg, var(--accent-color), var(--accent-light));
}

.stats-card.danger::before {
    background: linear-gradient(90deg, var(--danger-color), #c53030);
}

.stats-card .card-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
}

.stats-card .stats-info .stats-label {
    color: var(--gray-600);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.stats-card .stats-info .stats-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stats-card .stats-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: var(--gray-100);
    color: var(--primary-color);
}

/* ==================== Tables - Academic ==================== */
.table {
    margin-bottom: 0;
}

.table thead th {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: #fff;
    border: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    padding: 1rem 0.75rem;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: var(--gray-100);
}

.table tbody td {
    vertical-align: middle;
    padding: 0.875rem 0.75rem;
    border-color: var(--gray-200);
}

.table-hover tbody tr:hover {
    background-color: rgba(26, 54, 93, 0.05);
}

/* ==================== Buttons - Academic ==================== */
.btn {
    border-radius: 6px;
    font-weight: 600;
    padding: 0.5rem 1.25rem;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    border: none;
    box-shadow: 0 2px 8px rgba(26, 54, 93, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 54, 93, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #2f855a 100%);
    border: none;
}

.btn-warning {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--secondary-color) 100%);
    border: none;
    color: #fff;
}

.btn-warning:hover {
    color: #fff;
}

.btn-info {
    background: linear-gradient(135deg, var(--info-color) 0%, #3182ce 100%);
    border: none;
    color: #fff;
}

.btn-info:hover {
    color: #fff;
}

.btn-secondary {
    background: var(--gray-500);
    border: none;
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

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

/* ==================== Forms - Academic ==================== */
.form-control {
    border-radius: 6px;
    padding: 0.65rem 1rem;
    border: 1px solid var(--gray-300);
    font-size: 0.9rem;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.15);
}

.form-select {
    border-radius: 6px;
    padding: 0.65rem 1rem;
    border: 1px solid var(--gray-300);
}

.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.15);
}

.form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--gray-700);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* ==================== Badges - Academic ==================== */
.badge {
    font-weight: 600;
    padding: 0.4em 0.8em;
    border-radius: 4px;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.5px;
}

.badge.bg-success {
    background: var(--success-color) !important;
}

.badge.bg-warning {
    background: var(--accent-color) !important;
    color: #fff;
}

.badge.bg-danger {
    background: var(--danger-color) !important;
}

.badge.bg-info {
    background: var(--info-color) !important;
}

.badge.bg-secondary {
    background: var(--gray-500) !important;
}

/* ==================== Alerts ==================== */
.alert {
    border-radius: 8px;
    border: none;
    border-left: 4px solid;
    padding: 1rem 1.25rem;
}

.alert-success {
    background: rgba(39, 103, 73, 0.1);
    border-left-color: var(--success-color);
    color: var(--success-color);
}

.alert-danger {
    background: rgba(155, 44, 44, 0.1);
    border-left-color: var(--danger-color);
    color: var(--danger-color);
}

.alert-warning {
    background: rgba(183, 121, 31, 0.1);
    border-left-color: var(--accent-color);
    color: var(--secondary-color);
}

.alert-info {
    background: rgba(43, 108, 176, 0.1);
    border-left-color: var(--info-color);
    color: var(--info-color);
}

/* ==================== Footer - Academic ==================== */
.footer {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: rgba(255, 255, 255, 0.8);
    border-top: 3px solid var(--accent-color);
    padding: 1rem 0;
}

.footer span {
    color: rgba(255, 255, 255, 0.8) !important;
}

.footer .text-muted {
    color: rgba(255, 255, 255, 0.6) !important;
}

/* ==================== Login Page - Academic ==================== */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    position: relative;
}

.login-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.login-card {
    width: 100%;
    max-width: 440px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.login-header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    padding: 2.5rem 2rem;
    text-align: center;
    color: #fff;
    border-bottom: 4px solid var(--accent-color);
}

.login-header .logo-circle {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--secondary-color) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    border: 3px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.login-header .logo-circle i {
    font-size: 2.5rem;
}

.login-header h1 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.login-header p {
    opacity: 0.8;
    margin: 0;
    font-size: 0.9rem;
}

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

.login-body .form-control {
    padding: 0.9rem 1rem;
    border-radius: 8px;
    border: 2px solid var(--gray-300);
}

.login-body .form-control:focus {
    border-color: var(--primary-color);
}

.login-body .btn {
    padding: 0.9rem;
    font-size: 1rem;
    border-radius: 8px;
}

/* ==================== Role Selection ==================== */
.role-card {
    border: 2px solid var(--gray-300);
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
}

.role-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(26, 54, 93, 0.15);
}

.role-card.selected {
    border-color: var(--primary-color);
    background: rgba(26, 54, 93, 0.05);
}

.role-card .role-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: #fff;
    font-size: 1.5rem;
}

.role-card .role-name {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.95rem;
}

/* ==================== Pagination ==================== */
.pagination .page-link {
    color: var(--primary-color);
    border: 1px solid var(--gray-300);
    padding: 0.5rem 0.85rem;
}

.pagination .page-item.active .page-link {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.pagination .page-link:hover {
    background: var(--gray-100);
    color: var(--primary-color);
}

/* ==================== Dropdown Menus ==================== */
.dropdown-menu {
    border: none;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 0.5rem 0;
}

.dropdown-item {
    padding: 0.6rem 1.25rem;
    font-size: 0.9rem;
}

.dropdown-item:hover {
    background: var(--gray-100);
}

.dropdown-header {
    font-weight: 600;
    color: var(--primary-color);
    padding: 0.75rem 1.25rem;
}

/* ==================== Responsive ==================== */
@media (max-width: 768px) {
    .sidebar {
        margin-left: calc(-1 * var(--sidebar-width));
    }

    .sidebar.active {
        margin-left: 0;
    }

    .main {
        margin-left: 0;
    }

    .main.sidebar-open {
        margin-left: var(--sidebar-width);
    }

    .topbar {
        padding: 0 0.75rem;
    }

    .content {
        padding: 0 1rem 1.5rem;
    }

    .page-header-academic {
        margin: -0.5rem -1rem 1.5rem;
        padding: 1rem 1.5rem;
    }
}

/* ==================== Animations ==================== */
.animated--grow-in {
    animation: growIn 0.2s ease forwards;
}

@keyframes growIn {
    0% {
        transform: scale(0.95);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ==================== Print Styles ==================== */
@media print {

    .sidebar,
    .topbar,
    .btn,
    nav {
        display: none !important;
    }

    .main {
        margin-left: 0 !important;
    }

    .card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* ==================== Scrollbar ==================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-200);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-500);
}

/* Sidebar Scrollbar */
.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

/* ==================== Role Selection Page ==================== */
body.role-selection-page {
    font-family: 'Source Sans Pro', sans-serif;
    /* Restore original login-wrapper background */
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Add the pattern overlay from original login-wrapper */
body.role-selection-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

.role-selection-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    width: 100%;
    max-width: 1000px;
    min-height: 600px;
    display: flex;
    position: relative;
    z-index: 1;
}

.role-selection-card .left-panel {
    /* Match .login-header background */
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    color: white;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    border-right: 4px solid var(--accent-color);
    /* Match border-bottom of header */
}

.role-selection-card .logo-circle {
    /* Match .login-header .logo-circle */
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--secondary-color) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    border: 3px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    font-size: 3rem;
}

.role-selection-card .right-panel {
    padding: 3rem;
    background: #fff;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.role-card {
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    height: 100%;
    background: #fff;
}

.role-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.role-card.selected {
    border-color: var(--primary-color);
    background-color: var(--gray-100);
}

.role-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.role-name {
    font-weight: 600;
    color: var(--dark-color);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.logout-btn {
    margin-top: auto;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    transition: all 0.2s;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: white;
}

@media (max-width: 768px) {
    .role-selection-card {
        flex-direction: column;
        min-height: auto;
    }

    .role-selection-card .left-panel {
        padding: 2rem;
        border-right: none;
        border-bottom: 4px solid var(--accent-color);
    }

    .role-selection-card .right-panel {
        padding: 1.5rem;
    }
}

/* ==================== Compact Theme Utilities ==================== */
.card.card-compact .card-body {
    padding: 1rem;
}

.card.card-compact .card-header {
    padding: 0.75rem 1rem;
}

/* Compact Forms */
.form-compact .form-label,
.form-compact .col-form-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 0.25rem;
    letter-spacing: 0.3px;
    color: var(--gray-700);
}

.form-compact .form-control,
.form-compact .form-select {
    font-size: 0.85rem;
    padding: 0.4rem 0.7rem;
    min-height: calc(1.5em + 0.8rem + 2px);
}

.form-compact .input-group-text {
    font-size: 0.85rem;
    padding: 0.4rem 0.7rem;
}

/* Compact Buttons */
.btn.btn-compact {
    padding: 0.35rem 0.9rem;
    font-size: 0.8rem;
}

/* Compact Tables */
.table-compact th,
.table-compact td {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
}

.table-compact th {
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

/* ==================== Print Styles ==================== */
@media print {

    .btn,
    .card-header .btn,
    nav,
    .sidebar {
        display: none !important;
    }

    .card {
        break-inside: avoid;
    }

    .main {
        margin-left: 0 !important;
        width: 100% !important;
        padding: 0 !important;
    }
}