/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

/* Theme Variables & Bootstrap Overrides */
:root {
    --bs-primary: #a3292f;
    --bs-primary-rgb: 163, 41, 47;
    --bs-primary-bg-subtle: #fbeae1;
    --bs-primary-border-subtle: #ebbfc1;
    --bs-primary-text-emphasis: #62191c;

    --brand-navy: #1e365e;

    --bs-secondary: #525252;
    --bs-secondary-rgb: 82, 82, 82;

    --bs-success: #00C951;
    --bs-success-rgb: 0, 201, 81;

    --bs-info: #00B8DB;
    --bs-info-rgb: 0, 184, 219;

    --bs-warning: #F0B100;
    --bs-warning-rgb: 240, 177, 0;

    --bs-danger: #FB2C36;
    --bs-danger-rgb: 251, 44, 54;

    --bs-body-font-family: 'Poppins', sans-serif;
    --bs-body-font-size: 0.875rem;
    --bs-body-color: #404040;
    
    --bs-border-color: #e5e5e5;
}

/* Base Layout */
body {
    background-color: #fafafa;
}

.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    backdrop-filter: blur(1px);
    display: none;
    z-index: 1030;
}
.overlay.show {
    display: block;
}

/* Sidebar Styles */
.sidebar {
    width: 240px;
    background: #ffffff;
    transition: width .3s, left .3s;
    border-right: 1px solid var(--bs-border-color);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    padding-top: 60px;
    z-index: 1030;
}

.sidebar .nav-link {
    color: #262626;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    font-size: 14px;
    font-weight: 400;
    gap: 12px;
    white-space: nowrap;
    margin: 1px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    color: var(--bs-primary);
    background-color: var(--bs-primary-bg-subtle);
}

.sidebar .nav-link i {
    font-size: 18px;
}

.sidebar .nav-text {
    transition: opacity .2s;
}

.sidebar .logo-area {
    position: absolute;
    top: 0;
    left: 0;
    height: 60px;
    width: 100%;
    background: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-left: 17px;
    color: #262626;
    border-bottom: 1px solid var(--bs-border-color);
}

/* Sidebar States */
.sidebar.collapsed {
    width: 60px;
}
.sidebar.collapsed .nav-link {
    margin: 0;
    background-color: transparent;
    padding: 8px 18px;
}
.sidebar.collapsed .nav-text,
.sidebar.collapsed .logo-text {
    display: none;
}

/* Content & Topbar Layout */
.topbar {
    height: 60px;
    margin-left: 240px;
    background: #ffffff;
    transition: margin-left .3s;
}
.topbar.full {
    margin-left: 60px;
}

.content {
    margin-left: 240px;
    transition: margin-left .3s;
    padding: 2.5rem;
    padding-top: calc(60px + 2.5rem);
}
.content.full {
    margin-left: 60px;
}

/* Responsive Sidebar */
@media (max-width: 992px) {
    .sidebar {
        left: -240px;
    }
    .sidebar.mobile-show {
        left: 0;
    }
    .topbar {
        margin-left: 0 !important;
        width: 100% !important;
    }
    .content {
        margin-left: 0 !important;
        padding: 1.5rem;
        padding-top: calc(60px + 1.5rem);
    }
}

/* Avatar Utilities */
.avatar {
    position: relative;
    display: inline-block;
    width: 3rem;
    height: 3rem;
}
.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.avatar-xs { width: 1.5rem; height: 1.5rem; }
.avatar-sm { width: 2rem; height: 2rem; }
.avatar-md { width: 2.5rem; height: 2.5rem; }
.avatar-lg { width: 3.5rem; height: 3.5rem; }
.avatar-xl { width: 5rem; height: 5rem; }
.avatar-xxl { width: 7.5rem; height: 7.5rem; }

/* Icon Shapes */
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
}
.btn-icon.btn-sm { width: 2.1875rem; height: 2.1875rem; }
.btn-icon.btn-xs { width: 1.75rem; height: 1.75rem; }

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 400;
}

.table th {
    font-weight: 400;
    color: var(--bs-secondary);
}
