*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #ffffff;
    overflow: hidden;
}

.split-layout {
    display: grid;
    grid-template-columns: 1fr;
    align-content: start;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.split-layout::-webkit-scrollbar {
    display: none;
}

.left-panel {
    padding: 20px;
    background-color: #f5f5f5;
    width: 100%;
}

/* RIGHT PANEL STYLES - Commented out for future use */
/*
.right-panel {
    border-left: 2px solid #ddd;
    background-color: white;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
*/

.container {
    background-color: white;
    padding: 20px;
    border: 1px solid #ddd;
    margin-bottom: 20px;
}

h1 {
    color: #333;
    margin-top: 0;
    margin-bottom: 30px;
    font-size: 24px;
}

h2 {
    margin-top: 0;
    color: #333;
    font-size: 20px;
    margin-bottom: 20px;
}

.search-container {
    background-color: white;
    padding: 20px;
    border-bottom: 2px solid #ddd;
    margin-bottom: 20px;
}

.search-form {
    width: 100%;
}

.search-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #ddd;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: #4CAF50;
}

.tracking-search-results {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.tracking-result-item {
    width: 100%;
    padding: 10px 16px;
    border: 2px solid #ddd;
    background-color: white;
    font-size: 15px;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.3s;
}

.tracking-result-item:hover {
    border-color: #4CAF50;
}

.form-group {
    flex: 1;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

input[type="text"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    font-size: 14px;
    box-sizing: border-box;
}

input[type="text"]:focus {
    outline: none;
    border-color: #333;
}

.btn {
    background-color: #333;
    color: white;
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.btn:hover {
    background-color: #555;
}

#searchMessage {
    font-weight: bold;
}

#searchMessage.success {
    background-color: #e8f5e8;
    color: #2d5d2d;
    border: 1px solid #ccc;
}

#searchMessage.error {
    background-color: #f8e8e8;
    color: #5d2d2d;
    border: 1px solid #ccc;
}

#searchMessage.searching {
    background-color: #e8f0f8;
    color: #2d4d5d;
    border: 1px solid #ccc;
}

.order-details-section {
    background-color: white;
    border: 1px solid #ddd;
    padding: 20px;
    margin-top: 0;
    position: relative;
}

.order-details-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    color: #555;
    z-index: 10;
}

.order-details-section h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-size: 18px;
}

.order-details-two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 25px;
}

