:root {
    --bg: #0e1012;
    --panel: #16191d;
    --panel-soft: #1d2126;
    --line: #2b3036;
    --text: #f4f5f6;
    --muted: #9aa2ad;
    --orange: #ef7d22;
    --orange-dark: #bd5d14;
    --input: #111418;
    --danger: #ffd5c8;
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

body {
    margin: 0;
    color: var(--text);
    background:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        var(--bg);
    background-size: 28px 28px;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    font-size: 14px;
}

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

.app-shell {
    display: grid;
    grid-template-columns: 248px 1fr;
    min-height: 100vh;
}

.sidebar {
    border-right: 1px solid var(--line);
    background: rgba(16, 18, 21, 0.94);
    padding: 18px 14px;
}

.brand,
.auth-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand strong {
    display: block;
    letter-spacing: 0;
}

.brand small {
    color: var(--muted);
    display: block;
    font-size: 12px;
    margin-top: 2px;
}

.brand-icon {
    display: block;
    flex: 0 0 auto;
    height: 34px;
    object-fit: contain;
    width: 34px;
}

.nav {
    display: grid;
    gap: 4px;
    margin-top: 28px;
}

.nav-link {
    border: 1px solid transparent;
    color: var(--text);
    padding: 9px 10px;
}

.nav-link.active {
    background: var(--panel-soft);
    border-color: var(--line);
}

.nav-link.muted {
    color: var(--muted);
}

.main {
    min-width: 0;
    padding: 22px;
}

.topbar {
    align-items: center;
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    margin: -22px -22px 22px;
    padding: 18px 22px;
}

.topbar h1,
.section-header h2 {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.15;
    margin: 3px 0 0;
}

.section-header h2 {
    font-size: 18px;
}

.eyebrow {
    color: var(--orange);
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.panel {
    background: rgba(22, 25, 29, 0.96);
    border: 1px solid var(--line);
    padding: 18px;
}

.panel.narrow {
    max-width: 520px;
}

.auth-screen {
    align-items: center;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    position: relative;
}

.login-screen {
    background:
        linear-gradient(rgba(255, 255, 255, 0.026) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.026) 1px, transparent 1px),
        radial-gradient(circle at 70% 26%, rgba(239, 125, 34, 0.14), transparent 34%),
        radial-gradient(circle at 16% 78%, rgba(110, 118, 128, 0.18), transparent 36%),
        linear-gradient(135deg, #0a0c0f 0%, #101318 44%, #0c0e11 100%);
    background-size: 28px 28px, 28px 28px, auto, auto, auto;
    margin: -22px;
    min-height: 100vh;
    overflow: hidden;
    padding: 28px;
}

.login-screen::before {
    background:
        radial-gradient(ellipse at center, transparent 42%, rgba(0, 0, 0, 0.54) 100%),
        linear-gradient(115deg, transparent 0%, rgba(255, 255, 255, 0.04) 43%, transparent 56%);
    content: "";
    inset: 0;
    opacity: 0.82;
    pointer-events: none;
    position: absolute;
}

.login-orb {
    border-radius: 999px;
    filter: blur(28px);
    opacity: 0.5;
    pointer-events: none;
    position: absolute;
}

.login-orb-one {
    background: rgba(239, 125, 34, 0.16);
    height: 280px;
    right: 10%;
    top: 12%;
    width: 280px;
}

.login-orb-two {
    background: rgba(88, 96, 106, 0.2);
    bottom: 8%;
    height: 330px;
    left: 4%;
    width: 330px;
}

.login-topline {
    align-items: center;
    display: flex;
    justify-content: flex-end;
    left: auto;
    max-width: none;
    padding: 0;
    position: absolute;
    right: 28px;
    top: 28px;
    width: auto;
    z-index: 1;
}

.login-pill {
    align-items: center;
    background: rgba(9, 11, 14, 0.62);
    border: 1px solid rgba(239, 125, 34, 0.56);
    border-radius: 999px;
    color: var(--orange);
    font-size: 11px;
    font-weight: 700;
    font-family: "Bahnschrift", "Arial Narrow", "Segoe UI", Arial, sans-serif;
    gap: 8px;
    letter-spacing: 0;
    display: inline-flex;
    min-height: 34px;
    padding: 0 12px;
    text-transform: uppercase;
}

.login-status-dot {
    background: var(--orange);
    border-radius: 50%;
    box-shadow: 0 0 7px rgba(239, 125, 34, 0.62);
    display: inline-block;
    flex: 0 0 auto;
    height: 7px;
    opacity: 1;
    position: relative;
    width: 7px;
}

.login-status-dot::after {
    animation: loginStatusPulse 2s ease-out infinite;
    border: 1px solid rgba(239, 125, 34, 0.62);
    border-radius: 50%;
    content: "";
    inset: -1px;
    opacity: 0;
    position: absolute;
}

@keyframes loginStatusPulse {
    0% {
        opacity: 0.55;
        transform: scale(0.72);
    }

    60% {
        opacity: 0.22;
    }

    100% {
        opacity: 0;
        transform: scale(2.2);
    }
}

@media (prefers-reduced-motion: reduce) {
    .login-status-dot::after {
        animation: none;
    }
}

.login-register-panel {
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.11);
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    left: 22px;
    margin: 0;
    padding: 16px 16px 0;
    position: absolute;
    top: calc(100% + 28px);
    width: calc(100% - 44px);
}

.login-register-panel::before {
    background: var(--orange);
    content: "";
    height: 1px;
    left: 50%;
    position: absolute;
    top: -1px;
    transform: translateX(-50%);
    width: 30px;
}

.login-register-copy {
    color: rgba(244, 245, 246, 0.52);
    font-family: "Bahnschrift", "Arial Narrow", "Segoe UI", Arial, sans-serif;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: uppercase;
}

.login-register-link {
    align-items: center;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(239, 125, 34, 0.46);
    border-radius: 3px;
    color: var(--text);
    display: inline-flex;
    font-family: "Bahnschrift", "Arial Narrow", "Segoe UI", Arial, sans-serif;
    font-size: 10px;
    font-weight: 700;
    justify-content: center;
    min-height: 28px;
    min-width: 0;
    padding: 4px 9px;
    text-transform: uppercase;
    transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, color 160ms ease, transform 160ms ease;
    white-space: nowrap;
}

.login-register-link:hover,
.login-register-link:focus-visible {
    background: rgba(239, 125, 34, 0.08);
    border-color: rgba(239, 125, 34, 0.72);
    box-shadow: 0 7px 18px rgba(0, 0, 0, 0.18);
    color: #fff;
    transform: translateY(-1px);
}

.login-stage {
    position: relative;
    width: min(390px, 100%);
    z-index: 1;
}

.login-card-accent {
    background: linear-gradient(90deg, transparent, rgba(239, 125, 34, 0.7), transparent);
    height: 1px;
    left: 22px;
    position: absolute;
    right: 22px;
    top: 0;
    z-index: 2;
}

.login-screen .login-card {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent 34%),
        rgba(18, 21, 25, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 8px;
    box-shadow:
        0 24px 80px rgba(0, 0, 0, 0.44),
        0 0 0 1px rgba(239, 125, 34, 0.06),
        0 0 54px rgba(239, 125, 34, 0.08);
    max-width: none;
    padding: 28px;
    position: relative;
    z-index: 1;
}

.login-screen .login-card::before {
    border: 1px solid rgba(239, 125, 34, 0.12);
    content: "";
    inset: 10px;
    pointer-events: none;
    position: absolute;
}

.auth-card {
    background: rgba(22, 25, 29, 0.98);
    border: 1px solid var(--line);
    max-width: 400px;
    padding: 24px;
    width: 100%;
}

.auth-card.wide {
    max-width: 460px;
}

.auth-brand {
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 22px;
}

.login-brand {
    align-items: center;
    flex-direction: row;
    gap: 13px;
    margin-bottom: 22px;
    text-align: left;
}

.login-card-icon {
    display: block;
    flex: 0 0 auto;
    height: 46px;
    object-fit: contain;
    width: 46px;
}

.login-brand h2 {
    font-family: "Bahnschrift", "Arial Narrow", "Segoe UI", Arial, sans-serif;
    font-size: 19px;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.1;
    margin: 0 0 5px;
    text-transform: uppercase;
}

.login-brand p {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.35;
    margin: 0;
}

.auth-logo {
    display: block;
    height: auto;
    max-height: 82px;
    max-width: 100%;
    object-fit: contain;
    width: 260px;
}

.login-brand .auth-logo {
    width: min(238px, 100%);
}

.login-form {
    gap: 14px;
}

.login-form label span {
    color: #aeb6c0;
    font-family: "Bahnschrift", "Arial Narrow", "Segoe UI", Arial, sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: uppercase;
}

.login-form input {
    background: rgba(9, 11, 14, 0.86);
    border-color: rgba(255, 255, 255, 0.11);
    height: 42px;
}

.login-form input:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 3px rgba(239, 125, 34, 0.1);
}

