﻿/* ===================================================================
   FREYA DASHBOARD DESIGN SYSTEM V3.0
   =================================================================== */

/* --- 0. Global Reset & Box Sizing --- */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    position: relative;
    min-height: 100%;
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}


/* --- 1. Theming (Light & Dark Mode Variables) --- */
:root {
    --bg-color: #f9fafb;
    --card-bg-color: #ffffff;
    --text-color: #111827;
    --text-muted-color: #6b7280;
    --border-color: #e5e7eb;
    --primary-color: #4f46e5;
    --primary-color-light: rgba(79, 70, 229, 0.1);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

body.dark-mode {
    --bg-color: #111827;
    --card-bg-color: #1f2937;
    --text-color: #f9fafb;
    --text-muted-color: #9ca3af;
    --border-color: #374151;
    --primary-color: #6366f1;
    --primary-color-light: rgba(99, 102, 241, 0.15);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
}


/* --- 2. Typography & Base Styles --- */
body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-color);
    font-weight: 700;
}


/* --- 3. Layout & Main Containers --- */
.dashboard-container {
    padding: 1.5rem;
    max-width: 1800px;
    margin: 0 auto;
}

@media (min-width: 992px) {
    .dashboard-container {
        padding: 2.5rem;
    }
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.page-title {
    margin: 0;
    font-size: 1.8rem;
}

.page-subtitle {
    margin: 0;
    color: var(--text-muted-color);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-switcher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted-color);
}


/* --- 4. Components --- */

/* Filter Panel */
.filter-panel {
    position: fixed;
    top: 0;
    right: -380px;
    width: 380px;
    height: 100vh;
    background-color: var(--card-bg-color);
    box-shadow: var(--shadow-lg);
    z-index: 1050;
    transition: right 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
}

    .filter-panel.open {
        right: 0;
    }

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

    .filter-header h3 {
        margin: 0;
        font-size: 1.2rem;
    }

.btn-close-panel {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-muted-color);
    cursor: pointer;
}

.filter-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex-grow: 1;
}

.filter-group {
    margin-bottom: 1.5rem;
}

    .filter-group label {
        font-weight: 600;
        margin-bottom: 0.5rem;
        display: block;
    }

.filter-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-color);
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

    .overlay.visible {
        opacity: 1;
        visibility: visible;
    }

/* KPI Cards V3 */
.kpi-card-v2 {
    background-color: var(--card-bg-color);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

    .kpi-card-v2:hover {
        transform: translateY(-8px);
        box-shadow: var(--shadow-lg);
    }

.kpi-content-v2 {
    z-index: 2;
}

.kpi-label-v2 {
    color: var(--text-muted-color);
    font-size: 1rem;
    font-weight: 500;
}

.kpi-value-wrapper {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin: 0.25rem 0;
}

.kpi-value-v2 {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-color);
    line-height: 1.1;
}

.kpi-currency {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-muted-color);
}

.kpi-icon-v2 {
    position: absolute;
    right: -20px;
    bottom: -20px;
    font-size: 6rem;
    color: var(--text-color);
    opacity: 0.05;
    z-index: 1;
    transition: transform 0.4s ease-out, opacity 0.4s ease-out;
}

.kpi-card-v2:hover .kpi-icon-v2 {
    transform: scale(1.1) rotate(-10deg);
    opacity: 0.08;
}

.kpi-trend-v2 {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.9rem;
    font-weight: 600;
    z-index: 2;
}

    .kpi-trend-v2.trend-up {
        color: #10b981;
    }

    .kpi-trend-v2.trend-down {
        color: #ef4444;
    }

    .kpi-trend-v2.trend-static {
        color: var(--text-muted-color);
    }

/* Chart & Data Cards */
.chart-card, .data-table-card {
    background-color: var(--card-bg-color);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    height: 100%;
}

.chart-card {
    padding: 1.5rem;
}

    .chart-card canvas {
        max-height: 380px;
    }

    .chart-card.with-filter {
        padding-bottom: 1rem;
    }

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

    .chart-header h6 {
        margin: 0;
    }

    .chart-header .form-select-sm {
        width: 150px;
    }

