* {
    box-sizing: border-box;
}

:root {
    --page-bg: #f6f7f6;
    --surface: #ffffff;
    --surface-muted: #f4f5f4;
    --border: #dcdfdc;
    --text: #202223;
    --muted: #6d7175;
    --primary: #008060;
    --primary-hover: #006e52;
    --warning: #916a00;
    --warning-bg: #fff1d6;
    --success: #0c5132;
    --success-bg: #dff3e8;
    --danger: #8e1f0b;
    --danger-bg: #fff4f4;
    --info: #005bd3;
    --info-bg: #eaf3ff;
    --gold: #b7791f;
    --gold-bg: #fff7e6;
    --action: #173b68;
    --action-hover: #0f2b4d;
    --action-bg: #f2f7ff;
    --shadow-sm: 0 8px 22px rgba(32, 34, 35, .07);
    --shadow-md: 0 18px 38px rgba(32, 34, 35, .1);
    --focus-ring: rgba(0, 128, 96, .2);
    --page-background: var(--page-bg);
    --card-background: var(--surface);
    --border-color: var(--border);
    --text-color: var(--text);
    --muted-color: var(--muted);
    --primary-hover-color: var(--primary-hover);
    --danger-background: var(--danger-bg);
    --danger-border: #fed3d1;
    --danger-text: var(--danger);
}

body {
    margin: 0;
    background: var(--page-bg);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
}