.order-details-column {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.order-detail-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.order-detail-row .label {
    font-size: 11px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.order-detail-row .value {
    font-size: 14px;
    color: #333;
    font-weight: 400;
}

.shipping-address-section {
    background-color: #f9f9f9;
    padding: 20px;
    border: 1px solid #ddd;
    margin-bottom: 25px;
    border-radius: 4px;
}

.shipping-address-section h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.address-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.address-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.address-row .label {
    font-size: 10px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.address-row .value {
    font-size: 13px;
    color: #333;
    font-weight: 400;
}

.status {
    padding: 4px 8px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    background-color: #fefefe;
    margin: 5vh auto;
    padding: 0;
    border: none;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    animation: slideIn 0.3s ease-out;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 18px;
}

.modal-header.success {
    background-color: #d4edda;
    color: #155724;
    border-radius: 8px 8px 0 0;
}

.modal-header.error {
    background-color: #f8d7da;
    color: #721c24;
    border-radius: 8px 8px 0 0;
}

.modal-header.loading {
    background-color: #d1ecf1;
    color: #0c5460;
    border-radius: 8px 8px 0 0;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    text-align: right;
    background-color: #f8f9fa;
    border-radius: 0 0 8px 8px;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    background: none;
    border: none;
}

.close:hover {
    color: #000;
}

.btn-modal {
    background-color: #007bff;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 10px;
}

.btn-modal:hover {
    background-color: #0056b3;
}

.btn-modal.secondary {
    background-color: #6c757d;
}

.btn-modal.secondary:hover {
    background-color: #545b62;
}

.btn-reprint {
    background-color: #6c757d;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-reprint:hover {
    background-color: #5a6268;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

.btn-reprint:disabled {
    background-color: #999;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dispatch-details {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    margin: 15px 0;
}

.dispatch-details h4 {
    margin-top: 0;
    color: #333;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.detail-label {
    font-weight: bold;
    color: #666;
}

.detail-value {
    color: #333;
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.package-form {
    background-color: white;
    padding: 20px;
    border: 1px solid #ddd;
    margin-top: 20px;
    width: 100%;
    box-sizing: border-box;
}

.order-info {
    margin-bottom: 20px;
    padding: 10px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
}

.package-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}

.dimensions-section {
    border: 1px solid #ddd;
    padding: 15px;
    background-color: #fafafa;
}

.dimensions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.field-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 3px;
    color: #333;
    font-size: 12px;
}

.field-group input[type="number"] {
    padding: 6px;
    border: 1px solid #ccc;
    font-size: 12px;
    width: 100%;
    box-sizing: border-box;
}

.calculated-info {
    margin: 10px 0;
    padding: 8px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    font-size: 12px;
}

.button-group {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.btn-add {
    background-color: #333;
    color: white;
    padding: 8px 15px;
    border: none;
    cursor: pointer;
    font-size: 12px;
}

.btn-reset {
    background-color: #999;
    color: white;
    padding: 8px 15px;
    border: none;
    cursor: pointer;
    font-size: 12px;
}

.package-stats {
    margin-top: 15px;
    padding: 10px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    font-size: 12px;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
}

.stat-item {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 10px;
    color: #666;
}

.stat-value {
    display: block;
    font-size: 12px;
    font-weight: bold;
    color: #333;
}

.packages-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    border: 1px solid #ccc;
}

.packages-table th {
    background-color: #f0f0f0;
    color: #333;
    font-weight: bold;
    font-size: 11px;
    padding: 8px 6px;
    text-align: left;
    border-bottom: 1px solid #ccc;
}

.packages-table td {
    padding: 6px;
    text-align: left;
    border-bottom: 1px solid #eee;
    background-color: white;
}

.empty-packages {
    text-align: center;
    color: #666;
    padding: 20px;
    background-color: #f8f8f8;
}

.delete-btn {
    background-color: #999;
    color: white;
    border: none;
    padding: 3px 6px;
    cursor: pointer;
    font-size: 10px;
}

.delete-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.5;
}

.packages-table tr.dispatched {
    background-color: #f0f8f0;
}

.status-dispatched {
    color: #2d5d2d;
    background-color: #d4edda;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: bold;
}

.status-pending {
    color: #856404;
    background-color: #fff3cd;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: bold;
}

.dispatched-packages {
    margin-top: 20px;
    padding: 20px 30px 25px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.dispatched-packages h3 {
    margin: 0 0 10px;
    font-size: 14px;
    color: #333;
}

.consignment-meta {
    font-size: 12px;
    color: #555;
    margin-bottom: 12px;
    line-height: 1.7;
}

.dispatch-section {
    margin-top: 20px;
    padding: 30px;
    background-color: #f0f8ff;
    border: 2px solid #add8e6;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
}


.btn-dispatch {
    background-color: #2e8b57;
    color: white;
    padding: 16px 40px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    text-transform: uppercase;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: block;
}

.btn-dispatch:hover {
    background-color: #228b22;
    transform: translateY(-1px);
}

.btn-dispatch:disabled {
    background-color: #999;
    cursor: not-allowed;
    transform: none;
}

.dispatch-info {
    margin-top: 10px;
    font-size: 12px;
    color: #28a745;
}

.post-dispatch-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    margin-top: 0;
}

.dispatch-info.dispatched-status {
    text-align: center;
    padding: 10px;
    background-color: #d4edda;
    border: 1px solid #28a745;
    border-radius: 4px;
    color: #155724;
}

.dispatch-info.not-dispatched-warning {
    text-align: center;
    padding: 10px;
    background-color: #ffebee;
    border: 1px solid #e53935;
    border-radius: 4px;
    color: #c62828;
    font-weight: 500;
}

.dispatch-info .dispatch-time {
    font-size: 11px;
    color: #666;
}

.btn-reprint {
    background-color: #007bff;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    min-width: 120px;
}

.btn-reprint:hover:not(:disabled) {
    background-color: #0056b3;
    transform: translateY(-1px);
}

.btn-reprint:disabled {
    background-color: #999;
    cursor: not-allowed;
    transform: none;
}

.btn-delivery-slip {
    background-color: #17a2b8;
    color: white;
    padding: 12px 28px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    min-width: 160px;
}

.btn-delivery-slip:hover:not(:disabled) {
    background-color: #138496;
    transform: translateY(-1px);
}

.btn-delivery-slip:disabled {
    background-color: #999;
    cursor: not-allowed;
    transform: none;
}

.order-lines-section {
    background-color: white;
    border: 1px solid #ddd;
    padding: 20px;
    margin-top: 20px;
}

.order-lines-section h3 {
    margin-top: 0;
    margin-bottom: 0;
    color: #333;
    font-size: 18px;
}

.delivery-order-tabs {
    margin: 15px 0;
}

.delivery-columns-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 12px;
}

.picking-column {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.picking-column-label {
    font-size: 11px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-bottom: 4px;
    border-bottom: 1px solid #ddd;
}

.picking-column-other {
    margin-top: 8px;
}

.picking-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.picking-tab {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 16px;
    border: 2px solid #ddd;
    border-radius: 6px;
    background: #f9f9f9;
    cursor: pointer;
    font-size: 13px;
    min-width: 140px;
    transition: all 0.2s;
}

.picking-tab:hover:not([disabled]) {
    border-color: #1565c0;
    background: #e3f2fd;
}

.picking-tab.active {
    border-color: #1565c0;
    border-left: 4px solid #1565c0;
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    box-shadow: 0 0 12px rgba(21, 101, 192, 0.4), 0 0 4px rgba(21, 101, 192, 0.2) inset;
    transform: scale(1.02);
}

.picking-tab.tab-done {
    border-color: #28a745;
    background: #d4edda;
}

.picking-tab.tab-done.active {
    border-color: #28a745;
    border-left: 4px solid #28a745;
    background: linear-gradient(135deg, #c3e6cb, #a3d9a5);
    box-shadow: 0 0 12px rgba(40, 167, 69, 0.4), 0 0 4px rgba(40, 167, 69, 0.2) inset;
    transform: scale(1.02);
}

.picking-tab.tab-ready {
    border-color: #1565c0;
}

.picking-tab.tab-ready.active {
    border-left: 4px solid #1565c0;
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    box-shadow: 0 0 12px rgba(21, 101, 192, 0.4), 0 0 4px rgba(21, 101, 192, 0.2) inset;
    transform: scale(1.02);
}

.picking-tab.tab-waiting {
    border-color: #999;
    background: #f0f0f0;
    color: #999;
}

.picking-tab.tab-cancelled {
    border-color: #dc3545;
    background: #f8d7da;
    color: #721c24;
    cursor: not-allowed;
    opacity: 0.6;
}

.picking-tab[disabled] {
    cursor: not-allowed;
    opacity: 0.5;
}

.tab-name {
    font-weight: bold;
    font-size: 13px;
}

.tab-state {
    font-size: 11px;
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tab-date {
    font-size: 10px;
    color: #666;
    margin-top: 2px;
}

.tab-backorder {
    font-size: 10px;
    color: #888;
    margin-top: 2px;
    font-style: italic;
}

.dispatch-status-banner {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.dispatch-status-banner.dispatched {
    background-color: #d4edda;
    border: 1px solid #28a745;
    color: #155724;
}

.dispatch-status-banner.ready {
    background-color: #cce5ff;
    border: 1px solid #007bff;
    color: #004085;
}

.dispatch-status-banner.waiting {
    background-color: #ffebee;
    border: 1px solid #e53935;
    color: #c62828;
}

.dispatch-status-banner .banner-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dispatch-status-banner .banner-icon {
    font-size: 18px;
    font-weight: bold;
}

.dispatch-status-banner .banner-text {
    font-size: 14px;
    font-weight: 500;
}

.picking-selector {
    margin-bottom: 15px;
}

.picking-selector-label {
    font-size: 12px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.picking-selector-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.picking-selector-btn {
    padding: 8px 14px;
    border-radius: 6px;
    border: 1px solid #ccc;
    background-color: #f8f9fa;
    color: #333;
    font-size: 13px;
    cursor: pointer;
}

.picking-selector-btn:hover {
    filter: brightness(0.95);
}

.picking-selector-btn.state-done {
    background-color: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.picking-selector-btn.state-assigned {
    background-color: #fff3cd;
    border-color: #e0a800;
    color: #856404;
}

.picking-selector-btn.state-waiting {
    background-color: #f1f1f1;
    border-color: #ccc;
    color: #666;
}

.picking-selector-btn.active {
    box-shadow: 0 0 0 2px #007bff;
    border-color: #007bff;
}

.picking-selector-state {
    font-size: 11px;
    opacity: 0.8;
}

#home-view {
    min-height: 100vh;
}

#dispatch-view {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.dispatch-view-header {
    padding: 12px 16px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.toolbar-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.back-btn.test-mode-active {
    border-color: #d97706;
    color: #d97706;
}

.back-btn.test-mode-active:hover {
    background: #d97706;
    color: #fff;
}

.back-btn.tracking-search-active {
    border-color: #d97706;
    color: #d97706;
}

.back-btn.tracking-search-active:hover {
    background: #d97706;
    color: #fff;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    border: 1.5px solid #2e8b57;
    color: #2e8b57;
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.back-btn:hover {
    background: #2e8b57;
    color: #fff;
}

.ready-list-container {
    background: #f8f9fa;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.ready-list-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    flex-wrap: wrap;
    gap: 12px;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ready-list-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.count-badge {
    background: #2e8b57;
    color: #fff;
    border-radius: 12px;
    padding: 2px 10px;
    font-size: 13px;
    font-weight: 600;
}

.last-refreshed {
    font-size: 12px;
    color: #888;
}

.refresh-btn,
.view-toggle-btn {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 13px;
    color: #555;
}

.refresh-btn:hover,
.view-toggle-btn:hover {
    background: #f0f0f0;
}

.view-toggle-btn.active {
    background: #2e8b57;
    color: #fff;
    border-color: #2e8b57;
}

.sort-dropdown {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 13px;
    color: #555;
    cursor: pointer;
}

.ready-list-content {
    padding: 0;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.ready-list-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.ready-list-table th {
    background: #f5f5f5;
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
    color: #555;
    border-bottom: 2px solid #e0e0e0;
}

.ready-list-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #f0f0f0;
    color: #333;
}

.ready-list-table tr:hover {
    background: #f0faf5;
    cursor: pointer;
}

.ready-list-table tr.pack-sub-row {
    background: #fff0f0;
    border-left: 4px solid #e53935;
    cursor: default;
}

.ready-list-table tr.pack-sub-row:hover {
    background: #ffebee;
}

.pack-sub-content {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding-left: 1.5rem;
    font-size: 0.85rem;
}

.pack-sub-indent {
    color: #aaa;
    font-family: monospace;
    flex-shrink: 0;
}

.pack-sub-name {
    color: #c62828;
    font-weight: 600;
}

.pack-sub-label {
    color: #c62828;
    font-size: 0.8rem;
    font-style: italic;
}

.pack-sub-card {
    background: #fff0f0;
    border: 1px solid #e53935 !important;
    cursor: default !important;
    opacity: 0.9;
}

.pack-sub-indent-card {
    color: #aaa;
    font-family: monospace;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.ready-card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding: 16px;
}

.ready-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    cursor: pointer;
    transition: box-shadow 0.2s;
}

.ready-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.bmo-number {
    font-size: 16px;
    font-weight: 700;
    color: #2e8b57;
    margin-bottom: 6px;
}

.card-field {
    font-size: 13px;
    color: #333;
    font-weight: 600;
    margin-bottom: 4px;
}

.card-field span {
    color: #555;
    font-weight: 400;
}

.ready-list-empty {
    text-align: center;
    padding: 60px 20px;
    color: #888;
    font-size: 16px;
}

.ready-list-loading {
    text-align: center;
    padding: 60px 20px;
    color: #888;
}

.spinner {
    display: inline-block;
    width: 32px;
    height: 32px;
    border: 3px solid #e0e0e0;
    border-top-color: #2e8b57;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 12px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.search-manually-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    border: 1.5px solid #2e8b57;
    color: #2e8b57;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.search-manually-btn:hover {
    background: #2e8b57;
    color: #fff;
}

.warehouse-select {
    padding: 0.35rem 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    color: #333;
    font-size: 0.85rem;
    cursor: pointer;
}

.ready-list-table th.sortable {
    cursor: pointer;
    user-select: none;
}

.ready-list-table th.sortable:hover {
    background: #f0f0f0;
}

.ready-list-table th.sortable[data-dir] {
    background: #e8f5e9;
    color: #2e7d32;
}

@media (max-width: 1024px) {
    .ready-card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    body {
        overflow-y: auto;
    }

    .split-layout {
        grid-template-columns: 1fr;
        height: auto;
    }

    .delivery-columns-grid {
        grid-template-columns: 1fr;
    }

    /*
    .right-panel {
        border-left: none;
        border-top: 2px solid #ddd;
        max-height: 50vh;
    }
    */

    .package-layout {
        grid-template-columns: 1fr;
    }

    .dimensions-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .order-details-two-column {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .address-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .ready-card-grid {
        grid-template-columns: 1fr;
    }
}
