.register-page {
    --register-ink: #071527;
    --register-muted: #6b7280;
    --register-soft: #f7faf9;
    --register-line: #e7eeeb;
    --register-green: #21b982;
    --register-green-soft: #eefaf5;
    min-height: 100dvh;
    width: 100%;
    margin: 0;
    padding: clamp(1rem, 2.2vw, 2rem);
    box-sizing: border-box;
    color: var(--register-ink);
    background: #f4f7f6;
}

html:has(.register-page),
body:has(.register-page) {
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: auto;
}

body:has(.register-page) {
    --bg-color: #f4f7f6;
}

body:has(.register-page) .rz-layout.rz-software.main-layout,
body:has(.register-page) .main-layout {
    min-height: 100dvh;
    background: #f4f7f6;
}

body:has(.register-page) .layout-shell,
body:has(.register-page) .main-body,
body:has(.register-page) .rz-body,
body:has(.register-page) .content-wrap {
    width: 100%;
    min-width: 0;
    min-height: 100dvh;
    height: auto !important;
}

body:has(.register-page) .main-body,
body:has(.register-page) .rz-body {
    padding-bottom: 0;
    overflow-x: hidden !important;
    overflow-y: visible !important;
    -webkit-overflow-scrolling: touch;
}

body:has(.register-page) .content-wrap {
    padding: 0 !important;
}

.register-shell {
    width: min(980px, 100%);
    margin: 0 auto;
}

.register-card {
    min-width: 0;
    padding: clamp(1.25rem, 2.6vw, 2.1rem);
    background: #ffffff;
    border: 0;
    border-radius: 0;
    box-shadow: 0 18px 55px rgba(7, 21, 39, 0.08);
}

.register-hero {
    display: grid;
    gap: 0.28rem;
    margin: 0 0 1.35rem;
}

.register-logo {
    --jans-app-brand-ink: var(--register-ink);
    --jans-app-brand-accent: var(--register-green);
}

.register-hero-copy {
    display: grid;
    gap: 0.18rem;
}

.register-hero h1 {
    margin: 0;
    color: var(--register-ink);
    font-size: clamp(1.45rem, 2.4vw, 1.9rem);
    font-weight: 900;
    letter-spacing: -0.045em;
    line-height: 1.1;
}

.register-hero p {
    margin: 0;
    color: var(--register-muted);
    font-size: 0.82rem;
    line-height: 1.45;
}

.register-progress {
    width: 100%;
    height: 2.35rem;
    margin: 0 0 1.35rem;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.65rem;
    align-items: center;
}

.register-step {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.48rem;
    min-width: 0;
    padding: 0;
    border: 0;
    color: #9aa4b2;
    background: transparent;
    cursor: pointer;
    font-weight: 800;
}

.register-step::after {
    content: "";
    flex: 1 1 auto;
    height: 1px;
    margin-left: 0.45rem;
    background: #e5ebe8;
}

.register-step:last-child::after {
    display: none;
}

.register-step:disabled {
    cursor: not-allowed;
    opacity: 0.72;
}

.register-step span {
    width: 1.35rem;
    height: 1.35rem;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #9aa4b2;
    background: #f2f5f4;
    border: 1px solid #e4ebe8;
    font-size: 0.66rem;
    font-weight: 900;
}

.register-step small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: currentColor;
    font-size: 0.7rem;
}

.register-step.is-done {
    color: var(--register-green);
}

.register-step.is-done span {
    color: var(--register-green);
    background: var(--register-green-soft);
    border-color: #b9ead7;
}

.register-step.is-active {
    color: var(--register-ink);
}

.register-step.is-active span {
    color: #ffffff;
    background: var(--register-ink);
    border-color: var(--register-ink);
}

.register-workspace,
.register-form-panel,
.register-section {
    display: grid;
    min-width: 0;
}

.register-form-panel {
    gap: 1rem;
}

.register-section {
    gap: 1.15rem;
    padding: clamp(1.15rem, 2.1vw, 1.65rem);
    border: 1px solid var(--register-line);
    border-radius: 0.85rem;
    background: #ffffff;
    box-shadow: 0 12px 34px rgba(7, 21, 39, 0.035);
}

.section-head {
    display: grid;
    gap: 0.28rem;
    margin: 0;
    padding: 0;
    border: 0;
}