.login-submit {
    box-shadow: 0 10px 28px rgba(239, 125, 34, 0.18);
    height: 42px;
    margin-top: 4px;
    width: 100%;
}

.login-submit:hover {
    box-shadow: 0 12px 34px rgba(239, 125, 34, 0.26);
    transform: translateY(-1px);
}

.login-footer {
    align-items: center;
    bottom: 22px;
    color: rgba(244, 245, 246, 0.38);
    display: flex;
    font-size: 11px;
    gap: 9px;
    left: 28px;
    position: absolute;
    z-index: 1;
}

.login-beta {
    border: 1px solid rgba(239, 125, 34, 0.38);
    color: rgba(244, 245, 246, 0.5);
    font-size: 8px;
    font-family: "Bahnschrift", "Arial Narrow", "Segoe UI", Arial, sans-serif;
    font-weight: 800;
    line-height: 1;
    padding: 3px 5px;
    text-transform: uppercase;
}

.auth-subtitle {
    color: var(--muted);
    display: block;
    font-size: 12px;
    margin-top: 4px;
}

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

label span {
    color: var(--muted);
    display: block;
    font-size: 12px;
    margin-bottom: 6px;
}

input {
    background: var(--input);
    border: 1px solid var(--line);
    color: var(--text);
    font: inherit;
    height: 38px;
    outline: none;
    padding: 8px 10px;
    width: 100%;
}

select,
textarea {
    background: var(--input);
    border: 1px solid var(--line);
    color: var(--text);
    font: inherit;
    outline: none;
    padding: 8px 10px;
    width: 100%;
}

select {
    height: 38px;
}

textarea {
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible,
a:focus-visible {
    border-color: var(--orange);
    outline: 2px solid rgba(239, 125, 34, 0.35);
    outline-offset: 2px;
}

.button {
    border: 1px solid transparent;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    height: 38px;
    padding: 0 14px;
}

.button.small {
    align-items: center;
    display: inline-flex;
    font-size: 13px;
    height: 32px;
}

.button.primary {
    background: var(--orange);
    color: #111;
}

.button.primary:hover {
    background: #ff8a2b;
}

.button.secondary {
    background: transparent;
    border-color: var(--line);
    color: var(--text);
}

.alert {
    background: rgba(239, 125, 34, 0.12);
    border: 1px solid rgba(239, 125, 34, 0.45);
    color: var(--danger);
    margin-bottom: 14px;
    padding: 10px;
}

.notice {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--line);
    color: var(--text);
    margin: 14px 0;
    padding: 10px;
}