.chart-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.chart-tab {
    background: none;
    border: none;
    padding: 0.5rem 1rem;
    color: var(--text-muted-color);
    border-bottom: 3px solid transparent;
    cursor: pointer;
}

    .chart-tab.active {
        color: var(--primary-color);
        border-bottom-color: var(--primary-color);
        font-weight: 600;
    }

/* Buttons & Forms */
.btn {
    border-radius: 8px;
    font-weight: 600;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

    .btn-primary:hover {
        background-color: #4338ca;
        border-color: #4338ca;
    }

.form-control, .form-select {
    background-color: var(--bg-color);
    border-color: var(--border-color);
    color: var(--text-color);
    border-radius: 8px;
}

    .form-control:focus, .form-select:focus {
        background-color: var(--card-bg-color);
        border-color: var(--primary-color);
        box-shadow: 0 0 0 0.25rem var(--primary-color-light);
        color: var(--text-color);
    }

.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%239ca3af' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}

body.dark-mode .form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}


/* Data Table */
.data-table-card .card-header {
    background-color: transparent;
    border-bottom: 1px solid var(--border-color);
}

.data-table-card table {
    width: 100%;
    border-collapse: collapse;
}

.data-table-card th, .data-table-card td {
    padding: 0.9rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.data-table-card thead th {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted-color);
    background-color: var(--bg-color);
}

.data-table-card tbody tr {
    transition: background-color 0.2s;
}

    .data-table-card tbody tr:last-child td {
        border-bottom: none;
    }

    .data-table-card tbody tr:hover {
        background-color: var(--primary-color-light);
    }


/* --- 5. Animations & Utilities --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.kpi-card-v2, .chart-card, .data-table-card {
    animation: fadeInUp 0.5s ease-out forwards;
    opacity: 0; /* Stare inițială pentru animație */
}

/* Delay animations for a staggered effect */
.row > * {
    animation-delay: calc(var(--animation-order, 0) * 80ms);
}

.col-lg-3:nth-child(1) {
    --animation-order: 1;
}

.col-lg-3:nth-child(2) {
    --animation-order: 2;
}

.col-lg-3:nth-child(3) {
    --animation-order: 3;
}

.col-lg-3:nth-child(4) {
    --animation-order: 4;
}

.col-lg-12 {
    --animation-order: 5;
}

.col-lg-4:nth-child(2) {
    --animation-order: 6;
}

.col-lg-4:nth-child(3) {
    --animation-order: 7;
}

.col-lg-4:nth-child(4) {
    --animation-order: 8;
}
/* ===================================================================
   FREYA COMMAND CENTER DESIGN V3.0 (Light & Airy)
   =================================================================== */

/* --- 1. Body & Background --- */
body {
    background-color: #f4f7fa; /* Un gri foarte deschis, curat */
    color: #1f2937;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- 2. Layout & Header --- */
.home-container-v3 {
    max-width: 1400px;
    margin: 0 auto;
    padding: 4rem 1.5rem;
}

.home-header-v3 {
    text-align: center;
    margin-bottom: 4rem;
}

    .home-header-v3 h1 {
        font-size: 3rem;
        font-weight: 800;
        color: #111827;
        letter-spacing: -1px;
    }

    .home-header-v3 p {
        font-size: 1.25rem;
        color: #6b7280;
        max-width: 600px;
        margin: 0.5rem auto 0;
    }

/* --- 3. Navigation Cards (Bento Grid Style) --- */
.nav-card-v3 {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-color: #ffffff;
    padding: 2rem;
    border-radius: 16px;
    text-decoration: none;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.03), 0 2px 4px -2px rgba(0, 0, 0, 0.03);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    height: 100%;
    position: relative;
}

    .nav-card-v3:hover {
        transform: translateY(-6px);
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.07), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    }

.nav-card-icon-v3 {
    font-size: 1.75rem;
    color: #4f46e5; /* Indigo */
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.nav-card-v3:hover .nav-card-icon-v3 {
    transform: scale(1.1);
}

.nav-card-content-v3 h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.5rem 0;
    transition: color 0.3s ease;
}

.nav-card-v3:hover h3 {
    color: #4f46e5;
}

