/* Dashboard (general/index) — 01.10.2026. Merge si cu tema "liquid glass" (variabilele --g-*),
   si cu aspectul clasic (fallback-urile din var()). */

.bh-dash {
    --d-strong: var(--g-strong, #fff);
    --d-text: var(--g-text-2, #c9d1ce);
    --d-muted: var(--g-muted, #8f9d98);
    --d-green: var(--g-green, #17c964);
    --d-green-d: var(--g-green-d, #13b653);
    --d-gold: var(--g-gold, #f3bd3e);
    --d-tint: var(--g-tint, rgba(255, 255, 255, .045));
    --d-tint-2: var(--g-tint-2, rgba(255, 255, 255, .085));
    --d-edge: var(--g-edge, rgba(255, 255, 255, .085));
    --d-edge-2: var(--g-edge-2, rgba(255, 255, 255, .14));
    --d-line: var(--g-line, rgba(255, 255, 255, .06));
    --d-hi: var(--g-hi, inset 0 1px 0 rgba(255, 255, 255, .1));
    --d-r: var(--g-r, 12px);
    --d-r-lg: var(--g-r-lg, 18px);
}

/* tema da .card { height: calc(100% - 30px) }: in coloanele dashboard-ului cardurile au inaltimea continutului */
.bh-dash .card { height: auto; }
.bh-dash .bh-dash-stats .card { height: calc(100% - 1.5rem); }

/* ---------- banda de sus ---------- */
.bh-dash-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px 28px;
    flex-wrap: wrap;
    margin: 4px 0 22px;
}
.bh-dash-hero__title {
    font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.15rem);
    font-weight: 800;
    letter-spacing: -.025em;
    line-height: 1.15;
    margin: 0 0 6px;
    color: var(--d-strong) !important;
}
.bh-dash-hero__sub {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    color: var(--d-muted);
    font-size: .95rem;
}
.bh-dash-hero__sub strong { color: var(--d-strong); font-weight: 800; }
.bh-dash-hero__sep { width: 4px; height: 4px; border-radius: 50%; background: var(--d-muted); opacity: .6; }

.bh-live-dot {
    position: relative;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--d-green);
    box-shadow: 0 0 0 0 rgba(23, 201, 100, .6);
    animation: bhLive 2.4s ease-out infinite;
    flex: none;
}
.bh-live-dot.is-off { background: var(--d-muted); animation: none; }
@keyframes bhLive {
    0% { box-shadow: 0 0 0 0 rgba(23, 201, 100, .55); }
    70% { box-shadow: 0 0 0 9px rgba(23, 201, 100, 0); }
    100% { box-shadow: 0 0 0 0 rgba(23, 201, 100, 0); }
}

/* actiuni rapide: pastile de sticla */
.bh-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.bh-quick__item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border-radius: 14px;
    background: var(--d-tint);
    border: 1px solid var(--d-edge);
    box-shadow: var(--d-hi);
    color: var(--d-text) !important;
    font-weight: 700;
    font-size: .88rem;
    text-decoration: none !important;
    white-space: nowrap;
    transition: background-color .15s ease, border-color .15s ease, transform .12s ease, color .15s ease;
}
.bh-quick__item i { font-size: 1.15rem; line-height: 1; color: var(--d-muted); transition: color .15s ease; }
.bh-quick__item:hover { background: var(--d-tint-2); border-color: var(--d-edge-2); color: var(--d-strong) !important; }
.bh-quick__item:hover i { color: var(--d-green); }
.bh-quick__item:active { transform: translateY(1px); }
.bh-quick__item.is-accent {
    background: linear-gradient(180deg, rgba(23, 201, 100, .22), rgba(23, 201, 100, .1));
    border-color: rgba(23, 201, 100, .4);
    color: var(--d-strong) !important;
}
.bh-quick__item.is-accent i { color: var(--d-green); }
.bh-quick__item em {
    font-style: normal;
    font-size: .74rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 999px;
    color: #2a1a00;
    background: linear-gradient(90deg, #ffd66b, #f5a623);
}
.bh-quick__item.is-staff i { color: var(--d-gold); }

/* ---------- cifrele principale ---------- */
.bh-dash-stats > [class*="col"] { margin-bottom: 0; }
.bh-stat .card-body {
    position: relative;
    padding: 18px 18px 16px !important;
    min-height: 132px;
    display: flex;
    flex-direction: column;
}
.bh-stat__icon {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border-radius: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    color: var(--d-green);
    background: rgba(23, 201, 100, .12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
}
.bh-stat__icon.is-alt { color: #3fd2c7; background: rgba(63, 210, 199, .12); }
.bh-stat__label { font-size: .82rem; font-weight: 700; color: var(--d-muted); margin-bottom: 6px; }
.bh-stat__value {
    font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.25rem);
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.05;
    color: var(--d-strong);
    font-variant-numeric: tabular-nums;
}
.bh-stat__hint { margin-top: auto; padding-top: 10px; font-size: .8rem; color: var(--d-muted); }
.bh-stat__hint a { font-weight: 700; }

/* ---------- carduri ---------- */
.bh-card-sub { font-size: .8rem; color: var(--d-muted); margin-top: 2px; }
.bh-card-foot { margin-top: 12px; font-size: .8rem; color: var(--d-muted); text-align: right; }
.bh-chip {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: .74rem;
    font-weight: 800;
    color: var(--d-text);
    background: var(--d-tint);
    border: 1px solid var(--d-edge);
}
.bh-empty {
    padding: 22px 12px;
    text-align: center;
    color: var(--d-muted);
    border: 1px dashed var(--d-edge-2);
    border-radius: var(--d-r);
}
.bh-actions { display: inline-flex; gap: 6px; }
.bh-note {
    padding: 10px 12px;
    margin-bottom: 12px;
    border-radius: var(--d-r);
    font-size: .84rem;
    color: var(--d-text);
    background: rgba(23, 201, 100, .08);
    border: 1px solid rgba(23, 201, 100, .25);
}

/* grafic */
.bh-chart-card { display: block; }
.bh-chart-box { position: relative; height: 260px; }
.bh-chart-kpis { display: flex; gap: 8px; flex-wrap: wrap; }
.bh-chart-kpis > div {
    display: flex;
    flex-direction: column;
    min-width: 74px;
    padding: 6px 12px;
    border-radius: 12px;
    background: var(--d-tint);
    border: 1px solid var(--d-edge);
}
.bh-chart-kpis span { font-size: .7rem; font-weight: 700; color: var(--d-muted); }
.bh-chart-kpis strong { font-size: 1.05rem; font-weight: 800; color: var(--d-strong); font-variant-numeric: tabular-nums; line-height: 1.25; }
.bh-chart-kpis small { font-size: .68rem; color: var(--d-muted); }

/* activitate recenta: randurile vin din custom2.min.js; doar spatiere si separatoare */
.bh-feed { max-height: 520px; overflow-y: auto; }
.bh-feed > * + * { border-top: 1px solid var(--d-line); }
.bh-feed img { border-radius: 10px; }

/* masini */
.bh-veh-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}
.bh-veh {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
    border-radius: 14px;
    background: var(--d-tint);
    border: 1px solid var(--d-edge);
    box-shadow: var(--d-hi);
    min-width: 0;
}
.bh-veh__rank {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 800;
    color: var(--d-strong);
    background: rgba(0, 0, 0, .35);
    z-index: 1;
}
.bh-veh__img { width: 100%; height: 84px; object-fit: contain; margin: 6px 0 2px; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .35)); }
.bh-veh__name { font-weight: 800; color: var(--d-strong); font-size: .92rem; overflow-wrap: anywhere; }
.bh-veh__name small { font-weight: 600; color: var(--d-muted); }
.bh-veh__meta { display: flex; justify-content: space-between; gap: 8px; font-size: .8rem; color: var(--d-muted); }
.bh-veh__meta b { color: var(--d-green); }
.bh-veh__owner { font-size: .82rem; overflow-wrap: anywhere; }

.bh-table-compact td, .bh-table-compact th { padding-top: 10px !important; padding-bottom: 10px !important; }

/* stiri si actualizari */
.bh-news { max-height: 300px; overflow-y: auto; overflow-wrap: anywhere; }
.bh-news img, .bh-update img { max-width: 100%; height: auto; border-radius: 10px; }
.bh-update { max-height: 220px; overflow-y: auto; overflow-wrap: anywhere; }
.bh-update__foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; font-size: .82rem; flex-wrap: wrap; }

