/* =========================================================
   ROVEN REGISTER PAGE
   File: public_html/register.css
   Standalone mobile-first registration styles
   ========================================================= */

:root {
    --gold: #F0B90B;
    --gold-hover: #DFAE00;
    --gold-soft: #FFF8DB;
    --bg: #FFFFFF;
    --surface: #FFFFFF;
    --surface-2: #F7F8FA;
    --text: #181A20;
    --muted: #667085;
    --muted-2: #98A2B3;
    --border: #E4E7EC;
    --border-strong: #D0D5DD;
    --success: #0ECB81;
    --danger: #F6465D;
    --danger-soft: #FFF1F3;
    --shadow: 0 18px 50px rgba(24, 26, 32, 0.08);
    --radius: 12px;
    --radius-lg: 18px;
    --container: 1120px;
}

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

html {
    min-width: 320px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    color: var(--text);
    background: var(--bg);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

button,
input,
select {
    font: inherit;
}

button,
a,
input,
select {
    -webkit-tap-highlight-color: transparent;
}

button {
    border: 0;
    cursor: pointer;
}

button:disabled {
    cursor: not-allowed;
}

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

img,
svg {
    display: block;
}

svg {
    max-width: 100%;
}

[hidden] {
    display: none !important;
}

.register-container {
    width: min(100%, var(--container));
    margin-inline: auto;
    padding-inline: 16px;
}

.skip-link {
    position: fixed;
    z-index: 9999;
    top: 10px;
    left: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    color: #fff;
    background: var(--text);
    transform: translateY(-160%);
    transition: transform 160ms ease;
}

.skip-link:focus {
    transform: translateY(0);
}

.register-header {
    position: sticky;
    z-index: 50;
    top: 0;
    background: rgba(255,255,255,.96);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.register-header__inner {
    min-height: 66px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.register-brand {
    min-width: 0;
    display: inline-flex;
    align-items: center;
}

.register-brand__logo {
    width: auto;
    height: 31px;
    max-width: 150px;
    object-fit: contain;
}

.register-brand__fallback {
    color: var(--text);
    font-size: 20px;
    font-weight: 800;
    letter-spacing: .8px;
}

.register-header__signin {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    background: #fff;
}

.register-main {
    padding: 22px 0 34px;
}

.register-layout {
    display: grid;
    gap: 20px;
}

.register-intro {
    display: none;
}

.register-card {
    width: 100%;
    min-width: 0;
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: 0 6px 22px rgba(24, 26, 32, 0.04);
}

.eyebrow {
    display: block;
    color: #846400;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .9px;
    text-transform: uppercase;
}

.register-card__head h2 {
    margin: 5px 0 0;
    font-size: 28px;
    line-height: 1.15;
    letter-spacing: -.6px;
}

.register-card__head p {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.stepper {
    margin: 24px 0 22px;
}

.stepper ol {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0;
    padding: 0;
    list-style: none;
}

.stepper ol::before {
    position: absolute;
    z-index: 0;
    top: 19px;
    left: calc(16.666% + 20px);
    right: calc(16.666% + 20px);
    height: 1px;
    background: var(--border);
    content: "";
}

.stepper__item {
    position: relative;
    z-index: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    color: var(--muted-2);
}

.stepper__circle {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-strong);
    border-radius: 50%;
    background: #fff;
    font-size: 13px;
    font-weight: 800;
}

.stepper__label {
    max-width: 100%;
    overflow: hidden;
    font-size: 11px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stepper__item.is-active,
.stepper__item.is-complete {
    color: var(--text);
}

.stepper__item.is-active .stepper__circle {
    background: var(--gold);
    border-color: var(--gold);
}

.stepper__item.is-complete .stepper__circle {
    color: #fff;
    background: var(--success);
    border-color: var(--success);
}

.form-alert {
    margin: 0 0 16px;
    padding: 12px 14px;
    border: 1px solid rgba(246,70,93,.24);
    border-radius: 10px;
    color: #B42318;
    background: var(--danger-soft);
    font-size: 13px;
    line-height: 1.5;
}

.form-alert.is-success {
    color: #087A4E;
    background: #ECFDF3;
    border-color: rgba(14,203,129,.25);
}

.register-form,
.form-step,
.form-grid {
    width: 100%;
    min-width: 0;
}

.register-honeypot {
    position: fixed !important;
    left: -100000px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    min-width: 1px !important;
    min-height: 1px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.form-step__head > span {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.form-step__head h3 {
    margin: 5px 0 0;
    outline: none !important;
    color: var(--text);
    font-size: 23px;
    line-height: 1.2;
    letter-spacing: -.45px;
}

.form-step__head h3:focus,
.form-step__head h3:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

.form-step__head p {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.form-grid {
    display: grid;
    gap: 18px;
    margin-top: 22px;
}

.field {
    min-width: 0;
    display: grid;
    gap: 8px;
}

.field label {
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
}

.input-wrap,
.select-wrap,
.phone-wrap {
    position: relative;
    width: 100%;
    min-width: 0;
}

.input-wrap {
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    z-index: 2;
    left: 14px;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    pointer-events: none;
}

.input-icon svg,
.select-arrow svg,
.password-toggle svg {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px;
    min-height: 20px;
}

.field input,
.field select {
    width: 100%;
    min-width: 0;
    height: 52px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    outline: 0;
    color: var(--text);
    background: #fff;
    font-size: 14px;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.input-wrap > input {
    padding: 0 46px 0 46px;
}

.input-wrap > input:not([type="password"]) {
    padding-right: 14px;
}

.field select {
    appearance: none;
    -webkit-appearance: none;
    padding: 0 46px 0 14px;
}

.field input::placeholder {
    color: #A5ADBA;
}

.field input:focus,
.field select:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(240,185,11,.13);
}

.field input.is-invalid,
.field select.is-invalid {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(246,70,93,.09);
}

.field input.is-valid,
.field select.is-valid {
    border-color: var(--success);
}

.select-arrow {
    position: absolute;
    right: 14px;
    top: 50%;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    pointer-events: none;
    transform: translateY(-50%);
}

.phone-wrap {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: stretch;
}

.phone-code {
    min-width: 70px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    color: var(--text);
    background: var(--surface-2);
    border: 1px solid var(--border-strong);
    border-right: 0;
    border-radius: var(--radius) 0 0 var(--radius);
    font-size: 13px;
    font-weight: 700;
}

.phone-wrap input {
    padding: 0 14px;
    border-radius: 0 var(--radius) var(--radius) 0;
}

.password-toggle {
    position: absolute;
    z-index: 3;
    right: 6px;
    top: 50%;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: var(--muted);
    background: transparent;
    border-radius: 9px;
    transform: translateY(-50%);
}

.field-help,
.field-error {
    display: block;
    font-size: 11px;
    line-height: 1.45;
}

.field-help {
    color: var(--muted);
}

.field-error {
    min-height: 16px;
    color: var(--danger);
    font-weight: 600;
}

.password-requirements {
    margin-top: 18px;
    padding: 14px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.password-requirements > strong {
    display: block;
    font-size: 12px;
}

.password-requirements > p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 11px;
}

.password-requirements ul {
    display: grid;
    gap: 6px;
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
}

.password-requirements li {
    position: relative;
    padding-left: 20px;
    color: var(--muted);
    font-size: 11px;
}

.password-requirements li::before {
    position: absolute;
    left: 0;
    top: 3px;
    width: 12px;
    height: 12px;
    border: 1px solid var(--border-strong);
    border-radius: 50%;
    content: "";
}

.password-requirements li.is-valid {
    color: #087A4E;
}

.password-requirements li.is-valid::before {
    background: var(--success);
    border-color: var(--success);
    box-shadow: inset 0 0 0 3px #fff;
}

.step-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 24px;
}

.step-actions--single {
    grid-template-columns: 1fr;
}

.button {
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 0 16px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 800;
    transition: background 160ms ease, border-color 160ms ease, transform 160ms ease, opacity 160ms ease;
}

.button:active:not(:disabled) {
    transform: scale(.985);
}

.button--primary {
    color: var(--text);
    background: var(--gold);
    border: 1px solid var(--gold);
}

.button--primary:hover:not(:disabled) {
    background: var(--gold-hover);
    border-color: var(--gold-hover);
}

.button--secondary {
    color: var(--text);
    background: #fff;
    border: 1px solid var(--border-strong);
}

.button:disabled {
    opacity: .62;
}

.button__spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(24,26,32,.25);
    border-top-color: var(--text);
    border-radius: 50%;
    animation: spin .7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.review-card {
    display: grid;
    gap: 0;
    margin-top: 20px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.review-card > div {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(100px, .55fr) minmax(0, 1fr);
    gap: 12px;
    padding: 13px 14px;
    border-bottom: 1px solid var(--border);
}

.review-card > div:last-child {
    border-bottom: 0;
}

.review-card span {
    color: var(--muted);
    font-size: 11px;
}

.review-card strong {
    min-width: 0;
    overflow: hidden;
    font-size: 12px;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.consent {
    position: relative;
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 10px;
    margin-top: 18px;
    cursor: pointer;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.55;
}

.consent input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.consent__box {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    background: #fff;
    border: 1px solid var(--border-strong);
    border-radius: 6px;
}

.consent__box svg {
    width: 15px !important;
    height: 15px !important;
}

.consent input:checked + .consent__box {
    color: var(--text);
    background: var(--gold);
    border-color: var(--gold);
}

.consent input:focus-visible + .consent__box {
    outline: 3px solid rgba(240,185,11,.2);
    outline-offset: 2px;
}

.security-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 18px;
    padding: 13px;
    color: var(--muted);
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.security-note svg {
    width: 20px !important;
    height: 20px !important;
    flex: 0 0 auto;
    color: var(--success);
}

.security-note p {
    margin: 0;
    font-size: 11px;
    line-height: 1.55;
}

.register-card__footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 12px;
}

.register-card__footer a {
    color: #806100;
    font-weight: 800;
}

.register-footer {
    padding: 20px 0 calc(20px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--border);
}

.register-footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 11px;
}

.register-footer a {
    color: var(--text);
    font-weight: 700;
}

.success-dialog {
    position: fixed;
    z-index: 4000;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.success-dialog__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(24,26,32,.48);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.success-dialog__card {
    position: relative;
    z-index: 1;
    width: min(100%, 430px);
    padding: 28px;
    background: #fff;
    border-radius: 18px;
    box-shadow: var(--shadow);
    text-align: center;
}

.success-check {
    width: 66px;
    height: 66px;
    margin: 0 auto 14px;
    color: var(--success);
}

.success-check svg {
    width: 66px !important;
    height: 66px !important;
}

.success-dialog__card h2 {
    margin: 6px 0 0;
    font-size: 22px;
}

.success-dialog__card p {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.noscript-message {
    position: fixed;
    z-index: 9999;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
    background: #fff;
    color: var(--text);
    text-align: center;
    font-weight: 700;
}

@media (max-width: 359px) {
    .register-container {
        padding-inline: 10px;
    }

    .register-card {
        padding: 15px;
        border-radius: 14px;
    }

    .register-card__head h2 {
        font-size: 25px;
    }

    .form-step__head h3 {
        font-size: 21px;
    }

    .stepper__label {
        font-size: 10px;
    }

    .phone-code {
        min-width: 64px;
        padding-inline: 9px;
    }

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

    .review-card > div {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .review-card strong {
        text-align: left;
    }
}

@media (min-width: 700px) {
    .register-main {
        padding: 38px 0 54px;
    }

    .register-card {
        max-width: 660px;
        margin-inline: auto;
        padding: 30px;
        box-shadow: var(--shadow);
    }

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

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

@media (min-width: 980px) {
    .register-header__inner {
        min-height: 72px;
    }

    .register-brand__logo {
        height: 35px;
        max-width: 170px;
    }

    .register-layout {
        grid-template-columns: minmax(0, .85fr) minmax(520px, 1.15fr);
        align-items: center;
        gap: 64px;
        min-height: calc(100vh - 190px);
    }

    .register-intro {
        display: block;
    }

    .register-intro h1 {
        max-width: 500px;
        margin: 8px 0 0;
        font-size: 44px;
        line-height: 1.08;
        letter-spacing: -1.5px;
    }

    .register-intro > p {
        max-width: 520px;
        margin: 14px 0 0;
        color: var(--muted);
        font-size: 15px;
        line-height: 1.65;
    }

    .intro-points {
        display: grid;
        gap: 14px;
        margin-top: 28px;
    }

    .intro-point {
        display: grid;
        grid-template-columns: 42px minmax(0, 1fr);
        align-items: start;
        gap: 12px;
    }

    .intro-point__icon {
        width: 42px;
        height: 42px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: #806100;
        background: var(--gold-soft);
        border-radius: 12px;
    }

    .intro-point__icon svg {
        width: 22px !important;
        height: 22px !important;
    }

    .intro-point strong,
    .intro-point span {
        display: block;
    }

    .intro-point strong {
        font-size: 13px;
    }

    .intro-point div > span {
        margin-top: 3px;
        color: var(--muted);
        font-size: 12px;
    }

    .register-card {
        max-width: none;
        margin: 0;
        padding: 34px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
