:root {
    --font-body: "Lato", sans-serif;
    --font-display: "Lato", sans-serif;
    --brand-orange: #c86f3d;
    --brand-orange-deep: #9f5630;
    --brand-charcoal: #1c1c1c;
    --brand-charcoal-soft: #2b2b2b;
    --brand-steel: #606060;
    --brand-soft: #f8f5ef;
    --brand-sand: #fffdf8;
    --brand-panel: #ffffff;
    --brand-line: rgba(28, 28, 28, 0.07);
    --brand-line-strong: rgba(28, 28, 28, 0.12);
    --brand-shadow: 0 18px 40px rgba(99, 71, 44, 0.08);
    --brand-shadow-soft: 0 12px 24px rgba(99, 71, 44, 0.05);
    --brand-red: #ed5258;
    --brand-green: #2f9e44;
    --brand-amber: #ff9f1a;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-body);
    color: var(--brand-charcoal);
    background:
        radial-gradient(circle at top right, rgba(28, 28, 28, 0.03), transparent 22rem),
        linear-gradient(180deg, #fcfcfb 0%, #f4f3f1 100%);
}

h1,
h2,
h3,
h4,
h5,
h6,
.badge,
.brand-badge,
.button,
.cta-link,
.logout-button,
.cta-button,
.cta-secondary {
    font-family: var(--font-display);
}

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

img {
    max-width: 100%;
    display: block;
}

code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-weight: 700;
}

.brand-badge,
.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(28, 28, 28, 0.06);
    color: var(--brand-charcoal-soft);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.panel {
    background: var(--brand-panel);
    border: 1px solid var(--brand-line);
    border-radius: 28px;
    box-shadow: var(--brand-shadow);
    padding: 24px;
}

.grid {
    display: grid;
    gap: 18px;
}

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

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

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

.stacked {
    display: grid;
    gap: 4px;
}

.checkbox-field {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid var(--brand-line);
    background: #ffffff;
    min-height: 52px;
    font-weight: 600;
}

.checkbox-field input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
}

.muted {
    color: var(--brand-steel);
    line-height: 1.6;
}

.stat-card {
    padding: 20px;
    border-radius: 24px;
    background: #ffffff;
    border: 1px solid var(--brand-line);
}

.stat-card .label {
    color: var(--brand-steel);
    font-size: 0.88rem;
    margin-bottom: 10px;
}

.stat-card strong {
    display: block;
    font-size: 2rem;
    line-height: 1;
    margin-bottom: 8px;
}

.stat-card span {
    color: var(--brand-steel);
    line-height: 1.55;
}

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

.section-title h2 {
    margin: 0;
    font-size: 1.22rem;
    letter-spacing: -0.03em;
}

.section-title p {
    margin: 6px 0 0;
    color: var(--brand-steel);
    line-height: 1.55;
}

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.toolbar .summary {
    color: var(--brand-steel);
    line-height: 1.55;
}

.pill {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
}

.pill.success {
    background: rgba(47, 158, 68, 0.12);
    color: var(--brand-green);
}

.pill.warning {
    background: rgba(255, 159, 26, 0.12);
    color: var(--brand-amber);
}

.pill.danger {
    background: rgba(237, 82, 88, 0.12);
    color: var(--brand-red);
}

.pill.neutral {
    background: rgba(28, 28, 28, 0.08);
    color: var(--brand-steel);
}

.flash {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(47, 158, 68, 0.12);
    color: var(--brand-green);
    border: 1px solid rgba(47, 158, 68, 0.16);
}

.error-box,
.error-list {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(237, 82, 88, 0.12);
    color: var(--brand-red);
    border: 1px solid rgba(237, 82, 88, 0.16);
    line-height: 1.6;
}

.error-list ul {
    margin: 10px 0 0;
    padding-left: 20px;
}

.empty {
    padding: 18px;
    border-radius: 20px;
    background: rgba(28, 28, 28, 0.03);
    color: var(--brand-steel);
}

.panel-subtle {
    border-radius: 24px;
    background: #ffffff;
    box-shadow: none;
}

.choice-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    cursor: pointer;
}

.choice-card input {
    margin-top: 4px;
}

.choice-card span {
    display: grid;
    gap: 3px;
}

.choice-card small {
    color: var(--brand-steel);
}

.inline-location-form,
.inline-receipt-panel .filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: end;
}

.inline-location-form input {
    min-width: 92px;
    max-width: 140px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
}

.ops-form-shell .grid,
.panel .grid {
    min-width: 0;
}

.ops-form-shell .field,
.panel .field {
    min-width: 0;
}

.button,
.cta-link,
.logout-button,
.cta-button,
.cta-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 16px;
    border: 0;
    border-radius: 16px;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.button:hover,
.cta-link:hover,
.logout-button:hover,
.cta-button:hover,
.cta-secondary:hover {
    transform: translateY(-1px);
}

.button,
.cta-link,
.cta-button {
    background: var(--brand-charcoal);
    color: #fff;
    box-shadow: 0 12px 24px rgba(28, 28, 28, 0.14);
}

.button.secondary,
.logout-button {
    background: #ffffff;
    color: var(--brand-charcoal);
    border: 1px solid var(--brand-line-strong);
    box-shadow: none;
}

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

.filter-bar {
    display: flex;
    align-items: end;
    gap: 14px;
    flex-wrap: wrap;
    width: 100%;
}

.import-bar {
    display: flex;
    align-items: end;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

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

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

th,
td {
    text-align: left;
    padding: 14px 12px;
    border-bottom: 1px solid rgba(28, 28, 28, 0.08);
    vertical-align: top;
}

th {
    color: var(--brand-steel);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

tbody tr:last-child td {
    border-bottom: 0;
}

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

.field label {
    display: inline-flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.3;
    white-space: normal;
}

.field-required-marker {
    display: inline;
    color: #dc2626;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.field-optional-marker {
    display: inline;
    color: var(--brand-steel);
    font-size: 0.76rem;
    font-weight: 600;
    margin-left: 6px;
    text-transform: none;
    letter-spacing: 0;
    white-space: nowrap;
}

.field label > span[aria-hidden="true"] {
    display: inline;
    color: #dc2626;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    border: 1px solid var(--brand-line);
    border-radius: 16px;
    padding: 13px 14px;
    font: inherit;
    background: #fffdfa;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: 2px solid rgba(249, 99, 2, 0.18);
    border-color: rgba(249, 99, 2, 0.28);
}

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

.tw-native-select-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.tw-select {
    position: relative;
    width: 100%;
}

.tw-select-button {
    width: 100%;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 1px solid var(--brand-line);
    border-radius: 16px;
    padding: 13px 42px 13px 14px;
    background: #fffdfa;
    color: var(--brand-charcoal);
    font: inherit;
    text-align: left;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tw-select-button::after {
    content: "";
    position: absolute;
    right: 16px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--brand-steel);
    border-bottom: 2px solid var(--brand-steel);
    transform: translateY(-65%) rotate(45deg);
    transition: transform 0.16s ease;
}

.tw-select.is-open .tw-select-button {
    outline: 2px solid rgba(249, 99, 2, 0.18);
    border-color: rgba(249, 99, 2, 0.28);
}

.tw-select.is-open .tw-select-button::after {
    transform: translateY(-35%) rotate(225deg);
}

.tw-select-panel {
    display: none;
    position: absolute;
    z-index: 80;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    padding: 10px;
    border: 1px solid var(--brand-line-strong);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 18px 40px rgba(28, 28, 28, 0.12);
}

.tw-select.is-open-up .tw-select-panel {
    top: auto;
    bottom: calc(100% + 8px);
}

.tw-select.is-open .tw-select-panel {
    display: block;
}

.tw-select-search {
    width: 100%;
    border: 1px solid var(--brand-line);
    border-radius: 12px;
    padding: 10px 12px;
    font: inherit;
    margin-bottom: 8px;
    background: #fbfaf8;
}

.tw-select-search:focus {
    outline: 2px solid rgba(249, 99, 2, 0.16);
    border-color: rgba(249, 99, 2, 0.28);
}

.tw-select-options {
    max-height: var(--tw-select-options-max-height, 260px);
    overflow-y: auto;
    display: grid;
    gap: 4px;
    overscroll-behavior: contain;
}

.tw-select-option {
    width: 100%;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--brand-charcoal);
    cursor: pointer;
    font: inherit;
    padding: 10px 12px;
    text-align: left;
}

.tw-select-option:hover,
.tw-select-option[aria-selected="true"] {
    background: rgba(28, 28, 28, 0.06);
}

.tw-select-empty {
    padding: 12px;
    color: var(--brand-steel);
    font-size: 0.9rem;
}

.helper {
    color: var(--brand-steel);
    line-height: 1.5;
}

.inline-helper {
    display: flex;
    align-items: center;
    min-height: 52px;
    padding: 13px 14px;
    border-radius: 16px;
    background: rgba(249, 99, 2, 0.06);
}

.password-control {
    position: relative;
}

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

.password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    border: 0;
    border-radius: 12px;
    padding: 9px 12px;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    background: rgba(28, 28, 28, 0.08);
    color: var(--brand-charcoal);
    cursor: pointer;
}

.media-preview {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 18px;
    background: rgba(28, 28, 28, 0.03);
}

.media-preview img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border-radius: 14px;
    background: #fff;
    padding: 8px;
    border: 1px solid var(--brand-line);
}

.code-block {
    margin: 10px 0 0;
    padding: 14px;
    border-radius: 16px;
    background: rgba(28, 28, 28, 0.05);
    color: var(--brand-charcoal);
    overflow: auto;
    white-space: pre-wrap;
    font-size: 0.85rem;
}

.table-input {
    width: 100%;
    min-width: 110px;
    border: 1px solid var(--brand-line);
    border-radius: 14px;
    padding: 10px 12px;
    font: inherit;
    background: #fff;
}

.table-input:focus {
    outline: 2px solid rgba(249, 99, 2, 0.18);
    border-color: rgba(249, 99, 2, 0.28);
}

.theme-admin .admin-shell {
    display: grid;
    grid-template-columns: 308px minmax(0, 1fr);
    min-height: 100vh;
}

.theme-admin .sidebar {
    background: #f7f7f5;
    color: var(--brand-charcoal);
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 24px 20px;
    position: sticky;
    top: 0;
    height: 100vh;
    border-right: 1px solid var(--brand-line);
    overflow-y: auto;
}

.theme-admin .brand-lockup {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--brand-line);
    box-shadow: var(--brand-shadow-soft);
}

.theme-admin .brand-lockup img {
    width: 146px;
}

.theme-admin .brand-kicker {
    color: var(--brand-steel);
    font-size: 0.88rem;
    line-height: 1.55;
}

.theme-admin .nav-group {
    display: grid;
    gap: 12px;
}

.theme-admin .nav-section {
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--brand-line);
    box-shadow: var(--brand-shadow-soft);
    overflow: hidden;
}

.theme-admin .nav-section summary {
    list-style: none;
}

.theme-admin .nav-section summary::-webkit-details-marker {
    display: none;
}

.theme-admin .nav-section-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    cursor: pointer;
}

.theme-admin .nav-section-copy {
    display: grid;
    gap: 3px;
}

.theme-admin .nav-section-copy strong {
    font-size: 0.95rem;
}

.theme-admin .nav-section-copy small {
    color: var(--brand-steel);
    font-size: 0.76rem;
    line-height: 1.45;
}

.theme-admin .nav-section-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(249, 99, 2, 0.1);
    color: var(--brand-orange-deep);
    font-size: 0.82rem;
    font-weight: 800;
}

.theme-admin .nav-section[open] .nav-section-count {
    background: var(--brand-orange);
    color: #fff;
}

.theme-admin .nav-section-links {
    display: grid;
    gap: 8px;
    padding: 0 12px 12px;
}

.theme-admin .nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 14px;
    border-radius: 18px;
    color: var(--brand-steel);
    transition: 0.2s ease;
    border: 1px solid transparent;
    background: #ffffff;
}

.theme-admin .nav-link:hover,
.theme-admin .nav-link.is-active {
    background: rgba(249, 99, 2, 0.12);
    color: var(--brand-orange-deep);
    border-color: rgba(249, 99, 2, 0.22);
    box-shadow: 0 10px 18px rgba(249, 99, 2, 0.08);
}

.theme-admin .nav-link-copy {
    display: grid;
    gap: 3px;
}

.theme-admin .nav-link-copy strong {
    font-size: 0.94rem;
}

.theme-admin .nav-link small {
    color: rgba(96, 96, 96, 0.8);
    font-size: 0.76rem;
    letter-spacing: 0.02em;
}

.theme-admin .nav-link-arrow {
    font-size: 1.2rem;
    line-height: 1;
    opacity: 0.45;
}

.theme-admin .sidebar-footer {
    margin-top: auto;
    display: grid;
    gap: 10px;
    padding: 18px;
    border-radius: 24px;
    background: #ffffff;
    font-size: 0.9rem;
    color: var(--brand-steel);
    line-height: 1.65;
    border: 1px solid rgba(249, 99, 2, 0.12);
}

.theme-admin .sidebar-footer strong {
    color: var(--brand-charcoal);
    display: block;
}

.theme-admin .sidebar-footer code {
    color: var(--brand-charcoal);
}

.theme-admin .sidebar-inline-link {
    color: var(--brand-orange-deep);
    font-weight: 700;
}

.theme-admin .logout-button {
    width: 100%;
    margin-top: 0;
    background: rgba(28, 28, 28, 0.08);
    color: var(--brand-charcoal);
}

.theme-admin .content {
    padding: 24px 24px 32px;
}

.theme-admin .topbar,
.theme-portal .topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.theme-admin .headline h1 {
    margin: 0;
    font-size: clamp(1.7rem, 2.8vw, 2.45rem);
    letter-spacing: -0.04em;
    line-height: 1.02;
}

.theme-admin .headline p {
    margin: 6px 0 0;
    color: var(--brand-steel);
    line-height: 1.55;
    font-size: 0.98rem;
    max-width: 48rem;
}

.theme-admin .topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.theme-admin .topbar-utility {
    display: grid;
    gap: 1px;
    min-width: 124px;
    padding: 10px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--brand-line);
    box-shadow: var(--brand-shadow-soft);
}

.theme-admin .topbar-utility-label {
    color: var(--brand-steel);
    font-size: 0.76rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.theme-admin .topbar-utility strong {
    font-size: 0.96rem;
}

.theme-admin .topbar-utility small {
    color: var(--brand-steel);
    font-size: 0.8rem;
}

.theme-admin .topbar-link-card {
    color: inherit;
    text-decoration: none;
}

.theme-admin .topbar-card,
.theme-portal .userbox {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 18px;
    background: var(--brand-panel);
    border: 1px solid var(--brand-line);
    box-shadow: var(--brand-shadow-soft);
}

.theme-admin .topbar-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 13px;
    background: linear-gradient(135deg, rgba(249, 99, 2, 0.16) 0%, rgba(255, 180, 95, 0.42) 100%);
    color: var(--brand-orange-deep);
    font-size: 0.92rem;
    font-weight: 900;
}

.theme-admin .topbar-card .meta,
.theme-portal .userbox .meta {
    display: grid;
    gap: 2px;
}

.theme-admin .topbar-card .meta strong,
.theme-portal .userbox strong {
    font-size: 0.92rem;
}

.theme-admin .topbar-card .meta span,
.theme-portal .userbox span {
    color: var(--brand-steel);
    font-size: 0.8rem;
}

.theme-admin .topbar-password-link,
.theme-admin .topbar-signout-link {
    align-self: stretch;
    min-height: 56px;
}

.dashboard-shell {
    display: grid;
    gap: 22px;
}

.admin-dashboard-shell .panel {
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.05);
}

.admin-dashboard-shell .chart-panel,
.admin-dashboard-shell .list-table-card,
.admin-dashboard-shell .customer-order-snapshot {
    border-radius: 26px;
    background: linear-gradient(180deg, #ffffff 0%, #fcfcfb 100%);
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.05);
    position: relative;
    overflow: hidden;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.admin-dashboard-shell .chart-panel::before,
.admin-dashboard-shell .list-table-card::before,
.admin-dashboard-shell .customer-order-snapshot::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(17, 24, 39, 0.08) 0%, rgba(249, 115, 22, 0.2) 48%, rgba(17, 24, 39, 0.08) 100%);
    pointer-events: none;
}

.admin-dashboard-shell .chart-panel:hover,
.admin-dashboard-shell .list-table-card:hover,
.admin-dashboard-shell .customer-order-snapshot:hover,
.admin-dashboard-shell .admin-stat-card:hover,
.admin-overview-panel:hover,
.admin-filter-panel:hover,
.admin-spotlight-panel:hover {
    transform: translateY(-1px);
    box-shadow: 0 22px 42px rgba(15, 23, 42, 0.07);
}

.admin-dashboard-shell .section-title {
    margin-bottom: 14px;
}

.admin-dashboard-shell .section-title h2 {
    font-size: 1.08rem;
    letter-spacing: -0.03em;
}

.admin-dashboard-shell .section-title p {
    font-size: 0.88rem;
    line-height: 1.5;
}

.admin-dashboard-shell .chart-canvas-wrap {
    min-height: 290px;
    padding-top: 4px;
}

.admin-dashboard-shell .chart-canvas-wrap.compact {
    min-height: 240px;
}

.admin-dashboard-shell .customer-kpi-grid {
    gap: 18px;
}

.admin-dashboard-shell .stat-card .label {
    font-size: 0.76rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.admin-dashboard-shell .stat-card strong {
    font-size: clamp(1.9rem, 2vw, 2.35rem);
    letter-spacing: -0.05em;
}

.admin-dashboard-shell .stat-card span {
    font-size: 0.9rem;
    line-height: 1.5;
}

.admin-overview-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.85fr);
    gap: 18px;
    align-items: stretch;
}

.admin-overview-grid-analytics {
    grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.9fr);
}

.admin-overview-panel,
.admin-filter-panel,
.admin-spotlight-panel {
    border-radius: 28px;
    border: 1px solid var(--brand-line);
    background: linear-gradient(180deg, #ffffff 0%, #fcfcfb 100%);
    box-shadow: var(--brand-shadow-soft);
    position: relative;
    overflow: hidden;
}

.admin-overview-panel::before,
.admin-filter-panel::before,
.admin-spotlight-panel::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(17, 24, 39, 0.08) 0%, rgba(249, 115, 22, 0.2) 48%, rgba(17, 24, 39, 0.08) 100%);
    pointer-events: none;
}

.admin-overview-panel {
    display: grid;
    gap: 18px;
    align-content: space-between;
    min-height: 180px;
}

.admin-overview-panel-analytics {
    min-height: 210px;
}

.admin-overview-copy {
    display: grid;
    gap: 10px;
    max-width: 44rem;
}

.admin-overview-copy h2 {
    margin: 0;
    font-size: clamp(1.65rem, 2.4vw, 2.35rem);
    letter-spacing: -0.05em;
    line-height: 0.98;
}

.admin-overview-copy p {
    margin: 0;
    max-width: 38rem;
    color: var(--brand-steel);
    line-height: 1.6;
}

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

.admin-overview-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-spotlight-panel,
.admin-filter-panel {
    display: grid;
    gap: 14px;
    align-content: start;
}

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

.admin-spotlight-card,
.admin-mini-kpi {
    padding: 15px 16px;
    border-radius: 18px;
    border: 1px solid var(--brand-line);
    background: linear-gradient(180deg, #ffffff 0%, #fbfbfb 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.admin-spotlight-card span,
.admin-mini-kpi span {
    display: block;
    color: var(--brand-steel);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.admin-spotlight-card strong,
.admin-mini-kpi strong {
    display: block;
    margin-top: 10px;
    font-size: 1.45rem;
    line-height: 1;
}

.admin-spotlight-card small {
    display: block;
    margin-top: 8px;
    color: var(--brand-steel);
    line-height: 1.45;
}

.admin-kpi-grid {
    gap: 16px;
}

.admin-stat-card {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid var(--brand-line);
    background: linear-gradient(180deg, #ffffff 0%, #fbfbfa 100%);
    box-shadow: var(--brand-shadow-soft);
    padding: 22px 22px 20px;
}

.admin-stat-card::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 4px;
    background: rgba(17, 24, 39, 0.08);
}

.admin-stat-card-accent::before {
    background: linear-gradient(90deg, #111827 0%, #f97316 100%);
}

.admin-pulse-panel {
    background:
        radial-gradient(circle at top right, rgba(249, 115, 22, 0.08), transparent 30%),
        linear-gradient(180deg, #ffffff 0%, #fcfbfa 100%);
}

.admin-mini-kpi-grid {
    gap: 10px;
}

.dashboard-hero,
.dashboard-main,
.dashboard-secondary {
    display: grid;
    gap: 20px;
}

.dashboard-hero {
    grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.8fr);
    align-items: stretch;
}

.dashboard-main {
    grid-template-columns: minmax(0, 1.38fr) minmax(300px, 0.82fr);
    align-items: start;
}

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

.dashboard-column {
    display: grid;
    gap: 20px;
}

.dashboard-lead {
    position: relative;
    overflow: hidden;
    padding: 28px;
    border-radius: 32px;
    background: #ffffff;
    border: 1px solid var(--brand-line);
    box-shadow: var(--brand-shadow);
}

.dashboard-lead::after {
    display: none;
}

.dashboard-lead-top,
.dashboard-actions,
.metric-strip,
.pulse-list,
.mini-kpi-grid,
.product-card-grid,
.progress-list,
.warehouse-list,
.activity-stream {
    position: relative;
    z-index: 1;
}

.dashboard-lead-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.dashboard-date-chip {
    display: inline-flex;
    align-items: center;
    padding: 9px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(249, 99, 2, 0.12);
    color: var(--brand-charcoal-soft);
    font-size: 0.84rem;
    font-weight: 700;
}

.dashboard-copy h2 {
    margin: 0;
    max-width: 14ch;
    font-size: clamp(2rem, 4vw, 3.2rem);
    letter-spacing: -0.06em;
    line-height: 0.95;
}

.dashboard-copy p {
    max-width: 44rem;
    margin: 14px 0 0;
    color: var(--brand-steel);
    font-size: 1rem;
    line-height: 1.75;
}

.dashboard-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 22px;
}

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

.metric-tile {
    padding: 18px;
    border-radius: 24px;
    background: #fafafa;
    border: 1px solid var(--brand-line);
    box-shadow: var(--brand-shadow-soft);
}

.metric-tile span,
.pulse-item span,
.mini-kpi span,
.product-card-meta span {
    display: block;
    color: var(--brand-steel);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.metric-tile strong,
.pulse-item strong,
.mini-kpi strong {
    display: block;
    margin-top: 10px;
    font-size: 1.8rem;
    line-height: 1;
}

.metric-tile small,
.pulse-item small {
    display: block;
    margin-top: 8px;
    color: var(--brand-steel);
    line-height: 1.55;
}

.dashboard-aside {
    display: grid;
    gap: 16px;
    align-content: start;
}

.section-title.compact {
    margin-bottom: 6px;
}

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

.pulse-item,
.dashboard-note,
.mini-kpi,
.product-card,
.warehouse-item {
    padding: 16px 18px;
    border-radius: 22px;
    background: #ffffff;
    border: 1px solid var(--brand-line);
}

.dashboard-note p {
    margin: 8px 0 0;
    color: var(--brand-steel);
    line-height: 1.65;
}

.admin-dashboard-shell .toolbar {
    margin-bottom: 0;
}

.admin-dashboard-shell .toolbar .badge {
    background: rgba(17, 24, 39, 0.05);
    color: #111827;
}

.admin-dashboard-shell .clean-table thead th {
    background: #fafaf9;
    font-size: 0.76rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--brand-steel);
    border-bottom: 1px solid var(--brand-line);
}

.admin-dashboard-shell .clean-table tbody td {
    vertical-align: middle;
}

.admin-dashboard-shell .clean-table tbody tr + tr td {
    border-top: 1px solid rgba(15, 23, 42, 0.05);
}

.admin-dashboard-shell .dashboard-note,
.admin-dashboard-shell .admin-mini-kpi,
.admin-dashboard-shell .admin-spotlight-card {
    border-color: rgba(15, 23, 42, 0.06);
}

.dashboard-card {
    padding: 24px;
}

.progress-list,
.warehouse-list,
.activity-stream {
    display: grid;
    gap: 14px;
}

.progress-row,
.activity-item {
    display: grid;
    gap: 10px;
}

.progress-copy,
.warehouse-copy,
.activity-copy {
    display: grid;
    gap: 4px;
}

.progress-copy span,
.warehouse-copy span,
.activity-copy span,
.product-card-text {
    color: var(--brand-steel);
    line-height: 1.6;
}

.progress-track {
    overflow: hidden;
    height: 11px;
    border-radius: 999px;
    background: rgba(28, 28, 28, 0.07);
}

.progress-track.subtle {
    height: 10px;
}

.progress-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--brand-charcoal);
}

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

.product-card {
    display: grid;
    gap: 14px;
}

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

.product-card-meta strong {
    display: block;
    margin-top: 6px;
    font-size: 1rem;
}

.product-card-text {
    margin: 0;
}

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

.mini-kpi strong {
    font-size: 1.2rem;
}

.activity-item {
    grid-template-columns: 12px minmax(0, 1fr);
    align-items: start;
}

.activity-marker {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-top: 5px;
    background: rgba(249, 99, 2, 0.26);
    box-shadow: 0 0 0 5px rgba(249, 99, 2, 0.08);
}

.activity-marker.success {
    background: rgba(47, 158, 68, 0.8);
    box-shadow: 0 0 0 5px rgba(47, 158, 68, 0.08);
}

.activity-marker.warning {
    background: rgba(255, 159, 26, 0.9);
    box-shadow: 0 0 0 5px rgba(255, 159, 26, 0.08);
}

.activity-marker.neutral {
    background: rgba(96, 96, 96, 0.64);
    box-shadow: 0 0 0 5px rgba(96, 96, 96, 0.08);
}

.notification-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 20px;
    border-radius: 24px;
    background: #ffffff;
    border: 1px solid var(--brand-line);
    box-shadow: var(--brand-shadow-soft);
}