.register-eyebrow {
    margin: 0;
    color: var(--register-green);
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.section-head h2 {
    margin: 0;
    color: var(--register-ink);
    font-size: 1rem;
    font-weight: 900;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

.section-head p {
    max-width: 100%;
    margin: 0;
    color: var(--register-muted);
    font-size: 0.78rem;
    line-height: 1.45;
}

.register-choice-grid,
.summary-grid,
.field-grid {
    display: grid;
    align-items: start;
    gap: 0.9rem 1rem;
}

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

.field-grid.single {
    grid-template-columns: minmax(0, 1fr);
}

.address-grid {
    grid-template-columns: minmax(0, 1fr) 7.25rem;
}

.address-grid.three {
    grid-template-columns: 7rem minmax(0, 1fr) minmax(0, 1fr);
}

.field {
    display: grid;
    align-content: start;
    gap: 0.38rem;
    min-width: 0;
}

.field label,
.features-head label {
    margin: 0;
    color: #1f2937;
    font-size: 0.72rem;
    font-weight: 850;
    line-height: 1.25;
}

.field small,
.register-choice small,
.feature-card small,
.summary-box small,
.tenant-summary small,
.features-head small {
    color: var(--register-muted);
    font-size: 0.72rem;
    line-height: 1.35;
}

.input-shell {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 0;
    height: 2.78rem;
}

.register-input-icon {
    position: absolute;
    left: 0.85rem;
    z-index: 1;
    color: #a0aab6;
    font-size: 1rem;
    line-height: 1;
    pointer-events: none;
}

.input-shell input,
.feature-actions select {
    width: 100%;
    min-height: 2.78rem;
    border: 1px solid var(--register-line);
    border-radius: 0.48rem;
    background: #ffffff;
    color: var(--register-ink);
    padding: 0.72rem 0.86rem;
    outline: none;
    box-sizing: border-box;
    font-size: 0.82rem;
    line-height: 1.25;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.register-input-icon + input {
    padding-left: 2.45rem;
}

.input-shell input:disabled {
    color: #6b7280;
    background: #f8faf9;
}

.input-shell input:focus,
.feature-actions select:focus {
    border-color: #7adbb9;
    box-shadow: 0 0 0 3px rgba(33, 185, 130, 0.13);
}

.input-shell input.is-invalid {
    border-color: rgba(190, 18, 60, 0.55);
    background: #fff7f8;
}

.field-error {
    color: #be123c;
    font-size: 0.7rem;
    font-weight: 780;
}

.development-registration-note {
    display: block;
    color: #64748b;
    font-size: 0.68rem;
    line-height: 1.42;
}

.register-choice,
.summary-box,
.tenant-summary,
.feature-card,
.register-alert,
.register-inline-state {
    border: 1px solid var(--register-line);
    border-radius: 0.64rem;
    background: #ffffff;
}

.temporary-prefill-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.72rem 0.78rem;
    border-radius: 0.7rem;
    background: #f8fafc;
    border: 1px dashed #d8e4df;
}

.temporary-prefill-bar small {
    color: #64748b;
    font-size: 0.68rem;
    line-height: 1.35;
}

.temporary-prefill-button {
    flex: 0 0 auto;
    min-height: 2.1rem;
    padding: 0.5rem 0.68rem;
    border-radius: 0.54rem;
    color: #123326;
    border: 1px solid #cfe3db;
    background: #ffffff;
    font-size: 0.72rem;
    font-weight: 850;
    cursor: pointer;
}

.temporary-prefill-button.is-active {
    color: #ffffff;
    border-color: #123326;
    background: #123326;
}

.register-choice {
    display: grid;
    min-height: 7.25rem;
    gap: 0.42rem;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
}

.register-choice span,
.summary-box span,
.tenant-card-head span {
    color: #8a95a3;
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.register-choice strong,
.summary-box strong,
.tenant-summary strong,
.tenant-card-head strong {
    color: var(--register-ink);
    font-size: 0.86rem;
    line-height: 1.25;
}

.register-choice.is-selected {
    border-color: #7adbb9;
    background: #f8fffc;
    box-shadow: inset 0 0 0 1px #7adbb9;
}

.register-choice.is-selected::before {
    content: "✓";
    width: 1.35rem;
    height: 1.35rem;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    background: var(--register-green);
    font-size: 0.72rem;
    font-weight: 900;
}

.tenant-card {
    display: grid;
    gap: 1rem;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.tenant-card-head,
.features-head,
.register-actions,
.tenant-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.tenant-card-head {
    padding-bottom: 0.15rem;
}

.tenant-card-head > div {
    display: grid;
    gap: 0.18rem;
}

.features-head {
    align-items: flex-start;
    margin-top: 0.2rem;
    padding-top: 0.95rem;
    border-top: 1px solid var(--register-line);
}

.features-head > div {
    display: grid;
    gap: 0.18rem;
    min-width: 0;
}

.features-head label {
    font-size: 0.82rem;
    letter-spacing: -0.01em;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.72rem;
    align-items: stretch;
}

.feature-card {
    position: relative;
    display: grid;
    gap: 0.68rem;
    align-content: start;
    min-height: 100%;
    padding: 0.78rem;
    overflow: hidden;
    border-radius: 0.78rem;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.045);
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.feature-card::before {
    content: "";
    position: absolute;
    inset: 0.72rem auto auto 0.72rem;
    width: 0.48rem;
    height: 0.48rem;
    border-radius: 999px;
    background: #cddbd6;
}

.feature-card-main,
.feature-title-row,
.feature-module-list,
.feature-price-list {
    min-width: 0;
}

.feature-card-main {
    display: grid;
    gap: 0.34rem;
}

.feature-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    padding-left: 0.78rem;
}

.feature-title-row > strong {
    overflow-wrap: anywhere;
}

.feature-card strong {
    color: var(--register-ink);
    font-size: 0.84rem;
    letter-spacing: -0.018em;
    line-height: 1.16;
}

.feature-card small {
    color: #64748b;
    line-height: 1.32;
}

.feature-state,
.feature-module-list span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 850;
    line-height: 1;
    white-space: nowrap;
}

.feature-state {
    flex: 0 0 auto;
    padding: 0.3rem 0.42rem;
    color: #07543e;
    background: #dff8ee;
}

.feature-module-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.28rem;
    padding-top: 0.08rem;
}

.feature-module-list span {
    padding: 0.3rem 0.38rem;
    color: #315345;
    background: #edf8f3;
    border: 1px solid #d8efe5;
}

.feature-card.is-selected {
    border-color: #73d9b7;
    background: #fbfffd;
    box-shadow: 0 12px 30px rgba(33, 185, 130, 0.13);
}

.feature-card.is-selected::before {
    background: var(--register-green);
}

.feature-card.is-unpriced {
    background: #fbfcfd;
}

.feature-price-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.42rem;
}

