/* =========================================
   VNPOST RECONCILIATION - GLOBAL STYLES
   ========================================= */
body {
    font-family: 'Roboto', sans-serif;
    background-color: #f4f6f9;
    margin: 0;
    overflow-x: hidden;
    color: #334155;
}

/* --- Sidebar --- */
.sidebar {
    width: 260px;
    height: 100vh;
    position: fixed;
    background: #3b5998;
    color: #fff;
    display: flex;
    flex-direction: column;
    z-index: 1;
}

.sidebar-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h4 {
    font-weight: 700;
    margin: 0;
    font-size: 1.2rem;
}

.sidebar-header p {
    font-size: 0.75rem;
    margin-top: 5px;
    opacity: 0.8;
    text-transform: uppercase;
}

.nav-link {
    color: #d1d8e0;
    padding: 15px 20px;
    font-weight: 500;
    transition: 0.3s;
}

.nav-link i {
    width: 25px;
    text-align: center;
    margin-right: 10px;
}

.nav-link:hover,
.nav-link.is-active {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-left: 4px solid #fff;
}

.sidebar-footer {
    margin-top: auto;
    padding: 20px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
}

.sidebar-footer a {
    color: #f8f9fa;
    text-decoration: none;
    font-weight: 500;
}

.sidebar-footer a:hover {
    text-decoration: underline;
}

.btn-logout {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    color: #d1d8e0;
    padding: 10px 0;
    font-weight: 500;
}

.btn-logout:hover {
    color: #fff;
}

/* --- Main Content --- */
.main-content {
    margin-left: 260px;
    width: calc(100% - 260px);
    padding: 30px 40px;
    min-height: 100vh;
}

/* --- Cards & General Components --- */
.card-custom {
    background: #fff;
    border-radius: 12px;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    margin-bottom: 24px;
    overflow: hidden;
}

.card-header-custom {
    background-color: #fff;
    border-bottom: 1px solid #f1f5f9;
    padding: 18px 24px;
    font-weight: 700;
    color: #1e293b;
    font-size: 1.05rem;
}

/* Dashboard KPI Cards */
.kpi-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    height: 100%;
    border-left: 5px solid #ccc;
}

.kpi-card.blue {
    border-left-color: #0d6efd;
}

.kpi-card.yellow {
    border-left-color: #ffc107;
}

.kpi-card.green {
    border-left-color: #198754;
}

.kpi-card.red {
    border-left-color: #dc3545;
    background-color: #fdf5f5;
}

.kpi-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #6c757d;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.kpi-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.kpi-card.blue .kpi-value {
    color: #0d6efd;
}

.kpi-card.red .kpi-value,
.kpi-card.red .kpi-title {
    color: #dc3545;
}

.kpi-icon {
    position: absolute;
    right: 20px;
    bottom: 20px;
    font-size: 2.5rem;
    color: #dee2e6;
}

.kpi-card.blue .kpi-icon {
    color: rgba(13, 110, 253, 0.2);
}

.kpi-card.yellow .kpi-icon {
    color: rgba(255, 193, 7, 0.3);
}

.kpi-card.green .kpi-icon {
    color: rgba(25, 135, 84, 0.2);
}

.kpi-card.red .kpi-icon {
    color: rgba(220, 53, 69, 0.2);
}

/* Discrepancy Stat Cards */
.stat-card {
    border-left: 4px solid;
    padding: 20px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.stat-card.red {
    border-left-color: #ef4444;
}

.stat-card.orange {
    border-left-color: #f97316;
}

/* Shop Registration Specific */
.main-card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    position: relative;
    padding-bottom: 10px;
    margin-bottom: 25px;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 3px;
    background: #3b5998;
    border-radius: 3px;
}

.upload-zone {
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    background: #f8fafc;
    cursor: pointer;
    transition: 0.3s;
}

.upload-zone:hover {
    border-color: #3b5998;
    background: #f1f5f9;
}

.btn-save {
    background: #3b5998;
    color: #fff;
    padding: 14px 30px;
    border-radius: 12px;
    font-weight: 700;
    border: none;
    width: 100%;
    transition: all 0.3s;
}

.btn-save:hover {
    background: #2d4373;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(59, 89, 152, 0.3);
}

/* --- Tables & Filters --- */
.table-wrapper {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-top: 30px;
}

.table>thead>tr>th {
    background-color: #f8fafc;
    color: #64748b;
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: 700;
    border-bottom: 2px solid #e2e8f0;
    padding: 15px;
    white-space: nowrap;
}

.table>tbody>tr>td {
    padding: 15px;
    vertical-align: middle;
    font-size: 0.9rem;
    border-bottom: 1px solid #f1f5f9;
}

.table-hover tbody tr:hover {
    background-color: #f8fafc;
}

.filter-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 6px;
}

.form-control,
.form-select {
    border-radius: 8px;
    border-color: #cbd5e1;
    padding: 10px 15px;
}