.list-table-card {
    overflow: hidden;
    border: 1px solid var(--brand-line);
    border-radius: 24px;
    background: #ffffff;
}

.clean-table th,
.clean-table td {
    padding: 16px 18px;
}

.clean-table tbody tr {
    transition: background 0.16s ease;
}

.clean-table tbody tr:hover {
    background: rgba(28, 28, 28, 0.025);
}

.table-row-link {
    cursor: pointer;
}

.table-row-link:focus-visible {
    outline: 2px solid rgba(200, 111, 61, 0.35);
    outline-offset: -2px;
}

.inv-product-card.table-row-link {
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.inv-product-card.table-row-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.07);
}

.notification-card.is-read {
    opacity: 0.85;
}

.invoice-sheet {
    margin: 24px 0;
}

.theme-portal .shell,
.theme-landing .page-shell,
.theme-auth .shell,
.theme-auth-admin .login-shell {
    width: min(1220px, calc(100% - 28px));
    margin: 0 auto;
}

.theme-portal .shell {
    padding: 24px 0 36px;
}

.theme-portal .portal-shell-grid {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

.theme-portal .portal-sidebar {
    position: sticky;
    top: 20px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.theme-portal .portal-main {
    min-width: 0;
}

.theme-portal .brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.theme-portal .brand-lockup {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--brand-line);
    box-shadow: var(--brand-shadow-soft);
}

.theme-portal .brand-lockup img {
    width: 144px;
}

.theme-portal .brand-kicker {
    color: var(--brand-steel);
    line-height: 1.6;
    font-size: 0.9rem;
}

.theme-portal .brand img {
    width: 138px;
}

.theme-portal .brand-copy {
    color: var(--brand-steel);
    line-height: 1.55;
    max-width: 34rem;
}

.theme-portal .nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.theme-portal .portal-side-nav {
    display: grid;
    gap: 10px;
    margin-bottom: 0;
}

.theme-portal .nav a {
    display: inline-flex;
    align-items: center;
    padding: 12px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--brand-line);
    box-shadow: var(--brand-shadow-soft);
    color: var(--brand-steel);
    font-weight: 700;
}

.theme-portal .portal-side-nav a {
    justify-content: flex-start;
    border-radius: 20px;
    padding: 14px 16px;
}

.theme-portal .portal-side-nav .nav-link-copy {
    display: grid;
    gap: 4px;
}

.theme-portal .portal-side-nav .nav-link-copy strong {
    font-size: 0.95rem;
}

.theme-portal .portal-side-nav .nav-link-copy small {
    color: var(--brand-steel);
    font-size: 0.76rem;
    line-height: 1.5;
    font-weight: 400;
}

.theme-portal .nav a.active {
    background: rgba(249, 99, 2, 0.12);
    color: var(--brand-orange);
    border-color: rgba(249, 99, 2, 0.2);
}

.theme-portal .hero,
.theme-landing .hero-panel,
.theme-auth .hero,
.theme-auth-admin .brand-panel {
    position: relative;
    color: #fff;
    overflow: hidden;
    background: linear-gradient(135deg, #f96302 0%, #ff8734 46%, #ffb13c 100%);
    box-shadow: var(--brand-shadow);
}

.theme-portal .hero {
    border-radius: 28px;
    padding: 28px;
    margin-bottom: 18px;
}

.theme-portal .hero::after,
.theme-landing .hero-panel::after,
.theme-auth .hero::after,
.theme-auth-admin .brand-panel::after {
    content: "";
    position: absolute;
    right: -44px;
    bottom: -52px;
    width: 230px;
    height: 230px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
}

.theme-portal .hero h1,
.theme-auth-admin .brand-panel h1,
.theme-auth .hero h1,
.theme-landing h1 {
    margin: 0;
    letter-spacing: -0.05em;
    line-height: 0.95;
}

.theme-portal .hero h1 {
    font-size: clamp(2rem, 3vw, 3rem);
}

.theme-portal .hero p,
.theme-auth-admin .brand-panel p,
.theme-auth .hero p,
.theme-landing .hero-copy {
    margin: 10px 0 0;
    color: rgba(255, 255, 255, 0.92);
    line-height: 1.7;
}

.theme-portal .headline h1 {
    margin: 0;
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    letter-spacing: -0.04em;
}

.theme-portal .headline p {
    margin: 8px 0 0;
    color: var(--brand-steel);
    line-height: 1.6;
    max-width: 52rem;
}

.theme-portal .sidebar-footer {
    display: grid;
    gap: 8px;
    padding: 18px;
    border-radius: 24px;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    color: var(--brand-steel);
}

.theme-portal .sidebar-footer strong {
    color: var(--brand-charcoal);
}

.theme-portal.theme-customer .shell {
    width: min(1460px, calc(100% - 32px));
}

.theme-portal.theme-customer .portal-shell-grid {
    grid-template-columns: 290px minmax(0, 1fr);
    gap: 28px;
}

.theme-portal.theme-customer .portal-sidebar {
    gap: 20px;
}

.theme-portal.theme-customer .brand-lockup,
.theme-portal.theme-customer .nav a,
.theme-portal.theme-customer .sidebar-footer {
    background: #ffffff;
}

.theme-portal.theme-customer .nav a.active {
    background: rgba(17, 24, 39, 0.05);
    color: var(--brand-charcoal);
    border-color: rgba(17, 24, 39, 0.08);
}

.theme-portal.theme-customer .portal-main {
    display: grid;
    gap: 24px;
}

.theme-portal.theme-customer .topbar {
    padding: 6px 4px 0;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--brand-steel);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.customer-dashboard-shell,
.customer-orders-shell {
    gap: 24px;
}

.customer-dashboard-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    padding: 30px 32px;
    border-radius: 30px;
    background: #ffffff;
    border: 1px solid var(--brand-line);
    box-shadow: var(--brand-shadow-soft);
}

.customer-dashboard-copy {
    display: grid;
    gap: 12px;
    max-width: 56rem;
}

.customer-dashboard-copy h2 {
    margin: 0;
    font-size: clamp(2rem, 3vw, 3.1rem);
    letter-spacing: -0.05em;
    line-height: 0.96;
}

.customer-dashboard-copy p {
    margin: 0;
    color: var(--brand-steel);
    line-height: 1.75;
    font-size: 1rem;
}

.customer-dashboard-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.customer-home-shell {
    display: grid;
    gap: 24px;
}

.customer-home-slider {
    position: relative;
    overflow: hidden;
    padding: 0;
}

.customer-home-slider-track {
    position: relative;
    min-height: 360px;
}

.customer-home-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-content: center;
    padding: 36px;
    opacity: 0;
    pointer-events: none;
    transform: translateX(30px);
    transition: opacity 0.45s ease, transform 0.45s ease;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.customer-home-slide.is-active {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

.customer-home-slide-primary {
    background:
        radial-gradient(circle at top right, rgba(249, 115, 22, 0.18), transparent 28%),
        linear-gradient(120deg, #fff7ed 0%, #ffffff 55%, #fff 100%);
}

.customer-home-slide-neutral {
    background:
        radial-gradient(circle at top right, rgba(17, 24, 39, 0.10), transparent 30%),
        linear-gradient(120deg, #f8fafc 0%, #ffffff 60%, #fff 100%);
}

.customer-home-slide-accent {
    background:
        radial-gradient(circle at top right, rgba(245, 158, 11, 0.12), transparent 28%),
        linear-gradient(120deg, #ffffff 0%, #fffaf0 58%, #fff 100%);
}

.customer-home-slide-copy {
    display: grid;
    gap: 12px;
    max-width: 760px;
}

.customer-home-slide-copy h2 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.25rem);
    line-height: 1;
    letter-spacing: -0.06em;
}

.customer-home-slide-copy p {
    margin: 0;
    color: var(--brand-steel);
    line-height: 1.75;
    font-size: 1rem;
}

.customer-home-slide-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.customer-home-slider-dots {
    position: absolute;
    left: 36px;
    bottom: 24px;
    display: flex;
    gap: 8px;
    z-index: 2;
}

.customer-home-slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    border: 0;
    background: rgba(17, 24, 39, 0.18);
    cursor: pointer;
}

.customer-home-slider-dot.is-active {
    background: var(--brand-charcoal);
}

.home-banner-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.home-banner-card {
    display: grid;
    gap: 16px;
    min-height: 220px;
    padding: 28px;
    border-radius: 28px;
    border: 1px solid var(--brand-line);
    box-shadow: var(--brand-shadow-soft);
    background: linear-gradient(180deg, #ffffff 0%, #fbfbfb 100%);
}

.home-banner-card-large {
    min-height: 260px;
}

.home-banner-primary {
    background:
        radial-gradient(circle at top right, rgba(249, 115, 22, 0.12), transparent 38%),
        linear-gradient(180deg, #ffffff 0%, #fff8f3 100%);
}

.home-banner-accent {
    background:
        radial-gradient(circle at top right, rgba(17, 24, 39, 0.08), transparent 42%),
        linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.home-banner-copy {
    display: grid;
    gap: 10px;
    align-content: start;
}

.home-banner-copy h2 {
    margin: 0;
    font-size: clamp(1.4rem, 2.4vw, 2.3rem);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.home-banner-copy p {
    margin: 0;
    color: var(--brand-steel);
    line-height: 1.7;
}

.home-banner-actions {
    margin-top: auto;
}

.home-category-panel {
    display: grid;
    gap: 18px;
}

.home-brand-panel,
.customer-home-product-row {
    display: grid;
    gap: 18px;
}

.home-category-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.home-category-card {
    display: grid;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    padding: 16px;
    border-radius: 24px;
    border: 1px solid var(--brand-line);
    background: #fff;
    box-shadow: var(--brand-shadow-soft);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.home-category-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08);
}

.home-category-thumb {
    aspect-ratio: 1.15 / 1;
    border-radius: 18px;
    overflow: hidden;
    background: #f8fafc;
    border: 1px solid var(--brand-line);
}

.home-category-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.home-category-copy {
    display: grid;
    gap: 5px;
}

.home-category-copy strong {
    font-size: 0.98rem;
    line-height: 1.35;
}

.home-category-copy span,
.home-category-copy small {
    color: var(--brand-steel);
    line-height: 1.5;
}

.home-brand-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
}

.home-brand-card {
    display: grid;
    justify-items: center;
    gap: 10px;
    padding: 18px 14px;
    border-radius: 24px;
    border: 1px solid var(--brand-line);
    background: #fff;
    box-shadow: var(--brand-shadow-soft);
    text-decoration: none;
    color: inherit;
    text-align: center;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.home-brand-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08);
}

.home-brand-logo {
    width: 84px;
    height: 84px;
    border-radius: 22px;
    background: #f8fafc;
    border: 1px solid var(--brand-line);
    display: grid;
    place-items: center;
    overflow: hidden;
}

.home-brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff;
}

.home-brand-logo span {
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--brand-charcoal);
}

.home-brand-card strong {
    font-size: 0.94rem;
    line-height: 1.3;
}

.home-brand-card small {
    color: var(--brand-steel);
}

.home-product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.home-product-card {
    display: grid;
    gap: 12px;
    padding: 16px;
    border-radius: 24px;
    border: 1px solid var(--brand-line);
    background: #fff;
    box-shadow: var(--brand-shadow-soft);
    text-decoration: none;
    color: inherit;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.home-product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08);
}

.home-product-thumb {
    aspect-ratio: 1.1 / 1;
    border-radius: 18px;
    overflow: hidden;
    background: #f8fafc;
    border: 1px solid var(--brand-line);
}

.home-product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.home-product-copy {
    display: grid;
    gap: 5px;
}

.home-product-copy strong {
    font-size: 0.96rem;
    line-height: 1.4;
}

.home-product-copy span,
.home-product-copy small {
    color: var(--brand-steel);
    line-height: 1.5;
}

.customer-kpi-grid,
.customer-orders-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.customer-stat-card {
    min-height: 160px;
}

.customer-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(330px, 0.8fr);
    gap: 24px;
    align-items: start;
}

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

.procurement-feature-grid,
.procurement-highlight-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    align-items: start;
}

.procurement-feature-panel,
.procurement-highlight-panel {
    display: grid;
    gap: 18px;
}

.procurement-feature-list,
.brand-radar-list {
    display: grid;
    gap: 12px;
}

.procurement-feature-item,
.procurement-mini-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 15px 16px;
    border-radius: 20px;
    text-decoration: none;
    color: inherit;
    background: #fbfbfb;
    border: 1px solid var(--brand-line);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.procurement-feature-item:hover,
.procurement-mini-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.06);
}

.procurement-feature-copy,
.procurement-feature-metrics,
.brand-radar-copy,
.brand-radar-metrics {
    display: grid;
    gap: 4px;
}

.procurement-feature-copy span,
.procurement-feature-metrics span,
.procurement-feature-metrics small,
.brand-radar-copy span,
.brand-radar-metrics span,
.brand-radar-metrics small {
    color: var(--brand-steel);
}

.procurement-feature-metrics,
.brand-radar-metrics {
    text-align: right;
    flex-shrink: 0;
}

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

.procurement-mini-card {
    justify-content: flex-start;
}

.procurement-mini-card img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 14px;
    background: #fff;
    border: 1px solid var(--brand-line);
}

.procurement-mini-card div {
    display: grid;
    gap: 4px;
}

.procurement-mini-card span {
    color: var(--brand-steel);
    font-size: 0.84rem;
    line-height: 1.45;
}

.brand-radar-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 18px;
    background: #fbfbfb;
    border: 1px solid var(--brand-line);
}

.customer-dashboard-side {
    display: grid;
    gap: 24px;
}

.chart-panel {
    padding: 24px;
    border-radius: 28px;
    background: #ffffff;
    border: 1px solid var(--brand-line);
    box-shadow: var(--brand-shadow-soft);
}

.chart-panel-large {
    padding: 28px;
}

.chart-canvas-wrap {
    position: relative;
    height: 320px;
}

.chart-canvas-wrap.compact {
    height: 260px;
}

.dashboard-chart {
    display: block;
    width: 100%;
    height: 100%;
}

.customer-mini-grid {
    margin-top: 18px;
}

.customer-insight-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.78fr);
    gap: 24px;
    align-items: start;
}

.customer-order-snapshot {
    display: grid;
    gap: 18px;
}

.customer-order-snapshot-list {
    display: grid;
    gap: 12px;
}

.customer-order-snapshot-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 18px;
    border-radius: 20px;
    background: #fbfbfb;
    border: 1px solid var(--brand-line);
}

.customer-order-snapshot-copy {
    display: grid;
    gap: 6px;
}

.customer-order-snapshot-copy span {
    color: var(--brand-steel);
    line-height: 1.55;
}

.customer-order-snapshot-copy small {
    color: var(--brand-steel);
    line-height: 1.5;
}

.customer-order-snapshot-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.customer-orders-table td strong {
    font-size: 0.96rem;
}

.customer-order-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
}

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

.catalogue-card {
    display: grid;
    gap: 16px;
    padding: 18px;
    border-radius: 24px;
    background: #fff;
    border: 1px solid var(--brand-line);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.04);
}

.catalogue-card-hero {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

.catalogue-card-image {
    width: 92px;
    height: 92px;
    object-fit: cover;
    border-radius: 18px;
    background: #fff;
    border: 1px solid var(--brand-line);
}

.catalogue-specs {
    display: grid;
    gap: 8px;
    color: var(--brand-steel);
    line-height: 1.6;
}

.catalogue-brand-block {
    display: grid;
    gap: 16px;
    margin-top: 18px;
}

.catalogue-detail-hero {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.catalogue-detail-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 24px;
    background: #fff;
    border: 1px solid var(--brand-line);
}

.catalogue-gallery {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
}

.catalogue-gallery img {
    width: 100%;
    height: 96px;
    object-fit: cover;
    border-radius: 18px;
    border: 1px solid var(--brand-line);
    background: #fff;
}

.order-sheet-table input[type="number"] {
    max-width: 110px;
}

.order-sheet-summary {
    display: grid;
    gap: 10px;
}

.mini-chart-bars {
    display: grid;
    gap: 12px;
}

.mini-chart-bar {
    display: grid;
    gap: 6px;
}

.theme-landing .page-shell {
    width: min(1180px, calc(100% - 32px));
    padding: 24px 0 48px;
}

.theme-landing .topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 0 24px;
}

.theme-landing .brand-mark {
    display: flex;
    align-items: center;
    gap: 16px;
}

.theme-landing .brand-mark img {
    width: 148px;
    max-width: 42vw;
}

.theme-landing .brand-note {
    color: var(--brand-steel);
    font-size: 0.95rem;
    letter-spacing: 0.02em;
}

.theme-landing .status-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--brand-line);
    box-shadow: var(--brand-shadow-soft);
    font-size: 0.95rem;
}

.theme-landing .status-chip strong,
.theme-landing .status-chip a {
    color: var(--brand-orange);
    font-weight: 800;
}

.theme-landing .hero {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.9fr);
    gap: 28px;
    align-items: stretch;
}

.theme-landing .hero-panel,
.theme-landing .stack-card,
.theme-landing .progress-card {
    border-radius: 28px;
    border: 1px solid var(--brand-line);
}

.theme-landing .hero-panel {
    padding: 36px;
}

.theme-landing .eyebrow {
    display: inline-block;
    margin-bottom: 18px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.theme-landing h1 {
    font-size: clamp(2.4rem, 4vw, 4.3rem);
}

.theme-landing .hero-copy {
    max-width: 42rem;
    margin: 18px 0 24px;
    font-size: 1.08rem;
}

.theme-landing .cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
    position: relative;
    z-index: 1;
}

.theme-landing .cta-button {
    background: #fff;
    color: var(--brand-orange);
    box-shadow: none;
}

.theme-landing .cta-secondary {
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #fff;
    background: rgba(28, 28, 28, 0.12);
    box-shadow: none;
}

.theme-landing .metric-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.theme-landing .metric {
    position: relative;
    z-index: 1;
    border-radius: 20px;
    padding: 18px;
    background: rgba(28, 28, 28, 0.12);
    backdrop-filter: blur(8px);
}

.theme-landing .metric strong {
    display: block;
    font-size: 1.75rem;
    margin-bottom: 6px;
}

.theme-landing .metric span {
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.84);
}

.theme-landing .stack {
    display: grid;
    gap: 18px;
}

.theme-landing .stack-card {
    padding: 24px;
    background: #fff;
    box-shadow: var(--brand-shadow);
}

.theme-landing .stack-card h2,
.theme-landing .progress-card h2 {
    margin: 0 0 10px;
    font-size: 1.2rem;
    letter-spacing: -0.02em;
}

.theme-landing .stack-card p,
.theme-landing .progress-card p {
    margin: 0;
    color: var(--brand-steel);
    line-height: 1.6;
}

.theme-landing .swatches {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 18px;
}

.theme-landing .swatch {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--brand-line);
    background: #fff;
}

.theme-landing .swatch-color {
    height: 64px;
}

.theme-landing .swatch-label {
    padding: 10px 12px 12px;
    font-size: 0.82rem;
    color: var(--brand-steel);
}

.theme-landing .progress-card {
    margin-top: 28px;
    padding: 28px;
    background: #fff;
    box-shadow: var(--brand-shadow);
}

.theme-landing .progress-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.theme-landing .progress-item {
    padding: 20px;
    border-radius: 22px;
    background: linear-gradient(180deg, #fff 0%, #fafafa 100%);
    border: 1px solid var(--brand-line);
}

.theme-landing .progress-item .label {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(249, 99, 2, 0.12);
    color: var(--brand-orange);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.theme-landing .progress-item h3 {
    margin: 14px 0 10px;
    font-size: 1.1rem;
}

.theme-landing .progress-item p {
    margin: 0;
    color: var(--brand-steel);
}

.theme-landing .footer-note {
    margin-top: 22px;
    color: var(--brand-steel);
    font-size: 0.94rem;
}

.theme-auth,
.theme-auth-admin {
    padding: 24px;
}

.theme-auth-admin {
    display: grid;
    place-items: center;
}

.theme-auth .shell,
.theme-auth-admin .login-shell {
    display: grid;
    gap: 22px;
    align-items: stretch;
}

.theme-auth .shell {
    grid-template-columns: minmax(0, 1.15fr) 380px;
}

.theme-auth-admin .login-shell {
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 420px);
}

.theme-auth .hero,
.theme-auth-admin .brand-panel {
    padding: 36px;
    border-radius: 30px;
}

.theme-auth .hero img,
.theme-auth-admin .brand-panel img {
    width: 160px;
    max-width: 50%;
    margin-bottom: 20px;
}

.theme-auth .hero h1,
.theme-auth-admin .brand-panel h1 {
    font-size: clamp(2.6rem, 4vw, 4.2rem);
}

.theme-auth .roles {
    margin-top: 26px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    position: relative;
    z-index: 1;
}

.theme-auth .role-card,
.theme-auth-admin .credentials {
    background: rgba(28, 28, 28, 0.14);
    border-radius: 20px;
    padding: 18px;
    backdrop-filter: blur(10px);
}

.theme-auth .role-card strong {
    display: block;
    margin-bottom: 8px;
    font-size: 1rem;
}

.theme-auth .role-card span {
    font-size: 0.92rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.84);
}