.feature-price-option,
.feature-remove-button,
.feature-price-empty {
    border-radius: 0.7rem;
}

.feature-price-option {
    position: relative;
    display: grid;
    gap: 0.16rem;
    min-height: 3.65rem;
    padding: 0.58rem 0.62rem;
    color: var(--register-ink);
    text-align: left;
    border: 1px solid #dde8e4;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdfc 100%);
    cursor: pointer;
}

.feature-price-option span,
.feature-price-option small {
    color: #64748b;
    font-size: 0.6rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.feature-price-option strong {
    font-size: 0.82rem;
}

.feature-price-option.is-selected {
    border-color: var(--register-green);
    background: #f7fffb;
    box-shadow: inset 0 0 0 1px var(--register-green), 0 10px 22px rgba(33, 185, 130, 0.12);
}

.feature-price-option.is-selected::after {
    content: "✓";
    position: absolute;
    right: 0.45rem;
    top: 0.45rem;
    width: 1rem;
    height: 1rem;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    background: var(--register-green);
    font-size: 0.56rem;
    font-weight: 900;
}

.feature-remove-button {
    grid-column: 1 / -1;
    min-height: 2.2rem;
    color: #7f1d1d;
    border: 1px solid rgba(127, 29, 29, 0.18);
    background: #fff7f7;
    font-size: 0.72rem;
    font-weight: 850;
    cursor: pointer;
}

.feature-price-empty {
    grid-column: 1 / -1;
    display: grid;
    gap: 0.14rem;
    padding: 0.62rem;
    color: #64748b;
    background: #f8fafc;
    border: 1px dashed #d5e0dc;
    font-size: 0.68rem;
    text-align: left;
}

.feature-price-empty strong {
    color: #475569;
    font-size: 0.78rem;
}

.feature-price-empty small {
    font-size: 0.68rem;
}

.small-button,
.primary-action,
.secondary-action,
.ghost-action,
.text-button {
    border-radius: 0.5rem;
    font-weight: 850;
    cursor: pointer;
    transition: transform 0.16s ease, border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease, opacity 0.16s ease;
}

.primary-action,
.small-button.is-selected {
    border: 1px solid var(--register-ink);
    color: #ffffff;
    background: var(--register-ink);
}

.primary-action {
    min-width: 9.8rem;
    padding: 0.78rem 1.1rem;
    box-shadow: 0 10px 22px rgba(7, 21, 39, 0.16);
}

.secondary-action,
.ghost-action,
.small-button {
    color: var(--register-ink);
    border: 1px solid var(--register-line);
    background: #ffffff;
}

.secondary-action,
.ghost-action {
    padding: 0.76rem 1rem;
}

.secondary-action {
    justify-self: start;
}

.small-button {
    min-height: 2.1rem;
    padding: 0.45rem 0.65rem;
    font-size: 0.72rem;
}

.text-button {
    border: 0;
    color: #64748b;
    background: transparent;
}

.text-button.danger {
    color: #991b1b;
}

.primary-action:hover:not(:disabled),
.secondary-action:hover:not(:disabled),
.ghost-action:hover:not(:disabled),
.small-button:hover:not(:disabled),
.feature-price-option:hover:not(:disabled),
.feature-remove-button:hover:not(:disabled) {
    transform: translateY(-1px);
}

.primary-action:disabled,
.ghost-action:disabled {
    cursor: not-allowed;
    opacity: 0.42;
    box-shadow: none;
}

.summary-box,
.tenant-summary,
.register-alert,
.register-inline-state {
    padding: 1rem;
}

.summary-box {
    display: grid;
    gap: 0.32rem;
}

.tenant-summary-list {
    display: grid;
    gap: 0.65rem;
}

.register-alert {
    display: grid;
    gap: 0.82rem;
}

.register-alert-copy {
    line-height: 1.42;
}

.register-alert.error {
    color: #7f1d1d;
    border-color: rgba(127, 29, 29, 0.20);
    background: #fff1f2;
}

.register-alert-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.52rem;
}

