/* =========================================================
   Global / Base
========================================================= */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f4f6f8;
    color: #1f2937;
}

.topbar {
    min-height: 60px;
    background: #111827;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 0 24px;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}

.brand {
    color: #ffffff;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.topbar-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.account-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 13px;
    border: 1px solid #374151;
    border-radius: 8px;
    background: #1f2937;
    color: #f9fafb;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.account-link:hover {
    background: #273449;
    border-color: #4b5563;
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-1px);
}

.logout-form {
    display: inline-flex;
    margin: 0;
}

.logout-btn {
    min-height: 36px;
    margin: 0;
    padding: 0 14px;
    border: none;
    border-radius: 8px;
    background: #dc2626;
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
}

.logout-btn:hover {
    background: #b91c1c;
    transform: translateY(-1px);
}

.logout-btn:active,
.account-link:active {
    transform: translateY(0);
}

.page {
    padding: 32px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    margin-bottom: 20px;
}

.page-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.small-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 16px;
    border-radius: 999px;
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

/* .small-link:hover {
    background: #dbeafe;
    color: #1d4ed8;
    text-decoration: none;
    transform: translateY(-1px);
} */

.page-header > .small-link,
.page-header-actions .small-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 8px 13px;
    border-radius: 9px;
    background: #ffffff;
    color: #2563eb;
    border: 1px solid #dbeafe;
    text-decoration: none;
    font-size: 14px;
    font-weight: 800;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
    white-space: nowrap;
}

.page-header > .small-link:hover,
.page-header-actions .small-link:hover {
    background: #eff6ff;
    border-color: #2563eb;
}

.message-box {
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 12px;
}

.message-box.success {
    background: #dcfce7;
    color: #166534;
}

.message-box.error,
.error-box {
    background: #fee2e2;
    color: #991b1b;
}

.error-box {
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 12px;
}

.notice-box {
    background: #fef3c7;
    color: #92400e;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 14px;
}

.table-card,
.detail-card,
.edit-card,
.summary-card {
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.table-card {
    border-radius: 10px;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: #f9fafb;
    text-align: left;
    padding: 12px;
    font-size: 14px;
    border-bottom: 1px solid #e5e7eb;
}

td {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 14px;
}

.empty-row {
    text-align: center;
    color: #6b7280;
    padding: 24px;
}

.status-badge {
    display: inline-block;
    min-width: 80px;
    text-align: center;
    background: #e5e7eb;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: bold;
}

.status-open {
    background: #e5e7eb;
    color: #374151;
}

.status-scheduled {
    background: #dbeafe;
    color: #1d4ed8;
}

.status-arrived {
    background: #fef3c7;
    color: #92400e;
}

.status-loading {
    background: #ede9fe;
    color: #5b21b6;
}

.status-loaded,
.status-loaded_pending_paperwork {
    background: #dcfce7;
    color: #166534;
}

.status-departed {
    background: #ccfbf1;
    color: #0f766e;
}

.status-cancelled {
    background: #fee2e2;
    color: #991b1b;
}

.timer-none {
    background: #f3f4f6;
    color: #6b7280;
}

.timer-green {
    background: #dcfce7;
    color: #166534;
}

.timer-yellow {
    background: #fef3c7;
    color: #92400e;
}

.timer-red {
    background: #fee2e2;
    color: #991b1b;
}

.row-saving td {
    opacity: 0.65;
}

.row-saved td:first-child {
    box-shadow: inset 5px 0 0 #16a34a;
}

.row-error td:first-child {
    box-shadow: inset 5px 0 0 #dc2626;
}

.bulk-save-btn {
    height: 38px;
    padding: 0 16px;
    background: #16a34a;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
}

.bulk-save-btn:hover {
    background: #15803d;
}

@media (max-width: 800px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-header-actions {
        width: 100%;
    }

    .page-header > .small-link,
    .page-header-actions .small-link {
        width: 100%;
    }
}

/* =========================================================
   Authentication / Account Security
========================================================= */

.login-card,
.security-card {
    width: min(100%, 520px);
    margin: 56px auto;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.10);
}

.login-card {
    padding: 32px;
}

.login-card h1,
.security-card h1 {
    margin: 0;
    color: #0f172a;
    font-size: 28px;
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.login-card h2,
.security-card h2 {
    margin: 0;
    color: #0f172a;
    font-size: 18px;
    font-weight: 900;
}

.login-card > p {
    margin: 10px 0 24px;
    color: #64748b;
    font-size: 14px;
    line-height: 1.5;
}

.login-card form {
    margin: 0;
}

.login-card label {
    display: block;
    margin: 18px 0 7px;
    color: #334155;
    font-size: 13px;
    font-weight: 800;
}

.login-card input[type="text"],
.login-card input[type="password"],
.login-card input[type="email"],
.login-card input[type="number"],
.login-card input[type="tel"],
.login-card select,
.login-card textarea {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    background: #ffffff;
    color: #0f172a;
    font: inherit;
    font-size: 15px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.login-card textarea {
    min-height: 100px;
    resize: vertical;
}

.login-card input:focus,
.login-card select:focus,
.login-card textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.login-card button {
    width: 100%;
    min-height: 44px;
    margin-top: 24px;
    padding: 10px 16px;
    border: none;
    border-radius: 9px;
    background: #2563eb;
    color: #ffffff;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.18);
    transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.login-card button:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.22);
}

.login-card button:active {
    transform: translateY(0);
}

.login-card a,
.back-link {
    color: #2563eb;
    font-weight: 800;
    text-decoration: none;
}

.login-card a:hover,
.back-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.login-card .errorlist {
    margin: 7px 0 0;
    padding-left: 18px;
    color: #b91c1c;
    font-size: 12px;
    line-height: 1.4;
}

.login-card .helptext {
    display: block;
    margin-top: 7px;
    color: #64748b;
    font-size: 12px;
    line-height: 1.45;
}

.login-card img {
    display: block;
    width: 220px;
    max-width: 100%;
    height: auto;
    margin: 24px auto;
    padding: 8px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
}

.error-box,
.success-box {
    margin: 0 0 20px;
    padding: 12px 14px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
}

.error-box {
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #991b1b;
}

.success-box {
    border: 1px solid #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

.recovery-codes,
.login-card .recovery-codes {
    margin: 20px 0;
    padding: 18px 20px;
    border: 1px solid #dbe3ec;
    border-radius: 12px;
    background: #f8fafc;
    color: #0f172a;
    font-family: Consolas, "Courier New", monospace;
    font-size: 15px;
    line-height: 1.9;
}

.security-card {
    max-width: 700px;
    padding: 0;
    overflow: hidden;
}

.security-header {
    padding: 30px 32px 24px;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.security-header p {
    margin: 9px 0 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.5;
}

.security-card > .success-box {
    margin: 20px 32px 0;
}

.security-option {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 28px;
    padding: 24px 32px;
    border-bottom: 1px solid #e2e8f0;
    background: #ffffff;
}

.security-option:last-of-type {
    border-bottom: none;
}

.security-option-text {
    min-width: 0;
}

.security-option h2 {
    margin: 0 0 7px;
    color: #0f172a;
    font-size: 18px;
    font-weight: 900;
}

.security-option p {
    max-width: 420px;
    margin: 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.5;
}

.security-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 170px;
    min-height: 40px;
    margin: 0;
    padding: 9px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    background: #ffffff;
    color: #1e40af;
    font-family: inherit;
    font-size: 13px;
    font-weight: 900;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(15, 23, 42, 0.04);
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.security-btn:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
    text-decoration: none;
    transform: translateY(-1px);
}

.security-btn:active {
    transform: translateY(0);
}

.security-action-form {
    margin: 0;
}

.security-action-form .security-btn {
    width: auto;
    margin: 0;
}

.security-footer {
    padding: 18px 32px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
}

@media (max-width: 700px) {
    .topbar {
        padding: 0 14px;
    }

    .brand {
        font-size: 16px;
    }

    .topbar-actions {
        gap: 6px;
    }

    .account-link,
    .logout-btn {
        min-height: 34px;
        padding: 0 9px;
        font-size: 12px;
    }

    .login-card,
    .security-card {
        width: 100%;
        margin: 24px auto;
    }

    .login-card {
        padding: 24px;
    }

    .security-header,
    .security-option,
    .security-footer {
        padding-left: 22px;
        padding-right: 22px;
    }

    .security-option {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .security-btn,
    .security-action-form .security-btn {
        width: 100%;
    }
}

/* =========================================================
   Facility Portal / Dashboard Cards
========================================================= */

.warehouse-select-page {
    max-width: 1180px;
    margin: 0 auto;
}

.warehouse-select-header {
    margin-bottom: 28px;
}

.warehouse-select-header .eyebrow,
.wilmar-home-header .eyebrow {
    display: inline-block;
    margin-bottom: 8px;
    color: #2563eb;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.warehouse-select-header h1 {
    margin: 0 0 8px;
    color: #0f172a;
    font-size: 34px;
    line-height: 1.15;
}

.warehouse-select-header p,
.wilmar-home-header p,
.dashboard-section-header p,
.facility-section-header p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
}

.warehouse-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(220px, 1fr));
    gap: 22px;
}

