@import url('https://fonts.googleapis.com/css2?family=Unbounded:wght@400;700;900&family=Manrope:wght@400;500;600;700&display=swap');

:root {
    --navy: #0a1628;
    --navy2: #0f2040;
    --blue: #1255cc;
    --bl: #1e6ef5;
    --bp: #e8f0fe;
    --green: #00c98d;
    --gd: #00a874;
    --gp: #e6faf4;
    --gold: #f5a623;
    --red: #e84040;
    --w: #fff;
    --gr: #f0f4fb;
    --gr2: #dde5f4;
    --tx: #1a2540;
    --mu: #6b7fa3;
    --br: rgba(18, 85, 204, .13);
    --sh: 0 4px 20px rgba(10, 22, 40, .08);
    --shl: 0 20px 56px rgba(10, 22, 40, .18);
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Manrope', sans-serif;
    background: #f0f4fb;
    color: var(--tx);
    min-height: 100vh;
}

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

button {
    font-family: 'Manrope', sans-serif;
    cursor: pointer;
}

/* ── NAV ── */
.nav {
    background: var(--navy);
    height: 64px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.logo svg {
    height: 26px;
    width: auto;
}

.nav-r {
    margin-left: auto;
    display: flex;
    gap: 8px;
    align-items: center;
}

.nav-login {
    font-size: 13px;
    color: rgba(255, 255, 255, .6);
    font-weight: 600;
}

.nav-login:hover {
    color: white;
}

.nav-login span {
    color: rgba(255, 255, 255, .3);
    margin: 0 4px;
}

/* ── PROGRESS BAR ── */
.progress {
    background: white;
    border-bottom: 1px solid var(--br);
    padding: 16px 24px;
}

.progress-in {
    max-width: 560px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 0;
}

.step {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.step-num {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Unbounded', sans-serif;
    font-size: 12px;
    font-weight: 900;
    border: 2px solid var(--br);
    background: var(--gr);
    color: var(--mu);
    transition: all .3s;
}

.step-num.done {
    background: var(--green);
    border-color: var(--green);
    color: white;
}

.step-num.active {
    background: var(--blue);
    border-color: var(--blue);
    color: white;
    box-shadow: 0 0 0 3px var(--bp);
}

.step-label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--mu);
    white-space: nowrap;
}

.step-label.active {
    color: var(--navy);
    font-weight: 700;
}

.step-label.done {
    color: var(--gd);
}

.step-line {
    flex: 1;
    height: 2px;
    background: var(--br);
    margin: 0 8px;
    transition: background .3s;
}

.step-line.done {
    background: var(--green);
}

@media (max-width: 500px) {
    .step-label {
        display: none;
    }

    .step-line {
        margin: 0 4px;
    }
}

/* ── MAIN ── */
.page {
    max-width: 600px;
    margin: 0 auto;
    padding: 36px 24px 64px;
}

@media (max-width: 600px) {
    .page {
        padding: 24px 16px 48px;
    }
}

/* ── STEP 1: ROLE CHOOSER ── */
.step1 {
}

.step1-title {
    font-family: 'Unbounded', sans-serif;
    font-size: clamp(20px, 4vw, 28px);
    font-weight: 900;
    color: var(--navy);
    margin-bottom: 8px;
    text-align: center;
}

.step1-sub {
    font-size: 14px;
    color: var(--mu);
    text-align: center;
    margin-bottom: 32px;
    line-height: 1.6;
}

.role-grid {
    display: grid;
    grid-template-columns:1fr 1fr;
    gap: 16px;
    margin-bottom: 28px;
}

@media (max-width: 480px) {
    .role-grid {
        grid-template-columns:1fr;
    }
}

.role-card {
    background: white;
    border: 3px solid var(--br);
    border-radius: 20px;
    padding: 28px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s, transform .2s;
    position: relative;
}

.role-card:hover {
    border-color: var(--blue);
    box-shadow: var(--shl);
    transform: translateY(-4px);
}

.role-card.selected {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px var(--bp);
}

.role-card.supplier:hover, .role-card.supplier.selected {
    border-color: var(--green);
    box-shadow: var(--shl);
}

.role-card.supplier.selected {
    box-shadow: 0 0 0 4px var(--gp);
}

.role-check {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--br);
    background: var(--gr);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
}

.role-card.selected .role-check {
    background: var(--blue);
    border-color: var(--blue);
    color: white;
}

.role-card.supplier.selected .role-check {
    background: var(--green);
    border-color: var(--green);
}

