:root {
    --ink: #142029;
    --muted: #5c6972;
    --line: #d9e2e7;
    --paper: #ffffff;
    --soft: #f5f8f9;
    --navy: #17364a;
    --red: #c9342b;
    --red-dark: #a8241f;
    --teal: #127c82;
    --gold: #d8a03d;
    --focus: #2f80ed;
    --shadow: 0 20px 60px rgba(9, 24, 36, 0.22);
}

* {
    box-sizing: border-box;
}

button,
input,
select,
textarea {
    max-width: 100%;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--soft);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.5;
}

a {
    color: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(47, 128, 237, 0.24);
    outline-offset: 2px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 72px;
    padding: 12px 32px;
    color: #ffffff;
    background: rgba(12, 28, 39, 0.94);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    color: #ffffff;
    text-decoration: none;
    font-size: 16px;
    font-weight: 700;
}

.brand-logo {
    display: block;
    width: clamp(128px, 12vw, 180px);
    max-height: 40px;
    object-fit: contain;
    border-radius: 6px;
}

.portal-brand-label {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 9px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.brand strong {
    display: block;
    color: #c9f0ed;
    font-size: 13px;
    font-weight: 700;
}

.brand-mark {
    display: grid;
    place-items: center;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    color: #ffffff;
    background: var(--red);
    border-radius: 8px;
    font-size: 15px;
    font-weight: 800;
}

.login-logo {
    display: block;
    width: min(220px, 100%);
    height: auto;
    margin: 0 auto 16px;
    border-radius: 8px;
}

.top-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.top-nav a {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    color: #ffffff;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
}

.top-nav a:hover,
.top-nav a:focus-visible {
    background: rgba(255, 255, 255, 0.12);
}

.hero {
    position: relative;
    min-height: calc(100vh - 72px);
    padding: 44px 32px 56px;
    background-image: url("../images/freight-hero.png");
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(8, 20, 30, 0.9) 0%, rgba(8, 20, 30, 0.72) 37%, rgba(8, 20, 30, 0.35) 68%, rgba(8, 20, 30, 0.18) 100%),
        linear-gradient(0deg, rgba(8, 20, 30, 0.62), rgba(8, 20, 30, 0.08));
}

.hero-layout {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(280px, 0.95fr) minmax(280px, 0.45fr);
    gap: 40px;
    align-items: center;
    max-width: 1260px;
    margin: 0 auto;
}

.hero-copy {
    position: sticky;
    top: 116px;
    min-width: 0;
    padding-top: 24px;
    color: #ffffff;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--gold);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0;
}

h1,
h2 {
    margin: 0;
    line-height: 1.05;
    letter-spacing: 0;
}

.hero-copy h1 {
    max-width: 560px;
    font-size: 56px;
}

.hero-text {
    max-width: 560px;
    margin: 22px 0 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 20px;
}

.quick-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    max-width: 560px;
    margin-top: 28px;
}

.quick-stats span {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 7px 12px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
}