.muted-text {
    color: var(--muted);
}

.section-header.row,
.form-actions,
.actions {
    align-items: center;
    display: flex;
    gap: 8px;
}

.section-header.row {
    justify-content: space-between;
}

.filters {
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(240px, 1fr) 220px auto;
    margin: 14px 0;
}

.filters.catalog-filters {
    grid-template-columns: minmax(260px, 1fr) 180px auto;
}

.filters.orders-filters {
    grid-template-columns: 120px minmax(180px, 1fr) 150px 150px 220px auto;
}

.table-meta {
    color: var(--muted);
    display: flex;
    font-size: 12px;
    gap: 14px;
    margin: 8px 0 10px;
}

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

.data-table {
    border-collapse: collapse;
    min-width: 840px;
    width: 100%;
}

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

.data-table th {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.data-table td {
    font-size: 13px;
}

.data-table .wide-cell {
    min-width: 320px;
}

.compact-table {
    min-width: 0;
}

.actions form {
    display: inline;
}

.actions a,
.link-button {
    background: none;
    border: 0;
    color: var(--orange);
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    padding: 0;
}

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

.form-grid {
    display: grid;
    gap: 13px;
    margin-top: 14px;
}

.upload-form {
    max-width: 520px;
}

.stacked {
    margin-top: 16px;
}

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

.summary-grid div {
    border: 1px solid var(--line);
    padding: 10px;
}

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

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

.catalog-apply-block {
    align-items: center;
    border-top: 1px solid var(--line);
    display: flex;
    gap: 18px;
    justify-content: space-between;
    margin-top: 16px;
    padding-top: 16px;
}

.catalog-apply-block p {
    color: var(--muted);
    margin: 0;
}

.summary-grid strong {
    font-size: 18px;
}

.summary-grid span {
    color: var(--muted);
    font-size: 12px;
    margin-top: 3px;
}

.pagination {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 12px;
}

.pagination a {
    border: 1px solid var(--line);
    color: var(--orange);
    padding: 7px 10px;
}

.report-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: 1fr;
    margin-top: 12px;
}

.report-grid h3 {
    font-size: 15px;
    margin: 0 0 8px;
}

.order-workspace {
    display: grid;
    gap: 12px;
}

.order-head,
.selected-client,
.quick-add-row,
.order-footer {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.order-head h2 {
    font-size: 24px;
    line-height: 1.15;
    margin: 3px 0 0;
}

.order-meta {
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    font-size: 12px;
    gap: 8px;
}

.order-meta span,
.work-state [data-line-count],
.work-state [data-feedback]:not(:empty) {
    border: 1px solid var(--line);
    padding: 5px 8px;
}

.client-strip,
.selected-client,
.order-grid-panel,
.notes-block,
.order-footer {
    background: rgba(22, 25, 29, 0.96);
    border: 1px solid var(--line);
    padding: 12px;
}

.client-strip,
.selected-client {
    background:
        linear-gradient(90deg, rgba(239, 125, 34, 0.14), rgba(239, 125, 34, 0) 34%),
        linear-gradient(135deg, rgba(31, 35, 40, 0.98), rgba(18, 21, 25, 0.98));
    border-color: rgba(239, 125, 34, 0.72);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28), inset 3px 0 0 rgba(239, 125, 34, 0.92);
}

.client-strip .field-combo label {
    color: #c9d0d8;
}

.selected-client strong,
.selected-client small,
.muted-label {
    display: block;
}

.selected-client strong {
    font-size: 18px;
    line-height: 1.2;
}

.selected-client small,
.muted-label {
    color: var(--muted);
    font-size: 12px;
    margin-top: 3px;
}

.selected-client small {
    color: #c9d0d8;
}

.field-combo {
    position: relative;
    width: 100%;
}

.field-combo label {
    color: var(--muted);
    display: block;
    font-size: 12px;
    margin-bottom: 6px;
}

.product-search {
    flex: 1;
}

.quick-add-row {
    align-items: flex-end;
}

.quick-add-row [data-add-manual] {
    background: #242930;
    border-color: rgba(255, 255, 255, 0.13);
    color: #f5f7fa;
    flex: 0 0 auto;
    height: 38px;
    margin-bottom: 0;
    padding: 0 13px;
    white-space: nowrap;
}

.quick-add-row [data-add-manual]:hover:not(:disabled),
.quick-add-row [data-add-manual]:focus-visible:not(:disabled) {
    background: #2d333b;
    border-color: rgba(255, 255, 255, 0.2);
}

.lookup-results {
    background: #111418;
    border: 1px solid var(--line);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.35);
    left: 0;
    max-height: 292px;
    overflow: auto;
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    z-index: 20;
}

.lookup-item {
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--line);
    color: var(--text);
    cursor: pointer;
    display: block;
    padding: 8px 10px;
    text-align: left;
    width: 100%;
}

.lookup-item:hover,
.lookup-item:focus {
    background: var(--panel-soft);
}

.lookup-item strong,
.lookup-item small {
    display: block;
}

.lookup-item small {
    color: var(--muted);
    font-size: 12px;
    margin-top: 3px;
}

.order-table-wrap {
    margin-top: 10px;
}

.order-table {
    min-width: 1020px;
    table-layout: fixed;
}

.order-table th:nth-child(1),
.order-table td:nth-child(1) {
    width: 130px;
}

.order-table th:nth-child(2),
.order-table td:nth-child(2) {
    width: 360px;
}

.order-table th:nth-child(3),
.order-table td:nth-child(3) {
    width: 72px;
}