.theme-auth .form,
.theme-auth-admin .form-panel {
    background: #fff;
    border: 1px solid var(--brand-line);
    border-radius: 30px;
    box-shadow: var(--brand-shadow);
    padding: 30px;
}

.theme-auth .eyebrow,
.theme-auth-admin .eyebrow {
    display: inline-flex;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(249, 99, 2, 0.12);
    color: var(--brand-orange);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.theme-auth .form h2,
.theme-auth-admin .form-panel h2 {
    margin: 16px 0 10px;
    font-size: 1.9rem;
    letter-spacing: -0.04em;
}

.theme-auth .form p,
.theme-auth-admin .form-panel p {
    margin: 0 0 20px;
    color: var(--brand-steel);
    line-height: 1.6;
}

.theme-auth .field,
.theme-auth-admin .field {
    margin-bottom: 16px;
}

.theme-auth .remember,
.theme-auth-admin .remember {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--brand-steel);
    margin-bottom: 18px;
}

.theme-auth .credentials {
    margin-top: 22px;
    padding: 18px;
    border-radius: 20px;
    background: rgba(28, 28, 28, 0.03);
    color: var(--brand-steel);
    line-height: 1.7;
}

.theme-auth .credentials strong,
.theme-auth-admin .credentials strong {
    color: var(--brand-charcoal);
    display: block;
    margin-bottom: 8px;
}

.theme-auth-admin .credentials,
.theme-auth-admin .credentials code,
.theme-auth-admin .credentials strong {
    color: #fff;
}

.theme-auth .admin-link,
.theme-auth-admin .back-link {
    display: inline-block;
    margin-top: 16px;
    color: var(--brand-orange);
    font-weight: 700;
}

@media (max-width: 1080px) {
    .theme-admin .admin-shell {
        grid-template-columns: 1fr;
    }

    .theme-admin .sidebar {
        position: static;
        height: auto;
        border-right: 0;
        border-bottom: 1px solid var(--brand-line);
    }

    .theme-portal .portal-shell-grid,
    .portal-product-grid {
        grid-template-columns: 1fr;
    }

    .theme-portal .portal-sidebar {
        position: static;
    }

    .dashboard-hero,
    .dashboard-main,
    .dashboard-secondary,
    .metric-strip,
    .product-card-grid,
    .home-brand-grid,
    .home-product-grid,
    .home-banner-grid,
    .procurement-feature-grid,
    .procurement-highlight-grid,
    .customer-dashboard-grid,
    .customer-dashboard-grid-secondary,
    .customer-insight-grid,
    .customer-kpi-grid,
    .customer-orders-summary {
        grid-template-columns: 1fr;
    }

    .grid.cols-4,
    .grid.cols-3,
    .grid.cols-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 960px) {
    .theme-auth .shell,
    .theme-auth-admin .login-shell,
    .theme-landing .hero {
        grid-template-columns: 1fr;
    }

    .theme-auth .roles,
    .theme-landing .metric-row,
    .theme-landing .swatches,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .toolbar,
    .theme-admin .topbar,
    .theme-portal .topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .theme-admin .topbar-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .theme-admin .topbar-card {
        width: 100%;
    }

    .customer-dashboard-hero,
    .procurement-feature-item,
    .brand-radar-item,
    .customer-order-snapshot-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .customer-order-snapshot-actions {
        justify-content: flex-start;
    }

    .procurement-card-grid {
        grid-template-columns: 1fr;
    }

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

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

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

    .procurement-feature-metrics,
    .brand-radar-metrics {
        text-align: left;
    }
}

/* ─── Customer brand-tier popup ─────────────────────────────────────────── */
.customer-tier-summary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.tier-modal {
    width: min(620px, calc(100vw - 32px));
    max-height: min(680px, calc(100vh - 32px));
    padding: 0;
    border: 0;
    border-radius: 16px;
    background: transparent;
    color: var(--console-text);
}

.tier-modal::backdrop {
    background: rgba(15, 28, 46, 0.38);
    backdrop-filter: blur(3px);
}

.tier-modal-card {
    overflow: hidden;
    border: 1px solid var(--console-border);
    border-radius: 16px;
    background: var(--console-surface);
    box-shadow: 0 24px 70px rgba(15, 28, 46, 0.18);
}

.tier-modal-header,
.tier-modal-footer {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 20px;
}

.tier-modal-header {
    border-bottom: 1px solid var(--console-border);
}

.tier-modal-header h2 {
    margin: 10px 0 4px;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
}

.tier-modal-header p {
    margin: 0;
    color: var(--console-muted);
    font-size: 0.86rem;
}

.tier-modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    border: 1px solid var(--console-border);
    border-radius: 10px;
    background: var(--console-bg);
    color: var(--console-muted);
    cursor: pointer;
    font: inherit;
    font-size: 1.25rem;
    line-height: 1;
}

.tier-modal-close:hover {
    color: var(--console-text);
    border-color: var(--console-border-strong);
}

.tier-modal-body {
    display: grid;
    gap: 8px;
    max-height: 420px;
    overflow-y: auto;
    padding: 16px 20px;
}

.tier-modal-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px;
    border: 1px solid var(--console-border);
    border-radius: 12px;
    background: #fafbfc;
}

.tier-modal-row div {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.tier-modal-row strong {
    font-size: 0.9rem;
}

.tier-modal-row span:not(.pill) {
    color: var(--console-soft);
    font-size: 0.75rem;
}

.tier-modal-footer {
    align-items: center;
    border-top: 1px solid var(--console-border);
    background: #fafbfc;
}

/* ─── Admin active/inactive toggle ──────────────────────────────────────── */
.status-toggle-form {
    display: inline-flex;
    margin: 0;
}

.status-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 6px 10px;
    border: 1px solid var(--console-border);
    border-radius: 999px;
    background: var(--console-surface);
    color: var(--console-muted);
    cursor: pointer;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.status-toggle:hover {
    border-color: var(--console-border-strong);
    color: var(--console-text);
}

.status-toggle-track {
    position: relative;
    width: 34px;
    height: 18px;
    flex: 0 0 auto;
    border-radius: 999px;
    background: #d8dee7;
    transition: background 0.16s ease;
}

.status-toggle-knob {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 28, 46, 0.2);
    transition: transform 0.16s ease;
}

.status-toggle.is-active {
    background: var(--console-green-soft);
    border-color: rgba(15, 158, 110, 0.2);
    color: var(--console-green);
}

.status-toggle.is-active .status-toggle-track {
    background: var(--console-green);
}

.status-toggle.is-active .status-toggle-knob {
    transform: translateX(16px);
}

.status-toggle.is-inactive {
    background: var(--console-bg);
}

/* ─── Customer address book ─────────────────────────────────────────────── */
.customer-address-list {
    display: grid;
    gap: 14px;
}

.customer-address-card {
    display: grid;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--console-border);
    border-radius: 14px;
    background: #fafbfc;
}

.customer-address-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.customer-address-card-header strong {
    font-size: 0.95rem;
}

@media (max-width: 680px) {
    .home-category-grid {
        grid-template-columns: 1fr;
    }

    .home-brand-grid,
    .home-product-grid {
        grid-template-columns: 1fr;
    }

    .home-banner-card {
        min-height: unset;
        padding: 22px;
    }

    .customer-home-slide {
        padding: 24px;
    }

    .customer-home-slider-track {
        min-height: 300px;
    }

    .customer-home-slider-dots {
        left: 24px;
        bottom: 18px;
    }
}

@media (max-width: 720px) {
    .theme-admin .content,
    .theme-auth,
    .theme-auth-admin {
        padding: 16px;
    }

    .theme-portal .shell,
    .theme-landing .page-shell,
    .theme-auth .shell,
    .theme-auth-admin .login-shell {
        width: min(100% - 16px, 1220px);
    }

    .theme-landing .page-shell {
        padding-top: 16px;
    }

    .theme-landing .topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .theme-admin .sidebar,
    .dashboard-lead {
        padding: 18px;
    }

    .catalogue-card-hero {
        grid-template-columns: 1fr;
    }

    .catalogue-detail-hero {
        grid-template-columns: 1fr;
    }

    .panel,
    .theme-landing .stack-card,
    .theme-landing .progress-card,
    .theme-auth .form,
    .theme-auth .hero,
    .theme-auth-admin .form-panel,
    .theme-auth-admin .brand-panel {
        padding: 20px;
        border-radius: 22px;
    }

    table,
    thead,
    tbody,
    th,
    td,
    tr {
        display: block;
    }

    thead {
        display: none;
    }

    tbody tr {
        border: 1px solid var(--brand-line);
        border-radius: 18px;
        margin-bottom: 12px;
        overflow: hidden;
        background: #fff;
    }

    td {
        padding: 12px 14px;
        border-bottom: 1px solid rgba(28, 28, 28, 0.06);
    }

    td:last-child {
        border-bottom: 0;
    }

    .theme-admin .topbar-card,
    .theme-admin .topbar-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .mini-kpi-grid {
        grid-template-columns: 1fr;
    }
}

/* ─── ToolWorld light console redesign ──────────────────────────────────── */
:root {
    --console-bg: #f4f6f9;
    --console-surface: #ffffff;
    --console-border: #e8ecf1;
    --console-border-strong: #d1d9e0;
    --console-text: #0f1c2e;
    --console-muted: #5c6b7a;
    --console-soft: #9aaab8;
    --console-accent: var(--brand-orange);
    --console-accent-deep: var(--brand-orange-deep);
    --console-accent-soft: #fff1e8;
    --console-green: #0f9e6e;
    --console-green-soft: #edfaf5;
    --console-amber: #c47b0a;
    --console-amber-soft: #fef6e7;
    --console-red: #c5392b;
    --console-red-soft: #fdecea;
    --console-shadow: 0 1px 3px rgba(15, 28, 46, 0.06);
}

body.theme-admin,
body.theme-portal {
    background: var(--console-bg);
    color: var(--console-text);
}

.theme-admin .admin-shell,
.portal-app {
    min-height: 100vh;
    background: var(--console-bg);
}

.theme-admin .admin-shell {
    grid-template-columns: 230px minmax(0, 1fr);
}

.portal-app {
    grid-template-columns: 230px minmax(0, 1fr);
}

.theme-admin .sidebar,
.portal-sidebar {
    background: var(--console-surface);
    border-right: 1px solid var(--console-border);
    padding: 14px 10px;
    gap: 10px;
    box-shadow: none;
}

.theme-admin .brand-lockup,
.portal-brand {
    border: 0;
    border-bottom: 1px solid var(--console-border);
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    padding: 10px 10px 14px;
    gap: 8px;
}

.theme-admin .brand-lockup {
    flex-direction: row;
    align-items: center;
}

.portal-brand {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
}

.theme-admin .brand-lockup img,
.portal-brand img {
    width: 128px;
    max-height: 34px;
    object-fit: contain;
}

.theme-admin .brand-lockup .badge,
.portal-role-chip {
    width: 100%;
    margin-left: 0;
    padding: 0;
    background: transparent;
    border: 0;
    color: var(--console-soft);
    font-size: 0.62rem;
    line-height: 1;
    letter-spacing: 0.12em;
}

.theme-admin .nav-group {
    gap: 8px;
}

.theme-admin .nav-section {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.theme-admin .nav-section-toggle {
    padding: 13px 8px 5px;
    cursor: default;
}

.theme-admin .nav-section-copy strong,
.portal-subnav-label {
    color: var(--console-soft);
    font-size: 0.63rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.theme-admin .nav-section-copy small,
.theme-admin .nav-section-count {
    display: none;
}

.theme-admin .nav-section-links,
.portal-nav {
    gap: 2px;
    padding: 0;
}

.theme-admin .nav-link,
.portal-nav-item {
    justify-content: flex-start;
    gap: 9px;
    min-height: 36px;
    margin: 0;
    padding: 8px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--console-muted);
    box-shadow: none;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.theme-admin .nav-link:hover,
.portal-nav-item:hover {
    background: var(--console-bg);
    color: var(--console-text);
    border: 0;
    box-shadow: none;
    transform: none;
}

.theme-admin .nav-link.is-active,
.portal-nav-item.is-active {
    background: var(--console-accent-soft);
    color: var(--console-accent-deep);
    border: 0;
    box-shadow: none;
}

.theme-admin .nav-link > i,
.portal-nav-item > i {
    width: 16px;
    flex: 0 0 16px;
    text-align: center;
    color: var(--console-soft);
    font-size: 15px;
}

.theme-admin .nav-link:hover > i,
.portal-nav-item:hover > i {
    color: var(--console-text);
}

.theme-admin .nav-link.is-active > i,
.portal-nav-item.is-active > i {
    color: var(--console-accent-deep);
}

.theme-admin .nav-link-copy,
.portal-nav-copy {
    gap: 0;
    min-width: 0;
}

.theme-admin .nav-link-copy strong,
.portal-nav-copy strong {
    color: inherit;
    font-size: 0.82rem;
    font-weight: 650;
    line-height: 1.2;
}

.theme-admin .nav-link-copy small,
.portal-nav-copy small,
.theme-admin .nav-link-arrow,
.portal-nav-arrow {
    display: none;
}

.portal-nav-badge {
    margin-left: auto;
    min-width: 20px;
    height: 20px;
    background: var(--console-accent);
    font-size: 0.65rem;
}

.theme-admin .logout-button,
.portal-signout-btn {
    margin-top: auto;
    border-radius: 8px;
    padding: 9px 10px;
    border: 1px solid var(--console-border);
    background: var(--console-bg);
    color: var(--console-muted);
    box-shadow: none;
    font-size: 0.82rem;
}

.theme-admin .content,
.portal-main {
    background: var(--console-bg);
}

.theme-admin .content {
    padding: 0;
}

.portal-content {
    padding: 24px 28px 34px;
}

.theme-admin .topbar,
.portal-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    height: 56px;
    margin: 0;
    padding: 0 24px;
    border-bottom: 1px solid var(--console-border);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: none;
    backdrop-filter: blur(10px);
}

.theme-admin .headline h1,
.portal-topbar-heading h1 {
    color: var(--console-text);
    font-family: var(--font-body);
    font-size: 0.86rem;
    font-weight: 650;
    letter-spacing: 0;
}

.theme-admin .headline h1::before,
.portal-topbar-heading h1::before {
    content: "ToolWorld / ";
    color: var(--console-soft);
    font-weight: 500;
}

.theme-admin .topbar-actions,
.portal-topbar-right {
    gap: 8px;
}

.theme-admin .topbar-utility,
.theme-admin .topbar-card,
.portal-notif-pill,
.portal-topbar-user {
    min-width: 0;
    min-height: 34px;
    padding: 7px 10px;
    border-radius: 8px;
    border: 1px solid var(--console-border);
    background: var(--console-bg);
    box-shadow: none;
}

.theme-admin .topbar-utility-label,
.theme-admin .topbar-utility small,
.portal-topbar-meta span {
    display: none;
}

.theme-admin .topbar-utility strong,
.theme-admin .topbar-card .meta strong,
.portal-topbar-meta strong,
.portal-notif-pill {
    font-size: 0.78rem;
    font-weight: 650;
}

.theme-admin .topbar-avatar,
.portal-topbar-avatar,
.portal-user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--console-accent-soft);
    color: var(--console-accent-deep);
    font-size: 0.72rem;
}

.theme-admin .topbar-password-link,
.theme-admin .topbar-signout-link,
.portal-topbar-user .topbar-signout-link {
    min-height: 34px;
    align-self: center;
}

.topbar-signout-form {
    display: inline-flex;
    margin: 0;
}

.topbar-signout-form .button {
    white-space: nowrap;
}

.theme-admin .content > .flash,
.theme-admin .content > .error-box {
    margin: 18px 28px 0;
}

.theme-admin .content > section,
.theme-admin .content > .dashboard-shell,
.theme-admin .content > .admin-dashboard-shell,
.theme-admin .content > .analytics-shell,
.theme-admin .content > .grid,
.theme-admin .content > form,
.theme-admin .content > .panel,
.theme-admin .content > .table-responsive,
.theme-admin .content > .inv-product-card,
.theme-admin .content > .pagination,
.theme-admin .content > nav,
.theme-admin .content > article,
.theme-admin .content > div:not(.topbar):not(.flash):not(.error-box) {
    margin-left: 28px;
    margin-right: 28px;
}

.theme-admin .content > .topbar + * {
    margin-top: 24px;
}

.panel,
.stat-card,
.customer-stat-card,
.chart-panel,
.list-table-card,
.customer-order-snapshot,
.catalogue-card,
.home-category-card,
.home-brand-card,
.inv-product-card,
.ops-summary-card,
.ops-rule-card,
.order-detail-hero,
.order-line-card,
.transfer-availability-panel {
    border: 1px solid var(--console-border) !important;
    border-radius: 12px !important;
    background: var(--console-surface) !important;
    box-shadow: var(--console-shadow) !important;
}

.panel,
.theme-admin .panel,
.theme-operator .panel {
    padding: 22px 24px;
}

.section-title h2,
.panel-title,
.stat-card strong,
.customer-stat-card strong,
.kpi-val,
.ops-summary-card strong,
.ops-rule-card strong {
    color: var(--console-text);
}

.section-title h2 {
    font-size: 0.95rem;
    font-weight: 700;
}

.section-title p,
.muted,
.stat-card span,
.customer-stat-card span {
    color: var(--console-muted);
}

.button,
.cta-button,
button.button {
    border-radius: 8px;
    background: var(--console-accent);
    box-shadow: none;
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 650;
}

.button:hover,
.cta-button:hover,
button.button:hover {
    background: var(--console-accent-deep);
    transform: translateY(-1px);
}

.button.secondary,
a.button.secondary,
button.button.secondary {
    border: 1px solid var(--console-border);
    background: var(--console-surface);
    color: var(--console-muted);
}

.button.secondary:hover,
a.button.secondary:hover,
button.button.secondary:hover {
    border-color: var(--console-border-strong);
    background: var(--console-bg);
    color: var(--console-text);
}

input,
select,
textarea,
.table-input,
.tw-select-button {
    border-radius: 8px !important;
    border-color: var(--console-border) !important;
    background: var(--console-surface) !important;
    color: var(--console-text);
}

input:focus,
select:focus,
textarea:focus,
.table-input:focus,
.tw-select.is-open .tw-select-button {
    outline: 2px solid rgba(200, 111, 61, 0.15) !important;
    border-color: rgba(200, 111, 61, 0.38) !important;
}

.clean-table th,
.tbl th {
    color: var(--console-soft);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--console-border);
}

.clean-table td,
.tbl td {
    color: var(--console-muted);
    font-size: 0.82rem;
    border-bottom: 1px solid var(--console-border);
}

.clean-table tbody tr:hover,
.tbl tr:hover td {
    background: #fafbfc;
}

.pill,
.chip,
.brand-pill {
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
}

.pill.success,
.chip.c-green,
.c-green {
    background: var(--console-green-soft);
    color: var(--console-green);
}

.pill.warning,
.chip.c-amber,
.c-amber {
    background: var(--console-amber-soft);
    color: var(--console-amber);
}

.pill.danger,
.chip.c-red,
.c-red {
    background: var(--console-red-soft);
    color: var(--console-red);
}

.pill.neutral,
.chip.c-gray,
.c-gray {
    background: var(--console-bg);
    color: var(--console-muted);
    border-color: var(--console-border);
}

.grid.cols-4,
.kpi-grid {
    gap: 14px;
}

.ops-hero,
.admin-overview-panel,
.admin-filter-panel,
.admin-spotlight-panel {
    background: var(--console-surface) !important;
}

.portal-user-block {
    margin-top: auto;
    border: 0;
    border-top: 1px solid var(--console-border);
    border-radius: 0;
    padding: 14px 10px 4px;
    background: transparent;
}

.portal-user-info strong {
    color: var(--console-text);
}

.portal-user-info span {
    color: var(--console-soft);
}

.portal-subnav {
    border-radius: 10px;
    background: var(--console-bg);
    border: 1px solid var(--console-border);
    padding: 10px;
}

.portal-subnav-item {
    border: 0;
    background: transparent;
    border-radius: 8px;
    color: var(--console-muted);
    font-size: 0.8rem;
    padding: 7px 8px;
}

.portal-subnav-item:hover {
    background: var(--console-surface);
    transform: none;
}

@media (max-width: 960px) {
    .theme-admin .admin-shell,
    .portal-app {
        grid-template-columns: 1fr;
    }

    .theme-admin .sidebar,
    .portal-sidebar {
        position: static;
        height: auto;
        border-right: 0;
        border-bottom: 1px solid var(--console-border);
    }

    .theme-admin .nav-section-links,
    .portal-nav {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .theme-admin .content > section,
    .theme-admin .content > .dashboard-shell,
    .theme-admin .content > .admin-dashboard-shell,
    .theme-admin .content > .analytics-shell,
    .theme-admin .content > .grid,
    .theme-admin .content > form,
    .theme-admin .content > .panel,
    .theme-admin .content > .table-responsive,
    .theme-admin .content > .inv-product-card,
    .theme-admin .content > .pagination,
    .theme-admin .content > nav,
    .theme-admin .content > article,
    .theme-admin .content > div:not(.topbar):not(.flash):not(.error-box) {
        margin-left: 16px;
        margin-right: 16px;
    }

    .portal-content {
        padding: 18px 16px 28px;
    }
}

/* ─── Design refresh: chart panels, stat cards, dashboard polish ──────────── */

/* Stat card accent on left edge + hover lift */
.stat-card,
.customer-stat-card {
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.stat-card::before {
    content: "";
    position: absolute;
    inset-block: 0;
    left: 0;
    width: 3px;
    border-radius: 999px 0 0 999px;
    background: linear-gradient(180deg, var(--brand-orange) 0%, rgba(200, 111, 61, 0.28) 100%);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card:hover {
    box-shadow: 0 18px 36px rgba(99, 71, 44, 0.1);
    transform: translateY(-2px);
}

/* Stat number — clean and sharp */
.stat-card strong {
    font-size: 2rem;
    letter-spacing: -0.04em;
    line-height: 1;
    color: var(--brand-charcoal);
}

/* Chart panel — smoother hover */
.chart-panel {
    transition: box-shadow 0.22s ease, transform 0.22s ease;
}

.chart-panel:hover {
    box-shadow: 0 22px 44px rgba(99, 71, 44, 0.09);
    transform: translateY(-1px);
}

/* Chart canvas wrapper — explicit sizing so Chart.js renders correctly */
.chart-canvas-wrap {
    position: relative;
    height: 300px;
}

.chart-canvas-wrap.compact {
    height: 240px;
}

/* Chart.js canvas must fill its parent */
.dashboard-chart {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

/* Hero banner — subtle gradient accent strip at bottom */
.customer-dashboard-hero {
    position: relative;
    overflow: hidden;
}

.customer-dashboard-hero::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--brand-orange) 0%, var(--brand-amber) 60%, transparent 100%);
    opacity: 0.5;
}

/* Mini KPI blocks — tighter number, readable label */
.mini-kpi {
    display: grid;
    gap: 6px;
}

.mini-kpi span {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--brand-steel);
}