.hero-quote-card {
    align-self: center;
    padding: 24px;
    color: #ffffff;
    background: rgba(16, 26, 33, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.hero-quote-card h2 {
    font-size: 28px;
}

.hero-quote-card p:not(.eyebrow) {
    margin: 12px 0 18px;
    color: rgba(255, 255, 255, 0.84);
}

.quote-cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 15px;
    color: #ffffff;
    background: var(--red);
    border-radius: 8px;
    text-decoration: none;
    font-weight: 800;
}

.quote-section {
    padding: 34px 24px 42px;
    background: #eef4f5;
}

.quote-form {
    width: min(860px, 100%);
    margin: 0 auto;
    min-width: 0;
    padding: 24px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    box-shadow: 0 16px 44px rgba(9, 24, 36, 0.12);
}

.form-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.form-heading h2 {
    font-size: 28px;
}

fieldset {
    min-width: 0;
    margin: 24px 0 0;
    padding: 0;
    border: 0;
}

legend {
    margin-bottom: 12px;
    font-size: 18px;
    font-weight: 800;
}

.form-grid,
.measure-grid,
.choice-row {
    display: grid;
    gap: 14px;
}

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

.measure-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.choice-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field,
.choice-group {
    min-width: 0;
}

label,
.field-label {
    display: block;
    margin-bottom: 7px;
    color: #22323d;
    font-size: 14px;
    font-weight: 800;
}

.form-control {
    width: 100%;
    min-height: 46px;
    padding: 11px 12px;
    color: var(--ink);
    background: #ffffff;
    border: 1px solid #cbd7dc;
    border-radius: 8px;
    font: inherit;
    font-size: 15px;
}

select.form-control {
    cursor: pointer;
}

textarea.form-control {
    min-height: 104px;
    resize: vertical;
}

.form-control:focus {
    outline: 3px solid rgba(47, 128, 237, 0.18);
    border-color: var(--focus);
}

.segmented {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.segment {
    position: relative;
    min-width: 0;
    min-height: 46px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #23333e;
    background: #ffffff;
    border: 1px solid #cbd7dc;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
}

.segment input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.segment span {
    display: block;
    padding: 9px 10px;
    overflow-wrap: anywhere;
}

.segment:has(input:checked) {
    color: #ffffff;
    background: var(--teal);
    border-color: var(--teal);
}

.segment:focus-within {
    outline: 3px solid rgba(47, 128, 237, 0.18);
    border-color: var(--focus);
}

input[type="file"].form-control {
    padding: 8px;
    background: #ffffff;
}

.field-error {
    margin: 6px 0 0;
    color: var(--red-dark);
    font-size: 13px;
    font-weight: 700;
}

.alert {
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
}

.alert p {
    margin: 0;
}

.alert-success {
    color: #0d5137;
    background: #e5f7ee;
    border: 1px solid #b6e5cb;
}

.alert-error {
    color: var(--red-dark);
    background: #fff2f0;
    border: 1px solid #ffd1cc;
}

.submit-button,
.button-link {
    width: 100%;
    min-height: 52px;
    margin-top: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 18px;
    color: #ffffff;
    background: var(--red);
    border: 0;
    border-radius: 8px;
    font: inherit;
    font-size: 16px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.submit-button:hover,
.submit-button:focus-visible,
.button-link:hover,
.button-link:focus-visible {
    background: var(--red-dark);
}

.submit-button:disabled,
.button-link:disabled {
    cursor: not-allowed;
    opacity: 0.62;
}

.service-band {
    padding: 34px 32px 42px;
    background: #ffffff;
}

.action-band {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    background: #102331;
}

.action-band a {
    min-width: 0;
    padding: 22px 24px;
    color: #ffffff;
    background: #17364a;
    text-decoration: none;
}

.action-band a:hover,
.action-band a:focus-visible {
    background: #1f4b66;
}

.action-band span {
    display: block;
    color: #c9f0ed;
    font-size: 13px;
    font-weight: 800;
}

.action-band strong {
    display: block;
    margin-top: 4px;
    font-size: 17px;
    overflow-wrap: anywhere;
}

.section-heading {
    max-width: 1260px;
    margin: 0 auto 20px;
}

.section-heading h2 {
    font-size: 30px;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    max-width: 1260px;
    margin: 0 auto;
}

.service-grid-four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.service-grid article {
    min-width: 0;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.service-grid h2 {
    font-size: 20px;
}

.service-grid p,
.site-footer p,
.success-panel p {
    color: var(--muted);
}

.service-grid p {
    margin: 10px 0 0;
}

.operations-band {
    display: grid;
    grid-template-columns: minmax(240px, 0.45fr) minmax(0, 1fr);
    gap: 28px;
    padding: 38px 32px 44px;
    background: #eef4f5;
}

.operations-band > div,
.workflow-list {
    max-width: 1260px;
}

.operations-band > div {
    justify-self: end;
    width: 100%;
}

.operations-band h2 {
    font-size: 30px;
}

.workflow-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.workflow-list li {
    min-width: 0;
    padding: 20px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.workflow-list span {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    color: #ffffff;
    background: var(--teal);
    border-radius: 8px;
    font-weight: 800;
}

.workflow-list strong {
    display: block;
    margin-top: 14px;
    font-size: 17px;
}

.workflow-list p {
    margin: 8px 0 0;
    color: var(--muted);
}

.site-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 32px;
    background: #101a21;
}

.site-footer p {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
}

.site-footer a {
    color: #ffffff;
    margin-left: 10px;
}

.footer-login-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.footer-login-links a {
    margin-left: 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 13px;
}

.success-page {
    min-height: 100vh;
    background:
        linear-gradient(rgba(10, 26, 37, 0.68), rgba(10, 26, 37, 0.68)),
        url("../images/freight-hero.png") center / cover;
}

.success-wrap {
    min-height: calc(100vh - 72px);
    display: grid;
    place-items: center;
    padding: 40px 24px;
}

.success-panel {
    width: min(720px, 100%);
    padding: 34px;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.96);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.success-panel h1 {
    font-size: 42px;
}

.success-panel p {
    font-size: 18px;
}

.quote-result {
    margin: 22px 0;
    padding: 18px;
    background: #e5f7ee;
    border: 1px solid #a8debf;
    border-radius: 8px;
}

.quote-result span {
    display: block;
    color: #0d5137;
    font-size: 14px;
    font-weight: 800;
}

.quote-result strong {
    display: block;
    margin-top: 4px;
    color: #0d5137;
    font-size: 38px;
    line-height: 1;
}

.quote-result p {
    margin: 10px 0 0;
    color: #245943;
    font-size: 15px;
}

.quote-result-muted {
    background: #fff7e7;
    border-color: #f1cf8d;
}

.quote-result-muted span,
.quote-result-muted strong {
    color: #76510b;
}

.quote-result-muted p {
    color: #76510b;
}

.quote-breakdown {
    margin: 22px 0;
    padding: 18px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.quote-breakdown h2 {
    margin: 0 0 14px;
    font-size: 20px;
}

.quote-breakdown dl {
    display: grid;
    gap: 10px;
    margin: 0;
}

.quote-breakdown dl div {
    display: grid;
    grid-template-columns: minmax(120px, 0.45fr) minmax(0, 1fr);
    gap: 12px;
    padding: 10px 0;
    border-top: 1px solid var(--line);
}

.quote-breakdown dl div:first-child {
    border-top: 0;
}

.quote-breakdown dt {
    color: #243641;
    font-size: 14px;
    font-weight: 800;
}

.quote-breakdown dd {
    min-width: 0;
    margin: 0;
    color: var(--muted);
    overflow-wrap: anywhere;
}

.contact-card {
    margin: 22px 0;
    padding: 18px;
    background: #f5f8f9;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.contact-card span {
    display: block;
    color: var(--teal);
    font-size: 14px;
    font-weight: 800;
}

.contact-card strong {
    display: block;
    margin-top: 4px;
    font-size: 22px;
}

.contact-card p {
    margin: 6px 0 0;
    font-size: 16px;
}

.contact-card a,
.contact-note a {
    color: var(--red-dark);
    font-weight: 800;
}

.success-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.button-link {
    margin-top: 12px;
}

.button-link.secondary {
    color: var(--ink);
    background: #eef4f5;
    border: 1px solid var(--line);
}

.button-link.secondary:hover,
.button-link.secondary:focus-visible {
    background: #dfeaec;
}

.portal-body {
    min-height: 100vh;
    background: #eef4f5;
}

.portal-header {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 12px 24px;
    background: #101a21;
    color: #ffffff;
}

.portal-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.portal-nav a,
.portal-nav button,
.portal-button {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 12px;
    color: #ffffff;
    background: var(--red);
    border: 0;
    border-radius: 8px;
    text-decoration: none;
    font: inherit;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
}

.portal-button:hover,
.portal-button:focus-visible,
.portal-nav a:hover,
.portal-nav a:focus-visible,
.portal-nav button:hover,
.portal-nav button:focus-visible {
    background: var(--red-dark);
}

.portal-nav a,
.portal-nav button {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.portal-button.secondary {
    color: var(--ink);
    background: #ffffff;
    border: 1px solid var(--line);
}

.portal-button.secondary:hover,
.portal-button.secondary:focus-visible {
    background: #eef4f5;
}

.portal-nav form {
    margin: 0;
}

.portal-shell {
    width: min(1320px, 100%);
    margin: 0 auto;
    padding: 28px 24px 48px;
}

.portal-title,
.panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.portal-title h1 {
    font-size: 36px;
}

.portal-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.portal-messages {
    margin-bottom: 16px;
    padding: 12px 14px;
    color: #0d5137;
    background: #e5f7ee;
    border: 1px solid #b6e5cb;
    border-radius: 8px;
}

.portal-messages p {
    margin: 0;
    font-weight: 800;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.metric-grid article,
.portal-panel,
.driver-run-card,
.driver-drop-card {
    min-width: 0;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.metric-grid article {
    padding: 18px;
}

.metric-grid span {
    display: block;
    color: var(--muted);
    font-weight: 800;
}

.metric-grid strong {
    display: block;
    margin-top: 6px;
    font-size: 34px;
}

.portal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

.portal-panel {
    padding: 18px;
}

.portal-panel p {
    overflow-wrap: anywhere;
}

.muted-text {
    color: var(--muted);
    font-size: 13px;
}

.portal-panel h2,
.panel-heading h2 {
    margin: 0 0 12px;
    font-size: 22px;
}

.panel-heading h2 {
    margin-bottom: 0;
}

.table-wrap {
    overflow-x: auto;
}

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

th,
td {
    padding: 11px 10px;
    text-align: left;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

tbody tr:hover {
    background: #fbfdfd;
}

th {
    color: #22323d;
    background: #f5f8f9;
    font-weight: 800;
}

td a,
.panel-heading a {
    color: var(--red-dark);
    font-weight: 800;
}

.filter-bar {
    display: flex;
    align-items: end;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 18px;
    padding: 14px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.filter-bar label {
    margin: 0;
}

.manifest-filter-bar label {
    flex: 1 1 170px;
}

.manifest-filter-bar .portal-button {
    flex: 0 0 auto;
}

.detail-list {
    display: grid;
    gap: 10px;
    margin: 0 0 16px;
}

.detail-list div {
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr);
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
}

.detail-list dt {
    color: var(--muted);
    font-weight: 800;
}

.detail-list dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.portal-form .form-grid {
    margin-bottom: 18px;
}

.portal-form .field {
    min-width: 0;
}

.portal-form input:not([type="checkbox"]):not([type="radio"]),
.portal-form select,
.portal-form textarea,
.login-panel input {
    width: 100%;
    min-height: 46px;
    padding: 11px 12px;
    color: var(--ink);
    background: #ffffff;
    border: 1px solid #cbd7dc;
    border-radius: 8px;
    font: inherit;
    font-size: 15px;
}

.portal-form textarea {
    min-height: 104px;
    resize: vertical;
}

.check-field {
    align-self: end;
}

.check-field label {
    min-height: 46px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 11px 12px;
    background: #ffffff;
    border: 1px solid #cbd7dc;
    border-radius: 8px;
}

.check-field input {
    width: 18px;
    height: 18px;
}

.login-panel .field + .field {
    margin-top: 14px;
}

.login-panel label {
    color: #22323d;
}

.help-text {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.run-stack {
    display: grid;
    gap: 10px;
}

.run-row,
.driver-run-card {
    display: block;
    padding: 14px;
    color: inherit;
    text-decoration: none;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.run-row span,
.driver-run-card span {
    display: block;
    color: var(--muted);
    margin-top: 4px;
}

.run-map {
    width: 100%;
    min-height: 360px;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}

.run-card-grid,
.driver-drop-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.driver-run-card,
.driver-drop-card {
    padding: 18px;
    color: inherit;
    text-decoration: none;
}

.driver-run-card strong,
.driver-drop-card h2 {
    display: block;
    margin: 6px 0;
    font-size: 24px;
}

.driver-drop-card .portal-button {
    width: 100%;
    margin-top: 14px;
}

.driver-drop-card p {
    overflow-wrap: anywhere;
}

.pod-form input[type="file"] {
    min-height: 56px;
}

.manifest-builder {
    display: grid;
    gap: 18px;
}

.manifest-lines-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 6px;
    border-top: 1px solid var(--line);
}

.manifest-lines-heading h2 {
    margin: 0;
}

.manifest-lines-heading .help-text {
    margin: 6px 0 0;
}

.manifest-total-stack {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.manifest-total {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 9px 12px;
    color: #22323d;
    background: #e5f7ee;
    border: 1px solid #b6e5cb;
    border-radius: 8px;
    font-weight: 800;
}

.manifest-total strong {
    color: #0d5137;
    font-size: 18px;
}

.cbm-total {
    background: #edf4ff;
    border-color: #cadcf6;
}

.cbm-total strong {
    color: #25466f;
}

.manifest-lines-wrap {
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow-x: auto;
}

.manifest-lines-table {
    min-width: 1120px;
}

.manifest-lines-table th,
.manifest-lines-table td {
    min-width: 0;
    vertical-align: top;
}

.manifest-lines-table th:last-child,
.manifest-lines-table td:last-child {
    width: 118px;
    min-width: 118px;
    text-align: right;
}

.manifest-lines-table th:nth-child(1),
.manifest-lines-table td:nth-child(1) {
    width: 152px;
}

.manifest-lines-table th:nth-child(2),
.manifest-lines-table td:nth-child(2) {
    width: 132px;
}

.manifest-lines-table th:nth-child(3),
.manifest-lines-table td:nth-child(3) {
    width: 132px;
}

.manifest-lines-table th:nth-child(4),
.manifest-lines-table td:nth-child(4),
.manifest-lines-table th:nth-child(5),
.manifest-lines-table td:nth-child(5) {
    width: 96px;
}

.manifest-lines-table th:nth-child(6),
.manifest-lines-table td:nth-child(6),
.manifest-lines-table th:nth-child(7),
.manifest-lines-table td:nth-child(7),
.manifest-lines-table th:nth-child(8),
.manifest-lines-table td:nth-child(8) {
    width: 92px;
}

.manifest-lines-table th:nth-child(9),
.manifest-lines-table td:nth-child(9),
.manifest-lines-table th:nth-child(10),
.manifest-lines-table td:nth-child(10) {
    width: 112px;
}

.manifest-lines-table input,
.manifest-lines-table select {
    width: 100%;
    min-width: 0;
}

.manifest-lines-table [data-line-total],
.manifest-lines-table [data-line-cbm-total] {
    color: #162631;
    font-weight: 800;
    white-space: nowrap;
}

.manifest-lines-table [data-line-cbm-total] {
    color: #25466f;
}

.manifest-lines-table td:nth-child(6) input,
.manifest-lines-table td:nth-child(7) input,
.manifest-lines-table td:nth-child(8) input {
    min-width: 72px;
}

.inline-checkbox {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: #34434e;
    font-size: 13px;
    font-weight: 800;
}

.inline-checkbox input {
    width: 18px;
    height: 18px;
    min-width: 18px;
}

.manifest-delete-field {
    display: none;
}

.compact-button {
    min-height: 36px;
    padding: 7px 10px;
    font-size: 13px;
}

.delete-line-button {
    color: #8f1d17;
    background: #fff1f0;
    border-color: #f3c4bf;
}

.delete-line-button:hover {
    color: #751610;
    background: #ffe5e2;
    border-color: #e7a29b;
}

.manifest-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.manifest-submit {
    width: auto;
    min-width: 180px;
    margin-top: 0;
}

.manifest-table-form {
    display: grid;
    gap: 12px;
}

.manifest-table-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid #e1e7ea;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(18, 32, 41, 0.06);
}

.manifest-table-tools > span {
    color: #66727b;
    font-size: 14px;
    font-weight: 700;
}

.manifest-table-tools strong {
    color: #17232d;
    font-size: 16px;
}

.manifest-table-panel {
    padding: 0;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.9);
    border-color: #e3e9ed;
    box-shadow: 0 18px 48px rgba(14, 29, 39, 0.08);
}

.manifest-table-panel .table-wrap {
    overflow-x: hidden;
}

.manifest-list-table {
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    width: 100%;
    color: #1d2933;
    font-size: 12px;
}

.manifest-list-table th,
.manifest-list-table td {
    min-width: 0;
    padding: 11px 10px;
    border-bottom: 1px solid #edf1f3;
    overflow-wrap: anywhere;
}

.manifest-list-table th:nth-child(1),
.manifest-list-table td:nth-child(1) {
    width: 9%;
}

.manifest-list-table th:nth-child(2),
.manifest-list-table td:nth-child(2) {
    width: 8%;
}

.manifest-list-table th:nth-child(3),
.manifest-list-table td:nth-child(3) {
    width: 9%;
}

.manifest-list-table th:nth-child(4),
.manifest-list-table td:nth-child(4),
.manifest-list-table th:nth-child(5),
.manifest-list-table td:nth-child(5) {
    width: 11%;
}

.manifest-list-table th:nth-child(6),
.manifest-list-table td:nth-child(6) {
    width: 24%;
}

.manifest-list-table th:nth-child(7),
.manifest-list-table td:nth-child(7) {
    width: 7%;
}

.manifest-list-table th:nth-child(8),
.manifest-list-table td:nth-child(8) {
    width: 8%;
}

.manifest-list-table th:nth-child(9),
.manifest-list-table td:nth-child(9) {
    width: 7%;
}

.manifest-list-table th:nth-child(10),
.manifest-list-table td:nth-child(10) {
    width: 8%;
}

.manifest-list-table thead tr:first-child th {
    color: #6b7780;
    background: #fbfcfd;
    font-size: 12px;
    font-weight: 800;
    text-transform: none;
    white-space: normal;
    line-height: 1.2;
    word-break: normal;
}

.manifest-list-table tbody tr {
    transition: background 160ms ease, box-shadow 160ms ease;
}

.manifest-list-table tbody tr:hover {
    background: #f8fafb;
}

.manifest-list-table tbody td {
    background: rgba(255, 255, 255, 0.72);
}

.manifest-list-table tbody tr:last-child td {
    border-bottom: 0;
}

.manifest-connote-link {
    color: #0f6f77;
    font-weight: 800;
    text-decoration: none;
}

.manifest-connote-link:hover,
.manifest-connote-link:focus-visible {
    color: #0b5960;
    text-decoration: underline;
}

.description-cell {
    color: #34434e;
    line-height: 1.45;
}

.manifest-run-panel .panel-heading {
    align-items: flex-start;
}

.manifest-run-panel .portal-actions {
    flex: 1 1 680px;
    justify-content: flex-end;
}

.manifest-run-panel .portal-actions .form-control {
    width: auto;
    min-width: 150px;
}

.manifest-run-table {
    min-width: 1160px;
    font-size: 12px;
}

.manifest-run-table th {
    white-space: normal;
    line-height: 1.2;
}

.manifest-run-table th,
.manifest-run-table td {
    vertical-align: top;
}

.manifest-run-table input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.manifest-run-table .form-control {
    min-height: 38px;
    padding: 8px 9px;
    font-size: 12px;
}

.coordinate-input {
    min-width: 104px;
}

.numeric-cell {
    color: #24323d;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 9px;
    color: #66727b;
    background: #f2f4f5;
    border: 1px solid #e3e8eb;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
}

.status-pill-success {
    color: #0f6f4f;
    background: #eaf7f1;
    border-color: #ccecdf;
}

.status-pill-danger {
    color: #9a3412;
    background: #fff4e8;
    border-color: #ffd8ae;
}

.status-pill-warning {
    color: #755200;
    background: #fff4c7;
    border-color: #eed783;
}

.run-builder {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 16px;
    margin: 18px 0;
}

.run-builder-column {
    min-width: 0;
    padding: 16px;
    background: #f8fbfc;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.run-builder-search {
    margin-bottom: 12px;
}

.run-builder-list {
    display: grid;
    align-content: start;
    gap: 8px;
    min-height: 360px;
    max-height: 520px;
    overflow-y: auto;
    padding: 8px;
    background: #ffffff;
    border: 1px solid #dde7eb;
    border-radius: 8px;
}

.run-builder-controls {
    display: grid;
    align-content: center;
    gap: 10px;
}

.run-manifest-option {
    width: 100%;
    min-width: 0;
    padding: 12px;
    color: var(--ink);
    background: #ffffff;
    border: 1px solid #dce7eb;
    border-radius: 8px;
    text-align: left;
    cursor: pointer;
}

.run-manifest-option strong,
.run-manifest-option span,
.run-manifest-option small {
    display: block;
    overflow-wrap: anywhere;
}

.run-manifest-option span {
    margin-top: 4px;
    color: #42515c;
    font-weight: 700;
}

.run-manifest-option small {
    margin-top: 4px;
    color: var(--muted);
}

.run-manifest-option.is-selected {
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(201, 52, 43, 0.12);
}

.driver-drop-card.pod-pending {
    border-color: #e4c766;
    background: #fff8dc;
}

.driver-drop-card.pod-complete {
    border-color: #9bd0b2;
    background: #ecf8f0;
}

.table-filter-row th {
    padding: 8px 10px 12px;
    background: #f7f9fa;
}

.table-filter-row select {
    width: 100%;
    min-width: 0;
    min-height: 36px;
    padding: 7px 28px 7px 10px;
    color: #24323d;
    background-color: #ffffff;
    border-color: #dde5e9;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 1px 2px rgba(16, 28, 36, 0.04);
}

.pagination-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 14px;
    color: #66727b;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid #e1e7ea;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(18, 32, 41, 0.06);
    font-size: 13px;
    font-weight: 700;
}

.pagination-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.pagination-link,
.pagination-current {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 10px;
    background: #ffffff;
    border: 1px solid #dde5e9;
    border-radius: 8px;
    text-decoration: none;
}

.pagination-link {
    color: #17232d;
    font-weight: 800;
}

.pagination-link:hover,
.pagination-link:focus-visible {
    background: #f7f9fa;
}

.pagination-link.disabled {
    color: #9aa4aa;
    background: #f5f7f8;
}

.pagination-current {
    color: #66727b;
}

@media (max-width: 1080px) {
    .hero-layout {
        grid-template-columns: 1fr;
    }

    .hero-copy {
        position: static;
        padding-top: 0;
    }

    .hero-copy h1 {
        font-size: 44px;
    }

    .quote-form {
        max-width: none;
    }

    .measure-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .action-band,
    .service-grid-four,
    .workflow-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .operations-band {
        grid-template-columns: 1fr;
    }

    .operations-band > div {
        justify-self: stretch;
    }

    .metric-grid,
    .portal-grid,
    .run-card-grid,
    .driver-drop-list,
    .run-builder {
        grid-template-columns: 1fr;
    }

    .run-builder-controls {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .site-header {
        align-items: flex-start;
        padding: 12px 16px;
    }

    .portal-header {
        position: static;
        display: block;
        padding: 12px 16px;
    }

    .portal-nav {
        justify-content: flex-start;
        margin-top: 12px;
    }

    .brand-logo {
        width: min(160px, 44vw);
        max-height: 36px;
    }

    .login-logo {
        width: min(200px, 78vw);
    }

    .portal-shell {
        padding: 22px 16px 36px;
    }

    .quote-section {
        padding: 24px 16px 32px;
    }

    .hero-quote-card {
        padding: 20px;
    }

    .run-builder-list {
        min-height: 250px;
        max-height: 380px;
    }

    .portal-title,
    .panel-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .portal-title h1 {
        font-size: 30px;
    }

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

    .top-nav {
        gap: 6px;
    }

    .top-nav a {
        min-height: 36px;
        padding: 7px 9px;
        font-size: 13px;
    }

    .hero {
        min-height: 0;
        padding: 28px 16px 36px;
    }

    .hero-layout {
        gap: 24px;
    }

    .hero-copy h1,
    .success-panel h1 {
        font-size: 36px;
    }

    .hero-text {
        font-size: 18px;
    }

    .quote-form,
    .success-panel {
        padding: 20px;
    }

    .form-heading {
        display: block;
    }

    .form-heading h2 {
        font-size: 24px;
    }

    .form-grid,
    .choice-row,
    .measure-grid,
    .action-band,
    .service-grid,
    .service-grid-four,
    .workflow-list,
    .success-actions {
        grid-template-columns: 1fr;
    }

    .quote-breakdown dl div {
        grid-template-columns: 1fr;
        gap: 3px;
    }

    .detail-list div {
        grid-template-columns: 1fr;
        gap: 3px;
    }

    .service-band {
        padding: 26px 16px 32px;
    }

    .action-band a,
    .operations-band {
        padding-left: 16px;
        padding-right: 16px;
    }

    .site-footer {
        display: block;
        padding: 20px 16px;
    }

    .site-footer p + p {
        margin-top: 8px;
    }

    .footer-login-links {
        justify-content: flex-start;
    }

    .manifest-lines-heading,
    .manifest-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .manifest-total-stack {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .manifest-total,
    .manifest-submit,
    .manifest-actions .portal-button {
        width: 100%;
    }

    .manifest-lines-wrap {
        overflow: visible;
        border: 0;
    }

    .manifest-lines-table,
    .manifest-lines-table thead,
    .manifest-lines-table tbody,
    .manifest-lines-table tr,
    .manifest-lines-table th,
    .manifest-lines-table td {
        display: block;
        width: 100% !important;
    }

    .manifest-lines-table {
        border-collapse: separate;
        border-spacing: 0;
    }

    .manifest-lines-table thead {
        display: none;
    }

    .manifest-lines-table .manifest-line-row {
        margin-bottom: 14px;
        padding: 12px;
        background: #ffffff;
        border: 1px solid #e1e7ea;
        border-radius: 8px;
        box-shadow: 0 10px 26px rgba(14, 29, 39, 0.06);
    }

    .manifest-lines-table .manifest-line-row:last-child {
        margin-bottom: 0;
    }

    .manifest-lines-table td {
        display: grid;
        grid-template-columns: minmax(104px, 0.36fr) minmax(0, 1fr);
        align-items: center;
        gap: 10px;
        min-width: 0;
        padding: 8px 0;
        border-bottom: 0;
    }

    .manifest-lines-table td::before {
        content: attr(data-label);
        color: #6c7780;
        font-size: 13px;
        font-weight: 800;
    }

    .manifest-lines-table td:last-child {
        min-width: 0;
        padding-top: 12px;
        text-align: left;
    }

    .manifest-lines-table input,
    .manifest-lines-table select,
    .manifest-lines-table td:nth-child(6) input,
    .manifest-lines-table td:nth-child(7) input,
    .manifest-lines-table td:nth-child(8) input {
        width: 100%;
        min-width: 0;
    }

    .manifest-lines-table [data-line-total],
    .manifest-lines-table [data-line-cbm-total] {
        min-height: 38px;
        padding: 8px 10px;
        background: #f5f8f9;
        border-radius: 8px;
    }

    .manifest-lines-table [data-line-cbm-total] {
        background: #edf4ff;
    }

    .manifest-lines-table .compact-button {
        width: 100%;
    }

    .manifest-filter-bar {
        display: grid;
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .manifest-filter-bar .portal-button {
        width: 100%;
    }

    .manifest-table-tools {
        align-items: stretch;
        flex-direction: column;
    }

    .manifest-table-tools .portal-actions,
    .manifest-table-tools .portal-button {
        width: 100%;
    }

    .manifest-table-panel .table-wrap {
        overflow-x: visible;
    }

    .manifest-list-table,
    .manifest-list-table thead,
    .manifest-list-table tbody,
    .manifest-list-table tr,
    .manifest-list-table th,
    .manifest-list-table td {
        display: block;
        width: 100% !important;
    }

    .manifest-list-table thead tr:first-child {
        display: none;
    }

    .manifest-list-table .table-filter-row {
        display: grid;
        grid-template-columns: 1fr;
        gap: 9px;
        margin-bottom: 12px;
        padding: 12px;
        background: rgba(255, 255, 255, 0.84);
        border: 1px solid #e3e9ed;
        border-radius: 8px;
        box-shadow: 0 10px 28px rgba(14, 29, 39, 0.06);
    }

    .manifest-list-table .table-filter-row th {
        display: block;
        min-width: 0;
        padding: 0;
        background: transparent;
        border-bottom: 0;
    }

    .manifest-list-table .table-filter-row th::before {
        content: attr(data-filter-label);
        display: block;
        margin-bottom: 6px;
        color: var(--muted);
        font-weight: 800;
    }

    .manifest-list-table .table-filter-row select {
        width: 100%;
        min-width: 0;
    }

    .manifest-list-table tr {
        margin-bottom: 12px;
        padding: 8px 0;
        background: rgba(255, 255, 255, 0.92);
        border: 1px solid #e3e9ed;
        border-radius: 8px;
        box-shadow: 0 10px 26px rgba(14, 29, 39, 0.06);
    }

    .manifest-list-table td {
        display: grid;
        grid-template-columns: minmax(108px, 0.42fr) minmax(0, 1fr);
        gap: 10px;
        padding: 9px 12px;
        border-bottom: 0;
        background: transparent;
    }

    .manifest-list-table td::before {
        content: attr(data-label);
        color: #7a858d;
        font-weight: 800;
    }

    .description-cell {
        min-width: 0;
    }

    .pagination-bar,
    .pagination-actions,
    .pagination-link,
    .pagination-current {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .site-header {
        position: static;
    }

    .brand {
        gap: 8px;
        font-size: 14px;
    }

    .brand-logo {
        width: min(140px, 44vw);
        max-height: 32px;
    }

    .portal-brand-label {
        display: none;
    }

    .brand-mark {
        flex-basis: 38px;
        width: 38px;
        height: 38px;
    }

    .hero-copy h1,
    .success-panel h1 {
        font-size: 32px;
    }

    .quick-stats,
    .segmented {
        grid-template-columns: 1fr;
    }

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

    th,
    td {
        padding: 9px 8px;
    }
}