.nav-card-content-v3 p {
    font-size: 1rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

.nav-card-arrow-v3 {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 1.2rem;
    color: #d1d5db; /* Gri deschis */
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

.nav-card-v3:hover .nav-card-arrow-v3 {
    opacity: 1;
    transform: translateX(0);
    color: #4f46e5;
}

/* Stil pentru cardurile mari din Bento Grid */
.nav-card-v3.large-card {
    padding: 2.5rem;
}

    .nav-card-v3.large-card .nav-card-icon-v3 {
        font-size: 2rem;
    }

    .nav-card-v3.large-card h3 {
        font-size: 1.5rem;
    }

    .nav-card-v3.large-card p {
        font-size: 1.1rem;
    }

/* Stil special pentru cardurile de alertă */
.nav-card-v3.alert-card .nav-card-icon-v3 {
    color: #f59e0b; /* Galben-portocaliu */
}

.nav-card-v3.alert-card:hover {
    border-color: #f59e0b;
}

    .nav-card-v3.alert-card:hover h3,
    .nav-card-v3.alert-card:hover .nav-card-arrow-v3 {
        color: #f59e0b;
    }
/ /* ===================================================================
   FREYA DASHBOARD DESIGN SYSTEM V3.0
   =================================================================== */
/* --- 0. Global Reset & Box Sizing --- */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    position: relative;
    min-height: 100%;
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

/* --- 1. Theming (Light & Dark Mode Variables) --- */
:root {
    --bg-color: #f4f7fa;
    --card-bg-color: #ffffff;
    --text-color: #111827;
    --text-muted-color: #6b7280;
    --border-color: #e5e7eb;
    --primary-color: #4f46e5;
    --primary-color-light: rgba(79, 70, 229, 0.1);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

body.dark-mode {
    --bg-color: #111827;
    --card-bg-color: #1f2937;
    --text-color: #f9fafb;
    --text-muted-color: #9ca3af;
    --border-color: #374151;
    --primary-color: #6366f1;
    --primary-color-light: rgba(99, 102, 241, 0.15);
}

/* --- 2. Typography & Base Styles --- */
body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-color);
    font-weight: 700;
}

/* --- 3. Layout Principal (Pentru Toate Paginile de Tip Dashboard) --- */
.dashboard-container, .dashboard-container-v2 {
    padding: 1.5rem;
    max-width: 1800px;
    margin: 0 auto;
}

@media (min-width: 992px) {
    .dashboard-container, .dashboard-container-v2 {
        padding: 2.5rem;
    }
}

.page-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

@media (min-width: 992px) {
    .page-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.page-title {
    margin: 0;
    font-size: 1.8rem;
}

.page-subtitle {
    margin: 0;
    color: var(--text-muted-color);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-switcher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted-color);
}

/* --- 4. Componente Comune --- */

/* Butoane & Formulare */
.btn {
    border-radius: 8px;
    font-weight: 600;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

    .btn-primary:hover {
        background-color: #4338ca;
        border-color: #4338ca;
    }

.form-control, .form-select {
    background-color: var(--bg-color);
    border-color: var(--border-color);
    color: var(--text-color);
    border-radius: 8px;
}

    .form-control:focus, .form-select:focus {
        background-color: var(--card-bg-color);
        border-color: var(--primary-color);
        box-shadow: 0 0 0 0.25rem var(--primary-color-light);
        color: var(--text-color);
    }

.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%239ca3af' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}

body.dark-mode .form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}

/* Bara de Filtrare (pentru Dashboard Analitic) */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    background-color: #ffffff;
    padding: 0.75rem;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: var(--shadow-sm);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    .filter-group label {
        margin: 0;
        font-weight: 500;
        color: #374151;
        white-space: nowrap;
    }

.filter-bar .btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    .filter-bar .btn i.fa-spin {
        animation: fa-spin 1s linear infinite;
    }

/* Panou Filtre (pentru Dashboard Vouchere) */
.filter-panel {
    position: fixed;
    top: 0;
    right: -380px;
    width: 380px;
    height: 100vh;
    background-color: var(--card-bg-color);
    box-shadow: var(--shadow-lg);
    z-index: 1050;
    transition: right 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
}

    .filter-panel.open {
        right: 0;
    }

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

    .filter-header h3 {
        margin: 0;
        font-size: 1.2rem;
    }

.btn-close-panel {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-muted-color);
    cursor: pointer;
}