.mini-kpi strong {
    font-size: 1.55rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1;
    color: var(--brand-charcoal);
}

/* Section title — tighter spacing */
.section-title h2 {
    font-size: 1.15rem;
    letter-spacing: -0.025em;
}

/* Pill refinement — slightly tighter */
.pill {
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

/* Dashboard note card — subtle left accent */
.dashboard-note {
    border-left: 3px solid rgba(200, 111, 61, 0.22);
    border-radius: 0 20px 20px 0;
}

/* Clean table — stronger header contrast */
.clean-table th {
    background: rgba(28, 28, 28, 0.025);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--brand-steel);
}

/* Admin sidebar active link — sharper indicator */
.theme-admin .nav-link.is-active {
    background: linear-gradient(135deg, rgba(249, 99, 2, 0.14) 0%, rgba(249, 99, 2, 0.07) 100%);
    border-color: rgba(249, 99, 2, 0.26);
}

.theme-admin .nav-link.is-active .nav-link-arrow {
    opacity: 1;
    color: var(--brand-orange);
}

/* Portal nav active link refinement */
.theme-portal .portal-side-nav a.active {
    background: linear-gradient(135deg, rgba(249, 99, 2, 0.14) 0%, rgba(249, 99, 2, 0.06) 100%);
    border-color: rgba(249, 99, 2, 0.22);
    color: var(--brand-orange-deep);
}

/* Snapshot item — hover highlight */
.customer-order-snapshot-item {
    transition: background 0.16s ease, box-shadow 0.16s ease;
}

.customer-order-snapshot-item:hover {
    background: #f9f7f4;
    box-shadow: 0 8px 20px rgba(99, 71, 44, 0.06);
}

/* Empty state — slightly warmer */
.empty {
    background: rgba(200, 111, 61, 0.04);
    border: 1px dashed rgba(200, 111, 61, 0.18);
    color: var(--brand-steel);
    font-size: 0.92rem;
}

/* ─── Portal app shell (replaces .shell.portal-shell-grid) ───────────────── */

.portal-app {
    display: grid;
    grid-template-columns: 272px minmax(0, 1fr);
    min-height: 100vh;
}

/* ─── Portal sidebar ─────────────────────────────────────────────────────── */

.portal-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 20px 16px 24px;
    background: #f5f4f1;
    border-right: 1px solid var(--brand-line);
    scrollbar-width: thin;
    scrollbar-color: rgba(28, 28, 28, 0.1) transparent;
}

/* Brand lockup */
.portal-brand {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px 18px 16px;
    border-radius: 22px;
    background: #fff;
    border: 1px solid var(--brand-line);
    box-shadow: 0 4px 16px rgba(99, 71, 44, 0.06);
    flex-shrink: 0;
}

.portal-brand img {
    width: 130px;
    height: auto;
}

.portal-role-chip {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    padding: 5px 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(200, 111, 61, 0.14) 0%, rgba(255, 159, 26, 0.08) 100%);
    border: 1px solid rgba(200, 111, 61, 0.18);
    color: var(--brand-orange-deep);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* Nav */
.portal-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.portal-subnav {
    display: grid;
    gap: 8px;
    padding: 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid var(--brand-line);
    flex-shrink: 0;
}

.portal-subnav-label {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--brand-steel);
}

.portal-subnav-item {
    display: block;
    padding: 10px 12px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--brand-charcoal);
    font-size: 0.84rem;
    font-weight: 700;
    border: 1px solid var(--brand-line);
    background: #fff;
    transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.portal-subnav-item:hover {
    background: #fafaf8;
    border-color: rgba(17, 24, 39, 0.08);
    transform: translateX(2px);
}

.ops-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.9fr);
    gap: 22px;
    align-items: stretch;
    background:
        radial-gradient(circle at top right, rgba(200, 111, 61, 0.08), transparent 16rem),
        linear-gradient(180deg, #ffffff 0%, #fcfbf8 100%);
}

.ops-hero-copy {
    display: grid;
    gap: 12px;
    align-content: start;
}

.ops-hero-copy h2 {
    margin: 0;
    font-size: 2rem;
    letter-spacing: -0.05em;
}

.ops-hero-copy p {
    margin: 0;
    color: var(--brand-steel);
    max-width: 64ch;
    line-height: 1.65;
}

.ops-summary-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ops-summary-card,
.ops-rule-card {
    display: grid;
    gap: 6px;
    padding: 16px 18px;
    border-radius: 22px;
    border: 1px solid var(--brand-line);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--brand-shadow-soft);
}

.ops-summary-card span,
.ops-rule-card span {
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--brand-steel);
}

.ops-summary-card strong,
.ops-rule-card strong {
    font-family: var(--font-display);
    font-size: 1.45rem;
    line-height: 1;
    letter-spacing: -0.04em;
    color: var(--brand-charcoal);
}

.ops-summary-card small {
    color: var(--brand-steel);
    line-height: 1.55;
}

.ops-rule-stack {
    display: grid;
    gap: 12px;
}

.ops-work-panel {
    overflow: hidden;
}

.ops-filter-panel .filter-bar,
.ops-work-panel .filter-bar {
    background: rgba(28, 28, 28, 0.02);
    border: 1px solid var(--brand-line);
    border-radius: 22px;
    padding: 14px;
}

.ops-form-shell {
    display: grid;
    gap: 16px;
}

.ops-submit-bar {
    justify-content: space-between;
    align-items: center;
    padding-top: 2px;
}

.ops-submit-bar .muted {
    max-width: 60ch;
}

.ops-batch-toolbar {
    display: grid;
    grid-template-columns: minmax(240px, 0.8fr) minmax(280px, 1.2fr);
    gap: 14px;
    align-items: end;
    padding: 14px;
    border: 1px solid var(--brand-line);
    border-radius: 16px;
    background: rgba(28, 28, 28, 0.025);
}

.ops-batch-toolbar .field {
    min-width: 0;
}

.ops-batch-table {
    min-width: 1080px;
}

.ops-batch-table th:nth-child(1),
.ops-batch-table td:nth-child(1) {
    min-width: 280px;
}

.ops-batch-table th:nth-child(3),
.ops-batch-table td:nth-child(3) {
    width: 120px;
}

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

.ops-product-search-card {
    position: relative;
    display: grid;
    grid-template-columns: minmax(280px, 1fr) auto;
    gap: 14px;
    align-items: end;
    padding: 16px;
    border: 1px solid var(--brand-line);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.04);
}

.ops-product-search-card .field {
    min-width: 0;
}

.ops-product-search-hint {
    color: var(--muted);
    font-weight: 700;
    font-size: 0.88rem;
    max-width: 320px;
}

.ops-product-results {
    position: absolute;
    z-index: 30;
    left: 16px;
    right: 16px;
    top: calc(100% - 8px);
    display: grid;
    gap: 8px;
    max-height: 380px;
    overflow: auto;
    padding: 10px;
    border: 1px solid var(--brand-line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.16);
}

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

.ops-product-result:hover,
.ops-product-result:focus {
    border-color: rgba(197, 91, 39, 0.28);
    background: rgba(197, 91, 39, 0.06);
    outline: none;
}

.ops-product-result strong,
.ops-product-result small {
    display: block;
}

.ops-product-result small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.82rem;
}

.ops-product-result em {
    flex: 0 0 auto;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--soft);
    color: var(--muted);
    font-size: 0.78rem;
    font-style: normal;
    font-weight: 800;
}

.ops-product-result-empty {
    padding: 14px;
    color: var(--muted);
    font-weight: 700;
}

.ops-picked-panel {
    border: 1px solid var(--brand-line);
    border-radius: 18px;
    background: #fff;
    padding: 16px;
}

.ops-picked-panel .section-title.compact {
    margin-bottom: 12px;
}

.ops-picked-panel .section-title.compact h3 {
    margin: 0;
    font-size: 1rem;
}

.ops-picked-panel .section-title.compact p {
    margin: 4px 0 0;
}

.ops-picker-empty {
    margin: 0;
}

.ops-picked-table {
    min-width: 1180px;
}

.ops-picked-table tr.is-highlighted {
    animation: pickedRowPulse 0.7s ease-out;
}

@keyframes pickedRowPulse {
    0% {
        background: rgba(197, 91, 39, 0.18);
    }
    100% {
        background: transparent;
    }
}

.ops-table th {
    white-space: nowrap;
}

.ops-table td {
    padding-top: 16px;
    padding-bottom: 16px;
}

.ops-table tbody tr:hover {
    background: rgba(28, 28, 28, 0.018);
}

.ops-transfer-card {
    border-style: solid;
}

.ops-transfer-summary .ops-rule-card {
    min-height: 100%;
}

.ops-action-card {
    background: linear-gradient(180deg, #ffffff 0%, #fbfaf8 100%);
}

.ops-action-card h3 {
    font-size: 1rem;
    letter-spacing: -0.02em;
}

/* ─── Admin UX scale pass: calmer operational density ───────────────────── */
.theme-admin .content {
    padding-top: 18px;
}

.theme-admin .topbar {
    padding: 14px 18px;
    margin-bottom: 16px;
}

.theme-admin .headline h1,
.portal-topbar-heading h1 {
    font-size: 1.45rem;
    letter-spacing: 0;
}

.theme-admin .panel,
.theme-operator .panel {
    border-radius: 18px;
    padding: 18px;
}

.theme-admin .section-title,
.theme-operator .section-title {
    margin-bottom: 14px;
}

.theme-admin .section-title h2,
.theme-operator .section-title h2 {
    font-size: 1rem;
    letter-spacing: 0;
}

.theme-admin .section-title p,
.theme-operator .section-title p {
    font-size: 0.88rem;
    line-height: 1.45;
}

.theme-admin .stat-card,
.theme-admin .customer-stat-card,
.theme-operator .stat-card,
.theme-operator .customer-stat-card {
    border-radius: 16px;
    padding: 16px;
}

.theme-admin .stat-card strong,
.theme-admin .customer-stat-card strong,
.theme-operator .stat-card strong,
.theme-operator .customer-stat-card strong,
.ops-summary-card strong,
.ops-rule-card strong {
    font-size: 1.35rem;
    letter-spacing: 0;
}

.theme-admin .mini-kpi strong,
.theme-operator .mini-kpi strong {
    font-size: 1.18rem;
    letter-spacing: 0;
}

.theme-admin th,
.theme-admin td,
.theme-operator th,
.theme-operator td {
    padding: 11px 10px;
}

.ops-hero {
    border-radius: 18px;
}

.ops-hero-copy h2 {
    font-size: 1.45rem;
    letter-spacing: 0;
}

.ops-summary-card,
.ops-rule-card {
    border-radius: 14px;
    padding: 14px;
}

.admin-compact-card {
    box-shadow: var(--brand-shadow-soft);
}

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

.role-permission-grid .checkbox-field {
    align-items: flex-start;
    min-height: 0;
    padding: 12px;
    border-radius: 12px;
}

.role-permission-grid .checkbox-field span {
    display: grid;
    gap: 3px;
}

.role-permission-grid .checkbox-field strong {
    font-size: 0.88rem;
    line-height: 1.3;
}

.role-permission-grid .checkbox-field small {
    color: var(--brand-steel);
    font-size: 0.76rem;
}

.portal-nav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 14px;
    border-radius: 16px;
    border: 1px solid transparent;
    color: var(--brand-charcoal);
    text-decoration: none;
    transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.portal-nav-item:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: var(--brand-line);
    color: var(--brand-charcoal);
}

.portal-nav-item.is-active {
    background: linear-gradient(135deg, rgba(200, 111, 61, 0.14) 0%, rgba(200, 111, 61, 0.06) 100%);
    border-color: rgba(200, 111, 61, 0.24);
    color: var(--brand-orange-deep);
    box-shadow: 0 2px 10px rgba(200, 111, 61, 0.08);
}

.portal-nav-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.portal-nav-copy strong {
    display: block;
    font-size: 0.9rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.portal-nav-copy small {
    display: block;
    font-size: 0.73rem;
    font-weight: 400;
    color: rgba(96, 96, 96, 0.8);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.portal-nav-item.is-active .portal-nav-copy small {
    color: rgba(159, 86, 48, 0.75);
}

.portal-nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--brand-orange);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    flex-shrink: 0;
}

.portal-nav-arrow {
    font-size: 1.1rem;
    line-height: 1;
    color: var(--brand-orange);
    flex-shrink: 0;
}

/* User block */
.portal-user-block {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid var(--brand-line);
    flex-shrink: 0;
}

.portal-user-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(200, 111, 61, 0.2) 0%, rgba(255, 180, 95, 0.45) 100%);
    color: var(--brand-orange-deep);
    font-size: 0.95rem;
    font-weight: 900;
    flex-shrink: 0;
}

.portal-user-info {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.portal-user-info strong {
    display: block;
    font-size: 0.88rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.portal-user-info span {
    display: block;
    font-size: 0.74rem;
    color: var(--brand-steel);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Sign out button */
.portal-signout-btn {
    width: 100%;
    padding: 11px 16px;
    border: 1px solid var(--brand-line-strong);
    border-radius: 14px;
    background: transparent;
    color: var(--brand-steel);
    font: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
    flex-shrink: 0;
}

.portal-signout-btn:hover {
    background: rgba(237, 82, 88, 0.07);
    border-color: rgba(237, 82, 88, 0.22);
    color: var(--brand-red);
}

/* ─── Portal main area ───────────────────────────────────────────────────── */

.portal-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 100vh;
    background: linear-gradient(180deg, #fafaf8 0%, #f4f3f1 100%);
}

.portal-content {
    padding: 0 28px 40px;
    flex: 1;
}

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

/* ─── Portal topbar ──────────────────────────────────────────────────────── */

.portal-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 20px 14px;
    border-bottom: 1px solid var(--brand-line);
    background: rgba(250, 250, 248, 0.94);
    backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 10;
    margin-bottom: 16px;
}

.portal-topbar-heading {
    min-width: 0;
}

.portal-topbar-heading h1 {
    margin: 0;
    font-size: clamp(1.35rem, 2.1vw, 1.95rem);
    letter-spacing: -0.04em;
    line-height: 1.1;
}

.portal-topbar-heading p {
    margin: 4px 0 0;
    color: var(--brand-steel);
    font-size: 0.84rem;
    line-height: 1.45;
    max-width: 42rem;
}

.portal-topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* Notification pill */
.portal-notif-pill {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid var(--brand-line);
    color: var(--brand-charcoal);
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: var(--brand-shadow-soft);
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
    white-space: nowrap;
}

.portal-notif-pill:hover {
    border-color: rgba(200, 111, 61, 0.24);
    box-shadow: 0 4px 14px rgba(200, 111, 61, 0.09);
}

.portal-notif-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brand-orange);
    box-shadow: 0 0 0 3px rgba(200, 111, 61, 0.2);
    flex-shrink: 0;
}

/* Topbar user card */
.portal-topbar-user {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid var(--brand-line);
    box-shadow: var(--brand-shadow-soft);
}

.portal-topbar-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(200, 111, 61, 0.2) 0%, rgba(255, 180, 95, 0.45) 100%);
    color: var(--brand-orange-deep);
    font-size: 0.8rem;
    font-weight: 900;
    flex-shrink: 0;
}

.portal-topbar-meta {
    display: grid;
    gap: 1px;
    min-width: 0;
}

.portal-topbar-meta strong {
    display: block;
    font-size: 0.82rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

.portal-topbar-meta span {
    display: block;
    font-size: 0.7rem;
    color: var(--brand-steel);
}

/* ─── Small button variant ────────────────────────────────────��──────────── */

.btn-sm {
    padding: 8px 12px !important;
    font-size: 0.82rem !important;
    border-radius: 12px !important;
}

/* ─── Form grid span helpers (replaces inline style="grid-column: span N") ─ */

.form-span-2 {
    grid-column: span 2;
}

.form-span-3 {
    grid-column: span 3;
}

/* ─── Table: compact action buttons ──────────────────────────────────────── */

.table-actions .button,
.table-actions button.button {
    padding: 8px 12px;
    font-size: 0.82rem;
    border-radius: 12px;
    white-space: nowrap;
}

/* ─── Catalogue card improvements ───────────────────────────────────────── */

.catalogue-card {
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.catalogue-card:hover {
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.08);
    transform: translateY(-2px);
}

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

.catalogue-card .actions .button {
    flex: 1;
    min-width: 0;
    text-align: center;
    font-size: 0.85rem;
    padding: 10px 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.catalogue-specs {
    font-size: 0.88rem;
}

/* ─── Catalogue detail page ──────────────────────────────────────────────── */

.catalogue-detail-price {
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1;
    color: var(--brand-charcoal);
    margin: 4px 0;
}

/* ─── Order table improvements ───────────────────────────────────────────── */

.order-status-stack {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: flex-start;
}

.orders-table-meta {
    display: grid;
    gap: 3px;
}

.orders-table-meta span {
    font-size: 0.8rem;
    color: var(--brand-steel);
    line-height: 1.4;
}

/* ─── Filter bar improvements ────────────────────────────────────────────── */

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
}

.filter-bar .field {
    flex: 1;
    min-width: 140px;
}

.filter-bar .actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    padding-bottom: 1px;
}

/* ─── Page section spacing ───────────────────────────────────────────────── */

.page-kpi-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.page-kpi-row.cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* ─── Portal responsive overrides ───────────────────────────────────────── */

@media (max-width: 1100px) {
    .portal-app {
        grid-template-columns: 240px minmax(0, 1fr);
    }

    .portal-content {
        padding: 0 18px 32px;
    }

    .portal-topbar {
        padding: 18px 18px 16px;
    }
}

@media (max-width: 860px) {
    .portal-app {
        grid-template-columns: 1fr;
    }

    .portal-sidebar {
        position: static;
        height: auto;
        flex-direction: row;
        flex-wrap: wrap;
        padding: 14px 16px;
    }

    .portal-brand {
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
        width: 100%;
    }

    .portal-nav {
        flex-direction: row;
        flex-wrap: wrap;
        flex: unset;
        width: 100%;
    }

    .portal-subnav {
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .portal-nav-item {
        flex: 0 0 auto;
    }

    .portal-nav-copy small {
        display: none;
    }

    .portal-user-block {
        display: none;
    }

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

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

.access-page-head .section-title {
    align-items: flex-start;
}

.access-page-actions,
.access-sticky-actions,
.access-user-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.access-page-actions {
    justify-content: flex-end;
}

.access-table td {
    vertical-align: top;
}

.access-table td:first-child {
    min-width: 220px;
}

.access-form {
    gap: 18px;
}

.access-permission-grid {
    display: grid;
    gap: 16px;
}

.access-module {
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 18px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.05);
}

.access-module-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.access-module-head h3 {
    margin: 0;
    font-size: 1rem;
}

.access-module-head p {
    margin: 4px 0 0;
    color: var(--brand-steel);
}

.access-user-chip {
    display: inline-grid;
    gap: 2px;
    min-width: 168px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 14px;
    padding: 9px 11px;
    background: rgba(248, 250, 252, 0.9);
}

.access-user-chip strong,
.access-user-chip small,
.access-user-chip em {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.access-user-chip small {
    color: var(--brand-steel);
    font-style: normal;
}

.access-user-chip em {
    font-size: 0.72rem;
    font-style: normal;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.access-user-chip .is-active {
    color: var(--brand-green);
}

.access-user-chip .is-inactive {
    color: var(--brand-steel);
}

.access-user-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    padding: 14px 16px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 16px;
    background: rgba(248, 250, 252, 0.86);
}

.access-user-summary strong,
.access-user-summary span {
    display: block;
}

@media (max-width: 860px) {
    .access-page-head .section-title,
    .access-module-head,
    .access-user-summary {
        display: grid;
    }

    .access-page-actions,
    .access-sticky-actions {
        justify-content: stretch;
    }

    .access-page-actions .button,
    .access-sticky-actions .button {
        width: 100%;
    }
}

/* ─── Reports workspace ─────────────────────────────────────────────────── */

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

.report-toolbar {
    display: grid;
    gap: 16px;
}

.report-toolbar-copy {
    display: grid;
    gap: 6px;
}

.report-toolbar-copy h2 {
    margin: 0;
    max-width: 520px;
    font-size: clamp(1.15rem, 1.6vw, 1.55rem);
    line-height: 1.18;
    letter-spacing: -0.035em;
}

.report-filter-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(150px, 1fr)) minmax(150px, auto);
    gap: 12px;
    align-items: end;
}

.report-filter-form-extended {
    grid-template-columns: repeat(6, minmax(145px, 1fr)) auto;
}

.operator-report-filter-form {
    grid-template-columns: repeat(7, minmax(130px, 1fr)) auto;
}

.report-filter-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.report-stat-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.report-stat-card {
    display: grid;
    gap: 8px;
    min-height: 132px;
    padding: 18px;
    border: 1px solid var(--brand-line);
    border-radius: 22px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(250, 247, 242, 0.88)),
        #fff;
    box-shadow: var(--brand-shadow-soft);
}