.role-emoji {
    font-size: 48px;
    margin-bottom: 14px;
    display: block;
}

.role-title {
    font-family: 'Unbounded', sans-serif;
    font-size: 16px;
    font-weight: 900;
    color: var(--navy);
    margin-bottom: 8px;
}

.role-desc {
    font-size: 12.5px;
    color: var(--mu);
    line-height: 1.6;
    margin-bottom: 16px;
}

.role-benefits {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
}

.rb {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    font-size: 12px;
    color: var(--tx);
}

.rb::before {
    content: '✓';
    color: var(--green);
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 1px;
}

.btn-choose {
    width: 100%;
    padding: 15px;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--bl), var(--blue));
    color: white;
    font-family: 'Manrope', sans-serif;
    font-size: 15px;
    font-weight: 700;
    border: none;
    box-shadow: 0 6px 20px rgba(18, 85, 204, .3);
    transition: transform .15s, box-shadow .15s, opacity .15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-choose:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(18, 85, 204, .4);
}

.btn-choose:disabled {
    opacity: .4;
    cursor: not-allowed;
    transform: none;
}

/* ── STEP 2: FORM ── */
.step2 {
    display: none;
}

.form-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
}

.fh-back {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 2px solid var(--br);
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--mu);
    transition: all .15s;
    flex-shrink: 0;
}

.fh-back:hover {
    border-color: var(--blue);
    color: var(--blue);
}

.fh-title {
    font-family: 'Unbounded', sans-serif;
    font-size: 18px;
    font-weight: 900;
    color: var(--navy);
}

.fh-sub {
    font-size: 13px;
    color: var(--mu);
    margin-top: 3px;
}

.role-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 100px;
    margin-left: auto;
    flex-shrink: 0;
}

.rb-buyer {
    background: var(--bp);
    color: var(--blue);
}

.rb-supplier {
    background: var(--gp);
    color: var(--gd);
}

/* Form card */
.form-card {
    background: white;
    border-radius: 20px;
    border: 2px solid var(--br);
    padding: 28px;
    box-shadow: var(--sh);
    margin-bottom: 16px;
}

.fc-section {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--mu);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--br);
}

.field-grid {
    display: grid;
    grid-template-columns:1fr 1fr;
    gap: 14px;
}

@media (max-width: 480px) {
    .field-grid {
        grid-template-columns:1fr;
    }
}

.field {
    margin-bottom: 14px;
}

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

.field label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: var(--mu);
    margin-bottom: 5px;
}

.field-wrap {
    position: relative;
}

.field-wrap svg {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--mu);
    pointer-events: none;
}

.field input, .field select {
    width: 100%;
    padding: 12px 12px 12px 38px;
    border: 2px solid var(--br);
    border-radius: 11px;
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    color: var(--tx);
    background: var(--gr);
    outline: none;
    transition: border-color .2s, background .2s;
}

.field input:focus, .field select:focus {
    border-color: var(--blue);
    background: white;
}

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

.field select {
    padding-left: 38px;
}

.field .pw-toggle {
    position: absolute;
    right: 12px;
    top: 70%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--mu);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.field .pw-toggle .toggle-svg {
    position: relative;
    left: 4px;
}

.field .pw-toggle:hover {
    color: var(--navy);
}

.field.error input, .field.error select {
    border-color: var(--red);
}

.field-err {
    font-size: 11.5px;
    color: var(--red);
    font-weight: 600;
    margin-top: 4px;
    display: none;
}

.field.error .field-err {
    display: block;
}

/* Strength bar */
.pwd-strength {
    margin-top: 6px;
    height: 4px;
    background: var(--gr2);
    border-radius: 4px;
    overflow: hidden;
}

.pwd-strength-fill {
    height: 100%;
    border-radius: 4px;
    transition: width .3s, background .3s;
}

.pwd-hint {
    font-size: 11px;
    color: var(--mu);
    margin-top: 4px;
}

/* Phone prefix */
.phone-prefix {
    display: flex;
    align-items: center;
    gap: 8px;
}

#regForm .hidden {
    display: none;
}

.phone-prefix-label {
    position: relative;
    left: 9px;
    padding: 12px 12px;
    border: 2px solid var(--br);
    border-radius: 11px 0 0 11px;
    background: var(--gr);
    font-size: 14px;
    font-weight: 700;
    color: var(--tx);
    border-right: none;
    white-space: nowrap;
    flex-shrink: 0;
}

.phone-prefix input {
    border-radius: 0 11px 11px 0;
    padding-left: 12px;
}

