:root {
    --ink: #292321;
    --muted: #716b68;
    --line: #e7e1dc;
    --paper: #f7f5f2;
    --red: #a51f2b;
    --red-dark: #831722;
    --sidebar: #2b2021;
    --bs-primary: #a51f2b;
    --bs-primary-rgb: 165, 31, 43;
}

* { box-sizing: border-box; }
body {
    color: var(--ink);
    background: var(--paper);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}
a { color: #96212b; }
a:hover { color: #6f1520; }
:focus-visible { outline: 3px solid #d88a55; outline-offset: 3px; }
h1, h2, h3, h4, h5 { color: inherit; letter-spacing: -.035em; font-weight: 700; }
.text-muted { color: #68615e !important; }
.eyebrow {
    color: #a32a32;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .14em;
}

.app-shell { display: flex; min-height: 100vh; }
.app-sidebar {
    display: flex;
    flex-direction: column;
    flex: 0 0 250px;
    width: 250px;
    min-height: 100vh;
    padding: 28px 18px 20px;
    background: var(--sidebar);
    color: #fff;
}
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip-link {
    position: absolute;
    top: -100px;
    left: 16px;
    z-index: 20;
    padding: 10px 14px;
    color: #fff;
    background: #721925;
    border-radius: 6px;
}
.skip-link:focus { top: 12px; color: #fff; }
.brand, .auth-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    text-decoration: none;
}
.brand:hover, .auth-brand:hover { color: #fff; }
.brand img, .auth-brand img { border-radius: 50%; background: #fff; flex: none; }
.brand strong { display: block; font-size: 1.18rem; letter-spacing: -.04em; }
.brand small { display: block; margin-top: 1px; color: #d7c0bd; font-size: .55rem; font-weight: 800; letter-spacing: .13em; white-space: nowrap; }
.sidebar-content { display: flex; flex: 1; flex-direction: column; }
.sidebar-content nav { padding-top: 39px; }
.nav-heading { margin: 0 10px 10px; color: #c3a9a5; font-size: .63rem; font-weight: 800; letter-spacing: .12em; }
.nav-heading-admin { margin-top: 30px; }
.sidebar-link, .sidebar-signout button {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    padding: 10px 11px;
    margin-bottom: 4px;
    border-radius: 8px;
    color: #eadfdb;
    font-size: .9rem;
    font-weight: 600;
    text-decoration: none;
}
.sidebar-link svg, .sidebar-signout button svg { width: 19px; height: 19px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-link:hover, .sidebar-signout button:hover { color: #fff; background: rgba(255,255,255,.08); }
.sidebar-link.active { color: #fff; background: #a62c35; }
.sidebar-signout button {
    width: 100%;
    border: 0;
    background: transparent;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
}
.nav-toggle { display: none; }
.app-main { flex: 1 1 0; min-width: 0; padding: clamp(24px, 4vw, 56px); }
.app-main > .container-fluid { max-width: 1280px; padding: 0; }
.app-main > h2, .app-main > .d-flex > h2, .app-main > .d-flex h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
.page-description { margin: 4px 0 0; color: var(--muted); }
.settings-card { max-width: 540px; padding: 1.5rem; }
.settings-card h3 { margin-bottom: 20px; font-size: 1.2rem; }
.settings-card .btn { align-self: flex-start; }
.table-scroll-hint { display: none; }
.app-main > hr { margin: 22px 0 30px; border-color: #bfb4ae; }
.app-main > .row { row-gap: 24px; }
.app-main .row.mb-4 { row-gap: 16px; }
.app-main .table-responsive { max-width: 100%; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.table { margin-bottom: 0; color: var(--ink); }
.table > :not(caption) > * > * { padding: .9rem 1rem; vertical-align: middle; }
.table thead th { white-space: nowrap; color: #625a57; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; }

.card { border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 8px 26px rgba(48, 34, 30, .04); }
.card-body { padding: 1.5rem; }
.card-header { padding: 1rem 1.5rem; border-color: var(--line); background: #fff; font-weight: 700; }
.card.bg-light { background: #fff !important; }
.form-label { margin-bottom: .35rem; color: #554c49; font-size: .81rem; font-weight: 700; }
.form-control, .form-select {
    min-width: 0;
    min-height: 46px;
    border: 1px solid #cfc5bf;
    border-radius: 8px;
    background-color: #fff;
    color: var(--ink);
    font-size: 1rem;
}
.form-control::placeholder { color: #827a76; opacity: 1; }
.form-control:focus, .form-select:focus { border-color: #ab3b43; box-shadow: 0 0 0 .2rem rgba(165,31,43,.13); }
.form-check-input:checked { background-color: var(--red); border-color: var(--red); }
.input-group-text { color: #625a57; background: #f5f2ef; border-color: #cfc5bf; font-size: .84rem; }
.btn { min-height: 44px; border-radius: 8px; padding: .65rem 1.05rem; font-weight: 700; }
.btn-primary { --bs-btn-bg: #a51f2b; --bs-btn-border-color: #a51f2b; --bs-btn-hover-bg: #831722; --bs-btn-hover-border-color: #831722; --bs-btn-active-bg: #72131d; --bs-btn-active-border-color: #72131d; }
.btn-outline-primary { --bs-btn-color: #a51f2b; --bs-btn-border-color: #a51f2b; --bs-btn-hover-bg: #a51f2b; --bs-btn-hover-border-color: #a51f2b; }
.btn-sm { font-size: .83rem; }
.alert { border-radius: 10px; }
.modal-content { border: 0; border-radius: 16px; overflow: hidden; }
.modal-header, .modal-footer { padding: 1.25rem 1.5rem; border-color: var(--line); }
.modal-body { padding: 1.5rem; }
.list-group-item { border-color: var(--line); padding: 1rem; }

.page-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 28px; }
.app-main > .container-fluid.shipment-page { max-width: 960px; }
.page-heading h1 { margin: 8px 0 6px; font-size: clamp(2.2rem, 4vw, 3.2rem); line-height: 1.05; }
.heading-dot { color: var(--red); }
.page-heading p { margin: 0; color: var(--muted); }
.heading-tag { flex: none; color: #71625e; font-size: .68rem; font-weight: 800; letter-spacing: .1em; }
.heading-tag span { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: #83a486; vertical-align: middle; }
.shipment-card > .card-body { padding: clamp(22px, 3.5vw, 38px); }
.shipment-card-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 32px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.shipment-card-heading h2 { margin: 5px 0 0; font-size: 1.3rem; }
.step-indicator { color: #8e827d; font-size: .75rem; font-weight: 800; letter-spacing: .1em; }
.section-title { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.section-title h3 { margin: 0; font-size: 1.08rem; }
.section-title p { margin: 2px 0 0; color: var(--muted); font-size: .8rem; }
.section-number { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; color: var(--red); background: #f9eded; font-size: .75rem; font-weight: 800; }
.shipment-steps { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.shipment-steps a { padding: .5rem .75rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: .85rem; font-weight: 700; text-decoration: none; }
.shipment-disclosure, .address-panel { border: 1px solid var(--line); border-radius: 10px; padding: 1rem; }
.address-panel-heading { margin: 0 0 1rem; font-weight: 700; }
.shipment-disclosure > summary { display: flex; align-items: baseline; gap: .75rem; cursor: pointer; font-weight: 700; }
.shipment-disclosure > summary::-webkit-details-marker { display: none; }
.shipment-disclosure > summary .disclosure-summary { flex: 1; min-width: 0; color: var(--muted); font-size: .85rem; font-weight: 400; overflow-wrap: anywhere; }
.shipment-disclosure[open] > summary { margin-bottom: 1rem; }
.shipment-disclosure[open] > summary .disclosure-summary { display: none; }
.disclosure-action { margin-left: auto; color: var(--red); font-size: .85rem; }
.shipping-extras { margin-top: 1.5rem; }
.contact-details { margin-top: .75rem; }
.contact-details > summary, .checkout-details > summary, .order-details > summary { color: var(--red); cursor: pointer; font-weight: 700; }
.contact-details[open] > summary, .checkout-details[open] > summary, .order-details[open] > summary { margin-bottom: .75rem; }
.form-help { margin: 0 0 1.25rem; color: var(--muted); font-size: .86rem; }
.field-error { width: 100%; margin-top: .25rem; color: #a51f2b; font-size: .82rem; }
.shipment-card .mb-2 { margin-bottom: .9rem !important; }
.optional { color: #827a76; font-weight: 400; }
.package-section { margin-top: 28px; padding-top: 30px; border-top: 1px solid var(--line); }
.shipment-actions { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 34px; padding-top: 24px; border-top: 1px solid var(--line); }
.shipment-actions p { margin: 0; color: var(--muted); font-size: .84rem; }
.shipment-actions .btn { font-size: .95rem; }
.dimensions-row .input-group { flex-wrap: nowrap; }
.dimensions-row .input-group-text { white-space: nowrap; }
.checkout-review { margin-bottom: 1.5rem; padding: 1rem; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.checkout-review h6 { margin: 0 0 .75rem; font-size: 1.15rem; font-weight: 700; }
.checkout-review dl { margin: 0; }
.checkout-review dl > div:not([hidden]) { display: grid; grid-template-columns: 5rem minmax(0, 1fr); gap: .75rem; padding: .75rem 0; border-top: 1px solid #ded5d0; }
#release-promotion[hidden] { display: none; }
.checkout-review dt { color: #625a57; font-size: .85rem; font-weight: 700; }
.checkout-review dd { margin: 0; font-size: .95rem; overflow-wrap: anywhere; }
.checkout-review dl > div:last-child { padding-bottom: 0; }
#payment-amount { color: var(--red-dark); font-size: 1.05rem; }
.checkout-details { margin-top: 1rem; }
.checkout-details .form-help { margin: .75rem 0 0; }
.checkout-review .alert { margin: 1rem 0 0; }
.label-confirmation { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.label-confirmation h5 { margin: 0 0 .25rem; }
.tracking-code { overflow-wrap: anywhere; }
.label-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.label-preview { display: block; width: 100%; height: 75vh; border: 1px solid var(--line); border-radius: 8px; }
.order-filters { margin-bottom: 1.5rem; padding: 1.25rem; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.order-filter-fields { display: grid; grid-template-columns: minmax(160px, .7fr) minmax(0, 1.3fr); gap: 1rem; }
.order-search-help { margin: .35rem 0 0; color: var(--muted); font-size: .82rem; }
.order-custom-dates:not([hidden]) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1rem; }
.order-custom-dates .form-help { grid-column: 1 / -1; margin: 0; }
.order-filter-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.order-result-count { color: var(--muted); font-size: .9rem; }
.order-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); align-items: start; max-width: 1100px; gap: 1rem; }
.order-card { min-width: 0; padding: 1.25rem; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.order-card-heading { display: flex; justify-content: space-between; gap: 1rem; }
.order-card h3 { margin: .25rem 0; font-size: 1.1rem; overflow-wrap: anywhere; }
.order-date { color: var(--muted); font-size: .85rem; }
.order-status { margin: 1rem 0; font-size: .9rem; overflow-wrap: anywhere; }
.order-status-badge { display: inline-block; margin-bottom: .35rem; padding: .3rem .6rem; border-radius: 6px; background: #f2ece8; font-weight: 700; }
.order-insurance-alert { padding: .75rem; border-radius: 8px; background: #fff4d8; color: #664a00; font-size: .9rem; }
.order-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.order-details { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.order-tracking { display: grid; justify-items: start; gap: .2rem; margin: 1rem 0; overflow-wrap: anywhere; }
.order-tracking .form-help { margin: 0; }

.auth-page { min-height: 100vh; background: #f8f6f3; }
.auth-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(420px, 1fr); min-height: 100vh; }
.auth-intro { display: flex; flex-direction: column; min-height: 100%; padding: clamp(32px, 5vw, 68px); color: #fff; background: #362426; }
.auth-brand { align-self: flex-start; font-size: 1.3rem; font-weight: 800; letter-spacing: -.04em; }
.auth-intro-copy { max-width: 600px; margin: auto 0; padding: 80px 0; }
.auth-intro .eyebrow { color: #e8a4a1; }
.auth-intro h1 { margin: 20px 0; font-size: clamp(2.8rem, 5vw, 4.8rem); line-height: 1.07; }
.auth-intro h1 span { color: #e07b70; }
.auth-intro-copy p { max-width: 420px; margin: 0; color: #e3d3cf; font-size: 1.08rem; line-height: 1.7; }
.auth-intro-footer { margin: 0; color: #c4a8a4; font-size: .67rem; font-weight: 700; letter-spacing: .13em; }
.auth-panel { display: flex; align-items: center; justify-content: center; padding: 48px 28px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card h2 { margin: 10px 0; font-size: clamp(1.8rem, 3vw, 2.4rem); }
.auth-subtitle { margin-bottom: 30px; color: var(--muted); }
.auth-card .mb-3 { margin-bottom: 1.3rem !important; }
.auth-card .btn { min-height: 50px; }
.auth-card .btn span { margin-left: .5rem; }
.auth-switch { margin-top: 28px; color: var(--muted); font-size: .9rem; }
.auth-switch a { font-weight: 700; }
.auth-password-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; column-gap: 12px; }
.auth-password-field input { grid-column: 1 / -1; grid-row: 2; }
.auth-password-field a { grid-column: 2; grid-row: 1; font-size: .81rem; font-weight: 700; }
.auth-verification { margin: 18px 0 0; color: var(--muted); font-size: .85rem; }
.auth-verification a { font-weight: 700; }
.auth-register { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 28px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: #fffdfa; }
.auth-register strong { font-size: .9rem; }
.auth-register p { margin: 3px 0 0; color: var(--muted); font-size: .8rem; }
.auth-register-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: .85rem; font-weight: 700; }
.auth-legal { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.auth-legal > span { color: #68615e; font-size: .65rem; font-weight: 800; letter-spacing: .1em; }
.auth-legal .legal-links { margin-top: 10px; }

@media (max-width: 767px) {
    .app-shell { display: block; }
    .app-sidebar { width: 100%; min-height: 0; padding: 12px 18px; }
    .sidebar-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
    .brand img { width: 38px; height: 38px; }
    .brand strong { font-size: 1.05rem; }
    .nav-ready .nav-toggle:not([hidden]) { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 12px; border: 1px solid #765e5d; border-radius: 8px; background: transparent; color: #fff; font-size: .85rem; font-weight: 700; }
    .nav-toggle-icon { display: block; width: 17px; height: 12px; border-top: 2px solid currentColor; border-bottom: 2px solid currentColor; position: relative; }
    .nav-toggle-icon::after { content: ""; position: absolute; top: 4px; left: 0; width: 100%; border-top: 2px solid currentColor; }
    .nav-ready:not(.nav-open) .sidebar-content { display: none; }
    .sidebar-content nav { padding-top: 24px; }
    .app-main { padding: 28px 16px 48px; }
    .app-main > .d-flex { flex-wrap: wrap; gap: 12px; }
    .app-main .list-group-item { flex-wrap: wrap; gap: 12px; }
    .table-scroll-hint { display: block; margin: 0 0 8px; color: var(--muted); font-size: .78rem; }
    .page-heading { align-items: flex-start; }
    .heading-tag { display: none; }
    .shipment-card-heading { margin-bottom: 24px; }
    .shipment-actions { align-items: stretch; flex-direction: column; }
    .shipment-actions .btn { width: 100%; }
    .shipment-card .input-group-text { padding: .4rem; }
    .dimensions-row > .col-4 { width: 100%; }
    .checkout-review dl > div:not([hidden]) { grid-template-columns: minmax(0, 1fr); gap: .2rem; }
    .label-confirmation { align-items: stretch; flex-direction: column; }
    .label-actions { flex-direction: column; }
    .label-actions .btn, .order-actions .btn { width: 100%; }
    .order-filter-fields, .order-custom-dates:not([hidden]) { grid-template-columns: minmax(0, 1fr); }
    .order-filter-actions > * { flex: 1 1 auto; white-space: nowrap; }
    .auth-layout { display: block; }
    .auth-intro { min-height: 0; padding: 24px; }
    .auth-intro-copy { padding: 42px 0 24px; }
    .auth-intro h1 { margin: 12px 0; font-size: 2.35rem; }
    .auth-intro-copy p { font-size: .95rem; }
    .auth-intro-footer { display: none; }
    .auth-panel { padding: 36px 24px 48px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
.legal-links { display: flex; flex-wrap: wrap; gap: .5rem 1rem; margin-top: 1.5rem; font-size: .85rem; }
.legal-links a { color: inherit; text-decoration: underline; }
.legal-links svg { vertical-align: middle; }