.report-stat-card span {
    color: var(--brand-steel);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.report-stat-card strong {
    color: var(--brand-charcoal);
    font-size: clamp(1.3rem, 2.1vw, 2rem);
    line-height: 1;
    letter-spacing: -0.045em;
}

.report-stat-card small {
    color: var(--brand-steel);
    font-size: 0.82rem;
    line-height: 1.35;
}

.report-chart-grid {
    display: grid;
    grid-template-columns: 1.15fr 1.15fr 0.9fr;
    gap: 18px;
}

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

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

.report-table-card,
.report-watch-card {
    overflow: hidden;
}

.report-location-table {
    min-width: 860px;
}

.report-wide-table {
    min-width: 920px;
}

.report-wide-table td strong,
.report-wide-table td small {
    display: block;
}

.report-wide-table td small {
    margin-top: 3px;
    color: var(--brand-steel);
    font-size: 0.78rem;
}

.report-split-list {
    display: grid;
    gap: 16px;
}

.report-watch-list {
    display: grid;
    gap: 10px;
    max-height: 540px;
    overflow: auto;
    padding-right: 4px;
}

.report-watch-item {
    display: grid;
    gap: 5px;
    padding: 14px;
    border: 1px solid var(--brand-line);
    border-radius: 16px;
    background: rgba(28, 28, 28, 0.025);
}

.report-watch-item strong,
.report-watch-item p,
.report-watch-item small {
    min-width: 0;
}

.report-watch-item strong {
    color: var(--brand-charcoal);
    font-size: 0.95rem;
}

.report-watch-item p {
    margin: 0;
    color: var(--brand-charcoal);
    font-size: 0.86rem;
    font-weight: 700;
}

.report-watch-item small {
    color: var(--brand-steel);
    font-size: 0.8rem;
    line-height: 1.35;
}

@media (max-width: 1220px) {
    .report-chart-grid,
    .report-chart-grid-four,
    .report-table-grid {
        grid-template-columns: 1fr;
    }

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

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

@media (max-width: 1040px) {
    .report-filter-form,
    .report-filter-form-extended {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .report-filter-actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 760px) {
    .report-filter-form,
    .report-filter-form-extended,
    .report-stat-grid {
        grid-template-columns: 1fr;
    }

    .report-filter-actions {
        grid-column: auto;
    }

    .report-filter-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .report-filter-actions .button {
        width: 100%;
        text-align: center;
    }
}

/* ─── Pricing overview ──────────────────────────────────────────────────── */

.pricing-control-panel {
    display: grid;
    gap: 16px;
}

.pricing-filter-bar {
    grid-template-columns: minmax(240px, 1.7fr) repeat(5, minmax(145px, 1fr)) auto;
}

.pricing-search-field {
    min-width: 240px;
}

.pricing-filter-actions {
    align-self: end;
}

.pricing-results-panel {
    overflow: hidden;
}

.pricing-table {
    min-width: 980px;
}

.pricing-tier-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    max-width: 620px;
}

.pricing-tier-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 999px;
    border: 1px solid var(--brand-line);
    background: rgba(28, 28, 28, 0.035);
    color: var(--brand-steel);
    font-size: 0.78rem;
    line-height: 1;
    white-space: nowrap;
}

.pricing-tier-chip span {
    font-weight: 800;
    color: var(--brand-charcoal);
}

.pricing-tier-chip strong {
    font-size: 0.78rem;
}

.pricing-tier-chip.is-priced {
    border-color: rgba(22, 163, 74, 0.22);
    background: rgba(22, 163, 74, 0.08);
}

.pricing-tier-chip.is-priced strong {
    color: #15803d;
}

.pricing-tier-chip.is-missing {
    border-color: rgba(148, 163, 184, 0.28);
    background: rgba(148, 163, 184, 0.08);
}

.pricing-tier-chip.is-missing strong {
    color: var(--brand-steel);
}

@media (max-width: 1380px) {
    .pricing-filter-bar {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .pricing-search-field,
    .pricing-filter-actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 780px) {
    .pricing-filter-bar {
        grid-template-columns: 1fr;
    }

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

    .pricing-filter-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .pricing-filter-actions .button {
        width: 100%;
        text-align: center;
    }
}

/* Final global UI pass from TWd_prompts: Lato scale, tighter headers, safer grids. */
body,
button,
input,
select,
textarea,
table {
    font-family: "Lato", sans-serif;
}

h1,
.theme-admin .headline h1,
.portal-topbar-heading h1 {
    font-family: "Lato", sans-serif;
    font-size: clamp(1.5rem, 2vw, 1.75rem);
    line-height: 1.16;
    letter-spacing: -0.025em;
    font-weight: 800;
}

h2,
.section-title h2,
.tier-modal-header h2,
.ob-category-header h2,
.ob-cart-title-row h2 {
    font-family: "Lato", sans-serif;
    font-size: clamp(1.125rem, 1.5vw, 1.25rem);
    line-height: 1.25;
    letter-spacing: -0.015em;
    font-weight: 700;
}

h3,
th,
.badge,
.pill,
.button,
.logout-button {
    font-family: "Lato", sans-serif;
}

.theme-admin .topbar,
.portal-topbar {
    min-height: 58px;
    padding: 10px 14px;
}

.theme-admin .content,
.portal-content {
    gap: 16px;
}

.panel,
.theme-admin .panel,
.theme-operator .panel,
.theme-customer .panel {
    border-radius: 18px;
    padding: 18px;
}

.filter-bar,
.ob-filter-row {
    gap: 12px;
    align-items: end;
}

table {
    table-layout: auto;
    border-collapse: separate;
    border-spacing: 0;
}

th,
td {
    vertical-align: middle;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

th {
    font-size: 0.78rem;
    font-weight: 800;
}

td {
    font-size: 0.88rem;
}

.table-actions {
    align-items: center;
}

.stacked,
.nav-link-copy,
.portal-user-info,
.topbar-card .meta,
.portal-topbar-meta,
.ob-card-body,
.ob-cart-item-info {
    min-width: 0;
}

.stacked strong,
.stacked span,
.nav-link-copy strong,
.nav-link-copy small,
.portal-user-info strong,
.portal-user-info span,
.topbar-card .meta strong,
.topbar-card .meta span,
.portal-topbar-meta strong,
.portal-topbar-meta span,
.ob-card-name,
.ob-card-sku,
.ob-cart-item-info strong,
.ob-cart-item-info span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.inv-breakdown-btn {
    margin-top: 10px;
    width: 100%;
    justify-content: center;
}

.ob-filter-actions {
    align-self: end;
}

@media (max-width: 600px) {
    .portal-topbar {
        flex-direction: column;
        gap: 12px;
    }

    .portal-topbar-right {
        width: 100%;
        justify-content: flex-start;
    }

    .page-kpi-row,
    .customer-kpi-grid,
    .customer-orders-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .portal-content {
        padding: 0 14px 28px;
    }

    .portal-subnav {
        grid-template-columns: 1fr;
    }

    .ops-submit-bar {
        align-items: stretch;
    }

    .role-permission-grid {
        grid-template-columns: 1fr;
    }
}

/* ─── Catalogue brand + category headers ─────────────────────────────────── */

.catalogue-brand-section {
    display: grid;
    gap: 0;
}

.catalogue-brand-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.catalogue-brand-header h2 {
    margin: 0;
    font-size: 1.2rem;
    letter-spacing: -0.025em;
}

.catalogue-brand-header p {
    margin: 4px 0 0;
    color: var(--brand-steel);
    font-size: 0.88rem;
}

.catalogue-category-block {
    margin-top: 20px;
    border-top: 1px solid var(--brand-line);
    padding-top: 18px;
}

.catalogue-brand-section .catalogue-category-block:first-of-type {
    margin-top: 0;
    border-top: none;
    padding-top: 0;
}

.catalogue-category-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.catalogue-category-header strong {
    font-size: 0.95rem;
    color: var(--brand-charcoal);
}

/* ─── Catalogue card: new meta row ──────────────────────────────────────── */

.catalogue-card-copy {
    display: grid;
    gap: 3px;
}

.catalogue-card-copy strong {
    font-size: 0.95rem;
    line-height: 1.3;
}

.catalogue-card-meta-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.catalogue-card-meta-item {
    display: grid;
    gap: 2px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(28, 28, 28, 0.025);
    border: 1px solid var(--brand-line);
}

.catalogue-card-meta-item .label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--brand-steel);
    margin-bottom: 0;
}

.catalogue-card-meta-item strong {
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--brand-charcoal);
}

.catalogue-card-meta-item small {
    font-size: 0.76rem;
    color: var(--brand-steel);
    line-height: 1.3;
}

.catalogue-card-actions {
    display: flex;
    gap: 8px;
}

.catalogue-card-actions .button {
    flex: 1;
    text-align: center;
    padding: 10px 12px;
    font-size: 0.85rem;
    white-space: nowrap;
}

/* ─── Filter bar actions ─────────────────────────────────────────────────── */

.filter-bar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 1px;
    flex-shrink: 0;
}

/* ─── Catalogue detail page ──────────────────────────────────────────────── */

.catalogue-detail-actions-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.catalogue-detail-panel {
    padding: 24px;
}

.catalogue-detail-hero {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr) 180px;
    gap: 24px;
    align-items: start;
}

.catalogue-detail-img-wrap {
    display: grid;
    gap: 10px;
}

.catalogue-detail-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.catalogue-detail-name {
    margin: 0 0 4px;
    font-size: 1.5rem;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

.catalogue-detail-sku {
    margin: 0 0 12px;
    font-size: 0.88rem;
}

.catalogue-detail-price-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.catalogue-detail-price {
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: -0.04em;
    color: var(--brand-charcoal);
    line-height: 1;
}

.catalogue-detail-desc {
    margin: 0 0 10px;
    line-height: 1.65;
}

.catalogue-detail-rules {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--brand-steel);
    margin: 0;
}

.catalogue-detail-downloads {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 18px;
    border-radius: 20px;
    background: rgba(28, 28, 28, 0.025);
    border: 1px solid var(--brand-line);
}

.catalogue-download-btn {
    width: 100%;
    text-align: center;
    font-size: 0.85rem;
}

.catalogue-specs-body {
    display: grid;
    gap: 6px;
}

.catalogue-spec-line {
    margin: 0;
    padding: 8px 12px;
    border-radius: 10px;
    background: rgba(28, 28, 28, 0.025);
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--brand-charcoal);
}

@media (max-width: 900px) {
    .catalogue-detail-hero {
        grid-template-columns: 160px minmax(0, 1fr);
    }

    .catalogue-detail-downloads {
        grid-column: span 2;
    }
}

@media (max-width: 640px) {
    .catalogue-detail-hero {
        grid-template-columns: 1fr;
    }

    .catalogue-detail-downloads {
        grid-column: 1;
    }
}

/* ─── Order form ─────────────────────────────────────────────────────────── */

.order-form-stack {
    display: grid;
    gap: 16px;
}

.order-brand-section {
    display: grid;
    gap: 0;
}

.order-category-block {
    margin-top: 20px;
    border-top: 1px solid var(--brand-line);
    padding-top: 18px;
}

.order-brand-section .order-category-block:first-of-type {
    margin-top: 0;
    border-top: none;
    padding-top: 0;
}

.order-sheet-scroll {
    overflow-x: auto;
    border-radius: 16px;
    border: 1px solid var(--brand-line);
}

.order-sheet-table {
    min-width: 680px;
    border-collapse: collapse;
    width: 100%;
}

.order-sheet-table th,
.order-sheet-table td {
    padding: 11px 12px;
    border-bottom: 1px solid rgba(28, 28, 28, 0.07);
    vertical-align: middle;
}

.order-sheet-table thead th {
    background: rgba(28, 28, 28, 0.025);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--brand-steel);
    white-space: nowrap;
}

.order-sheet-table tbody tr:last-child td {
    border-bottom: 0;
}

.order-sheet-table tbody tr:hover td {
    background: rgba(200, 111, 61, 0.025);
}

.order-detail-link {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--brand-orange-deep);
    text-decoration: none;
}

.order-detail-link:hover {
    text-decoration: underline;
}

.order-rules-text {
    font-size: 0.82rem;
    color: var(--brand-steel);
    white-space: nowrap;
}

.qty-input {
    width: 88px;
    min-width: 0;
    padding: 8px 10px;
    font-size: 0.9rem;
    text-align: center;
}

.order-submit-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding: 18px 0 8px;
}

.order-submit-btn {
    min-width: 200px;
}


/* ─── Orders table ───────────────────────────────────────────────────────── */

.orders-table-wrap {
    overflow-x: auto;
    border-radius: 16px;
    margin-top: 4px;
}

.orders-table {
    min-width: 640px;
}

/* ─── Dashboard shell: override old shell class for portal ───────────────── */

.customer-dashboard-shell {
    display: grid;
    gap: 20px;
}

/* ─── Inventory matrix — scalable card layout ────────────────────────────── */

.inv-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.inv-summary-chips {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.inv-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(28, 28, 28, 0.05);
    border: 1px solid var(--brand-line);
    font-size: 0.82rem;
    color: var(--brand-steel);
}

.inv-chip strong {
    color: var(--brand-charcoal);
    font-size: 0.9rem;
}

/* Product card */
.inv-product-card {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr) 100px;
    gap: 20px;
    align-items: start;
    padding: 18px 20px;
    margin-bottom: 10px;
    border-radius: 22px;
    background: #fff;
    border: 1px solid var(--brand-line);
    box-shadow: var(--brand-shadow-soft);
    transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.inv-product-card:hover {
    box-shadow: 0 14px 32px rgba(99, 71, 44, 0.09);
    transform: translateY(-1px);
}

/* Left: product info */
.inv-product-info {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.inv-product-name {
    display: block;
    font-size: 0.98rem;
    font-weight: 800;
    line-height: 1.25;
    color: var(--brand-charcoal);
}

.inv-product-sku {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--brand-steel);
}

.inv-product-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 4px;
}

/* Centre: warehouse chips grid */
.inv-warehouse-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-content: flex-start;
    min-width: 0;
}

.inv-wh-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px 5px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
    line-height: 1;
    white-space: nowrap;
}

.inv-wh-chip--stocked {
    background: rgba(47, 158, 68, 0.09);
    border: 1px solid rgba(47, 158, 68, 0.2);
    color: var(--brand-charcoal);
}

.inv-wh-chip--empty {
    background: rgba(28, 28, 28, 0.04);
    border: 1px solid var(--brand-line);
    color: var(--brand-steel);
}

.inv-wh-name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    color: inherit;
}

.inv-wh-chip--stocked .inv-wh-name {
    color: #1a5c2a;
}

.inv-wh-qty {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--brand-green);
    min-width: 18px;
    text-align: right;
}

.inv-wh-chip--empty .inv-wh-qty {
    color: var(--brand-steel);
}

/* Empty warehouses collapsible */
.inv-empty-toggle {
    display: inline-flex;
    align-items: flex-start;
    gap: 0;
}

.inv-empty-toggle summary {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 10px;
    background: rgba(28, 28, 28, 0.05);
    border: 1px dashed var(--brand-line-strong);
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--brand-steel);
    cursor: pointer;
    list-style: none;
    user-select: none;
    transition: background 0.15s ease;
}

.inv-empty-toggle summary:hover {
    background: rgba(28, 28, 28, 0.08);
}

.inv-empty-toggle summary::-webkit-details-marker { display: none; }

.inv-empty-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 6px;
    padding: 10px;
    border-radius: 12px;
    background: rgba(28, 28, 28, 0.025);
    border: 1px solid var(--brand-line);
}

.inv-no-stock {
    font-size: 0.85rem;
    padding: 4px 0;
}

/* Right: total */
.inv-product-total {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    padding-top: 2px;
}

.inv-total-label {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--brand-steel);
}

.inv-total-value {
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1;
    color: var(--brand-charcoal);
}

.inv-total-zero {
    color: var(--brand-steel);
    opacity: 0.5;
}

.inv-total-sub {
    font-size: 0.76rem;
    color: var(--brand-steel);
}

/* Responsive */
@media (max-width: 900px) {
    .inv-product-card {
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
    }

    .inv-product-info {
        grid-column: 1;
        grid-row: 1;
    }

    .inv-product-total {
        grid-column: 2;
        grid-row: 1;
        align-items: flex-end;
    }

    .inv-warehouse-grid {
        grid-column: 1 / -1;
        grid-row: 2;
    }
}

@media (max-width: 600px) {
    .inv-product-card {
        grid-template-columns: 1fr;
    }

    .inv-product-total {
        flex-direction: row;
        align-items: baseline;
        gap: 8px;
    }

    .inv-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   COLOR GRADING SYSTEM
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── New pill variants ──────────────────────────────────────────────────── */

.pill.info {
    background: rgba(59, 130, 246, 0.12);
    color: #1d4ed8;
}

.pill.purple {
    background: rgba(139, 92, 246, 0.12);
    color: #6d28d9;
}

/* ─── Table row grades ───────────────────────────────────────────────────── */

/* Out of stock — red tint */
tr.row-out-of-stock td {
    background: rgba(237, 82, 88, 0.04);
}
tr.row-out-of-stock:hover td {
    background: rgba(237, 82, 88, 0.07);
}

/* Low stock — amber tint */
tr.row-low-stock td {
    background: rgba(255, 159, 26, 0.05);
}
tr.row-low-stock:hover td {
    background: rgba(255, 159, 26, 0.09);
}

/* Needs action — blue-tint highlight for unassigned orders */
tr.row-needs-action td {
    background: rgba(59, 130, 246, 0.04);
}
tr.row-needs-action:hover td {
    background: rgba(59, 130, 246, 0.08);
}

/* Overdue pipeline — orange tint */
tr.row-overdue td {
    background: rgba(249, 115, 22, 0.05);
}
tr.row-overdue:hover td {
    background: rgba(249, 115, 22, 0.09);
}

/* Inactive rows — faded */
tr.row-inactive td {
    opacity: 0.65;
}
tr.row-inactive:hover td {
    opacity: 1;
}

/* ─── Stock cell ──────────────────────────────────────────────────────────── */

.stock-cell {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.stock-threshold {
    font-size: 0.72rem;
    color: var(--brand-steel);
    white-space: nowrap;
}

/* ─── Text helpers ───────────────────────────────────────────────────────── */

.text-danger  { color: var(--brand-red); font-weight: 700; }
.text-warning { color: var(--brand-amber); font-weight: 700; }
.text-success { color: var(--brand-green); font-weight: 700; }

/* ─── Deactivate button tint ─────────────────────────────────────────────── */

.btn-deactivate {
    color: var(--brand-red) !important;
    border-color: rgba(237, 82, 88, 0.22) !important;
}
.btn-deactivate:hover {
    background: rgba(237, 82, 88, 0.06) !important;
}

/* ─── Inventory card total grade colors ──────────────────────────────────── */

.inv-total-success { color: var(--brand-green); }
.inv-total-warning { color: var(--brand-amber); }
.inv-total-danger  { color: var(--brand-red); }

/* Low-stock warehouse chip */
.inv-wh-chip--low {
    background: rgba(255, 159, 26, 0.1);
    border: 1px solid rgba(255, 159, 26, 0.25);
    color: var(--brand-charcoal);
}
.inv-wh-chip--low .inv-wh-name { color: #92400e; }
.inv-wh-chip--low .inv-wh-qty  { color: var(--brand-amber); }

/* ─── Transfer route display ──────────────────────────────────────────────── */

.transfer-route {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    font-size: 0.88rem;
}

.transfer-arrow {
    color: var(--brand-steel);
    font-size: 1rem;
}

/* ─── Pagination ──────────────────────────────────────────────────────────── */

.tw-pagination {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    padding: 18px 0 4px;
}

.tw-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    border: 1px solid var(--brand-line);
    background: #fff;
    color: var(--brand-charcoal);
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    white-space: nowrap;
}

.tw-page-btn:hover {
    background: rgba(200, 111, 61, 0.07);
    border-color: rgba(200, 111, 61, 0.24);
    color: var(--brand-orange-deep);
}

.tw-page-btn.active {
    background: var(--brand-charcoal);
    border-color: var(--brand-charcoal);
    color: #fff;
    pointer-events: none;
}

.tw-page-btn.disabled {
    opacity: 0.35;
    pointer-events: none;
}

.tw-page-info {
    margin-left: 8px;
    font-size: 0.82rem;
    color: var(--brand-steel);
    white-space: nowrap;
}

/* ─── Live search spinner ─────────────────────────────────────────────────── */

.search-loading {
    pointer-events: none;
    opacity: 0.6;
}

.search-loading input[data-search-input] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10' fill='none' stroke='%23c86f3d' stroke-width='3' stroke-dasharray='30 10' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='0.8s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px 16px;
    padding-right: 40px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ECOMMERCE ORDER BUILDER
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Page KPI strip ─────────────────────────────────────────────────────── */

.page-kpi-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}

@media (max-width: 900px) {
    .page-kpi-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ─── Two-column layout: browse left + cart right ────────────────────────── */

.order-builder-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    align-items: start;
    gap: 20px;
}

@media (max-width: 1100px) {
    .order-builder-layout {
        grid-template-columns: 1fr;
    }
}

.order-builder-left {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ─── Filter bar (client-side) ───────────────────────────────────────────── */

.ob-filter-bar {
    margin: 0;
}

.ob-filter-row {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.ob-filter-row .field {
    flex: 1;
    min-width: 140px;
    margin: 0;
}

.ob-filter-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 2px;
    flex-shrink: 0;
}

.ob-result-count {
    font-size: 0.8rem;
    white-space: nowrap;
}

/* ─── Category section ───────────────────────────────────────────────────── */

.ob-category-section {
    background: #fff;
    border: 1px solid var(--brand-line);
    border-radius: 14px;
    padding: 18px 18px 20px;
}

.ob-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--brand-line);
}

.ob-category-header h2 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--brand-charcoal);
    margin: 0 0 4px;
}

/* ─── Product card grid ──────────────────────────────────────────────────── */

.ob-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 14px;
}

/* ─── Individual product card ────────────────────────────────────────────── */

.ob-product-card {
    display: flex;
    flex-direction: column;
    border: 1.5px solid var(--brand-line);
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
    transition: box-shadow 0.16s ease, border-color 0.16s ease, transform 0.12s ease;
    user-select: none;
}

.ob-product-card:hover {
    box-shadow: 0 6px 24px rgba(17, 24, 39, 0.1);
    border-color: rgba(200, 111, 61, 0.35);
    transform: translateY(-2px);
}

/* Card image area */
.ob-card-image-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: var(--brand-bg);
    overflow: hidden;
    border-bottom: 1px solid var(--brand-line);
}

.ob-card-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 16px;
}

/* Stock badge overlaid on image */
.ob-card-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
    line-height: 1.4;
    letter-spacing: 0.03em;
}

.ob-card-badge.badge-success {
    background: #dcfce7;
    color: #15803d;
}

.ob-card-badge.badge-warning {
    background: #fef9c3;
    color: #a16207;
}

.ob-card-badge.badge-danger {
    background: #fee2e2;
    color: #b91c1c;
}

/* Card body */
.ob-card-body {
    padding: 12px 12px 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.ob-card-meta-tags {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-bottom: 2px;
}

.ob-card-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--brand-charcoal);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ob-card-sku {
    font-size: 0.72rem;
    color: var(--brand-steel);
}

.ob-card-price-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-top: 6px;
}

.ob-card-price {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--brand-charcoal);
    letter-spacing: -0.01em;
}

.ob-card-price-gst {
    font-size: 0.72rem;
    color: var(--brand-steel);
    display: block;
    margin-top: 1px;
}

.ob-card-stock-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.ob-stock-label {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 20px;
}

.ob-stock-in {
    background: #dcfce7;
    color: #15803d;
}

.ob-stock-out {
    background: #fee2e2;
    color: #b91c1c;
}

.ob-stock-order {
    background: #fef9c3;
    color: #a16207;
}

.ob-moq-label {
    font-size: 0.7rem;
}

/* Card footer: qty stepper */
.ob-card-footer {
    padding: 10px 12px 12px;
    border-top: 1px solid var(--brand-line);
    background: var(--brand-bg);
}

.ob-qty-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ob-qty-hint {
    display: block;
    font-size: 0.68rem;
    color: var(--brand-steel);
    margin-top: 5px;
}

.ob-view-btn {
    flex-shrink: 0;
    font-size: 0.73rem !important;
    padding: 5px 10px !important;
    white-space: nowrap;
}

/* ─── Qty stepper ────────────────────────────────────────────────────────── */

.order-quantity-control {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--brand-line);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    flex: 1;
}