.form-control:focus,
.form-select:focus {
    border-color: #3b5998;
    box-shadow: 0 0 0 3px rgba(59, 89, 152, 0.1);
}

/* --- Badges & Utility Typography --- */
.badge-status {
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.75rem;
}

.badge-success {
    background-color: #d1e7dd;
    color: #0f5132;
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: 500;
}

.badge-primary {
    background-color: #cfe2ff;
    color: #084298;
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: 500;
}

.bg-soft-success {
    background-color: #dcfce7;
    color: #166534;
}

.bg-soft-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

.bg-soft-warning {
    background-color: #fef9c3;
    color: #9a3412;
}

.bg-soft-primary {
    background-color: #dbeafe;
    color: #1e40af;
}

.bg-soft-info {
    background-color: #cffafe;
    color: #1e40af;
}

.bg-soft-secondary {
    background-color: #e2e8f0;
    color: #334155;
}

.shipment-items-list-page {
    color: #334155;
}

.shipment-items-filter-card,
.shipment-items-results-card {
    border-radius: 12px;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.shipment-items-filter-title,
.shipment-items-title {
    color: #1e293b;
}

.shipment-items-summary,
.shipment-items-pager-summary {
    font-size: 0.95rem;
    color: #64748b;
}

.shipment-items-total-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    padding: 0.7rem 1.15rem;
    border-radius: 999px;
    background: #0d6efd;
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}

.shipment-items-filter-form .filter-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 6px;
}

.shipment-items-filter-form .form-control,
.shipment-items-filter-form .form-select {
    border-radius: 8px;
    border-color: #cbd5e1;
    padding: 10px 15px;
    min-height: 46px;
    background-color: #fff;
}

.shipment-items-filter-form select[multiple].form-select {
    min-height: 164px;
    padding: 8px;
}

.shipment-items-filter-form .form-control:focus,
.shipment-items-filter-form .form-select:focus {
    border-color: #3b5998;
    box-shadow: 0 0 0 3px rgba(59, 89, 152, 0.1);
}

.shipment-items-filter-form .description,
.shipment-items-filter-form .form-text {
    font-size: 0.8rem;
    color: #64748b;
}

.shipment-items-filter-actions .btn {
    min-width: 118px;
    border-radius: 8px;
    padding: 0.7rem 1.1rem;
    white-space: nowrap;
}

.shipment-items-filter-actions {
    align-self: end;
}

.shipment-items-filter-actions .btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
}

.shipment-items-status-summary .badge {
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
}

.shipment-items-table > thead > tr > th {
    background-color: #f8fafc;
    color: #64748b;
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: 700;
    border-bottom: 2px solid #e2e8f0;
    padding: 15px;
    white-space: nowrap;
}

.shipment-items-table > tbody > tr > td {
    padding: 15px;
    vertical-align: middle;
    font-size: 0.9rem;
    border-bottom: 1px solid #f1f5f9;
}

.shipment-items-table.table-hover tbody tr:hover {
    background-color: #f8fafc;
}

.shipment-items-itemcode a {
    color: #2563eb;
}

.shipment-items-itemcode a:hover {
    color: #1d4ed8;
}

.shipment-items-address {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 260px;
}

.shipment-items-latest-time {
    color: #475569;
    font-size: 0.88rem;
}

.shipment-items-money {
    font-size: 0.95rem;
    font-weight: 700;
    white-space: nowrap;
}

.shipment-items-money--estimated {
    font-weight: 500;
}

.shipment-items-warning-icon {
    font-size: 1.2rem;
}

.shipment-items-pager-wrapper .pagination {
    margin-bottom: 0;
}

.shipment-items-pager-wrapper .page-link {
    border-radius: 6px;
}

@media (max-width: 991.98px) {
    .shipment-items-total-badge {
        align-self: flex-start;
    }

    .shipment-items-address {
        max-width: none;
    }
}

@media (max-width: 767.98px) {
    .shipment-items-filter-actions .btn {
        width: 100%;
    }

    .shipment-items-filter-actions {
        width: 100%;
    }
}

.diff-box {
    background-color: #fef2f2;
    border: 1px dashed #fca5a5;
    padding: 4px 8px;
    border-radius: 6px;
    color: #b91c1c;
    font-weight: 700;
    display: inline-block;
}

.text-label {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.text-value {
    font-size: 0.95rem;
    color: #0f172a;
    font-weight: 500;
    margin-bottom: 16px;
}

.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- Timeline (Item Details) --- */
.tracking-timeline {
    position: relative;
    padding-left: 30px;
    margin-top: 10px;
}

.tracking-timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 5px;
    bottom: 0;
    width: 2px;
    background: #e2e8f0;
}

.timeline-item {
    position: relative;
    margin-bottom: 20px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -29px;
    top: 4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #cbd5e1;
    border: 3px solid #fff;
    box-shadow: 0 0 0 1px #cbd5e1;
}

.timeline-item.active::before {
    background: #10b981;
    box-shadow: 0 0 0 1px #10b981;
}

.timeline-time {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 500;
}

