

body { font-family: sans-serif; margin: 0; background-color: #f4f4f4; }
.container { display: flex; }
.sidebar {
    width: 230px;
    background: #2c3e50;
    color: #ecf0f1;
    padding: 20px 0;
    min-height: 100vh;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}
.sidebar h2 {
    margin-top: 0;
    padding: 0 20px 20px 20px;
    font-size: 1.5em;
    border-bottom: 1px solid #34495e;
    margin-bottom: 20px;
}
.sidebar nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar nav ul li a {
    color: #ecf0f1;
    text-decoration: none;
    display: block;
    padding: 12px 20px;
    font-size: 0.95em;
    position: relative;
    transition: background-color 0.3s ease, color 0.3s ease, padding-left 0.3s ease;
    overflow: hidden;
}


.sidebar nav ul li a:hover {
    background-color: #34495e;
    color: #ffffff;
    padding-left: 25px;
}


.sidebar nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background-color: #1abc9c;
    transition: width 0.3s ease-in-out;
}

.sidebar nav ul li a:hover::after {
    width: 100%;
}


.sidebar nav ul li a.active-link {
    background-color: #1abc9c;
    color: #ffffff;
    font-weight: bold;
    padding-left: 25px;
}

.sidebar nav ul li a.active-link::after {
    width: 100%;
    background-color: #ffffff;
}


