/* ===================================================
   app.css – Stiluri ChickCost
   =================================================== */

/* Variabile */
:root {
    --sidebar-width: 260px;
    --sidebar-bg:    #212529;
    --sidebar-text:  #adb5bd;
    --sidebar-hover: #ffffff;
    --sidebar-active-bg: rgba(255, 255, 255, 0.1);
    --content-bg:    #f0f2f5;
    --card-radius:   0.75rem;
}

/* Layout principal */
body {
    background-color: var(--content-bg);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

#wrapper {
    min-height: 100vh;
}

/* ---- Sidebar ---- */
#sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    min-height: 100vh;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
    letter-spacing: 0.03em;
}

.sidebar-brand .bi {
    font-size: 1.5rem;
    color: #ffc107;
}

#sidebar .nav-link {
    color: var(--sidebar-text);
    border-radius: 0.5rem;
    padding: 0.55rem 0.85rem;
    font-size: 0.92rem;
    transition: background 0.15s, color 0.15s;
}

#sidebar .nav-link:hover {
    background-color: var(--sidebar-active-bg);
    color: var(--sidebar-hover);
}

#sidebar .nav-link.active {
    background-color: #0d6efd;
    color: #ffffff;
}

.sidebar-divider {
    border-color: rgba(255,255,255,0.1);
    margin: 0.5rem 0;
}

.sidebar-user {
    padding-top: 0.5rem;
}

/* ---- Conținut pagină ---- */
#page-content {
    background-color: var(--content-bg);
    overflow-x: hidden;
}

/* ---- Carduri statistici ---- */
.card-stat {
    border-radius: var(--card-radius);
    transition: transform 0.15s, box-shadow 0.15s;
}

.card-stat:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.1) !important;
}

.stat-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-value {
    line-height: 1.2;
}

/* ---- Carduri generale ---- */
.card {
    border-radius: var(--card-radius);
}

/* ---- Tabele ---- */
.table th {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6c757d;
    border-bottom-width: 1px;
}

/* ---- Badges status lot ---- */
.badge-status-draft            { background-color: #6c757d; }
.badge-status-received         { background-color: #0dcaf0; color: #000; }
.badge-status-in_storage       { background-color: #0d6efd; }
.badge-status-preheated        { background-color: #6f42c1; }
.badge-status-in_incubation    { background-color: #fd7e14; }
.badge-status-candling_done    { background-color: #ffc107; color: #000; }
.badge-status-transferred_to_hatcher { background-color: #20c997; }
.badge-status-hatched          { background-color: #198754; }
.badge-status-sorted           { background-color: #0d6efd; }
.badge-status-finalized        { background-color: #198754; }
.badge-status-cancelled        { background-color: #dc3545; }

/* ---- Formulare ---- */
.form-label {
    font-weight: 500;
    font-size: 0.9rem;
}

/* ---- Wizard pași ---- */
.wizard-steps {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.wizard-step {
    flex: 1;
    min-width: 100px;
    padding: 0.6rem 0.8rem;
    border-radius: 0.5rem;
    background: #e9ecef;
    color: #6c757d;
    font-size: 0.82rem;
    font-weight: 500;
    text-align: center;
}

.wizard-step.active {
    background: #0d6efd;
    color: #fff;
}

.wizard-step.done {
    background: #198754;
    color: #fff;
}

/* ---- Mobile topbar ---- */
.mobile-topbar {
    display: none;
}

/* ---- Sidebar overlay (mobile) ---- */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
}
.sidebar-overlay.active {
    display: block;
}

/* ---- Responsive ---- */
@media (max-width: 767.98px) {
    .mobile-topbar {
        display: flex;
        align-items: center;
        gap: 1rem;
        background: var(--sidebar-bg);
        padding: 0.75rem 1rem;
        position: sticky;
        top: 0;
        z-index: 1020;
        box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    }

    .mobile-topbar .topbar-brand {
        font-size: 1.1rem;
        font-weight: 700;
        color: #fff;
        text-decoration: none;
        flex: 1;
    }

    .mobile-topbar .topbar-brand .bi-egg-fill {
        color: #ffc107;
    }

    #wrapper {
        display: block !important;
    }

    #sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100%;
        width: 280px !important;
        min-width: 280px !important;
        z-index: 1050;
        transform: translateX(-100%);
        transition: transform 0.25s ease-in-out;
        overflow-y: auto;
    }

    #sidebar.sidebar-open {
        transform: translateX(0);
    }

    #page-content {
        min-height: calc(100vh - 54px);
    }
}

/* ============================================================
   Cost highlight – card cost principal raport / show.php
   ============================================================ */
.cost-highlight {
    background: #d1fae5;
    border: 2px solid #059669;
    border-radius: 8px;
    padding: 24px;
    text-align: center;
}
.cost-highlight .cost-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #065f46;
}
.cost-highlight .cost-label {
    font-size: 1rem;
    color: #374151;
}

/* Badge-uri status loturi */
.badge-draft         { background: #6c757d; }
.badge-in_incubation { background: #0d6efd; }
.badge-hatched       { background: #198754; }
.badge-finalized     { background: #212529; }
.badge-cancelled     { background: #dc3545; }

/* Tabel raport */
.report-table th { background: #f3f4f6; font-weight: 600; }
.report-table td, .report-table th { padding: 8px 12px; }

/* Separatoare secțiuni */
.section-divider { border-top: 2px solid #e5e7eb; margin: 24px 0; }

/* ============================================================
   Print styles
   ============================================================ */
@media print {
    .sidebar,
    #sidebar,
    .no-print,
    nav,
    .btn,
    .navbar {
        display: none !important;
    }
    #page-content {
        margin-left: 0 !important;
        padding: 0 !important;
    }
    #wrapper {
        display: block !important;
    }
    .report-content {
        width: 100%;
    }
    .card {
        border: 1px solid #dee2e6 !important;
        box-shadow: none !important;
    }

    /* Mod tipărire doar raport centralizat */
    body.print-only-report .container-fluid > *:not(#raport-centralizat) {
        display: none !important;
    }
    body.print-only-report #raport-centralizat {
        display: block !important;
        box-shadow: none !important;
        border: 1px solid #dee2e6 !important;
        margin: 0 !important;
    }
    body.print-only-report #raport-centralizat .no-print {
        display: none !important;
    }
}