.order-qty-btn {
    width: 30px;
    height: 30px;
    border: none;
    background: var(--brand-bg);
    color: var(--brand-charcoal);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    line-height: 1;
    flex-shrink: 0;
    transition: background 0.12s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.order-qty-btn:hover {
    background: rgba(200, 111, 61, 0.14);
    color: var(--brand-orange-deep);
}

.order-qty-input {
    flex: 1;
    min-width: 0;
    height: 30px;
    border: none;
    border-left: 1.5px solid var(--brand-line);
    border-right: 1.5px solid var(--brand-line);
    border-radius: 0;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--brand-charcoal);
    background: #fff;
    outline: none;
    -moz-appearance: textfield;
}

.order-qty-input::-webkit-outer-spin-button,
.order-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* ─── Sticky cart panel ──────────────────────────────────────────────────── */

.ob-cart-panel {
    position: sticky;
    top: 20px;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 100px);
    padding: 0;
    overflow: hidden;
}

.ob-cart-header {
    padding: 18px 18px 14px;
    border-bottom: 1px solid var(--brand-line);
}

.ob-cart-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 4px;
}

.ob-cart-title-row h2 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--brand-charcoal);
    margin: 0;
}

.ob-cart-badge {
    background: var(--brand-charcoal);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
    border-radius: 20px;
    padding: 2px 10px;
    min-width: 28px;
    text-align: center;
    line-height: 1.6;
}

.ob-cart-header .muted {
    font-size: 0.76rem;
}

.ob-cart-totals {
    padding: 12px 18px;
    border-bottom: 1px solid var(--brand-line);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ob-cart-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    color: var(--brand-steel);
}

.ob-cart-total-row strong {
    font-weight: 700;
    color: var(--brand-charcoal);
}

.ob-cart-total-highlight {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--brand-charcoal);
    border-top: 1px dashed var(--brand-line);
    padding-top: 6px;
}

.ob-cart-total-highlight strong {
    font-size: 1rem;
    font-weight: 800;
    color: var(--brand-orange-deep);
}

/* Scrollable item list */
.ob-cart-items-wrap {
    flex: 1;
    overflow-y: auto;
    padding: 12px 18px;
    scrollbar-width: thin;
    scrollbar-color: var(--brand-line) transparent;
}

.ob-cart-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ob-cart-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    background: var(--brand-bg);
    border: 1px solid var(--brand-line);
    border-radius: 10px;
}

.ob-cart-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.ob-cart-item-info strong {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--brand-charcoal);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ob-cart-item-info span {
    font-size: 0.71rem;
    color: var(--brand-steel);
}

.ob-cart-item-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    flex-shrink: 0;
}

.ob-cart-item-qty {
    font-size: 0.73rem;
    color: var(--brand-steel);
}

.ob-cart-item-total {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--brand-charcoal);
}

.ob-cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 28px 16px;
    color: var(--brand-steel);
    text-align: center;
}

.ob-cart-empty svg {
    opacity: 0.3;
}

.ob-cart-empty span {
    font-size: 0.82rem;
    line-height: 1.5;
}

/* Cart CTA */
.ob-cart-cta {
    padding: 14px 18px 18px;
    border-top: 1px solid var(--brand-line);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ob-checkout-btn {
    width: 100%;
    text-align: center;
    justify-content: center;
}

.ob-cart-cta .muted {
    font-size: 0.72rem;
    text-align: center;
    line-height: 1.5;
}

/* ─── Checkout section ───────────────────────────────────────────────────── */

.ob-review-section {
    margin-top: 20px;
}

.ob-review-empty {
    padding: 18px;
    border: 1px dashed var(--brand-line);
    border-radius: 14px;
    background: rgba(28, 28, 28, 0.025);
    color: var(--brand-steel);
    font-size: 0.9rem;
    text-align: center;
}

.ob-review-table {
    min-width: 760px;
}

.ob-review-table td strong {
    display: block;
}

.ob-review-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
    gap: 12px;
    align-items: stretch;
    margin-top: 16px;
}

.ob-review-summary > div {
    display: grid;
    gap: 4px;
    padding: 14px;
    border: 1px solid var(--brand-line);
    border-radius: 14px;
    background: rgba(28, 28, 28, 0.025);
}

.ob-review-summary span {
    color: var(--brand-steel);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ob-review-summary strong {
    color: var(--brand-charcoal);
    font-size: 1.05rem;
}

.ob-review-summary .button {
    min-height: 100%;
    align-self: stretch;
    justify-content: center;
}

.ob-checkout-section {
    margin-top: 20px;
}

.ob-checkout-section[hidden] {
    display: none;
}

.checkout-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.checkout-address-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

@media (max-width: 900px) {
    .ob-review-summary {
        grid-template-columns: 1fr;
    }

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

    .checkout-address-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.checkout-submit-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--brand-line);
    margin-top: 20px;
    flex-wrap: wrap;
}

.checkout-submit-copy {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.checkout-submit-copy strong {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--brand-charcoal);
}

.checkout-submit-copy span {
    font-size: 0.8rem;
    color: var(--brand-steel);
}

.cart-review-panel {
    display: grid;
    gap: 18px;
}

.cart-summary-pills,
.cart-action-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.cart-line-list,
.checkout-summary-lines {
    display: grid;
    gap: 12px;
}

.cart-line-card {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) auto minmax(160px, auto);
    align-items: center;
    gap: 18px;
    padding: 14px;
    border: 1px solid var(--brand-line);
    border-radius: 18px;
    background: #fff;
}

.cart-line-product {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.cart-line-product img {
    width: 72px;
    height: 72px;
    object-fit: contain;
    border: 1px solid var(--brand-line);
    border-radius: 16px;
    background: var(--brand-bg);
    padding: 8px;
    flex: 0 0 auto;
}

.cart-line-product div,
.cart-line-money,
.checkout-summary-line div {
    display: grid;
    gap: 4px;
}

.cart-line-product strong,
.checkout-summary-line strong {
    color: var(--brand-charcoal);
    line-height: 1.25;
}

.cart-line-product span,
.checkout-summary-line span,
.cart-line-money span {
    color: var(--brand-steel);
    font-size: 0.84rem;
}

.cart-line-qty {
    width: 132px;
}

.cart-line-money {
    text-align: right;
}

.cart-line-money strong {
    font-size: 1rem;
    color: var(--brand-orange-deep);
}

.cart-action-row {
    align-items: center;
}

.checkout-page-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 20px;
    align-items: start;
}

.checkout-main-panel {
    margin-top: 0;
}

.checkout-cart-summary {
    position: sticky;
    top: 20px;
}

.checkout-summary-line {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--brand-line);
}

.checkout-summary-line:last-child {
    border-bottom: 0;
}

.warehouse-snapshot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px;
}

.warehouse-snapshot-card {
    display: grid;
    gap: 6px;
    padding: 14px;
    border: 1px solid var(--brand-line);
    border-radius: 18px;
    background: #fff;
}

.warehouse-snapshot-card span:first-child {
    color: var(--brand-steel);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.warehouse-snapshot-card strong {
    color: var(--brand-charcoal);
    font-size: 1.45rem;
    line-height: 1;
}

.warehouse-snapshot-card small {
    color: var(--brand-steel);
}

@media (max-width: 1100px) {
    .checkout-page-grid,
    .cart-line-card {
        grid-template-columns: 1fr;
    }

    .cart-line-money {
        text-align: left;
    }

    .checkout-cart-summary {
        position: static;
    }
}

/* ─── Public landing + auth refresh ─────────────────────────────────────── */

.landing-shell,
.auth-shell-pro {
    width: min(1380px, calc(100% - 40px));
    margin: 0 auto;
    padding: 28px 0 40px;
}

.landing-topbar,
.auth-showcase-top,
.auth-login-header,
.auth-support-row,
.landing-summary-band,
.landing-section-title,
.landing-topbar-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.landing-topbar {
    margin-bottom: 28px;
    padding: 18px 22px;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--brand-line);
    box-shadow: var(--brand-shadow-soft);
}

.landing-brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.landing-brand img,
.auth-showcase-top img {
    width: 140px;
}

.landing-brand-copy,
.landing-feature-item,
.auth-mini-note,
.auth-trust-card,
.landing-stat,
.landing-role-card,
.landing-summary-copy {
    display: grid;
    gap: 6px;
}

.landing-brand-copy strong,
.landing-role-card h3,
.landing-side-card h2,
.landing-summary-copy h2,
.auth-mini-note strong,
.auth-trust-card strong {
    font-size: 1rem;
}

.landing-brand-copy span,
.landing-inline-link,
.auth-mini-note p,
.auth-trust-card span,
.landing-feature-item span,
.landing-role-card p,
.landing-summary-copy p {
    color: var(--brand-steel);
    line-height: 1.65;
}

.landing-inline-link {
    font-weight: 800;
    color: var(--brand-orange-deep);
}

.landing-hero-grid,
.auth-shell-pro {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.8fr);
    gap: 24px;
    align-items: stretch;
}

.auth-shell-admin {
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
}

.landing-hero-card,
.landing-side-card,
.landing-summary-band,
.landing-role-card,
.auth-showcase,
.auth-login-card {
    border-radius: 32px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--brand-line);
    box-shadow: var(--brand-shadow);
}

.landing-hero-card,
.auth-showcase,
.auth-login-card {
    padding: 32px;
}

.landing-side-column,
.auth-showcase,
.auth-login-card,
.auth-form-grid,
.auth-trust-grid {
    display: grid;
    gap: 18px;
}

.landing-side-card {
    padding: 24px;
}

.landing-side-card-dark {
    background: linear-gradient(180deg, #1f1f1f 0%, #272727 100%);
    color: #fff;
}

.landing-side-card-dark h2,
.landing-side-card-dark .landing-security-list li {
    color: #fff;
}

.landing-side-card-dark .landing-security-list li::marker {
    color: rgba(255, 255, 255, 0.7);
}

.landing-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--brand-orange-deep);
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.landing-hero-card h1,
.auth-showcase-copy h1 {
    margin: 10px 0 0;
    font-size: clamp(2.4rem, 5vw, 4.4rem);
    line-height: 0.96;
    letter-spacing: -0.06em;
}

.landing-copy,
.auth-showcase-copy p,
.auth-login-header p {
    margin: 0;
    color: var(--brand-steel);
    line-height: 1.78;
    font-size: 1rem;
}

.landing-cta-row,
.landing-stat-grid,
.landing-role-grid {
    display: grid;
    gap: 14px;
}

.landing-cta-row {
    grid-template-columns: repeat(3, max-content);
    align-items: center;
    margin-top: 8px;
}

.landing-stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 8px;
}

.landing-stat,
.landing-role-card,
.auth-trust-card,
.auth-mini-note {
    padding: 18px 20px;
    border-radius: 24px;
    background: #faf9f7;
    border: 1px solid var(--brand-line);
}

.landing-stat span,
.landing-role-tag {
    color: var(--brand-steel);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.landing-stat strong {
    font-size: 1.12rem;
}

.landing-stat small {
    color: var(--brand-steel);
    line-height: 1.55;
}

.landing-feature-list,
.landing-security-list {
    display: grid;
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.landing-section {
    margin-top: 24px;
    display: grid;
    gap: 16px;
}

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

.landing-summary-band {
    margin-top: 24px;
    padding: 28px 30px;
}

.landing-summary-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.auth-showcase {
    background:
        radial-gradient(circle at top right, rgba(200, 111, 61, 0.14), transparent 18rem),
        linear-gradient(180deg, #ffffff 0%, #fbfaf8 100%);
}

.auth-login-card {
    align-content: start;
}

.auth-role-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 20px;
    background: rgba(200, 111, 61, 0.12);
    color: var(--brand-orange-deep);
    font-size: 0.94rem;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.auth-role-switcher {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.auth-role-link {
    display: grid;
    gap: 4px;
    padding: 14px 16px;
    border-radius: 20px;
    border: 1px solid var(--brand-line);
    background: #ffffff;
    transition: 0.2s ease;
}

.auth-role-link strong {
    font-size: 0.95rem;
}

.auth-role-link span {
    color: var(--brand-steel);
    font-size: 0.82rem;
}

.auth-role-link.is-active,
.auth-role-link:hover {
    border-color: rgba(200, 111, 61, 0.25);
    background: rgba(200, 111, 61, 0.08);
    color: var(--brand-orange-deep);
}

.auth-support-row {
    align-items: stretch;
}

.auth-support-row > * {
    flex: 1 1 0;
}

.auth-submit {
    width: 100%;
}

.theme-auth .credentials,
.theme-auth-admin .credentials {
    margin: 0;
}

@media (max-width: 1180px) {
    .admin-overview-grid,
    .admin-overview-grid-analytics {
        grid-template-columns: 1fr;
    }

    .landing-hero-grid,
    .auth-shell-pro,
    .auth-shell-admin {
        grid-template-columns: 1fr;
    }

    .landing-role-grid,
    .landing-stat-grid {
        grid-template-columns: 1fr;
    }
}

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

    .landing-shell,
    .auth-shell-pro {
        width: min(100% - 24px, 100%);
        padding: 16px 0 28px;
    }

    .landing-topbar,
    .landing-summary-band,
    .landing-hero-card,
    .landing-side-card,
    .auth-showcase,
    .auth-login-card {
        padding: 22px;
        border-radius: 24px;
    }

    .landing-topbar,
    .landing-topbar-actions,
    .landing-cta-row,
    .landing-summary-band,
    .auth-showcase-top,
    .auth-login-header,
    .auth-support-row {
        flex-direction: column;
        align-items: stretch;
    }

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

    .landing-brand {
        align-items: flex-start;
    }

    .landing-brand img,
    .auth-showcase-top img {
        width: 122px;
    }

    .landing-hero-card h1,
    .auth-showcase-copy h1 {
        font-size: 2.2rem;
    }

    .auth-role-switcher {
        grid-template-columns: 1fr;
    }
}

/* ─── Tool World Distribution homepage redesign ─────────────────────────── */

/* ─── Tool World Distribution auth redesign ─────────────────────────────── */

.theme-auth-shell {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(242, 101, 34, 0.1), transparent 18rem),
        linear-gradient(180deg, #f7f6f4 0%, #fbfbfa 100%);
    color: var(--brand-charcoal);
}

.auth-ops-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(380px, 0.95fr) minmax(400px, 0.85fr);
}

.auth-ops-shell-admin {
    grid-template-columns: minmax(390px, 0.98fr) minmax(400px, 0.84fr);
}

.auth-ops-visual,
.auth-ops-panel {
    position: relative;
    min-width: 0;
}

.auth-ops-visual {
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(12, 12, 12, 0.12), rgba(12, 12, 12, 0.62)),
        url("/branding/toolworld-login-warehouse.png"),
        linear-gradient(140deg, #1f2021 0%, #343536 48%, #171717 100%);
    background-size: cover;
    background-position: center;
    color: #fff;
    padding: 44px 48px;
    display: grid;
    align-content: space-between;
    gap: 28px;
}

.auth-ops-visual::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 88px),
        repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 72px);
    opacity: 0.8;
    pointer-events: none;
}

.auth-ops-visual::after {
    content: "";
    position: absolute;
    left: 10%;
    right: 10%;
    top: 10%;
    bottom: 16%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    pointer-events: none;
}

.auth-ops-overlay,
.auth-ops-grid {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.auth-ops-overlay {
    background:
        linear-gradient(to right, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.12)),
        radial-gradient(circle at bottom left, rgba(255, 255, 255, 0.08), transparent 14rem);
}

.auth-ops-grid {
    background:
        linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.04) 100%);
    opacity: 0.55;
}

.auth-ops-brand,
.auth-ops-copy,
.auth-ops-badges,
.auth-visual-card {
    position: relative;
    z-index: 1;
}

.auth-ops-brand {
    display: inline-grid;
    justify-items: start;
    gap: 14px;
}

.auth-ops-brand img {
    width: 132px;
    height: auto;
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    filter: none;
}

.auth-ops-brand span {
    width: 38px;
    height: 3px;
    border-radius: 999px;
    background: #f26522;
}

.auth-visual-card {
    align-self: end;
    width: min(100%, 360px);
    display: grid;
    gap: 7px;
    padding: 22px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 24px;
    background: rgba(11, 12, 13, 0.58);
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(14px);
}

.auth-visual-card strong {
    color: #fff;
    font-size: 1.16rem;
    font-weight: 800;
}

.auth-visual-card span {
    color: rgba(255, 255, 255, 0.74);
    font-size: 0.92rem;
    line-height: 1.55;
}

.auth-ops-copy {
    max-width: 34rem;
    align-self: center;
}

.auth-ops-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.16em;
}

.auth-ops-visual .auth-ops-kicker {
    color: rgba(255, 255, 255, 0.82);
}

.auth-ops-panel .auth-ops-kicker {
    color: var(--brand-orange-deep);
}

.auth-ops-copy h1,
.auth-ops-header h2 {
    margin: 12px 0 0;
    font-family: var(--font-display);
    font-weight: 800;
    letter-spacing: -0.06em;
    color: inherit;
}

.auth-ops-copy h1 {
    max-width: 11ch;
    font-size: clamp(2.35rem, 4vw, 4rem);
    line-height: 0.98;
}

.auth-ops-copy p,
.auth-ops-header p,
.auth-ops-legal,
.auth-ops-badges article span {
    color: rgba(255, 255, 255, 0.78);
}

.auth-ops-copy p {
    max-width: 30rem;
    margin: 16px 0 0;
    font-size: 1rem;
    line-height: 1.72;
}

.auth-ops-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-self: end;
}

.auth-ops-badges article {
    min-width: 132px;
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(14px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}

.auth-ops-badges article span {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.auth-ops-badges article strong {
    display: block;
    margin-top: 6px;
    color: #fff;
    font-family: var(--font-display);
    font-size: 1.1rem;
    line-height: 1.2;
}

.auth-ops-panel {
    display: grid;
    align-items: center;
    padding: 34px 32px;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(10px);
}

.auth-ops-panel-inner {
    width: min(100%, 390px);
    display: grid;
    gap: 26px;
}

.auth-ops-panel-logo {
    width: 138px;
    height: auto;
}

.auth-ops-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.auth-ops-header h2 {
    font-size: clamp(2rem, 3vw, 3.2rem);
    line-height: 0.98;
    color: var(--brand-charcoal);
}

.auth-ops-header p {
    margin: 10px 0 0;
    color: var(--brand-steel);
    line-height: 1.6;
}

.auth-ops-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 999px;
    background: #f0eeeb;
    color: var(--brand-charcoal);
    white-space: nowrap;
}

.auth-ops-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, #a63b00 0%, #f26522 100%);
    box-shadow: 0 0 0 4px rgba(242, 101, 34, 0.12);
}

.auth-ops-role-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 6px;
    border-radius: 18px;
    background: #f3f1ee;
}

.auth-ops-role-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 14px;
    color: var(--brand-steel);
    font-size: 0.92rem;
    font-weight: 700;
    transition: 0.2s ease;
}

.auth-ops-role-tab.is-active,
.auth-ops-role-tab:hover {
    background: #ffffff;
    color: var(--brand-charcoal);
    box-shadow: 0 12px 28px rgba(26, 28, 28, 0.06);
}

.auth-ops-form {
    display: grid;
    gap: 18px;
}

.theme-auth-shell .field {
    display: grid;
    gap: 8px;
}

.theme-auth-shell .field label {
    color: var(--brand-charcoal-soft);
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.theme-auth-shell .field input {
    width: 100%;
    min-height: 56px;
    border: 0;
    border-radius: 16px;
    background: #fbfaf8;
    box-shadow: inset 0 0 0 1px rgba(26, 28, 28, 0.1);
    padding: 0 16px;
    font-size: 1rem;
    color: var(--brand-charcoal);
    transition: box-shadow 0.18s ease, background 0.18s ease;
}

.theme-auth-shell .field input:focus {
    outline: none;
    background: #fff;
    box-shadow: inset 0 0 0 1px rgba(166, 59, 0, 0.34), 0 0 0 4px rgba(242, 101, 34, 0.08);
}

.theme-auth-shell .field input::placeholder {
    color: #a0a0a0;
}

.theme-auth-shell .helper {
    color: var(--brand-steel);
    font-size: 0.82rem;
    line-height: 1.55;
}

.theme-auth-shell .password-control {
    position: relative;
}

.theme-auth-shell .password-control input {
    padding-right: 62px;
}

.theme-auth-shell .password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    min-width: 42px;
    min-height: 42px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--brand-steel);
    font-size: 0.84rem;
    font-weight: 700;
}

.auth-ops-form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.theme-auth-shell .remember {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--brand-steel);
    font-size: 0.92rem;
}

.theme-auth-shell .remember input {
    width: 16px;
    height: 16px;
    accent-color: #c86f3d;
}

.auth-ops-inline-link {
    color: var(--brand-orange-deep);
    font-size: 0.92rem;
    font-weight: 700;
}

.auth-ops-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 56px;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 800;
}

.auth-ops-footer {
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth-ops-footer span,
.auth-ops-links {
    color: #a1a1a1;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.18em;
}

.auth-ops-footer-line {
    flex: 1 1 auto;
    height: 1px;
    background: rgba(26, 28, 28, 0.08);
}

.auth-ops-legal {
    margin: 0;
    color: var(--brand-steel);
    font-size: 0.84rem;
    line-height: 1.7;
}

.auth-ops-links {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.auth-ops-links a,
.auth-ops-links span {
    color: inherit;
}

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

@media (max-width: 1100px) {
    .auth-ops-shell,
    .auth-ops-shell-admin {
        grid-template-columns: 1fr;
    }

    .auth-ops-visual {
        min-height: 44vh;
    }

    .auth-ops-panel {
        padding-top: 26px;
    }
}

@media (max-width: 760px) {
    .auth-ops-visual,
    .auth-ops-panel {
        padding: 24px 20px;
    }

    .auth-ops-panel-inner {
        width: 100%;
        gap: 22px;
    }

    .auth-ops-header,
    .auth-ops-form-row {
        flex-direction: column;
        align-items: stretch;
    }

    .auth-ops-copy h1 {
        font-size: 2.35rem;
    }

    .auth-ops-header h2 {
        font-size: 2.25rem;
    }

    .auth-ops-role-tabs {
        grid-template-columns: 1fr;
    }

    .auth-ops-links {
        gap: 12px;
    }

    .auth-ops-badges {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .auth-visual-card {
        width: 100%;
    }

    .twd-home-hero-balanced,
    .twd-home-flow-band {
        grid-template-columns: 1fr;
    }

    .twd-home-hero-visual-balanced,
    .twd-home-warehouse-card {
        min-height: 320px;
    }

    .twd-home-flow-list {
        grid-template-columns: 1fr;
    }
}

.twd-home-body {
    background: #f9f9f9;
    color: #1a1c1c;
}

.twd-home-shell {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 32px;
}

.twd-home-topbar {
    position: sticky;
    top: 14px;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 18px;
    margin-bottom: 28px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(26, 28, 28, 0.06);
    box-shadow: 0 12px 24px rgba(26, 28, 28, 0.05);
    backdrop-filter: blur(20px);
}

.twd-home-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-display);
    font-weight: 800;
    letter-spacing: -0.03em;
}

.twd-home-brand img {
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.twd-home-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    flex-wrap: wrap;
}

.twd-home-nav a,
.twd-home-link-btn {
    color: #594138;
    font-size: 0.9rem;
    font-weight: 600;
}

.twd-home-nav a.is-active {
    color: #a63b00;
    text-decoration: underline;
    text-underline-offset: 8px;
}

.twd-home-topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.twd-home-primary-btn,
.twd-home-secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 10px;
    font-family: var(--font-display);
    font-size: 0.92rem;
    font-weight: 800;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.twd-home-primary-btn {
    color: #fff;
    background: linear-gradient(135deg, #a63b00 0%, #f26522 100%);
    box-shadow: 0 10px 22px rgba(166, 59, 0, 0.18);
}

.twd-home-secondary-btn {
    color: #1a1c1c;
    background: #e8e8e8;
}

.twd-home-primary-btn:hover,
.twd-home-secondary-btn:hover,
.twd-home-link-btn:hover,
.twd-home-inline-link:hover {
    transform: translateY(-1px);
}

.twd-home-main {
    display: grid;
    gap: 44px;
}

.twd-home-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.92fr);
    gap: 42px;
    align-items: center;
    padding: 22px 4px 10px;
}

