.orion-customer-edit,
.orion-customer-edit * {
    box-sizing: border-box;
}

.orion-customer-edit {
    --customer-dark: #224;
    --customer-blue: #447;
    --customer-ink: #202033;
    --customer-muted: #68687c;
    --customer-line: rgba(34, 34, 68, .12);
    --customer-soft: #f5f7fb;
    --customer-green: #22b84b;
    --customer-yellow: #fff9d8;

    min-height: calc(100vh - 170px);
    padding: clamp(16px, 4vw, 32px) clamp(10px, 4vw, 22px) 70px;
    background:
        linear-gradient(135deg, rgba(68, 68, 119, .08), transparent 42%),
        linear-gradient(315deg, rgba(34, 184, 75, .06), transparent 36%),
        #f7f8fc;
    color: var(--customer-ink);
    font-family: Arial, Helvetica, sans-serif;
}

.orion-customer-edit__form {
    width: min(100%, 980px);
    margin: 0 auto;
}

.orion-customer-edit__hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 14px;
    padding: clamp(18px, 4vw, 24px);
    border: 1px solid rgba(255, 255, 255, .5);
    border-radius: 8px;
    background: linear-gradient(135deg, var(--customer-dark), var(--customer-blue));
    box-shadow: 0 18px 48px rgba(34, 34, 68, .18);
    color: #fff;
}

.orion-customer-edit__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #d7d7ff;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 1.4px;
    text-transform: uppercase;
}

.orion-customer-edit__eyebrow::before {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--customer-green);
    box-shadow: 0 0 0 6px rgba(34, 184, 75, .14);
    content: "";
}

.orion-customer-edit__hero h1 {
    margin: 10px 0 6px;
    font-size: clamp(29px, 7vw, 44px);
    font-weight: 900;
    line-height: 1.05;
}

.orion-customer-edit__hero p {
    max-width: 620px;
    margin: 0;
    color: rgba(255, 255, 255, .78);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
}

.orion-customer-edit__identity {
    flex: 0 0 auto;
    min-width: 132px;
    padding: 13px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 8px;
    background: rgba(255, 255, 255, .09);
    text-align: right;
}

.orion-customer-edit__identity span,
.orion-customer-edit__identity strong {
    display: block;
}

.orion-customer-edit__identity span {
    color: rgba(255, 255, 255, .7);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.orion-customer-edit__identity strong {
    margin-top: 5px;
    font-size: 22px;
    font-weight: 900;
}

.orion-customer-edit__toolbar {
    position: sticky;
    top: 170px;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    padding: 10px;
    border: 1px solid var(--customer-line);
    border-radius: 8px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 10px 28px rgba(34, 34, 68, .10);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.orion-customer-edit__toolbar span {
    min-width: 0;
    color: var(--customer-muted);
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
}

.orion-customer-edit__save,
.orion-customer-edit__review {
    min-height: 44px;
    border: 0;
    border-radius: 8px;
    color: #fff;
    font-size: 16px;
    font-weight: 900;
    cursor: pointer;
}

.orion-customer-edit__save {
    min-width: 132px;
    padding: 0 18px;
    background: linear-gradient(135deg, var(--customer-green), #128d35);
    box-shadow: 0 12px 26px rgba(18, 141, 53, .22);
}

.orion-customer-edit__save--wide {
    width: min(100%, 260px);
}

.orion-customer-edit__review {
    min-width: 132px;
    padding: 0 18px;
    background: linear-gradient(135deg, var(--customer-blue), var(--customer-dark));
    box-shadow: 0 12px 26px rgba(34, 34, 68, .20);
}

.orion-customer-edit__panel {
    overflow: hidden;
    border: 1px solid var(--customer-line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 14px 36px rgba(34, 34, 68, .10);
}

.orion-customer-edit__table,
.orion-customer-edit__table tbody,
.orion-customer-edit__table tr,
.orion-customer-edit__table td {
    display: block;
}

.orion-customer-edit__table {
    width: 100% !important;
    border-collapse: collapse;
}

.orion-customer-edit__table tbody {
    padding: 4px 0 12px;
}

.orion-customer-edit__table tr {
    position: relative;
    display: grid;
    grid-template-columns: minmax(118px, .42fr) minmax(0, .58fr);
    align-items: center;
    gap: 10px;
    padding: 7px clamp(12px, 3vw, 22px);
}

.orion-customer-edit__table tr:has(td:first-child:empty),
.orion-customer-edit__table tr:has(td:first-child:only-child) {
    display: none;
}

.orion-customer-edit__table .orion-customer-edit__group-start {
    margin-top: 12px;
    padding-top: 45px;
    border-top: 1px solid var(--customer-line);
}

.orion-customer-edit__table .orion-customer-edit__group-start::before {
    position: absolute;
    top: 14px;
    left: clamp(12px, 3vw, 22px);
    color: var(--customer-blue);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
    content: attr(data-section);
}

.orion-customer-edit__table td {
    width: auto !important;
    min-width: 0;
    padding: 0;
    color: var(--customer-ink);
}

.orion-customer-edit__table td:first-child {
    color: var(--customer-muted);
    font-size: 13px;
    font-weight: 900;
    text-align: right !important;
}

.orion-customer-edit__table td:nth-child(2) {
    font-size: 14px;
    font-weight: 700;
}

.orion-customer-edit__table input:not([type="checkbox"]):not([type="submit"]),
.orion-customer-edit__table select,
.orion-customer-edit__table textarea {
    width: 100% !important;
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid rgba(34, 34, 68, .18);
    border-radius: 7px;
    outline: 0;
    background: var(--customer-yellow);
    color: var(--customer-ink) !important;
    font: 700 15px Arial, Helvetica, sans-serif;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.orion-customer-edit__table textarea {
    min-height: 142px;
    resize: vertical;
}

.orion-customer-edit__table select {
    appearance: auto;
    background-color: #fff;
}

.orion-customer-edit__table input:not([type="checkbox"]):not([type="submit"]):focus,
.orion-customer-edit__table select:focus,
.orion-customer-edit__table textarea:focus {
    border-color: var(--customer-blue);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(68, 68, 119, .10);
}

.orion-customer-edit__table input[type="checkbox"] {
    width: 22px;
    height: 22px;
    margin: 0 !important;
    accent-color: var(--customer-green);
    transform: none !important;
}

.orion-customer-edit__actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 18px 0 0;
}

@media (max-width: 620px) {
    .orion-customer-edit__hero {
        align-items: stretch;
        flex-direction: column;
    }

    .orion-customer-edit__identity {
        text-align: left;
    }

    .orion-customer-edit__toolbar {
        top: 150px;
    }

    .orion-customer-edit__table tr {
        grid-template-columns: 1fr;
        gap: 5px;
        padding-top: 8px;
        padding-bottom: 9px;
    }

    .orion-customer-edit__table td:first-child {
        text-align: left !important;
    }
}