/* Agreement */
.agreement {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: var(--mu);
    line-height: 1.6;
    margin-bottom: 20px;
}

.agreement input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 2px;
    accent-color: var(--blue);
    cursor: pointer;
}

.agreement a {
    color: var(--blue);
    font-weight: 700;
}

/* Submit */
.btn-reg {
    width: 100%;
    padding: 15px;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--bl), var(--blue));
    color: white;
    font-family: 'Manrope', sans-serif;
    font-size: 15px;
    font-weight: 700;
    border: none;
    box-shadow: 0 6px 20px rgba(18, 85, 204, .3);
    transition: transform .15s, box-shadow .15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 14px;
}

.btn-reg.green {
    background: linear-gradient(135deg, var(--green), var(--gd));
    box-shadow: 0 6px 20px rgba(0, 201, 141, .3);
}

.btn-reg:hover {
    transform: translateY(-2px);
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: var(--mu);
    margin-bottom: 14px;
}

.divider::before, .divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--br);
}

/* Google */
.btn-google {
    width: 100%;
    padding: 13px;
    border-radius: 12px;
    background: white;
    border: 2px solid var(--br);
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--tx);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: border-color .2s, box-shadow .2s;
}

.btn-google:hover {
    border-color: var(--blue);
    box-shadow: 0 4px 14px rgba(18, 85, 204, .1);
}

.g-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Login link */
.login-link {
    text-align: center;
    font-size: 13.5px;
    color: var(--mu);
    margin-top: 16px;
}

.login-link a {
    color: var(--blue);
    font-weight: 700;
}

/* ── STEP 3: SUCCESS ── */
.step3 {
    display: none;
    text-align: center;
}

.success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--gp);
    border: 3px solid var(--green);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    margin: 0 auto 24px;
}

.step3 h2 {
    font-family: 'Unbounded', sans-serif;
    font-size: 22px;
    font-weight: 900;
    color: var(--navy);
    margin-bottom: 10px;
}

.step3 p {
    font-size: 14px;
    color: var(--mu);
    line-height: 1.7;
    margin-bottom: 28px;
}

.activation-steps {
    display: flex;
    gap: 0;
    justify-content: center;
    margin-bottom: 32px;
}

.as {
    flex: 1;
    max-width: 150px;
    text-align: center;
    position: relative;
}

.as::after {
    content: '→';
    position: absolute;
    right: -8px;
    top: 16px;
    color: var(--gr2);
    font-size: 18px;
}

.as:last-child::after {
    display: none;
}

.as-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-family: 'Unbounded', sans-serif;
    font-size: 13px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
}

.as-num.done {
    background: var(--green);
    color: white;
}

.as-num.curr {
    background: var(--blue);
    color: white;
}

.as-num.pend {
    background: var(--gr);
    color: var(--mu);
    border: 2px solid var(--br);
}

.as-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--mu);
}

.btn-activate {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--green), var(--gd));
    color: white;
    padding: 14px 32px;
    border-radius: 12px;
    font-family: 'Manrope', sans-serif;
    font-size: 15px;
    font-weight: 700;
    box-shadow: 0 6px 20px rgba(0, 201, 141, .3);
    transition: transform .15s;
}

.btn-activate:hover {
    transform: translateY(-2px);
}

/* Benefits strip at bottom */
.benefits-strip {
    display: grid;
    grid-template-columns:repeat(3, 1fr);
    gap: 12px;
    margin-top: 24px;
}

@media (max-width: 480px) {
    .benefits-strip {
        grid-template-columns:1fr;
        gap: 8px;
    }
}

.bs {
    background: white;
    border-radius: 14px;
    border: 2px solid var(--br);
    padding: 16px;
    text-align: center;
    box-shadow: var(--sh);
}

.bs-ic {
    font-size: 28px;
    margin-bottom: 8px;
}

.bs-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 4px;
}

.bs-sub {
    font-size: 11.5px;
    color: var(--mu);
    line-height: 1.5;
}

/* Alert */
.alert {
    background: #fee2e2;
    border: 1px solid rgba(232, 64, 64, .3);
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 13.5px;
    color: var(--red);
    font-weight: 600;
    margin-bottom: 18px;
    display: none;
    align-items: center;
    gap: 8px;
}

.alert.show {
    display: flex;
}

#gtt {
    position: fixed;
    bottom: 24px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .12);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s, transform .2s;
    z-index: 999;
}

#gtt.show {
    opacity: 1;
    pointer-events: auto;
}

#gtt:active {
    transform: scale(0.92);
}