/* ==========================================
   GLOBAL
   ========================================== */
html, body {
    background-color: #494b4f;
    background-image: radial-gradient(at 47% 33%, hsl(162.42, 2%, 60%) 0, transparent 59%), radial-gradient(at 82% 65%, hsl(218.00, 39%, 11%) 0, transparent 55%);
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    position: relative;
}

/* Forțează toate elementele mari, imaginile și cardurile să nu iasă din ecran */
/*.card, .table-responsive, main, div {
    max-width: 100%;
}
.card-body {
    max-width: 100%;
}*/
/* 1. Fortam bara de navigare de sus si dropdown-ul sa aiba prioritate absoluta de straturi */
.navbar,
.main-header,
.nav-item.dropdown,
.dropdown-menu {
    z-index: 1050 !important; /* Valoare mai mare decat efectele de glassmorphism */
}

/* 2. Ne asiguram ca dropdown-ul se deschide peste orice element din pagina */
.dropdown-menu-right,
.dropdown-menu {
    position: absolute !important;
    z-index: 1100 !important;
}

/* 3. Corectie pentru cardurile/containerele din pagina care folosesc pseudo-elemente */
.location-card, .card, .card-graph-transparent {
    /* Folosim un z-index mic pe elementele din corp ca sa nu poata acoperi header-ul site-ului */
    z-index: 1;
}
/* Fortam sidebar-ul sa stea deasupra oricarui card sau element din pagina */
#sidebar, .sidebar, .wrapper .sidebar-wrapper {
    z-index: 1050 !important; /* Valoare standard de Bootstrap pentru elemente fixe/overlayers */
}

/* Daca sidebar-ul are un fundal semi-transparent (backdrop) pe mobil, asigura-te ca si acesta este sus */
.sidebar-overlay {
    z-index: 1040 !important;
}

/* Cardul tau ramane dedesubt ca functionalitate, dar isi pastreaza designul superb */
.card {
    z-index: 1 !important;
}

/* Cand un card contine un dropdown activ/deschis, il ridicam deasupra cardurilor urmatoare */
.card:has(.dropdown-menu.show),
.card.is-dropdown-open {
    z-index: 1030 !important;
}
/*html {
    font-size: 14px;
    min-height: 100%;
}

@media (min-width:768px) {
    html {
        font-size:16px;
    }
}
body {
    background-color: #494b4f;
    background-image: radial-gradient(at 47% 33%, hsl(162.42, 2%, 60%) 0, transparent 59%), radial-gradient(at 82% 65%, hsl(218.00, 39%, 11%) 0, transparent 55%);
}*/
/*body {
    background: #1f2229;*/  /* Dark Platinum */
    /*color: #ffffff;
    
}*/


/* ==========================================
   CERCURI LUMINOASE DIN FUNDAL
   ========================================== */

/*body::before {
    content: "";
    position: fixed;

    width: 520px;
    height: 520px;

    top: 40px;
    right: 80px;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(255,255,255,.45) 0%,
            rgba(255,255,255,.18) 45%,
            transparent 75%
        );

    filter: blur(35px);

    pointer-events: none;
    z-index: -1;
}

body::after {
    content: "";
    position: fixed;

    width: 220px;
    height: 220px;

    left: 40px;
    bottom: 80px;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(255,255,255,.35) 0%,
            transparent 70%
        );

    filter: blur(25px);

    pointer-events: none;
    z-index: -1;
}*/

/* ==========================================
   GLASSMORPHISM PREMIUM
   ========================================== */
/* ==========================================
   CARD PREMIUM DARK METALIC
   ========================================== */

/*.location-card,
.card,
.card-graph-transparent {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255,255,255,.15);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    padding: 22px;
    transition: all .25s ease;*/
    /* From https://css.glass */
   /* background: rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);*/
    /*backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}*/

    /* Reflexie glossy */
    /*.location-card::before,
    .card::before,
    .card-graph-transparent::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 40%;
        background: linear-gradient(180deg, rgba(255,255,255,.18), transparent);
        pointer-events: none;
    }*/

    /* Glow difuz */
    /*.location-card::after,
    .card::after,
    .card-graph-transparent::after {
        content: "";
        position: absolute;
        width: 180%;
        height: 180%;
        top: -40%;
        left: -40%;
        background: radial-gradient(circle, rgba(255,255,255,.08), transparent 70%);
        transform: rotate(25deg);
        pointer-events: none;
    }*/


    /* ==========================================
   TEXTE METALICE
   ========================================== */

    /*.card-title,
    .valoare-incasari,
    .location-card h5,
    .location-card p {
        color: #e5e5e5 !important;
        letter-spacing: 1px;
        text-shadow: 0 1px 2px rgba(0,0,0,.6);
    }

.valoare-incasari {
    font-size: 2.2rem;
    font-weight: 700;
}*/

