:root {
    --register-red: #e30613;
    --register-red-dark: #c9000b;
    --register-ink: #151922;
    --register-muted: #697281;
    --register-line: #e1e5ea;
    --register-soft: #f5f6f8;
    --register-success: #14804a;
}

* {
    box-sizing: border-box;
}

html {
    background: #f5f6f8;
}

body.register-page {
    margin: 0;
    min-width: 320px;
    color: var(--register-ink);
    background: #f5f6f8;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
}

button,
input,
summary {
    font: inherit;
}

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

.register-visual {
    position: sticky;
    top: 0;
    min-width: 0;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    color: #fff;
    background-color: #1b1512;
    background-image: url('../img/register-restaurant-owner.webp');
    background-repeat: no-repeat;
    background-position: 52% center;
    background-size: cover;
}

.register-visual::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(6, 5, 5, .38);
    pointer-events: none;
}

.register-brand {
    position: absolute;
    z-index: 2;
    top: 26px;
    left: 28px;
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: #fff;
    text-decoration: none;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .38);
}

.register-brand:hover {
    color: #fff;
}

.register-brand-mark {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    flex: 0 0 44px;
    color: #fff;
    background: var(--register-red);
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(227, 6, 19, .3);
    font-size: 20px;
}

.register-brand > span:last-child {
    line-height: 1;
}

.register-brand strong {
    display: block;
    font-size: 16px;
    font-weight: 900;
}

.register-brand strong b {
    color: #ff3c46;
}

.register-brand small {
    display: block;
    margin-top: 5px;
    font-size: 9px;
    font-weight: 800;
}

.register-visual-copy {
    position: absolute;
    z-index: 2;
    right: 30px;
    bottom: 108px;
    left: 30px;
    text-shadow: 0 3px 18px rgba(0, 0, 0, .65);
}