a {
    color: var(--info);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

button,
input,
select {
    font: inherit;
}

input,
select {
    width: 100%;
    min-height: 34px;
    border: 1px solid #c9cccf;
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    padding: 7px 10px;
    transition: border-color .16s ease, box-shadow .16s ease;
}

button:focus-visible,
a:focus-visible,
input:focus,
select:focus {
    outline: 2px solid transparent;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

label > span:not(.password-control) {
    display: block;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.app-shell {
    max-width: 1500px;
    margin: 0 auto;
    padding: 24px;
}

.page-card,
.panel,
.summary-card,
.login-card {
    border: 1px solid var(--border);
    background: var(--surface);
}

.page-card,
.panel {
    border-radius: 14px;
}

.topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    margin-bottom: 18px;
    padding: 18px;
    box-shadow: var(--shadow-sm);
}

.header-main {
    display: grid;
    grid-template-columns: minmax(250px, .8fr) minmax(460px, 1.2fr);
    gap: 16px;
    align-items: stretch;
}

.header-title {
    display: grid;
    align-content: center;
    min-height: 92px;
    border-radius: 12px;
    background: #f8fbf9;
    padding: 16px 18px;
}

.portal-brand {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
}

.portal-logo {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border: 1px solid #aee9d1;
    border-radius: 14px;
    background: linear-gradient(145deg, var(--primary) 0%, #00a47c 100%);
    box-shadow: 0 10px 22px rgba(0, 128, 96, .18);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
}

.portal-title-copy {
    min-width: 0;
}

.header-eyebrow {
    display: block;
    color: var(--primary);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.topbar h1,
.login-card h1 {
    margin: 0;
    color: var(--text);
    font-size: 30px;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.topbar p {
    margin: 0;
    color: var(--muted);
}

.portal-subtitle {
    display: inline-flex;
    margin-top: 6px;
    border-radius: 999px;
    background: #eaf3ff;
    color: var(--action);
    padding: 3px 9px;
    font-size: 12px;
    font-weight: 700;
}

.header-insights {
    display: grid;
    grid-template-columns: minmax(220px, 1.1fr) minmax(220px, .9fr);
    gap: 12px;
}

.header-insight {
    display: grid;
    align-content: center;
    gap: 8px;
    min-height: 92px;
    border: 1px solid #e3e7e4;
    border-radius: 12px;
    background: var(--surface);
    padding: 14px 16px;
}

.header-insight-sync {
    border-color: #cdebdc;
    background: #f4fbf7;
}

.sync-health-row,
.sync-time {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 13px;
}

.sync-health {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    border-radius: 999px;
    padding: 3px 9px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.sync-health-active {
    background: var(--success-bg);
    color: var(--success);
}

.sync-health-delayed {
    background: #ffeadb;
    color: #9a3412;
}

.sync-health-never {
    background: #ebeceb;
    color: #4f5451;
}

.sync-health-error {
    background: var(--danger-bg);
    color: var(--danger);
}

.sync-message {
    font-size: 13px;
    line-height: 1.45;
}

.sync-time strong {
    color: var(--text);
}

.relative-time::before {
    content: "\00b7";
    margin-right: 7px;
    color: var(--muted);
}

.top-actions,
.filter-actions,
.badge-stack {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.top-actions {
    align-content: flex-start;
    justify-content: flex-end;
}

.top-actions .button {
    min-height: 42px;
    border-radius: 10px;
    padding: 9px 16px;
    font-weight: 700;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 34px;
    border: 1px solid #babfc3;
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    padding: 7px 12px;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease, color .16s ease;
}

.button:hover {
    background: var(--surface-muted);
    text-decoration: none;
}

.button-primary {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
}

.button-primary:hover {
    border-color: var(--primary-hover);
    background: var(--primary-hover);
}

.button-subtle {
    border-color: transparent;
    background: transparent;
    color: var(--muted);
}

.button-outline {
    border-color: #aeb4b0;
    background: var(--surface);
}

.button-save {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
    font-weight: 700;
}

.button-save:hover {
    border-color: var(--primary-hover);
    background: var(--primary-hover);
}

.button-view {
    border-color: #b8c9dc;
    background: var(--action-bg);
    color: var(--action);
    font-weight: 700;
}

.button-view:hover {
    border-color: var(--action);
    background: #e5f0ff;
    color: var(--action-hover);
}

.button-full {
    width: 100%;
    margin-top: 20px;
    min-height: 42px;
    font-weight: 700;
}

.button-small {
    min-height: 30px;
    padding: 5px 9px;
    font-size: 13px;
}

.button-icon {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
}

.button:disabled,
input:disabled,
.pagination-button.disabled,
.button.disabled {
    cursor: not-allowed;
    opacity: .55;
    pointer-events: none;
}

.button-spinner {
    display: none;
    width: 13px;
    height: 13px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin .7s linear infinite;
}

.button-loading .button-spinner {
    display: inline-block;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.alert {
    border-radius: 10px;
    margin: 12px 0;
    padding: 11px 14px;
    line-height: 1.45;
}

.alert-success {
    border: 1px solid #aee9d1;
    background: var(--success-bg);
    color: var(--success);
}

.alert-error {
    border: 1px solid #fed3d1;
    background: var(--danger-bg);
    color: var(--danger);
}

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

.summary-card {
    min-height: 92px;
    border-radius: 14px;
    padding: 14px 16px;
    box-shadow: var(--shadow-sm);
}

.summary-card:nth-child(1) {
    border-color: #ffe0a3;
    background: linear-gradient(180deg, #fffaf0 0%, var(--surface) 100%);
}

.summary-card:nth-child(2) {
    border-color: #ffd5bb;
    background: linear-gradient(180deg, #fff6ef 0%, var(--surface) 100%);
}

.summary-card:nth-child(3) {
    border-color: #bfebd2;
    background: linear-gradient(180deg, #f1fbf5 0%, var(--surface) 100%);
}

.summary-card:nth-child(4) {
    border-color: #cfe2ff;
    background: linear-gradient(180deg, #f3f8ff 0%, var(--surface) 100%);
}

.summary-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.summary-card strong {
    display: block;
    margin-top: 12px;
    font-size: 28px;
    line-height: 1;
}

.summary-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
}

.dot-warning {
    background: #f2b31d;
}

.dot-orange {
    background: #f97316;
}

.dot-success {
    background: var(--primary);
}

.dot-info {
    background: var(--info);
}

.filter-card {
    margin-bottom: 18px;
    box-shadow: var(--shadow-sm);
}

.filters {
    display: grid;
    grid-template-columns: minmax(260px, 1.6fr) repeat(5, minmax(126px, 1fr)) minmax(100px, .7fr) auto;
    gap: 12px;
    align-items: end;
    padding: 16px;
}

.table-panel {
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table-loading-overlay {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(255, 255, 255, .6);
    color: var(--muted);
    font-weight: 700;
    z-index: 2;
}

.table-panel.is-loading .table-loading-overlay {
    display: flex;
}

.table-wrap {
    width: 100%;
}

table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

thead {
    background: #f8faf8;
}

th {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-align: left;
}

th,
td {
    border-bottom: 1px solid var(--border);
    padding: 14px 16px;
    vertical-align: middle;
}

tbody tr {
    transition: background-color .16s ease;
}

tbody tr:hover {
    background: #f9fbfa;
}

th:nth-child(1),
td:nth-child(1) {
    width: 14%;
}

th:nth-child(2),
td:nth-child(2) {
    width: 27%;
}

th:nth-child(3),
td:nth-child(3) {
    width: 26%;
}

th:nth-child(4),
td:nth-child(4) {
    width: 23%;
}

th:nth-child(5),
td:nth-child(5) {
    width: 10%;
}

.order-cell {
    margin-bottom: 7px;
}

.order-number,
.product-title,
.variant-title {
    color: var(--text);
    font-weight: 700;
}

.product-title {
    overflow-wrap: anywhere;
}

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

.badge-stack.compact {
    gap: 5px;
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
}

.badge-yellow {
    background: var(--warning-bg);
    color: var(--warning);
}

.badge-orange {
    background: #ffeadb;
    color: #9a3412;
}

.badge-green {
    background: var(--success-bg);
    color: var(--success);
}

.badge-blue {
    background: var(--info-bg);
    color: var(--info);
}

.badge-gray,
.badge-neutral {
    background: #ebeceb;
    color: #4f5451;
}

.badge-purple {
    background: #efe7ff;
    color: #5b21b6;
}

.badge-red {
    background: var(--danger-bg);
    color: var(--danger);
}

.jersey-cell {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.jersey-cell img,
.thumb-empty {
    width: 64px;
    height: 64px;
    border: 1px solid var(--border);
    border-radius: 10px;
    object-fit: cover;
}

.thumbnail-link {
    display: inline-flex;
    width: 64px;
    height: 64px;
    border-radius: 10px;
    cursor: zoom-in;
}

.thumbnail-link:hover {
    text-decoration: none;
}

.thumb-empty {
    display: grid;
    place-items: center;
    background: var(--surface-muted);
    color: var(--muted);
    font-size: 11px;
    text-align: center;
}

.storefront-link {
    display: inline-flex;
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.detail-chips {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
}

.size-pill {
    border-radius: 999px;
    background: var(--surface-muted);
    color: var(--text);
    padding: 1px 7px;
    font-weight: 700;
}

.personalization-list {
    display: grid;
    gap: 3px;
    margin-top: 8px;
}

.personalization-row {
    display: grid;
    grid-template-columns: minmax(78px, max-content) minmax(0, 1fr);
    gap: 7px;
    align-items: baseline;
    font-size: 12px;
}

.personalization-row span {
    color: var(--muted);
}

.personalization-row strong {
    color: var(--text);
    font-weight: 700;
    overflow-wrap: anywhere;
}

.tracking-form {
    max-width: 360px;
}

.tracking-form input {
    min-width: 0;
    min-height: 38px;
}

.tracking-field-group {
    min-width: 0;
}

.tracking-helper {
    margin-top: 8px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}

.tracking-helper-fulfilled {
    color: var(--success);
    font-weight: 700;
}

.tracking-helper-cancelled {
    color: var(--danger);
    font-weight: 700;
}

.row-actions {
    display: grid;
    grid-template-columns: 70px 76px;
    gap: 8px;
    align-items: start;
    justify-content: end;
}

.tracking-save-button,
.row-actions .view-order {
    width: 100%;
    min-height: 38px;
}

td[data-label="Local Tracking"],
td[data-label="Actions"] {
    vertical-align: top;
}

td[data-label="Actions"],
th:last-child {
    width: 170px;
    text-align: right;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.empty-state {
    color: var(--muted);
    text-align: center;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    background: var(--surface);
}

.pagination-summary {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.pagination-button,
.pagination-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    min-height: 30px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    padding: 5px 9px;
    font-size: 13px;
    text-decoration: none;
}

.pagination-button:hover {
    background: var(--surface-muted);
    text-decoration: none;
}

.pagination-button.active {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
}

.pagination-ellipsis {
    border-color: transparent;
    color: var(--muted);
}

.modal-open {
    overflow: hidden;
}

.order-modal-overlay {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 28px;
    background: rgba(32, 34, 35, .58);
    z-index: 50;
}

.order-modal-overlay[hidden] {
    display: none;
}

.order-modal {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    width: min(90vw, 1500px);
    height: auto;
    max-height: 88vh;
    border-radius: 14px;
    background: var(--surface);
    box-shadow: 0 24px 70px rgba(0, 0, 0, .28);
    overflow: hidden;
}

.order-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    padding: 13px 16px;
}

.order-modal-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.order-modal-title-row h2 {
    margin: 0;
    font-size: 20px;
}

.modal-order-number {
    color: var(--muted);
    font-weight: 700;
}

.icon-button {
    width: 34px;
    height: 34px;
    border: 1px solid #babfc3;
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
}

.order-modal-body {
    min-height: 0;
    overflow: auto;
    padding: 16px;
}

.order-modal-grid {
    display: grid;
    grid-template-columns: minmax(0, 72%) minmax(260px, 28%);
    gap: 16px;
    align-items: start;
}

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

.order-modal-section {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    padding: 12px;
}

.order-modal-section h3 {
    margin: 0 0 9px;
    font-size: 13px;
    letter-spacing: 0;
}

.order-modal-section summary {
    color: var(--info);
    cursor: pointer;
    font-weight: 700;
}

.order-modal-aside {
    position: sticky;
    top: 0;
    display: grid;
    justify-items: start;
    gap: 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    padding: 12px;
}

.order-modal-image-link,
.order-modal-jersey-image,
.order-modal-image-empty {
    width: min(100%, 300px);
    max-width: 300px;
    height: min(320px, 34vh);
    max-height: 320px;
}

.order-modal-image-link {
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-muted);
    cursor: zoom-in;
}

.order-modal-image-link:hover {
    text-decoration: none;
}

.order-modal-jersey-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 12px;
}

.order-modal-image-empty {
    display: grid;
    place-items: center;
    color: var(--muted);
}

.order-modal-aside h3 {
    margin: 0;
    font-size: 15px;
    overflow-wrap: anywhere;
}

.modal-panel-muted {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.modal-panel-badges {
    margin-top: 2px;
}

.order-modal-definition-grid {
    display: grid;
    grid-template-columns: minmax(122px, .55fr) minmax(0, 1fr);
    gap: 6px 10px;
}

.order-modal-definition-grid dt {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.order-modal-definition-grid dd {
    margin: 0;
    color: var(--text);
    overflow-wrap: anywhere;
}

.copy-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px;
    align-items: start;
}

.copy-row code {
    color: #3f3f46;
    font-family: Consolas, Monaco, "Courier New", monospace;
    font-size: 11px;
    white-space: normal;
    overflow-wrap: anywhere;
}

.copy-button {
    min-height: 24px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--surface-muted);
    color: var(--text);
    font-size: 11px;
    padding: 3px 7px;
    cursor: pointer;
}

.login-shell {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 24px;
}

.login-card {
    width: min(440px, 100%);
    border-radius: 14px;
    padding: 34px;
    box-shadow: 0 18px 46px rgba(32, 34, 35, .1);
}

.login-brand {
    margin-bottom: 24px;
}

.brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    margin-bottom: 14px;
    place-items: center;
    border-radius: 12px;
    background: var(--primary);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0;
}

.login-card label {
    display: block;
}

.field {
    margin-top: 16px;
}

.eyebrow {
    margin: 0 0 5px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.login-copy {
    margin: 9px 0 0;
    color: var(--muted);
    line-height: 1.5;
}

.password-control {
    position: relative;
    display: block;
}

.password-control input {
    padding-right: 66px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 5px;
    min-width: 54px;
    min-height: 26px;
    border: 0;
    border-radius: 6px;
    background: var(--surface-muted);
    color: var(--text);
    cursor: pointer;
    transform: translateY(-50%);
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 16px;
    color: var(--text);
}

.checkbox-row input {
    width: 16px;
    min-height: 16px;
    margin: 0;
    accent-color: var(--primary);
}

.checkbox-row span {
    margin: 0;
    color: var(--text);
    font-size: 14px;
    font-weight: 400;
}

.security-note {
    margin: 18px 0 0;
    color: var(--muted);
    font-size: 12px;
    text-align: center;
}

@media (max-width: 1180px) {
    .topbar {
        grid-template-columns: 1fr;
    }

    .top-actions {
        justify-content: flex-start;
    }

    .top-actions form {
        flex: 0 1 auto;
    }

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

    .filter-search,
    .filter-actions {
        grid-column: span 3;
    }
}

@media (max-width: 900px) {
    .app-shell {
        padding: 16px;
    }

    .header-main {
        grid-template-columns: 1fr;
    }

    .header-title {
        min-height: auto;
    }

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

    th,
    td {
        padding: 10px;
    }

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

@media (max-width: 760px) {
    .pagination {
        align-items: stretch;
        flex-direction: column;
    }

    .topbar {
        padding: 14px;
    }

    .header-insights {
        grid-template-columns: 1fr;
    }

    .header-insight {
        min-height: auto;
    }

    .top-actions,
    .pagination-controls {
        width: 100%;
    }

    .top-actions .button,
    .top-actions form,
    .pagination-controls .pagination-button {
        flex: 1;
    }

    .top-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .summary-grid,
    .filters {
        grid-template-columns: 1fr;
    }

    .filter-search,
    .filter-actions {
        grid-column: auto;
    }

    .filter-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    thead {
        display: none;
    }

    table,
    tbody,
    tr,
    td {
        display: block;
        width: 100%;
    }

    tbody tr {
        border-bottom: 1px solid var(--border);
        padding: 12px 0;
        background: var(--surface);
    }

    td {
        border-bottom: 0;
        padding: 8px 14px;
    }

    td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 5px;
        color: var(--muted);
        font-size: 12px;
        font-weight: 700;
    }

    .jersey-cell {
        grid-template-columns: 58px minmax(0, 1fr);
    }

    .jersey-cell img,
    .thumb-empty,
    .thumbnail-link {
        width: 58px;
        height: 58px;
    }

    .tracking-form,
    .view-order,
    .row-actions {
        width: 100%;
    }

    .row-actions {
        grid-template-columns: 1fr 1fr;
        justify-content: stretch;
    }

    .tracking-save-button,
    .row-actions .view-order {
        width: 100%;
    }

    td[data-label="Actions"],
    th:last-child {
        width: auto;
        text-align: left;
    }

    .order-modal-overlay {
        padding: 10px;
    }

    .order-modal {
        width: calc(100vw - 16px);
        max-height: calc(100vh - 16px);
        border-radius: 12px;
    }

    .order-modal-grid,
    .order-modal-main {
        grid-template-columns: 1fr;
    }

    .order-modal-aside {
        position: static;
        order: -1;
    }

    .order-modal-definition-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .app-shell,
    .login-shell {
        padding: 14px;
    }

    .top-actions {
        grid-template-columns: 1fr;
    }

    .topbar h1,
    .login-card h1 {
        font-size: 26px;
    }

    .portal-brand {
        grid-template-columns: 42px minmax(0, 1fr);
        gap: 12px;
    }

    .portal-logo {
        width: 42px;
        height: 42px;
        border-radius: 12px;
        font-size: 12px;
    }

    .login-card {
        padding: 24px;
    }

    .summary-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .filter-actions {
        grid-template-columns: 1fr;
    }

    .row-actions {
        grid-template-columns: 1fr;
    }
}