.filter-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex-grow: 1;
}

.filter-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-color);
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

    .overlay.visible {
        opacity: 1;
        visibility: visible;
    }

/* Carduri KPI */
.kpi-card-v2 {
    background-color: var(--card-bg-color);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

    .kpi-card-v2:hover {
        transform: translateY(-8px);
        box-shadow: var(--shadow-lg);
    }

.kpi-content-v2 {
    z-index: 2;
}

.kpi-label-v2 {
    color: var(--text-muted-color);
    font-size: 1rem;
    font-weight: 500;
}

.kpi-value-wrapper {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin: 0.25rem 0;
}

.kpi-value-v2 {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-color);
    line-height: 1.1;
}

.kpi-currency {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-muted-color);
}

.kpi-icon-v2 {
    position: absolute;
    right: -20px;
    bottom: -20px;
    font-size: 6rem;
    color: var(--text-color);
    opacity: 0.05;
    z-index: 1;
    transition: transform 0.4s ease-out, opacity 0.4s ease-out;
}

.kpi-card-v2:hover .kpi-icon-v2 {
    transform: scale(1.1) rotate(-10deg);
    opacity: 0.08;
}

.kpi-trend-v2 {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.9rem;
    font-weight: 600;
    z-index: 2;
}

    .kpi-trend-v2.trend-up {
        color: #10b981;
    }

    .kpi-trend-v2.trend-down {
        color: #ef4444;
    }

    .kpi-trend-v2.trend-static {
        color: var(--text-muted-color);
    }

/* Carduri Grafice & Tabele */
.chart-card, .data-table-card {
    background-color: var(--card-bg-color);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    height: 100%;
    position: relative;
}

.chart-card {
    padding: 1.5rem;
}

.chart-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0 0 1.5rem 0;
    text-align: center;
}

.chart-canvas {
    position: relative;
    min-height: 400px;
    width: 100%;
}

.chart-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 350px;
    color: var(--text-muted-color);
    font-size: 1rem;
    font-weight: 500;
}

    .chart-placeholder.error {
        color: #ef4444;
    }

.chart-card.with-filter {
    padding-bottom: 1rem;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

    .chart-header h6 {
        margin: 0;
    }

    .chart-header .form-select-sm {
        width: 150px;
    }

.chart-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.chart-tab {
    background: none;
    border: none;
    padding: 0.5rem 1rem;
    color: var(--text-muted-color);
    border-bottom: 3px solid transparent;
    cursor: pointer;
}

    .chart-tab.active {
        color: var(--primary-color);
        border-bottom-color: var(--primary-color);
        font-weight: 600;
    }

/* Starea de Încărcare (Loading State) */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 16px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}

.chart-card.is-loading .loading-overlay {
    opacity: 1;
    visibility: visible;
}

.loading-overlay .spinner-border {
    width: 3rem;
    height: 3rem;
    color: var(--primary-color);
}

body.dark-mode .loading-overlay {
    background-color: rgba(31, 41, 55, 0.8);
}

/* Tabel de Date */
.data-table-card .card-header {
    background-color: transparent;
    border-bottom: 1px solid var(--border-color);
}

.data-table-card table {
    width: 100%;
    border-collapse: collapse;
}

.data-table-card th, .data-table-card td {
    padding: 0.9rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.data-table-card thead th {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted-color);
    background-color: var(--bg-color);
}

.data-table-card tbody tr {
    transition: background-color 0.2s;
}

    .data-table-card tbody tr:last-child td {
        border-bottom: none;
    }

    .data-table-card tbody tr:hover {
        background-color: var(--primary-color-light);
    }

/* --- 5. Animații --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.kpi-card-v2, .chart-card, .data-table-card {
    animation: fadeInUp 0.5s ease-out forwards;
    opacity: 0;
}

.row > * {
    animation-delay: calc(var(--animation-order, 0) * 80ms);
}

.col-lg-3:nth-child(1), .col-lg-7 {
    --animation-order: 1;
}

.col-lg-3:nth-child(2), .col-lg-5 {
    --animation-order: 2;
}

.col-lg-3:nth-child(3) {
    --animation-order: 3;
}

.col-lg-3:nth-child(4) {
    --animation-order: 4;
}