/* jobul zilei + obiectiv */
.bh-goals { display: grid; grid-template-columns: 1fr; gap: 16px; }
.bh-goal + .bh-goal { padding-top: 16px; border-top: 1px solid var(--d-line); }
.bh-goal__label { font-size: .8rem; font-weight: 700; color: var(--d-muted); }
.bh-goal__value { font-size: 1.35rem; font-weight: 800; color: var(--d-strong); letter-spacing: -.02em; margin-top: 2px; }
.bh-goal__hint { font-size: .8rem; color: var(--d-muted); margin-top: 6px; }

/* tab-uri segmentate */
.bh-seg {
    display: flex;
    gap: 4px;
    padding: 4px;
    border-radius: 14px;
    background: var(--d-tint);
    border: 1px solid var(--d-edge);
}
.bh-seg .nav-item { flex: 1; }
.bh-seg .nav-link { text-align: center; padding: 7px 10px; font-size: .84rem; }

/* liste de top */
.bh-rank-list { list-style: none; margin: 0; padding: 0; }
.bh-rank-list li {
    display: grid;
    grid-template-columns: minmax(90px, 40%) 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 8px 4px;
    border-bottom: 1px solid var(--d-line);
    font-size: .86rem;
}
.bh-rank-list li:last-child { border-bottom: 0; }
.bh-rank-list__job { color: var(--d-muted); font-weight: 600; }
.bh-rank-list__who { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.bh-rank-list__val { font-weight: 800; color: var(--d-strong); font-variant-numeric: tabular-nums; }

/* podium 7 zile */
.bh-podium { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.bh-podium__item {
    display: grid;
    grid-template-columns: 30px 52px 1fr;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 14px;
    background: var(--d-tint);
    border: 1px solid var(--d-edge);
}
.bh-podium__pos {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: var(--d-strong);
    background: var(--d-tint-2);
}
.bh-podium__item.is-1 .bh-podium__pos { background: linear-gradient(180deg, #ffd66b, #f0a92b); color: #2a1a00; }
.bh-podium__item.is-2 .bh-podium__pos { background: linear-gradient(180deg, #e6ecea, #aab6b1); color: #17211e; }
.bh-podium__item.is-3 .bh-podium__pos { background: linear-gradient(180deg, #e0a172, #b06a3b); color: #24130a; }
.bh-podium__img { width: 52px !important; height: 52px !important; object-fit: cover; border-radius: 14px !important; margin: 0 !important; }
.bh-podium__who { min-width: 0; font-weight: 700; overflow-wrap: anywhere; }
.bh-podium__who small { display: block; font-weight: 600; color: var(--d-muted); margin-top: 2px; }

/* ---------- telefon ---------- */
@media (max-width: 767.98px) {
    .bh-dash-hero { margin-bottom: 16px; }
    .bh-quick {
        width: 100%;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 4px;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .bh-quick::-webkit-scrollbar { display: none; }
    .bh-quick__item { scroll-snap-align: start; padding: 10px 14px; }
    .bh-dash-stats > [class*="col"] { padding-left: 6px; padding-right: 6px; }
    .bh-dash-stats { margin-left: -6px; margin-right: -6px; }
    .bh-stat .card-body { min-height: 118px; padding: 14px !important; }
    .bh-stat__icon { width: 32px; height: 32px; font-size: 1.1rem; top: 12px; right: 12px; border-radius: 10px; }
    .bh-chart-box { height: 210px; }
    .bh-chart-kpis { width: 100%; }
    .bh-chart-kpis > div { flex: 1; min-width: 0; }
    .bh-veh-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .bh-veh__img { height: 64px; }
}

@media (prefers-reduced-motion: reduce) {
    .bh-live-dot { animation: none; }
}

/* recordul de jucatori online: accent auriu discret */
.bh-stat__icon.is-gold { color: var(--d-gold); background: rgba(243, 189, 62, .14); }
.bh-stat.is-gold .bh-stat__value { background: linear-gradient(180deg, #ffe08a, #f3bd3e); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: 2px; }
html.bh-glass[data-bh-theme="light"] .bh-stat.is-gold .bh-stat__value { background: linear-gradient(180deg, #d99a0b, #b07a00); -webkit-background-clip: text; background-clip: text; }
.bh-stat__hint::first-letter { text-transform: uppercase; }

/* mini-graficele de langa cifre (SVG inline din App\Support\DashboardTrends, fara JS) */
.bh-stat__spark { margin-top: 8px; height: 30px; line-height: 0; color: var(--d-green); }
.bh-stat__spark .bh-spark { display: block; width: 100%; height: 100%; overflow: visible; }
.bh-spark__line { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.bh-spark__area { fill: currentColor; opacity: .14; stroke: none; }
.bh-spark__dot { fill: currentColor; stroke: var(--g-card-solid, #131a1b); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.bh-dash-stats > :nth-child(3) .bh-stat__spark { color: #3fd2c7; }
html.bh-glass[data-bh-theme="light"] .bh-dash-stats > :nth-child(3) .bh-stat__spark { color: #0f9a90; }
.bh-stat__spark + .bh-stat__hint { padding-top: 6px; }
@media (max-width: 767.98px) {
    .bh-stat__spark { height: 24px; margin-top: 6px; }
}

/* eticheta nu intra sub iconita din colt (texte lungi pe telefon: „Online în ultimele 7 zile”) */
.bh-stat__label { padding-right: 46px; line-height: 1.3; }
@media (max-width: 767.98px) { .bh-stat__label { padding-right: 36px; font-size: .78rem; } }

/* ---------- starea serverului (05.10, App\Support\ServerStatus): online / mentenanta / offline ---------- */
.bh-srv {
    --srv: #17c964;
    --srv-text: #4ee08f;
    --srv-glow: rgba(23, 201, 100, .2);
    --srv-soft: rgba(23, 201, 100, .1);
    --srv-edge: rgba(23, 201, 100, .3);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 20px;
    margin: 0 0 22px;
    padding: 14px 18px;
    border-radius: var(--d-r-lg);
    color: var(--d-text);
    background:
        radial-gradient(90% 160% at 0% 50%, var(--srv-glow), transparent 60%),
        linear-gradient(135deg, var(--g-pane-a, rgba(255, 255, 255, .068)), var(--g-pane-b, rgba(255, 255, 255, .026)));
    border: 1px solid var(--d-edge);
    border-left: 3px solid var(--srv);
    box-shadow: var(--d-hi), var(--g-shadow, 0 12px 32px -14px rgba(0, 0, 0, .5));
}
.bh-srv.is-maintenance { --srv: #ff9f1c; --srv-text: #ffb54d; --srv-glow: rgba(255, 159, 28, .22); --srv-soft: rgba(255, 159, 28, .12); --srv-edge: rgba(255, 159, 28, .38); }
.bh-srv.is-offline { --srv: #f04848; --srv-text: #ff7070; --srv-glow: rgba(240, 72, 72, .22); --srv-soft: rgba(240, 72, 72, .12); --srv-edge: rgba(240, 72, 72, .38); }
.bh-srv__icon {
    flex: none;
    width: 42px;
    height: 42px;
    border-radius: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    color: var(--srv-text);
    background: var(--srv-soft);
    border: 1px solid var(--srv-edge);
}
.bh-srv__body { flex: 1 1 300px; min-width: 0; }
.bh-srv__head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; }
.bh-srv__label { font-size: .74rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--d-muted); }
.bh-srv__badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 3px 11px 3px 9px;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: var(--srv-text);
    background: var(--srv-soft);
    border: 1px solid var(--srv-edge);
}
.bh-srv__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--srv); flex: none; }
.bh-srv.is-online .bh-srv__dot { animation: bhLive 2.4s ease-out infinite; }
.bh-srv.is-maintenance .bh-srv__dot { animation: bhSrvBlink 1.6s ease-in-out infinite; }
@keyframes bhSrvBlink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.bh-srv__text { margin: 5px 0 0; font-size: .9rem; line-height: 1.45; color: var(--d-text); overflow-wrap: anywhere; }
.bh-srv__facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.bh-srv__facts > div {
    min-width: 116px;
    padding: 7px 12px;
    border-radius: var(--d-r);
    background: var(--d-tint);
    border: 1px solid var(--d-edge);
}
.bh-srv__facts dt { margin: 0; font-size: .7rem; font-weight: 700; color: var(--d-muted); white-space: nowrap; }
.bh-srv__facts dd { margin: 1px 0 0; font-size: 1rem; font-weight: 800; color: var(--d-strong); white-space: nowrap; font-variant-numeric: tabular-nums; }
.bh-srv__note {
    flex: 1 1 100%;
    display: flex;
    align-items: flex-start;
    gap: 7px;
    margin: 0;
    padding: 8px 12px;
    border-radius: var(--d-r);
    font-size: .82rem;
    color: var(--d-text);
    background: var(--d-tint);
    border: 1px dashed var(--d-edge-2);
}
.bh-srv__note i { color: var(--srv-text); font-size: 1rem; line-height: 1.2; }
html.bh-glass[data-bh-theme="light"] .bh-srv { --srv-text: #0b7a3b; --srv-glow: rgba(19, 182, 83, .14); }
html.bh-glass[data-bh-theme="light"] .bh-srv.is-maintenance { --srv: #e07b00; --srv-text: #a35400; --srv-glow: rgba(255, 159, 28, .18); --srv-soft: rgba(255, 159, 28, .14); --srv-edge: rgba(224, 123, 0, .42); }
html.bh-glass[data-bh-theme="light"] .bh-srv.is-offline { --srv: #d92d2d; --srv-text: #b42318; --srv-glow: rgba(217, 45, 45, .14); --srv-soft: rgba(217, 45, 45, .1); --srv-edge: rgba(217, 45, 45, .4); }
@media (max-width: 767.98px) {
    .bh-srv { padding: 12px 14px; gap: 10px 12px; margin-bottom: 16px; }
    .bh-srv__icon { width: 36px; height: 36px; font-size: 1.15rem; border-radius: 11px; }
    .bh-srv__body { flex-basis: calc(100% - 48px); }
    .bh-srv__facts { width: 100%; }
    .bh-srv__facts > div { flex: 1 1 0; min-width: 0; }
    .bh-srv__facts dd { font-size: .92rem; }
}
@media (prefers-reduced-motion: reduce) {
    .bh-srv__dot { animation: none !important; }
}
