:root {
    --bg: #edf3f5;
    --surface: rgba(255, 255, 255, 0.95);
    --surface-soft: #f6fafb;
    --ink: #112d39;
    --ink-soft: #5f7680;
    --line: rgba(16, 54, 70, 0.12);
    --brand: #0f4d64;
    --brand-strong: #0a3547;
    --accent: #df7b33;
    --success: #198754;
    --warning: #c78617;
    --danger: #b13d3d;
    --info: #1877a6;
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 14px;
    --shadow-lg: 0 28px 70px rgba(17, 45, 57, 0.12);
    --shadow-md: 0 18px 35px rgba(17, 45, 57, 0.09);
    --font-sans: "Trebuchet MS", "Segoe UI", sans-serif;
}

.labor-timer-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 18px;
    min-width: 0;
    padding: 13px 16px;
    border: 1px solid rgba(25, 135, 84, 0.24);
    border-left: 4px solid var(--success);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(17, 45, 57, 0.08);
}

.labor-timer-bar-copy,
.labor-timer-actions,
.labor-work-summary,
.labor-work-summary > div:first-child,
.labor-row-actions {
    display: flex;
    align-items: center;
}

.labor-timer-bar-copy {
    gap: 12px;
    min-width: 0;
}

.labor-timer-bar-copy > div {
    min-width: 0;
}

.labor-timer-bar-copy strong,
.labor-work-summary strong {
    overflow-wrap: anywhere;
}

.labor-timer-status {
    flex: 0 0 auto;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 4px rgba(25, 135, 84, 0.12);
}

.labor-timer-eyebrow {
    margin-bottom: 2px;
    color: var(--ink-soft);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.labor-timer-clock,
.labor-work-clock,
.labor-table-clock {
    min-width: 9ch;
    color: var(--brand-strong);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0;
    white-space: nowrap;
}

.labor-timer-clock {
    font-size: 24px;
    font-weight: 800;
}

.labor-timer-actions,
.labor-row-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.labor-work-panel {
    min-width: 0;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.8);
}

.labor-work-panel .panel-heading {
    margin-bottom: 14px;
}

.labor-work-panel .panel-heading h3 {
    font-size: 19px;
}

.labor-work-summary {
    justify-content: space-between;
    gap: 18px;
    min-width: 0;
    padding: 14px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.labor-work-summary > div:first-child {
    flex-wrap: wrap;
    gap: 10px;
    min-width: 0;
}

.labor-work-summary > div:first-child > span:last-child {
    color: var(--ink-soft);
}

.labor-work-clock {
    flex: 0 0 auto;
    font-size: 28px;
    font-weight: 800;
}

.labor-work-actions {
    margin: 14px 0 0;
}

.labor-start-form {
    display: grid;
    grid-template-columns: minmax(220px, 1.3fr) minmax(180px, 1fr) auto;
    align-items: end;
    gap: 12px;
    padding-top: 2px;
}

.labor-start-form .button {
    min-height: 49px;
}

.labor-job-stats .stat-card strong {
    font-variant-numeric: tabular-nums;
}

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

.labor-work-type-options label {
    position: relative;
    display: block;
    min-width: 0;
}

.labor-work-type-options input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.labor-work-type-options span {
    display: grid;
    gap: 3px;
    min-height: 64px;
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
    color: var(--ink);
    cursor: pointer;
    letter-spacing: 0;
    text-transform: none;
}

.labor-work-type-options small {
    color: var(--ink-soft);
    font-size: 12px;
    font-weight: 400;
}

.labor-work-type-options input:checked + span {
    border-color: rgba(15, 77, 100, 0.5);
    background: #fff;
    box-shadow: inset 0 0 0 1px var(--brand);
}

.labor-work-type-options input:focus-visible + span {
    outline: 3px solid rgba(24, 119, 166, 0.18);
    outline-offset: 2px;
}

.labor-jobs-table {
    min-width: 1180px;
}

.labor-table-clock {
    display: block;
    font-size: 17px;
}

.labor-finalize-row td {
    padding: 16px;
    background: rgba(199, 134, 23, 0.06);
}

.labor-finalize-form {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(140px, 0.55fr) minmax(220px, 1fr) auto;
    align-items: end;
    gap: 12px;
}

.labor-finalize-copy {
    display: grid;
    gap: 4px;
    align-self: center;
}

.labor-finalize-copy span {
    color: var(--ink-soft);
    font-size: 13px;
}

.labor-void-form {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
    align-items: end;
    gap: 12px;
    max-width: 620px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(177, 61, 61, 0.16);
}

.labor-void-menu {
    position: relative;
}

.labor-void-menu > summary {
    display: inline-flex;
    align-items: center;
    min-height: 35px;
    padding: 7px 11px;
    border: 1px solid rgba(177, 61, 61, 0.18);
    border-radius: 8px;
    background: rgba(177, 61, 61, 0.07);
    color: var(--danger);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}

.labor-void-menu > summary::-webkit-details-marker {
    display: none;
}

.labor-void-menu form {
    display: grid;
    gap: 8px;
    width: 260px;
    margin-top: 8px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.labor-detail-section + .labor-detail-section {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.labor-detail-section h4 {
    margin: 0 0 12px;
    font-size: 17px;
}

@media (max-width: 900px) {
    .labor-timer-bar {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .labor-timer-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }

    .labor-start-form,
    .labor-finalize-form {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .labor-start-form .button,
    .labor-finalize-form .button {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .labor-timer-bar {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .labor-timer-clock {
        font-size: 22px;
    }

    .labor-timer-actions,
    .labor-timer-actions .inline-form,
    .labor-timer-actions .button,
    .labor-timer-actions .ghost-button {
        width: 100%;
    }

    .labor-work-panel {
        padding: 16px;
    }

    .labor-work-summary {
        align-items: flex-start;
        flex-direction: column;
    }

    .labor-work-clock {
        font-size: 24px;
    }

    .labor-work-type-options,
    .labor-void-form {
        grid-template-columns: 1fr;
    }
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: var(--font-sans);
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(15, 77, 100, 0.18), transparent 28%),
        radial-gradient(circle at bottom right, rgba(223, 123, 51, 0.14), transparent 26%),
        linear-gradient(180deg, #eff5f7 0%, #e8eff2 100%);
}

body {
    line-height: 1.5;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
    border: 0;
}

.button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    max-width: 100%;
    min-width: 0;
    padding: 12px 18px;
    border-radius: 14px;
    font-weight: 700;
    text-align: center;
    white-space: normal;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.button:hover,
.ghost-button:hover {
    transform: translateY(-1px);
}

.button {
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--brand-strong));
    box-shadow: var(--shadow-md);
}

.button:disabled,
.ghost-button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
    transform: none;
    box-shadow: none;
}

.ghost-button {
    color: var(--brand);
    background: rgba(15, 77, 100, 0.08);
    border: 1px solid rgba(15, 77, 100, 0.12);
}

.button-small {
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 13px;
}

.expand-button {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid rgba(15, 77, 100, 0.18);
    background: rgba(15, 77, 100, 0.08);
    color: var(--brand);
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.expand-button.is-open {
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--brand-strong));
    border-color: transparent;
}

.button-block {
    width: 100%;
}

.app-shell {
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    min-height: 100dvh;
}

.app-sidebar {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    height: 100dvh;
    padding: 28px 20px max(28px, calc(24px + env(safe-area-inset-bottom, 0px)));
    background: linear-gradient(180deg, #0a3547, #0f4d64);
    color: #fff;
    box-shadow: 18px 0 50px rgba(10, 53, 71, 0.12);
    /* Above page tools; walkthroughs and dialogs retain their higher layers. */
    z-index: 1100;
    overflow: hidden;
}

.sidebar-close,
.sidebar-backdrop {
    display: none;
}

.sidebar-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 24px;
    line-height: 1;
    z-index: 2;
}

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(10, 31, 41, 0.42);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1090;
}

.sidebar-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
}

.brand-block {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 30px;
}

.brand-block > div:last-child {
    min-width: 0;
}

.brand-mark {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(255,255,255,0.22), rgba(255,255,255,0.08));
    font-weight: 800;
    letter-spacing: 0.08em;
}

.brand-title {
    font-size: 24px;
    font-weight: 800;
    line-height: 1.08;
    overflow-wrap: anywhere;
}

.brand-subtitle,
.sidebar-label,
.table-subtext,
.panel-heading p,
.stat-card span,
.auth-side p {
    color: rgba(255, 255, 255, 0.7);
}

.brand-subtitle {
    color: rgba(255, 255, 255, 0.66);
    font-size: 13px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.app-nav {
    display: grid;
    gap: 12px;
}

.sidebar-scroll-region {
    display: grid;
    gap: 28px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -ms-overflow-style: none;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-right: 8px;
    padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px) + 48px);
}

.sidebar-scroll-region::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.app-sidebar:hover .sidebar-scroll-region,
.app-sidebar:focus-within .sidebar-scroll-region,
.sidebar-scroll-region:hover,
.sidebar-scroll-region:focus-within {
    scrollbar-width: thin;
}

.app-sidebar:hover .sidebar-scroll-region::-webkit-scrollbar,
.app-sidebar:focus-within .sidebar-scroll-region::-webkit-scrollbar,
.sidebar-scroll-region:hover::-webkit-scrollbar,
.sidebar-scroll-region:focus-within::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.sidebar-scroll-region::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(198, 233, 239, 0.32));
    border: 2px solid rgba(10, 53, 71, 0.18);
}

.sidebar-scroll-region::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
}

.nav-group {
    display: grid;
    gap: 10px;
}

.nav-group-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    width: 100%;
    min-height: 52px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    text-align: left;
    font-weight: 700;
    letter-spacing: 0.03em;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.nav-group-button:hover,
.nav-group-button:focus-visible,
.nav-group.is-open .nav-group-button {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.2);
}

.nav-group-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.nav-group-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 18px;
    line-height: 1;
    flex-shrink: 0;
}

.nav-group-links {
    display: grid;
    gap: 8px;
    padding-left: 10px;
    border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.nav-link {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 12px 16px;
    border-radius: 16px;
    color: rgba(255, 255, 255, 0.82);
    border: 1px solid transparent;
}

.nav-sublink {
    min-height: 44px;
    padding: 11px 14px;
    background: rgba(255, 255, 255, 0.04);
}

.nav-link.is-active,
.nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.14);
}

.sidebar-card {
    padding: 18px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.12);
    flex-shrink: 0;
}

.sidebar-name {
    margin-top: 8px;
    font-size: 18px;
    font-weight: 700;
}

.sidebar-company {
    color: rgba(255, 255, 255, 0.72);
}

.app-panel {
    padding: 26px;
    min-width: 0;
}