.content { flex-grow: 1; padding: 20px; }
.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 5px; }
.form-group input[type="text"],
.form-group input[type="number"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 8px;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 4px;
}
button, .button {
    background: #5cb85c;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.2s ease;
}
button:hover, .button:hover { background: #4cae4c; }
button.danger { background: #d9534f; }
button.danger:hover { background: #c9302c; }
table { width: 100%; border-collapse: collapse; margin-top: 20px; }
th, td { border: 1px solid #ddd; padding: 8px; text-align: left; }
th { background-color: #f2f2f2; }
.message { padding: 10px; margin-bottom: 15px; border-radius: 4px; }
.message.success { background-color: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.message.error { background-color: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.message.info { background-color: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }
.scan-result { border: 1px solid #ccc; padding: 15px; margin-top: 20px; background-color: #fff; }


.dashboard-stats { display: flex; gap: 20px; margin-top: 20px; flex-wrap: wrap;}
.stat-card { background: #fff; padding: 20px; border-radius: 5px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); flex: 1; min-width: 200px; }
.stat-card h3 { margin-top: 0; font-size: 1.1em; color: #34495e; }
.stat-card p { font-size: 1.8em; font-weight: bold; margin: 10px 0 0; color: #2c3e50; }


.shipment-item-row { border: 1px solid #eee; padding: 10px; margin-bottom: 10px; background: #f9f9f9; border-radius: 4px; }
.shipment-item-row label {
   
    margin-right: 5px;
}
.shipment-item-row input[type="text"], .shipment-item-row input[type="number"] {
    margin-bottom: 5px;
    width: calc(50% - 60px);
    display: inline-block;
    vertical-align: middle;
}
.shipment-item-row .remove-item-btn {
   
    margin-left: 10px;
    vertical-align: middle;
}


.shipment-info { background: #f9f9f9; padding: 15px; border-radius: 5px; margin-bottom: 20px; }
.picked-complete { background-color: #d4edda !important; color: #155724; }
.picked-partial { background-color: #fff3cd !important; color: #856404; }
.picked-complete-js {
    background-color: #d4edda;
    transition: background-color 0.5s ease;
}





body {
    font-size: 16px;
}

img, video, iframe {
    max-width: 100%;
    height: auto;
}


.container {
    display: flex;
    flex-direction: row;
}

.sidebar {
    width: 230px;
   
    transition: width 0.3s ease;
}

.content {
    flex-grow: 1;
    padding: 15px;
    overflow-x: auto;
}


.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="email"],
.form-group textarea,
.form-group select {
   
   
    font-size: 1em;
}

button, .button {
    padding: 12px 18px;
    font-size: 1em;
    width: auto;
}


.form-group button, .form-group .button {
   
   
   
}



table {
   
    font-size: 0.9em;
}
th, td {
    padding: 6px;
    word-break: break-word;
}





@media (max-width: 992px) {
    .sidebar {
        width: 200px;
    }
    .sidebar h2 {
        font-size: 1.3em;
    }
    .sidebar nav ul li a {
        padding: 10px 15px;
        font-size: 0.9em;
    }
    .content {
        padding: 15px;
    }
   
    .courier-item-card {
        min-width: calc(33.333% - 10px);
    }
}



@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        min-height: auto;
        padding-bottom: 10px;
        position: relative;
    }
    .sidebar h2 {
        text-align: center;
        margin-bottom: 10px;
        border-bottom: none;
    }
    .sidebar nav ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }
    .sidebar nav ul li {
       
        text-align: center;
    }
    .sidebar nav ul li a {
        padding: 10px 12px;
        border-bottom: 1px solid #34495e;
    }
    .sidebar nav ul li a::after {
        display: none;
    }
    .sidebar nav ul li a:hover {
        padding-left: 12px;
        background-color: #34495e;
    }
    .sidebar nav ul li a.active-link {
        padding-left: 12px;
        background-color: #1abc9c;
    }
    .sidebar nav ul li a.active-link::after {
        display: none;
    }


    .content {
        width: 100%;
        padding: 10px;
    }

   
    .shipment-item-row label,
    .shipment-item-row input[type="text"],
    .shipment-item-row input[type="number"] {
        width: 100%;
        display: block;
        margin-bottom: 5px;
    }
    .shipment-item-row input[type="text"],
    .shipment-item-row input[type="number"] {
         width: calc(100% - 16px);
    }

    .shipment-item-row .remove-item-btn {
        float: none;
        display: block;
        width: 100px;
        margin: 10px auto 0 auto;
    }

   
    #scanClientItemForm .form-group {
        margin-bottom: 10px;
    }
    #scanClientItemForm button[type="submit"] {
        width: 100%;
        padding: 15px;
    }

    .dashboard-stats {
        flex-direction: column;
    }
    .stat-card {
        min-width: unset;
        margin-bottom: 10px;
    }

   
    .courier-grid {
       
    }
    .courier-item-card {
        min-width: calc(50% - 8px);
       
        margin-bottom: 10px;
    }
}



@media (max-width: 576px) {
    body {
        font-size: 15px;
    }
    .content {
        padding: 10px 5px;
    }
    h1 {
        font-size: 1.5em;
    }
    th, td {
        padding: 4px;
        font-size: 0.85em;
    }

    .sidebar nav ul li a {
        font-size: 0.85em;
        padding: 8px 10px;
    }

   
    .message {
        font-size: 0.9em;
    }

   
    .courier-item-card {
         min-width: 100%; 
    }
    .courier-grid {
        flex-direction: column;
    }
}


@media print {
    body * {
        visibility: hidden;
    }
    .manifest-print-area, .manifest-print-area * {
        visibility: visible;
    }
    .manifest-print-area {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        margin: 0;
        padding: 10px;
        font-size: 10pt;
        color: #000;
    }

   
    .sidebar, 
    .content > h1:first-of-type,
    .manifest-form, 
    .print-button-container, 
    .message,
    header {
        display: none !important;
    }

    .manifest-title-print {
        text-align: center;
        font-size: 16pt !important;
        font-weight: bold;
        margin-bottom: 15px !important;
        color: #000 !important;
    }

    .manifest-info-table {
        width: 100% !important;
        margin-bottom: 15px !important;
        border-collapse: collapse !important;
        border: none !important;
    }
    .manifest-info-table td {
        padding: 2px 3px !important;
        border: none !important;
        font-size: 9pt !important;
        vertical-align: top;
    }
    .manifest-info-table strong {
        font-weight: bold;
    }

    .manifest-print-area h3 {
        font-size: 12pt !important;
        margin-top: 20px !important;
        margin-bottom: 5px !important;
        color: #000 !important;
        border-bottom: 1px solid #000;
        padding-bottom: 2px;
    }
    
    .barcode-list-table {
        width: 100% !important;
        border-collapse: collapse !important;
        margin-top: 5px !important;
        font-size: 9pt !important;
    }
    .barcode-list-table th, .barcode-list-table td {
        border: 1px solid #000 !important;
        padding: 3px 5px !important;
        text-align: left !important;
        color: #000 !important;
    }
    .barcode-list-table th {
        background-color: #f0f0f0 !important;
        font-weight: bold;
    }

   
    body, .manifest-print-area, .barcode-list-table th, .barcode-list-table td {
        background-color: #fff !important;
        color: #000 !important;
    }
    
   
    * {
        box-shadow: none !important;
        text-shadow: none !important;
    }

   
    table {
        page-break-inside: auto;
    }
    tr {
        page-break-inside: avoid;
        page-break-after: auto;
    }
    thead {
        display: table-header-group;
    }
    tfoot {
        display: table-footer-group;
    }
}




.barcode-list-table.three-column-barcodes { 
    width: 100%; 
    table-layout: fixed;
    border-collapse: collapse;
}
.barcode-list-table.three-column-barcodes th,
.barcode-list-table.three-column-barcodes td { 
    border: 1px solid #ccc; 
    padding: 3px 5px;
    text-align: center; 
    word-break: break-all; 
    font-size: 0.8em;
    vertical-align: top;
}
.barcode-list-table.three-column-barcodes th { 
    background-color: #f2f2f2; 
    font-weight: bold;
}


.barcode-list-table.three-column-barcodes th:nth-child(odd),
.barcode-list-table.three-column-barcodes td.item-number { 
    width: 6%;
    text-align: center; 
    padding-right: 5px;
    color: #444;
}
.barcode-list-table.three-column-barcodes th:nth-child(even),
.barcode-list-table.three-column-barcodes td.barcode-value { 
    width: 27.33%;
}

@media print {
    .barcode-list-table.three-column-barcodes th,
    .barcode-list-table.three-column-barcodes td {
        font-size: 10pt;
        padding: 2px 3px;
        border: 1px solid #000 !important;
    }
    .barcode-list-table.three-column-barcodes th {
        background-color: #eee !important;
    }
     .manifest-title-print { font-size: 14pt; }
     .manifest-info-table { font-size: 8pt; }
     h3 {font-size: 10pt;}
}


.form-row { 
    display: flex; 
    flex-wrap: wrap;
    gap: 15px; 
    margin-bottom: 15px; 
}
.form-row .form-group { 
    flex: 1; 
    min-width: 200px;
}



#live-update-indicator {
    position: fixed;
    bottom: 10px;
    right: 10px;
    background-color: #d9534f;
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.9em;
    font-weight: bold;
    z-index: 1000;
    display: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

#live-update-indicator .update-status {
    font-weight: normal;
    font-size: 0.85em;
    margin-left: 5px;
}



#live-status-indicator {
    position: fixed;
    bottom: 10px;
    right: 10px;
    background-color: #5cb85c;
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8em;
    z-index: 1000;
    opacity: 0.9;
    transition: all 0.3s ease;
    display: none;
}


.new-entry-highlight {
    background-color: rgba(255, 255, 0, 0.2) !important;
    transition: background-color 2s ease;
}


#log-table-body {
    transition: opacity 0.3s ease;
}

.new-entries-notification {
    position: fixed;
    bottom: 100px;
    right: 20px;
    background: #5cb85c;
    color: white;
    padding: 10px 15px;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 1000;
    transition: opacity 0.5s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.new-entries-notification button.close-notif {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.2em;
    cursor: pointer;
    padding: 0 0 0 5px;
    line-height: 1;
}


.new-entry {
    background-color: #f8ffd6 !important;
    transition: background-color 1s ease;
}


#autoSearchLoading {
    transition: opacity 0.3s ease;
    font-size: 0.9em;
    color: #666;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}