.twd-home-kicker {
    display: inline-flex;
    width: fit-content;
    padding: 6px 12px;
    border-radius: 999px;
    background: #ffdbce;
    color: #7f2b00;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.twd-home-hero-copy {
    display: grid;
    gap: 18px;
    max-width: 36rem;
}

.twd-home-hero-copy h1 {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(2.6rem, 5vw, 5.1rem);
    line-height: 0.92;
    letter-spacing: -0.08em;
}

.twd-home-hero-copy p {
    margin: 0;
    max-width: 32rem;
    color: #594138;
    font-size: 1.04rem;
    line-height: 1.7;
}

.twd-home-hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 6px;
}

.twd-home-hero-visual {
    position: relative;
    min-height: 420px;
}

.twd-home-visual-frame {
    position: relative;
    height: 100%;
    min-height: 420px;
    border-radius: 26px;
    background:
        linear-gradient(135deg, rgba(166, 59, 0, 0.05), rgba(242, 101, 34, 0.09)),
        linear-gradient(180deg, #ffffff 0%, #f3f3f3 100%);
    box-shadow: 0 14px 30px rgba(26, 28, 28, 0.06);
    overflow: hidden;
}

.twd-home-visual-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(26, 28, 28, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(26, 28, 28, 0.05) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.85), transparent 100%);
}

.twd-home-visual-core {
    position: absolute;
    inset: 54px 54px 54px 54px;
    border-radius: 20px;
    background:
        linear-gradient(135deg, rgba(26, 28, 28, 0.1), rgba(26, 28, 28, 0.02)),
        linear-gradient(180deg, #ffffff 0%, #f4f4f4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.twd-home-visual-core span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 74px;
    height: 74px;
    border-radius: 18px;
    background: linear-gradient(135deg, #a63b00 0%, #f26522 100%);
    color: #fff;
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 800;
    box-shadow: 0 16px 28px rgba(166, 59, 0, 0.22);
}

.twd-home-visual-card {
    position: absolute;
    left: 22px;
    bottom: 22px;
    display: grid;
    gap: 4px;
    width: min(260px, calc(100% - 44px));
    padding: 18px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 14px 28px rgba(26, 28, 28, 0.08);
    backdrop-filter: blur(12px);
}

.twd-home-visual-card strong {
    font-family: var(--font-display);
    font-size: 1rem;
}

.twd-home-visual-card span {
    color: #594138;
    font-size: 0.88rem;
    line-height: 1.55;
}

.twd-home-section,
.twd-home-security,
.twd-home-dark-band,
.twd-home-cta {
    padding: 10px 4px 0;
}

.twd-home-section-head {
    display: grid;
    gap: 8px;
    margin-bottom: 18px;
}

.twd-home-section-head h2,
.twd-home-security h2,
.twd-home-dark-intro h2,
.twd-home-cta-card h2 {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3vw, 2.9rem);
    letter-spacing: -0.05em;
    line-height: 0.98;
}

.twd-home-section-head p,
.twd-home-security-item p,
.twd-home-dark-intro p,
.twd-home-dark-card p,
.twd-home-cta-card p {
    margin: 0;
    color: #594138;
    line-height: 1.65;
}

.twd-home-role-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.twd-home-role-card {
    display: grid;
    gap: 16px;
    padding: 24px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(26, 28, 28, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.twd-home-role-card:hover,
.twd-home-dark-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 32px rgba(26, 28, 28, 0.08);
}

.twd-home-role-icon,
.twd-home-security-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #a63b00 0%, #f26522 100%);
    color: #fff;
    font-family: var(--font-display);
    font-weight: 800;
}

.twd-home-role-card h3,
.twd-home-role-card h2,
.twd-home-dark-card h3,
.twd-home-security-item strong {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.2rem;
    letter-spacing: -0.03em;
}

.twd-home-inline-link {
    color: #a63b00;
    font-weight: 800;
}

.twd-home-security {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.95fr);
    gap: 24px;
    align-items: center;
}

.twd-home-security-copy {
    display: grid;
    gap: 18px;
}

.twd-home-security-list {
    display: grid;
    gap: 18px;
}

.twd-home-security-item {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.twd-home-audit-card {
    padding: 24px;
    border-radius: 24px;
    background: linear-gradient(180deg, #f3f3f3 0%, #ffffff 100%);
    box-shadow: 0 12px 28px rgba(26, 28, 28, 0.06);
}

.twd-home-audit-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #594138;
}

.twd-home-audit-chip {
    padding: 6px 10px;
    border-radius: 999px;
    background: #ffdbce;
    color: #7f2b00;
}

.twd-home-audit-list {
    display: grid;
    gap: 10px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.82rem;
    color: #594138;
}

.twd-home-audit-list div {
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.92);
}

.twd-home-dark-band {
    display: grid;
    grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.5fr);
    gap: 24px;
    padding: 28px;
    border-radius: 28px;
    background: #1a1c1c;
    color: #f9f9f9;
}

.twd-home-dark-intro {
    display: grid;
    gap: 12px;
}

.twd-home-dark-intro p,
.twd-home-dark-card p {
    color: rgba(249, 249, 249, 0.72);
}

.twd-home-dark-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.twd-home-dark-card {
    display: grid;
    gap: 12px;
    padding: 22px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: transform 0.2s ease, background 0.2s ease;
}

.twd-home-dark-card h3 {
    color: #ffdbce;
}

.twd-home-cta-card {
    padding: 34px 28px;
    text-align: center;
    border-radius: 28px;
    background: linear-gradient(180deg, #ffffff 0%, #f4f4f4 100%);
    box-shadow: 0 12px 26px rgba(26, 28, 28, 0.06);
}

.twd-home-cta-actions {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    margin: 22px 0 14px;
}

.twd-home-footer {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 18px 4px 0;
    color: #8d7166;
    font-size: 0.78rem;
}

.twd-home-footer-brand {
    font-family: var(--font-display);
    font-weight: 800;
    color: #1a1c1c;
}

.twd-home-footer-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.twd-home-shell-minimal {
    width: min(1120px, calc(100% - 32px));
}

.twd-home-shell-balanced {
    width: min(1180px, calc(100% - 32px));
}

.twd-home-main-minimal {
    gap: 28px;
}

.twd-home-main-balanced {
    gap: 34px;
}

.twd-home-hero-minimal {
    grid-template-columns: 1fr;
    min-height: 360px;
    padding: 48px 4px 18px;
}

.twd-home-hero-minimal .twd-home-hero-copy {
    max-width: 760px;
}

.twd-home-footer-minimal {
    grid-template-columns: auto 1fr;
}

.twd-home-hero-balanced {
    grid-template-columns: minmax(0, 0.94fr) minmax(360px, 0.84fr);
    gap: 38px;
    padding: 34px 4px 14px;
}

.twd-home-hero-balanced .twd-home-hero-copy {
    max-width: 42rem;
}

.twd-home-hero-balanced .twd-home-hero-copy h1 {
    font-size: clamp(3rem, 5vw, 5.4rem);
}

.twd-home-hero-visual-balanced {
    min-height: 430px;
}

.twd-home-warehouse-card {
    position: relative;
    min-height: 430px;
    overflow: hidden;
    border-radius: 32px;
    background: #111315;
    box-shadow: 0 22px 50px rgba(26, 28, 28, 0.14);
}

.twd-home-warehouse-image {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(15, 16, 17, 0.05), rgba(15, 16, 17, 0.68)),
        url("/branding/toolworld-login-warehouse.png");
    background-size: cover;
    background-position: center 44%;
}

.twd-home-mini-panel {
    position: absolute;
    left: 22px;
    right: auto;
    bottom: 22px;
    width: min(360px, calc(100% - 44px));
    display: grid;
    gap: 5px;
    padding: 18px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 20px 42px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(14px);
}

.twd-home-mini-panel strong {
    color: var(--brand-charcoal);
    font-size: 1rem;
    font-weight: 850;
}

.twd-home-mini-panel span {
    color: #594138;
    line-height: 1.5;
}

.twd-home-flow-band {
    display: grid;
    grid-template-columns: minmax(240px, 0.72fr) minmax(0, 1fr);
    gap: 22px;
    align-items: center;
    padding: 28px;
    border-radius: 28px;
    background: #1a1c1c;
    color: #fff;
}

.twd-home-flow-band h2 {
    margin: 0 0 8px;
    color: #fff;
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 2.8vw, 2.4rem);
    line-height: 1;
    letter-spacing: -0.04em;
}

.twd-home-flow-band p {
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.6;
}

.twd-home-flow-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.twd-home-flow-list span {
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.86);
    font-weight: 700;
}

.transfer-availability-panel {
    display: grid;
    gap: 14px;
    padding: 16px;
    border: 1px solid rgba(17, 24, 39, 0.08);
    border-radius: 20px;
    background: #fafafa;
}

/* ─── ToolWorld public homepage v2 ─────────────────────────────────────── */
.twd-home-body {
    background: #ffffff;
    color: #111827;
}

.twd-home-shell-v2 {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background:
        radial-gradient(circle at 72% 14%, rgba(242, 101, 34, 0.12), transparent 28rem),
        linear-gradient(180deg, #ffffff 0%, #fff8f1 34%, #ffffff 66%);
}

.twd-home-topbar-v2 {
    top: 0;
    width: 100%;
    margin: 0;
    padding: 16px max(24px, calc((100vw - 1260px) / 2));
    border-radius: 0;
    border: 0;
    border-bottom: 1px solid rgba(17, 24, 39, 0.08);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 8px 24px rgba(17, 24, 39, 0.04);
}

.twd-home-brand-v2 {
    gap: 10px;
    min-width: max-content;
}

.twd-home-brand-v2 img {
    width: 42px;
    height: 42px;
    border-radius: 8px;
}

.twd-home-brand-v2 span {
    display: grid;
    line-height: 0.92;
}

.twd-home-brand-v2 strong {
    font-size: 1.12rem;
    letter-spacing: -0.04em;
}

.twd-home-brand-v2 small {
    color: #f04a12;
    font-size: 0.64rem;
    font-weight: 900;
    letter-spacing: 0.17em;
    text-transform: uppercase;
}

.twd-home-nav-v2 {
    flex: 1;
    justify-content: center;
    gap: 26px;
}

.twd-home-nav-v2 a {
    color: #374151;
    font-size: 0.87rem;
    font-weight: 900;
    letter-spacing: 0.01em;
}

.twd-home-nav-v2 a:hover {
    color: #f04a12;
}

.twd-home-topbar-actions-v2 {
    gap: 10px;
}

.twd-home-shell-v2 .twd-home-primary-btn,
.twd-home-shell-v2 .twd-home-secondary-btn {
    min-height: 42px;
    padding: 0 22px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.78rem;
    font-weight: 950;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.twd-home-shell-v2 .twd-home-primary-btn {
    background: linear-gradient(135deg, #ff3d00, #f97316);
    box-shadow: 0 16px 32px rgba(240, 74, 18, 0.22);
}

.twd-home-shell-v2 .twd-home-secondary-btn {
    background: #ffffff;
    border-color: rgba(17, 24, 39, 0.12);
    color: #374151;
    box-shadow: 0 8px 20px rgba(17, 24, 39, 0.06);
}

.twd-home-main-v2 {
    display: block;
}

.twd-home-hero-v2,
.twd-home-overview,
.twd-home-section-v2,
.twd-home-workflow,
.twd-home-use-case {
    width: min(1260px, calc(100% - 48px));
    margin: 0 auto;
}

.twd-home-hero-v2 {
    grid-template-columns: minmax(0, 0.95fr) minmax(420px, 1fr);
    gap: 48px;
    min-height: 780px;
    padding: 108px 0 64px;
}

.twd-home-hero-copy-v2 {
    max-width: 760px;
    justify-items: start;
}

.twd-home-kicker {
    background: rgba(255, 237, 213, 0.9);
    color: #c2410c;
    border: 1px solid rgba(249, 115, 22, 0.14);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.72rem;
    letter-spacing: 0.16em;
}

.twd-home-hero-copy-v2 h1 {
    max-width: 920px;
    font-size: clamp(3.6rem, 7.5vw, 6.5rem);
    line-height: 0.95;
    letter-spacing: -0.085em;
}

.twd-home-hero-copy-v2 h1 span,
.twd-home-final-cta h2 span {
    color: #ff3d00;
}

.twd-home-hero-copy-v2 p {
    max-width: 620px;
    color: #374151;
    font-size: 1.18rem;
    line-height: 1.7;
}

.twd-home-hero-tags {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    color: #9ca3af;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.twd-home-hero-tags span::before {
    content: "•";
    color: #f97316;
    margin-right: 8px;
}

.twd-home-console-card {
    align-self: end;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(17, 24, 39, 0.1);
    box-shadow: 0 32px 70px rgba(17, 24, 39, 0.15);
    backdrop-filter: blur(18px);
    overflow: hidden;
}

.twd-home-console-top {
    display: grid;
    grid-template-columns: 12px 12px 12px 1fr auto;
    gap: 8px;
    align-items: center;
    padding: 18px 22px;
    border-bottom: 1px solid rgba(17, 24, 39, 0.12);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.twd-home-console-top span {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: #ef4444;
}

.twd-home-console-top span:nth-child(2) {
    background: #f59e0b;
}

.twd-home-console-top span:nth-child(3) {
    background: #10b981;
}

.twd-home-console-top strong {
    margin-left: 18px;
    color: #374151;
    font-size: 0.78rem;
}

.twd-home-console-top em {
    padding: 7px 12px;
    border-radius: 999px;
    background: #f9fafb;
    color: #9ca3af;
    font-size: 0.7rem;
    font-style: normal;
}

.twd-home-console-body {
    display: grid;
    grid-template-columns: minmax(170px, 0.38fr) 1fr;
    gap: 22px;
    padding: 28px;
}

.twd-home-console-body aside,
.twd-home-console-body section {
    border: 1px solid rgba(17, 24, 39, 0.09);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.68);
}

.twd-home-console-body aside {
    display: grid;
    gap: 8px;
    padding: 22px;
}

.twd-home-console-body aside small,
.twd-home-console-metrics span,
.twd-home-dark-card-large small {
    color: #9ca3af;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.twd-home-console-body aside strong {
    margin-top: 12px;
    color: #d97706;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.84rem;
}

.twd-home-console-body aside span,
.twd-home-console-title span,
.twd-home-console-body p {
    color: #9ca3af;
    font-size: 0.84rem;
}

.twd-home-console-body section {
    display: grid;
    gap: 22px;
    padding: 26px;
}

.twd-home-console-title {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 18px;
}

.twd-home-console-title strong {
    display: block;
    color: #4b5563;
    font-size: 1.1rem;
}

.twd-home-console-title b {
    padding: 7px 12px;
    border: 1px solid rgba(16, 185, 129, 0.24);
    border-radius: 999px;
    color: #047857;
    font-size: 0.74rem;
    text-transform: uppercase;
}

.twd-home-console-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.twd-home-console-metrics div {
    padding: 20px;
    border-radius: 14px;
    background: #fffaf5;
    text-align: center;
}

.twd-home-console-metrics strong {
    display: block;
    margin-top: 8px;
    color: #d97706;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 1.25rem;
}

.twd-home-console-body p {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin: 0;
    padding-top: 16px;
    border-top: 1px solid rgba(17, 24, 39, 0.08);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    text-transform: uppercase;
}

.twd-home-console-body p a {
    color: #f04a12;
    font-weight: 900;
}

.twd-home-chip-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 28px max(24px, calc((100vw - 1260px) / 2));
    border-top: 1px solid rgba(17, 24, 39, 0.08);
    border-bottom: 1px solid rgba(17, 24, 39, 0.08);
    background: #ffffff;
}

.twd-home-chip-row strong {
    margin-right: auto;
    color: #9ca3af;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.72rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.twd-home-chip-row span {
    padding: 10px 16px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid rgba(17, 24, 39, 0.08);
    color: #4b5563;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.twd-home-overview {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(420px, 0.95fr);
    gap: 70px;
    align-items: center;
    padding: 110px 0;
}

.twd-home-overview h2,
.twd-home-section-head-v2 h2,
.twd-home-final-cta h2 {
    margin: 12px 0 0;
    color: #030712;
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 4vw, 4rem);
    line-height: 0.98;
    letter-spacing: -0.07em;
}

.twd-home-overview p,
.twd-home-section-head-v2 p {
    max-width: 720px;
    color: #4b5563;
    font-size: 1.08rem;
    line-height: 1.8;
}

.twd-home-dark-card-large {
    display: grid;
    gap: 24px;
    padding: 52px;
    border-radius: 28px;
    background:
        radial-gradient(circle at 100% 100%, rgba(249, 115, 22, 0.22), transparent 20rem),
        #171717;
    color: #ffffff;
    box-shadow: 0 24px 54px rgba(17, 24, 39, 0.2);
}

.twd-home-dark-card-large > i {
    color: #f97316;
    font-size: 2.4rem;
}

.twd-home-dark-card-large h3 {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(1.9rem, 3vw, 2.7rem);
    letter-spacing: -0.06em;
}

.twd-home-dark-card-large p {
    margin: 0;
    color: rgba(255, 255, 255, 0.66);
    line-height: 1.75;
}

.twd-home-dark-card-large div {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.22);
}

.twd-home-dark-card-large span {
    display: grid;
    gap: 8px;
}

.twd-home-dark-card-large strong {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 1rem;
}

.twd-home-security-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    padding: 38px max(24px, calc((100vw - 1260px) / 2));
    background: #111827;
    color: #ffffff;
}

.twd-home-security-strip div {
    display: grid;
    justify-items: center;
    gap: 7px;
    text-align: center;
}

.twd-home-security-strip i {
    color: #f97316;
    font-size: 1.45rem;
}

.twd-home-security-strip strong {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.88rem;
    letter-spacing: 0.04em;
}

.twd-home-security-strip span {
    color: rgba(255, 255, 255, 0.56);
    font-size: 0.84rem;
}

.twd-home-section-v2,
.twd-home-workflow {
    padding: 110px 0 0;
}

.twd-home-section-head-v2 {
    justify-items: center;
    text-align: center;
    margin-bottom: 56px;
}

.twd-home-role-grid-v2,
.twd-home-feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
}

.twd-home-role-card-v2,
.twd-home-feature-grid article {
    padding: 34px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid rgba(17, 24, 39, 0.1);
    box-shadow: none;
}

.twd-home-role-card-v2 p,
.twd-home-feature-grid p {
    color: #6b7280;
    line-height: 1.7;
}

.twd-home-role-card-v2 ul {
    display: grid;
    gap: 7px;
    margin: 0;
    padding: 18px 0 0 18px;
    border-top: 1px solid rgba(17, 24, 39, 0.08);
    color: #4b5563;
    line-height: 1.55;
}

.twd-home-role-icon {
    background: #fff7ed;
    color: #f04a12;
}

.twd-home-role-card-blue .twd-home-role-icon {
    background: #eff6ff;
    color: #2563eb;
}

.twd-home-role-card-violet .twd-home-role-icon {
    background: #faf5ff;
    color: #a21caf;
}

.twd-home-role-button {
    display: inline-flex;
    justify-content: center;
    margin-top: auto;
    padding: 14px 18px;
    border-radius: 12px;
    background: #ff3d00;
    color: #ffffff;
    font-weight: 950;
}

.twd-home-role-card-blue .twd-home-role-button {
    background: #2563eb;
}

.twd-home-role-card-violet .twd-home-role-button {
    background: #a21caf;
}

.twd-home-feature-grid article {
    min-height: 210px;
}

.twd-home-feature-grid i {
    display: inline-flex;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    margin-bottom: 22px;
    border-radius: 12px;
    background: #fff7ed;
    color: #f97316;
    font-size: 1.2rem;
}

.twd-home-feature-grid h3,
.twd-home-workflow h3 {
    margin: 0 0 12px;
    color: #111827;
    font-family: var(--font-display);
    font-size: 1.25rem;
    letter-spacing: -0.035em;
}

.twd-home-workflow {
    width: 100%;
    padding: 110px max(24px, calc((100vw - 1260px) / 2));
    background: #f7f5f1;
}

.twd-home-workflow-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(280px, 1fr);
    gap: 22px;
    overflow-x: auto;
    padding-bottom: 10px;
    scroll-snap-type: x proximity;
}

.twd-home-workflow-row article {
    min-height: 260px;
    scroll-snap-align: start;
    display: grid;
    align-content: start;
    gap: 14px;
    padding: 28px;
    border-radius: 22px;
    background: #ffffff;
    border: 1px solid rgba(17, 24, 39, 0.1);
}

.twd-home-workflow-row article:nth-child(even) {
    background: #171717;
    color: #ffffff;
}

.twd-home-workflow-row span,
.twd-home-workflow-row small,
.twd-home-use-panel > span {
    width: fit-content;
    padding: 6px 10px;
    border-radius: 8px;
    background: #f3f4f6;
    color: #6b7280;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.twd-home-workflow-row article:nth-child(even) span {
    background: #ff3d00;
    color: #ffffff;
}

.twd-home-workflow-row p {
    margin: 0;
    color: #6b7280;
    line-height: 1.7;
}

.twd-home-workflow-row article:nth-child(even) p {
    color: rgba(255, 255, 255, 0.68);
}

.twd-home-workflow-row small {
    margin-top: auto;
    color: #047857;
    background: #ecfdf5;
}

.twd-home-use-case {
    display: grid;
    grid-template-columns: minmax(300px, 0.65fr) minmax(0, 1.35fr);
    gap: 34px;
    align-items: stretch;
    padding: 110px 0;
}

.twd-home-use-tabs {
    display: grid;
    gap: 12px;
    padding: 12px;
    border-radius: 24px;
    background: #f9fafb;
    border: 1px solid rgba(17, 24, 39, 0.08);
}

.twd-home-use-tabs a {
    display: grid;
    gap: 4px;
    padding: 22px;
    border-radius: 18px;
    color: #6b7280;
}

.twd-home-use-tabs a.is-active {
    color: #111827;
    background: #ffffff;
    border: 1px solid rgba(240, 74, 18, 0.34);
}

.twd-home-use-tabs strong {
    color: inherit;
}

.twd-home-use-tabs span {
    color: #9ca3af;
}

.twd-home-use-panel {
    display: grid;
    gap: 22px;
    padding: 48px;
    border-radius: 28px;
    background:
        radial-gradient(circle at 100% 0%, rgba(249, 115, 22, 0.15), transparent 18rem),
        #171717;
    color: #ffffff;
    box-shadow: 0 24px 54px rgba(17, 24, 39, 0.2);
}