.alert-action {
    min-height: 2.55rem;
    padding: 0.68rem 0.72rem;
    border-radius: 0.58rem;
    color: #7f1d1d;
    border: 1px solid rgba(127, 29, 29, 0.20);
    background: rgba(255, 255, 255, 0.72);
    font-size: 0.78rem;
    font-weight: 850;
    cursor: pointer;
    transition: transform 0.16s ease, border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease;
}

.alert-action.is-primary {
    color: #ffffff;
    border-color: #7f1d1d;
    background: #7f1d1d;
}

.alert-action:hover {
    transform: translateY(-1px);
    border-color: rgba(127, 29, 29, 0.36);
    background: #ffffff;
}

.alert-action.is-primary:hover {
    color: #ffffff;
    background: #991b1b;
}

.register-alert.success {
    color: #14532d;
    border-color: rgba(20, 83, 45, 0.20);
    background: #f0fdf4;
}

.password-meter {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.28rem;
    width: 7rem;
    margin-top: 0.05rem;
}

.password-meter span {
    display: block;
    height: 0.2rem;
    border-radius: 999px;
    background: #e4ebe8;
}

.password-meter.is-ok span {
    background: var(--register-green);
}

.password-strength {
    position: relative;
    padding-left: 0.86rem;
    color: var(--register-muted);
    font-size: 0.7rem;
}

.password-strength::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.42rem;
    width: 0.38rem;
    height: 0.38rem;
    border-radius: 999px;
    background: #bac4ce;
}

.password-strength.is-ok {
    color: var(--register-green);
}

.password-strength.is-ok::before {
    background: var(--register-green);
}

.register-actions {
    width: 100%;
    margin-top: 1rem;
    padding-top: 0;
}

@media (max-width: 860px) {
    .register-page {
        min-height: 100svh;
        padding: 0.75rem;
        padding-bottom: calc(0.75rem + env(safe-area-inset-bottom));
    }

    .register-card {
        padding: 1rem;
    }

    .register-progress {
        gap: 0.35rem;
    }

    .register-step::after {
        margin-left: 0.2rem;
    }

    .register-step small {
        display: none;
    }

    .field-grid,
    .field-grid.single,
    .address-grid,
    .address-grid.three,
    .register-choice-grid,
    .summary-grid {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.62rem;
    }

    .feature-card {
        padding: 0.68rem;
        border-radius: 0.7rem;
    }

    .feature-card::before {
        inset: 0.62rem auto auto 0.62rem;
    }

    .feature-title-row {
        gap: 0.35rem;
        padding-left: 0.7rem;
    }

    .feature-card strong {
        font-size: 0.78rem;
    }

    .feature-card small {
        font-size: 0.66rem;
    }

    .feature-module-list span,
    .feature-state {
        font-size: 0.56rem;
    }

    .feature-price-option {
        min-height: 3.35rem;
        padding: 0.5rem 0.52rem;
    }

    .feature-price-option span,
    .feature-price-option small {
        font-size: 0.54rem;
    }

    .feature-price-option strong {
        font-size: 0.76rem;
    }

    .tenant-card-head,
    .features-head,
    .tenant-summary,
    .temporary-prefill-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .temporary-prefill-button {
        width: 100%;
    }

    .register-actions {
        align-items: stretch;
        flex-direction: row;
        gap: 0.65rem;
        margin-top: 1rem;
        padding-bottom: env(safe-area-inset-bottom);
    }

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

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

    .small-button,
    .primary-action,
    .secondary-action,
    .ghost-action {
        width: 100%;
    }

    .register-actions .primary-action,
    .register-actions .ghost-action {
        flex: 1 1 0;
        min-width: 0;
    }
}

@media (max-width: 520px) {
    .register-page {
        padding: 0;
        padding-bottom: env(safe-area-inset-bottom);
    }

    .register-card {
        min-height: 100svh;
        padding-bottom: 0;
    }

    .register-section {
        padding: 1rem;
        border-radius: 0.7rem;
    }
}
