@charset "UTF-8";

/* ===================== SIMRAT RSBA Custom CSS ===================== */

/* Body */
body { font-size: 12px; }

.d-footer {
    display: flex; justify-content: center; align-items: center;
    padding: 6px 16px; background-color: #f8f9fa;
    font-size: 12px; text-align: center;
}
.d-footer p { margin: 0; }

h6 { font-size: 17px !important; font-weight: 500; margin-top: 0px; margin-bottom: 2px; }

/* Form */
.form-label { font-size: 13px; margin-bottom: 4px; }
.form-control, .form-select { font-size: 12px !important; }
.form-control-sm:not(textarea) { font-size: 12px !important; padding: 4px 10px; height: 32px !important; border-radius: 4px; }
textarea.form-control-sm { font-size: 12px !important; padding: 4px 10px; height: auto !important; border-radius: 4px; }
.form-select-sm { font-size: 12px !important; padding: 4px 10px; height: 32px !important; border-radius: 4px; }

/* Buttons */
.btn { display: inline-block; font-weight: 500; text-align: center; text-decoration: none; border: none; cursor: pointer; transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease; }
.btn-sm { font-size: 12px !important; line-height: 1.1; border-radius: 5px; padding: 5px 12px; }
.btn-xs { font-size: 11px !important; line-height: 1; border-radius: 4px !important; padding: 3px 6px !important; }
.btn-xs i { font-size: 11px !important; vertical-align: middle; }
.btn-outline-primary { color: #1677ff; border: 1px solid #1677ff !important; background-color: transparent; }
.btn-outline-primary:hover, .btn-outline-primary:focus, .btn-outline-primary:active { color: #ffffff !important; background-color: #1677ff !important; border-color: #1677ff !important; }
.btn-outline-info { color: #0ea5e9; border: 1px solid #0ea5e9 !important; background-color: transparent; }
.btn-outline-info:hover, .btn-outline-info:focus, .btn-outline-info:active { color: #ffffff !important; background-color: #0ea5e9 !important; border-color: #0ea5e9 !important; }

/* Datepicker */
.datepicker { font-size: 12px !important; }

/* Table */
.table-sm { width: 100%; border-collapse: collapse; font-size: 12px; }
.table-sm th, .table-sm td { padding: 4px 8px !important; vertical-align: middle; }
table.DataTable { font-size: 12px; }

/* ===================== Dashboard Cards ===================== */
.dashboard-card {
    border: none; border-radius: 12px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.dashboard-card:hover {
    transform: none;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

/* ===================== KPI Cards ===================== */
.kpi-card {
    border: none; border-radius: 10px; padding: 16px;
    background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.kpi-card:hover {
    transform: none;
    box-shadow: 0 6px 20px rgba(0,0,0,0.10);
}
.kpi-card .kpi-value { font-size: 22px; font-weight: 700; color: #1e293b; }
.kpi-card .kpi-label { font-size: 12px; color: #64748b; margin-top: 4px; }
.kpi-card .kpi-icon {
    width: 42px; height: 42px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center; font-size: 20px;
}

/* ===================== Card Styling ===================== */
.card { border: none; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.card-header { background-color: #f8f9fa; border-bottom: 1px solid #e9ecef; font-weight: 600; font-size: 14px; padding: 12px 16px; border-radius: 10px 10px 0 0 !important; }
.card-body { padding: 16px; }

/* ===================== Alert ===================== */
.alert { font-size: 13px; border-radius: 8px; }

/* ===================== Badge ===================== */
.badge { font-size: 11px; font-weight: 600; padding: 4px 8px; border-radius: 4px; }
.badge-sm { font-size: 10.5px !important; font-weight: 500; padding: 4px 10px !important; border-radius: 4px; }
.badge-outline-primary { color: #1677ff !important; border: 1px solid #1677ff !important; background-color: transparent !important; font-weight: 500; text-decoration: none; border-radius: 20px !important; transition: all 0.2s ease; }
.badge-outline-primary:hover { background-color: #1677ff !important; color: #ffffff !important; }
.badge-outline-info { color: #0ea5e9 !important; border: 1px solid #0ea5e9 !important; background-color: transparent !important; font-weight: 500; text-decoration: none; border-radius: 20px !important; transition: all 0.2s ease; }
.badge-outline-info:hover { background-color: #0ea5e9 !important; color: #ffffff !important; }

/* ===================== Modal ===================== */
.modal-header { padding: 12px 16px; border-bottom: 1px solid #e9ecef; }
.modal-title { font-size: 15px; font-weight: 600; }
.modal-body { padding: 16px; font-size: 13px; }
.modal-footer { padding: 10px 16px; border-top: 1px solid #e9ecef; }

/* ===================== Progress Bar ===================== */
.progress { height: 8px; border-radius: 4px; }
.progress-bar { border-radius: 4px; transition: width 0.4s ease; }

/* ===================== Print Styles ===================== */
@media print {
    .sidebar, .navbar-header, .d-footer, .dashboard-main-body > .d-flex:first-child { display: none !important; }
    .dashboard-main-body { margin: 0 !important; padding: 0 !important; }
}

/* ===================== Modern Dashboard Palette ===================== */
.dashboard-modern .kpi-card {
    position: relative; min-height: 80px; overflow: hidden;
    border: none; border-radius: 10px; padding: 12px 16px;
    box-shadow: 0 6px 18px rgba(30, 41, 59, 0.14);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.dashboard-modern .kpi-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(30, 41, 59, 0.20); }
.dashboard-modern .kpi-card .kpi-value, .dashboard-modern .kpi-card .kpi-label { position: relative; z-index: 1; }
.dashboard-modern .kpi-card .kpi-value { font-size: 22px; font-weight: 700; color: #ffffff; line-height: 1.1; }
.dashboard-modern .kpi-card .kpi-label { font-size: 11px; color: rgba(255, 255, 255, 0.90); margin-top: 2px; font-weight: 500; }
.dashboard-modern .kpi-card .kpi-icon {
    position: relative; z-index: 1; width: 38px; height: 38px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center; font-size: 20px;
    color: #ffffff !important; background: rgba(255, 255, 255, 0.2) !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3), 0 4px 12px rgba(15, 23, 42, 0.10);
    backdrop-filter: blur(6px);
}

.dashboard-modern .kpi-gradient-blue { background: linear-gradient(135deg, #1677ff 0%, #0754c7 100%); }
.dashboard-modern .kpi-gradient-amber { background: linear-gradient(135deg, #ffad1f 0%, #ed7203 100%); }
.dashboard-modern .kpi-gradient-rose { background: linear-gradient(135deg, #f43f5e 0%, #c81e45 100%); }
.dashboard-modern .kpi-gradient-cyan { background: linear-gradient(135deg, #13b8d1 0%, #087eaa 100%); }
.dashboard-modern .kpi-gradient-emerald { background: linear-gradient(135deg, #20b77a 0%, #087c56 100%); }
.dashboard-modern .kpi-gradient-violet { background: linear-gradient(135deg, #8b5cf6 0%, #6330c7 100%); }

/* ===================== DataTables Compact ===================== */
div.dataTables_wrapper div.dataTables_paginate { font-size: 11px !important; padding-top: 4px !important; margin: 0 !important; }
div.dataTables_wrapper div.dataTables_paginate .paginate_button { padding: 3px 8px !important; font-size: 11px !important; line-height: 1.4 !important; border-radius: 4px !important; margin: 0 1px !important; }
div.dataTables_wrapper div.dataTables_info { font-size: 11px !important; padding-top: 6px !important; color: #64748b !important; }
div.dataTables_wrapper div.dataTables_length label, div.dataTables_wrapper div.dataTables_filter label { font-size: 11px !important; }
div.dataTables_wrapper div.dataTables_length select, div.dataTables_wrapper div.dataTables_filter input { font-size: 11px !important; padding: 2px 6px !important; height: auto !important; border-radius: 4px !important; }

/* ===================== Toast Notifications ===================== */
.custom-toast-container { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 99999; display: flex; flex-direction: column; gap: 10px; }
.custom-toast { min-width: 320px; max-width: 420px; padding: 14px 20px; border-radius: 8px; color: #fff; font-size: 13px; font-weight: 500; box-shadow: 0 8px 24px rgba(0,0,0,0.18); display: flex; align-items: center; gap: 10px; animation: toastSlideDown 0.4s ease-out; cursor: pointer; transition: opacity 0.3s, transform 0.3s; }
.custom-toast:hover { opacity: 0.9; }
.custom-toast.toast-success { background: linear-gradient(135deg, #22c55e, #16a34a); }
.custom-toast.toast-error { background: linear-gradient(135deg, #ef4444, #dc2626); }
.custom-toast.toast-warning { background: linear-gradient(135deg, #f59e0b, #d97706); }
.custom-toast.toast-info { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.custom-toast .toast-icon { font-size: 20px; flex-shrink: 0; }
.custom-toast .toast-msg { flex: 1; line-height: 1.4; }
.custom-toast .toast-close { font-size: 18px; cursor: pointer; opacity: 0.7; margin-left: 8px; }
.custom-toast .toast-close:hover { opacity: 1; }
@keyframes toastSlideDown { from { transform: translateY(-100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes toastSlideUp { from { transform: translateY(0); opacity: 1; } to { transform: translateY(-100%); opacity: 0; } }

/* ===================== SIDEBAR & LAYOUT (OPEN & COLLAPSED) ===================== */
.sidebar {
    background-color: #ffffff;
    border-right: 1px solid #e2e8f0;
    transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                inset-inline-start 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.03);
    z-index: 1000;
}

.dashboard-main {
    transition: margin-inline-start 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Desktop Width (Open state) */
@media (min-width: 1200px) {
    .sidebar {
        width: 13.5rem !important;
        inset-inline-start: 0 !important;
    }
    .dashboard-main {
        margin-inline-start: 13.5rem !important;
    }
    /* Collapsed Sidebar on Desktop */
    .sidebar.active {
        width: 72px !important;
    }
    .dashboard-main.active {
        margin-inline-start: 72px !important;
    }
}

@media (min-width: 1400px) {
    .sidebar {
        width: 14.5rem !important;
    }
    .dashboard-main {
        margin-inline-start: 14.5rem !important;
    }
    /* Collapsed Sidebar on Desktop */
    .sidebar.active {
        width: 72px !important;
    }
    .dashboard-main.active {
        margin-inline-start: 72px !important;
    }
}

/* Mobile Sidebar (< 1200px) */
@media (max-width: 1199.98px) {
    .sidebar {
        width: 15rem !important;
        inset-inline-start: -100% !important;
        box-shadow: 0 0 30px rgba(0, 0, 0, 0.18);
        z-index: 1050;
    }
    .sidebar.sidebar-open {
        inset-inline-start: 0 !important;
    }
    .dashboard-main {
        margin-inline-start: 0 !important;
    }
}

/* Sidebar Header & Brand */
.sidebar-header-box {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 14px 12px 8px 12px;
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.25s ease;
}

.sidebar-logo {
    display: flex !important;
    align-items: center;
    justify-content: center;
    height: auto !important;
    padding: 4px !important;
    border: none !important;
}

.sidebar-logo img.light-logo {
    max-height: 46px;
    max-width: 120px;
    object-fit: contain;
    display: inline-block;
    transition: all 0.25s ease;
}

.sidebar-logo img.logo-icon {
    display: none;
    max-height: 36px;
    max-width: 44px;
    object-fit: contain;
}

.sidebar-brand-text {
    transition: opacity 0.2s ease;
}

/* Collapsed Header (.sidebar.active) */
.sidebar.active .sidebar-header-box {
    padding: 12px 4px 10px 4px !important;
}

.sidebar.active .sidebar-logo img.light-logo {
    display: none !important;
}

.sidebar.active .sidebar-logo img.logo-icon {
    display: block !important;
    margin: 0 auto !important;
}

.sidebar.active .sidebar-brand-text {
    display: none !important;
}

/* Sidebar Menu Area & Items */
.sidebar-menu-area {
    padding: 12px 10px;
    height: calc(100vh - 110px);
    overflow-y: auto;
    overflow-x: hidden;
    border-inline-end: none !important;
}

.sidebar-menu > li {
    margin-bottom: 3px;
}

.sidebar-menu > li > a {
    font-size: 12.5px;
    font-weight: 500;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #475569;
    border-radius: 8px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.sidebar-menu > li > a .menu-icon,
.sidebar-menu > li > a iconify-icon {
    font-size: 18px;
    min-width: 18px;
    color: #64748b;
    transition: color 0.2s ease;
}

.sidebar-menu > li > a:hover {
    background-color: #f1f5f9;
    color: #1677ff;
}

.sidebar-menu > li > a:hover .menu-icon,
.sidebar-menu > li > a:hover iconify-icon {
    color: #1677ff;
}

.sidebar-menu > li > a.active-page,
.sidebar-menu > li.dropdown.open > a,
.sidebar-menu > li.dropdown.dropdown-open > a {
    background-color: #1677ff !important;
    color: #ffffff !important;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(22, 119, 255, 0.25);
}

.sidebar-menu > li > a.active-page .menu-icon,
.sidebar-menu > li > a.active-page iconify-icon,
.sidebar-menu > li.dropdown.open > a .menu-icon,
.sidebar-menu > li.dropdown.open > a iconify-icon {
    color: #ffffff !important;
}

.sidebar-submenu {
    padding: 4px 0 4px 28px !important;
}

.sidebar-submenu li a {
    font-size: 12px;
    padding: 5px 12px;
    color: #64748b;
    border-radius: 6px;
    display: block;
    transition: all 0.2s ease;
}

.sidebar-submenu li a:hover {
    color: #1677ff;
    background-color: #f8fafc;
}

.sidebar-submenu li.active-page a {
    color: #1677ff !important;
    font-weight: 600;
    background-color: #e6f4ff !important;
}

/* --- COLLAPSED MENU ITEMS (.sidebar.active) --- */
.sidebar.active .sidebar-menu-area {
    padding: 10px 4px !important;
    overflow-x: hidden !important;
}

.sidebar.active .sidebar-menu {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
}

.sidebar.active .sidebar-menu > li {
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    margin-bottom: 6px !important;
}

.sidebar.active .sidebar-menu > li > a {
    width: 44px !important;
    height: 44px !important;
    padding: 0 !important;
    margin: 0 auto !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    border-radius: 10px !important;
    text-align: center !important;
    gap: 0 !important;
}

.sidebar.active .sidebar-menu > li > a .menu-icon,
.sidebar.active .sidebar-menu > li > a iconify-icon,
.sidebar.active .sidebar-menu > li > a i {
    font-size: 21px !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.sidebar.active .sidebar-menu > li > a span {
    display: none !important;
}

.sidebar.active .sidebar-menu > li.dropdown > a::after {
    display: none !important;
}

.sidebar.active .sidebar-menu .sidebar-submenu {
    display: none !important;
}

.sidebar.active .sidebar-menu-group-title {
    display: none !important;
}

.sidebar.active .sidebar-menu > li > a.active-page,
.sidebar.active .sidebar-menu > li.dropdown.open > a,
.sidebar.active .sidebar-menu > li.dropdown.dropdown-open > a {
    background-color: #1677ff !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(22, 119, 255, 0.35) !important;
}

.sidebar.active .sidebar-menu > li > a:hover:not(.active-page) {
    background-color: #f1f5f9 !important;
    color: #1677ff !important;
}

/* Navbar Toggle Button Styling */
.navbar-header {
    background-color: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    transition: all 0.25s ease;
}

.sidebar-toggle {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background-color: #ffffff;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #475569;
    padding: 0;
}

.sidebar-toggle:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
    color: #1677ff;
}

.sidebar-toggle .icon {
    font-size: 18px !important;
    line-height: 1;
}

/* ===================== Login Page ===================== */
.login-wrapper {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #1677ff 0%, #0754c7 60%, #0a1929 100%);
}
.login-card {
    width: 420px; max-width: 95vw; border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25); background: #fff; padding: 40px 36px;
}
.login-logo { width: 70px; height: 70px; }

/* ===================== Select2 Custom Styling ===================== */
.select2-container--default .select2-selection--multiple {
    border: 1px solid #dee2e6;
    border-radius: 4px;
    min-height: 32px;
    padding: 2px 4px;
    background-color: #fff;
}
.select2-container--default.select2-container--focus .select2-selection--multiple {
    border-color: #1677ff;
    box-shadow: 0 0 0 0.2rem rgba(22, 119, 255, 0.15);
}
.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: #e6f4ff;
    border: 1px solid #91caef;
    color: #0958d9;
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 11px;
    font-weight: 500;
    margin-top: 3px;
    margin-right: 4px;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: #0958d9;
    margin-right: 4px;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: #ff4d4f;
}
.select2-container {
    width: 100% !important;
}
.select2-dropdown {
    z-index: 99999 !important;
    border-color: #dee2e6;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    font-size: 12px;
}
.select2-results__option {
    padding: 5px 10px;
    font-size: 12px;
}