.warehouse-card {
    display: block;
    min-height: 210px;
    background: white;
    color: #0f172a;
    text-decoration: none;
    padding: 26px;
    border-radius: 18px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 6px 22px rgba(15, 23, 42, 0.08);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.warehouse-card:hover,
.dashboard-card:hover {
    transform: translateY(-3px);
    border-color: #bfdbfe;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
}

.warehouse-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.warehouse-card h2 {
    margin: 0;
    font-size: 26px;
    color: #0f172a;
}

.warehouse-card p {
    min-height: 48px;
    margin: 0 0 28px;
    color: #64748b;
    font-size: 14px;
    line-height: 1.45;
}

.warehouse-pill {
    display: inline-block;
    white-space: nowrap;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
}

.warehouse-pill.active {
    background: #dcfce7;
    color: #166534;
}

.warehouse-pill.wip {
    background: #fef3c7;
    color: #92400e;
}

.warehouse-card-footer,
.external-link-pill,
.dashboard-card span {
    color: #2563eb;
    font-size: 13px;
    font-weight: 900;
}

.warehouse-card-active {
    border-color: #2563eb;
    box-shadow: 0 8px 26px rgba(37, 99, 235, 0.16);
}

.warehouse-card-disabled .warehouse-card-footer {
    color: #64748b;
}

.external-dashboard-card,
.yard-tool-card,
.dashboard-card-feature {
    border-color: #bfdbfe;
}

.external-link-pill {
    display: inline-block;
    margin-top: 10px;
    padding: 6px 10px;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 12px;
}

.facility-section-header {
    margin: 28px 0 14px;
}

.facility-section-header h2,
.dashboard-section-header h2 {
    margin: 0 0 4px;
    color: #0f172a;
    font-size: 22px;
}

.yard-tools-header {
    margin-top: 38px;
}

.wilmar-home-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 34px;
}

.wilmar-home-header h1 {
    margin: 0 0 8px;
    color: #0f172a;
    font-size: 36px;
    line-height: 1.1;
}

.dashboard-section {
    margin-bottom: 34px;
}

.dashboard-section-header {
    margin-bottom: 14px;
}

.dashboard-grid {
    display: grid;
    gap: 18px;
}

.dashboard-grid-primary {
    grid-template-columns: 1.3fr 1fr 1fr;
}

.dashboard-grid-secondary {
    grid-template-columns: 1.3fr 1fr;
}

.dashboard-grid-support {
    grid-template-columns: repeat(2, minmax(260px, 1fr));
    max-width: 850px;
}

.yard-tools-grid {
    grid-template-columns: repeat(2, minmax(260px, 1fr));
}