.app-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.header-actions {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.header-notification-actions {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.app-header h1,
.auth-card h2,
.auth-side h1,
.packing-header h1 {
    margin: 0;
    font-size: clamp(28px, 3vw, 40px);
    line-height: 1.08;
}

.app-header p,
.auth-card p,
.packing-header p {
    margin: 8px 0 0;
    color: var(--ink-soft);
}

.menu-toggle {
    display: none;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(15, 77, 100, 0.08);
    color: var(--brand);
    font-weight: 700;
}

.sidebar-ready button.menu-toggle {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    min-height: 44px;
    gap: 10px;
    padding: 11px 15px;
    border-radius: 12px;
    border: 1px solid rgba(15, 77, 100, 0.2);
    color: #174c5d;
    background: linear-gradient(135deg, #fff, #edf7f8);
    box-shadow: 0 3px 12px rgba(10, 53, 71, 0.08), inset 0 1px 0 #fff;
    font-size: 14px;
    line-height: 20px;
    white-space: nowrap;
}

.sidebar-ready button.menu-toggle:hover {
    border-color: #318093;
    box-shadow: 0 5px 16px rgba(10, 53, 71, 0.16);
}

.sidebar-ready button.menu-toggle:focus-visible,
.app-sidebar button.sidebar-close:focus-visible {
    outline: 3px solid #df7b33;
    outline-offset: 4px;
}

.sidebar-ready button.menu-toggle[aria-expanded="false"] {
    color: #fff;
    border-color: #0f5c70;
    background: linear-gradient(135deg, #14768a, #103d51);
    box-shadow: 0 5px 16px rgba(10, 53, 71, 0.2), inset 0 2px 0 rgba(255, 255, 255, 0.16);
}

.menu-toggle-icon { flex: 0 0 auto; }
.menu-toggle-arrow { transform-origin: 14px 12px; transition: transform 0.22s ease; }
[aria-expanded="false"] > .menu-toggle-icon .menu-toggle-arrow { transform: rotate(180deg); }

.sidebar-ready .app-header { flex-wrap: wrap; }
.sidebar-ready .app-header > div:not(.header-actions) { flex: 1 1 220px; min-width: 0; }

@media (min-width: 1181px) {
    .sidebar-ready .app-shell { transition: grid-template-columns 0.22s ease; }
    .sidebar-ready .app-sidebar {
        width: 290px;
        min-width: 0;
        transform: translateX(0);
        transition: transform 0.22s ease, visibility 0.22s;
    }
    .sidebar-collapsed .app-shell { grid-template-columns: 0 minmax(0, 1fr); }
    .sidebar-collapsed .app-sidebar { transform: translateX(-100%); visibility: hidden; pointer-events: none; }
}

@media (max-width: 1180px) {
    .sidebar-ready .app-sidebar { visibility: hidden; transition: transform 0.22s ease, visibility 0.22s; }
    .sidebar-ready .app-sidebar.is-open { visibility: visible; }
    .app-sidebar button.sidebar-close { width: 44px; height: 44px; }
}

@media (max-width: 640px) {
    .sidebar-ready .app-header > div:not(.header-actions) { flex-basis: auto; }
    .sidebar-ready .header-actions { flex-wrap: wrap; }
    .sidebar-ready .header-actions > form { flex: 0 0 auto; }
}

@media (prefers-reduced-motion: reduce) {
    .sidebar-ready .app-shell,
    .sidebar-ready .app-sidebar,
    .sidebar-ready .sidebar-backdrop,
    .sidebar-ready button.menu-toggle,
    .sidebar-ready .menu-toggle-arrow { transition: none; }
}


/* Keep collapse within the sidebar; the restore control stays in page flow. */
.sidebar-ready button.menu-toggle[hidden] { display: none; }
.sidebar-ready button.menu-toggle { position: static; }
.sidebar-ready .app-sidebar .brand-block {
    padding-right: 52px;
    align-items: flex-start;
}
.sidebar-ready .app-sidebar .brand-mark {
    flex: 0 0 44px;
    width: 44px;
    height: 48px;
    border-radius: 14px;
}
.sidebar-ready .app-sidebar button.sidebar-close {
    display: inline-flex;
    position: absolute;
    top: 16px;
    right: 16px;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    border-radius: 12px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.19), rgba(255, 255, 255, 0.08));
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.12);
    transition: background 0.18s ease, border-color 0.18s ease;
}
.sidebar-ready .app-sidebar button.sidebar-close:hover {
    background: rgba(255, 255, 255, 0.24);
    border-color: rgba(255, 255, 255, 0.65);
    transform: none;
}
@media (prefers-reduced-motion: reduce) {
    .sidebar-ready .app-sidebar button.sidebar-close { transition: none; }
}

.app-main {
    display: grid;
    gap: 20px;
    min-width: 0;
}

.alert {
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid transparent;
    box-shadow: var(--shadow-md);
}

.alert-success { background: rgba(25, 135, 84, 0.12); border-color: rgba(25, 135, 84, 0.2); color: #0c5f38; }
.alert-danger { background: rgba(177, 61, 61, 0.12); border-color: rgba(177, 61, 61, 0.2); color: #8a2525; }
.alert-info { background: rgba(24, 119, 166, 0.12); border-color: rgba(24, 119, 166, 0.2); color: #0d587d; }
.alert-warning { background: rgba(199, 134, 23, 0.14); border-color: rgba(199, 134, 23, 0.24); color: #7a5410; }

.impersonation-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.impersonation-banner .table-subtext {
    color: inherit;
    opacity: 0.8;
}

.stats-grid,
.grid-panels {
    display: grid;
    gap: 18px;
    min-width: 0;
}

.stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.grid-panels.two-up,
.charts-two,
.users-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.ship-layout {
    grid-template-columns: minmax(0, 1fr);
}

.grid-panels.users-layout {
    grid-template-columns: minmax(0, 1fr);
}

.panel-card,
.stat-card,
.auth-card,
.auth-side,
.packing-card {
    background: var(--surface);
    border: 1px solid rgba(255,255,255,0.68);
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.panel-card,
.auth-card,
.auth-side,
.packing-card {
    padding: 24px;
}

.stat-card {
    padding: 20px 22px;
}

.stat-card span {
    display: block;
    color: var(--ink-soft);
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.stat-card strong {
    display: block;
    margin-top: 10px;
    font-size: 30px;
}

.stat-card strong.stat-card-url {
    font-size: 18px;
    line-height: 1.45;
    letter-spacing: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
}

.panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    min-width: 0;
    margin-bottom: 18px;
}

.panel-heading > div {
    min-width: 0;
}

.panel-heading.slim {
    margin-top: 22px;
}

.panel-heading h3 {
    margin: 0;
    font-size: 22px;
}

.panel-heading p {
    margin: 6px 0 0;
    color: var(--ink-soft);
}

.table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
}

.table-wrap-shell {
    position: relative;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.table-wrap-shell.has-sticky-scrollbar {
    padding-bottom: 18px;
}

.table-wrap-shell.has-local-sticky-scrollbar {
    padding-bottom: 0;
}

.table-wrap.is-sticky-scrollbar-ready {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.table-wrap.is-sticky-scrollbar-ready::-webkit-scrollbar {
    height: 0;
}

.table-wrap-sticky-scrollbar {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 18px;
    z-index: 14;
}

.table-wrap-sticky-scrollbar.is-fixed {
    position: fixed;
    bottom: 0;
}

.table-wrap-sticky-scrollbar.is-local {
    position: sticky;
    bottom: 0;
}

.table-wrap-sticky-scrollbar-track {
    width: 100%;
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    border-top: 1px solid var(--line);
    background: rgba(246, 250, 251, 0.96);
    backdrop-filter: blur(8px);
    scrollbar-width: thin;
    scrollbar-color: rgba(15, 77, 100, 0.42) rgba(17, 45, 57, 0.08);
}

.table-wrap-sticky-scrollbar-track::-webkit-scrollbar {
    height: 14px;
}

.table-wrap-sticky-scrollbar-track::-webkit-scrollbar-thumb {
    background: rgba(15, 77, 100, 0.42);
    border-radius: 999px;
    border: 3px solid rgba(246, 250, 251, 0.96);
}

.table-wrap-sticky-scrollbar-track::-webkit-scrollbar-track {
    background: rgba(17, 45, 57, 0.08);
}

.table-wrap-sticky-scrollbar-size {
    height: 1px;
}

.data-table {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 14px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.data-table th {
    color: var(--ink-soft);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.compact-table th,
.compact-table td {
    padding-top: 10px;
    padding-bottom: 10px;
}

.message-thread-row {
    cursor: pointer;
    transition: background-color 0.16s ease, box-shadow 0.16s ease;
}

.message-thread-row:hover,
.message-thread-row:focus-visible {
    background: rgba(15, 77, 100, 0.07);
    outline: none;
    box-shadow: inset 4px 0 0 var(--accent);
}

.message-thread-row.is-selected {
    background: rgba(15, 77, 100, 0.10);
    box-shadow: inset 4px 0 0 var(--brand);
}

.message-thread-subject-link {
    color: inherit;
    text-decoration: none;
}

.message-thread-subject-link:hover,
.message-thread-subject-link:focus-visible {
    color: var(--brand);
    text-decoration: underline;
}

.messages-page {
    display: grid;
    gap: 20px;
    min-width: 0;
}

.messages-page.has-open-thread {
    grid-template-columns: minmax(330px, 0.72fr) minmax(0, 1.28fr);
    align-items: start;
    scroll-margin-top: 20px;
}

.messages-page.has-open-thread .messages-overview {
    display: block;
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    min-width: 0;
    overflow-y: auto;
    scrollbar-width: thin;
}

.messages-page.has-open-thread .messages-compose-panel {
    display: none;
}

.messages-page.has-open-thread .messages-detail-panel {
    min-width: 0;
}

.messages-page.has-open-thread .messages-thread-list-panel .data-table {
    width: 100%;
    table-layout: fixed;
}

.messages-page.has-open-thread .messages-thread-list-panel th:first-child,
.messages-page.has-open-thread .messages-thread-list-panel td:first-child {
    width: 72%;
}

.messages-page.has-open-thread .messages-thread-list-panel th:nth-child(2),
.messages-page.has-open-thread .messages-thread-list-panel td:nth-child(2) {
    width: 28%;
}

.messages-page.has-open-thread .messages-thread-list-panel th:nth-child(n + 3),
.messages-page.has-open-thread .messages-thread-list-panel td:nth-child(n + 3) {
    display: none;
}

.messages-page.has-open-thread .messages-thread-list-panel .toolbar {
    align-items: stretch;
}

.messages-page.has-open-thread .messages-thread-list-panel .inventory-filter-field {
    flex: 1 1 100%;
    max-width: none;
}

.table-form {
    display: flex;
    align-items: end;
    flex-wrap: wrap;
    gap: 12px;
    min-width: 320px;
}

.inventory-shared-storage-form {
    margin: 18px 0 22px;
}

.warehouse-workbench,
.warehouse-map-layout,
.warehouse-inventory-layout {
    margin-top: 18px;
}

.warehouse-setup-grid,
.warehouse-zone-list,
.warehouse-trail-list {
    display: grid;
    gap: 14px;
}

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

.warehouse-setup-heading {
    gap: 16px;
}

.warehouse-mini-form,
.warehouse-zone-card,
.warehouse-trail-card {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: rgba(246, 250, 251, 0.72);
}

.warehouse-zone-heading,
.warehouse-spot-card > div:first-child,
.warehouse-trail-card > div:first-child {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.warehouse-zone-heading strong,
.warehouse-spot-card strong,
.warehouse-trail-card strong {
    display: block;
}

.warehouse-zone-heading span,
.warehouse-spot-card > div:first-child span {
    color: var(--ink-soft);
    font-size: 12px;
}

.warehouse-spot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.warehouse-spot-card {
    display: grid;
    gap: 10px;
    padding: 14px;
    border-radius: var(--radius-sm);
    background: #fff;
    border: 1px solid rgba(15, 77, 100, 0.10);
}

.warehouse-spot-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--ink-soft);
    font-size: 12px;
}

.warehouse-spot-types-button {
    flex-shrink: 0;
    max-width: 100%;
    white-space: nowrap;
}

.warehouse-spot-types-modal-shell {
    width: min(780px, 100%);
}

.warehouse-pallet-products-modal-shell {
    width: min(980px, 100%);
}

.warehouse-pallet-products-list {
    display: grid;
    gap: 12px;
}

.warehouse-pallet-product-row {
    display: grid;
    grid-template-columns: minmax(230px, 1fr) minmax(240px, 0.8fr) auto;
    gap: 14px;
    align-items: end;
    padding: 14px;
    border: 1px solid rgba(15, 77, 100, 0.12);
    border-radius: var(--radius-sm);
    background: #fff;
}

.warehouse-pallet-product-main {
    display: grid;
    gap: 8px;
}

.warehouse-pallet-product-main strong {
    color: var(--ink);
}

.warehouse-pallet-product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    color: var(--ink-soft);
    font-size: 12px;
}

.warehouse-pallet-product-meta span:not(:last-child)::after {
    content: "|";
    margin-left: 10px;
    color: rgba(17, 45, 57, 0.28);
}

.warehouse-pallet-product-destination {
    gap: 6px;
}

.warehouse-pallet-product-destination select {
    min-width: 100%;
}

.warehouse-pallet-product-status {
    grid-column: 1 / -1;
    min-height: 16px;
}

.warehouse-pallet-product-status.is-success {
    color: #166245;
}

.warehouse-pallet-product-status.is-error {
    color: #8f2525;
}

.warehouse-spot-type-add-form {
    padding-bottom: 4px;
    border-bottom: 1px solid var(--line);
}

.warehouse-spot-type-list {
    display: grid;
    gap: 10px;
}

.warehouse-spot-type-row {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border: 1px solid rgba(15, 77, 100, 0.10);
    border-radius: var(--radius-sm);
    background: #fff;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
}

.warehouse-spot-type-row.is-saving {
    border-color: rgba(15, 77, 100, 0.22);
}

.warehouse-spot-type-row.is-dragging {
    opacity: 0.58;
    box-shadow: 0 18px 38px rgba(17, 45, 57, 0.14);
}

.warehouse-spot-type-drag-handle {
    width: 34px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid rgba(15, 77, 100, 0.12);
    background: rgba(15, 77, 100, 0.06);
    color: var(--ink-soft);
    cursor: grab;
    font-weight: 800;
    letter-spacing: 0;
}

.warehouse-spot-type-drag-handle:active {
    cursor: grabbing;
}

.warehouse-spot-type-edit-form {
    display: grid;
    grid-template-columns: minmax(150px, 1.1fr) minmax(130px, 0.8fr);
    gap: 10px 12px;
    align-items: end;
}

.warehouse-spot-type-field {
    gap: 6px;
}

.warehouse-spot-type-status {
    min-height: 16px;
    grid-column: 1 / -1;
}

.warehouse-spot-type-status.is-success {
    color: #166245;
}

.warehouse-spot-type-status.is-error {
    color: #8f2525;
}

.warehouse-move-pallet-form,
.warehouse-pallet-client-form,
.warehouse-transfer-pallet-form {
    gap: 8px;
    align-items: center;
}

.warehouse-move-pallet-form select,
.warehouse-pallet-client-form select,
.warehouse-transfer-pallet-form select {
    min-width: 150px;
    padding: 8px 10px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #fff;
}

.warehouse-pallet-client-form select {
    min-width: 190px;
}

.warehouse-transfer-pallet-form select {
    min-width: 210px;
}

.warehouse-pallet-client-lock {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
}

.warehouse-actions-table .warehouse-sticky-actions {
    position: sticky;
    left: 0;
    z-index: 3;
    background: rgba(246, 250, 251, 0.98);
    box-shadow: 10px 0 18px rgba(17, 45, 57, 0.06);
}

.warehouse-actions-table th.warehouse-sticky-actions {
    z-index: 4;
}

.warehouse-row-actions-cell {
    width: 72px;
    min-width: 72px;
    text-align: left;
}

.warehouse-row-actions-toggle {
    margin: 0;
}

.warehouse-row-actions-menu {
    width: min(280px, calc(100vw - 48px));
    display: grid;
    gap: 10px;
    margin: 10px auto 0 0;
    padding: 12px;
    text-align: left;
    border: 1px solid rgba(15, 77, 100, 0.12);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 18px 38px rgba(17, 45, 57, 0.14);
}

.warehouse-row-actions-menu[hidden] {
    display: none;
}

.warehouse-row-actions-menu > *,
.warehouse-row-actions-menu .inline-form,
.warehouse-row-actions-menu .ghost-button,
.warehouse-row-actions-menu .button {
    width: 100%;
    margin: 0;
}

.warehouse-row-actions-menu .ghost-button,
.warehouse-row-actions-menu .button {
    justify-content: center;
}

.warehouse-row-action-block {
    display: grid;
    gap: 8px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(15, 77, 100, 0.10);
}

.warehouse-row-action-block strong {
    color: var(--ink-soft);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.warehouse-row-action-block .warehouse-move-pallet-form,
.warehouse-row-action-block .warehouse-pallet-client-form {
    display: grid;
    gap: 8px;
}

.warehouse-row-action-block select {
    width: 100%;
    min-width: 0;
}

.warehouse-trail-card {
    display: grid;
    gap: 6px;
}

.warehouse-trail-card p {
    margin: 0;
    color: var(--ink);
}

.warehouse-trail-card small {
    color: var(--ink-soft);
}

.inventory-movement-cell {
    min-width: 210px;
}

.inventory-movement-button {
    margin-top: 8px;
}

.client-movement-modal-shell {
    width: min(760px, 100%);
}

.client-movement-list {
    display: grid;
    gap: 12px;
}

.client-movement-card {
    display: grid;
    gap: 8px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #f7fbfc;
}

.client-movement-card-top,
.client-movement-meta {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.client-movement-card-top strong {
    display: block;
}

.client-movement-meta {
    flex-wrap: wrap;
    color: var(--ink-soft);
    font-size: 12px;
}

.barcode-label-subtitle {
    margin-top: -4px;
    color: var(--ink-soft);
    font-size: 12px;
    text-align: center;
}

.table-form .field {
    margin: 0;
    min-width: 120px;
}

.table-form .picker-summary {
    min-width: 240px;
}

.table-form .field span {
    font-size: 11px;
    letter-spacing: 0.08em;
}

.table-subtext {
    color: var(--ink-soft);
    font-size: 12px;
}

.copack-quote-settings {
    width: min(360px, 72vw);
    margin-top: 10px;
    overflow: hidden;
    border: 1px solid rgba(15, 77, 100, 0.2);
    border-radius: 14px;
    background: #f7fbfc;
    color: var(--ink);
    white-space: normal;
}

.copack-quote-settings > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 12px;
    cursor: pointer;
    color: var(--brand);
    font-size: 13px;
    font-weight: 700;
    list-style: none;
}

.copack-quote-settings > summary::-webkit-details-marker {
    display: none;
}

.copack-quote-settings > summary::after {
    content: '';
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    margin: 2px 3px 0 0;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    align-self: center;
}

.copack-quote-settings[open] > summary {
    border-bottom: 1px solid rgba(15, 77, 100, 0.14);
    background: rgba(15, 77, 100, 0.06);
}

.copack-quote-settings[open] > summary::after {
    transform: rotate(225deg);
}

.copack-quote-settings > summary .badge {
    margin-left: auto;
}

.copack-quote-settings-body {
    display: grid;
    gap: 12px;
    padding: 13px;
}

.copack-quote-recipe-name,
.copack-quote-mode-guide p,
.copack-quote-alert-note {
    margin: 0;
    line-height: 1.45;
}

.copack-quote-recipe-name {
    font-size: 13px;
}

.copack-quote-settings-form {
    display: grid;
    gap: 11px;
}

.copack-quote-settings-form .field {
    min-width: 0;
    margin: 0;
}

.copack-quote-settings-form select,
.copack-quote-settings-form input[type="number"] {
    width: 100%;
}

.copack-quote-settings-form small {
    color: var(--ink-soft);
    font-size: 11px;
    line-height: 1.45;
}

.copack-quote-settings-form .button {
    width: 100%;
    justify-content: center;
}

.copack-quote-mode-guide {
    display: grid;
    gap: 6px;
    padding: 10px 11px;
    border-radius: 11px;
    background: #fff;
    color: var(--ink-soft);
    font-size: 11px;
}

.copack-quote-alert-note {
    color: var(--ink-soft);
    font-size: 11px;
}

.copack-quote-alert-note.is-warning {
    padding: 9px 10px;
    border: 1px solid rgba(181, 95, 28, 0.24);
    border-radius: 10px;
    background: rgba(223, 123, 51, 0.1);
    color: #8a4517;
    font-weight: 700;
}

@media (max-width: 720px) {
    .copack-quote-settings {
        width: min(320px, calc(100vw - 48px));
    }

    .copack-quote-settings > summary {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .copack-quote-settings > summary .badge {
        margin-left: 0;
    }
}

.empty-state {
    color: var(--ink-soft);
    text-align: center;
    padding: 24px 12px;
}

.pagination-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 16px;
}

.pagination-summary {
    color: var(--ink-soft);
    font-size: 13px;
}

.pagination-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.pagination-per-page {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.pagination-per-page label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination-per-page span {
    color: var(--ink-soft);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.pagination-per-page select {
    width: auto;
    min-width: 88px;
    margin: 0;
}

.pagination-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.pagination-link {
    min-width: 42px;
    justify-content: center;
}

.pagination-link.is-active {
    cursor: default;
}

.pagination-link.is-disabled {
    opacity: 0.55;
    pointer-events: none;
}

.pagination-gap {
    color: var(--ink-soft);
    font-size: 12px;
    padding: 0 2px;
}

.actions-cell {
    white-space: normal;
}

.actions-cell > * {
    margin: 0 8px 8px 0;
    vertical-align: top;
}

.actions-cell > *:last-child {
    margin-right: 0;
}

.actions-cell > .table-subtext {
    display: inline-block;
    margin-bottom: 0;
}

.inventory-row-actions-cell {
    width: 72px;
    min-width: 72px;
    vertical-align: top;
}

.inventory-row-actions-cell > * {
    margin: 0;
}

.inventory-row-actions-toggle {
    margin: 0;
}

.inventory-row-actions-menu {
    position: relative;
    z-index: 12;
    isolation: isolate;
    width: min(300px, calc(100vw - 48px));
    grid-template-columns: minmax(0, 1fr);
    margin: 8px 0 0;
    border-color: rgba(15, 77, 100, 0.22);
    background: #fff;
    box-shadow: 0 22px 52px rgba(17, 45, 57, 0.24);
    overflow: hidden;
}

.inventory-row-actions-menu > * {
    min-width: 0;
}

.inventory-row-actions-heading,
.inventory-classification-heading {
    display: grid;
    gap: 3px;
}

.inventory-row-actions-heading {
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(15, 77, 100, 0.10);
}

.inventory-row-actions-heading strong,
.inventory-classification-heading strong {
    color: var(--ink);
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.inventory-row-actions-heading span,
.inventory-classification-heading span,
.inventory-classification-help,
.inventory-classification-note {
    color: var(--ink-soft);
    font-size: 12px;
    line-height: 1.45;
}

.inventory-classification-form {
    display: grid;
    gap: 10px;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 12px;
    border: 1px solid rgba(15, 77, 100, 0.13);
    border-radius: 12px;
    background: #f4f8fa;
}

.inventory-classification-field {
    width: 100%;
    min-width: 0;
}

.inventory-classification-field[hidden] {
    display: none;
}

.inventory-classification-field select {
    width: 100%;
    min-width: 0;
}

.inventory-classification-help {
    min-height: 34px;
    padding: 8px 10px;
    border-radius: 9px;
    background: #fff;
}

.inventory-classification-note {
    display: block;
}

.inventory-status-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

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

.tracking-cell {
    min-width: 180px;
    vertical-align: top;
}

.tracking-toggle {
    margin: 0 0 6px;
}

.tracking-stack {
    width: min(320px, 100%);
    display: grid;
    gap: 8px;
    margin: 10px 0 0;
    padding: 10px;
    border: 1px solid rgba(15, 77, 100, 0.12);
    border-radius: 14px;
    background: rgba(247, 251, 252, 0.96);
}

.tracking-stack[hidden] {
    display: none;
}

.tracking-stack-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 8px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.78);
}

.tracking-stack-copy {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.tracking-stack-copy span {
    color: var(--ink-soft);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.tracking-stack-copy strong {
    color: var(--ink);
    font-size: 13px;
    overflow-wrap: anywhere;
}

.user-actions-cell {
    min-width: 172px;
    vertical-align: top;
}

.user-actions-toggle {
    flex: 0 0 auto;
    margin: 0;
}

.user-actions-menu {
    width: 100%;
    max-width: 190px;
    display: grid;
    gap: 8px;
    margin: 10px 0 0;
    padding: 10px;
    border: 1px solid rgba(15, 77, 100, 0.12);
    border-radius: 14px;
    background: rgba(247, 251, 252, 0.96);
}

.user-actions-menu[hidden] {
    display: none;
}

.user-actions-menu > *,
.user-actions-menu .inline-form,
.user-actions-menu .ghost-button,
.user-actions-menu .button {
    width: 100%;
    margin: 0;
}

.user-actions-menu .ghost-button,
.user-actions-menu .button {
    justify-content: center;
}

.order-primary-action {
    min-width: 124px;
}

.admin-orders-page {
    display: grid;
    gap: 20px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
}

.admin-orders-page > *,
.admin-orders-page .panel-heading,
.admin-orders-page .order-detail-panel,
.admin-orders-page .table-wrap-shell {
    min-width: 0;
    max-width: 100%;
}

.admin-orders-queue {
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
}

.admin-orders-toolbar {
    min-width: 0;
    max-width: 100%;
}

.admin-orders-toolbar > * {
    min-width: 0;
}

.admin-orders-toolbar .search-input {
    flex: 1 1 280px;
    max-width: 420px;
}

.admin-orders-table-wrap,
.admin-orders-page .order-detail-panel .table-wrap {
    min-width: 0;
    max-width: 100%;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
}

.admin-orders-table {
    min-width: 1040px;
}

.admin-orders-table th,
.admin-orders-table td {
    overflow-wrap: anywhere;
}

.admin-orders-actions-heading,
.admin-orders-actions-cell {
    width: 188px;
    min-width: 188px;
    max-width: 188px;
}

.admin-orders-table .order-actions-cell {
    min-width: 0;
}

.admin-orders-page .transaction-detail-card {
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
}

.notification-shell {
    position: relative;
}

.notification-button {
    position: relative;
    min-width: 52px;
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: rgba(15, 77, 100, 0.08);
    color: var(--brand);
    border: 1px solid rgba(15, 77, 100, 0.12);
    text-decoration: none;
}

.notification-button.has-alert {
    color: #fff;
    background: linear-gradient(135deg, #b13d3d, #df7b33);
    border-color: transparent;
}

.help-button:hover,
.help-button.is-active {
    transform: translateY(-1px);
    background: rgba(15, 77, 100, 0.16);
}

.walkthrough-button {
    color: #fff;
    background: linear-gradient(135deg, var(--accent), #b45d20);
    border-color: transparent;
    box-shadow: 0 18px 30px rgba(180, 93, 32, 0.24);
}

.walkthrough-button:hover {
    background: linear-gradient(135deg, #e88d47, #b45d20);
}

.walkthrough-icon {
    width: 24px;
    height: 24px;
}

.help-button-mark {
    font-size: 26px;
    line-height: 1;
    font-weight: 700;
}

.notification-icon {
    width: 22px;
    height: 22px;
}

.notification-badge {
    position: absolute;
    top: -7px;
    right: -7px;
    min-width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    border-radius: 999px;
    background: #fff;
    color: #b13d3d;
    font-size: 12px;
    font-weight: 800;
    box-shadow: 0 12px 26px rgba(17, 45, 57, 0.12);
}

.notification-panel {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: min(430px, calc(100vw - 40px));
    max-height: 72vh;
    padding: 18px;
    overflow-y: auto;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.86);
    box-shadow: var(--shadow-lg);
    z-index: 20;
}

.notification-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.walkthrough-backdrop {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at top right, rgba(223, 123, 51, 0.18), transparent 28%),
        rgba(8, 27, 36, 0.56);
    backdrop-filter: blur(5px);
    z-index: 1200;
}

.walkthrough-panel {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: min(460px, calc(100vw - 32px));
    max-height: calc(100vh - 48px);
    display: grid;
    gap: 16px;
    padding: 24px;
    overflow-y: auto;
    border-radius: 28px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 251, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.92);
    box-shadow: 0 34px 80px rgba(17, 45, 57, 0.24);
    isolation: isolate;
    z-index: 1210;
}

.walkthrough-page-chip {
    position: fixed;
    top: 18px;
    left: 50%;
    display: grid;
    gap: 4px;
    min-width: min(360px, calc(100vw - 32px));
    padding: 12px 18px;
    border-radius: 18px;
    transform: translateX(-50%);
    background: rgba(10, 53, 71, 0.94);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 20px 44px rgba(17, 45, 57, 0.22);
    text-align: center;
    z-index: 1215;
}

.walkthrough-page-chip span {
    color: rgba(255, 255, 255, 0.72);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.walkthrough-page-chip strong {
    font-size: 18px;
    line-height: 1.1;
}

.walkthrough-panel-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.walkthrough-kicker,
.walkthrough-step-count {
    color: var(--ink-soft);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.walkthrough-page-label {
    margin-top: 6px;
    font-size: 20px;
    font-weight: 800;
    color: var(--brand-strong);
}

.walkthrough-close {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(15, 77, 100, 0.08);
    color: var(--brand);
    border: 1px solid rgba(15, 77, 100, 0.12);
    font-size: 28px;
    line-height: 1;
}

.walkthrough-progress-track {
    width: 100%;
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(15, 77, 100, 0.08);
}

.walkthrough-progress-track span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--accent), var(--brand));
    transition: width 0.24s ease;
}

.walkthrough-panel h2 {
    margin: 0;
    font-size: 28px;
    line-height: 1.1;
}

.walkthrough-summary {
    margin: -6px 0 0;
    color: var(--ink-soft);
}

.walkthrough-detail-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding-left: 20px;
    color: var(--ink);
}

.walkthrough-detail-list li {
    padding-left: 4px;
}

.walkthrough-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.walkthrough-target-active {
    position: relative;
    z-index: 1205;
    border-radius: 24px;
    box-shadow:
        0 0 0 4px rgba(223, 123, 51, 0.78),
        0 26px 56px rgba(17, 45, 57, 0.18);
    transition: box-shadow 0.22s ease;
    scroll-margin-top: 110px;
    scroll-margin-bottom: 320px;
}

.app-modal-backdrop {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at top center, rgba(223, 123, 51, 0.16), transparent 30%),
        rgba(8, 27, 36, 0.58);
    backdrop-filter: blur(5px);
    z-index: 1220;
}

.app-modal {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    z-index: 1230;
}

.app-modal-shell {
    width: min(720px, 100%);
    max-height: calc(100vh - 48px);
    display: grid;
    gap: 18px;
    padding: 24px;
    overflow-y: auto;
    border-radius: 28px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 250, 251, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.92);
    box-shadow: 0 34px 80px rgba(17, 45, 57, 0.24);
}

.app-modal-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.app-modal-close {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(15, 77, 100, 0.08);
    color: var(--brand);
    border: 1px solid rgba(15, 77, 100, 0.12);
    font-size: 28px;
    line-height: 1;
}

.app-modal-copy {
    margin: 0;
    color: var(--ink-soft);
}

.inventory-adjust-modal-shell .detail-grid {
    margin-bottom: 0;
}

.fulfillment-fefo-modal-shell {
    width: min(640px, 100%);
}

.fulfillment-fefo-modal-shell .detail-grid,
.fulfillment-fefo-table-wrap {
    margin-bottom: 0;
}

.inventory-adjust-modal-delta {
    margin: 0;
}

.notification-panel-head h3,
.notification-panel-head p {
    margin: 0;
}

.notification-panel-head p {
    margin-top: 6px;
    color: var(--ink-soft);
}

.notification-list {
    display: grid;
    gap: 12px;
}

.notification-card {
    padding: 16px;
    border-radius: 18px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
}

.notification-copy strong {
    display: block;
    margin-bottom: 6px;
}

.notification-copy p {
    margin: 0 0 10px;
    color: var(--ink-soft);
}

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

.notification-card.is-cancellation-review {
    border-color: rgba(199, 134, 23, 0.32);
    background:
        linear-gradient(145deg, rgba(255, 250, 238, 0.98), rgba(255, 255, 255, 0.98));
    box-shadow: inset 4px 0 0 rgba(199, 134, 23, 0.72);
}

.notification-decision-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
    color: #7a5410;
    font-size: 12px;
    font-weight: 800;
}

.notification-decision-meta .badge {
    font-size: 10px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.order-cancellation-undo-modal-shell {
    width: min(620px, 100%);
}

.order-cancellation-undo-order {
    display: grid;
    gap: 6px;
    padding: 16px 18px;
    border: 1px solid rgba(15, 77, 100, 0.14);
    border-radius: 18px;
    background: rgba(15, 77, 100, 0.06);
}

.order-cancellation-undo-order span {
    color: var(--ink-soft);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.order-cancellation-undo-order strong {
    color: var(--brand-strong);
    font-size: 20px;
    overflow-wrap: anywhere;
}

.order-cancellation-undo-reason-field textarea {
    min-height: 130px;
    resize: vertical;
}

.order-cancellation-undo-warning,
.csv-order-cancellation-warning {
    margin: 0;
}

.order-cancellation-undo-actions,
.csv-order-cancellation-actions {
    margin-top: 0;
}

.order-cancellation-undo-modal .form-status,
.csv-order-cancellation-modal .form-status {
    min-height: 0;
    color: var(--ink-soft);
    font-size: 13px;
    font-weight: 700;
}

.order-cancellation-undo-modal .form-status:not(:empty),
.csv-order-cancellation-modal .form-status:not(:empty) {
    min-height: 20px;
}

.order-cancellation-undo-modal .form-status.is-error,
.csv-order-cancellation-modal .form-status.is-error {
    color: #9f2f2f;
}

.csv-orders-panel {
    margin: 20px 0 24px;
    padding: 20px;
    border: 1px solid rgba(15, 77, 100, 0.16);
    border-radius: 22px;
    background:
        radial-gradient(circle at top right, rgba(223, 123, 51, 0.1), transparent 30%),
        linear-gradient(145deg, rgba(246, 251, 252, 0.98), rgba(255, 255, 255, 0.98));
}

.csv-orders-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.csv-orders-panel-head h2 {
    margin: 5px 0 6px;
    color: var(--brand-strong);
    font-size: 22px;
}

.csv-orders-panel-head p {
    max-width: 780px;
    margin: 0;
    color: var(--ink-soft);
}

.csv-orders-panel-head .detail-chip {
    flex: 0 0 auto;
}

.csv-orders-table-wrap {
    margin-top: 18px;
    border-radius: 18px;
    background: #fff;
}

.csv-orders-table {
    min-width: 760px;
}

.csv-order-cancel-button {
    border-color: rgba(169, 54, 54, 0.32);
    color: #8e2c2c;
}

.csv-order-cancel-button:hover,
.csv-order-cancel-button:focus-visible {
    border-color: rgba(169, 54, 54, 0.56);
    background: rgba(169, 54, 54, 0.08);
    color: #6f2020;
}

.csv-orders-empty,
.csv-orders-noscript {
    margin-top: 18px;
}

.csv-order-cancellation-modal-shell {
    width: min(720px, 100%);
}

.csv-order-cancellation-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.csv-order-cancellation-summary > div {
    min-width: 0;
    display: grid;
    gap: 6px;
    padding: 15px 16px;
    border: 1px solid rgba(15, 77, 100, 0.13);
    border-radius: 17px;
    background: rgba(15, 77, 100, 0.05);
}

.csv-order-cancellation-summary span {
    color: var(--ink-soft);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.csv-order-cancellation-summary strong {
    color: var(--brand-strong);
    overflow-wrap: anywhere;
}

.picker-summary {
    min-height: 52px;
    display: flex;
    align-items: center;
    min-width: 0;
    padding: 13px 14px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--surface-soft);
    color: var(--ink);
    overflow-wrap: anywhere;
}

.stack-list {
    display: grid;
    gap: 14px;
    min-width: 0;
}

.stack-list.compact-list {
    gap: 10px;
}

.stack-card {
    min-width: 0;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: var(--surface-soft);
}

.integration-connections-card {
    margin-bottom: 18px;
}

.integration-connection-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.integration-connection-row.is-selected {
    border-color: rgba(15, 77, 100, 0.38);
    background: #fff;
    box-shadow: inset 3px 0 0 var(--brand);
}

.integration-connection-row .toolbar {
    flex: 0 0 auto;
    margin-bottom: 0;
}


.stack-card strong {
    display: block;
    margin-bottom: 8px;
}

.stack-card p {
    margin: 0 0 8px;
    color: var(--ink-soft);
    line-height: 1.5;
}

.integration-step-list {
    display: grid;
    gap: 8px;
    margin: 10px 0 0;
}

.integration-step-list div {
    display: grid;
    gap: 4px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(15, 77, 100, 0.1);
    background: #fff;
}

.integration-step-list dt {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
}

.integration-step-list dd {
    margin: 0;
    color: var(--brand-strong);
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.stack-card .integration-step-list + .field,
.stack-card .field + .field {
    margin-top: 12px;
}

.csv-empty-grid {
    margin-bottom: 18px;
}

.csv-file-card {
    display: grid;
    gap: 14px;
    margin-bottom: 18px;
    padding: 18px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: var(--surface-soft);
}

.csv-file-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.csv-file-card-header strong {
    display: block;
    margin-bottom: 6px;
}

.csv-mapping-section + .csv-mapping-section {
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.csv-mapping-helper {
    display: grid;
    gap: 12px;
    padding: 18px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: var(--surface-soft);
}

.csv-mapping-metrics {
    margin-top: -2px;
}

.csv-upload-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.csv-form-note {
    margin: 0;
    color: var(--ink-soft);
    font-size: 13px;
    line-height: 1.5;
}

.csv-validation-card {
    display: grid;
    gap: 16px;
    min-width: 0;
    overflow-x: hidden;
}

.csv-validation-card > * {
    min-width: 0;
}

.csv-validation-card .table-wrap {
    min-width: 0;
}

.csv-validation-card .table-wrap-shell {
    min-width: 0;
    max-width: 100%;
}

.csv-preview-table {
    width: max-content;
    min-width: 100%;
    table-layout: auto;
}

.csv-preview-table th,
.csv-preview-table td {
    white-space: nowrap;
}

.issue-list {
    margin: 10px 0 0;
    padding-left: 18px;
    display: grid;
    gap: 8px;
}

.issue-list li {
    line-height: 1.5;
}

.inline-alert-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.inline-alert-form input[type="number"] {
    width: 110px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
}

.inventory-filter-field {
    min-width: min(360px, 100%);
}

/* Keep native date controls inside the Reports filter card on narrow screens. */
[data-walkthrough-section="reports-filters"] .inventory-filter-field,
[data-walkthrough-section="admin-reports-filters"] .inventory-filter-field {
    grid-template-columns: minmax(0, 1fr);
    max-width: 100%;
}

[data-walkthrough-section="reports-filters"] input[type="date"],
[data-walkthrough-section="admin-reports-filters"] input[type="date"] {
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
    min-height: 48px;
}

.detail-row > td {
    padding-top: 0;
}

.lot-card-list {
    display: grid;
    gap: 12px;
    padding: 0 0 12px;
}

.lot-card {
    display: grid;
    gap: 12px;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: var(--surface-soft);
}

.lot-card-readonly {
    background: #f7fbfc;
}

.lot-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.lot-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    color: var(--ink-soft);
    font-size: 12px;
}

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

.lot-card-grid .field {
    margin: 0;
}

.lot-card-grid-wide {
    grid-column: 1 / -1;
}

.lot-card-actions {
    display: flex;
    justify-content: flex-end;
}

.lot-card-value {
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
}

.lot-issue-repair-list {
    display: grid;
    gap: 8px;
    margin-top: 8px;
}

.lot-issue-repair-form {
    display: grid;
    grid-template-columns: minmax(72px, 0.45fr) minmax(140px, 1fr) auto;
    align-items: end;
    gap: 8px;
    padding: 8px;
    border: 1px solid rgba(24, 119, 166, 0.18);
    border-radius: 8px;
    background: rgba(24, 119, 166, 0.06);
}

.lot-expiration-repair-form {
    grid-template-columns: minmax(140px, 1.1fr) minmax(72px, 0.45fr) minmax(132px, 1fr) auto;
}

.lot-issue-repair-field {
    margin: 0;
    min-width: 0;
}

.lot-issue-repair-field input {
    min-width: 0;
    width: 100%;
}

.lot-issue-repair-field select {
    min-width: 0;
    width: 100%;
}

.lot-issue-repair-quantity input {
    max-width: 92px;
}

.lot-issue-repair-check {
    grid-column: 2 / -1;
    margin: -2px 0 0;
    font-size: 12px;
}

.lot-expiration-repair-form .lot-issue-repair-check {
    grid-column: 3 / -1;
}

.lot-issue-note {
    padding: 8px;
    border: 1px dashed rgba(24, 119, 166, 0.25);
    border-radius: 8px;
    background: rgba(24, 119, 166, 0.04);
}

.lot-empty-state {
    margin-bottom: 12px;
}

.transaction-details-row > td {
    padding-top: 0;
    border-bottom: 0;
}

.transaction-detail-card {
    margin: 0 0 14px 54px;
    padding: 18px;
    border-radius: 18px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
}

.order-detail-toggle {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
    padding: 6px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.9);
}

.order-detail-toggle-button {
    flex: 1 1 180px;
    min-height: 46px;
    padding: 12px 16px;
    border-radius: 14px;
    background: transparent;
    color: var(--ink-soft);
    font-weight: 700;
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.order-detail-toggle-button:hover {
    transform: translateY(-1px);
    background: rgba(15, 77, 100, 0.08);
    color: var(--brand);
}

.order-detail-toggle-button:focus-visible {
    outline: 2px solid rgba(15, 77, 100, 0.22);
    outline-offset: 2px;
}

.order-detail-toggle-button.is-active {
    background: linear-gradient(135deg, var(--brand), var(--brand-strong));
    color: #fff;
    box-shadow: 0 14px 26px rgba(17, 45, 57, 0.14);
}

.order-detail-panel {
    display: grid;
    gap: 14px;
}

.order-detail-empty {
    display: grid;
    gap: 6px;
    padding: 18px;
    border-radius: 16px;
    border: 1px dashed rgba(15, 77, 100, 0.18);
    background: rgba(255, 255, 255, 0.68);
    color: var(--ink-soft);
}

.order-detail-empty strong {
    color: var(--ink);
}

.detail-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.detail-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    min-width: 0;
    padding: 8px 12px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--line);
    color: var(--ink-soft);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    overflow-wrap: anywhere;
    white-space: normal;
}

.detail-chip.is-success {
    border-color: rgba(24, 138, 91, 0.24);
    background: rgba(24, 138, 91, 0.08);
    color: #166245;
}

.detail-chip.is-error {
    border-color: rgba(176, 58, 58, 0.24);
    background: rgba(176, 58, 58, 0.08);
    color: #8f2525;
}

.detail-chip.is-probing {
    border-color: rgba(15, 77, 100, 0.18);
    background: rgba(15, 77, 100, 0.06);
    color: #0f4d64;
}

.detail-chip.is-muted {
    border-color: rgba(95, 118, 128, 0.18);
    background: rgba(95, 118, 128, 0.08);
    color: #546770;
}

.detail-note {
    margin: 0 0 14px;
    color: var(--ink-soft);
}

.message-thread-meta {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.message-thread-status-form {
    margin: -4px 0 18px;
}

.message-thread-delete-button {
    border-color: rgba(177, 61, 61, 0.18);
    background: rgba(177, 61, 61, 0.08);
    color: #912b2b;
}

.message-stream {
    display: grid;
    gap: 14px;
    margin-bottom: 18px;
}

.message-card {
    display: grid;
    gap: 10px;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: var(--surface-soft);
}

.message-card.is-admin {
    background: #f2f7f8;
}

.message-card.is-client {
    background: #fff8ef;
}

.message-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    color: var(--ink-soft);
    font-size: 13px;
}

.message-meta strong {
    color: var(--ink);
}

.message-body {
    color: var(--ink);
    line-height: 1.6;
}

.messages-page .message-card.is-admin .message-view-status {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 8px 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(15, 77, 100, 0.14);
    color: var(--ink-soft);
    font-size: 12px;
}

.messages-page .message-view-status-label {
    padding-top: 5px;
    color: var(--ink);
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.messages-page .message-view-status-channels {
    display: flex;
    flex: 1 1 320px;
    flex-wrap: wrap;
    gap: 7px;
}

.messages-page .message-view-status-chip {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    padding: 5px 8px;
    border: 1px solid rgba(15, 77, 100, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--brand);
    font-weight: 700;
}

.messages-page .message-view-status-chip time {
    color: var(--ink-soft);
    font-weight: 600;
}

.messages-page .message-view-status-empty {
    padding-top: 5px;
    color: var(--ink-soft);
    font-style: italic;
}

.message-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.message-attachment-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--brand);
    font-weight: 700;
}

.message-attachment-link span:first-child {
    overflow-wrap: anywhere;
}

.message-attachment-size {
    flex: 0 0 auto;
    color: var(--ink-soft);
    font-size: 12px;
    font-weight: 600;
}

.inline-form {
    display: inline-flex;
}

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

.automation-cron-copy-all {
    align-items: stretch;
    margin: 16px 0 22px;
}

.automation-cron-bundle,
.automation-cron-line {
    background: #050505;
    color: #ffe600;
    font-family: Consolas, "Courier New", monospace;
}

.automation-cron-bundle {
    flex: 1 1 auto;
    min-width: 0;
    max-height: 420px;
    margin: 0;
    padding: 16px;
    border: 1px solid #303030;
    border-radius: 14px;
    overflow: auto;
    font-size: 0.86rem;
    line-height: 1.6;
    white-space: pre;
}

.automation-cron-line.integration-copy-value {
    background: #050505;
    color: #ffe600;
    font-family: Consolas, "Courier New", monospace;
}

.inline-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ink);
    font-size: 14px;
}

.inline-checkbox input {
    width: auto;
    margin: 0;
}

.inventory-assignment-list {
    display: grid;
    gap: 12px;
    margin-top: 12px;
}

.inventory-assignment-form {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(240px, 1.4fr) auto;
    align-items: end;
    gap: 12px;
}

.inventory-assignment-line {
    display: grid;
    gap: 4px;
}

.inventory-assignment-line span {
    color: var(--ink-soft);
    font-size: 13px;
}

.inventory-assignment-picker input {
    min-width: 0;
}

.inventory-match-picker {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.inventory-match-search-field {
    min-width: 0;
}

.inventory-match-search-field input:focus {
    border-color: rgba(15, 77, 100, 0.72);
    box-shadow: 0 0 0 4px rgba(15, 77, 100, 0.11);
    outline: none;
}

.inventory-match-results:not([hidden]) {
    display: grid;
    max-height: 284px;
    padding: 6px;
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 1px solid rgba(15, 77, 100, 0.2);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 18px 38px rgba(17, 45, 57, 0.13);
}

.inventory-match-result {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: transparent;
    color: var(--ink);
    text-align: left;
}

.inventory-match-result:hover,
.inventory-match-result:focus-visible {
    border-color: rgba(15, 77, 100, 0.2);
    background: rgba(15, 77, 100, 0.07);
    outline: none;
}

.inventory-match-result + .inventory-match-result {
    border-top-color: var(--line);
}

.inventory-match-result.is-current,
.inventory-match-result:disabled {
    cursor: not-allowed;
    opacity: 0.62;
    background: var(--surface-soft);
}

.inventory-match-result-main {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.inventory-match-result-main strong,
.inventory-match-result-main small {
    overflow-wrap: anywhere;
}

.inventory-match-result-main small,
.inventory-match-result-meta,
.inventory-match-selected small,
.inventory-match-current small {
    color: var(--ink-soft);
}

.inventory-match-result-meta {
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.inventory-match-empty {
    padding: 16px;
    color: var(--ink-soft);
    text-align: center;
}

.inventory-match-current,
.inventory-match-selected:not([hidden]) {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 14px;
}

.inventory-match-current {
    display: grid;
    gap: 3px;
    border: 1px solid var(--line);
    background: var(--surface-soft);
}

.inventory-match-selected:not([hidden]) {
    border: 1px solid rgba(25, 135, 84, 0.25);
    background: rgba(25, 135, 84, 0.08);
}

.inventory-match-selected > div {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.inventory-match-selected strong,
.inventory-match-selected small,
.inventory-match-current strong,
.inventory-match-current small {
    overflow-wrap: anywhere;
}

.inventory-match-eyebrow {
    display: block;
    color: var(--ink-soft);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.inventory-match-status {
    min-height: 20px;
    color: var(--ink-soft);
}

.inventory-match-status.is-success {
    color: var(--success);
}

.inventory-match-status.is-error {
    color: var(--danger);
}

.inventory-assignment-modal-shell {
    width: min(760px, 100%);
}

.inventory-assignment-modal-context {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.inventory-assignment-modal-context > div {
    display: grid;
    gap: 3px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface-soft);
}

.inventory-assignment-modal-context span,
.inventory-assignment-comparison-card > span {
    color: var(--ink-soft);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.inventory-assignment-modal-context strong,
.inventory-assignment-comparison-card strong,
.inventory-assignment-comparison-card small {
    overflow-wrap: anywhere;
}

.inventory-assignment-comparison {
    display: flex;
    align-items: stretch;
    gap: 12px;
}

.inventory-assignment-comparison-card {
    flex: 1 1 0;
    display: grid;
    align-content: start;
    gap: 5px;
    min-width: 0;
    padding: 16px;
    border-radius: 16px;
}

.inventory-assignment-comparison-card.is-current {
    border: 1px solid rgba(199, 134, 23, 0.28);
    background: rgba(199, 134, 23, 0.08);
}

.inventory-assignment-comparison-card.is-selected {
    border: 1px solid rgba(25, 135, 84, 0.28);
    background: rgba(25, 135, 84, 0.08);
}

.inventory-assignment-comparison-card small {
    color: var(--ink-soft);
}

.inventory-assignment-comparison-arrow {
    align-self: center;
    flex: 0 0 auto;
    color: var(--brand);
    font-size: 24px;
    font-weight: 800;
}

.inventory-assignment-modal-warning {
    margin: 0;
}

.inventory-link-remember {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    border: 1px solid #d9e3ec;
    border-radius: 10px;
    cursor: pointer;
}
.inventory-link-remember[hidden] { display: none; }
.inventory-link-remember input { width: auto; margin-top: 4px; }
.inventory-link-remember small { display: block; margin-top: 4px; color: #526576; }

.inventory-assignment-modal-actions {
    margin-top: 0;
}

.order-line-assignment-form {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
    align-items: end;
    gap: 10px;
    min-width: min(460px, 100%);
}

.order-line-assignment-picker {
    min-width: 0;
}

.order-line-assignment-picker input {
    min-width: 0;
}

.stack-form,
.grid-form {
    display: grid;
    gap: 14px;
}

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

.field-full {
    grid-column: 1 / -1;
}

.field {
    display: grid;
    gap: 8px;
}

.field span {
    font-size: 13px;
    font-weight: 700;
    color: var(--ink-soft);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.field input,
.field select,
.field textarea,
.search-input {
    width: 100%;
    padding: 13px 14px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
}

.message-order-picker {
    position: relative;
    min-width: 0;
}

.message-order-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.message-order-input-row input {
    flex: 1 1 220px;
    min-width: 0;
}

.message-order-results {
    display: grid;
    max-height: 280px;
    overflow-y: auto;
    padding: 6px;
    border: 1px solid rgba(15, 77, 100, 0.2);
    border-radius: 12px;
    background: #fff;
    overscroll-behavior: contain;
}

.message-order-results[hidden],
[data-message-order-clear][hidden] {
    display: none;
}

.message-order-option {
    display: grid;
    gap: 3px;
    width: 100%;
    text-align: left;
    padding: 10px 12px;
    border: 0;
    border-radius: 8px;
    color: var(--ink);
    background: transparent;
    cursor: pointer;
    overflow-wrap: anywhere;
}

.message-order-option small {
    color: var(--ink-soft);
}

.message-order-option:hover,
.message-order-option.is-active,
.message-order-option[aria-selected="true"] {
    background: rgba(15, 77, 100, 0.09);
}

.client-combobox {
    position: relative;
    display: grid;
    width: 100%;
    min-width: min(260px, 100%);
    gap: 8px;
}

.client-combobox-input {
    width: 100%;
    min-width: 0;
    transition: border-color 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

.client-combobox-input:focus {
    border-color: rgba(15, 77, 100, 0.72);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(15, 77, 100, 0.11);
    outline: none;
}

.client-combobox-input[aria-invalid="true"],
.client-combobox-input:user-invalid {
    border-color: rgba(160, 48, 48, 0.7);
}

.client-combobox-native {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    min-width: 0 !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    border: 0 !important;
    white-space: nowrap !important;
    pointer-events: none !important;
}

.client-combobox-listbox {
    position: fixed;
    z-index: 5000;
    display: grid;
    gap: 3px;
    padding: 6px;
    overflow-x: hidden;
    overflow-y: auto;
    border: 1px solid rgba(15, 77, 100, 0.18);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.99);
    box-shadow: 0 20px 48px rgba(17, 45, 57, 0.20), 0 4px 12px rgba(17, 45, 57, 0.08);
    overscroll-behavior: contain;
}

.client-combobox-listbox[hidden] {
    display: none;
}

.client-combobox-option {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    width: 100%;
    gap: 12px;
    margin: 0;
    padding: 11px 12px;
    text-align: left;
    color: var(--ink);
    border: 0;
    border-radius: 10px;
    background: transparent;
    box-shadow: none;
    cursor: pointer;
}

.client-combobox-option:hover,
.client-combobox-option.is-active {
    color: var(--ink);
    background: rgba(15, 77, 100, 0.09);
    transform: none;
}

.client-combobox-option[aria-selected="true"] {
    background: rgba(15, 77, 100, 0.13);
    font-weight: 700;
}

.client-combobox-option-label {
    min-width: 0;
    overflow-wrap: anywhere;
}

.client-combobox-option-status {
    min-width: 18px;
    color: var(--teal, #0f4d64);
    font-size: 15px;
    font-weight: 800;
    text-align: center;
}

.client-combobox-empty {
    padding: 15px 12px;
    color: var(--ink-soft);
    text-align: center;
}

.client-combobox-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.client-combobox-chips[hidden] {
    display: none;
}

.client-combobox-chip {
    display: inline-flex;
    align-items: center;
    width: auto;
    max-width: 100%;
    gap: 7px;
    margin: 0;
    padding: 6px 9px 6px 11px;
    color: var(--teal, #0f4d64);
    font-size: 12px;
    font-weight: 700;
    text-align: left;
    border: 1px solid rgba(15, 77, 100, 0.16);
    border-radius: 999px;
    background: rgba(15, 77, 100, 0.08);
    box-shadow: none;
}

.client-combobox-chip:hover {
    color: var(--teal, #0f4d64);
    background: rgba(15, 77, 100, 0.14);
    transform: none;
}

.client-combobox-chip > span:first-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.client-combobox-chip-remove {
    font-size: 16px;
    font-weight: 500;
    line-height: 1;
}

.warehouse-pallet-client-form .client-combobox {
    min-width: 0;
}

.warehouse-pallet-client-form .client-combobox-input {
    min-width: 190px;
    padding: 8px 10px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
}

.field textarea {
    resize: vertical;
    min-height: 110px;
}

code {
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(15, 77, 100, 0.08);
    color: var(--brand-strong);
    font-size: 12px;
}

[hidden] {
    display: none !important;
}

.stripe-card-shell {
    width: 100%;
    min-height: 52px;
    padding: 15px 14px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: #fff;
}

.stripe-card-shell.StripeElement--focus {
    border-color: rgba(15, 77, 100, 0.35);
    box-shadow: 0 0 0 4px rgba(15, 77, 100, 0.08);
}

.stripe-card-shell.StripeElement--invalid {
    border-color: rgba(177, 61, 61, 0.45);
}

.payment-method-note {
    margin-bottom: 18px;
}

.payment-method-note p {
    margin: 8px 0 0;
}

.payment-method-panels {
    margin-top: 18px;
}

.payment-backup-panel {
    grid-column: 1 / -1;
}

.payment-method-summary {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.payment-method-summary > div {
    display: grid;
    gap: 5px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}

.payment-method-summary > div:first-child {
    padding-top: 0;
}

.payment-method-summary > div:last-child {
    border-bottom: 0;
}

.payment-method-summary span {
    color: var(--ink-soft);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.payment-method-summary strong {
    color: var(--brand-strong);
    overflow-wrap: anywhere;
}

.payment-method-summary p {
    margin: 0;
    color: var(--ink-soft);
    font-size: 13px;
    line-height: 1.45;
}

.stripe-payment-shell {
    width: 100%;
    min-height: 72px;
    padding: 14px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: #fff;
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 16px;
}

.toolbar.start {
    justify-content: flex-start;
}

.checkbox-line {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    color: var(--ink);
}

.checkbox-line input {
    width: auto;
    flex: 0 0 auto;
    margin: 3px 0 0;
}

.checkbox-line span {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 15px;
    font-weight: 400;
    letter-spacing: normal;
    text-transform: none;
    color: inherit;
    white-space: normal;
    overflow-wrap: anywhere;
}

.email-recipient-list {
    display: grid;
    gap: 18px;
}

.email-recipient-card {
    padding: 20px;
    border: 1px solid rgba(24, 119, 166, 0.16);
    border-radius: 18px;
    background: rgba(242, 247, 248, 0.55);
}

.email-recipient-card .panel-heading {
    margin-bottom: 16px;
}

.email-preferences {
    min-width: 0;
    margin: 0;
    padding: 16px;
    border: 1px solid rgba(24, 119, 166, 0.16);
    border-radius: 14px;
}

.email-preferences legend {
    padding: 0 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--ink-soft);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

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

.email-preference-option {
    padding: 12px;
    border-radius: 12px;
    background: #fff;
}

.email-preference-option span {
    display: grid;
    gap: 4px;
}

.email-preference-option span strong {
    font-size: 14px;
}

.email-preference-option span small {
    color: var(--ink-soft);
    line-height: 1.45;
}

.email-category-summary,
.email-recipient-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

@media (max-width: 760px) {
    .email-preference-grid {
        grid-template-columns: 1fr;
    }
}

.logo-preview {
    margin-bottom: 18px;
    padding: 18px;
    background: var(--surface-soft);
    border-radius: 18px;
}

.logo-preview img {
    max-height: 70px;
}

.pill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.pill {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(15, 77, 100, 0.08);
    color: var(--brand);
    font-size: 13px;
}

.setup-card {
    display: grid;
    gap: 18px;
}

.setup-count,
.setup-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.setup-count {
    background: rgba(15, 77, 100, 0.1);
    color: var(--brand);
}

.setup-checklist {
    display: grid;
    gap: 12px;
}

.setup-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(15, 77, 100, 0.12);
    background: var(--surface-soft);
}

.setup-item strong {
    display: block;
    margin-bottom: 6px;
}

.setup-item p {
    margin: 0;
    color: var(--ink-soft);
}

.setup-item.is-complete {
    border-color: rgba(25, 135, 84, 0.18);
    background: rgba(25, 135, 84, 0.08);
}

.setup-item.is-complete .setup-status {
    background: rgba(25, 135, 84, 0.14);
    color: #0f6c43;
}

.setup-item.is-pending .setup-status {
    background: rgba(223, 123, 51, 0.14);
    color: #8a4e18;
}

.setup-item .setup-status {
    flex: 0 0 auto;
}

.order-meta-grid,
.mapping-grid,
.package-row {
    display: grid;
    gap: 14px;
}

.order-meta-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 18px;
}

.order-meta-full {
    grid-column: 1 / -1;
}

.order-meta-grid span,
.packing-grid span {
    display: block;
    margin-bottom: 8px;
    color: var(--ink-soft);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.order-meta-grid strong,
.packing-grid strong {
    display: block;
    font-size: 18px;
}

.order-meta-email strong,
.order-meta-email small {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.order-meta-grid small,
.packing-grid p {
    display: block;
    margin-top: 8px;
    color: var(--ink-soft);
}

.mapping-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.package-list {
    display: grid;
    gap: 14px;
}

.package-row {
    grid-template-columns: 1fr;
    padding: 18px;
    border-radius: 18px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
}

.package-row-section {
    display: grid;
    gap: 14px;
    align-items: end;
}

.package-row-section-primary {
    grid-template-columns: minmax(140px, 1.15fr) repeat(2, minmax(0, 1fr));
}

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

.package-row-section-dimensions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.package-row-section-actions {
    grid-template-columns: minmax(0, 1fr);
}

.package-row-section-actions .ghost-button.button-small {
    width: fit-content;
    min-width: 120px;
}

.package-clone-control {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: end;
}

.package-clone-field {
    max-width: 180px;
}

.package-clone-control .ghost-button.button-small {
    max-width: 280px;
    white-space: normal;
    text-align: left;
}

input[data-fulfillment-location-input][readonly] {
    background: #eef7f2;
    border-color: rgba(25, 135, 84, 0.28);
    color: #0f6c43;
    cursor: default;
}

.package-context-field {
    min-width: 0;
}

.package-context-value {
    display: flex;
    align-items: center;
    min-height: 52px;
    padding: 13px 14px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
    color: var(--brand-strong);
    font-weight: 700;
    line-height: 1.35;
}

.rate-selection-card {
    padding: 18px;
    border-radius: 18px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    box-shadow: none;
}

.carrier-picker {
    display: grid;
    gap: 16px;
}

.rate-order-context {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin: 0 0 16px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(15, 77, 100, 0.12);
    background: rgba(255, 255, 255, 0.9);
    color: var(--ink-soft);
    line-height: 1.45;
}

.rate-order-context span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.rate-order-context strong {
    color: var(--ink);
}

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

.carrier-toggle {
    appearance: none;
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    width: 100%;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(15, 77, 100, 0.12);
    background: rgba(255, 255, 255, 0.84);
    color: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.carrier-toggle:focus {
    outline: 2px solid rgba(15, 77, 100, 0.22);
    outline-offset: 3px;
}

.carrier-toggle:hover {
    border-color: rgba(15, 77, 100, 0.22);
    box-shadow: 0 10px 24px rgba(17, 45, 57, 0.08);
    transform: translateY(-1px);
}

.carrier-toggle.is-selected-carrier:not(.is-active) {
    border-color: rgba(15, 77, 100, 0.22);
    background: rgba(255, 255, 255, 0.92);
}

.carrier-toggle.is-active {
    border-color: rgba(15, 77, 100, 0.28);
    box-shadow: 0 12px 28px rgba(17, 45, 57, 0.12);
}

.carrier-toggle-ups.is-active {
    background: linear-gradient(180deg, rgba(255, 251, 245, 0.98), rgba(247, 243, 236, 0.94));
}

.carrier-toggle-usps.is-active {
    background: linear-gradient(180deg, rgba(246, 250, 255, 0.98), rgba(239, 247, 252, 0.94));
}

.carrier-toggle-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.carrier-toggle-label-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.carrier-toggle-label-row strong {
    color: var(--ink);
    font-size: 17px;
}

.carrier-toggle-state {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(15, 77, 100, 0.1);
    color: var(--brand);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.carrier-toggle-meta {
    color: var(--ink-soft);
    font-size: 13px;
    line-height: 1.35;
}

.carrier-toggle-price-stack {
    display: grid;
    gap: 3px;
    grid-column: 1 / -1;
    padding-top: 6px;
    border-top: 1px solid rgba(15, 77, 100, 0.08);
}

.carrier-toggle-price {
    color: var(--ink);
    font-size: 20px;
    font-weight: 700;
}

.carrier-toggle-price-label {
    color: var(--ink-soft);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.carrier-panel {
    display: grid;
    gap: 14px;
    padding: 18px;
    border-radius: 20px;
    border: 1px solid rgba(15, 77, 100, 0.12);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 251, 252, 0.92));
}

.carrier-panel-ups {
    border-color: rgba(132, 92, 42, 0.18);
    background: linear-gradient(180deg, rgba(255, 251, 245, 0.98), rgba(247, 243, 236, 0.92));
}

.carrier-panel-usps {
    border-color: rgba(24, 119, 166, 0.18);
    background: linear-gradient(180deg, rgba(246, 250, 255, 0.98), rgba(239, 247, 252, 0.92));
}

.carrier-panel-copy {
    display: grid;
    gap: 6px;
}

.carrier-panel-summary {
    margin: 0;
    color: var(--ink-soft);
    line-height: 1.45;
}

.carrier-panel-summary strong {
    color: var(--ink);
}

.carrier-rate-kicker {
    margin: 0;
    color: var(--brand);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.carrier-rate-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: 18px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.carrier-rate-icon svg {
    display: block;
    width: 30px;
    height: 30px;
}

.carrier-rate-icon-ups {
    background: linear-gradient(135deg, #5c3b1a, #9b6a2b);
    color: #f7d58d;
}

.carrier-rate-icon-usps {
    background: linear-gradient(135deg, #0d4d7f, #0f6ca8);
    color: #f3f7fb;
}

.carrier-rate-options {
    display: grid;
    gap: 10px;
}

.rate-option {
    position: relative;
    display: block;
    cursor: pointer;
}

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

.rate-option-body {
    display: block;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(15, 77, 100, 0.12);
    background: rgba(255, 255, 255, 0.92);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.rate-option:hover .rate-option-body {
    border-color: rgba(15, 77, 100, 0.2);
    box-shadow: 0 10px 24px rgba(17, 45, 57, 0.08);
    transform: translateY(-1px);
}

.rate-option input:checked + .rate-option-body {
    border-color: rgba(15, 77, 100, 0.28);
    box-shadow: 0 14px 28px rgba(17, 45, 57, 0.12);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 250, 252, 0.94));
}

.rate-option input:focus + .rate-option-body {
    outline: 2px solid rgba(15, 77, 100, 0.2);
    outline-offset: 3px;
}

.rate-option-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.rate-option-service-stack,
.rate-option-price-stack {
    display: grid;
    gap: 4px;
}

.rate-option-service-stack strong {
    color: var(--ink);
    font-size: 15px;
}

.rate-option-transit {
    color: var(--ink-soft);
    font-size: 13px;
}

.rate-option-price-stack {
    justify-items: end;
    flex: 0 0 auto;
}

.rate-option-rank {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(15, 77, 100, 0.08);
    color: var(--brand);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.rate-option-auto {
    background: rgba(35, 124, 83, 0.12);
    color: #237c53;
}

.rate-option-price {
    color: var(--ink);
    font-size: 20px;
    font-weight: 700;
}

.carrier-rate-empty {
    display: grid;
    gap: 6px;
    padding: 16px;
    border-radius: 16px;
    border: 1px dashed rgba(15, 77, 100, 0.18);
    background: rgba(255, 255, 255, 0.58);
    color: var(--ink-soft);
}

.carrier-rate-empty strong {
    color: var(--ink);
}

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

.chart-card {
    min-height: 320px;
}

.chart-canvas {
    width: 100%;
    height: 260px;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.badge-warning { background: rgba(199, 134, 23, 0.12); color: #9a670f; }
.badge-info { background: rgba(24, 119, 166, 0.12); color: #0d5b7d; }
.badge-success { background: rgba(25, 135, 84, 0.12); color: #0d6038; }
.badge-danger { background: rgba(177, 61, 61, 0.12); color: #912b2b; }
.badge-muted { background: rgba(95, 118, 128, 0.12); color: #546770; }

.secondary-sku-chip-list {
    gap: 8px;
    margin-bottom: 12px;
}

.secondary-sku-chip {
    border: 1px solid rgba(24, 119, 166, 0.14);
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.secondary-sku-chip:hover,
.secondary-sku-chip:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(17, 45, 57, 0.12);
}

.secondary-sku-chip.is-delete-pending {
    background: rgba(199, 134, 23, 0.14);
    color: #7a5410;
}

.secondary-sku-modal-shell {
    width: min(520px, 100%);
}

.secondary-sku-modal-code {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(24, 119, 166, 0.12);
    color: #0d5b7d;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.secondary-sku-modal-pending {
    margin: 0;
}

.danger-button {
    background: linear-gradient(135deg, #a93636, #7d2424);
}

.auth-body {
    display: grid;
    place-items: center;
    padding: 24px;
}

.auth-shell {
    width: min(1120px, 100%);
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    gap: 22px;
    align-items: stretch;
}

.auth-side {
    padding: 36px;
    color: #fff;
    background: linear-gradient(135deg, rgba(10, 53, 71, 0.96), rgba(15, 77, 100, 0.9));
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-brand-stack {
    width: 100%;
    max-width: 430px;
    display: grid;
    gap: 22px;
    justify-items: center;
    text-align: center;
}

.auth-hero-image {
    width: min(100%, 360px);
    height: auto;
    filter: drop-shadow(0 22px 34px rgba(6, 24, 34, 0.28));
}

.auth-card-wrap {
    display: grid;
    gap: 18px;
    align-content: center;
}

.auth-card {
    max-width: 640px;
}

.auth-links {
    margin-top: 16px;
}

.auth-links a {
    color: var(--brand);
    font-weight: 700;
}

.auth-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.auth-countdown-card {
    display: grid;
    gap: 14px;
    margin-top: 18px;
    padding: 18px;
    border-radius: 20px;
    border: 1px solid var(--line);
    background:
        radial-gradient(circle at top right, rgba(223, 123, 51, 0.12), transparent 28%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 250, 251, 0.96));
}

.auth-countdown-copy {
    display: grid;
    gap: 4px;
}

.auth-countdown-copy strong {
    color: var(--ink);
    font-size: 16px;
}

.auth-countdown-copy p {
    margin: 0;
    color: var(--ink-soft);
}

.auth-countdown-timer {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.auth-countdown-timer span {
    color: var(--brand-strong);
    font-size: clamp(34px, 5vw, 50px);
    font-weight: 800;
    line-height: 1;
}

.auth-countdown-timer small {
    color: var(--ink-soft);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-countdown-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.auth-countdown-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(15, 77, 100, 0.08);
    color: var(--brand);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.auth-countdown-pill strong {
    color: var(--brand-strong);
}

.auth-form-note {
    margin: 0 0 14px;
    color: var(--ink-soft);
    font-size: 14px;
}

.auth-code-input {
    text-align: center;
    letter-spacing: 0.32em;
    font-size: 24px;
    font-weight: 700;
}

.auth-actions .ghost-button[disabled] {
    opacity: 0.68;
    cursor: not-allowed;
    transform: none;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(15, 77, 100, 0.08);
    color: var(--brand);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.packing-slip {
    padding: 24px;
}

.print-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 16px;
}

.packing-card {
    max-width: 980px;
    margin: 0 auto;
}

.packing-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.packing-logo {
    max-height: 86px;
    max-width: 220px;
}

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

code {
    padding: 2px 6px;
    border-radius: 8px;
    background: rgba(15, 77, 100, 0.08);
    color: var(--brand-strong);
}

.mode-fieldset {
    margin: 0;
    padding: 0;
    border: 0;
}

.mode-fieldset legend {
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 700;
    color: var(--ink);
}

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

.mode-card {
    display: grid;
    gap: 8px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #f7fbfc;
    cursor: pointer;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.mode-card input {
    margin: 0;
    accent-color: #b98516;
}

.mode-card:hover {
    border-color: rgba(185, 133, 22, 0.3);
    transform: translateY(-1px);
}

.mode-card:focus-within {
    outline: 2px solid rgba(185, 133, 22, 0.22);
    outline-offset: 3px;
}

.mode-card:has(input:checked) {
    border-color: rgba(185, 133, 22, 0.7);
    background: linear-gradient(180deg, rgba(255, 252, 244, 0.98), rgba(251, 247, 235, 0.94));
    box-shadow: 0 0 0 3px rgba(214, 164, 47, 0.18), 0 12px 28px rgba(114, 78, 12, 0.12);
}

.mode-card:has(input:checked) strong {
    color: #5f420c;
}

.mode-card strong {
    color: var(--ink);
}

.mode-card span {
    color: var(--ink-soft);
    line-height: 1.5;
}

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

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

.detail-card {
    display: grid;
    gap: 6px;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #f7fbfc;
}

.detail-card span,
.detail-card small {
    color: var(--ink-soft);
}

.detail-card strong {
    color: var(--ink);
    font-size: 1.05rem;
    overflow-wrap: anywhere;
}

.fulfillment-shell {
    display: grid;
    gap: 18px;
}

.flyer-insert-prompt {
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #f7fbfc;
}

.fulfillment-action-row {
    display: flex;
    gap: 14px;
    align-items: center;
}

.fulfillment-scan-table-wrap {
    position: relative;
}

.fulfillment-case-scan-callout {
    border-color: rgba(24, 119, 166, 0.24);
    background: rgba(24, 119, 166, 0.10);
}

.fulfillment-case-scan-callout p {
    margin: 6px 0 0;
}

.fulfillment-case-row {
    background: rgba(24, 119, 166, 0.045);
}

.fulfillment-scan-mode {
    white-space: nowrap;
}

.fulfillment-scan-table-wrap.is-scan-complete {
    box-shadow: inset 0 0 0 1px rgba(25, 135, 84, 0.18);
}

.scan-complete-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 12;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: calc(100% - 48px);
    padding: 14px 34px;
    border: 2px solid rgba(25, 135, 84, 0.46);
    border-radius: 8px;
    background: rgba(248, 252, 247, 0.86);
    box-shadow: 0 14px 34px rgba(16, 84, 55, 0.14), 0 0 0 5px rgba(25, 135, 84, 0.08);
    color: #176b43;
    font-size: clamp(28px, 4.8vw, 68px);
    font-weight: 900;
    letter-spacing: 0.14em;
    line-height: 1;
    text-align: center;
    text-transform: uppercase;
    transform: translate(-50%, -50%) rotate(-8deg);
    white-space: nowrap;
    pointer-events: none;
    backdrop-filter: blur(1px);
}

.scan-complete-watermark[hidden] {
    display: none;
}

.scan-result-overlay {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(17, 35, 46, 0.44);
    backdrop-filter: blur(5px);
}

.scan-result-overlay[hidden] {
    display: none;
}

.scan-result-card {
    width: min(360px, 100%);
    display: grid;
    justify-items: center;
    gap: 12px;
    padding: 28px 30px;
    border: 1px solid rgba(255, 255, 255, 0.52);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 28px 80px rgba(9, 27, 37, 0.28);
    text-align: center;
}

.scan-result-card strong {
    font-size: 1.25rem;
    color: var(--ink);
}

.scan-result-card span:last-child {
    color: var(--ink-soft);
}

.scan-result-icon {
    width: 88px;
    height: 88px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 3.4rem;
    font-weight: 800;
    line-height: 1;
}

.scan-result-card.is-success .scan-result-icon {
    background: rgba(25, 135, 84, 0.13);
    color: #167347;
}

.scan-result-card.is-error .scan-result-icon {
    background: rgba(177, 61, 61, 0.13);
    color: #a43131;
}

.picker-summary.is-success {
    border-color: rgba(24, 138, 91, 0.24);
    background: rgba(24, 138, 91, 0.08);
    color: #166245;
}

.picker-summary.is-error {
    border-color: rgba(176, 58, 58, 0.22);
    background: rgba(176, 58, 58, 0.08);
    color: #8f2525;
}

.integration-hero-card,
.integration-provider-card,
.integration-status-card,
.integration-wizard-card {
    border: 1px solid rgba(15, 77, 100, 0.1);
    min-width: 0;
    max-width: 100%;
}

.integration-provider-card .panel-heading,
.integration-status-card .panel-heading,
.integration-wizard-card .panel-heading {
    align-items: start;
}

.integration-provider-card .panel-heading p,
.integration-status-card .panel-heading p,
.integration-wizard-card .panel-heading p,
.integration-provider-card .table-subtext,
.integration-status-card .table-subtext,
.integration-wizard-card .table-subtext,
.integration-status-message {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
}

.integration-provider-card-muted {
    background: linear-gradient(180deg, rgba(15, 77, 100, 0.03), rgba(223, 123, 51, 0.04));
}

.integration-status-grid {
    margin-top: 10px;
    min-width: 0;
    max-width: 100%;
}

.integration-status-chip {
    justify-content: center;
    min-width: 156px;
}

.integration-status-grid .detail-chip {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.integration-status-chip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    font-size: 13px;
    line-height: 1;
}

.integration-status-message {
    margin: 14px 0 0;
    font-size: 0.95rem;
    color: var(--muted);
}

.integration-status-message.is-success {
    color: #166245;
}

.integration-status-message.is-error {
    color: #8f2525;
}

.etsy-identity-hero {
    background:
        radial-gradient(circle at 92% 0%, rgba(223, 123, 51, 0.14), transparent 34%),
        linear-gradient(135deg, #ffffff 0%, #f3f8f9 100%);
}

.integration-eyebrow {
    display: block;
    margin-bottom: 6px;
    color: var(--brand);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.etsy-access-notice {
    margin: 4px 0 0;
}

.etsy-access-notice p {
    margin: 4px 0 0;
}

.etsy-order-intake-card {
    overflow: hidden;
    background:
        radial-gradient(circle at 100% 0%, rgba(223, 123, 51, 0.12), transparent 31%),
        linear-gradient(180deg, #ffffff 0%, rgba(243, 248, 249, 0.7) 100%);
}

.etsy-order-intake-state {
    border-color: rgba(223, 123, 51, 0.24);
    background: rgba(223, 123, 51, 0.09);
    color: #9a4c16;
}

.etsy-order-intake-state.is-success {
    border-color: rgba(24, 138, 91, 0.24);
    background: rgba(24, 138, 91, 0.09);
    color: #166245;
}

.etsy-order-intake-state.is-error {
    border-color: rgba(176, 58, 58, 0.24);
    background: rgba(176, 58, 58, 0.08);
    color: #8f2525;
}

.etsy-order-intake-state.is-staged {
    border-color: rgba(95, 118, 128, 0.22);
    background: rgba(95, 118, 128, 0.08);
    color: #526a74;
}

.etsy-connection-map {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 4px;
}

.etsy-connection-lane {
    min-width: 0;
    padding: 18px;
    border: 1px solid rgba(15, 77, 100, 0.14);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 77, 100, 0.055);
}

.etsy-connection-lane.is-identity {
    border-color: rgba(24, 138, 91, 0.22);
    background: linear-gradient(145deg, rgba(24, 138, 91, 0.065), #fff 58%);
}

.etsy-connection-lane.is-order-intake {
    border-color: rgba(223, 123, 51, 0.22);
    background: linear-gradient(145deg, rgba(223, 123, 51, 0.075), #fff 58%);
}

.etsy-connection-lane-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.etsy-connection-lane-label,
.etsy-connection-lane-state,
.etsy-shippo-step-location {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 26px;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.04em;
    line-height: 1.2;
    text-transform: uppercase;
}

.etsy-connection-lane-label {
    background: rgba(15, 77, 100, 0.08);
    color: var(--brand-strong);
}

.etsy-connection-lane-state {
    background: rgba(24, 138, 91, 0.1);
    color: #166245;
}

.etsy-connection-lane-state.is-planned {
    background: rgba(223, 123, 51, 0.11);
    color: #9a4c16;
}

.etsy-connection-lane h4,
.etsy-shippo-setup-heading h4,
.etsy-shippo-steps h5 {
    margin: 0;
    color: var(--ink);
}

.etsy-connection-lane h4 {
    font-size: 1.08rem;
}

.etsy-connection-lane > p {
    margin: 7px 0 14px;
    color: var(--ink-soft);
    line-height: 1.55;
}

.etsy-connection-lane code {
    color: var(--brand-strong);
    font-weight: 800;
}

.etsy-connection-facts {
    display: grid;
    gap: 8px;
    margin: 0;
}

.etsy-connection-facts > div {
    display: grid;
    grid-template-columns: minmax(82px, 0.34fr) minmax(0, 1fr);
    gap: 10px;
    padding-top: 8px;
    border-top: 1px solid rgba(15, 77, 100, 0.09);
}

.etsy-connection-facts dt {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.etsy-connection-facts dd {
    margin: 0;
    color: var(--ink);
    font-size: 0.9rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.etsy-shippo-setup {
    display: grid;
    gap: 15px;
    margin-top: 18px;
    padding: 18px;
    border: 1px solid rgba(15, 77, 100, 0.12);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.82);
}

.etsy-shippo-setup-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.etsy-shippo-setup-heading > p {
    max-width: 560px;
    margin: 0;
    color: var(--ink-soft);
    line-height: 1.5;
}

.etsy-shippo-steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: none;
}

.etsy-shippo-steps > li {
    position: relative;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    min-width: 0;
    padding: 15px;
    border: 1px solid rgba(15, 77, 100, 0.12);
    border-radius: 16px;
    background: #fff;
}

.etsy-shippo-steps > li:not(:last-child)::after {
    content: "\2192";
    position: absolute;
    z-index: 1;
    top: 50%;
    right: -18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: 1px solid rgba(15, 77, 100, 0.13);
    border-radius: 50%;
    background: #fff;
    color: var(--brand);
    font-size: 0.9rem;
    font-weight: 900;
    transform: translateY(-50%);
}

.etsy-shippo-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--brand-strong);
    color: #fff;
    font-weight: 900;
}

.etsy-shippo-step-location {
    margin-bottom: 7px;
    background: rgba(223, 123, 51, 0.1);
    color: #9a4c16;
}

.etsy-shippo-steps h5 {
    font-size: 0.98rem;
    line-height: 1.35;
}

.etsy-shippo-steps p {
    margin: 6px 0 0;
    color: var(--ink-soft);
    font-size: 0.88rem;
    line-height: 1.5;
}

.etsy-shippo-steps .etsy-shippo-key-hint {
    margin-top: 10px;
    padding: 9px 10px;
    border-radius: 12px;
    background: rgba(223, 123, 51, 0.08);
    color: #774018;
}

.etsy-shippo-key-hint code {
    color: #833e0e;
    font-weight: 850;
    overflow-wrap: anywhere;
}

.etsy-shippo-step-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    color: var(--brand-strong);
    font-size: 0.84rem;
    font-weight: 850;
    text-decoration: none;
}

.etsy-shippo-step-link:hover,
.etsy-shippo-step-link:focus-visible {
    text-decoration: underline;
}

.etsy-order-intake-boundary {
    margin: 16px 0 0;
}

.etsy-order-intake-boundary p {
    margin: 4px 0 0;
}

.etsy-shippo-token-shell {
    display: grid;
    grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
    gap: 16px;
    margin-top: 18px;
    padding: 18px;
    border: 1px solid rgba(15, 77, 100, 0.14);
    border-radius: 20px;
    background:
        linear-gradient(145deg, rgba(15, 77, 100, 0.045), rgba(255, 255, 255, 0.96) 44%),
        #fff;
    box-shadow: 0 12px 30px rgba(15, 77, 100, 0.055);
}

.etsy-shippo-token-status {
    display: grid;
    align-content: start;
    gap: 15px;
    min-width: 0;
    padding: 17px;
    border: 1px solid rgba(15, 77, 100, 0.1);
    border-radius: 17px;
    background: rgba(243, 248, 249, 0.74);
}

.etsy-shippo-token-status h4 {
    margin: 0;
    color: var(--ink);
    font-size: 1.06rem;
}

.etsy-shippo-token-status p {
    margin: 6px 0 0;
    color: var(--ink-soft);
    line-height: 1.55;
}

.etsy-shippo-token-metadata {
    display: grid;
    gap: 8px;
    margin: 0;
}

.etsy-shippo-token-metadata > div {
    display: grid;
    grid-template-columns: minmax(86px, 0.38fr) minmax(0, 1fr);
    gap: 10px;
    padding-top: 9px;
    border-top: 1px solid rgba(15, 77, 100, 0.1);
}

.etsy-shippo-token-metadata dt {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.etsy-shippo-token-metadata dd {
    margin: 0;
    color: var(--ink);
    font-size: 0.88rem;
    font-weight: 750;
    overflow-wrap: anywhere;
}

.etsy-shippo-token-form {
    display: grid;
    align-content: start;
    gap: 14px;
    min-width: 0;
}

.etsy-shippo-token-form input[name="shippo_live_api_token"] {
    border-color: rgba(15, 77, 100, 0.25);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    letter-spacing: 0.02em;
}

.etsy-shippo-token-form input[name="shippo_live_api_token"]:focus {
    border-color: rgba(15, 77, 100, 0.72);
    box-shadow: 0 0 0 4px rgba(15, 77, 100, 0.1);
    outline: none;
}

.etsy-shippo-token-form input[name="shippo_live_api_token"]:disabled {
    cursor: not-allowed;
    background: rgba(95, 118, 128, 0.08);
    color: var(--muted);
}

.etsy-shippo-security-note,
.etsy-shippo-revoke-note {
    padding: 13px 14px;
    border-radius: 15px;
}

.etsy-shippo-security-note {
    border: 1px solid rgba(24, 138, 91, 0.18);
    background: rgba(24, 138, 91, 0.065);
    color: #245e49;
}

.etsy-shippo-security-note p,
.etsy-shippo-revoke-note p {
    margin: 4px 0 0;
    line-height: 1.5;
}

.etsy-shippo-token-alert {
    margin: 0;
    box-shadow: none;
}

.etsy-shippo-token-alert p {
    margin: 4px 0 0;
}

.etsy-shippo-token-actions {
    margin-top: 0;
}

.etsy-shippo-connected-actions {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid rgba(15, 77, 100, 0.1);
}

.etsy-shippo-connected-actions form {
    margin: 0;
}

.etsy-shippo-disconnect-button {
    border-color: rgba(176, 58, 58, 0.2);
    background: rgba(176, 58, 58, 0.07);
    color: #8f2525;
}

.etsy-shippo-disconnect-button:hover,
.etsy-shippo-disconnect-button:focus-visible {
    border-color: rgba(176, 58, 58, 0.34);
    background: rgba(176, 58, 58, 0.11);
}

.etsy-shippo-revoke-note {
    margin-top: 12px;
    border: 1px solid rgba(176, 58, 58, 0.15);
    background: rgba(176, 58, 58, 0.055);
    color: #743434;
}

.etsy-access-summary {
    display: grid;
    gap: 10px;
    padding: 16px;
    border: 1px solid rgba(15, 77, 100, 0.14);
    border-radius: 18px;
    background: var(--surface-soft);
}

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

.etsy-access-grid > div {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    align-items: start;
    gap: 8px;
    min-width: 0;
    padding: 11px 12px;
    border: 1px solid rgba(24, 138, 91, 0.15);
    border-radius: 14px;
    background: rgba(24, 138, 91, 0.055);
}

.etsy-access-grid > div > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(24, 138, 91, 0.13);
    color: #166245;
    font-size: 0.78rem;
    font-weight: 900;
}

.etsy-access-grid > div.is-restricted {
    border-color: rgba(15, 77, 100, 0.12);
    background: #fff;
}

.etsy-access-grid > div.is-restricted > span {
    background: rgba(15, 77, 100, 0.09);
    color: var(--brand-strong);
}

.etsy-access-grid p {
    margin: 1px 0 0;
    color: var(--ink-soft);
    font-size: 0.9rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.etsy-access-grid p strong {
    color: var(--ink);
}

.etsy-data-boundary-list {
    display: grid;
    gap: 3px;
    margin: 7px 0 0;
    padding-left: 18px;
    color: var(--ink-soft);
    font-size: 0.88rem;
    line-height: 1.35;
}

.etsy-terms-acceptance {
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid rgba(15, 77, 100, 0.22);
    border-radius: 20px;
    background:
        radial-gradient(circle at 100% 0%, rgba(24, 119, 166, 0.1), transparent 34%),
        linear-gradient(180deg, #ffffff, rgba(243, 248, 249, 0.82));
    box-shadow: 0 12px 32px rgba(15, 77, 100, 0.08);
}

.etsy-terms-acceptance.is-accepted,
.etsy-terms-acceptance.is-ready {
    border-color: rgba(24, 138, 91, 0.3);
}

.etsy-terms-acceptance.is-impersonating {
    border-color: rgba(176, 58, 58, 0.28);
    background: linear-gradient(180deg, #fff, rgba(176, 58, 58, 0.035));
}

.etsy-terms-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.etsy-terms-header h4 {
    margin: 0;
    color: var(--ink);
    font-size: 1.08rem;
    line-height: 1.3;
}

.etsy-terms-version {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 10px;
    border: 1px solid rgba(15, 77, 100, 0.16);
    border-radius: 999px;
    background: #fff;
    color: var(--brand-strong);
    font-size: 0.78rem;
    font-weight: 800;
    white-space: nowrap;
}

.etsy-terms-intro,
.etsy-terms-boundary p,
.etsy-terms-warranty p,
.etsy-terms-record p,
.etsy-terms-impersonation p,
.etsy-terms-status {
    margin: 0;
    color: var(--ink-soft);
    line-height: 1.55;
}

.etsy-terms-policy-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.etsy-terms-policy-links a {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 7px 11px;
    border: 1px solid rgba(15, 77, 100, 0.16);
    border-radius: 12px;
    background: #fff;
    color: var(--brand-strong);
    font-size: 0.88rem;
    font-weight: 800;
    text-decoration: none;
}

.etsy-terms-policy-links a:hover,
.etsy-terms-policy-links a:focus-visible {
    border-color: rgba(15, 77, 100, 0.36);
    box-shadow: 0 0 0 3px rgba(24, 119, 166, 0.1);
}

.etsy-terms-boundary,
.etsy-terms-warranty {
    padding: 13px 14px;
    border-radius: 15px;
}

.etsy-terms-boundary {
    border: 1px solid rgba(24, 119, 166, 0.17);
    background: rgba(24, 119, 166, 0.06);
}

.etsy-terms-warranty {
    border: 1px solid rgba(15, 77, 100, 0.12);
    background: #fff;
}

.etsy-terms-boundary strong,
.etsy-terms-warranty strong,
.etsy-terms-record strong,
.etsy-terms-impersonation strong {
    color: var(--ink);
}

.etsy-terms-boundary p,
.etsy-terms-warranty p,
.etsy-terms-impersonation p {
    margin-top: 4px;
}

.etsy-terms-checkbox {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    align-items: start;
    gap: 11px;
    padding: 14px;
    border: 1px solid rgba(223, 123, 51, 0.28);
    border-radius: 16px;
    background: rgba(223, 123, 51, 0.07);
    cursor: pointer;
}

.etsy-terms-checkbox:focus-within {
    border-color: rgba(15, 77, 100, 0.42);
    box-shadow: 0 0 0 3px rgba(24, 119, 166, 0.11);
}

.etsy-terms-checkbox input {
    width: 20px;
    height: 20px;
    margin: 2px 0 0;
    accent-color: var(--brand);
}

.etsy-terms-checkbox span,
.etsy-terms-checkbox small {
    display: block;
    min-width: 0;
}

.etsy-terms-checkbox small {
    margin-top: 4px;
    color: var(--muted);
    line-height: 1.45;
}

.etsy-terms-record {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    align-items: start;
    gap: 11px;
    padding: 14px;
    border: 1px solid rgba(24, 138, 91, 0.22);
    border-radius: 16px;
    background: rgba(24, 138, 91, 0.07);
}

.etsy-terms-record > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(24, 138, 91, 0.15);
    color: #166245;
    font-weight: 900;
}

.etsy-terms-impersonation {
    margin: 0;
    box-shadow: none;
}

.etsy-terms-status {
    min-height: 24px;
    color: var(--brand-strong);
    font-size: 0.88rem;
    font-weight: 700;
}

.integration-wizard-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.integration-wizard-stack {
    gap: 16px;
}

.integration-wizard-step {
    margin: 0;
}

.integration-figure {
    margin: 0 0 14px;
    display: grid;
    gap: 10px;
}

.integration-shot {
    display: block;
    width: 100%;
    border-radius: 18px;
    border: 1px solid rgba(15, 77, 100, 0.14);
    background: linear-gradient(180deg, #f8fbfc, #eef5f7);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.integration-figure figcaption {
    font-size: 0.93rem;
    color: var(--muted);
}

.integration-wizard-nav {
    margin-top: 16px;
}

.integration-scope-shell {
    display: grid;
    gap: 10px;
}

.integration-scope-box {
    display: block;
    width: 100%;
    max-width: 100%;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(15, 77, 100, 0.14);
    background: #f5f9fa;
    color: #0f4d64;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
}

.integration-copy-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    max-width: 100%;
    min-width: 0;
    gap: 10px;
    align-items: stretch;
}

.integration-copy-row code {
    min-width: 0;
    display: flex;
    align-items: center;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(15, 77, 100, 0.14);
    background: #fff;
    color: #0f4d64;
    font-size: 0.9rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
    white-space: normal;
    word-break: break-word;
}

.integration-copy-value {
    min-width: 0;
    max-width: 100%;
    min-height: 46px;
    display: flex;
    align-items: center;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(15, 77, 100, 0.14);
    background: #fff;
    color: #0f4d64;
    font-size: 0.95rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
}

.integration-copy-row .ghost-button {
    align-self: stretch;
    white-space: nowrap;
}

.integration-copy-row .ghost-button[disabled] {
    cursor: not-allowed;
    opacity: 0.55;
    transform: none;
}

.integration-settings-form .field-full {
    grid-column: 1 / -1;
}

.integration-settings-form,
.integration-settings-form .field,
.integration-settings-form .checkbox-field,
.integration-settings-form .toolbar,
.integration-preview {
    min-width: 0;
    max-width: 100%;
}

.integration-preview {
    display: grid;
    gap: 8px;
}

.integration-preview strong,
.integration-preview .picker-summary,
.integration-preview .table-subtext,
.integration-settings-form .table-subtext {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
}

.integration-preview .table-subtext,
.integration-settings-form .table-subtext {
    display: block;
}

@media (max-width: 1120px) {
    .etsy-shippo-steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .etsy-shippo-steps > li::after {
        display: none;
    }
}

@media (max-width: 820px) {
    .etsy-shippo-token-shell {
        grid-template-columns: 1fr;
    }

    .etsy-shippo-connected-actions {
        grid-column: 1;
    }
}

@media (max-width: 720px) {
    .etsy-connection-map,
    .etsy-shippo-steps {
        grid-template-columns: 1fr;
    }

    .etsy-shippo-steps {
        gap: 20px;
    }

    .etsy-shippo-setup-heading {
        display: grid;
    }

    .etsy-shippo-steps > li:not(:last-child)::after {
        display: none;
    }

    .etsy-shippo-token-shell {
        padding: 14px;
    }

    .etsy-shippo-connected-actions {
        display: grid;
        justify-content: stretch;
    }

    .etsy-shippo-connected-actions form,
    .etsy-shippo-connected-actions .ghost-button,
    .etsy-shippo-token-actions .button {
        width: 100%;
    }

    .etsy-access-grid {
        grid-template-columns: 1fr;
    }

    .integration-wizard-steps {
        display: grid;
        grid-template-columns: 1fr;
    }

    .integration-settings-form .toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .integration-settings-form .toolbar .button,
    .integration-settings-form .toolbar .ghost-button {
        width: 100%;
    }

    .etsy-terms-policy-links {
        display: grid;
        grid-template-columns: 1fr;
    }

    .etsy-terms-policy-links a {
        width: 100%;
    }

    .integration-status-chip {
        min-width: 0;
        justify-content: flex-start;
    }
}

.barcode-label-page {
    display: grid;
    justify-items: center;
    gap: 12px;
    padding: 16px;
}

.barcode-label-card {
    width: 3.5in;
    min-height: 1.125in;
    padding: 6px 10px 7px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    display: grid;
    gap: 4px;
    box-sizing: border-box;
}

.barcode-label-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    font-size: 9px;
    line-height: 1.1;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #5f7883;
}

.barcode-label-company,
.barcode-label-name {
    color: var(--ink);
}

.barcode-label-company {
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.barcode-label-name {
    font-size: 10px;
    line-height: 1.15;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.barcode-label-art svg {
    display: block;
    width: 100%;
    height: auto;
}

@media (max-width: 1180px) {
    .ship-layout,
    .charts-three {
        grid-template-columns: 1fr;
    }

    .app-shell {
        grid-template-columns: 1fr;
    }

    .app-sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: min(320px, 88vw);
        transform: translateX(-100%);
        transition: transform 0.2s ease;
    }

    .app-sidebar.is-open {
        transform: translateX(0);
    }

    .sidebar-close {
        display: inline-flex;
    }

    .brand-block {
        padding-right: 52px;
        align-items: flex-start;
    }

    .sidebar-backdrop {
        display: block;
    }

    .menu-toggle {
        display: inline-flex;
    }
}

@media (max-width: 900px) {
    .auth-shell,
    .grid-panels.two-up,
    .charts-two,
    .users-layout,
    .mode-card-grid,
    .packing-grid,
    .order-meta-grid,
    .grid-form.two-up,
    .warehouse-setup-grid,
    .receiving-detail-grid,
    .detail-grid,
    .lot-card-grid,
    .inventory-assignment-form,
    .order-line-assignment-form {
        grid-template-columns: 1fr;
    }

    .carrier-toggle-bar {
        grid-template-columns: 1fr;
    }

    .warehouse-setup-heading {
        flex-direction: column;
        align-items: stretch;
    }

    .warehouse-spot-types-button {
        width: 100%;
        justify-content: center;
    }

    .messages-page.has-open-thread {
        grid-template-columns: 1fr;
    }

    .messages-page.has-open-thread .messages-overview {
        position: static;
        max-height: none;
        overflow-y: visible;
    }
}

@media (max-width: 640px) {
    .app-panel,
    .app-sidebar,
    .packing-slip,
    .auth-body {
        padding: 16px;
    }

    .sidebar-scroll-region {
        padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
    }

    .panel-card,
    .stat-card,
    .auth-card,
    .auth-side,
    .packing-card {
        padding: 18px;
        border-radius: 20px;
    }

    .panel-heading {
        flex-direction: column;
        align-items: stretch;
    }

    .panel-heading .button,
    .panel-heading .ghost-button {
        width: 100%;
    }

    .app-header {
        flex-direction: column;
    }

    .header-actions {
        width: 100%;
        justify-content: space-between;
    }

    .toolbar {
        justify-content: stretch;
    }

    .admin-orders-page {
        gap: 14px;
        overflow-x: hidden;
    }

    .admin-orders-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .admin-orders-stats .stat-card {
        padding: 14px;
        border-radius: 16px;
    }

    .admin-orders-stats .stat-card span {
        font-size: 11px;
    }

    .admin-orders-stats .stat-card strong {
        font-size: 24px;
    }

    .admin-orders-queue {
        padding: 14px;
        overflow-x: hidden;
    }

    .admin-orders-toolbar {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }

    .admin-orders-toolbar select,
    .admin-orders-toolbar .search-input,
    .admin-orders-toolbar .button,
    .admin-orders-toolbar .ghost-button {
        width: 100%;
        max-width: none;
    }

    .admin-orders-table-wrap,
    .admin-orders-page .order-detail-panel .table-wrap {
        border: 1px solid var(--line);
        border-radius: 14px;
    }

    .admin-orders-page .table-wrap-shell {
        overflow: hidden;
        border-radius: 14px;
    }

    .admin-orders-page .table-wrap-sticky-scrollbar.is-fixed {
        position: absolute;
        left: 0 !important;
        width: 100% !important;
    }

    .admin-orders-table {
        min-width: 940px;
    }

    .admin-orders-table .button.button-small,
    .admin-orders-table .ghost-button.button-small {
        width: auto;
        min-width: max-content;
    }

    .admin-orders-table .order-actions-cell {
        align-items: stretch;
        max-width: 164px;
    }

    .admin-orders-table .order-actions-cell .button,
    .admin-orders-table .order-actions-cell .ghost-button {
        width: 100%;
        min-width: 0;
    }

    .admin-orders-table .tracking-stack {
        width: min(260px, calc(100vw - 82px));
    }

    .admin-orders-table .tracking-stack-row {
        grid-template-columns: minmax(0, 1fr);
        align-items: stretch;
    }

    .admin-orders-page .transaction-detail-card {
        padding: 14px;
    }

    .admin-orders-page .detail-metrics {
        align-items: stretch;
    }

    .admin-orders-page .detail-chip {
        flex: 1 1 120px;
        justify-content: center;
        text-align: center;
    }

    .integration-connection-row {
        flex-direction: column;
        align-items: stretch;
    }

    .integration-connection-row .toolbar {
        width: 100%;
    }

    .warehouse-spot-type-row {
        align-items: stretch;
        grid-template-columns: 34px minmax(0, 1fr);
    }

    .warehouse-spot-type-edit-form {
        grid-template-columns: 1fr;
    }

    .warehouse-spot-type-row .warehouse-inline-actions {
        grid-column: 1 / -1;
    }

    .warehouse-spot-types-button {
        width: 100%;
        justify-content: center;
    }

    .warehouse-setup-heading {
        flex-direction: column;
        align-items: stretch;
    }

    .warehouse-pallet-product-row {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .pagination-bar,
    .pagination-controls,
    .pagination-per-page {
        align-items: stretch;
    }

    .pagination-controls {
        margin-left: 0;
    }

    .pagination-links {
        width: 100%;
    }

    .pagination-links .ghost-button.button-small,
    .pagination-links .button.button-small {
        width: auto;
        flex: 0 0 auto;
    }

    .toolbar .button,
    .toolbar .ghost-button,
    .ghost-button.button-small,
    .button.button-small {
        width: 100%;
    }

    .integration-copy-row {
        grid-template-columns: 1fr;
    }

    .carrier-toggle {
        padding: 14px;
    }

    .rate-option-heading {
        flex-direction: column;
    }

    .rate-option-price-stack {
        justify-items: start;
    }

    .order-detail-toggle-button {
        width: 100%;
    }

    .auth-countdown-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .fulfillment-action-row {
        flex-direction: column;
        align-items: stretch;
    }

    .actions-cell > * {
        display: block;
        width: max-content;
        max-width: 100%;
        margin-right: 0;
    }

    .order-actions-cell {
        flex-direction: column;
        align-items: stretch;
    }

    .transaction-detail-card {
        margin-left: 0;
    }

    .notification-panel {
        right: auto;
        left: 0;
        width: min(100vw - 32px, 430px);
    }

    .notification-shell[data-notification-kind="messages"] .notification-panel {
        left: -64px;
    }

    .walkthrough-panel {
        right: 16px;
        bottom: 16px;
        width: min(100vw - 24px, 460px);
        max-height: calc(100vh - 24px);
        padding: 20px;
        border-radius: 24px;
    }

    .walkthrough-page-chip {
        top: 14px;
        min-width: min(340px, calc(100vw - 24px));
    }

    .print-actions {
        justify-content: stretch;
    }

    .auth-hero-image {
        width: min(100%, 280px);
    }

    .app-modal {
        padding: 16px;
    }

    .app-modal-shell {
        max-height: calc(100vh - 24px);
        padding: 20px;
        border-radius: 24px;
    }
}

@media (max-width: 560px) {
    .inventory-assignment-modal-context {
        grid-template-columns: 1fr;
    }

    .inventory-assignment-comparison {
        flex-direction: column;
    }

    .inventory-assignment-comparison-arrow {
        align-self: center;
        transform: rotate(90deg);
    }

    .inventory-match-result {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    .inventory-match-result-meta {
        white-space: normal;
    }

    .inventory-match-selected:not([hidden]) {
        align-items: stretch;
        flex-direction: column;
    }

    .package-row-section {
        gap: 12px;
    }

    .package-row-section-primary,
    .package-row-section-dimensions {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

    .package-context-value {
        padding: 12px;
    }
}

@media (max-width: 640px) {
    .csv-orders-panel {
        padding: 16px;
        border-radius: 18px;
    }

    .csv-orders-panel-head {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
    }

    .csv-orders-panel-head .detail-chip {
        width: fit-content;
    }

    .csv-order-cancellation-summary {
        grid-template-columns: 1fr;
    }

    .csv-order-cancellation-actions,
    .order-cancellation-undo-actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .csv-order-cancellation-actions button,
    .order-cancellation-undo-actions button {
        width: 100%;
    }

    .notification-actions > .inline-form,
    .notification-actions > .inline-form button,
    .notification-actions > button {
        width: 100%;
    }
}

@media print {
    .print-actions {
        display: none;
    }

    body {
        background: #fff;
    }

    .packing-card {
        box-shadow: none;
        border: 0;
    }

    .barcode-label-page {
        padding: 0;
    }

    .barcode-label-card {
        margin: 0;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }
}

.app-body.sidebar-open {
    overflow: hidden;
}

.app-body.walkthrough-open {
    overflow: hidden;
}

.app-body.modal-open {
    overflow: hidden;
}

@media (max-width: 720px) {
    .walkthrough-backdrop {
        background:
            radial-gradient(circle at top center, rgba(223, 123, 51, 0.22), transparent 32%),
            linear-gradient(180deg, rgba(7, 29, 40, 0.18) 0%, rgba(7, 29, 40, 0.78) 100%);
        backdrop-filter: blur(7px);
    }

    .walkthrough-panel {
        right: 0;
        left: 0;
        bottom: 0;
        width: 100%;
        max-height: min(88vh, 780px);
        padding: 0;
        gap: 0;
        border-radius: 30px 30px 0 0;
        border-bottom: 0;
        background:
            linear-gradient(180deg, #0f5168 0%, #16708c 28%, #f7fbfd 28%, #ffffff 100%);
        box-shadow: 0 -18px 48px rgba(17, 45, 57, 0.26);
        overscroll-behavior: contain;
    }

    .walkthrough-page-chip {
        display: none;
    }

    .walkthrough-panel-top {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 12px;
        position: sticky;
        top: 0;
        z-index: 2;
        padding: 16px 20px 14px;
        background: linear-gradient(180deg, rgba(15, 81, 104, 0.98), rgba(22, 112, 140, 0.94));
    }

    .walkthrough-panel-top::before {
        content: '';
        grid-column: 1 / -1;
        width: 54px;
        height: 6px;
        margin: 0 auto 6px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.42);
    }

    .walkthrough-kicker {
        color: rgba(255, 255, 255, 0.72);
    }

    .walkthrough-page-label {
        margin-top: 4px;
        font-size: 24px;
        color: #fff;
    }

    .walkthrough-close {
        background: rgba(255, 255, 255, 0.12);
        color: #fff;
        border-color: rgba(255, 255, 255, 0.18);
        box-shadow: 0 10px 24px rgba(6, 28, 40, 0.18);
    }

    .walkthrough-progress-track {
        margin: 0 20px;
        background: rgba(15, 77, 100, 0.1);
    }

    .walkthrough-step-count,
    .walkthrough-panel h2,
    .walkthrough-summary,
    .walkthrough-detail-list {
        padding-left: 20px;
        padding-right: 20px;
    }

    .walkthrough-step-count {
        padding-top: 16px;
        color: var(--brand);
    }

    .walkthrough-panel h2 {
        margin-top: 8px;
        font-size: 26px;
    }

    .walkthrough-summary {
        margin-top: 8px;
        font-size: 15px;
    }

    .walkthrough-detail-list {
        gap: 12px;
        padding-bottom: 14px;
        padding-left: 40px;
    }

    .walkthrough-footer .button,
    .walkthrough-footer .ghost-button {
        width: 100%;
        min-height: 48px;
        justify-content: center;
        border-radius: 16px;
    }

    .walkthrough-footer {
        position: sticky;
        bottom: 0;
        justify-content: stretch;
        gap: 12px;
        padding: 16px 20px calc(18px + env(safe-area-inset-bottom));
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.96) 28%, #fff 100%);
        border-top: 1px solid rgba(15, 77, 100, 0.08);
        backdrop-filter: blur(8px);
    }

    .walkthrough-footer [data-walkthrough-start-full] {
        order: -1;
    }

    .walkthrough-target-active {
        border-radius: 22px;
        box-shadow:
            0 0 0 3px rgba(223, 123, 51, 0.86),
            0 20px 38px rgba(17, 45, 57, 0.18);
        scroll-margin-top: 92px;
        scroll-margin-bottom: 360px;
    }
}


/* Keep the hamburger control within reach at every screen size. */
@media screen {
    .sidebar-ready button.menu-toggle {
        position: fixed;
        top: max(12px, env(safe-area-inset-top, 0px));
        left: max(12px, env(safe-area-inset-left, 0px));
        z-index: 1080;
        width: 48px;
        height: 48px;
        min-width: 48px;
        min-height: 48px;
        padding: 0;
        margin: 0;
        gap: 0;
        align-items: center;
        justify-content: center;
        border-radius: 10px;
        transform: none;
    }

    .sidebar-ready button.menu-toggle .menu-toggle-icon,
    .sidebar-ready button.menu-toggle [data-menu-label] {
        display: none;
    }

    .sidebar-ready button.menu-toggle::before {
        content: "";
        display: block;
        flex: 0 0 22px;
        width: 22px;
        height: 18px;
        background: linear-gradient(to bottom,
            currentColor 0 2px, transparent 2px 8px,
            currentColor 8px 10px, transparent 10px 16px,
            currentColor 16px 18px);
    }

}

@media screen and (max-width: 1180px) {
    .sidebar-ready .app-header {
        padding-top: 56px;
    }
}

@media screen and (min-width: 1181px) {
    .sidebar-ready.sidebar-collapsed .app-header {
        padding-left: 50px;
    }
}

/* Portaled page pickers stay behind the open mobile navigation drawer. */
body.sidebar-open .client-combobox-listbox { z-index: 1050; }
