/* =========================================================
   LAMAXI — App CSS
   Bootstrap 5 + Bootstrap Icons base
   ========================================================= */

/* ─── F8: Design tokens ──────────────────────────────── */
:root {
    /* Brand colors */
    --color-primary:   #0d6efd;
    --color-success:   #198754;
    --color-warning:   #fd7e14;
    --color-danger:    #dc3545;
    --color-secondary: #6c757d;

    /* Layout */
    --sidebar-width: 240px;
    --sidebar-collapsed-width: 64px;
    --navbar-height: 56px;

    /* Border radius scale */
    --radius-sm:   .375rem;
    --radius-md:   .5rem;
    --radius-lg:   .875rem;
    --radius-xl:   1rem;
    --radius-pill: 50rem;

    /* Shadows */
    --shadow-sm: 0 .125rem .25rem rgba(0,0,0,.075);
    --shadow-md: 0 .5rem 1rem rgba(0,0,0,.1);
}

/* ─── F8: Btn border-radius unificat ─────────────────── */
.btn, .btn-sm { border-radius: var(--radius-md); }

/* ─── F8: Container classes (înlocuiesc inline max-width) */
.content-narrow    { max-width: 800px; margin-inline: auto; }
.content-narrow-sm { max-width: 760px; margin-inline: auto; }

/* ─── Fonturi ─────────────────────────────────────────── */
body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-size: .925rem;
    background-color: #f8f9fa;
    color: #212529;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1 0 auto;
}

/* ─── Navbar ─────────────────────────────────────────── */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1020;
}

.navbar-logo {
    height: 36px;
    width: auto;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.1rem;
}

.navbar .nav-link {
    font-weight: 500;
    font-size: .9rem;
}

.navbar .nav-link.active {
    color: rgba(0,0,0,.9);
    border-bottom: 2px solid var(--bs-primary);
}

/* ─── Sidebar Admin ──────────────────────────────────── */
.sidebar {
    width: 240px;
    min-height: 100vh;
    flex-shrink: 0;
    transition: width .2s ease;
}

.sidebar-section {
    font-size: .7rem;
    letter-spacing: .08em;
}

.sidebar .nav-link {
    padding: .45rem .75rem;
    font-size: .875rem;
    transition: background .15s;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    background: rgba(255,255,255,.12);
}

.sidebar .sidebar-footer-link:hover {
    background: rgba(255,255,255,.08);
    opacity: 1 !important;
}

.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-content {
    flex: 1;
    min-width: 0; /* flex items default la min-width:auto — fără asta, conținutu lat (settings grid, textarea JSON) împinge flex item peste viewport */
    overflow-x: clip; /* clip ≠ hidden: nu creează scroll container, deci position:sticky funcționează */
}

/* Stare colapsată sidebar — doar iconițe */
.sidebar-collapsed .sidebar {
    width: var(--sidebar-collapsed-width);
    overflow: hidden;
}
.sidebar-collapsed .sidebar span,
.sidebar-collapsed .sidebar .sidebar-section,
.sidebar-collapsed .sidebar .badge {
    display: none;
}
.sidebar-collapsed .sidebar .nav-link {
    justify-content: center;
    padding: .5rem;
}
.sidebar-collapsed .sidebar-brand-text {
    display: none;
}
.sidebar-collapsed #sidebarToggleBtn i {
    transform: scaleX(-1);
}
/* Footer sidebar colapsat */
.sidebar-collapsed .sidebar .p-3.border-top small {
    display: none;
}
.sidebar-collapsed .sidebar .p-3.border-top .nav-link {
    justify-content: center;
    padding: .5rem;
}

/* Mobile: resetează colapsul — offcanvas gestionează */
@media (max-width: 767.98px) {
    /* Sidebar offcanvas: make nav list scrollable so all items are reachable */
    #adminSidebar {
        display: flex !important;
        flex-direction: column;
    }
    #adminSidebar > ul.nav {
        flex: 1 1 0;
        min-height: 0;       /* allows flex child to shrink below content size */
        flex-wrap: nowrap;   /* Bootstrap .nav are flex-wrap:wrap; nowrap previne coloane multiple */
        overflow-y: auto;
        overflow-x: hidden;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }

    .sidebar-collapsed .sidebar {
        width: 240px;
        overflow: visible;
    }
    .sidebar-collapsed .sidebar span,
    .sidebar-collapsed .sidebar .sidebar-section,
    .sidebar-collapsed .sidebar .badge {
        display: revert;
    }
    .sidebar-collapsed .sidebar .nav-link {
        justify-content: flex-start;
        padding: .45rem .75rem;
    }
    .sidebar-collapsed .sidebar-brand-text {
        display: revert;
    }
}

/* ─── Cards ─────────────────────────────────────────── */
.card {
    border-radius: .75rem;
    transition: box-shadow .2s;
}

.product-card:hover {
    box-shadow: 0 .25rem 1rem rgba(0,0,0,.1) !important;
}

/* Panoul user nu trebuie să aibă efect hover (nu e clickabil) */
.user-panel.card:hover {
    box-shadow: 0 .125rem .25rem rgba(0,0,0,.075) !important;
}