.dashboard-card {
    display: block;
    min-height: 155px;
    padding: 24px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    color: #0f172a;
    text-decoration: none;
    box-shadow: 0 5px 20px rgba(15, 23, 42, 0.08);
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.dashboard-card-feature,
.yard-tool-card {
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.dashboard-card-label {
    display: inline-flex;
    align-items: center;
    margin-bottom: 14px;
    padding: 5px 9px;
    border-radius: 999px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.035em;
}

.dashboard-card h3 {
    margin: 0 0 10px;
    color: #0f172a;
    font-size: 24px;
    line-height: 1.15;
}

.dashboard-card p {
    margin: 0 0 18px;
    color: #475569;
    font-size: 14px;
    line-height: 1.45;
}

@media (max-width: 1100px) {
    .dashboard-grid-primary,
    .dashboard-grid-secondary,
    .dashboard-grid-support {
        grid-template-columns: 1fr;
        max-width: none;
    }
}

@media (max-width: 900px) {
    .warehouse-grid,
    .yard-tools-grid {
        grid-template-columns: 1fr;
    }

    .warehouse-select-header h1 {
        font-size: 28px;
    }
}

@media (max-width: 700px) {
    .wilmar-home-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .wilmar-home-header .small-link {
        width: 100%;
    }

    .wilmar-home-header h1 {
        font-size: 30px;
    }
}

/* =========================================================
   Load Board
========================================================= */

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tabs a {
    background: white;
    color: #1f2937;
    padding: 10px 16px;
    border-radius: 8px;
    text-decoration: none;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.tabs a.active {
    background: #2563eb;
    color: white;
}

.filter-card {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr auto;
    gap: 14px;
    align-items: end;
    background: white;
    padding: 18px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.filter-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-field label {
    font-size: 12px;
    font-weight: bold;
    color: #4b5563;
}

.filter-field input,
.yard-move-filter-card select {
    height: 38px;
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: white;
}

.filter-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.filter-actions button {
    height: 38px;
    padding: 0 16px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.filter-actions a {
    color: #dc2626;
    font-weight: bold;
    text-decoration: none;
}

.bulk-save-form {
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 18px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.bulk-save-hint,
#dock-autosave-status,
#yard-autosave-status {
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
}

.load-table th {
    white-space: nowrap;
}

.load-table td {
    vertical-align: middle;
}

.appt-cell strong,
.appt-cell span {
    display: block;
}

.appt-cell strong {
    font-size: 14px;
}

.appt-cell span {
    color: #6b7280;
    font-size: 12px;
}

.notes-cell {
    max-width: 260px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.quick-status,
.quick-pallets,
.quick-notes {
    height: 34px;
    padding: 6px 8px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: white;
}

.quick-status {
    min-width: 110px;
}

.quick-pallets {
    width: 80px;
}

.quick-notes {
    width: 100%;
    min-width: 220px;
    padding: 6px 9px;
}

.actions-cell {
    vertical-align: middle;
}

.actions-inner {
    display: flex;
    gap: 8px;
    align-items: center;
}

.edit-btn {
    display: inline-block;
    background: #2563eb;
    color: white;
    padding: 7px 12px;
    border-radius: 7px;
    text-decoration: none;
    font-size: 13px;
    font-weight: bold;
}

.secondary-edit {
    background: #6b7280;
}

.secondary-edit:hover {
    background: #4b5563;
}

.driver-checkin-notes-cell {
    min-width: 220px;
    max-width: 280px;
}

.driver-checkin-notes-cell strong {
    display: block;
    color: #0f172a;
    font-size: 12px;
    margin-bottom: 3px;
}

.driver-checkin-notes-cell span {
    display: block;
    color: #475569;
    font-size: 13px;
    line-height: 1.35;
    white-space: normal;
}

.manifest-group-row td {
    background: #f8fbff;
    border-top: 1px solid #bfdbfe;
    border-bottom: 1px solid #bfdbfe;
}

.manifest-group-row td:first-child {
    border-left: 4px solid #2563eb;
}

.manifest-group-row td:last-child {
    border-right: 4px solid #2563eb;
}

.manifest-group-row.group-start-row td {
    border-top: 3px solid #2563eb;
}

.manifest-group-row.group-end-row td {
    border-bottom: 3px solid #2563eb;
}

.manifest-pill {
    display: inline-block;
    background: #dbeafe;
    color: #1d4ed8;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: bold;
}

.load-timer-pill,
.dock-timer-pill,
.yard-timer-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.load-timer-pill {
    min-width: 58px;
    padding: 5px 8px;
}

.dock-timer-pill {
    min-width: 82px;
    padding: 7px 10px;
}

.yard-timer-pill {
    min-width: 58px;
    padding: 5px 8px;
    background: #eff6ff;
    color: #1d4ed8;
}

.yard-timer-pill.timer-none {
    background: #f1f5f9;
    color: #64748b;
}

.load-table tbody tr.load-row-departed > td {
    background: #dcfce7 !important;
}

.load-table tbody tr.load-row-yellow > td {
    background: #fef9c3 !important;
}

.load-table tbody tr.load-row-red > td {
    background: #fee2e2 !important;
}

.load-table tbody tr.load-row-departed:hover > td {
    background: #bbf7d0 !important;
}

.load-table tbody tr.load-row-yellow:hover > td {
    background: #fef08a !important;
}

.load-table tbody tr.load-row-red:hover > td {
    background: #fecaca !important;
}

.load-table tbody tr.load-row-departed input,
.load-table tbody tr.load-row-departed select,
.load-table tbody tr.load-row-yellow input,
.load-table tbody tr.load-row-yellow select,
.load-table tbody tr.load-row-red input,
.load-table tbody tr.load-row-red select {
    background: rgba(255, 255, 255, 0.65);
}

@media (max-width: 1100px) {
    .filter-card {
        grid-template-columns: 1fr 1fr;
    }

    .filter-actions {
        grid-column: 1 / -1;
    }
}

/* =========================================================
   Load Edit
========================================================= */

.edit-layout {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 20px;
}

.detail-card,
.edit-card {
    padding: 22px;
    border-radius: 12px;
}

.full-width {
    grid-column: 1 / -1;
}

.detail-card h2,
.edit-card h2 {
    margin-top: 0;
}

.detail-grid,
.summary-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(180px, 1fr));
    gap: 16px;
}

.detail-grid label,
.edit-card label {
    display: block;
    font-size: 12px;
    color: #6b7280;
    font-weight: bold;
    margin-bottom: 5px;
}

.detail-grid p {
    margin: 0;
    font-size: 15px;
}

.edit-card input,
.edit-card select,
.edit-card textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    margin-bottom: 16px;
}

.edit-card button {
    width: 100%;
    padding: 12px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
}

@media (max-width: 1100px) {
    .edit-layout {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   Dock Management
========================================================= */

.dock-summary-grid,
.yard-summary-grid,
.yard-move-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.summary-card {
    padding: 18px;
    border-radius: 12px;
}

.summary-card label {
    display: block;
    color: #6b7280;
    font-size: 13px;
    margin-bottom: 6px;
}

.summary-card strong {
    font-size: 28px;
}

.dock-bulk-save-form {
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    border-radius: 14px;
    padding: 14px 18px;
    margin: 18px 0;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.08);
}

.dock-table-card {
    overflow-x: auto;
}

.simple-dock-table {
    width: 100%;
    border-collapse: collapse;
}

.simple-dock-table th {
    text-align: left;
    white-space: nowrap;
    font-size: 13px;
    color: #111827;
    background: #f8fafc;
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.simple-dock-table td {
    vertical-align: middle;
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.dock-name-cell strong {
    display: block;
    font-size: 14px;
}

.dock-name-cell span {
    display: block;
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
}

.dock-row-active td {
    background: #ffffff;
}

.dock-row-in-use td {
    background: #f8fbff;
}

.dock-row-inactive td {
    background: #f9fafb;
    color: #6b7280;
}

.dock-status-select,
.dock-activity-select,
.dock-trailer-select,
.dock-load-select,
.dock-notes-input,
.dock-order-input {
    height: 38px;
    padding: 7px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: white;
    font-size: 14px;
}

.dock-status-select {
    width: 150px;
    font-weight: bold;
}

.dock-activity-select {
    width: 150px;
}

.dock-trailer-select {
    width: 180px;
}

.dock-load-select,
.dock-order-input {
    width: 280px;
}

.dock-notes-input {
    width: 100%;
    min-width: 220px;
}

.dock-order-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}

@media (max-width: 900px) {
    .dock-summary-grid,
    .yard-summary-grid,
    .yard-move-summary-grid {
        grid-template-columns: 1fr;
    }

    .dock-bulk-save-form {
        flex-direction: column;
        align-items: stretch;
    }

    .bulk-save-btn {
        width: 100%;
    }
}

/* =========================================================
   Driver / Guard Check-In
========================================================= */

.public-checkin-wrapper {
    max-width: 720px;
    margin: 40px auto;
    padding: 0 16px;
}

.public-checkin-card,
.guard-checkin-card,
.guard-complete-card {
    background: white;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.public-checkin-card {
    border: 1px solid #e5e7eb;
}

.public-checkin-card h1 {
    margin-top: 0;
}

.checkin-load-box {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    margin: 20px 0;
}

.checkin-load-box p {
    margin: 6px 0;
}

.public-checkin-form,
.guard-form-grid {
    display: grid;
    gap: 10px;
}

.public-checkin-form label,
.guard-form-field label {
    font-weight: bold;
    font-size: 14px;
    color: #111827;
}

.public-checkin-form input,
.public-checkin-form select,
.public-checkin-form textarea,
.guard-form-field input,
.guard-form-field select,
.guard-form-field textarea {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 15px;
}

.public-checkin-form button {
    margin-top: 12px;
    height: 44px;
    border: none;
    border-radius: 8px;
    background: #2563eb;
    color: white;
    font-weight: bold;
    cursor: pointer;
}

.copy-link-row {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.copy-link-row input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
}

.copy-link-row button {
    padding: 0 18px;
    border: none;
    border-radius: 8px;
    background: #2563eb;
    color: white;
    font-weight: bold;
    cursor: pointer;
}

.guard-checkin-card,
.guard-complete-card {
    border-radius: 18px;
    padding: 24px;
}

.guard-checkin-section {
    margin-bottom: 28px;
}

.guard-checkin-section:last-of-type {
    margin-bottom: 0;
}

.guard-section-header {
    margin-bottom: 16px;
}

.guard-section-header h2,
.guard-complete-card h2 {
    margin: 0 0 18px;
    color: #0f172a;
    font-size: 21px;
}

.guard-section-header p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
}

.guard-form-grid {
    grid-template-columns: repeat(2, minmax(260px, 1fr));
    gap: 18px;
}

.guard-form-field {
    display: flex;
    flex-direction: column;
}

.guard-form-field.full-width {
    grid-column: 1 / -1;
}

.guard-form-field label {
    margin-bottom: 6px;
    color: #334155;
    font-size: 13px;
    font-weight: 800;
}

.guard-form-field textarea {
    resize: vertical;
}

.guard-form-field input:focus,
.guard-form-field select:focus,
.guard-form-field textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.guard-form-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
}

.guard-checkin-done-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 20px;
}

.summary-detail-grid label,
.guard-notes-panel label {
    display: block;
    margin-bottom: 4px;
    color: #64748b;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.035em;
}

.summary-detail-grid strong {
    display: block;
    color: #0f172a;
    font-size: 14px;
    line-height: 1.35;
}

.guard-notes-panel,
.sms-preview-box {
    margin-top: 18px;
    padding: 14px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
}

.guard-notes-panel p {
    margin: 0;
    color: #334155;
    font-size: 14px;
    line-height: 1.4;
}

.sms-preview-box {
    margin-top: 10px;
    padding: 16px;
    border-color: #dbe3ec;
    color: #0f172a;
    font-size: 15px;
    line-height: 1.45;
}

.success-text {
    color: #166534;
    font-weight: 800;
}

.warning-text {
    color: #92400e;
    font-weight: 800;
}

@media (max-width: 950px) {
    .guard-checkin-done-grid,
    .guard-form-grid,
    .summary-detail-grid {
        grid-template-columns: 1fr;
    }

    .guard-form-actions {
        flex-direction: column;
        align-items: stretch;
    }
}

/* =========================================================
   Yard Confirmation
========================================================= */

.yard-summary-grid {
    grid-template-columns: repeat(5, minmax(140px, 1fr));
}

.yard-summary-grid .summary-card {
    min-height: 90px;
}

.yard-summary-grid .summary-card label {
    color: #475569;
}

.yard-confirm-card {
    margin-top: 18px;
    border-radius: 14px;
    overflow-x: auto;
    background: white;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.08);
}

.yard-confirm-table {
    width: 100%;
    min-width: 1100px;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
}

.yard-confirm-table thead th {
    background: #f8fafc;
    color: #334155;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.035em;
    padding: 14px 16px;
    border-bottom: 1px solid #dbe3ec;
    white-space: nowrap;
}

.yard-confirm-table tbody td {
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: middle;
}

.yard-confirm-table tbody tr:last-child td {
    border-bottom: none;
}

.yard-confirm-table tbody tr:hover td {
    background: #f8fafc !important;
}

.yard-confirm-table td:first-child {
    min-width: 230px;
}

.yard-confirm-table td:nth-child(2) {
    min-width: 180px;
}

.yard-confirm-table td:nth-child(3) {
    min-width: 150px;
}

.yard-confirm-table td:nth-child(4) {
    min-width: 260px;
}

.yard-confirm-table td:nth-child(5) {
    min-width: 190px;
}

.yard-confirm-table td:nth-child(6) {
    min-width: 260px;
}

.yard-confirm-table td strong {
    display: block;
    color: #0f172a;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.2;
}

.yard-subtext {
    display: block;
    margin-top: 3px;
    color: #64748b;
    font-size: 12px;
    line-height: 1.3;
}

.yard-status-select,
.yard-facility-select,
.yard-dock-select,
.yard-order-input,
.yard-note-input {
    min-width: 150px;
    height: 40px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #ffffff;
    color: #0f172a;
    font-size: 14px;
    padding: 8px 11px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.yard-status-select:hover,
.yard-facility-select:hover,
.yard-dock-select:hover,
.yard-order-input:hover,
.yard-note-input:hover {
    border-color: #94a3b8;
}

.yard-status-select:focus,
.yard-facility-select:focus,
.yard-dock-select:focus,
.yard-order-input:focus,
.yard-note-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.yard-status-select {
    width: 155px;
    font-weight: 800;
}

.yard-dock-select {
    width: 135px;
    font-weight: 600;
}

.yard-order-input {
    width: 230px;
}

.yard-note-input {
    width: 100%;
    min-width: 240px;
}

.yard-no-dock-text {
    display: none;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.yard-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 115px;
    text-align: center;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

.yard-status-pill.available {
    background: #f3f4f6;
    color: #374151;
}

.yard-status-pill.loaded {
    background: #dbeafe;
    color: #1d4ed8;
}

.yard-status-pill.transfer {
    background: #ffedd5;
    color: #9a3412;
}

.yard-status-pill.issue {
    background: #fee2e2;
    color: #991b1b;
}

.yard-row-available td:first-child {
    border-left: 5px solid #94a3b8;
}

.yard-row-loaded td:first-child {
    border-left: 5px solid #2563eb;
}

.yard-row-transfer td:first-child {
    border-left: 5px solid #f97316;
}

.yard-row-issue td:first-child {
    border-left: 5px solid #dc2626;
}

.yard-row-progress td:first-child {
    border-left: 5px solid #2563eb;
}

.yard-row-loaded td {
    background: #f0f9ff;
}

.yard-row-transfer td {
    background: #fff7ed;
}

.yard-row-issue td {
    background: #fff1f2;
}

.yard-row-progress td {
    background: #eff6ff;
}

@media (max-width: 1200px) {
    .yard-summary-grid {
        grid-template-columns: repeat(2, minmax(160px, 1fr));
    }
}

@media (max-width: 900px) {
    .yard-confirm-table {
        min-width: 1000px;
    }

    .yard-summary-grid {
        grid-template-columns: 1fr;
    }

    .yard-order-input,
    .yard-note-input {
        min-width: 0;
        width: 100%;
    }
}

/* =========================================================
   Yard Movement Management
========================================================= */

.yard-summary-grid-single {
    display: grid;
    grid-template-columns: minmax(220px, 320px);
    gap: 16px;
    margin-bottom: 20px;
}

.yard-move-filter-card {
    grid-template-columns: 2fr 1fr 1fr auto;
}

.yard-movement-table-card {
    overflow-x: auto;
}

.yard-movement-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.yard-movement-table th {
    background: #f8fafc;
    color: #334155;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 11px 10px;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
    white-space: nowrap;
}

.yard-movement-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #e5e7eb;
    color: #0f172a;
    vertical-align: top;
}

.yard-movement-table tbody tr:hover,
.yard-movement-row:hover {
    background: #f8fafc;
}

.yard-details-cell {
    min-width: 300px;
    line-height: 1.4;
}

.yard-detail-note {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e5e7eb;
}

.yard-status-pill-open {
    background: #eff6ff;
    color: #1d4ed8;
}

.yard-status-pill-assigned {
    background: #f0fdf4;
    color: #166534;
}

.yard-status-pill-delayed {
    background: #fef3c7;
    color: #92400e;
}

.yard-status-pill-completed {
    background: #e5e7eb;
    color: #374151;
}

.yard-status-open td:first-child {
    border-left: 5px solid #2563eb;
}

.yard-status-assigned td:first-child {
    border-left: 5px solid #16a34a;
}

.yard-status-delayed td:first-child {
    border-left: 5px solid #f59e0b;
}

.yard-status-completed td:first-child {
    border-left: 5px solid #6b7280;
}

.yard-movement-row {
    cursor: pointer;
}

.yard-movement-row:focus {
    outline: 3px solid rgba(37, 99, 235, 0.25);
    outline-offset: -3px;
}

.yard-move-modal {
    width: min(920px, calc(100vw - 32px));
    max-height: calc(100vh - 48px);
    border: none;
    border-radius: 18px;
    padding: 0;
    box-shadow: 0 25px 70px rgba(15, 23, 42, 0.35);
}

.yard-move-modal::backdrop {
    background: rgba(15, 23, 42, 0.55);
}

.yard-move-modal-inner {
    padding: 24px;
    background: #ffffff;
    overflow-y: auto;
    max-height: calc(100vh - 48px);
}

.yard-move-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 22px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.yard-move-modal-header h2 {
    margin: 8px 0 4px;
    color: #0f172a;
    font-size: 24px;
}

.yard-move-modal-header p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
}

.yard-modal-close {
    border: none;
    background: #f1f5f9;
    color: #334155;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.yard-modal-close:hover {
    background: #e2e8f0;
}

.yard-modal-summary-grid {
    margin-bottom: 22px;
}

.yard-modal-detail-section {
    margin-top: 18px;
}

.yard-modal-detail-section h3 {
    margin: 0 0 12px;
    color: #0f172a;
    font-size: 18px;
}

.yard-modal-detail-list,
.yard-modal-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 14px;
}

.yard-modal-detail-list div,
.yard-modal-summary-grid div {
    padding: 12px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
}

.yard-modal-detail-list label,
.yard-modal-summary-grid label,
.yard-modal-notes-panel label {
    display: block;
    margin-bottom: 5px;
    color: #64748b;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.035em;
}

.yard-modal-detail-list strong,
.yard-modal-summary-grid strong {
    color: #0f172a;
    font-size: 13px;
    line-height: 1.35;
}

.yard-modal-notes-panel {
    margin-top: 16px;
    padding: 14px;
    border-radius: 12px;
    background: #fffbeb;
    border: 1px solid #fde68a;
}

.yard-modal-notes-panel p {
    margin: 0;
    color: #0f172a;
    font-size: 14px;
    line-height: 1.45;
}

@media (max-width: 1100px) {
    .yard-move-filter-card {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 800px) {
    .yard-modal-detail-list,
    .yard-modal-summary-grid {
        grid-template-columns: 1fr;
    }

    .yard-move-modal-header {
        flex-direction: column;
    }

    .yard-modal-close {
        align-self: flex-end;
    }
}
.performance-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 18px;
}

.performance-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    padding: 18px;
}

