/* ============================================
   Gestiune LOT – Custom Styles
   ============================================ */

/* Sidebar */
.sidebar {
    position: fixed;
    top: 56px;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding-top: 1rem;
    overflow-x: hidden;
    overflow-y: auto;
    border-right: 1px solid #dee2e6;
    width: 16.666667%; /* col-md-2 */
}

.sidebar .nav-link {
    color: #495057;
    padding: 0.4rem 1rem;
    font-size: 0.9rem;
}

.sidebar .nav-link:hover {
    color: #0d6efd;
    background-color: #e9ecef;
    border-radius: 0.25rem;
}

.sidebar .nav-link i {
    margin-right: 0.4rem;
    width: 1.2rem;
    text-align: center;
}

/* Content area offset for sidebar */
main {
    margin-left: 16.666667%;
}

@media (max-width: 767.98px) {
    .sidebar {
        display: none;
    }
    main {
        margin-left: 0;
    }
}

/* Table styles */
.table th {
    white-space: nowrap;
    font-size: 0.875rem;
}

.table td {
    font-size: 0.875rem;
    vertical-align: middle;
}

/* Flash alerts */
.alert {
    margin-bottom: 1rem;
}

/* Card dashboard */
.card-dashboard {
    transition: transform 0.2s;
    border-left: 4px solid;
}

.card-dashboard:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.card-dashboard.border-primary { border-left-color: #0d6efd; }
.card-dashboard.border-success { border-left-color: #198754; }
.card-dashboard.border-warning { border-left-color: #ffc107; }
.card-dashboard.border-info    { border-left-color: #0dcaf0; }
.card-dashboard.border-danger  { border-left-color: #dc3545; }

/* Badge lot */
.badge-lot {
    font-size: 0.75rem;
    font-weight: 500;
}

/* ============================================
   Print – Documente
   ============================================ */
@media print {
    .sidebar, .navbar, footer, .btn, .pagination,
    .filter-bar, .no-print {
        display: none !important;
    }
    main {
        margin-left: 0 !important;
    }
    .container-fluid {
        margin: 0 !important;
        padding: 0 !important;
    }
    .card {
        border: 1px solid #ccc !important;
        break-inside: avoid;
    }
    .print-header {
        display: block !important;
    }
    body {
        font-size: 12pt;
    }
    .table th, .table td {
        font-size: 10pt;
    }
    h2 {
        font-size: 16pt;
    }
}

/* Print header firma – ascuns pe ecran, vizibil la print */
.print-header {
    display: none;
}

/* ============================================
   Etichete 58x40mm
   ============================================ */
.etichete-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
}

.eticheta {
    width: 58mm;
    height: 40mm;
    border: 1px solid #333;
    border-radius: 3px;
    padding: 3mm;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 8pt;
    line-height: 1.3;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
    page-break-inside: avoid;
    break-inside: avoid;
}

.eticheta .et-denumire {
    font-weight: 700;
    font-size: 10pt;
    text-align: center;
    margin-bottom: 1mm;
    overflow: hidden;
    text-overflow: ellipsis;
}

.eticheta .et-cod {
    font-size: 7pt;
    text-align: center;
    color: #555;
    margin-bottom: 1mm;
}

.eticheta .et-lot {
    font-weight: 600;
    font-size: 9pt;
    text-align: center;
    background: #f0f0f0;
    padding: 1mm 2mm;
    border-radius: 2px;
    margin-bottom: 1mm;
}

.eticheta .et-date {
    font-size: 7pt;
    display: flex;
    justify-content: space-between;
}

.eticheta .et-greutate {
    font-weight: 600;
    font-size: 9pt;
    text-align: center;
}

/* Print special pentru pagina etichete */
@media print {
    body.page-etichete .sidebar,
    body.page-etichete .navbar,
    body.page-etichete footer,
    body.page-etichete .no-print,
    body.page-etichete .btn,
    body.page-etichete .pagination,
    body.page-etichete .etichete-form {
        display: none !important;
    }
    body.page-etichete main {
        margin-left: 0 !important;
    }
    body.page-etichete .container-fluid {
        margin: 0 !important;
        padding: 0 !important;
    }
    body.page-etichete .etichete-grid {
        gap: 0;
        padding: 0;
    }
    body.page-etichete .eticheta {
        border: 1px dashed #999;
        margin: 1mm;
    }
    @page {
        margin: 5mm;
    }
}

/* Login page */
.login-container {
    max-width: 400px;
    margin: 80px auto;
}

/* Stoc indicator */
.stoc-pozitiv { color: #198754; font-weight: 600; }
.stoc-zero    { color: #6c757d; }
.stoc-negativ { color: #dc3545; font-weight: 600; }

/* Search filter bar */
.filter-bar {
    background-color: #f8f9fa;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
}