.timeline-content {
    font-size: 0.95rem;
    color: #334155;
    font-weight: 500;
    margin-top: 2px;
}

.timeline-location {
    font-size: 0.85rem;
    color: #94a3b8;
}

/* --- Financial Box --- */
.financial-box {
    background: #f8fafc;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #e2e8f0;
}

.financial-box.has-error {
    background: #fef2f2;
    border-color: #fca5a5;
}

.financial-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.financial-row.total {
    border-top: 1px dashed #cbd5e1;
    padding-top: 12px;
    font-weight: 700;
    color: #0f172a;
    font-size: 1.1rem;
    margin-bottom: 0;
}

.financial-row.discrepancy {
    color: #dc2626;
    font-weight: 700;
    background: #fee2e2;
    padding: 8px 12px;
    border-radius: 6px;
    margin-top: 10px;
}

.primary-actions .btn:hover {
    color: red;
    border-color: yellow;
}

/* --- Buttons & Icons --- */
.action-btn {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    color: #64748b;
    transition: 0.2s;
    background: #fff;
    text-decoration: none;
}

.action-btn:hover {
    background: #f1f5f9;
    color: #3b5998;
    border-color: #cbd5e1;
}

.btn-resolve {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

.btn-resolve:hover {
    background: #dbeafe;
    color: #1e3a8a;
}

.file-icon {
    font-size: 2rem;
    color: #10b981;
}

.progress {
    border-radius: 4px;
    background-color: #e2e8f0;
    padding: 10px;
    height: auto;
}




/* itemcode details */
.shipment-detail-page {
    margin: 0 auto;
    color: #334155;
    font-family: 'Roboto', sans-serif;
}

.shipment-detail-page .detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.shipment-detail-page .itemcode {
    font-size: 2rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.shipment-detail-page .status-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 6px;
    padding: 7px 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.shipment-detail-page .bg-soft-success {
    background: #dcfce7;
}

.shipment-detail-page .bg-soft-danger {
    background: #fee2e2;
}

.shipment-detail-page .bg-soft-secondary {
    background: #e2e8f0;
}

.shipment-detail-page .card-custom {
    background: #fff;
    border-radius: 12px;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    margin-bottom: 24px;
    overflow: hidden;
}

.shipment-detail-page .card-header-custom {
    background: #fff;
    border-bottom: 1px solid #f1f5f9;
    padding: 18px 24px;
    font-weight: 700;
    color: #1e293b;
    font-size: 1.02rem;
}

.shipment-detail-page .card-body-custom {
    padding: 24px;
}

.shipment-detail-page .label {
    font-size: 0.85rem;
    text-transform: uppercase;
    font-weight: 500;
    color: #64748b;
    margin-bottom: 4px;
}

.shipment-detail-page .value {
    font-size: 0.95rem;
    color: #0f172a;
    margin-bottom: 16px;
    font-weight: 500;
}

.shipment-detail-page .tracking-timeline {
    position: relative;
    margin-top: 10px;
    padding-left: 30px;
}

.shipment-detail-page .tracking-timeline::before {
    content: '';
    position: absolute;
    top: 5px;
    bottom: 0;
    left: 7px;
    width: 2px;
    background: #e2e8f0;
}

.shipment-detail-page .timeline-item {
    position: relative;
    margin-bottom: 20px;
}

.shipment-detail-page .timeline-item::before {
    content: '';
    position: absolute;
    left: -29px;
    top: 4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #cbd5e1;
    border: 3px solid #fff;
    box-shadow: 0 0 0 1px #cbd5e1;
}

.shipment-detail-page .timeline-item.is-done::before {
    background: #10b981;
    box-shadow: 0 0 0 1px #10b981;
}

.shipment-detail-page .timeline-item.is-current::before {
    background: #ef4444;
    box-shadow: 0 0 0 1px #ef4444;
    animation: timeline-pulse 1.2s infinite;
}

@keyframes timeline-pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.45);
    }

    70% {
        transform: scale(1.08);
        box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

.shipment-detail-page .timeline-time {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 500;
}

.shipment-detail-page .timeline-title {
    font-size: 0.95rem;
    font-weight: 500;
    color: #334155;
    margin-top: 2px;
}

.shipment-detail-page .timeline-location {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-top: 2px;
}

.shipment-detail-page .timeline-title.is-current {
    color: #b91c1c;
    font-weight: 700;
}

.shipment-detail-page .timeline-title.is-done {
    color: #15803d;
    font-weight: 700;
}

.shipment-detail-page .financial-box {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    padding: 20px;
}

.shipment-detail-page .financial-box.has-error {
    border-color: #fca5a5;
    background: #fef2f2;
}

.shipment-detail-page .financial-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.shipment-detail-page .financial-row.total {
    border-top: 1px dashed #cbd5e1;
    margin-top: 12px;
    padding-top: 12px;
    font-weight: 700;
    margin-bottom: 0;
}

.shipment-detail-page .text-right-note {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 8px;
}