.performance-card-wide {
    grid-column: 1 / -1;
}

.performance-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 16px;
}

.performance-card-header h2 {
    margin: 0;
    font-size: 20px;
    color: #111827;
}

.performance-card-header p {
    margin: 4px 0 0;
    color: #6b7280;
    font-size: 14px;
}

.performance-metric-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.facility-metric-card {
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 16px;
    background: #f9fafb;
}

.facility-metric-card h3 {
    margin: 0 0 12px;
    font-size: 18px;
    color: #111827;
}

.metric-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
    font-size: 14px;
}

.metric-row:last-child {
    border-bottom: none;
}

.metric-row span {
    color: #6b7280;
}

.metric-row strong {
    color: #111827;
}

.metric-row-muted {
    margin-top: 4px;
    font-size: 13px;
}

.performance-table-wrap {
    overflow-x: auto;
}

.performance-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.performance-table th {
    text-align: left;
    padding: 12px 10px;
    background: #f3f4f6;
    color: #374151;
    font-weight: 700;
    border-bottom: 1px solid #d1d5db;
    white-space: nowrap;
}

.performance-table td {
    padding: 11px 10px;
    border-bottom: 1px solid #e5e7eb;
    color: #111827;
    vertical-align: middle;
}

.performance-table tbody tr:hover td {
    background: #f9fafb;
}

.performance-dot-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.performance-dot {
    width: 11px;
    height: 11px;
    border-radius: 999px;
    display: inline-block;
    flex: 0 0 auto;
}

.performance-dot-green {
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.14);
}

.performance-dot-red {
    background: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.14);
}

.placeholder-panel {
    min-height: 140px;
    border: 1px dashed #cbd5e1;
    border-radius: 14px;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
    color: #64748b;
}

.placeholder-panel strong {
    color: #111827;
    font-size: 18px;
}

.empty-performance-box {
    grid-column: 1 / -1;
    padding: 18px;
    border-radius: 12px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    color: #6b7280;
    text-align: center;
}

@media (max-width: 1000px) {
    .performance-grid {
        grid-template-columns: 1fr;
    }

    .performance-metric-grid {
        grid-template-columns: 1fr;
    }
}

.warehouse-tools-section {
    margin-top: 28px;
}

.section-heading {
    margin-bottom: 12px;
}

.section-heading h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
}

.section-heading p {
    margin: 4px 0 0;
    font-size: 13px;
    color: #475569;
}

.warehouse-tools-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.warehouse-tool-card {
    display: flex;
    flex-direction: column;
    min-height: 130px;
    padding: 22px;
    border: 1px solid #bfdbfe;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    text-decoration: none;
    color: inherit;
}

.warehouse-tool-card:hover {
    border-color: #60a5fa;
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.12);
    transform: translateY(-1px);
}

