/* static/css/styles.css */

/* --- Sticky Admin Layout --- */
/* Lock the Header and Breadcrumbs together */
#header, .breadcrumbs {
    position: sticky;
    z-index: 1000;
    background: #417690; /* Default Django admin header color */
    padding: 10px 20px;
    color: #ffc;
}

#header {
    top: 0;
    height: auto; /* Ensure it doesn't clip content */
    border-bottom: 1px solid #333;
}

.breadcrumbs {
    top: 50px; /* Adjust this value if your header is taller */
    background: #f8f8f8;
    color: #333;
    border-bottom: 1px solid #ccc;
    margin: 0;
}

/* Ensure the main content doesn't hide behind the sticky header */
#container {
    padding-top: 100px; /* Adjust based on the total height of header + breadcrumbs */
}

/* --- Rest of your existing CSS --- */
body { display: flex; flex-direction: column; min-height: 100vh; background-color: #f8f9fa; }
main { flex: 1; }
/* ... keep your @media print and other styles here ... */

/* --- Alternative 1: Browser-Based PDF Generation (Print CSS) --- */
@media print {
    @page { size: A4 landscape; margin: 10mm; }
    nav, footer, .btn, .alert, .d-print-none { display: none !important; }
    body { background-color: white !important; min-height: auto; }
    main.container, main.container-fluid {
        max-width: 100% !important; width: 100% !important; margin: 0 !important; padding: 0 !important;
    }
    .table { border-collapse: collapse !important; }
    .table td, .table th { background-color: transparent !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .bg-primary { background-color: #0d6efd !important; color: white !important; }
    .bg-success { background-color: #198754 !important; color: white !important; }
    .bg-info { background-color: #0dcaf0 !important; color: black !important; }
    .bg-secondary { background-color: #6c757d !important; color: white !important; }
    .bg-dark, .table-dark th, .table-dark td { background-color: #212529 !important; color: white !important; }
    .table-warning { background-color: #ffc107 !important; color: black !important; }
    tr { page-break-inside: avoid; }
    .card { border: none !important; box-shadow: none !important; }
    .card-body { padding: 0 !important; }
}