.order-table th:nth-child(4),
.order-table td:nth-child(4) {
    width: 170px;
}

.order-table th:nth-child(5),
.order-table td:nth-child(5),
.order-table th:nth-child(6),
.order-table td:nth-child(6),
.order-table th:nth-child(7),
.order-table td:nth-child(7) {
    width: 108px;
}

.order-table th:nth-child(8),
.order-table td:nth-child(8) {
    width: 64px;
}

.cell-input {
    height: 30px;
    padding: 5px 7px;
}

.qty-input {
    text-align: right;
}

.money-input {
    text-align: right;
}

.cell-input.invalid {
    border-color: #d46a4f;
}

.price-switch {
    align-items: center;
    display: flex;
    gap: 5px;
}

.price-switch button {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--muted);
    cursor: pointer;
    height: 26px;
    width: 28px;
}

.price-switch button.active {
    background: var(--orange);
    border-color: var(--orange);
    color: #111;
}

.price-switch button:disabled {
    cursor: not-allowed;
    opacity: 0.35;
}

.price-switch span {
    color: var(--text);
    font-size: 13px;
    margin-left: 4px;
}

.price-switch.single-price span {
    margin-left: 0;
}

.percent-input {
    max-width: 72px;
}

.muted-cell {
    color: var(--muted);
}

.icon-button {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--orange);
    cursor: pointer;
    font-size: 18px;
    height: 28px;
    line-height: 1;
    width: 28px;
}

.manual-line td {
    background: rgba(255, 255, 255, 0.018);
}

.inactive-manual {
    opacity: 0.62;
}

.line-flash td {
    animation: lineFlash 0.9s ease-out;
}

@keyframes lineFlash {
    0% { background: rgba(239, 125, 34, 0.22); }
    100% { background: transparent; }
}

.notes-block summary {
    color: var(--text);
    cursor: pointer;
    font-weight: 700;
}

.notes-block textarea {
    margin-top: 10px;
}

.work-state {
    color: var(--muted);
    display: flex;
    font-size: 12px;
    gap: 8px;
}

.order-entry-footer {
    align-items: flex-start;
}

.order-finance {
    align-items: stretch;
    display: grid;
    gap: 10px;
    justify-items: end;
}

.totals-box {
    display: grid;
    gap: 5px;
    min-width: 280px;
}

