/* InteliBooking admin - stiluri peste Bootstrap 5 */
:root {
    --ib-sidebar-w: 240px;
    --ib-sidebar-bg: #14213d;
    --ib-sidebar-fg: #c9d2e3;
    --ib-sidebar-active: #2563eb;
    --ib-page-bg: #f4f6fb;
}

body { background: var(--ib-page-bg); font-size: .925rem; }

/* ---------- Layout ---------- */
.ib-shell { display: flex; min-height: 100vh; }
.ib-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ib-content { padding: 1.5rem; }
.ib-topbar {
    display: flex; align-items: center; gap: .75rem;
    padding: .9rem 1.5rem; background: #fff; border-bottom: 1px solid #e5e8ef;
    position: sticky; top: 0; z-index: 10;
}
.ib-title { font-size: 1.15rem; font-weight: 600; margin: 0; }

/* ---------- Meniu lateral ---------- */
.ib-sidebar {
    background: var(--ib-sidebar-bg); color: var(--ib-sidebar-fg);
    display: flex; flex-direction: column;
}
/* Bootstrap pune background transparent !important pe .offcanvas-lg peste 992px, de aici !important */
.ib-sidebar.offcanvas-lg { --bs-offcanvas-width: var(--ib-sidebar-w); background-color: var(--ib-sidebar-bg) !important; }
@media (min-width: 992px) {
    .ib-sidebar { width: var(--ib-sidebar-w); flex: 0 0 var(--ib-sidebar-w); position: sticky; top: 0; height: 100vh; }
}
.ib-brand { display: flex; align-items: center; gap: .65rem; padding: 1.1rem 1rem; border-bottom: 1px solid rgba(255,255,255,.08); }
.ib-brand-name { color: #fff; font-weight: 600; line-height: 1.1; }
.ib-brand-sub { font-size: .75rem; opacity: .65; }

.ib-nav { padding: .75rem .6rem; flex: 1; }
.ib-nav a {
    display: flex; align-items: center; gap: .7rem;
    padding: .55rem .8rem; margin-bottom: 2px; border-radius: .4rem;
    color: var(--ib-sidebar-fg); text-decoration: none;
}
.ib-nav a i { font-size: 1.05rem; }
.ib-nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.ib-nav a.active { background: var(--ib-sidebar-active); color: #fff; }
.ib-nav-titlu { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; opacity: .55; padding: 1rem .8rem .35rem; }

/* ---------- Log viewer ---------- */
.ib-log { font-family: var(--bs-font-monospace); font-size: .78rem; }
.ib-log-row { display: grid; grid-template-columns: 9.5rem 3.6rem minmax(0, 1fr); gap: .6rem; padding: .4rem 1rem; border-bottom: 1px solid #eef1f6; }
.ib-log-row:hover { background: #f8fafc; }
.ib-log-row.nivel-ERROR, .ib-log-row.nivel-FATAL { background: #fff5f5; }
.ib-log-row.nivel-WARN { background: #fffbeb; }
.ib-log-data { color: #6b7280; white-space: nowrap; }
.ib-log-msg { white-space: pre-wrap; word-break: break-word; }
.ib-log-sursa { color: #6b7280; }
.ib-log-detalii summary { color: var(--ib-sidebar-active); cursor: pointer; font-size: .75rem; }
.ib-log-detalii pre { margin: .3rem 0 0; padding: .5rem; background: #0f172a; color: #e2e8f0; border-radius: .4rem; max-height: 320px; overflow: auto; font-size: .72rem; }
.ib-log .badge { font-size: .65rem; font-family: var(--bs-body-font-family); }
.ib-log-filtru { cursor: pointer; }
@media (max-width: 767.98px) { .ib-log-row { grid-template-columns: 1fr; gap: .15rem; } }

.ib-user { padding: .9rem 1rem; border-top: 1px solid rgba(255,255,255,.08); font-size: .85rem; }
.ib-user-name { display: flex; align-items: center; gap: .5rem; color: #fff; margin-bottom: .4rem; }
.ib-logout {
    background: none; border: 0; padding: 0; color: var(--ib-sidebar-fg);
    display: flex; align-items: center; gap: .5rem; font-size: .85rem;
}
.ib-logout:hover { color: #fff; }

/* ---------- Carduri si metrici ---------- */
.ib-card { border: 1px solid #e5e8ef; border-radius: .6rem; box-shadow: none; }
.ib-card > .card-header { background: #fff; font-weight: 600; padding: .8rem 1rem; }
.ib-card .table > :not(caption) > * > * { padding: .65rem 1rem; }
.ib-card thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: #6b7280; font-weight: 600; }
.ib-metric { background: #fff; border: 1px solid #e5e8ef; border-radius: .6rem; padding: 1rem 1.1rem; height: 100%; }
.ib-metric-label { font-size: .8rem; color: #6b7280; display: flex; align-items: center; gap: .4rem; }
.ib-metric-value { font-size: 1.75rem; font-weight: 600; margin-top: .25rem; }

/* ---------- Liste si formulare ---------- */
.ib-search { max-width: 340px; }
.ib-card .card-body { padding: 1rem 1.1rem; }
.ib-card .form-label { font-size: .82rem; color: #4b5563; margin-bottom: .3rem; }
.ib-table-click tbody tr { position: relative; }
.ib-table-click .stretched-link-row::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.ib-table-click td .btn { position: relative; z-index: 2; }

/* ---------- Grafice simple (fara biblioteci) ---------- */
.ib-chart { display: flex; align-items: flex-end; gap: 3px; height: 180px; padding-top: 1.2rem; }
.ib-chart-col { flex: 1 1 0; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.ib-chart-bar { width: 100%; min-height: 2px; background: var(--ib-sidebar-active); border-radius: 3px 3px 0 0; }
.ib-chart-bar.weekend { background: #93b4f5; }
.ib-chart-col:hover .ib-chart-bar { background: #1d4ed8; }
.ib-chart-val { font-size: .68rem; color: #6b7280; line-height: 1.2; }
.ib-chart-label { font-size: .68rem; color: #6b7280; height: 1.1rem; white-space: nowrap; overflow: visible; }
@media (max-width: 767.98px) { .ib-chart-val { display: none; } .ib-chart { gap: 1px; } }
.ib-hbar { background: #eef1f6; border-radius: 4px; height: 8px; }
.ib-hbar > div { background: var(--ib-sidebar-active); height: 100%; border-radius: 4px; }

/* ---------- Login ---------- */
.ib-login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem;
    background: var(--ib-sidebar-bg); }
.ib-login-card { width: 100%; max-width: 380px; background: #fff; border-radius: .8rem; padding: 2rem; }