.register-eyebrow {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.register-eyebrow i {
    color: #ff3843;
}

.register-visual-copy h1 {
    max-width: 340px;
    margin: 0;
    font-size: 44px;
    line-height: 1.02;
    font-weight: 900;
}

.register-visual-copy p {
    max-width: 330px;
    margin: 17px 0 20px;
    color: rgba(255, 255, 255, .88);
    font-size: 15px;
    line-height: 1.55;
}

.register-benefits {
    display: flex;
    flex-wrap: wrap;
    gap: 9px 15px;
}

.register-benefits span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.register-benefits i {
    color: #ff3b45;
    font-size: 17px;
}

.register-plan {
    position: absolute;
    z-index: 2;
    top: 92px;
    right: 24px;
    min-width: 132px;
    padding: 13px 15px;
    color: #fff;
    background: rgba(10, 8, 7, .72);
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.register-plan > span {
    display: block;
    margin-bottom: 3px;
    color: rgba(255, 255, 255, .68);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.register-plan strong {
    font-size: 22px;
    font-weight: 900;
}

.register-plan small {
    font-size: 11px;
    font-weight: 700;
}

.register-main {
    min-width: 0;
    min-height: 100vh;
    background: #f7f8fa;
}

.register-topbar {
    position: sticky;
    z-index: 8;
    top: 0;
    min-height: 66px;
    padding: 14px 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    color: #77808e;
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid var(--register-line);
    backdrop-filter: blur(12px);
    font-size: 12px;
    font-weight: 700;
}

.register-topbar a {
    min-height: 38px;
    padding: 0 13px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #303744;
    background: #fff;
    border: 1px solid #dfe3e8;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 800;
}

.register-topbar a:hover {
    color: var(--register-red);
    border-color: #f2a7ad;
}

.register-content {
    width: min(920px, calc(100% - 64px));
    margin: 0 auto;
    padding: 38px 0 46px;
}

.register-heading {
    scroll-margin-top: 82px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 34px;
    margin-bottom: 28px;
}

.register-heading-label {
    display: block;
    margin-bottom: 8px;
    color: var(--register-red);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.register-heading h2 {
    margin: 0;
    color: #11151d;
    font-size: 34px;
    line-height: 1.12;
    font-weight: 900;
}

.register-heading p {
    margin: 9px 0 0;
    color: var(--register-muted);
    line-height: 1.5;
}

.register-steps {
    width: 320px;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    list-style: none;
}

.register-steps li {
    position: relative;
    min-width: 0;
    display: grid;
    justify-items: center;
    gap: 7px;
    color: #8a929f;
    font-size: 10px;
    font-weight: 800;
}

.register-steps li::before {
    content: '';
    position: absolute;
    z-index: 0;
    top: 15px;
    right: 50%;
    width: 100%;
    height: 2px;
    background: #dfe3e8;
}

.register-steps li:first-child::before {
    display: none;
}

.register-steps li span {
    position: relative;
    z-index: 1;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    color: #6f7886;
    background: #fff;
    border: 2px solid #dfe3e8;
    border-radius: 50%;
}

.register-steps li.is-active,
.register-steps li.is-complete {
    color: #252b35;
}

.register-steps li.is-active span {
    color: #fff;
    background: var(--register-red);
    border-color: var(--register-red);
    box-shadow: 0 0 0 5px rgba(227, 6, 19, .10);
}

.register-steps li.is-complete span {
    color: #fff;
    background: var(--register-success);
    border-color: var(--register-success);
}

.register-steps li.is-complete::before,
.register-steps li.is-active::before {
    background: var(--register-success);
}

.register-alert {
    min-height: 50px;
    margin-bottom: 20px;
    padding: 13px 15px;
    display: flex;
    align-items: center;
    gap: 11px;
    color: #991b24;
    background: #fff0f1;
    border: 1px solid #ffc6cb;
    border-radius: 8px;
    font-weight: 750;
}

.register-alert i {
    color: var(--register-red);
    font-size: 18px;
}

#registerForm {
    background: #fff;
    border: 1px solid var(--register-line);
    border-radius: 8px;
    box-shadow: 0 20px 48px rgba(28, 34, 44, .08);
}

.register-step-panel {
    min-height: 450px;
    padding: 30px 32px 24px;
}

.register-step-panel[hidden] {
    display: none !important;
}

.step-title {
    margin-bottom: 27px;
    display: flex;
    align-items: center;
    gap: 13px;
}

.step-title > span {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    display: grid;
    place-items: center;
    color: var(--register-red);
    background: #fff0f1;
    border-radius: 8px;
    font-size: 20px;
}

.step-title h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 900;
}

.step-title p {
    margin: 4px 0 0;
    color: var(--register-muted);
    font-size: 13px;
}

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

.form-field {
    min-width: 0;
    display: grid;
    align-content: start;
    gap: 8px;
}

.form-field-wide {
    grid-column: 1 / -1;
}

.form-field label {
    color: #2b313c;
    font-size: 12px;
    font-weight: 850;
}

.form-field label em,
.form-field label span {
    margin-left: 5px;
    color: #8a929f;
    font-size: 9px;
    font-style: normal;
    font-weight: 800;
    text-transform: uppercase;
}

.form-field label em {
    color: var(--register-red);
}

.form-field > small {
    color: #858d99;
    font-size: 10px;
    line-height: 1.35;
}

.field-control {
    position: relative;
    min-width: 0;
    height: 52px;
}

.field-control > i {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
    color: #7c8593;
    font-size: 17px;
    pointer-events: none;
}

.field-control input {
    width: 100%;
    height: 52px;
    padding: 0 46px;
    color: #171c25;
    background: #fff;
    border: 1px solid #d8dde4;
    border-radius: 8px;
    outline: none;
    font-size: 14px;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.field-control input::placeholder {
    color: #9aa2ad;
}

.field-control input:hover {
    border-color: #b8c0cb;
}

.field-control input:focus {
    border-color: var(--register-red);
    box-shadow: 0 0 0 4px rgba(227, 6, 19, .09);
}

.field-control input.is-invalid {
    border-color: var(--register-red);
    background: #fff7f7;
}

.field-icon-button {
    position: absolute;
    z-index: 3;
    top: 6px;
    right: 6px;
    width: 40px;
    height: 40px;
    padding: 0;
    display: grid;
    place-items: center;
    color: #66707e;
    background: transparent;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
}

.field-icon-button:hover,
.field-icon-button:focus-visible {
    color: var(--register-red);
    background: #fff0f1;
    outline: none;
}

.menu-address-preview {
    min-height: 70px;
    margin-bottom: 23px;
    padding: 13px 16px;
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    align-items: center;
    color: #5f6876;
    background: #f6f8fa;
    border: 1px solid #e1e5ea;
    border-radius: 8px;
    font-size: 11px;
}

.menu-address-preview > i {
    grid-row: 1 / 3;
    color: var(--register-red);
    font-size: 22px;
}

.menu-address-preview strong {
    min-width: 0;
    overflow-wrap: anywhere;
    color: #202631;
    font-size: 13px;
}

.password-strength {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
}

.password-strength > span {
    height: 3px;
    background: #dfe3e8;
    border-radius: 3px;
}

.password-strength small {
    grid-column: 1 / -1;
    color: #858d99;
    font-size: 10px;
}

.password-strength[data-score="1"] > span:nth-child(-n+1) { background: #dc3545; }
.password-strength[data-score="2"] > span:nth-child(-n+2) { background: #f59e0b; }
.password-strength[data-score="3"] > span:nth-child(-n+3) { background: #4a9b68; }
.password-strength[data-score="4"] > span:nth-child(-n+4) { background: var(--register-success); }

.security-note,
.activation-note {
    min-height: 66px;
    margin-top: 24px;
    padding: 13px 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #345443;
    background: #f1f9f4;
    border: 1px solid #cfe9d8;
    border-radius: 8px;
}

.security-note > i,
.activation-note > i {
    font-size: 21px;
}

.security-note div,
.activation-note div {
    display: grid;
    gap: 3px;
}

.security-note strong,
.activation-note strong {
    font-size: 12px;
}

.security-note span,
.activation-note span {
    font-size: 11px;
    line-height: 1.4;
}

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

.upload-box {
    min-width: 0;
    min-height: 132px;
    padding: 14px;
    display: grid;
    grid-template-columns: 100px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    color: #202631;
    background: #fafbfc;
    border: 1px dashed #cbd1d9;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease;
}

.upload-box:hover,
.upload-box:focus-within {
    background: #fff7f7;
    border-color: var(--register-red);
}

.upload-box input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.upload-preview {
    width: 100px;
    height: 88px;
    display: grid;
    place-items: center;
    overflow: hidden;
    color: #8b94a1;
    background: #eceff3;
    border-radius: 8px;
    font-size: 28px;
}

.upload-preview.is-logo {
    width: 88px;
    border-radius: 50%;
}

.upload-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.upload-copy {
    min-width: 0;
    display: grid;
    gap: 5px;
}

.upload-copy strong {
    font-size: 13px;
}

.upload-copy small {
    color: #7f8895;
    font-size: 10px;
}

.upload-copy b {
    margin-top: 5px;
    color: var(--register-red);
    font-size: 11px;
}

.palette-section {
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px solid #e5e8ec;
}

.palette-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.palette-heading h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 900;
}

.palette-heading p {
    margin: 4px 0 0;
    color: var(--register-muted);
    font-size: 11px;
}

.palette-heading > i {
    color: #f5a000;
    font-size: 22px;
}

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

.palette-option {
    min-width: 0;
    min-height: 68px;
    padding: 10px;
    display: grid;
    justify-items: start;
    gap: 8px;
    color: #2b313c;
    background: #fff;
    border: 1px solid #dfe3e8;
    border-radius: 8px;
    cursor: pointer;
}

.palette-option:hover {
    border-color: #f0a4aa;
}

.palette-option.is-active {
    border-color: var(--register-red);
    box-shadow: 0 0 0 3px rgba(227, 6, 19, .08);
}

.palette-option > span {
    display: flex;
}

.palette-option i {
    width: 22px;
    height: 22px;
    margin-right: -4px;
    display: block;
    background: var(--swatch);
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .16);
}

.palette-option strong {
    font-size: 11px;
}

.custom-colors {
    margin-top: 13px;
    border: 1px solid #e1e5ea;
    border-radius: 8px;
}

.custom-colors summary {
    min-height: 44px;
    padding: 0 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #555e6c;
    cursor: pointer;
    font-size: 11px;
    font-weight: 800;
}

.custom-colors summary::marker {
    display: none;
}

.color-grid {
    padding: 13px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    border-top: 1px solid #e5e8ec;
}

.color-grid label {
    min-width: 0;
    display: grid;
    gap: 6px;
    color: #697281;
    font-size: 9px;
    font-weight: 800;
}

.color-grid input {
    width: 100%;
    height: 34px;
    padding: 2px;
    background: #fff;
    border: 1px solid #dce1e7;
    border-radius: 6px;
    cursor: pointer;
}

.activation-note {
    color: #5b4a24;
    background: #fff9e8;
    border-color: #f1df9d;
}

.register-actions {
    min-height: 76px;
    padding: 12px 18px;
    display: grid;
    grid-template-columns: 150px 1fr 170px;
    align-items: center;
    gap: 12px;
    background: #fafbfc;
    border-top: 1px solid var(--register-line);
    border-radius: 0 0 8px 8px;
}

.action-back,
.action-next,
.action-submit {
    height: 50px;
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border-radius: 8px;
    font-weight: 900;
    cursor: pointer;
}

.action-back {
    color: #4e5765;
    background: #fff;
    border: 1px solid #dce1e7;
}

.action-next,
.action-submit {
    color: #fff;
    background: var(--register-red);
    border: 1px solid var(--register-red);
    box-shadow: 0 12px 24px rgba(227, 6, 19, .18);
}

.action-next:hover,
.action-submit:hover {
    background: var(--register-red-dark);
    border-color: var(--register-red-dark);
}

.action-submit {
    display: none;
}

.step-counter {
    justify-self: center;
    color: #8a929f;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.register-actions.is-final .action-next {
    display: none;
}

.register-actions.is-final .action-submit {
    display: inline-flex;
}

.register-actions.is-first .action-back {
    visibility: hidden;
}

.action-submit:disabled {
    cursor: wait;
    opacity: .76;
}

@media (max-width: 1120px) {
    .register-shell {
        grid-template-columns: 350px minmax(0, 1fr);
    }

    .register-content {
        width: min(760px, calc(100% - 44px));
    }

    .register-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 22px;
    }

    .register-steps {
        width: 100%;
    }

    .register-visual-copy h1 {
        font-size: 38px;
    }
}

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

    .register-visual {
        position: relative;
        height: 184px;
        min-height: 184px;
        background-position: 50% 44%;
    }

    .register-visual::after {
        background: rgba(6, 5, 5, .3);
    }

    .register-brand {
        top: 18px;
        left: 22px;
    }

    .register-visual-copy {
        right: 180px;
        bottom: 20px;
        left: 22px;
    }

    .register-eyebrow,
    .register-visual-copy p,
    .register-benefits {
        display: none;
    }

    .register-visual-copy h1 {
        max-width: 420px;
        font-size: 28px;
        line-height: 1.06;
    }

    .register-plan {
        top: auto;
        right: 18px;
        bottom: 18px;
    }

    .register-main {
        min-height: 0;
    }

    .register-topbar {
        min-height: 58px;
        padding: 10px 22px;
    }

    .register-content {
        width: min(720px, calc(100% - 32px));
        padding: 27px 0 34px;
    }
}

@media (max-width: 620px) {
    .register-visual {
        height: 148px;
        min-height: 148px;
    }

    .register-brand {
        top: 14px;
        left: 16px;
    }

    .register-brand-mark {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
    }

    .register-brand strong {
        font-size: 14px;
    }

    .register-visual-copy {
        right: 145px;
        bottom: 15px;
        left: 16px;
    }

    .register-visual-copy h1 {
        font-size: 22px;
    }

    .register-plan {
        right: 12px;
        bottom: 13px;
        min-width: 122px;
        padding: 10px 12px;
    }

    .register-plan strong {
        font-size: 19px;
    }

    .register-topbar {
        padding: 9px 16px;
    }

    .register-topbar > span {
        display: none;
    }

    .register-topbar a {
        margin-left: auto;
    }

    .register-content {
        width: calc(100% - 24px);
        padding-top: 22px;
    }

    .register-heading {
        gap: 19px;
        margin-bottom: 20px;
    }

    .register-heading h2 {
        font-size: 27px;
    }

    .register-heading p {
        font-size: 12px;
    }

    .register-steps li {
        font-size: 9px;
    }

    .register-steps li span {
        width: 30px;
        height: 30px;
    }

    .register-step-panel {
        min-height: 0;
        padding: 22px 16px 19px;
    }

    .step-title {
        align-items: flex-start;
        margin-bottom: 23px;
    }

    .step-title h3 {
        font-size: 18px;
    }

    .step-title p {
        line-height: 1.4;
    }

    .form-grid,
    .upload-grid {
        grid-template-columns: 1fr;
    }

    .form-field-wide {
        grid-column: auto;
    }

    .upload-box {
        min-height: 112px;
        grid-template-columns: 86px minmax(0, 1fr);
    }

    .upload-preview,
    .upload-preview.is-logo {
        width: 82px;
        height: 78px;
    }

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

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

    .register-actions {
        position: sticky;
        z-index: 6;
        bottom: 0;
        min-height: 72px;
        grid-template-columns: 50px 1fr minmax(145px, 1.35fr);
        padding: 10px;
        box-shadow: 0 -12px 28px rgba(25, 31, 40, .08);
    }

    .action-back {
        width: 50px;
        padding: 0;
    }

    .action-back span,
    .step-counter {
        display: none;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .register-step-panel:not([hidden]) {
        animation: registerStepIn .24s ease both;
    }
}

@keyframes registerStepIn {
    from { opacity: 0; transform: translateY(7px); }
    to { opacity: 1; transform: translateY(0); }
}