.card-topline {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.card-topline h3 {
    margin: 0;
    font-size: 22px;
    color: #0f172a;
}

.warehouse-tool-card p {
    margin: 16px 0 0;
    font-size: 13px;
    color: #334155;
}

.card-link {
    margin-top: auto;
    padding-top: 28px;
    font-size: 13px;
    font-weight: 800;
    color: #1d4ed8;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.status-pill.available {
    color: #166534;
    background: #dcfce7;
}

@media (max-width: 900px) {
    .warehouse-tools-grid {
        grid-template-columns: 1fr;
    }
}

.direction-metric-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.direction-metric-box {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #ffffff;
    padding: 14px;
}

.direction-metric-box h4 {
    margin: 0 0 10px;
    font-size: 15px;
    color: #0f172a;
}

.performance-filter-card {
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    gap: 14px;
    align-items: end;
    padding: 14px;
    margin-bottom: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #f9fafb;
}

.performance-filter-card .filter-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.performance-filter-card label {
    font-size: 12px;
    font-weight: 700;
    color: #475569;
}

.performance-filter-card input,
.performance-filter-card select {
    min-height: 38px;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    padding: 7px 9px;
    background: #ffffff;
}

.performance-filter-card .search-field {
    grid-column: span 2;
}

.performance-filter-card .filter-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.performance-filter-card .filter-actions button {
    min-height: 38px;
    border: none;
    border-radius: 9px;
    padding: 0 16px;
    background: #2563eb;
    color: #ffffff;
    font-weight: 800;
    cursor: pointer;
}

.performance-filter-card .filter-actions a {
    color: #2563eb;
    font-weight: 700;
    text-decoration: none;
}

@media (max-width: 1100px) {
    .performance-filter-card {
        grid-template-columns: repeat(2, minmax(150px, 1fr));
    }

    .direction-metric-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .performance-filter-card {
        grid-template-columns: 1fr;
    }

    .performance-filter-card .search-field {
        grid-column: span 1;
    }
}

.performance-filter-card {
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    gap: 14px;
    align-items: end;
    padding: 16px;
    margin: 18px 0;
    border: 1px solid #dbeafe;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.performance-filter-card .filter-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.performance-filter-card label {
    font-size: 12px;
    font-weight: 800;
    color: #334155;
}

.performance-filter-card input,
.performance-filter-card select {
    width: 100%;
    min-height: 40px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 8px 10px;
    background: #ffffff;
    color: #0f172a;
    font-size: 14px;
}

.performance-filter-card input:focus,
.performance-filter-card select:focus {
    outline: none;
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.18);
}

.performance-filter-card .search-field {
    grid-column: span 2;
}

.performance-filter-card .filter-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.performance-filter-card .filter-actions button {
    min-height: 40px;
    border: none;
    border-radius: 10px;
    padding: 0 18px;
    background: #2563eb;
    color: #ffffff;
    font-weight: 800;
    cursor: pointer;
}

.performance-filter-card .filter-actions button:hover {
    background: #1d4ed8;
}

.performance-filter-card .filter-actions a {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    padding: 0 14px;
    border-radius: 10px;
    color: #2563eb;
    background: #eff6ff;
    font-weight: 800;
    text-decoration: none;
}

.performance-list-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin: 0 0 16px;
    padding: 14px 16px;
    border: 1px solid #dbeafe;
    border-radius: 14px;
    background: #f8fafc;
    color: #475569;
    font-size: 14px;
}

.performance-list-actions > span {
    font-weight: 700;
}

.performance-list-actions > div {
    display: flex;
    gap: 10px;
    align-items: center;
}

.primary-action-link,
.secondary-action-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.primary-action-link {
    background: #2563eb;
    color: #ffffff;
    border: 1px solid #2563eb;
}

.primary-action-link:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
}

.secondary-action-link {
    background: #ffffff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

.secondary-action-link:hover {
    background: #eff6ff;
}

.performance-table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
}

.performance-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: #ffffff;
}

.performance-table th {
    text-align: left;
    padding: 12px 10px;
    background: #f8fafc;
    color: #334155;
    font-weight: 800;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;
}

.performance-table td {
    padding: 11px 10px;
    border-bottom: 1px solid #f1f5f9;
    color: #0f172a;
    vertical-align: middle;
    white-space: nowrap;
}

.performance-table tbody tr:hover td {
    background: #f8fafc;
}

.performance-dot-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.performance-dot {
    width: 11px;
    height: 11px;
    border-radius: 999px;
    display: inline-block;
    flex: 0 0 auto;
}

.performance-dot-green {
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.14);
}

.performance-dot-red {
    background: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.14);
}

.performance-flag {
    display: inline-flex;
    align-items: center;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.performance-flag-good {
    background: #dcfce7;
    color: #166534;
}

.performance-flag-bad {
    background: #fee2e2;
    color: #991b1b;
}

@media (max-width: 1100px) {
    .performance-filter-card {
        grid-template-columns: repeat(2, minmax(150px, 1fr));
    }
}

@media (max-width: 700px) {
    .performance-filter-card {
        grid-template-columns: 1fr;
    }

    .performance-filter-card .search-field {
        grid-column: span 1;
    }

    .performance-list-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .performance-list-actions > div {
        flex-wrap: wrap;
    }
}

.custom-order-divider {
    margin: 10px 0 8px;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.field-help {
    margin-top: 6px;
    color: #64748b;
    font-size: 12px;
}

.guard-form-section {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-bottom: 18px;
}

.guard-form-section label {
    font-size: 13px;
    font-weight: 800;
    color: #334155;
}

.guard-input {
    width: 100%;
    min-height: 42px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 9px 11px;
    background: #ffffff;
    color: #0f172a;
    font-size: 14px;
}

.guard-input:focus {
    outline: none;
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.18);
}

.custom-order-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 8px 0 4px;
    color: #64748b;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.custom-order-divider::before,
.custom-order-divider::after {
    content: "";
    height: 1px;
    flex: 1;
    background: #e2e8f0;
}

.field-help {
    margin-top: 3px;
    color: #64748b;
    font-size: 12px;
}

.dock-order-select-wrap {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 260px;
}

.dock-load-select,
.dock-custom-order {
    width: 100%;
}

.custom-order-divider {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.custom-order-divider::before,
.custom-order-divider::after {
    content: "";
    height: 1px;
    flex: 1;
    background: #e2e8f0;
}

.dock-order-select-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 320px;
}

.dock-order-select-wrap .dock-input,
.dock-order-select-wrap .dock-load-select,
.dock-order-select-wrap .dock-custom-order {
    width: 100%;
    min-height: 38px;
    box-sizing: border-box;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 8px 10px;
    background: #ffffff;
    color: #0f172a;
    font-size: 14px;
}

.dock-order-select-wrap .dock-input:focus,
.dock-order-select-wrap .dock-load-select:focus,
.dock-order-select-wrap .dock-custom-order:focus {
    outline: none;
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.18);
}

.dock-order-select-wrap .custom-order-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 4px 0;
    color: #64748b;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
}

.dock-order-select-wrap .custom-order-divider::before,
.dock-order-select-wrap .custom-order-divider::after {
    content: "";
    height: 1px;
    flex: 1;
    background: #e2e8f0;
}

.guard-form-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
}

.primary-action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 20px;
    border: none;
    border-radius: 10px;
    background: #2563eb;
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.18);
}

.primary-action-button:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

.primary-action-button:active {
    transform: translateY(0);
}

.charge-code-note {
    margin-top: 4px;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    white-space: normal;
    max-width: 160px;
}

.guard-board-card {
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
    padding: 22px;
}

.guard-board-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.guard-board-header h2 {
    margin: 0;
    color: #0f172a;
}

.guard-board-header p {
    margin: 6px 0 0;
    color: #64748b;
}

.guard-board-table-wrap {
    overflow-x: auto;
}

.guard-board-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1050px;
}

.guard-board-table th {
    text-align: left;
    padding: 11px 10px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #475569;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.guard-board-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #e2e8f0;
    color: #0f172a;
    font-size: 14px;
    vertical-align: middle;
}

.guard-row-waiting td {
    background: #fff7ed;
}

.guard-row-docked td {
    background: #eff6ff;
}

.guard-row-departed td {
    background: #f0fdf4;
}

.guard-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.guard-status-pill.waiting {
    color: #92400e;
    background: #fef3c7;
}

.guard-status-pill.docked {
    color: #1d4ed8;
    background: #dbeafe;
}

.guard-status-pill.departed {
    color: #047857;
    background: #d1fae5;
}

.guard-status-pill.issue {
    color: #991b1b;
    background: #fee2e2;
}

.guard-subtext {
    margin-top: 3px;
    color: #64748b;
    font-size: 12px;
}

.guard-row-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.inline-form {
    display: inline;
    margin: 0;
}

.danger-link {
    color: #b91c1c;
    border-color: #fecaca;
    background: #fff1f2;
}

.danger-link:hover {
    color: #991b1b;
    background: #ffe4e6;
}

.guard-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(15, 23, 42, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.guard-modal-backdrop[hidden] {
    display: none;
}

.guard-modal-card {
    width: min(620px, 96vw);
    max-height: 90vh;
    overflow: auto;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.35);
    padding: 22px;
}

.guard-modal-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 14px;
    margin-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
}

.guard-modal-header h2 {
    margin: 0;
    color: #0f172a;
}

.guard-modal-header p {
    margin: 5px 0 0;
    color: #64748b;
}

.guard-modal-close {
    border: none;
    background: #f1f5f9;
    color: #0f172a;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
}

.guard-modal-close:hover {
    background: #e2e8f0;
}

.guard-modal-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.guard-modal-form label {
    font-size: 13px;
    font-weight: 800;
    color: #334155;
}

.guard-input {
    width: 100%;
    min-height: 40px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 8px 10px;
    color: #0f172a;
    background: #ffffff;
    box-sizing: border-box;
}

.guard-textarea {
    resize: vertical;
}

.guard-demo-note {
    margin-top: 6px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #eff6ff;
    color: #1e40af;
    font-size: 13px;
    font-weight: 700;
}

.custom-order-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 4px 0;
    color: #64748b;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .06em;
    white-space: nowrap;
}