/* ==========================================
   BUTON DETALII – stil card bancar
   ========================================== */

/*.btn-details-custom {
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.15);
    color: #ffc107;
    border-radius: 10px;
    padding: 6px 14px;
    transition: all .25s ease;
}

    .btn-details-custom:hover {
        background: #ffc107;
        color: #111;
        border-color: #ffc107;
    }





.valoare-incasari {
    font-size: 2.3rem;
    font-weight: 800;
    letter-spacing: 1px;
}*/

/* ==========================================
   BUTOANE
   ========================================== */

/*.btn-details-custom {

    background: rgba(255,255,255,.06);

    border: 1px solid rgba(255,255,255,.12);

    color: #ffc107;

    border-radius: 10px;

    transition: all .25s ease;
}

.btn-details-custom:hover {

    background: #ffc107;

    color: #111;

    border-color: #ffc107;
}*/

/* ==========================================
   BOOTSTRAP OVERRIDES
   ========================================== */

/*.bg-white {
    background: transparent !important;
}

.btn-light,
.btn-outline-secondary {

    background: rgba(255,255,255,.05) !important;

    border-color: rgba(255,255,255,.12) !important;

    color: white !important;
}

.btn-light:hover,
.btn-outline-secondary:hover {

    background: rgba(255,255,255,.12) !important;

    border-color: #ffc107 !important;

    color: #ffc107 !important;
}*/

/* =========================================================================
   GLOBAL HIGH-CONTRAST TYPOGRAPHY & DARK MODE ACCESSIBILITY
   ========================================================================= */
.text-muted, 
.text-secondary {
    color: #94a3b8 !important; /* Crisp slate-400 for high legibility on dark backgrounds */
}

.text-white-50 {
    color: rgba(248, 250, 252, 0.75) !important;
}

/* Table readability */
.table-dark {
    --bs-table-bg: transparent;
    --bs-table-color: #f8fafc;
    --bs-table-hover-bg: rgba(255, 255, 255, 0.04);
}

.table-dark th {
    color: #cbd5e1 !important;
    font-weight: 600;
}

.table-dark td {
    color: #f1f5f9 !important;
}

/* Form controls contrast in dark themes */
.form-control.bg-dark,
.form-select.bg-dark {
    background-color: rgba(15, 23, 42, 0.8) !important;
    color: #f8fafc !important;
    border-color: rgba(255, 255, 255, 0.18) !important;
}

.form-control.bg-dark::placeholder {
    color: #64748b !important;
}

.form-control.bg-dark:focus,
.form-select.bg-dark:focus {
    border-color: #fbbf24 !important;
    box-shadow: 0 0 0 0.2rem rgba(251, 191, 36, 0.25) !important;
}

/* Dropdown menus dark glass high contrast */
.dropdown-menu {
    background: rgba(15, 23, 42, 0.97) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6) !important;
}

.dropdown-item {
    color: #f1f5f9 !important;
}

.dropdown-item:hover, .dropdown-item:focus {
    background-color: rgba(255, 193, 7, 0.15) !important;
    color: #fbbf24 !important;
}


/* =========================================================================
   LIGHT THEME MODE (Comutare Dinamica)
   ========================================================================= */
html[data-bs-theme="light"],
html.theme-light {
    --bs-body-bg: #f8fafc;
    --bs-body-color: #0f172a;
}

html[data-bs-theme="light"] body,
html.theme-light body {
    background-color: #f1f5f9 !important;
    background-image: radial-gradient(at 47% 33%, rgba(203, 213, 225, 0.4) 0, transparent 59%), radial-gradient(at 82% 65%, rgba(226, 232, 240, 0.5) 0, transparent 55%) !important;
    color: #0f172a !important;
}

html[data-bs-theme="light"] .main-content,
html.theme-light .main-content {
    background: transparent !important;
    color: #0f172a !important;
}

html[data-bs-theme="light"] .sidebar,
html.theme-light .sidebar {
    background: rgba(255, 255, 255, 0.96) !important;
    border-right: 1px solid #e2e8f0 !important;
    color: #0f172a !important;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.05) !important;
}

html[data-bs-theme="light"] .sidebar .nav-link,
html.theme-light .sidebar .nav-link {
    color: #475569 !important;
}

html[data-bs-theme="light"] .sidebar .nav-link:hover,
html.theme-light .sidebar .nav-link:hover {
    background-color: #f1f5f9 !important;
    color: #0284c7 !important;
}

html[data-bs-theme="light"] .sidebar .nav-link.active,
html.theme-light .sidebar .nav-link.active {
    background-color: #e0f2fe !important;
    color: #0284c7 !important;
    border-color: #bae6fd !important;
}