.product-card .card-img-top {
    transition: transform .2s;
}

.product-card:hover .card-img-top {
    transform: scale(1.03);
}

/* ─── Produse: imagine ───────────────────────────────── */
.product-card .ratio {
    border-radius: .75rem .75rem 0 0;
}

.product-card img.object-fit-contain {
    object-fit: contain;
}

/* ─── Forms ─────────────────────────────────────────── */
.form-label {
    font-weight: 500;
    font-size: .875rem;
}

.form-control:focus,
.form-select:focus {
    box-shadow: 0 0 0 .2rem rgba(13,110,253,.2);
}

/* ─── Tabele ─────────────────────────────────────────── */
.col-img { width: 60px; }
.table th {
    font-weight: 600;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #6c757d;
    border-top: none;
}

/* ─── Butoane ────────────────────────────────────────── */
.btn {
    font-weight: 500;
    border-radius: .5rem;
}

.btn-sm {
    border-radius: .4rem;
}

/* ─── Badge-uri status produs ────────────────────────── */
.badge-draft     { background-color: #6c757d; }
.badge-pending   { background-color: #fd7e14; }
.badge-published { background-color: #198754; }
.badge-rejected  { background-color: #dc3545; }

/* ─── Flash messages ─────────────────────────────────── */
.alert {
    border-radius: .6rem;
}

/* ─── Footer ─────────────────────────────────────────── */
footer {
    font-size: .85rem;
}

/* ─── Weather Card (Feature Set 1) ──────────────────── */
.weather-card {
    border-top: 3px solid #0ea5e9;
    background: linear-gradient(135deg, var(--bs-body-bg) 0%, rgba(14,165,233,.06) 100%);
}
[data-bs-theme="dark"] .weather-card {
    background: linear-gradient(135deg, var(--bs-body-bg) 0%, rgba(14,165,233,.1) 100%);
}
.weather-icon {
    font-size: 2.8rem;
    color: #0ea5e9;
    line-height: 1;
}
.weather-temp {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--bs-body-color);
    line-height: 1.1;
}
.weather-condition {
    font-size: .85rem;
    color: var(--bs-secondary-color);
}
.weather-location {
    font-size: .8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #0ea5e9;
}
.weather-meta {
    font-size: .78rem;
    color: var(--bs-secondary-color);
    gap: .6rem;
}
.weather-date-time {
    font-size: .82rem;
    color: var(--bs-secondary-color);
}

/* ─── Page header — merged, see line 532 ─────────────── */

/* ─── Avatar ─────────────────────────────────────────── */
.avatar-sm  { width: 32px;  height: 32px;  object-fit: cover; border-radius: 50%; }
.avatar-sm.avatar-product { object-fit: contain; background: #fff; border: 1px solid #dee2e6; border-radius: var(--radius-md); }
.avatar-md  { width: 48px;  height: 48px;  object-fit: cover; border-radius: 50%; }
.avatar-lg  { width: 80px;  height: 80px;  object-fit: cover; border-radius: 50%; }
.avatar-xl  { width: 120px; height: 120px; object-fit: cover; border-radius: 50%; }

/* ─── KPI cards — filled gradient ────────────────────── */
.kpi-card {
    border-radius: .875rem;
    border: none !important;
}

.kpi-card.kpi-primary { background: linear-gradient(135deg, #0d6efd 0%, #0257d5 100%); }
.kpi-card.kpi-success { background: linear-gradient(135deg, #198754 0%, #0f6640 100%); }
.kpi-card.kpi-warning { background: linear-gradient(135deg, #e67e00 0%, #c96900 100%); }
.kpi-card.kpi-danger  { background: linear-gradient(135deg, #dc3545 0%, #b02a37 100%); }
.kpi-card.kpi-info    { background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%); }
.kpi-card.kpi-orange  { background: linear-gradient(135deg, #fd7e14 0%, #dc6202 100%); }

/* Valoare și label — albe pe toate cardurile */
.kpi-card .kpi-value { font-size: 2.1rem; font-weight: 700; line-height: 1; color: #fff; }
.kpi-card .kpi-label { font-size: .8rem; font-weight: 500; margin-top: .25rem; color: rgba(255,255,255,.82); }

/* KPI delta — comparație vs perioadă anterioară / ieri */
.kpi-delta            { font-size: .72rem; margin-top: .3rem; color: rgba(255,255,255,.72); line-height: 1.3; }
.kpi-delta .delta-up  { color: rgba(255,255,255,.96); font-weight: 600; }
.kpi-delta .delta-down{ color: rgba(255,255,255,.96); font-weight: 600; }

/* KPI icon box — semi-transparent pe fundal colorat */
.kpi-icon {
    width: 52px;
    height: 52px;
    border-radius: .75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
    background: rgba(255,255,255,.22);
    color: #fff;
}

/* ─── Note colorate ──────────────────────────────────── */
.note-yellow { background-color: #fff3c4; border-left: 4px solid #e6a800; }
.note-green  { background-color: #c8e6c9; border-left: 4px solid #388e3c; }
.note-blue   { background-color: #bbdefb; border-left: 4px solid #1565c0; }
.note-red    { background-color: #ffcdd2; border-left: 4px solid #c62828; }
.note-gray   { background-color: #e0e0e0; border-left: 4px solid #757575; }

/* ─── Auth pages ─────────────────────────────────────── */
.auth-brand-icon {
    font-size: 2.5rem;
    display: block;
}

/* Auth 2-panel card layout */
.auth-panel-brand {
    background: linear-gradient(160deg, #1a56db 0%, #0d6efd 55%, #0a58ca 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 2rem;
    text-align: center;
}
.auth-panel-brand .auth-brand-icon-lg {
    font-size: 3.75rem;
    margin-bottom: 1.25rem;
    opacity: .92;
    display: block;
}
.auth-panel-brand h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: .5rem;
    color: #fff;
}
.auth-panel-brand p {
    font-size: .875rem;
    opacity: .8;
    line-height: 1.65;
    margin: 0;
}
.auth-card-panel {
    border-radius: .875rem;
    overflow: hidden;
    box-shadow: 0 .5rem 2rem rgba(0,0,0,.12);
}

/* ─── Avatar navbar ──────────────────────────────────── */
.nav-avatar {
    object-fit: cover;
    border-radius: 50%;
}

/* ─── Page title user panel ──────────────────────────── */
.page-title {
    font-size: 1.25rem;
    font-weight: 700;
}

/* ─── Badge small (header counts) ───────────────────── */
.badge-sm {
    font-size: .7rem;
    font-weight: 400;
}

/* ─── Event dot (calendar) ───────────────────────────── */
.event-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    padding: 0;
    flex-shrink: 0;
    display: inline-block;
}

/* ─── Responsive ─────────────────────────────────────── */
@media (max-width: 767.98px) {
    .admin-layout {
        flex-direction: column;
    }
}

/* ─── Admin Settings — Tab scroller responsive ────────── */
.settings-tab-scroller {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;       /* Firefox */
}
.settings-tab-scroller::-webkit-scrollbar {
    display: none;               /* Chrome / Safari / Edge */
}

/* Touch target minim 44px pentru tab-uri admin pe mobile */
@media (max-width: 991.98px) {
    .settings-tab-scroller .nav-link {
        padding-top: 0.625rem;
        padding-bottom: 0.625rem;
        font-size: 0.85rem;
        white-space: nowrap;
    }
}

/* =========================================================
   USER PANEL — zona utilizator logat
   ========================================================= */

/* Containerul mare exterior */
.user-panel {
    border-radius: 1rem;
    overflow: hidden;
}

/* Fundalul interior al panoului — gri subtil ca inner cards să iasă în relief */
.user-panel > .card-body { background: #f4f6f9; }
[data-bs-theme="dark"] .user-panel > .card-body { background: #16191e; }

/* Header cu greeting */
.user-panel-header {
    background: #B3CFE8;
    border-bottom: 1px solid rgba(0,0,0,.08);
}
[data-bs-theme="dark"] .user-panel-header {
    background: linear-gradient(135deg, #1a2035 0%, #1e2a45 100%);
    border-bottom-color: rgba(255,255,255,.06);
}

/* Titlu secțiune (widget header) */
.widget-title {
    font-size: .875rem;
    font-weight: 600;
    color: #495057;
    text-transform: uppercase;
    letter-spacing: .06em;
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: .875rem;
    padding-bottom: .5rem;
    border-bottom: 2px solid #e9ecef;
}

.widget-title a {
    margin-left: auto;
    font-size: .8rem;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
}

/* Status pill — badge compact pentru produse utilizator */
.status-pill {
    display: inline-flex;
    align-items: center;
    font-size: .75rem;
    font-weight: 600;
    padding: .2rem .55rem;
    border-radius: 1rem;
    white-space: nowrap;
}
.status-pill.status-pending   { background: #fff3cd; color: #856404; }
.status-pill.status-published { background: #d1e7dd; color: #0a3622; }
.status-pill.status-rejected  { background: #f8d7da; color: #842029; }
.status-pill.status-draft     { background: #e2e3e5; color: #41464b; }

/* Rând produs compact (dashboard) */
.product-row {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .75rem .5rem;
    border-radius: .5rem;
    text-decoration: none;
    color: inherit;
    transition: background .12s;
}
.product-row:hover { background: #f8f9fa; color: inherit; }

.product-thumb {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: .375rem;
    border: 1px solid #dee2e6;
    background: #fff;
    flex-shrink: 0;
}

.product-row-name {
    font-size: .875rem;
    font-weight: 500;
    line-height: 1.3;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Stare goală (empty state) */
.empty-state {
    text-align: center;
    padding: 2.5rem 1.5rem;
    color: #adb5bd;
}
.empty-state .empty-icon {
    font-size: 2.5rem;
    margin-bottom: .75rem;
    display: block;
}
.empty-state p { margin-bottom: .75rem; font-size: .875rem; }

/* Notițe dashboard preview */
.note-preview {
    border-radius: .5rem;
    padding: .65rem .75rem;
}
.note-card-header {
    font-size: .875rem;
    font-weight: 600;
    padding: .5rem .75rem;
    background: rgba(0,0,0,.1);
    margin: -.65rem -.75rem .0rem;
    border-radius: .5rem .5rem 0 0;
}
.note-card-body {
    padding: .6rem .1rem 0;
}

/* Utility lipsă din Bootstrap 5 */
.min-w-0 { min-width: 0 !important; }

/* Responsive user panel */
@media (max-width: 767px) {
    .user-panel-header .display-name { font-size: 1.25rem; }
    .widget-title { font-size: .8rem; }
}

/* ─── Calendar ───────────────────────────────────────────── */

/* Celulă calendar — min-height responsiv */
.cal-cell {
    min-height: 80px;
    width: 14.28%;
    vertical-align: top;
}
@media (max-width: 575.98px) {
    .cal-cell { min-height: 60px; }
    .table-calendar { font-size: 0.7rem; }
    /* Pe mobile, arată chips dar limitează la 2 per zi */
    .cal-evt { display: block; }
    .cal-evt:nth-child(n+3) { display: none; }
    .cal-cell-dots { display: none; }
}

/* Event chip în grid calendar */
.cal-evt {
    font-size: 0.7rem;
    line-height: 1.2;
    border-radius: 0.2rem;
    padding: 0.1rem 0.25rem;
    margin-bottom: 0.15rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #fff;
}
.cal-evt-primary  { background: #0d6efd; }
.cal-evt-success  { background: #198754; }
.cal-evt-warning  { background: #ffc107; color: #212529; }
.cal-evt-danger   { background: #dc3545; }
.cal-evt-personal { background: #6f42c1; }

/* Legendă calendar */
.cal-legend-primary { background: #0d6efd; }
.cal-legend-success { background: #198754; }
.cal-legend-warning { background: #ffc107; }
.cal-legend-danger  { background: #dc3545; }

/* Departments checkbox scrollable */
.dept-checkbox-container {
    max-height: 130px;
    overflow-y: auto;
    padding: 0.25rem;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
}
@media (max-width: 575.98px) {
    .dept-checkbox-container { max-height: 100px; }
}

/* =========================================================
   UTILITAR — Inline styles mutate în CSS
   ========================================================= */
.settings-form-container { max-width: 700px; }
.select-auto-width { width: auto !important; }
.filter-select-md  { max-width: 220px; }

/* ─── KPI mini (user dashboard stat pills) ───────────── */
.kpi-mini {
    background: rgba(255,255,255,.55);
    border: 1px solid rgba(255,255,255,.75);
    border-radius: .6rem;
    padding: .55rem 1rem;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    min-width: 74px;
    text-decoration: none;
    transition: background .15s, transform .1s;
    backdrop-filter: blur(4px);
}
.kpi-mini:hover {
    background: rgba(255,255,255,.8);
    transform: translateY(-1px);
}
.kpi-mini-value {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1;
    color: #1a1d23;
}
.kpi-mini-label {
    font-size: .7rem;
    color: #495057;
    margin-top: .2rem;
    font-weight: 500;
    white-space: nowrap;
}
.kpi-mini-primary .kpi-mini-value { color: #0d6efd; }
.kpi-mini-warning .kpi-mini-value { color: #997404; }
.kpi-mini-info    .kpi-mini-value { color: #0c9cbf; }

/* ─── User directory cards ───────────────────────────── */
.user-dir-card {
    transition: box-shadow .2s, transform .15s;
}
.user-dir-card:hover {
    box-shadow: 0 .4rem 1.2rem rgba(0,0,0,.1) !important;
    transform: translateY(-2px);
}
.avatar-user-dir {
    width: 88px;
    height: 88px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px #dee2e6;
}

/* ─── Page header ────────────────────────────────────── */
.page-header {
    padding: 1.25rem 0 1rem;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 1.5rem;
}
.page-header h1 {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
}
.page-header .btn {
    font-size: .875rem;
}

/* ─── Dashboard widget card header ───────────────────── */
.widget-card-header {
    background: transparent;
    border-bottom: 1px solid #f0f2f5;
    padding: .875rem 1rem;
    display: flex;
    align-items: center;
    gap: .5rem;
    font-weight: 600;
    font-size: .875rem;
}

/* ─── Table action column mobile-friendly ────────────── */
.table .btn-action {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ─── Circle dropdown trigger — touch-friendly (44px) ── */
.btn-circle-sm {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

/* ─── Error pages ─────────────────────────────────────── */
.error-page-wrap {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    text-align: center;
}
.error-code {
    font-size: 7rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -.03em;
    margin-bottom: .5rem;
}
.error-icon-wrap {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.75rem;
    margin: 0 auto 1.5rem;
}
.error-icon-wrap-danger  { background: rgba(220,53,69,.1);  color: #dc3545; }
.error-icon-wrap-warning { background: rgba(255,193,7,.15); color: #997404; }
.error-icon-wrap-info    { background: rgba(13,110,253,.1); color: #0d6efd; }

/* ─── Form sections (separatoare) ───────────────────── */
.form-section {
    border-top: 1px solid var(--bs-border-color);
    padding-top: 1.25rem;
    margin-top: 1.25rem;
}

/* ─── Product form sections ──────────────────────────── */
.form-section-title {
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--bs-secondary);
    margin-bottom: .75rem;
    padding-bottom: .5rem;
    border-bottom: 1px solid var(--bs-border-color);
}

/* Password strength hint colorat semantic */
.pw-strength-wrap .pw-hint { font-size: .8rem; }

/* Image preview în formulare */
.form-img-preview {
    width: 160px;
    height: 160px;
    object-fit: cover;
    background: #f8f9fa;
    border-radius: .5rem;
    border: 1px solid #dee2e6;
    flex-shrink: 0;
}

/* ─── Responsive: tabel mobile helpers ───────────────── */
@media (max-width: 767.98px) {
    .hide-mobile { display: none !important; }
    .table td, .table th { font-size: .8rem; padding: .4rem .5rem; }
    .page-header h1 { font-size: 1.2rem; }
}

/* ─── Responsive: very small phones (< 375px) ────────── */
@media (max-width: 374.98px) {
    .navbar-brand img { max-height: 28px; }
    .btn { font-size: .8rem; }
    .card-body { padding: .75rem; }
    .page-header { padding: .75rem 0 .5rem; }
    .table td, .table th { font-size: .75rem; padding: .3rem .4rem; }
}

/* ─── Logs page — entity/action badges ───────────────── */
.badge-entity-product    { background-color: #0d6efd; color: #fff; }
.badge-entity-user       { background-color: #6610f2; color: #fff; }
.badge-entity-page       { background-color: #0dcaf0; color: #212529; }
.badge-entity-category   { background-color: #198754; color: #fff; }
.badge-entity-department { background-color: #6f42c1; color: #fff; }
.badge-entity-settings   { background-color: #6c757d; color: #fff; }
.badge-entity-invite     { background-color: #fd7e14; color: #fff; }

.badge-action-create  { background-color: #198754; color: #fff; }
.badge-action-update  { background-color: #ffc107; color: #212529; }
.badge-action-delete  { background-color: #dc3545; color: #fff; }
.badge-action-login   { background-color: #0d6efd; color: #fff; }
.badge-action-logout  { background-color: #6c757d; color: #fff; }
.badge-action-approve { background-color: #20c997; color: #fff; }
.badge-action-reject  { background-color: #dc3545; color: #fff; }

/* ─── Dark mode (Bootstrap data-bs-theme="dark") ────────── */
[data-bs-theme="dark"] body {
    background-color: #1a1a2e;
    color: #e0e0e0;
}

[data-bs-theme="dark"] .sidebar {
    background-color: #0d0d1a !important;
}

[data-bs-theme="dark"] .admin-content {
    background-color: #1a1a2e;
}

[data-bs-theme="dark"] .card {
    background-color: #16213e;
    border-color: #0f3460;
}

[data-bs-theme="dark"] .card-header,
[data-bs-theme="dark"] .card-footer {
    background-color: rgba(255,255,255,.04);
    border-color: #0f3460;
}

[data-bs-theme="dark"] .table {
    --bs-table-bg: #16213e;
    --bs-table-striped-bg: #1a2540;
    --bs-table-border-color: #0f3460;
    color: #e0e0e0;
}

[data-bs-theme="dark"] .kpi-label {
    color: #adb5bd;
}

[data-bs-theme="dark"] .page-header {
    border-color: #0f3460;
}

/* ─── Notification UI helpers ────────────────────────── */
.notif-badge  { font-size: .6rem; padding: .25em .45em; }
.notif-dot    { width: 8px; height: 8px; border-radius: 50%; background: #0d6efd; display: inline-block; }
.notif-dot-placeholder { width: 8px; height: 8px; display: inline-block; }
.notif-time   { font-size: .72rem; }

/* ─── Color picker text input ────────────────────────── */
.color-text-input { width: 110px; }

/* ─── Setting file preview ───────────────────────────── */
.setting-file-preview { max-height: 36px; max-width: 120px; }

[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
    background-color: #0f3460;
    border-color: #1a4a8a;
    color: #e0e0e0;
}

[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus {
    background-color: #0f3460;
    color: #e0e0e0;
}

[data-bs-theme="dark"] .input-group-text {
    background-color: #0f3460;
    border-color: #1a4a8a;
    color: #adb5bd;
}

[data-bs-theme="dark"] .modal-content {
    background-color: #16213e;
    border-color: #0f3460;
}

[data-bs-theme="dark"] .modal-header,
[data-bs-theme="dark"] .modal-footer {
    border-color: #0f3460;
}

[data-bs-theme="dark"] .list-group-item {
    background-color: #16213e;
    border-color: #0f3460;
    color: #e0e0e0;
}

[data-bs-theme="dark"] .nav-tabs .nav-link {
    color: #adb5bd;
}

[data-bs-theme="dark"] .nav-tabs .nav-link.active {
    background-color: #16213e;
    border-color: #0f3460 #0f3460 #16213e;
    color: #e0e0e0;
}

/* Theme toggle button în navbar */
.theme-toggle-btn {
    color: var(--bs-secondary-color);
    font-size: 1rem;
    line-height: 1;
    text-decoration: none;
}
.theme-toggle-btn:hover { color: var(--bs-body-color); }

/* ─── Print styles ────────────────────────────────────────── */
@media print {
    @page { margin: 12mm; size: A4 portrait; }

    body { background: white !important; font-size: 11pt !important; }

    /* Ascunde tot ce nu e relevant */
    .no-print,
    nav, .navbar,
    header, .header,
    footer, .footer,
    .sidebar, .admin-sidebar,
    .card-footer,
    .breadcrumb-wrapper, .breadcrumb,
    .modal,
    .btn { display: none !important; }

    /* Container fără padding lateral */
    .container, .container-fluid { padding: 0 !important; max-width: 100% !important; }

    main { padding: 0 !important; }

    /* Cards fără shadow */
    .card {
        box-shadow: none !important;
        border: 1px solid #dee2e6 !important;
        margin-bottom: 8pt !important;
    }
    .card-header { padding: 6pt 10pt !important; }
    .card-body   { padding: 8pt 10pt !important; }

    /* Layout produs: imagine mică + detalii side by side */
    .card-body .row { display: flex !important; flex-wrap: nowrap !important; }
    .card-body .col-12.col-md-5 {
        width: 35% !important;
        max-width: 35% !important;
        flex: 0 0 35% !important;
    }
    .card-body .col-12.col-md-7 {
        width: 65% !important;
        max-width: 65% !important;
        flex: 0 0 65% !important;
    }

    /* Imagine — limitată la print */
    .card-body img {
        max-height: 180pt !important;
        width: 100% !important;
        object-fit: contain !important;
    }

    /* Text mai compact */
    .list-group-item { padding: 4pt 8pt !important; font-size: 10pt !important; }
    h1, .h4 { font-size: 14pt !important; margin-bottom: 2pt !important; }
    .small, small { font-size: 9pt !important; }

    /* Barcode card — pe aceeași pagina, fără break */
    .barcode-card {
        box-shadow: none !important;
        border: 1px solid #dee2e6 !important;
        page-break-inside: avoid;
        break-inside: avoid;
    }
    .barcode-card .card-body { padding: 6pt 10pt !important; text-align: center; }
    .barcode-card svg {
        max-width: 260pt !important;
        max-height: 70pt !important;
        height: auto !important;
    }
    #qrcode img, #qrcode canvas {
        max-width: 110pt !important;
        height: auto !important;
    }
    .barcode-card .badge { font-size: 10pt !important; }
}

/* ─── Cookie Consent Banner ──────────────────────────────────────────────── */

.cookie-banner {
    position: fixed;
    z-index: 1070;
    background: var(--cc-bg, #fff);
    color: var(--cc-text, #212529);
    box-shadow: 0 -2px 16px rgba(0,0,0,.12);
    font-size: .9rem;
    line-height: 1.5;
    animation: cc-fadein .25s ease;
}

@keyframes cc-fadein {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Poziții */
.cookie-banner--bottom-bar {
    bottom: 0; left: 0; right: 0;
}
.cookie-banner--bottom-left {
    bottom: 1rem; left: 1rem;
    max-width: 420px;
    border-radius: .5rem;
}
.cookie-banner--bottom-right {
    bottom: 1rem; right: 1rem;
    max-width: 420px;
    border-radius: .5rem;
}
.cookie-banner--modal {
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    max-width: 520px;
    width: calc(100% - 2rem);
    border-radius: .5rem;
    box-shadow: 0 8px 32px rgba(0,0,0,.2);
}

/* Inner wrapper */
.cookie-banner__inner {
    padding: 1rem 1.25rem;
    max-width: 960px;
    margin: 0 auto;
}

/* Stil compact */
.cookie-banner--compact .cookie-banner__inner {
    padding: .6rem 1rem;
}
.cookie-banner--compact .cookie-banner__message {
    display: none;
}
.cookie-banner--compact .cookie-banner__body {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
}

/* Stil standard: body + actions side by side pe desktop */
.cookie-banner--standard .cookie-banner__inner {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.cookie-banner--standard .cookie-banner__body {
    flex: 1 1 260px;
}

/* Titlu și mesaj */
.cookie-banner__title {
    display: block;
    font-size: .95rem;
    margin-bottom: .25rem;
}
.cookie-banner__message {
    margin: 0 0 .5rem;
    font-size: .85rem;
    opacity: .85;
}
.cookie-banner__policy-link {
    color: var(--cc-btn-primary, #0d6efd);
    text-decoration: underline;
    white-space: nowrap;
}

/* Acțiuni */
.cookie-banner__actions {
    display: flex;
    gap: .5rem;
    align-items: center;
    flex-wrap: wrap;
    flex-shrink: 0;
    padding-top: .15rem;
}
.cookie-banner--standard .cookie-banner__actions {
    align-self: center;
}

/* Butoane */
.cookie-banner__btn {
    border: none;
    border-radius: .35rem;
    padding: .35rem .85rem;
    font-size: .85rem;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity .15s;
}
.cookie-banner__btn:hover { opacity: .85; }

.cookie-banner__btn--primary {
    background: var(--cc-btn-primary, #0d6efd);
    color: #fff;
}
.cookie-banner__btn--secondary {
    background: var(--cc-btn-secondary, #6c757d);
    color: #fff;
}
.cookie-banner__btn--link {
    background: transparent;
    color: var(--cc-text, #212529);
    text-decoration: underline;
    padding-left: .25rem;
    padding-right: .25rem;
    opacity: .75;
}
.cookie-banner__btn--link:hover { opacity: 1; }

/* Panel preferințe */
.cookie-banner__settings-panel {
    background: rgba(0,0,0,.04);
    border-radius: .35rem;
    padding: .75rem;
    margin-bottom: .75rem;
    width: 100%;
}
.cookie-category {
    padding: .4rem 0;
    border-bottom: 1px solid rgba(0,0,0,.06);
}
.cookie-category:last-child { border-bottom: none; }
.cookie-category__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .5rem;
}
.cookie-category__name {
    font-size: .875rem;
    font-weight: 600;
    cursor: pointer;
}
.cookie-category__desc {
    display: block;
    font-size: .8rem;
    margin-top: .1rem;
}
.cookie-category__badge {
    font-size: .7rem;
}

/* Responsive — pe mobile toate pozițiile devin bottom-bar */
@media (max-width: 575.98px) {
    .cookie-banner--bottom-left,
    .cookie-banner--bottom-right,
    .cookie-banner--modal {
        top: auto; left: 0; right: 0; bottom: 0;
        max-width: none;
        transform: none;
        border-radius: .5rem .5rem 0 0;
    }
    .cookie-banner--standard .cookie-banner__inner {
        flex-direction: column;
        gap: .4rem;
        padding: .75rem 1rem;
    }
    .cookie-banner--standard .cookie-banner__body {
        flex: 0 0 auto;
    }
    .cookie-banner__title {
        font-size: .875rem;
        margin-bottom: .1rem;
    }
    .cookie-banner__message {
        font-size: .8rem;
        margin-bottom: .25rem;
        line-height: 1.4;
    }
    .cookie-banner__actions {
        flex-wrap: nowrap;
        gap: .4rem;
    }
    .cookie-banner__btn {
        padding: .3rem .7rem;
        font-size: .8rem;
    }
}

/* ─── Responsive width helpers ──────────────────────── */
@media (min-width: 576px) {
    .w-sm-auto { width: auto !important; }
}

/* ─── Password strength bar ─────────────────────────── */
.pw-strength-wrap .progress { height: 4px; }
.pw-label { min-width: 40px; text-align: right; }

/* ─── Bulk action bar ────────────────────────────────── */
.bulk-action-bar {
    position: fixed;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    background: #212529;
    color: #fff;
    padding: .6rem 1.25rem;
    border-radius: 2rem;
    box-shadow: 0 4px 16px rgba(0,0,0,.25);
    display: flex;
    align-items: center;
    gap: .5rem;
    z-index: 1050;
    white-space: nowrap;
}
[data-bs-theme="dark"] .bulk-action-bar {
    background: #f8f9fa;
    color: #212529;
    box-shadow: 0 4px 16px rgba(0,0,0,.5);
}

/* ─── F1: Dark mode complet — Navbar ────────────────────── */
[data-bs-theme="dark"] .navbar {
    background-color: #0d0d1a !important;
    border-bottom-color: #0f3460 !important;
}
[data-bs-theme="dark"] .navbar .navbar-brand,
[data-bs-theme="dark"] .navbar .nav-link {
    color: #e0e0e0 !important;
}
[data-bs-theme="dark"] .navbar .navbar-brand:hover,
[data-bs-theme="dark"] .navbar .nav-link:hover,
[data-bs-theme="dark"] .navbar .nav-link:focus {
    color: #fff !important;
}
[data-bs-theme="dark"] .navbar .nav-link.active {
    color: #fff !important;
    border-bottom-color: var(--bs-primary) !important;
}
[data-bs-theme="dark"] .navbar-toggler {
    border-color: rgba(255,255,255,.2);
}
[data-bs-theme="dark"] .navbar-toggler-icon {
    filter: invert(1);
}

/* ─── F1: Dark mode complet — Dropdown ──────────────────── */
[data-bs-theme="dark"] .dropdown-menu {
    background-color: #16213e;
    border-color: #0f3460;
}
[data-bs-theme="dark"] .dropdown-item {
    color: #e0e0e0;
}
[data-bs-theme="dark"] .dropdown-item:hover,
[data-bs-theme="dark"] .dropdown-item:focus {
    background-color: rgba(255,255,255,.08);
    color: #fff;
}
[data-bs-theme="dark"] .dropdown-item.active,
[data-bs-theme="dark"] .dropdown-item:active {
    background-color: var(--bs-primary);
    color: #fff;
}
[data-bs-theme="dark"] .dropdown-header {
    color: #adb5bd;
}
[data-bs-theme="dark"] .dropdown-divider {
    border-top-color: #0f3460;
}

/* ─── F1: Dark mode complet — Footer ────────────────────── */
[data-bs-theme="dark"] footer {
    background-color: #0d0d1a !important;
    border-top-color: #0f3460 !important;
}
[data-bs-theme="dark"] footer a {
    color: #adb5bd;
}
[data-bs-theme="dark"] footer a:hover {
    color: #e0e0e0;
}

/* ─── F1: Dark mode complet — Pagination ────────────────── */
[data-bs-theme="dark"] .pagination .page-link {
    background-color: #16213e;
    border-color: #0f3460;
    color: #e0e0e0;
}
[data-bs-theme="dark"] .pagination .page-link:hover,
[data-bs-theme="dark"] .pagination .page-link:focus {
    background-color: #1a2a50;
    border-color: #1a4a8a;
    color: #fff;
}
[data-bs-theme="dark"] .pagination .page-item.active .page-link {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    color: #fff;
}
[data-bs-theme="dark"] .pagination .page-item.disabled .page-link {
    background-color: #111827;
    border-color: #0f3460;
    color: #6c757d;
}

/* ─── F1: Dark mode complet — Breadcrumb ────────────────── */
[data-bs-theme="dark"] .breadcrumb-item a {
    color: #adb5bd;
}
[data-bs-theme="dark"] .breadcrumb-item a:hover {
    color: #e0e0e0;
}
[data-bs-theme="dark"] .breadcrumb-item.active {
    color: #e0e0e0;
}
[data-bs-theme="dark"] .breadcrumb-item + .breadcrumb-item::before {
    color: #6c757d;
}

/* ─── F7: Clickable table rows ──────────────────────────── */
.table-clickable-row { cursor: pointer; }
.table-clickable-row:focus-within { outline: 2px solid var(--bs-primary); outline-offset: -2px; }

/* ─── F3: Touch targets mobile ──────────────────────────── */
@media (max-width: 767.98px) {
    .btn-sm { min-height: 36px; }
    .form-control-sm, .form-select-sm { min-height: 36px; }
}

/* ─── Dashboard: Action Tiles ────────────────────────────── */
.action-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: .875rem .5rem;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: .5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    transition: transform .15s, box-shadow .15s, border-color .15s;
    text-align: center;
    min-height: 80px;
}
.action-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 .375rem .875rem rgba(0,0,0,.1) !important;
    border-color: var(--bs-primary-border-subtle);
}
.action-tile-icon { font-size: 1.5rem; line-height: 1; margin-bottom: .3rem; }
.action-tile-label { font-size: .78rem; font-weight: 600; color: var(--bs-body-color); line-height: 1.2; }

/* ─── Dashboard: Event Date Badge ────────────────────────── */
.event-date-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 40px;
    min-width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #0d6efd, #0a58ca);
    border-radius: .375rem;
}
.event-date-day { font-size: .95rem; font-weight: 700; line-height: 1; color: #ffffff; }
.event-date-mon { font-size: .58rem; font-weight: 700; color: rgba(255,255,255,.85); text-transform: uppercase; letter-spacing: .04em; }

/* ─── Pill buttons: consistent centering on all screen sizes ─ */
/* Bootstrap .btn uses inline-block + text-align:center, which  */
/* misaligns icon+text combos in flex containers on mobile.     */
.btn.rounded-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ─── Dashboard: Event row tints ─────────────────────────── */
/* Upcoming — fundal albastru light + accent stânga discret */
.event-item-upcoming {
    background-color: rgba(13, 110, 253, .07);
    box-shadow: inset 2px 0 0 rgba(13, 110, 253, .35);
    transition: background-color .15s;
}
.event-item-upcoming:hover {
    background-color: rgba(13, 110, 253, .12);
}
/* In-progress — fundal portocaliu subtil + accent stânga solid */
.event-item-inprogress {
    background-color: rgba(253, 126, 20, .09);
    box-shadow: inset 3px 0 0 #fd7e14;
    transition: background-color .15s;
}
.event-item-inprogress:hover {
    background-color: rgba(253, 126, 20, .15);
}

/* ─── Note preview: clamp text la 3 linii ────────────────── */
.note-preview-body {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: .8rem;
    font-weight: 500;
    color: rgba(0,0,0,.65) !important;
}

/* ─── Address Geocode Autocomplete ──────────────────────── */
.geocode-dropdown {
    position: absolute;
    z-index: 1055;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: .375rem;
    box-shadow: 0 .5rem 1.5rem rgba(0,0,0,.15);
    max-height: 280px;
    overflow-y: auto;
}
.geocode-item {
    padding: .45rem .75rem;
    cursor: pointer;
    font-size: .85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-bottom: 1px solid var(--bs-border-color-translucent);
    color: var(--bs-body-color);
}
.geocode-item:last-child { border-bottom: none; }
.geocode-item:hover,
.geocode-item.active {
    background: var(--bs-primary-bg-subtle);
    color: var(--bs-primary);
}
[data-bs-theme="dark"] .geocode-dropdown {
    box-shadow: 0 .5rem 1.5rem rgba(0,0,0,.45);
}