.custom-order-divider::before,
.custom-order-divider::after {
    content: "";
    height: 1px;
    flex: 1;
    background: #e2e8f0;
}

@media (max-width: 700px) {
    .guard-board-header {
        flex-direction: column;
    }

    .guard-modal-card {
        padding: 18px;
    }
}

.direction-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.direction-pill.outbound {
    color: #1d4ed8;
    background: #dbeafe;
}

.direction-pill.inbound {
    color: #047857;
    background: #d1fae5;
}

.load-table tbody tr.load-row-outbound > td:first-child {
    border-left: 5px solid #3b82f6;
}

.load-table tbody tr.load-row-inbound > td:first-child {
    border-left: 5px solid #10b981;
}

.load-stop-cell {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.load-stop-cell strong {
    color: #0f172a;
}

.load-stop-cell span {
    color: #64748b;
    font-size: 12px;
}

.load-stop-label {
    color: #475569;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.dock-display-page {
    min-height: calc(100vh - 80px);
    background:
        radial-gradient(circle at top left, rgba(59, 130, 246, 0.25), transparent 34%),
        linear-gradient(135deg, #020617 0%, #0f172a 45%, #111827 100%);
    padding: 28px;
    color: #ffffff;
}

.dock-display-shell {
    max-width: 1500px;
    margin: 0 auto;
}

.dock-display-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 28px;
}

.dock-display-eyebrow {
    color: #93c5fd;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: .15em;
}

.dock-display-header h1 {
    margin: 8px 0 0;
    color: #ffffff;
    font-size: clamp(58px, 8vw, 120px);
    line-height: .9;
    letter-spacing: -0.06em;
}

.dock-display-clock {
    font-size: clamp(42px, 6vw, 84px);
    font-weight: 900;
    color: #ffffff;
    line-height: 1;
}

.dock-flight-card {
    border-radius: 34px;
    padding: 34px;
    min-height: 640px;
    background:
        linear-gradient(135deg, rgba(15, 23, 42, .92), rgba(30, 41, 59, .92)),
        rgba(15, 23, 42, .95);
    border: 3px solid rgba(148, 163, 184, .35);
    box-shadow: 0 30px 90px rgba(0, 0, 0, .35);
    position: relative;
    overflow: hidden;
}

.dock-flight-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 16px;
    background: #3b82f6;
}

.dock-flight-card.inbound::before {
    background: #10b981;
}

.dock-flight-card.outbound::before {
    background: #3b82f6;
}

.dock-flight-topline {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
}

.dock-flight-label {
    color: #cbd5e1;
    font-size: 24px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .12em;
}

.dock-flight-direction {
    display: inline-flex;
    margin-top: 14px;
    min-height: 44px;
    align-items: center;
    padding: 0 18px;
    border-radius: 999px;
    background: rgba(59, 130, 246, .18);
    color: #bfdbfe;
    font-size: 22px;
    font-weight: 900;
}

.dock-flight-card.inbound .dock-flight-direction {
    background: rgba(16, 185, 129, .18);
    color: #bbf7d0;
}

.dock-flight-status {
    min-width: 260px;
    text-align: center;
    border-radius: 20px;
    padding: 18px 22px;
    background: rgba(255, 255, 255, .09);
    color: #ffffff;
    font-size: clamp(28px, 3.4vw, 52px);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.dock-flight-main {
    margin-top: 54px;
}

.dock-flight-order {
    font-size: clamp(86px, 12vw, 180px);
    font-weight: 950;
    line-height: .9;
    color: #ffffff;
    letter-spacing: -0.08em;
}

.dock-flight-sub {
    margin-top: 22px;
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    color: #cbd5e1;
    font-size: clamp(24px, 3vw, 42px);
    font-weight: 800;
}

.dock-flight-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-top: 50px;
}

.dock-info-box {
    border-radius: 22px;
    padding: 22px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(226, 232, 240, .18);
}

.dock-info-box span {
    display: block;
    color: #94a3b8;
    font-size: 18px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 12px;
}

.dock-info-box strong {
    display: block;
    color: #ffffff;
    font-size: clamp(28px, 3vw, 46px);
    line-height: 1.05;
    font-weight: 950;
}

.dock-info-box small {
    display: block;
    margin-top: 10px;
    color: #cbd5e1;
    font-size: 22px;
    font-weight: 700;
}

.dock-progress-track {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0;
    margin-top: 58px;
    position: relative;
}

.dock-progress-track::before {
    content: "";
    position: absolute;
    left: 7%;
    right: 7%;
    top: 24px;
    height: 8px;
    background: rgba(148, 163, 184, .35);
    border-radius: 999px;
}

.dock-progress-step {
    position: relative;
    z-index: 2;
    text-align: center;
}

.dock-progress-dot {
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    border-radius: 999px;
    background: #475569;
    border: 6px solid #1e293b;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, .14);
}

.dock-progress-step.complete .dock-progress-dot {
    background: #22c55e;
}

.dock-progress-step.active .dock-progress-dot {
    background: #facc15;
    box-shadow:
        0 0 0 4px rgba(250, 204, 21, .28),
        0 0 36px rgba(250, 204, 21, .7);
}

.dock-progress-step.pending .dock-progress-dot {
    background: #64748b;
}

.dock-progress-label {
    color: #e2e8f0;
    font-size: clamp(18px, 2vw, 30px);
    font-weight: 900;
}

.dock-display-footer {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    margin-top: 52px;
    padding-top: 24px;
    border-top: 1px solid rgba(226, 232, 240, .18);
    color: #cbd5e1;
    font-size: clamp(20px, 2vw, 30px);
    font-weight: 800;
}

.dock-empty-board {
    min-height: 640px;
    border-radius: 34px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(15, 23, 42, .9);
    border: 3px dashed rgba(148, 163, 184, .4);
    text-align: center;
}

.dock-empty-icon {
    font-size: 100px;
    margin-bottom: 24px;
}

.dock-empty-board h2 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(54px, 7vw, 108px);
    letter-spacing: -0.05em;
}

.dock-empty-board p {
    margin: 18px 0 0;
    color: #cbd5e1;
    font-size: clamp(24px, 3vw, 42px);
    font-weight: 700;
}

@media (max-width: 900px) {
    .dock-display-header,
    .dock-display-footer,
    .dock-flight-topline {
        flex-direction: column;
    }

    .dock-flight-info-grid {
        grid-template-columns: 1fr;
    }

    .dock-progress-track {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .dock-progress-track::before {
        display: none;
    }
}

.ot-performance-wrap {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.ot-facility-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 22px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.ot-facility-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid #e2e8f0;
}

.ot-facility-header h2 {
    margin: 4px 0 0;
    color: #0f172a;
    font-size: 28px;
    font-weight: 900;
}

.ot-direction-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.ot-direction-card {
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 18px;
    background: #f8fafc;
    position: relative;
    overflow: hidden;
}

.ot-direction-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 6px;
    background: #3b82f6;
}

.ot-direction-card.inbound::before {
    background: #10b981;
}

.ot-direction-header {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
}

.ot-direction-label {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.ot-direction-card.inbound .ot-direction-label {
    background: #d1fae5;
    color: #047857;
}

.ot-direction-header h3 {
    margin: 9px 0 0;
    color: #0f172a;
    font-size: 20px;
    font-weight: 900;
}

.ot-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.ot-summary-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 13px;
}

.ot-summary-box span {
    display: block;
    color: #64748b;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .04em;
    line-height: 1.25;
}

.ot-summary-box strong {
    display: block;
    margin-top: 7px;
    color: #0f172a;
    font-size: 24px;
    font-weight: 950;
    line-height: 1;
}

.ot-stop-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.ot-stop-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 15px;
}

.ot-stop-title {
    color: #334155;
    font-size: 13px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
}

.ot-stop-metric {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
}

.ot-stop-metric + .ot-stop-metric {
    border-top: 1px solid #f1f5f9;
}

.ot-stop-metric span {
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
}

.ot-stop-metric strong {
    color: #0f172a;
    font-size: 17px;
    font-weight: 950;
}

.ot-stop-metric.primary {
    padding: 10px 12px;
    border-radius: 12px;
    background: #eff6ff;
    margin-bottom: 4px;
}

.ot-direction-card.inbound .ot-stop-metric.primary {
    background: #ecfdf5;
}

.ot-stop-metric.primary span {
    color: #1e40af;
}

.ot-direction-card.inbound .ot-stop-metric.primary span {
    color: #047857;
}

.ot-stop-metric.primary strong {
    color: #1d4ed8;
    font-size: 24px;
}

.ot-direction-card.inbound .ot-stop-metric.primary strong {
    color: #047857;
}

@media (max-width: 1100px) {
    .ot-direction-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .ot-summary-grid,
    .ot-stop-grid {
        grid-template-columns: 1fr;
    }

    .ot-facility-card {
        padding: 16px;
    }
}

.jb-hunt-filter-card {
    margin-bottom: 16px;
}

.jb-hunt-entry-wrap {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.jb-hunt-entry-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e2e8f0;
}

.jb-hunt-entry-header h2 {
    margin: 0;
    color: #0f172a;
    font-size: 22px;
    font-weight: 900;
}

