.manifest-controls { padding: 24px; background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 16px; box-shadow: var(--shadow); margin-bottom: 24px; }
.manifest-panel-heading,.manifest-preview-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.manifest-panel-heading h2,.manifest-preview-heading h2 { font-size: 1.1rem; color: var(--text-primary); }
.manifest-panel-heading p,.manifest-preview-heading span { color: var(--text-secondary); font-size: .85rem; margin-top: 5px; }
.manifest-badge { padding: 7px 14px; background: rgba(102,126,234,.12); color: var(--primary-color); border-radius: 20px; font-size: .8rem; font-weight: 700; }
.manifest-controls form { display: grid; grid-template-columns: minmax(150px,1fr) auto minmax(180px,1.3fr) minmax(140px,1fr) auto; gap: 16px; align-items: end; }
.manifest-controls label { display: grid; gap: 8px; font-size: .85rem; font-weight: 700; color: var(--text-primary); min-width: 0; }
.manifest-controls input,.manifest-controls select { width: 100%; min-width: 0; min-height: 46px; padding: 10px 12px; background: var(--bg-color); color: var(--text-primary); border: 1px solid var(--border-color); border-radius: 9px; font: inherit; }
.manifest-controls input:focus,.manifest-controls select:focus { outline: 2px solid var(--primary-color); outline-offset: 2px; }
.manifest-controls .btn { min-height: 46px; justify-content: center; }
.manifest-controls .btn:disabled { opacity: .5; cursor: not-allowed; }
.manifest-note { color: var(--text-secondary); font-size: .82rem; line-height: 1.9; margin-top: 18px; padding: 12px 16px; background: var(--bg-color); border-radius: 8px; }
#manifestStatus { color: var(--primary-color); font-size: .85rem; margin-top: 12px; }
.manifest-preview { min-width: 0; border: 1px solid var(--border-color); border-radius: 16px; padding: 20px; background: var(--bg-color); }
#manifestPages { max-width: 100%; overflow-x: auto; }
.manifest-empty { padding: 55px 16px; text-align: center; color: var(--text-secondary); }
.manifest-empty > span { display: block; font-size: 2.5rem; margin-bottom: 15px; }
.manifest-empty h3 { color: var(--text-primary); margin-bottom: 8px; }
.main-content { min-width: 0; }
@media (max-width: 1250px) { .manifest-controls form { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 600px) { .manifest-controls,.manifest-preview { padding: 16px; } .manifest-controls form { grid-template-columns: minmax(0,1fr); } }
.manifest-sheet { box-sizing: border-box; width: 210mm; min-height: 297mm; padding: 6mm; margin: 20px auto; background: white; color: black; font-family: Arial, sans-serif; }
.manifest-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.manifest-heading img { width: 50mm; max-height: 22mm; object-fit: contain; }
.manifest-sheet h2 { font-size: 23px; text-align: center; margin: 15px 0; }
.manifest-meta { display: flex; justify-content: space-between; margin: 14px 0; font-size: 19px; }
.manifest-sheet table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 19px; }
.manifest-sheet th,.manifest-sheet td { border: 1px solid black; text-align: center; padding: 3px; height: 7mm; overflow-wrap: anywhere; }
.manifest-sheet th { border-width: 2px; font-weight: 700; }
.manifest-sheet tbody td { font-size: 20px; font-weight: 500; }
.manifest-plate { display: inline-block; white-space: nowrap; overflow-wrap: normal; }
.manifest-total { border: 2px solid black; padding: 10px; margin-top: 15px; font-weight: bold; }
.manifest-sheet td.manifest-bill { white-space: nowrap; overflow-wrap: normal; direction: ltr; font-variant-numeric: tabular-nums; font-size: 18px; }
.manifest-company-total { display: flex; justify-content: space-between; gap: 12px; border: 3px solid black; padding: 12px; margin-top: 12px; font-size: 18px; break-inside: avoid; }
.manifest-total { break-inside: avoid; }
.manifest-footer { text-align: center; margin-top: 10px; font-size: 12px; }
@media screen and (max-width: 750px) { #manifestPages { overflow-x: auto; } .manifest-sheet { margin: 15px 0; } }
@page { size: A4 portrait; margin: 6mm; }
@media print {
 body { background: white; margin: 0; }
 .sidebar,.sidebar-overlay,.main-content > .header,.page-header,.manifest-controls,.manifest-preview-heading,.manifest-empty { display: none !important; }
 .dashboard,.main-content,.content,.manifest-preview,#manifestPages { display: block !important; margin: 0 !important; padding: 0 !important; width: 100% !important; max-width: none !important; overflow: visible !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; background: white !important; }
 body.sidebar-collapsed .main-content { margin: 0; }
 .manifest-sheet { width: 100%; min-height: 0; padding: 0; margin: 0; break-after: page; page-break-after: always; }
 .manifest-sheet:last-child { break-after: auto; page-break-after: auto; }
 .manifest-sheet table { font-size: 15px; line-height: 1.15; }
 .manifest-sheet tbody td,.manifest-sheet td.manifest-bill { font-size: 16px; }
 .manifest-sheet th,.manifest-sheet td { padding: 0 2px; height: 7mm; }
 .manifest-sheet th { height: 6mm; }
 .manifest-sheet h2 { font-size: 19px; margin: 6px 0; }
 .manifest-meta { font-size: 16px; margin: 6px 0; }
 .manifest-heading img { max-height: 14mm; }
 .manifest-total { font-size: 15px; padding: 5px; margin-top: 6px; }
 .manifest-company-total { font-size: 17px; padding: 6px; margin-top: 6px; }
 .manifest-footer { margin-top: 6px; }
 .manifest-sheet .report-print-footer { margin-top: 6px; padding-top: 6px; }
 .manifest-sheet tr { break-inside: avoid; }
}
