@charset "UTF-8";

/* ===================== EBITDA 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; }
.btn-outline-secondary { color: #64748b; border: 1px solid #cbd5e1 !important; background-color: transparent; }
.btn-outline-secondary:hover, .btn-outline-secondary:focus, .btn-outline-secondary:active { color: #ffffff !important; background-color: #64748b !important; border-color: #64748b !important; }
.btn-outline-success { color: #16a34a; border: 1px solid #16a34a !important; background-color: transparent; }
.btn-outline-success:hover { color: #ffffff !important; background-color: #16a34a !important; border-color: #16a34a !important; }
.btn-outline-warning { color: #d97706; border: 1px solid #f59e0b !important; background-color: transparent; }
.btn-outline-warning:hover { color: #ffffff !important; background-color: #f59e0b !important; border-color: #f59e0b !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: 5px 8px !important; vertical-align: middle; }
table.DataTable { font-size: 12px; }

/* Sidebar */
.sidebar-menu>li>a { font-size: 13px; padding: 6px 12px; display: flex; align-items: center; gap: 6px; }
.sidebar-submenu li a { font-size: 13px; padding: 4px 16px; display: block; }
.sidebar-menu>li, .sidebar-submenu li { margin-bottom: 2px; }
.sidebar-menu i { font-size: 16px; }
.sidebar-menu span { margin-left: 4px; }

/* ===================== 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: 20px; 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, .no-print { display: none !important; }
    .dashboard-main { margin-inline-start: 0 !important; }
    .dashboard-main-body { margin: 0 !important; padding: 0 !important; }
}

/* ===================== Modern Dashboard Palette ===================== */
.dashboard-modern .kpi-card {
    position: relative; min-height: 92px; overflow: hidden;
    border: none; border-radius: 10px; padding: 14px 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,
.dashboard-modern .kpi-card .text-kpi-sub { position: relative; z-index: 1; }
.dashboard-modern .kpi-card .kpi-value { font-size: 20px; font-weight: 700; color: #ffffff; line-height: 1.15; }
.dashboard-modern .kpi-card .kpi-label { font-size: 11px; color: rgba(255, 255, 255, 0.90); margin-top: 3px; font-weight: 500; }
.dashboard-modern .kpi-card .text-kpi-sub { font-size: 11px; color: rgba(255, 255, 255, 0.92); margin-top: 6px; }
.dashboard-modern .kpi-card .kpi-icon {
    position: relative; z-index: 1; width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0;
    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%); }

/* ===================== EBITDA Specific Utilities ===================== */
.font-mono-num {
    font-variant-numeric: tabular-nums;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}
.ratio-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px 16px;
}
.variance-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.20);
    color: #ffffff;
}
.liquidity-box {
    border-radius: 10px;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
}
.formula-trace-box {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    padding: 12px 16px;
}

/* ===================== 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 WIDTH ===================== */
@media (min-width: 1200px) {
    .sidebar:not(.active) { width: 15.5rem !important; }
    .dashboard-main:not(.active) { margin-inline-start: 15.5rem !important; }
    .sidebar.active:hover { width: 15.5rem !important; }
}
@media (min-width: 1400px) {
    .sidebar:not(.active) { width: 16.5rem !important; }
    .dashboard-main:not(.active) { margin-inline-start: 16.5rem !important; }
    .sidebar.active:hover { width: 16.5rem !important; }
}
@media (min-width: 1650px) {
    .sidebar:not(.active) { width: 17.5rem !important; }
    .dashboard-main:not(.active) { margin-inline-start: 17.5rem !important; }
    .sidebar.active:hover { width: 17.5rem !important; }
}

/* ===================== Select2 Custom Styling ===================== */
.select2-container--default .select2-selection--multiple,
.select2-container--default .select2-selection--single {
    border: 1px solid #dee2e6;
    border-radius: 4px;
    min-height: 32px;
    background-color: #fff;
}
.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; }