.jb-hunt-entry-header p {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 14px;
}

.jb-hunt-card-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.jb-hunt-order-card {
    display: block;
    background: #f8fafc;
    border: 1px solid #dbeafe;
    border-radius: 18px;
    padding: 18px;
}

.jb-hunt-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    padding-bottom: 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid #e2e8f0;
}

.jb-hunt-order-title {
    color: #0f172a;
    font-size: 21px;
    font-weight: 950;
}

.jb-hunt-order-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.jb-hunt-order-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    background: #ffffff;
    color: #334155;
    border: 1px solid #e2e8f0;
    font-size: 12px;
    font-weight: 800;
}

.jb-hunt-card-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.jb-hunt-carrier-pill {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.jb-hunt-location-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.jb-hunt-location-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 13px;
}

.jb-hunt-location-box strong {
    display: block;
    margin-top: 4px;
    color: #0f172a;
    font-size: 15px;
    font-weight: 900;
}

.jb-hunt-location-box span {
    display: block;
    margin-top: 3px;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}

.jb-hunt-section-label {
    color: #64748b;
    font-size: 11px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.jb-hunt-time-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.jb-hunt-time-panel {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 15px;
    position: relative;
    overflow: hidden;
}

.jb-hunt-time-panel::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: #3b82f6;
}

.jb-hunt-time-panel.consignee-panel::before {
    background: #10b981;
}

.jb-hunt-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

.jb-hunt-panel-header h3 {
    margin: 4px 0 0;
    color: #0f172a;
    font-size: 18px;
    font-weight: 950;
}

.jb-hunt-appt-box {
    text-align: right;
    max-width: 220px;
}

.jb-hunt-appt-box span {
    display: block;
    color: #64748b;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.jb-hunt-appt-box strong {
    display: block;
    margin-top: 4px;
    color: #0f172a;
    font-size: 13px;
    font-weight: 850;
    line-height: 1.25;
}

.jb-hunt-input-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 100px;
    gap: 10px;
    align-items: end;
}

.jb-hunt-input-field label {
    display: block;
    margin-bottom: 5px;
    color: #334155;
    font-size: 12px;
    font-weight: 900;
}

.jb-hunt-input-field input {
    width: 100%;
    min-height: 40px;
}

.jb-hunt-dwell-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    min-height: 40px;
    padding: 8px 10px;
}

.jb-hunt-dwell-box span {
    display: block;
    color: #64748b;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
}

.jb-hunt-dwell-box strong {
    display: block;
    margin-top: 3px;
    color: #0f172a;
    font-size: 15px;
    font-weight: 950;
}

@media (max-width: 1200px) {
    .jb-hunt-time-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 800px) {
    .jb-hunt-card-top {
        flex-direction: column;
    }

    .jb-hunt-card-actions {
        width: 100%;
        justify-content: space-between;
    }

    .jb-hunt-location-grid {
        grid-template-columns: 1fr;
    }

    .jb-hunt-input-grid {
        grid-template-columns: 1fr;
    }

    .jb-hunt-appt-box {
        text-align: left;
        max-width: none;
    }

    .jb-hunt-panel-header {
        flex-direction: column;
    }
}

.ot-click-card {
    display: block;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.ot-click-card:hover {
    transform: translateY(-2px);
    border-color: #93c5fd;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12);
    text-decoration: none;
}

.ot-detail-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.ot-detail-summary-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.ot-detail-summary-card span {
    display: block;
    color: #64748b;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.ot-detail-summary-card strong {
    display: block;
    margin-top: 8px;
    color: #0f172a;
    font-size: 30px;
    font-weight: 950;
}

.ot-detail-summary-card.danger {
    border-color: #fecaca;
    background: #fff7f7;
}

.ot-detail-summary-card.danger strong {
    color: #dc2626;
}

.ot-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

.ot-reason-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ot-reason-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 11px 13px;
}

.ot-reason-row span {
    color: #334155;
    font-size: 14px;
    font-weight: 800;
}

.ot-reason-row strong {
    color: #0f172a;
    font-size: 18px;
    font-weight: 950;
}

.ot-detail-table {
    min-width: 1500px;
}

@media (max-width: 900px) {
    .ot-detail-summary-grid,
    .ot-detail-grid {
        grid-template-columns: 1fr;
    }
}

.customer-performance-section {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #dbeafe;
}

.customer-performance-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 12px;
}

.customer-performance-header h4 {
    margin: 0;
    color: #0f172a;
    font-size: 15px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.customer-performance-header p {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.customer-performance-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.customer-performance-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 12px;
}

.customer-performance-title {
    color: #334155;
    font-size: 12px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 10px;
}

.customer-performance-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.customer-performance-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 11px;
}

.customer-performance-row.danger {
    background: #fff7f7;
    border-color: #fecaca;
}

.customer-performance-row.warning {
    background: #fffbeb;
    border-color: #fde68a;
}

.customer-performance-row strong {
    display: block;
    color: #0f172a;
    font-size: 13px;
    font-weight: 950;
}

.customer-performance-row span {
    display: block;
    margin-top: 3px;
    color: #64748b;
    font-size: 11px;
    font-weight: 750;
}

.customer-performance-row small {
    display: block;
    margin-top: 5px;
    color: #475569;
    font-size: 11px;
    font-weight: 750;
    line-height: 1.25;
}

.customer-performance-numbers {
    text-align: right;
    flex-shrink: 0;
    min-width: 62px;
}

.customer-performance-numbers strong {
    font-size: 16px;
}

.customer-performance-numbers span {
    font-size: 11px;
}

@media (max-width: 1200px) {
    .customer-performance-grid {
        grid-template-columns: 1fr;
    }
}

.customer-extra-row {
    display: none;
}

.customer-extra-row.is-visible {
    display: flex;
}

.customer-expand-btn {
    width: 100%;
    border: 1px solid #dbeafe;
    background: #ffffff;
    color: #2563eb;
    border-radius: 10px;
    min-height: 34px;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
}

.customer-expand-btn:hover {
    background: #eff6ff;
}


.ot-adjusted-simple-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.ot-adjusted-simple-box {
    background: #f8fafc;
    border: 1px solid #dbeafe;
    border-radius: 16px;
    padding: 18px;
}

.ot-adjusted-simple-box span {
    display: block;
    color: #475569;
    font-size: 12px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.ot-adjusted-simple-box strong {
    display: block;
    margin-top: 8px;
    color: #1d4ed8;
    font-size: 40px;
    line-height: 1;
    font-weight: 950;
}

.ot-adjusted-simple-box small {
    display: block;
    margin-top: 8px;
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
}

.ot-adjusted-simple-box.adjusted {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.ot-adjusted-simple-box.adjusted strong {
    color: #15803d;
}

@media(max-width: 800px) {
    .ot-adjusted-simple-grid {
        grid-template-columns: 1fr;
    }
}

.ot-combined-metric-card {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.ot-combined-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ot-combined-section-header h4 {
    margin: 0;
    color: #0f172a;
    font-size: 15px;
    font-weight: 950;
}

.ot-combined-section-header p {
    margin: 4px 0 0;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
}

.ot-combined-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 2px 0;
}

.shipper-fail-comment-cell {
    min-width: 260px;
}

.shipper-fail-comment-form {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.shipper-fail-comment-form textarea {
    width: 100%;
    min-width: 190px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 12px;
    font-weight: 700;
    color: #0f172a;
    resize: vertical;
}

.shipper-fail-comment-form textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.button-link {
    cursor: pointer;
    white-space: nowrap;
}

.sortable-header {
    color: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 900;
    white-space: nowrap;
}

.sortable-header:hover {
    text-decoration: underline;
}

.sortable-header.active {
    color: #2563eb;
}

.chargeback-review-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 240px;
}

.chargeback-review-form textarea,
.filter-form textarea {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 12px;
    font-weight: 700;
    color: #0f172a;
    resize: vertical;
}

.chargeback-review-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.filter-wide {
    grid-column: 1 / -1;
}

.accounting-section {
    margin-top: 36px;
    padding-top: 28px;
    border-top: 1px solid #e2e8f0;
}

.accounting-tool-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 14px;
}

.accounting-tool-card {
    min-height: 150px;
}

.dashboard-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 6px 11px;
    font-size: 11px;
    font-weight: 900;
    white-space: nowrap;
}

.status-available {
    background: #dcfce7;
    color: #166534;
}

.status-internal {
    background: #dbeafe;
    color: #1d4ed8;
}

@media (max-width: 800px) {
    .accounting-tool-grid {
        grid-template-columns: 1fr;
    }
}

.chargeback-layout {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.chargeback-entry-card {
    max-width: 980px;
}

.chargeback-entry-form {
    margin-top: 18px;
}

.chargeback-form-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr .7fr;
    gap: 16px;
}

.chargeback-form-grid label {
    display: flex;
    flex-direction: column;
    gap: 7px;
    color: #0f172a;
    font-size: 12px;
    font-weight: 900;
}

