:root {
    --brand-dark: #001337;
    --brand-red: #ee3237;
    --brand-yellow: #f9bb00;
    --bg-light: #f4f6fb;
    --text-main: #333333;
    --text-muted: #888888;
    --card-shadow: 0 10px 40px rgba(0, 19, 55, 0.08);
    --transition-speed: 0.3s;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-main);
    overflow-x: hidden;
}

/* -------------------------------
   LOGIN PAGE UTILITIES
--------------------------------- */
.bg-dark-brand {
    background-color: var(--brand-dark);
    position: relative;
}

.bg-gradient-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(0,19,55,1) 0%, rgba(238,50,55,0.2) 100%);
    z-index: 1;
}

.z-index-2 {
    z-index: 2;
}

.shadow-premium {
    box-shadow: var(--card-shadow) !important;
}

.btn-brand {
    background-color: var(--brand-red);
    border: none;
}

.btn-brand:hover {
    background-color: #d1272c;
    color: white;
}

.bg-hover-shift {
    transition: all var(--transition-speed) ease;
}

.bg-hover-shift:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(238, 50, 55, 0.4) !important;
}

.custom-input {
    border: 1px solid #e0e0e0;
    background-color: #fcfcfc;
    transition: all 0.2s ease;
}

.custom-input:focus {
    background-color: #ffffff;
    border-color: var(--brand-dark);
    box-shadow: 0 0 0 0.25rem rgba(0, 19, 55, 0.1);
}

/* Animations */
.animate-slide-up {
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.animate-slide-up-delay {
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}
.animate-fade-in {
    animation: fadeIn 1s ease-in-out;
}

@keyframes slideUp {
    0% { opacity: 0; transform: translateY(40px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* -------------------------------
   DASHBOARD UTILITIES
--------------------------------- */
/* Layout & Sidebar */
.wrapper {
    display: flex;
    width: 100%;
}

.sidebar {
    width: 260px;
    height: 100vh;
    background-color: var(--brand-dark);
    color: white;
    position: fixed;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 4px 0 15px rgba(0,0,0,0.05);
}

.sidebar .nav-link {
    color: rgba(255,255,255,0.7);
    padding: 12px 20px;
    margin: 4px 15px;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar .nav-link:hover, .sidebar .nav-link.active {
    background-color: rgba(255,255,255,0.1);
    color: white;
}

.sidebar .nav-link.active {
    background-color: var(--brand-red);
}

.sidebar .logo-img {
    max-width: 150px;
}

.main-panel {
    width: calc(100% - 260px);
    margin-left: 260px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.top-navbar {
    background: transparent;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.content-body {
    padding: 0 30px 30px;
    flex-grow: 1;
}

@media (max-width: 991.98px) {
    .sidebar { margin-left: -260px; }
    .sidebar.show { margin-left: 0; }
    .main-panel { width: 100%; margin-left: 0; }
    .main-panel.shift { margin-left: 260px; }
}

/* Dashboard Cards (KPIs) */
.kpi-card {
    background: white;
    border-radius: 16px;
    border: none;
    box-shadow: var(--card-shadow);
    transition: transform 0.2s ease;
    overflow: hidden;
    position: relative;
    padding: 24px;
    z-index: 1;
}

.kpi-card:hover {
    transform: translateY(-5px);
}

.kpi-red-solid {
    background: linear-gradient(135deg, var(--brand-red) 0%, #b82327 100%);
    color: white;
}

.kpi-card .icon-box {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--bs-primary-rgb), 0.1);
}

.kpi-red-solid .icon-box {
    background: rgba(255,255,255,0.2);
}

.kpi-value {
    font-size: 2rem;
    font-weight: 800;
    margin: 10px 0 0 0;
    letter-spacing: -0.5px;
}

.kpi-red-solid .kpi-value {
    color: var(--brand-yellow);
}

.kpi-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kpi-red-solid .kpi-title {
    color: rgba(255,255,255,0.8);
}

/* Stats Cards (Chart wrappers) */
.stat-card {
    background: white;
    border-radius: 16px;
    border: none;
    box-shadow: var(--card-shadow);
    padding: 24px;
    margin-bottom: 24px;
}

.stat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.stat-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--brand-dark);
    margin: 0;
}

/* DataTables Styling */
.table-premium {
    width: 100%;
    margin-bottom: 0;
}

.table-premium th {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    border-top: none;
    border-bottom: 2px solid #edf2f9;
    padding: 15px 10px;
}

.table-premium td {
    vertical-align: middle;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-main);
    border-bottom: 1px solid #edf2f9;
    padding: 15px 10px;
}

.table-premium tr:last-child td {
    border-bottom: none;
}

.avatar-wrapper {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    overflow: hidden;
    background: #f0f0f0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.avatar-wrapper img {
    width: 100%;
    height: auto;
}

/* Custom Select */
.filter-select {
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    padding: 10px 20px;
    font-weight: 500;
    color: var(--brand-dark);
    background-color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.filter-select:focus {
    border-color: var(--brand-red);
    box-shadow: 0 0 0 3px rgba(238, 50, 55, 0.1);
}

/* Modal styles */
.modal-content {
    border-radius: 16px;
    border: none;
    box-shadow: 0 15px 50px rgba(0,0,0,0.1);
}
.modal-header {
    border-bottom: 1px solid #edf2f9;
    padding: 20px 24px;
}
.modal-footer {
    border-top: 1px solid #edf2f9;
    padding: 20px 24px;
}
.form-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-muted);
}
