/* ==========================================================================
   Statistic Owner Dashboard Modern Stylesheet
   ========================================================================== */

:root {
    --stat-primary: #2563eb;
    --stat-primary-hover: #1d4ed8;
    --stat-success: #10b981;
    --stat-warning: #f59e0b;
    --stat-danger: #ef4444;
    --stat-info: #3b82f6;
    --stat-bg-surface: #ffffff;
    --stat-bg-subtle: #f8fafc;
    --stat-text-main: #0f172a;
    --stat-text-muted: #64748b;
    --stat-border: #e2e8f0;
    --stat-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    --stat-radius: 12px;
}

.stat-owner-wrapper {
    padding-top: 15px;
    padding-bottom: 30px;
}

/* Header & Banner */
.stat-header-banner {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #ffffff;
    padding: 22px 25px;
    border-radius: var(--stat-radius);
    margin-bottom: 20px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.stat-header-banner h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.stat-header-banner p {
    margin: 6px 0 0 0;
    color: #94a3b8;
    font-size: 14px;
}

.stat-fiscal-badge {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 500;
    color: #38bdf8;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Filter Panel */
.stat-filter-panel {
    background: var(--stat-bg-surface);
    border-radius: var(--stat-radius);
    padding: 18px 20px;
    margin-bottom: 20px;
    box-shadow: var(--stat-shadow);
    border: 1px solid var(--stat-border);
}

.stat-filter-header {
    font-size: 14px;
    font-weight: 600;
    color: var(--stat-text-muted);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
}

.stat-form-control {
    height: 42px;
    border-radius: 8px;
    border: 1px solid var(--stat-border);
    padding: 0 14px;
    font-size: 14px;
    color: var(--stat-text-main);
    background-color: var(--stat-bg-subtle);
    width: 100%;
}

.stat-form-control:focus {
    border-color: var(--stat-primary);
    background-color: #ffffff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.btn-stat-submit {
    height: 42px;
    padding: 0 22px;
    background: linear-gradient(135deg, var(--stat-primary), var(--stat-primary-hover));
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-stat-submit:hover {
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
    color: #ffffff;
}

/* KPI Cards */
.stat-kpi-box {
    background: var(--stat-bg-surface);
    border-radius: var(--stat-radius);
    padding: 18px 20px;
    margin-bottom: 20px;
    box-shadow: var(--stat-shadow);
    border: 1px solid var(--stat-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: transform 0.2s ease;
}

.stat-kpi-box:hover {
    transform: translateY(-2px);
}

.stat-kpi-details h4 {
    margin: 0 0 4px 0;
    font-size: 13px;
    font-weight: 500;
    color: var(--stat-text-muted);
}

.stat-kpi-details .kpi-num {
    font-size: 26px;
    font-weight: 700;
    color: var(--stat-text-main);
    line-height: 1.2;
}

.stat-kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.stat-kpi-icon.blue { background: rgba(37, 99, 235, 0.1); color: var(--stat-primary); }
.stat-kpi-icon.amber { background: rgba(245, 158, 11, 0.1); color: var(--stat-warning); }
.stat-kpi-icon.emerald { background: rgba(16, 185, 129, 0.1); color: var(--stat-success); }
.stat-kpi-icon.purple { background: rgba(139, 92, 246, 0.1); color: #8b5cf6; }

/* Chart Containers with Fixed Pixel Heights to Prevent Chart.js Resizing Loops */
.stat-card-panel {
    background: var(--stat-bg-surface);
    border-radius: var(--stat-radius);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--stat-shadow);
    border: 1px solid var(--stat-border);
}

.stat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--stat-border);
}

.stat-card-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--stat-text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.chart-wrapper-trend {
    position: relative;
    height: 280px;
    width: 100%;
}

.chart-wrapper-pie {
    position: relative;
    height: 260px;
    width: 100%;
}

.chart-wrapper-horizontal {
    position: relative;
    height: 280px;
    width: 100%;
}

.stat-card-footer {
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px dashed var(--stat-border);
    font-size: 12px;
    color: var(--stat-text-muted);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Active Filter Status Bar & Chips */
.active-filter-panel {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #cbd5e1;
    border-left: 4px solid #2563eb;
    border-radius: var(--stat-radius);
    padding: 14px 18px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.active-filter-title {
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.active-filter-chips {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

.chip-blue {
    background-color: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.chip-indigo {
    background-color: #e0e7ff;
    color: #4338ca;
    border: 1px solid #c7d2fe;
}

.chip-emerald {
    background-color: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.btn-filter-reset {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    padding: 5px 12px;
    border-radius: 20px;
    transition: all 0.2s ease;
    text-decoration: none !important;
}

.btn-filter-reset:hover {
    background: #ef4444;
    color: #ffffff;
    border-color: #ef4444;
}

/* Select2 Multi-Select Styling */
.select2-container--default .select2-selection--multiple {
    border-radius: 8px !important;
    border: 1px solid #cbd5e1 !important;
    min-height: 42px !important;
    padding: 4px 6px !important;
}
.select2-container--default.select2-container--focus .select2-selection--multiple {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1) !important;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: #eff6ff !important;
    border: 1px solid #bfdbfe !important;
    color: #1d4ed8 !important;
    border-radius: 6px !important;
    padding: 3px 8px !important;
    font-weight: 600 !important;
    font-size: 12px !important;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: #1d4ed8 !important;
    margin-right: 5px !important;
}

/* Explanatory Status Note Panel */
.status-explain-panel {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-left: 4px solid #2563eb;
    border-radius: var(--stat-radius, 12px);
    padding: 16px 20px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    font-size: 13px;
    color: #334155;
    line-height: 1.6;
}

.status-explain-title {
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.status-explain-list {
    margin: 0;
    padding-left: 20px;
    color: #475569;
}

.status-explain-list li {
    margin-bottom: 5px;
}

.status-explain-list ul {
    margin-top: 4px;
    margin-bottom: 4px;
    padding-left: 18px;
}