.chargeback-form-grid input,
.chargeback-form-grid select,
.chargeback-form-grid textarea {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 11px 12px;
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    background: #fff;
}

.chargeback-form-grid input:focus,
.chargeback-form-grid select:focus,
.chargeback-form-grid textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.chargeback-notes-field {
    grid-column: 1 / -1;
}

.chargeback-form-grid textarea {
    resize: vertical;
    min-height: 110px;
}

.chargeback-form-actions {
    display: flex;
    justify-content: flex-start;
    margin-top: 18px;
}

.chargeback-submit-button {
    border: none;
    cursor: pointer;
}

.chargeback-table th,
.chargeback-table td {
    white-space: nowrap;
}

.chargeback-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 900;
}

.chargeback-status-pending {
    background: #fef9c3;
    color: #854d0e;
}

.chargeback-status-approved {
    background: #dcfce7;
    color: #166534;
}

.chargeback-status-declined {
    background: #fee2e2;
    color: #991b1b;
}

@media (max-width: 900px) {
    .chargeback-form-grid {
        grid-template-columns: 1fr;
    }

    .chargeback-notes-field {
        grid-column: auto;
    }
}

/* =========================================================
   Accounting - Charge Back Entry
========================================================= */

.accounting-page-header {
    margin-bottom: 24px;
}

.accounting-entry-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 22px;
    align-items: start;
}

.accounting-entry-main {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.accounting-panel {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
    overflow: hidden;
}

.accounting-entry-panel {
    padding: 24px;
}

.accounting-recent-panel {
    padding: 0;
}

.accounting-recent-panel .accounting-panel-header {
    padding: 22px 24px 16px;
    border-bottom: 1px solid #e2e8f0;
}

.accounting-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.accounting-panel-eyebrow {
    margin-bottom: 7px;
    color: #2563eb;
    font-size: 11px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.accounting-panel-header h2 {
    margin: 0;
    color: #0f172a;
    font-size: 24px;
    line-height: 1.15;
}

.accounting-panel-header p {
    margin: 7px 0 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.45;
}

.accounting-form {
    margin: 0;
}

.accounting-form-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr 0.7fr;
    gap: 16px;
}

.accounting-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.accounting-field span {
    color: #334155;
    font-size: 12px;
    font-weight: 900;
}

.accounting-field input,
.accounting-field select,
.accounting-field textarea {
    width: 100%;
    min-height: 44px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 10px 12px;
    background: #ffffff;
    color: #0f172a;
    font-size: 14px;
    font-weight: 700;
}

.accounting-field textarea {
    min-height: 130px;
    resize: vertical;
    line-height: 1.45;
}

.accounting-field input:focus,
.accounting-field select:focus,
.accounting-field textarea:focus,
.accounting-money-input:focus-within {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.accounting-money-input {
    display: flex;
    align-items: center;
    min-height: 44px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    background: #ffffff;
    overflow: hidden;
}

.accounting-money-input span {
    align-self: stretch;
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    background: #f8fafc;
    border-right: 1px solid #e2e8f0;
    color: #475569;
    font-size: 14px;
    font-weight: 950;
}

.accounting-money-input input {
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.accounting-money-input input:focus {
    box-shadow: none;
}

.accounting-notes-field {
    grid-column: 1 / -1;
}

.accounting-form-actions {
    display: flex;
    justify-content: flex-start;
    margin-top: 20px;
}

.accounting-primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    border: none;
    border-radius: 12px;
    background: #2563eb;
    color: #ffffff;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.22);
}

.accounting-primary-button:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

.accounting-table-wrap {
    overflow-x: auto;
}

.accounting-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
}

.accounting-table th {
    padding: 13px 14px;
    background: #f8fafc;
    color: #475569;
    border-bottom: 1px solid #e2e8f0;
    font-size: 11px;
    font-weight: 950;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.accounting-table td {
    padding: 14px;
    border-bottom: 1px solid #f1f5f9;
    color: #0f172a;
    font-size: 13px;
    vertical-align: middle;
}

.accounting-table tbody tr:hover td {
    background: #f8fafc;
}

.accounting-empty-row {
    padding: 28px 14px !important;
    text-align: center;
    color: #64748b !important;
    font-weight: 700;
}

.accounting-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 86px;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.accounting-status-pending {
    background: #fef9c3;
    color: #854d0e;
}

.accounting-status-approved {
    background: #dcfce7;
    color: #166534;
}

.accounting-status-declined {
    background: #fee2e2;
    color: #991b1b;
}

.accounting-side-panel {
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: sticky;
    top: 20px;
}

.accounting-side-card {
    padding: 18px;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid #dbeafe;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.accounting-side-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    margin-bottom: 12px;
    border-radius: 999px;
    background: #2563eb;
    color: #ffffff;
    font-size: 13px;
    font-weight: 950;
}

.accounting-side-card h3 {
    margin: 0 0 7px;
    color: #0f172a;
    font-size: 16px;
}

.accounting-side-card p {
    margin: 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.45;
}

@media (max-width: 1100px) {
    .accounting-entry-shell {
        grid-template-columns: 1fr;
    }

    .accounting-side-panel {
        position: static;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 850px) {
    .accounting-form-grid {
        grid-template-columns: 1fr;
    }

    .accounting-notes-field {
        grid-column: auto;
    }

    .accounting-side-panel {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   Accounting - Charge Back Review
========================================================= */

.accounting-review-shell {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.accounting-review-filter-panel {
    padding: 18px;
}

.accounting-review-filter-form {
    display: grid;
    grid-template-columns: 220px minmax(260px, 1fr) auto;
    gap: 16px;
    align-items: end;
}

.accounting-review-search-field {
    min-width: 260px;
}

.accounting-review-filter-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.accounting-review-panel {
    padding: 0;
}

.accounting-review-panel-header {
    padding: 22px 24px 16px;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 0;
}

.accounting-review-table {
    min-width: 1250px;
}

.accounting-review-note-cell {
    min-width: 260px;
    max-width: 360px;
    white-space: normal !important;
    line-height: 1.4;
}

.accounting-review-action-cell {
    min-width: 280px;
}

.accounting-review-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.accounting-review-form textarea {
    width: 100%;
    min-height: 62px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 9px 11px;
    color: #0f172a;
    font-size: 13px;
    font-weight: 700;
    resize: vertical;
}

.accounting-review-form textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.accounting-review-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.accounting-approve-button,
.accounting-decline-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
}

.accounting-approve-button {
    border: 1px solid #16a34a;
    background: #16a34a;
    color: #ffffff;
}

.accounting-approve-button:hover {
    background: #15803d;
    border-color: #15803d;
}

.accounting-decline-button {
    border: 1px solid #fecaca;
    background: #fff1f2;
    color: #991b1b;
}

.accounting-decline-button:hover {
    background: #fee2e2;
}

.accounting-reviewed-box {
    min-width: 180px;
}

.accounting-reviewed-box strong {
    display: block;
    color: #0f172a;
    margin-bottom: 4px;
}

@media (max-width: 900px) {
    .accounting-review-filter-form {
        grid-template-columns: 1fr;
    }

    .accounting-review-filter-actions {
        flex-wrap: wrap;
    }
}

/* =========================================================
   Accounting Entry - Full Width / History Update
========================================================= */

.accounting-entry-shell-full {
    display: block;
}

.accounting-entry-shell-full .accounting-entry-main {
    width: 100%;
}

.accounting-form-grid-four {
    grid-template-columns: 0.8fr 1fr 1.1fr 0.7fr;
}

.accounting-history-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 0;
}

@media (max-width: 1100px) {
    .accounting-form-grid-four {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 750px) {
    .accounting-form-grid-four {
        grid-template-columns: 1fr;
    }

    .accounting-history-header {
        flex-direction: column;
    }
}

/* =========================================================
   Facility Portal Selection - Unified Card Styling
   ========================================================= */

.warehouse-select-page .portal-card {
    display: flex;
    flex-direction: column;
    min-height: 155px;
    padding: 24px;
    border: 1px solid #bfdbfe;
    border-radius: 16px;
    background: #ffffff;
    color: #0f172a;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
    transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.warehouse-select-page .portal-card:hover {
    background: #ffffff;
    border-color: #bfdbfe;
    box-shadow: 0 10px 26px rgba(37, 99, 235, 0.10);
    transform: translateY(-2px);
}

.warehouse-select-page .portal-card:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.20);
    outline-offset: 3px;
}

.warehouse-select-page .portal-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.warehouse-select-page .portal-card h2,
.warehouse-select-page .portal-card h3 {
    margin: 0;
    color: #0f172a;
    font-size: 22px;
    font-weight: 900;
    line-height: 1.2;
}

.warehouse-select-page .portal-card p {
    margin: 0 0 20px;
    color: #475569;
    font-size: 13px;
    line-height: 1.5;
}

.warehouse-select-page .portal-card-footer {
    display: block;
    margin-top: auto;
    padding-top: 8px;
    color: #2563eb;
    font-size: 13px;
    font-weight: 900;
}

@media (max-width: 900px) {
    .warehouse-select-page .portal-card {
        min-height: 140px;
    }
}