html[data-bs-theme="light"] .navbar-custom,
html.theme-light .navbar-custom {
    background: rgba(255, 255, 255, 0.95) !important;
    border-bottom: 1px solid #e2e8f0 !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04) !important;
}

html[data-bs-theme="light"] .navbar-custom .navbar-brand,
html[data-bs-theme="light"] .navbar-custom .nav-link,
html.theme-light .navbar-custom .navbar-brand,
html.theme-light .navbar-custom .nav-link {
    color: #0f172a !important;
}

/* Carduri in Mod Luminos */
html[data-bs-theme="light"] .device-modern-card,
html.theme-light .device-modern-card,
html[data-bs-theme="light"] .card:not(.bg-primary):not(.bg-success):not(.bg-warning):not(.bg-danger),
html.theme-light .card:not(.bg-primary):not(.bg-success):not(.bg-warning):not(.bg-danger) {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-top: 1px solid #cbd5e1 !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05), inset 0 1px 0 rgba(255, 255, 255, 1) !important;
    color: #0f172a !important;
}

html[data-bs-theme="light"] .device-modern-card::before,
html.theme-light .device-modern-card::before {
    display: none !important;
}

html[data-bs-theme="light"] .device-modern-card h1,
html[data-bs-theme="light"] .device-modern-card h2,
html[data-bs-theme="light"] .device-modern-card h3,
html[data-bs-theme="light"] .device-modern-card h4,
html[data-bs-theme="light"] .device-modern-card h5,
html[data-bs-theme="light"] .device-modern-card h6,
html.theme-light .device-modern-card h1,
html.theme-light .device-modern-card h2,
html.theme-light .device-modern-card h3,
html.theme-light .device-modern-card h4,
html.theme-light .device-modern-card h5,
html.theme-light .device-modern-card h6 {
    color: #0f172a !important;
    text-shadow: none !important;
}

html[data-bs-theme="light"] .txt-locatie-total,
html.theme-light .txt-locatie-total,
html[data-bs-theme="light"] #txtTotalIncasari,
html.theme-light #txtTotalIncasari {
    color: #0f172a !important;
    text-shadow: none !important;
}

html[data-bs-theme="light"] .glass-tag-badge,
html.theme-light .glass-tag-badge {
    background: #f1f5f9 !important;
    color: #334155 !important;
    border-color: #cbd5e1 !important;
}

html[data-bs-theme="light"] .text-white-50,
html.theme-light .text-white-50 {
    color: #64748b !important;
}

html[data-bs-theme="light"] .text-secondary,
html[data-bs-theme="light"] .text-muted,
html.theme-light .text-secondary,
html.theme-light .text-muted {
    color: #64748b !important;
}

html[data-bs-theme="light"] .text-white,
html.theme-light .text-white {
    color: #0f172a !important;
}

html[data-bs-theme="light"] .text-light,
html.theme-light .text-light {
    color: #1e293b !important;
}

/* Tabele in Mod Luminos */
html[data-bs-theme="light"] .table-dark,
html.theme-light .table-dark {
    --bs-table-bg: #ffffff;
    --bs-table-color: #0f172a;
    --bs-table-hover-bg: #f8fafc;
    color: #0f172a !important;
    background-color: #ffffff !important;
}

html[data-bs-theme="light"] .table-dark th,
html.theme-light .table-dark th {
    background-color: #f8fafc !important;
    color: #475569 !important;
    border-bottom: 2px solid #e2e8f0 !important;
}

html[data-bs-theme="light"] .table-dark td,
html.theme-light .table-dark td {
    color: #1e293b !important;
    border-bottom: 1px solid #f1f5f9 !important;
}

/* Meniuri dropdown in Mod Luminos */
html[data-bs-theme="light"] .dropdown-menu,
html.theme-light .dropdown-menu {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
}

html[data-bs-theme="light"] .dropdown-item,
html.theme-light .dropdown-item {
    color: #1e293b !important;
}

html[data-bs-theme="light"] .dropdown-item:hover,
html.theme-light .dropdown-item:hover {
    background-color: #f1f5f9 !important;
    color: #0284c7 !important;
}

/* Megamenu in Mod Luminos */
html[data-bs-theme="light"] .megamenu-container,
html.theme-light .megamenu-container {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12) !important;
}

html[data-bs-theme="light"] .megamenu-link,
html.theme-light .megamenu-link {
    color: #1e293b !important;
}

html[data-bs-theme="light"] .megamenu-link:hover,
html.theme-light .megamenu-link:hover {
    background-color: #f8fafc !important;
    color: #0284c7 !important;
}