.twd-home-use-panel > span {
    background: #ff3d00;
    color: #ffffff;
}

.twd-home-use-panel h2 {
    margin: 0;
    font-size: clamp(2rem, 3vw, 3rem);
    line-height: 1;
    letter-spacing: -0.06em;
}

.twd-home-use-panel p {
    max-width: 780px;
    color: rgba(255, 255, 255, 0.68);
    line-height: 1.75;
}

.twd-home-use-panel div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.72);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.82rem;
}

.twd-home-use-panel div strong {
    color: #10b981;
    text-transform: uppercase;
}

.twd-home-use-panel a {
    justify-self: end;
    margin-top: 48px;
    padding: 14px 22px;
    border-radius: 12px;
    background: #ff3d00;
    color: #ffffff;
    font-weight: 950;
}

.twd-home-final-cta {
    display: grid;
    justify-items: center;
    gap: 20px;
    padding: 100px 24px;
    background:
        radial-gradient(circle at 50% 0%, rgba(249, 115, 22, 0.14), transparent 28rem),
        #fff7ed;
    text-align: center;
}

.twd-home-final-cta h2 {
    max-width: 760px;
}

.twd-home-final-cta p {
    margin: 0;
    color: #4b5563;
    font-size: 1.05rem;
}

.twd-home-final-cta div {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
}

.twd-home-footer-v2 {
    grid-template-columns: auto 1fr auto;
    width: min(1260px, calc(100% - 48px));
    margin: 0 auto;
    padding: 34px 0 44px;
}

.twd-home-footer-v2 .twd-home-footer-links {
    gap: 26px;
}

.twd-home-footer-v2 a {
    color: #6b7280;
    font-weight: 800;
}

@media (max-width: 1120px) {
    .twd-home-nav-v2 {
        display: none;
    }

    .twd-home-hero-v2,
    .twd-home-overview,
    .twd-home-use-case {
        grid-template-columns: 1fr;
    }

    .twd-home-security-strip,
    .twd-home-role-grid-v2,
    .twd-home-feature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .twd-home-console-card {
        align-self: stretch;
    }
}

@media (max-width: 760px) {
    .twd-home-topbar-v2,
    .twd-home-topbar-actions-v2,
    .twd-home-hero-actions,
    .twd-home-footer-v2 {
        align-items: stretch;
        flex-direction: column;
    }

    .twd-home-topbar-v2 {
        position: relative;
        padding: 14px 18px;
    }

    .twd-home-topbar-actions-v2 {
        width: 100%;
    }

    .twd-home-shell-v2 .twd-home-primary-btn,
    .twd-home-shell-v2 .twd-home-secondary-btn {
        width: 100%;
    }

    .twd-home-hero-v2 {
        width: min(100% - 32px, 1260px);
        min-height: auto;
        padding: 54px 0 42px;
    }

    .twd-home-hero-copy-v2 h1 {
        font-size: clamp(3rem, 16vw, 4.5rem);
    }

    .twd-home-console-top {
        grid-template-columns: 10px 10px 10px 1fr;
    }

    .twd-home-console-top em {
        display: none;
    }

    .twd-home-console-body,
    .twd-home-console-metrics,
    .twd-home-dark-card-large div,
    .twd-home-security-strip,
    .twd-home-role-grid-v2,
    .twd-home-feature-grid {
        grid-template-columns: 1fr;
    }

    .twd-home-chip-row {
        justify-content: flex-start;
    }

    .twd-home-chip-row strong {
        width: 100%;
        margin: 0;
    }

    .twd-home-overview,
    .twd-home-section-v2,
    .twd-home-workflow,
    .twd-home-use-case {
        width: min(100% - 32px, 1260px);
        padding-top: 70px;
    }

    .twd-home-workflow {
        width: 100%;
        padding-inline: 16px;
    }

    .twd-home-use-panel,
    .twd-home-dark-card-large,
    .twd-home-role-card-v2,
    .twd-home-feature-grid article {
        padding: 26px;
    }

    .twd-home-use-panel div {
        display: grid;
    }

    .twd-home-use-panel a {
        justify-self: stretch;
        text-align: center;
    }

    .twd-home-footer-v2 {
        grid-template-columns: 1fr;
        width: min(100% - 32px, 1260px);
    }
}

.transfer-availability-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}

.transfer-availability-head div {
    display: grid;
    gap: 4px;
}

.transfer-availability-head strong {
    font-size: 0.95rem;
    color: #171717;
}

.transfer-availability-head span:not(.pill) {
    color: #737373;
    font-size: 0.82rem;
}

.transfer-availability-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 10px;
}

.transfer-stock-card {
    display: grid;
    gap: 5px;
    width: 100%;
    padding: 14px;
    text-align: left;
    border: 1px solid rgba(17, 24, 39, 0.08);
    border-radius: 16px;
    background: #ffffff;
    color: #171717;
    cursor: pointer;
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.transfer-stock-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(17, 24, 39, 0.08);
}

.transfer-stock-card span {
    font-size: 0.78rem;
    font-weight: 750;
    color: #525252;
}

.transfer-stock-card strong {
    font-size: 1.35rem;
    letter-spacing: -0.04em;
}

.transfer-stock-card small {
    color: #737373;
    font-size: 0.75rem;
}

.transfer-stock-card--success {
    border-color: rgba(22, 163, 74, 0.2);
}

.transfer-stock-card--warning {
    border-color: rgba(245, 158, 11, 0.3);
    background: #fffbeb;
}

.transfer-stock-card--danger {
    border-color: rgba(239, 68, 68, 0.22);
    background: #fef2f2;
    cursor: not-allowed;
}

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

.order-detail-hero {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-start;
    padding: 22px;
}

.order-detail-hero-main {
    display: grid;
    gap: 12px;
}

.order-detail-hero-main h2 {
    margin: 0;
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    letter-spacing: -0.06em;
}

.order-detail-ref-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.order-detail-ref-grid span {
    padding: 8px 12px;
    border-radius: 999px;
    background: #f5f5f5;
    color: #737373;
    font-size: 0.82rem;
}

.order-detail-ref-grid strong {
    color: #171717;
}

.order-detail-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    align-items: center;
}

.order-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.75fr);
    gap: 18px;
    align-items: start;
}

.order-detail-main,
.order-detail-side {
    min-width: 0;
}

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

.order-line-stack {
    display: grid;
    gap: 14px;
}

.order-line-card {
    display: grid;
    gap: 16px;
    padding: 16px;
    border: 1px solid rgba(17, 24, 39, 0.08);
    border-radius: 22px;
    background: #ffffff;
}

.order-line-top {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
}

.order-line-product {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.order-line-product strong {
    font-size: 1rem;
    color: #171717;
}

.order-line-product span,
.order-info-list span,
.order-transfer-list span {
    color: #737373;
    font-size: 0.84rem;
}

.order-line-metrics {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.order-line-metrics div {
    min-width: 90px;
    padding: 10px 12px;
    border-radius: 16px;
    background: #f7f7f7;
    text-align: right;
}

.order-line-metrics span,
.order-money-card span {
    display: block;
    color: #737373;
    font-size: 0.72rem;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.order-line-metrics strong {
    display: block;
    margin-top: 3px;
    font-size: 0.96rem;
}

.order-line-stock {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.order-stock-chip {
    display: grid;
    gap: 3px;
    padding: 11px 12px;
    border-radius: 15px;
    border: 1px solid rgba(17, 24, 39, 0.08);
    background: #fafafa;
}

.order-stock-chip strong {
    font-size: 0.78rem;
}

.order-stock-chip span {
    font-size: 0.92rem;
    font-weight: 850;
}

.order-stock-chip small {
    color: #737373;
    font-size: 0.72rem;
}

.order-stock-chip.is-good {
    background: #f0fdf4;
    border-color: rgba(22, 163, 74, 0.18);
}

.order-stock-chip.is-low {
    background: #fffbeb;
    border-color: rgba(245, 158, 11, 0.22);
}

.order-stock-chip.is-empty {
    background: #fafafa;
    color: #737373;
}

.order-line-form {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto;
    gap: 12px;
    align-items: end;
    padding: 14px;
    border-radius: 18px;
    background: #f8f8f8;
}

.order-line-form-action {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-end;
}

.order-transfer-details {
    padding: 12px 14px;
    border-radius: 16px;
    background: #f7f7f7;
}

.order-transfer-details summary {
    cursor: pointer;
    font-weight: 800;
    color: #171717;
}

.order-transfer-list {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.order-transfer-list div {
    display: grid;
    gap: 2px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #ffffff;
}

.order-money-card,
.order-info-list {
    display: grid;
    gap: 10px;
}

.order-money-card div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(17, 24, 39, 0.08);
}

.order-money-card div:last-child {
    border-bottom: 0;
}

.order-money-card .is-total {
    margin-top: 2px;
    padding: 14px;
    border-radius: 16px;
    background: #171717;
    color: #ffffff;
}

.order-money-card .is-total span {
    color: rgba(255, 255, 255, 0.72);
}

@media (max-width: 1120px) {
    .order-detail-grid,
    .order-line-form {
        grid-template-columns: 1fr;
    }

    .order-detail-hero,
    .order-line-top {
        flex-direction: column;
    }

    .order-detail-hero-actions,
    .order-line-metrics,
    .order-line-form-action {
        justify-content: flex-start;
    }
}

@media (max-width: 1080px) {
    .twd-home-topbar {
        flex-wrap: wrap;
    }

    .twd-home-nav {
        order: 3;
        width: 100%;
    }

    .twd-home-hero,
    .twd-home-security,
    .twd-home-dark-band {
        grid-template-columns: 1fr;
    }

    .twd-home-role-grid,
    .twd-home-dark-grid {
        grid-template-columns: 1fr;
    }

    .twd-home-footer {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 720px) {
    .twd-home-shell {
        width: min(100% - 20px, 100%);
        padding-top: 10px;
    }

    .twd-home-topbar,
    .twd-home-topbar-actions,
    .twd-home-hero-actions,
    .twd-home-cta-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .twd-home-hero {
        gap: 22px;
        padding-top: 8px;
    }

    .twd-home-hero-copy h1 {
        font-size: 2.5rem;
    }

    .twd-home-hero-visual,
    .twd-home-visual-frame {
        min-height: 300px;
    }

    .twd-home-visual-core {
        inset: 28px;
    }

    .twd-home-role-grid,
    .twd-home-dark-grid {
        grid-template-columns: 1fr;
    }
}

/* ─── Unified workspace sidebar for admin, stockist, and buyer portals ───── */
.theme-portal .admin-shell {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    min-height: 100vh;
    background: var(--console-bg);
}

.theme-portal .sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 9px;
    background: var(--console-surface);
    border-right: 1px solid var(--console-border);
    box-shadow: none;
}

.theme-portal .brand-lockup {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 8px 12px;
    border: 0;
    border-bottom: 1px solid var(--console-border);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.theme-portal .brand-lockup img {
    width: 118px;
    max-height: 32px;
    object-fit: contain;
}

.theme-portal .portal-role-chip {
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--console-soft);
    font-size: 0.62rem;
    line-height: 1;
    letter-spacing: 0.12em;
}

.theme-portal .nav-group {
    display: grid;
    gap: 5px;
    flex: 0 1 auto;
    align-content: start;
    justify-content: stretch;
}

.theme-portal .nav-section {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
    margin: 0;
}

.theme-portal .nav-section summary {
    list-style: none;
}

.theme-portal .nav-section summary::-webkit-details-marker {
    display: none;
}

.theme-portal .nav-section-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 8px 4px;
    cursor: pointer;
}

.theme-portal .nav-section-copy {
    display: grid;
    gap: 2px;
}

.theme-portal .nav-section-copy strong {
    color: var(--console-soft);
    font-size: 0.63rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.theme-portal .nav-section-copy small,
.theme-portal .nav-section-count {
    display: none;
}

.theme-portal .nav-section-links {
    display: grid;
    gap: 2px;
    padding: 0;
}

.theme-portal .nav-link {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 9px;
    min-height: 34px;
    margin: 0;
    padding: 7px 9px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--console-muted);
    box-shadow: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.theme-portal .nav-link:hover {
    background: var(--console-bg);
    color: var(--console-text);
    transform: none;
}

.theme-portal .nav-link.is-active {
    background: var(--console-accent-soft);
    color: var(--console-accent-deep);
}

.theme-portal .nav-link > i {
    width: 16px;
    flex: 0 0 16px;
    text-align: center;
    color: var(--console-soft);
    font-size: 15px;
}

.theme-portal .nav-link:hover > i {
    color: var(--console-text);
}

.theme-portal .nav-link.is-active > i {
    color: var(--console-accent-deep);
}

.theme-portal .nav-link-copy {
    display: grid;
    gap: 0;
    min-width: 0;
}

.theme-portal .nav-link-copy strong {
    overflow: hidden;
    color: inherit;
    font-size: 0.82rem;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.theme-portal .nav-link-copy small {
    overflow: hidden;
    color: var(--console-soft);
    font-size: 0.67rem;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.theme-portal .portal-nav-badge,
.theme-portal .nav-link-arrow {
    margin-left: auto;
    color: var(--console-soft);
    font-size: 0.85rem;
}

.theme-portal .portal-nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    border-radius: 999px;
    background: var(--console-accent-soft);
    color: var(--console-accent-deep);
    font-weight: 800;
}

.theme-portal .portal-user-block {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    padding: 9px;
    border-top: 1px solid var(--console-border);
}

.theme-portal .portal-user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(249, 99, 2, 0.12);
    color: var(--console-accent-deep);
    font-weight: 800;
}

.theme-portal .portal-user-info {
    display: grid;
    min-width: 0;
}

.theme-portal .portal-user-info strong,
.theme-portal .portal-user-info span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.theme-portal .portal-user-info strong {
    font-size: 0.82rem;
}

.theme-portal .portal-user-info span {
    color: var(--console-soft);
    font-size: 0.72rem;
}

.theme-portal .logout-button {
    width: 100%;
    min-height: 36px;
    border-radius: 9px;
    background: rgba(28, 28, 28, 0.08);
    color: var(--brand-charcoal);
}

@media (max-width: 860px) {
    .theme-portal .admin-shell {
        grid-template-columns: 1fr;
    }

    .theme-portal .sidebar {
        position: static;
        height: auto;
        max-height: none;
        flex-direction: column;
        flex-wrap: nowrap;
        min-height: auto;
    }

    .theme-portal .nav-group {
        grid-template-columns: 1fr;
    }

    .theme-portal .portal-user-block {
        margin-top: 0;
    }
}

/* Pricing filters must remain grid-based even after global filter overrides. */
.filter-bar.pricing-filter-bar {
    display: grid;
    grid-template-columns: minmax(220px, 1.35fr) repeat(2, minmax(160px, 1fr)) minmax(160px, 1fr) minmax(140px, 0.8fr) minmax(120px, 0.6fr) auto;
    gap: 12px;
    align-items: end;
}

.filter-bar.pricing-filter-bar .field {
    min-width: 0;
}

@media (max-width: 1380px) {
    .filter-bar.pricing-filter-bar {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .filter-bar.pricing-filter-bar .pricing-search-field,
    .filter-bar.pricing-filter-bar .pricing-filter-actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 780px) {
    .filter-bar.pricing-filter-bar {
        grid-template-columns: 1fr;
    }

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

/* ─── Operator / Warehouse panel layout cleanup ─────────────────────────── */

.theme-portal.theme-operator .portal-content {
    display: grid;
    gap: 14px;
    padding: 0 22px 28px;
}

.theme-portal.theme-operator .portal-topbar {
    margin-bottom: 8px;
    padding: 12px 18px 10px;
}

.theme-portal.theme-operator .portal-topbar-right,
.theme-portal.theme-operator .portal-topbar-user,
.theme-portal.theme-operator .report-filter-actions,
.theme-portal.theme-operator .ops-submit-bar {
    gap: 12px;
}

.theme-portal.theme-operator .portal-user-block {
    margin-top: 14px;
}

.theme-portal.theme-operator .sidebar > form {
    margin-top: auto;
}

.theme-portal.theme-operator .nav-group {
    gap: 4px;
}

.theme-portal.theme-operator .nav-section {
    margin: 0;
}

.theme-portal.theme-operator .nav-section-links {
    gap: 3px;
}

.theme-portal.theme-operator .ops-dashboard-kpis,
.theme-portal.theme-operator .ops-dashboard-grid,
.theme-portal.theme-operator .ops-transfer-top-grid,
.theme-portal.theme-operator .ops-section-block,
.theme-portal.theme-operator .ops-summary-hero {
    margin-bottom: 0;
}

.theme-portal.theme-operator .reports-shell,
.theme-portal.theme-operator .dashboard-shell,
.theme-portal.theme-operator .operator-dashboard-shell,
.theme-portal.theme-operator .operator-reports-shell,
.theme-portal.theme-operator .ops-product-picker,
.theme-portal.theme-operator .ops-rule-stack {
    gap: 14px;
}

.theme-portal.theme-operator .report-toolbar,
.theme-portal.theme-operator .operator-report-toolbar,
.theme-portal.theme-operator .ops-work-panel,
.theme-portal.theme-operator .ops-filter-panel,
.theme-portal.theme-operator .ops-picked-panel {
    display: grid;
    gap: 12px;
}

.theme-portal.theme-operator .report-filter-form,
.theme-portal.theme-operator .ops-batch-toolbar,
.theme-portal.theme-operator .ops-form-grid,
.theme-portal.theme-operator .ops-transfer-actions,
.theme-portal.theme-operator .ops-transfer-summary {
    gap: 14px 16px;
}

.theme-portal.theme-operator .report-filter-form .field,
.theme-portal.theme-operator .ops-batch-toolbar .field,
.theme-portal.theme-operator .ops-form-grid .field,
.theme-portal.theme-operator .ops-transfer-actions .field,
.theme-portal.theme-operator .ops-transfer-summary .ops-rule-card,
.theme-portal.theme-operator .ops-transfer-actions .ops-action-card {
    min-width: 0;
}

.theme-portal.theme-operator .ops-dashboard-grid,
.theme-portal.theme-operator .report-chart-grid,
.theme-portal.theme-operator .report-table-grid,
.theme-portal.theme-operator .customer-dashboard-grid,
.theme-portal.theme-operator .customer-insight-grid {
    align-items: stretch;
}

.theme-portal.theme-operator .ops-panel-fill,
.theme-portal.theme-operator .chart-panel,
.theme-portal.theme-operator .report-table-card,
.theme-portal.theme-operator .report-watch-card,
.theme-portal.theme-operator .ops-action-card,
.theme-portal.theme-operator .ops-summary-card,
.theme-portal.theme-operator .ops-rule-card,
.theme-portal.theme-operator .warehouse-snapshot-card,
.theme-portal.theme-operator .report-stat-card {
    height: 100%;
}

.theme-portal.theme-operator .section-title {
    margin-bottom: 0;
}

.theme-portal.theme-operator .ops-subsection-title {
    margin-top: 8px;
}

.theme-portal.theme-operator .table-responsive {
    margin-top: 2px;
    min-width: 0;
}

.theme-portal.theme-operator .ops-batch-table,
.theme-portal.theme-operator .ops-picked-table,
.theme-portal.theme-operator .ops-dashboard-table,
.theme-portal.theme-operator .operator-ledger-table,
.theme-portal.theme-operator .operator-report-table {
    table-layout: auto;
}

.theme-portal.theme-operator .clean-table th,
.theme-portal.theme-operator .clean-table td,
.theme-portal.theme-operator .ops-table th,
.theme-portal.theme-operator .ops-table td {
    vertical-align: top;
    overflow-wrap: normal;
    word-break: normal;
}

.theme-portal.theme-operator .ops-table th,
.theme-portal.theme-operator .operator-report-table th {
    white-space: nowrap;
}

.theme-portal.theme-operator .ops-dashboard-table td:first-child,
.theme-portal.theme-operator .operator-ledger-table td:first-child,
.theme-portal.theme-operator .operator-report-table td:first-child,
.theme-portal.theme-operator .ops-picked-table td:first-child {
    min-width: 220px;
}

.theme-portal.theme-operator .ops-picked-table td:last-child {
    width: 92px;
}

.theme-portal.theme-operator .ops-qty-cell {
    min-width: 120px;
}

.theme-portal.theme-operator .ops-product-line-copy,
.theme-portal.theme-operator .ops-product-result > div,
.theme-portal.theme-operator .stacked {
    min-width: 0;
}

.theme-portal.theme-operator .stacked strong,
.theme-portal.theme-operator .stacked span,
.theme-portal.theme-operator .ops-product-result strong,
.theme-portal.theme-operator .ops-product-result small {
    display: block;
    min-width: 0;
}

.theme-portal.theme-operator .stacked strong,
.theme-portal.theme-operator .ops-product-result strong {
    line-height: 1.35;
    white-space: normal;
    word-break: break-word;
}

.theme-portal.theme-operator .stacked .muted,
.theme-portal.theme-operator .ops-product-result small {
    margin-top: 3px;
    font-size: 0.74rem;
    line-height: 1.4;
    white-space: normal;
    word-break: break-word;
}

.theme-portal.theme-operator .ops-product-result {
    min-width: 0;
}

.theme-portal.theme-operator .ops-product-result em {
    white-space: nowrap;
}

.theme-portal.theme-operator .ops-product-search-card {
    grid-template-columns: minmax(0, 1fr) minmax(220px, 0.72fr);
    overflow: visible;
}

.theme-portal.theme-operator .ops-product-search,
.theme-portal.theme-operator .table-input,
.theme-portal.theme-operator input,
.theme-portal.theme-operator select,
.theme-portal.theme-operator textarea,
.theme-portal.theme-operator .tw-select,
.theme-portal.theme-operator .tw-select-button {
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

.theme-portal.theme-operator .tw-select-button,
.theme-portal.theme-operator .portal-topbar-meta strong,
.theme-portal.theme-operator .portal-topbar-meta span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.theme-portal.theme-operator .pill,
.theme-portal.theme-operator .badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    white-space: nowrap;
    word-break: keep-all;
    padding-inline: 10px;
}

.theme-portal.theme-operator .report-watch-item p,
.theme-portal.theme-operator .warehouse-snapshot-card span:first-child {
    word-break: break-word;
}

.theme-portal.theme-operator .ops-summary-card strong,
.theme-portal.theme-operator .ops-rule-card strong,
.theme-portal.theme-operator .warehouse-snapshot-card strong,
.theme-portal.theme-operator .report-stat-card strong {
    line-height: 1.05;
}

@media (max-width: 1180px) {
    .theme-portal.theme-operator .ops-product-search-card,
    .theme-portal.theme-operator .ops-batch-toolbar {
        grid-template-columns: 1fr;
    }

    .theme-portal.theme-operator .report-filter-form.operator-report-filter-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
    .theme-portal.theme-operator .portal-content {
        padding: 0 16px 24px;
    }

    .theme-portal.theme-operator .report-filter-form.operator-report-filter-form,
    .theme-portal.theme-operator .ops-form-grid,
    .theme-portal.theme-operator .ops-transfer-actions,
    .theme-portal.theme-operator .ops-transfer-summary {
        grid-template-columns: 1fr;
    }
}