.totals-box div {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.totals-box span {
    color: var(--muted);
}

.totals-box strong {
    font-size: 14px;
}

.totals-box .grand-total {
    border-top: 1px solid var(--line);
    margin-top: 4px;
    padding-top: 7px;
}

.totals-box .grand-total strong {
    color: var(--orange);
    font-size: 18px;
}

.emit-button {
    min-width: 160px;
}

.order-entry-footer .emit-button {
    align-items: center;
    background: linear-gradient(180deg, #f28a2f 0%, var(--orange) 58%, #d85f13 100%);
    border: 1px solid rgba(255, 177, 83, 0.55);
    box-shadow: 0 10px 24px rgba(239, 125, 34, 0.16);
    color: #120b05;
    display: flex;
    font-weight: 800;
    justify-content: space-between;
    letter-spacing: 0;
    min-width: 0;
    padding: 11px 14px;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease, border-color 0.18s ease;
    width: 100%;
}

.order-entry-footer .emit-button:hover:not(:disabled),
.order-entry-footer .emit-button:focus-visible:not(:disabled) {
    border-color: rgba(255, 198, 126, 0.72);
    box-shadow: 0 13px 30px rgba(239, 125, 34, 0.22);
    filter: brightness(1.04);
    transform: translateY(-1px);
}

.order-entry-footer .emit-button:active:not(:disabled) {
    box-shadow: 0 8px 18px rgba(239, 125, 34, 0.16);
    transform: translateY(0);
}

.emit-button:disabled,
.button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.detail-grid {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-top: 14px;
}

.detail-grid div {
    border: 1px solid var(--line);
    padding: 10px;
}

.detail-grid span,
.notes-read span {
    color: var(--muted);
    display: block;
    font-size: 12px;
    margin-bottom: 5px;
}

.detail-grid strong {
    display: block;
    font-size: 13px;
}

.order-detail-table {
    min-width: 980px;
}

.notes-read {
    border: 1px solid var(--line);
    margin-top: 14px;
    padding: 12px;
}

.notes-read p {
    line-height: 1.45;
    margin: 0;
}

.danger-zone {
    align-items: center;
    background: rgba(255, 213, 200, 0.035);
    border: 1px solid rgba(255, 213, 200, 0.18);
    display: flex;
    justify-content: space-between;
    margin-top: 18px;
    padding: 14px;
}

.danger-zone p {
    color: var(--muted);
    margin: 4px 0 0;
}

.modal-backdrop {
    align-items: center;
    background: rgba(0, 0, 0, 0.68);
    display: flex;
    inset: 0;
    justify-content: center;
    padding: 18px;
    position: fixed;
    z-index: 60;
}

.modal-box {
    background: #15181c;
    border: 1px solid rgba(239, 125, 34, 0.65);
    max-width: 460px;
    padding: 18px;
    width: 100%;
}

.modal-box h3 {
    font-size: 18px;
    margin: 0 0 8px;
}

.modal-box p {
    color: var(--muted);
    line-height: 1.45;
    margin: 0 0 14px;
}

.dashboard-page {
    display: grid;
    gap: 14px;
}

.dashboard-head {
    align-items: end;
    display: flex;
    gap: 14px;
    justify-content: space-between;
}

.dashboard-head h2 {
    font-size: 24px;
    line-height: 1.15;
    margin: 3px 0 0;
}

.dashboard-filters {
    display: grid;
    gap: 8px;
    grid-template-columns: 170px 145px 145px 220px auto;
}

.dashboard-filters.commercial-filters {
    grid-template-columns: 170px 145px 145px auto;
}

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

.kpi-card,
.chart-panel {
    background: rgba(22, 25, 29, 0.96);
    border: 1px solid var(--line);
    padding: 14px;
}

.kpi-card span {
    color: var(--muted);
    display: block;
    font-size: 12px;
    margin-bottom: 8px;
}

.kpi-card strong {
    display: block;
    font-size: 22px;
    line-height: 1.1;
}

.chart-panel canvas {
    display: block;
    margin-top: 10px;
    width: 100%;
}

.selected-row td {
    background: rgba(239, 125, 34, 0.08);
}

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

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

.check-row {
    align-items: center;
    display: flex;
    gap: 8px;
}

.check-row input {
    height: 16px;
    width: 16px;
}

.check-row span {
    margin: 0;
}

.read-row {
    border: 1px solid var(--line);
    padding: 10px;
}

.read-row span {
    color: var(--muted);
    display: block;
    font-size: 12px;
    margin-bottom: 5px;
}

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

.status-item {
    border: 1px solid var(--line);
    min-height: 86px;
    padding: 12px;
}

.status-item strong {
    display: block;
    margin-bottom: 8px;
}

.status-item span {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.35;
}

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

    .sidebar {
        border-bottom: 1px solid var(--line);
        border-right: 0;
    }

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

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

    .catalog-apply-block {
        align-items: stretch;
        flex-direction: column;
    }

    .filters,
    .filters.catalog-filters,
    .filters.orders-filters,
    .summary-grid,
    .detail-grid,
    .form-grid.two {
        grid-template-columns: 1fr;
    }

    .topbar {
        align-items: flex-start;
        gap: 12px;
    }

    .order-head,
    .dashboard-head,
    .selected-client,
    .quick-add-row,
    .order-footer {
        align-items: stretch;
        flex-direction: column;
    }

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

    .login-screen {
        background:
            linear-gradient(rgba(255, 255, 255, 0.026) 1px, transparent 1px),
            linear-gradient(90deg, rgba(255, 255, 255, 0.026) 1px, transparent 1px),
            radial-gradient(circle at 50% 18%, rgba(239, 125, 34, 0.12), transparent 34%),
            var(--bg);
        background-size: 28px 28px, 28px 28px, auto, auto;
        margin: 0;
        min-height: max(620px, calc(100vh - 121px));
        padding: 18px;
    }

    .login-screen .auth-card {
        max-width: 100%;
        padding: 22px;
    }

    .login-orb {
        display: none;
    }

    .login-topline {
        align-items: center;
        left: auto;
        max-width: none;
        padding: 0;
        right: 18px;
        top: 18px;
        width: auto;
    }

    .login-pill {
        font-size: 10px;
        min-height: 32px;
        padding: 0 10px;
    }

    .login-register-panel {
        left: 14px;
        padding-top: 16px;
        top: calc(100% + 28px);
        width: calc(100% - 28px);
    }

    .login-register-link {
        min-height: 34px;
        padding: 6px 12px;
    }

    .login-stage {
        margin-top: 0;
    }

    .login-footer {
        bottom: 14px;
        left: 18px;
    }

    .login-brand {
        gap: 11px;
    }

    .totals-box {
        min-width: 0;
        width: 100%;
    }

    .order-finance {
        justify-items: stretch;
        width: 100%;
    }

    .order-entry-footer .emit-button {
        justify-self: end;
    }
}

/* Customer catalog and cart */
.customer-body {
    min-width: 320px;
}

.customer-shell {
    min-height: 100vh;
}

.customer-header {
    align-items: center;
    background: rgba(14, 16, 18, 0.96);
    border-bottom: 1px solid var(--line);
    display: grid;
    gap: 24px;
    grid-template-columns: 190px minmax(0, 1fr) auto;
    min-height: 72px;
    padding: 14px clamp(18px, 4vw, 56px);
    position: sticky;
    top: 0;
    z-index: 20;
}

.customer-brand img {
    display: block;
    height: auto;
    max-width: 100%;
    object-fit: contain;
    width: 185px;
}

.customer-nav {
    align-items: center;
    display: flex;
    gap: 6px;
}

.customer-nav a,
.customer-cart-link {
    align-items: center;
    border: 1px solid transparent;
    color: var(--muted);
    display: inline-flex;
    font-size: 13px;
    font-weight: 700;
    padding: 9px 11px;
}

.customer-nav a:hover,
.customer-nav a.active,
.customer-cart-link:hover,
.customer-cart-link.active {
    background: var(--panel-soft);
    border-color: var(--line);
    color: var(--text);
}

.customer-cart-count {
    align-items: center;
    background: var(--orange);
    border-radius: 999px;
    color: #111;
    display: inline-flex;
    font-size: 10px;
    height: 19px;
    justify-content: center;
    margin-left: 5px;
    min-width: 19px;
    padding: 0 5px;
}

.customer-account-menu {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.customer-account-separator {
    background: var(--line);
    flex: 0 0 auto;
    height: 24px;
    width: 1px;
}

.customer-account-menu > .customer-account-name {
    color: var(--muted);
    font-family: "Bahnschrift", "Arial Narrow", "Segoe UI", Arial, sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0;
    max-width: 210px;
    overflow: hidden;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.customer-account-menu > form {
    margin: 0;
}

.customer-logout {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(239, 125, 34, 0.46);
    border-radius: 3px;
    color: var(--text);
    cursor: pointer;
    font: inherit;
    font-family: "Bahnschrift", "Arial Narrow", "Segoe UI", Arial, sans-serif;
    font-size: 10px;
    font-weight: 700;
    min-height: 32px;
    padding: 0 11px;
    text-transform: uppercase;
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.customer-logout:hover,
.customer-logout:focus-visible {
    background: rgba(239, 125, 34, 0.08);
    border-color: rgba(239, 125, 34, 0.72);
    color: #fff;
    transform: translateY(-1px);
}

.customer-cart-remove button {
    background: transparent;
    border: 0;
    color: var(--orange);
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    padding: 7px 0;
}

.customer-main {
    margin: 0 auto;
    max-width: 1480px;
    padding: 28px clamp(18px, 4vw, 56px) 48px;
}

.customer-page-heading {
    align-items: flex-end;
    display: flex;
    gap: 20px;
    justify-content: space-between;
    margin-bottom: 20px;
}

.customer-page-heading h1 {
    font-size: 26px;
    line-height: 1.15;
    margin: 4px 0 0;
}

.customer-page-heading > .button {
    align-items: center;
    display: inline-flex;
}

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

.customer-catalog-search {
    margin-bottom: 20px;
    max-width: 720px;
}

.customer-catalog-search > label {
    color: var(--muted);
    display: block;
    font-size: 12px;
    margin-bottom: 7px;
}

.customer-catalog-search > div {
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) auto;
}

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

.customer-product-card {
    background: rgba(22, 25, 29, 0.96);
    border: 1px solid var(--line);
    border-radius: 6px;
    display: grid;
    gap: 12px;
    grid-template-rows: 132px minmax(72px, auto) auto auto;
    min-width: 0;
    padding: 12px;
    transition: border-color 160ms ease, transform 160ms ease;
}

.customer-product-card:hover {
    border-color: rgba(239, 125, 34, 0.36);
    transform: translateY(-1px);
}

.customer-product-image,
.customer-cart-image {
    align-items: center;
    background: rgba(255, 255, 255, 0.025);
    display: flex;
    justify-content: center;
    min-width: 0;
    overflow: hidden;
    padding: 10px;
}

.customer-product-image img,
.customer-cart-image img {
    height: 100%;
    object-fit: contain;
    width: 100%;
}

.customer-product-reference,
.customer-cart-product > span {
    color: var(--orange);
    display: block;
    font-size: 11px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.customer-product-copy h2,
.customer-cart-product h2 {
    font-size: 14px;
    line-height: 1.35;
    margin: 5px 0 0;
    overflow-wrap: anywhere;
}

.customer-product-price {
    align-items: baseline;
    display: flex;
    gap: 8px;
    justify-content: space-between;
}

.customer-product-price strong {
    font-size: 18px;
}

.customer-product-price span,
.customer-cart-product small,
.customer-cart-line-total span,
.customer-cart-line-total small {
    color: var(--muted);
    font-size: 11px;
}

.customer-add-form {
    align-items: end;
    display: grid;
    gap: 8px;
    grid-template-columns: 92px minmax(90px, 1fr);
}

.customer-add-form .button {
    width: 100%;
}

.customer-empty {
    border: 1px solid var(--line);
    color: var(--muted);
    padding: 42px 18px;
    text-align: center;
}

.customer-warning {
    background: rgba(239, 125, 34, 0.08);
    border: 1px solid rgba(239, 125, 34, 0.3);
    margin: 14px 0;
    padding: 10px;
}

.customer-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin-top: 24px;
}

.customer-pagination a {
    align-items: center;
    border: 1px solid var(--line);
    color: var(--muted);
    display: inline-flex;
    height: 34px;
    justify-content: center;
    min-width: 34px;
    padding: 0 8px;
}

.customer-pagination a.active,
.customer-pagination a:hover {
    border-color: var(--orange);
    color: var(--text);
}

.customer-cart-layout {
    align-items: start;
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1fr) 300px;
}

.customer-cart-lines {
    display: grid;
    gap: 8px;
}

.customer-cart-line {
    align-items: center;
    background: rgba(22, 25, 29, 0.96);
    border: 1px solid var(--line);
    display: grid;
    gap: 14px;
    grid-template-columns: 82px minmax(180px, 1fr) 180px 120px 54px;
    padding: 10px;
}

.customer-cart-image {
    height: 70px;
}

.customer-cart-product {
    min-width: 0;
}

.customer-cart-quantity {
    align-items: end;
    display: grid;
    gap: 6px;
    grid-template-columns: 78px 1fr;
}

.customer-cart-line-total {
    display: grid;
    gap: 2px;
    justify-items: end;
}

.customer-cart-line-total strong {
    font-size: 15px;
    margin-top: 3px;
}

.customer-cart-remove {
    text-align: right;
}

.customer-cart-summary {
    background: rgba(22, 25, 29, 0.96);
    border: 1px solid var(--line);
    padding: 16px;
    position: sticky;
    top: 92px;
}

.customer-cart-summary h2 {
    font-size: 15px;
    margin: 0 0 14px;
}

.customer-cart-summary dl,
.customer-cart-summary dd {
    margin: 0;
}

.customer-cart-summary dl > div {
    border-top: 1px solid var(--line);
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 10px 0;
}

.customer-cart-summary dt {
    color: var(--muted);
}

.customer-cart-summary .total {
    color: var(--text);
    font-size: 16px;
    font-weight: 700;
}

.customer-order-confirm {
    border-top: 1px solid var(--line);
    margin-top: 8px;
    padding-top: 14px;
}

.customer-order-confirm .button {
    width: 100%;
}

.customer-order-success {
    background: rgba(22, 25, 29, 0.96);
    border: 1px solid var(--line);
    border-top-color: rgba(239, 125, 34, 0.58);
    margin: min(10vh, 84px) auto 0;
    max-width: 560px;
    padding: 34px;
    text-align: center;
}

.customer-order-success > img {
    height: 66px;
    margin-bottom: 18px;
    object-fit: contain;
    width: 66px;
}

.customer-order-success h1 {
    font-size: 20px;
    line-height: 1.3;
    margin: 8px 0 22px;
}

.customer-order-number {
    background: var(--input);
    border: 1px solid var(--line);
    display: grid;
    gap: 6px;
    margin-bottom: 20px;
    padding: 16px;
}

.customer-order-number span {
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
}

.customer-order-number strong {
    color: var(--orange);
    font-size: 25px;
}

.customer-order-email-warning {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
    margin: 0 auto 18px;
    max-width: 390px;
}

.customer-order-success > .button {
    align-items: center;
    display: inline-flex;
    justify-content: center;
}

.customer-orders-wrap,
.customer-order-detail {
    background: rgba(22, 25, 29, 0.96);
    border: 1px solid var(--line);
}

.customer-orders-table {
    min-width: 680px;
}

.customer-orders-table th:last-child,
.customer-orders-table td:last-child {
    text-align: right;
    width: 80px;
}

.customer-order-status {
    border: 1px solid var(--line);
    border-radius: 999px;
    display: inline-flex;
    font-size: 10px;
    font-weight: 800;
    padding: 5px 8px;
}

.customer-order-status.is-issued {
    border-color: rgba(85, 190, 125, 0.4);
    color: #79d69c;
}

.customer-order-status.is-cancelled {
    border-color: rgba(220, 95, 95, 0.42);
    color: #ef9292;
}

.customer-order-link {
    color: var(--orange);
    font-weight: 700;
}

.customer-order-link:hover {
    color: var(--text);
}

.customer-order-heading {
    align-items: center;
}

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

.customer-order-detail {
    padding: 18px;
}

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

.customer-order-meta > div {
    background: var(--input);
    border: 1px solid var(--line);
    display: grid;
    gap: 6px;
    min-height: 66px;
    padding: 11px 12px;
}

.customer-order-meta span,
.customer-order-notes > span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.customer-order-meta strong {
    align-self: start;
}

.customer-order-items {
    min-width: 920px;
}

.customer-order-lower {
    align-items: start;
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
    margin-top: 18px;
}

.customer-order-notes {
    border-top: 1px solid var(--line);
    padding-top: 12px;
}

.customer-order-notes p {
    color: var(--muted);
    line-height: 1.5;
    margin: 8px 0 0;
}

.customer-order-totals,
.customer-order-totals dd {
    margin: 0;
}

.customer-order-totals > div {
    border-top: 1px solid var(--line);
    display: flex;
    gap: 18px;
    justify-content: space-between;
    padding: 9px 0;
}

.customer-order-totals dt {
    color: var(--muted);
}

.customer-order-totals dd {
    font-weight: 700;
}

.customer-order-totals .total {
    color: var(--text);
    font-size: 16px;
}

@media (max-width: 1100px) {
    .customer-product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .customer-cart-line {
        grid-template-columns: 70px minmax(160px, 1fr) 170px 110px;
    }

    .customer-cart-remove {
        grid-column: 2 / -1;
    }
}

@media (max-width: 820px) {
    .customer-header {
        gap: 12px;
        grid-template-columns: minmax(130px, 1fr) auto;
    }

    .customer-nav {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .customer-account-name,
    .customer-account-separator {
        display: none;
    }

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

    .customer-cart-layout {
        grid-template-columns: 1fr;
    }

    .customer-cart-summary {
        position: static;
    }

    .customer-cart-line {
        grid-template-columns: 70px minmax(0, 1fr);
    }

    .customer-cart-quantity,
    .customer-cart-line-total,
    .customer-cart-remove {
        grid-column: 2;
    }

    .customer-cart-line-total {
        justify-items: start;
    }

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

    .customer-order-lower {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 540px) {
    .customer-header {
        padding: 12px 14px;
    }

    .customer-brand img {
        max-width: 120px;
    }

    .customer-account-menu {
        gap: 7px;
    }

    .customer-cart-link {
        font-size: 11px;
        padding: 7px 6px;
    }

    .customer-logout {
        min-height: 30px;
        padding: 0 8px;
    }

    .customer-nav {
        overflow-x: auto;
    }

    .customer-nav a {
        white-space: nowrap;
    }

    .customer-main {
        padding: 22px 14px 36px;
    }

    .customer-page-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .customer-order-actions {
        width: 100%;
    }

    .customer-order-actions .button {
        flex: 1;
        justify-content: center;
    }

    .customer-order-detail {
        padding: 12px;
    }

    .customer-order-meta {
        grid-template-columns: 1fr;
    }

    .customer-product-grid {
        grid-template-columns: 1fr;
    }

    .customer-product-card {
        grid-template-rows: 150px auto auto auto;
    }

    .customer-catalog-search > div {
        grid-template-columns: 1fr;
    }

    .customer-cart-line {
        align-items: start;
        grid-template-columns: 58px minmax(0, 1fr);
    }

    .customer-cart-image {
        height: 58px;
    }

    .customer-cart-quantity {
        grid-template-columns: 80px minmax(100px, 1fr);
    }
}

.registration-screen {
    align-items: center;
    background:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        radial-gradient(circle at 72% 18%, rgba(239, 125, 34, 0.11), transparent 35%),
        #101216;
    background-size: 30px 30px, 30px 30px, auto, auto;
    display: flex;
    justify-content: center;
    margin: -22px;
    min-height: 100vh;
    padding: 40px 24px;
}

.registration-card {
    background: rgba(25, 28, 33, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top-color: rgba(239, 125, 34, 0.55);
    border-radius: 8px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
    max-width: 820px;
    padding: 28px;
    width: 100%;
}

.registration-heading {
    align-items: center;
    border-bottom: 1px solid rgba(239, 125, 34, 0.45);
    column-gap: 169px;
    display: flex;
    margin-bottom: 18px;
    padding-bottom: 18px;
}

.registration-heading-copy {
    min-width: 0;
}

.registration-heading .registration-heading-copy h2 {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 5px;
}

.registration-heading-description {
    display: grid;
    gap: 2px;
}

.registration-heading h2,
.registration-result h2,
.customer-welcome h2 {
    margin: 4px 0 6px;
}

.registration-heading p,
.registration-result p,
.customer-welcome p {
    color: var(--muted);
    margin: 0;
}

.registration-logo {
    display: block;
    height: auto;
    max-width: 220px;
    object-fit: contain;
    width: 34%;
}

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

.registration-grid .span-2 {
    grid-column: 1 / -1;
}

.registration-honeypot {
    height: 1px;
    left: -10000px;
    overflow: hidden;
    position: absolute;
    top: auto;
    width: 1px;
}

.registration-submit {
    width: 100%;
}

.registration-login-prompt {
    align-items: center;
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    font-size: 13px;
    gap: 10px;
    justify-content: center;
    justify-self: center;
    max-width: 100%;
    width: fit-content;
}

.registration-login-link {
    align-items: center;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    color: var(--text);
    display: inline-flex;
    font-weight: 700;
    gap: 6px;
    padding: 6px 11px;
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.registration-login-link:hover,
.registration-login-link:focus-visible {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(239, 125, 34, 0.38);
    color: var(--orange);
    transform: translateX(2px);
}

.registration-result {
    max-width: 540px;
    text-align: center;
}

.registration-result .registration-logo {
    margin: 0 auto 24px;
    width: 210px;
}

.registration-result-status {
    color: var(--orange);
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 10px;
}

.registration-result h2 {
    font-size: 22px;
    line-height: 1.2;
    margin: 0 0 14px;
}

.registration-result .registration-result-copy {
    line-height: 1.6;
    margin: 0 auto;
    max-width: 360px;
}

.registration-result .registration-result-action {
    align-items: center;
    background: rgba(255, 255, 255, 0.045);
    border-color: rgba(255, 255, 255, 0.14);
    display: inline-flex;
    gap: 7px;
    height: 44px;
    justify-content: center;
    margin-top: 28px;
    padding: 0 20px;
    transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.registration-result .registration-result-action:hover,
.registration-result .registration-result-action:focus-visible {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(239, 125, 34, 0.35);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.filter-row {
    align-items: end;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(240px, 1fr) minmax(150px, 220px) auto;
}

.registrations-table {
    min-width: 920px;
    table-layout: fixed;
}

.registrations-table th,
.registrations-table td {
    padding: 11px 14px;
}

.registrations-table th:nth-child(1),
.registrations-table td:nth-child(1) {
    width: 100px;
}

.registrations-table th:nth-child(2),
.registrations-table td:nth-child(2) {
    width: 165px;
}

.registrations-table th:nth-child(3),
.registrations-table td:nth-child(3) {
    width: 95px;
    white-space: nowrap;
}

.registrations-table th:nth-child(4),
.registrations-table td:nth-child(4) {
    width: 145px;
}

.registrations-table th:nth-child(5),
.registrations-table td:nth-child(5) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 200px;
}

.registrations-table th:nth-child(6),
.registrations-table td:nth-child(6) {
    white-space: nowrap;
    width: 140px;
}

.registrations-table th:nth-child(7),
.registrations-table td:nth-child(7) {
    text-align: right;
    width: 70px;
}

.status-badge {
    border: 1px solid var(--line);
    border-radius: 999px;
    display: inline-flex;
    font-size: 11px;
    font-weight: 700;
    padding: 5px 8px;
}

.status-pending {
    border-color: rgba(239, 125, 34, 0.45);
    color: var(--accent);
}

.status-approved {
    border-color: rgba(85, 190, 125, 0.4);
    color: #79d69c;
}

.status-rejected {
    border-color: rgba(220, 95, 95, 0.4);
    color: #ef9292;
}

.registration-detail-grid {
    align-items: start;
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
}

.registration-actions {
    display: grid;
    gap: 18px;
}

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

.detail-list dt,
.detail-list dd {
    border-top: 1px solid var(--line);
    margin: 0;
    padding: 11px 0;
}

.detail-list dt {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.existing-customer-box {
    background: rgba(239, 125, 34, 0.06);
    border: 1px solid rgba(239, 125, 34, 0.28);
    border-radius: 6px;
    display: grid;
    gap: 5px;
    padding: 12px;
}

.existing-customer-box span,
.muted-copy {
    color: var(--muted);
    font-size: 13px;
}

.alert-inline {
    color: #ef9292 !important;
}

.danger-panel {
    border-color: rgba(220, 95, 95, 0.2);
}

.customer-welcome {
    margin: min(12vh, 100px) auto 0;
    max-width: 620px;
    padding: 32px;
}

.customer-welcome .registration-logo {
    margin-bottom: 24px;
    width: 220px;
}

.customer-welcome form {
    margin-top: 24px;
}

@media (max-width: 760px) {
    .registration-screen {
        margin: -22px;
        min-height: calc(100vh - 71px);
        padding: 24px 14px;
    }

    .registration-card {
        padding: 20px;
    }

    .registration-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 16px;
    }

    .registration-heading .registration-logo {
        max-width: 210px;
        width: 64%;
    }

    .registration-grid,
    .filter-row,
    .registration-detail-grid {
        grid-template-columns: 1fr;
    }

    .registration-grid .span-2 {
        grid-column: auto;
    }

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

    .detail-list dd {
        border-top: 0;
        padding-top: 0;
    }
}
