/* CoffeeFleet – tema light/dark via CSS custom properties */
:root {
    --cf-primary: #6f4e37;
    --cf-primary-600: #5a3f2c;
    --cf-bg: #f4f1ee;
    --cf-surface: #ffffff;
    --cf-border: #e5ddd6;
    --cf-text: #2b2320;
    --cf-muted: #8a7d74;
    --cf-sidebar-bg: #2b2320;
    --cf-sidebar-text: #d8cfc7;
    --cf-sidebar-active: #6f4e37;
}
[data-bs-theme="dark"] {
    --cf-bg: #1a1613;
    --cf-surface: #241f1b;
    --cf-border: #3a322c;
    --cf-text: #ece5df;
    --cf-muted: #a2968c;
    --cf-sidebar-bg: #14100d;
    --cf-sidebar-text: #cabfb6;
    --bs-body-bg: #1a1613;
    --bs-body-color: #ece5df;
}
body { background: var(--cf-bg); color: var(--cf-text); }

/* Shell */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
    width: 240px; background: var(--cf-sidebar-bg); color: var(--cf-sidebar-text);
    display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; z-index: 1030;
    transition: transform .25s ease;
}
.sidebar-brand {
    display: flex; align-items: center; gap: .6rem; padding: 1.1rem 1.25rem;
    font-weight: 600; font-size: 1.05rem; color: #fff;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-brand i { color: var(--cf-primary); font-size: 1.4rem; }
.sidebar-nav { padding: .75rem; display: flex; flex-direction: column; gap: .15rem; }
.sidebar-nav .nav-link {
    display: flex; align-items: center; gap: .75rem; padding: .6rem .8rem;
    color: var(--cf-sidebar-text); border-radius: .5rem; font-size: .93rem;
}
.sidebar-nav .nav-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar-nav .nav-link.active { background: var(--cf-sidebar-active); color: #fff; }
.sidebar-nav .nav-link i { width: 1.2rem; text-align: center; }

.main { flex: 1; margin-left: 240px; display: flex; flex-direction: column; min-width: 0; }
.topbar {
    height: 60px; background: var(--cf-surface); border-bottom: 1px solid var(--cf-border);
    display: flex; align-items: center; gap: .5rem; padding: 0 1rem; position: sticky; top: 0; z-index: 1020;
}
.content { padding: 1.5rem; }

.btn-icon { background: transparent; border: 1px solid var(--cf-border); color: var(--cf-text); }
.btn-icon:hover { background: var(--cf-bg); }
.user-btn { background: transparent; border: 1px solid var(--cf-border); color: var(--cf-text); }

/* Carduri statistice */
.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.stat-card {
    background: var(--cf-surface); border: 1px solid var(--cf-border); border-radius: .75rem;
    padding: 1rem 1.15rem; display: flex; align-items: center; gap: .9rem; height: 100%;
}
.stat-card[class*="border-start-"] { border-left-width: 4px; }
.stat-icon { font-size: 1.7rem; }
.stat-value { font-size: 1.6rem; font-weight: 700; line-height: 1; }
.stat-label { color: var(--cf-muted); font-size: .82rem; margin-top: .2rem; }

.card-panel {
    background: var(--cf-surface); border: 1px solid var(--cf-border);
    border-radius: .75rem; padding: 1.25rem;
}

/* Auth */
.auth-body {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #2b2320, #6f4e37); padding: 1rem;
}
.auth-card {
    width: 100%; max-width: 380px; background: var(--cf-surface);
    border-radius: 1rem; padding: 2rem; box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.auth-logo { font-size: 2.6rem; color: var(--cf-primary); }

/* Mobil */
@media (max-width: 991.98px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main { margin-left: 0; }
}

.btn-primary { --bs-btn-bg: var(--cf-primary); --bs-btn-border-color: var(--cf-primary);
    --bs-btn-hover-bg: var(--cf-primary-600); --bs-btn-hover-border-color: var(--cf-primary-600); }

/* ---------- Print (Rapoarte → PDF) ---------- */
.print-only { display: none; }
@media print {
    .sidebar, .topbar, .no-print { display: none !important; }
    .main { margin-left: 0 !important; }
    .content { padding: 0 !important; }
    .app-shell { display: block !important; }
    .card-panel { box-shadow: none !important; border: 1px solid #ccc; }
    .print-only { display: block; }
    a[href]::after { content: ""; } /* fără URL-uri lungi în print */
    table { font-size: 12px; }
    body { background: #fff !important; }
    .page-head { border-bottom: 2px solid #333; padding-bottom: .5rem; }
}
@page { margin: 1.4cm; }
