/* ─── Base ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --brand-dark:    #0f0c29;
    --brand-mid:     #302b63;
    --brand-purple:  #6c63ff;
    --brand-violet:  #9b59b6;
    --brand-accent:  #a29bfe;
    --text-light:    #f0eeff;
    --text-muted:    rgba(255,255,255,.65);
    --card-bg:       #ffffff;
    --input-border:  #e2e0f0;
    --input-focus:   #6c63ff;
    --success:       #00b894;
    --danger:        #e17055;
}

html, body { height: 100%; font-family: 'Inter', sans-serif; }

/* ─── Page Shell ────────────────────────────────────────────── */
.reg-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, var(--brand-dark) 0%, var(--brand-mid) 55%, #24243e 100%);
}

/* ─── Split Layout ──────────────────────────────────────────── */
.reg-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.reg-card {
    display: flex;
    width: 100%;
    max-width: 960px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 32px 80px rgba(0,0,0,.45);
    animation: fadeUp .55s ease both;
}

/* ─── Left Panel ────────────────────────────────────────────── */
.reg-left {
    flex: 0 0 42%;
    background: linear-gradient(160deg, #1a1040 0%, #2d1b69 60%, #6c63ff 100%);
    padding: 3rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.reg-left::before {
    content: '';
    position: absolute;
    width: 300px; height: 300px;
    border-radius: 50%;
    background: rgba(255,255,255,.04);
    top: -80px; left: -80px;
}

.reg-left::after {
    content: '';
    position: absolute;
    width: 200px; height: 200px;
    border-radius: 50%;
    background: rgba(255,255,255,.05);
    bottom: -50px; right: -50px;
}

.brand-identity {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: 1.5rem;
}

.brand-logo {
    width: 200px;
    max-width: 100%;
    height: auto;
    flex-shrink: 0;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,.2));
}

.brand-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: .01em;
    line-height: 1.2;
}

.brand-tagline {
    color: var(--text-light);
}

.brand-tagline h1 {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: .75rem;
}

.brand-tagline p {
    font-size: .9rem;
    color: var(--text-muted);
    line-height: 1.65;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 2rem 0 0;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: .65rem;
    color: var(--text-muted);
    font-size: .82rem;
    margin-bottom: .85rem;
}

.feature-list li i {
    width: 28px; height: 28px;
    border-radius: 8px;
    background: rgba(255,255,255,.12);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    font-size: .9rem;
    color: var(--brand-accent);
}

.left-footer {
    font-size: .72rem;
    color: rgba(255,255,255,.35);
    margin-top: 2rem;
    position: relative;
    z-index: 1;
}

/* ─── Right Panel ───────────────────────────────────────────── */
.reg-right {
    flex: 1;
    background: var(--card-bg);
    padding: 3rem 2.75rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.form-header { margin-bottom: 2rem; }

.form-header h2 {
    font-size: 1.65rem;
    font-weight: 700;
    color: #1a1040;
    margin-bottom: .35rem;
}

.form-header p {
    font-size: .85rem;
    color: #8585a4;
}

/* ─── Form Controls ─────────────────────────────────────────── */
.form-group { margin-bottom: 1.15rem; }

.form-label {
    font-size: .78rem;
    font-weight: 600;
    color: #4a4a6a;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: .4rem;
    display: block;
}

.input-wrap {
    position: relative;
}

.input-icon {
    position: absolute;
    left: .9rem;
    top: 50%;
    transform: translateY(-50%);
    color: #b0aecf;
    font-size: .95rem;
    pointer-events: none;
    transition: color .2s;
}

.form-control, .form-select {
    width: 100%;
    padding: .7rem 1rem .7rem 2.5rem;
    border: 1.5px solid var(--input-border);
    border-radius: 10px;
    font-size: .9rem;
    font-family: 'Inter', sans-serif;
    color: #1a1040;
    background: #fafafa;
    outline: none;
    transition: border-color .2s, box-shadow .2s, background .2s;
    appearance: none;
    -webkit-appearance: none;
}

.form-control::placeholder { color: #c0bedd; }

.form-control:focus, .form-select:focus {
    border-color: var(--input-focus);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(108,99,255,.12);
}

.form-control:focus + .input-icon,
.input-wrap:focus-within .input-icon { color: var(--input-focus); }

.select-wrap { position: relative; }

.select-wrap::after {
    content: '\F282';
    font-family: 'Bootstrap-Icons';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #b0aecf;
    pointer-events: none;
    font-size: .85rem;
}

.text-danger { font-size: .75rem; margin-top: .25rem; display: block; color: var(--danger) !important; }

/* ─── Alert ─────────────────────────────────────────────────── */
.alert-success-custom {
    background: #e8fff6;
    border: 1.5px solid #00b894;
    color: #007a64;
    border-radius: 10px;
    padding: .85rem 1rem;
    font-size: .85rem;
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: 1.25rem;
    animation: fadeIn .3s ease;
}

.alert-error-custom {
    background: #fff3f0;
    border: 1.5px solid #e17055;
    color: #c0392b;
    border-radius: 10px;
    padding: .85rem 1rem;
    font-size: .85rem;
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: 1.25rem;
}

/* ─── Email Verify Row ──────────────────────────────────────── */
.email-verify-row {
    display: flex;
    gap: .6rem;
    align-items: stretch;
}

.btn-send-otp {
    flex-shrink: 0;
    padding: 0 1rem;
    background: var(--brand-purple);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: .8rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    white-space: nowrap;
    transition: background .2s, transform .15s;
    display: flex;
    align-items: center;
    gap: .4rem;
}

.btn-send-otp:hover { background: #5a52e0; transform: translateY(-1px); }
.btn-send-otp:disabled { opacity: .65; cursor: not-allowed; transform: none; }

.otp-btn-spinner {
    width: 14px; height: 14px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .6s linear infinite;
}

/* ─── OTP Section ────────────────────────────────────────────── */
.otp-section {
    background: #f7f6ff;
    border: 1.5px solid #e0defc;
    border-radius: 12px;
    padding: 1rem 1.1rem;
    margin-bottom: 1.1rem;
    animation: fadeIn .25s ease;
}

.otp-input-row {
    display: flex;
    gap: .6rem;
    margin-top: .4rem;
}

.otp-input {
    flex: 1;
    padding: .65rem 1rem;
    border: 1.5px solid var(--input-border);
    border-radius: 10px;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: .15em;
    text-align: center;
    font-family: 'Inter', sans-serif;
    color: #1a1040;
    background: #fff;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}

.otp-input:focus {
    border-color: var(--input-focus);
    box-shadow: 0 0 0 3px rgba(108,99,255,.12);
}

.btn-verify-otp {
    padding: .65rem 1.1rem;
    background: linear-gradient(135deg, #6c63ff, #9b59b6);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: .85rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: opacity .2s, transform .15s;
    white-space: nowrap;
}

.btn-verify-otp:hover { opacity: .9; transform: translateY(-1px); }
.btn-verify-otp:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.otp-timer {
    font-size: .75rem;
    font-weight: 500;
    color: var(--brand-purple);
    margin-left: .3rem;
}

.otp-message {
    font-size: .78rem;
    margin-top: .5rem;
    border-radius: 6px;
    min-height: 1.1em;
}

.otp-message.info  { color: #6c63ff; }
.otp-message.error { color: var(--danger); }

.btn-resend {
    background: none;
    border: none;
    color: var(--brand-purple);
    font-size: .78rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    padding: .3rem 0;
    margin-top: .35rem;
    display: inline-flex;
    align-items: center;
    gap: .3rem;
}

.btn-resend:hover { text-decoration: underline; }

/* ─── Verified Badge ─────────────────────────────────────────── */
.verified-badge {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .78rem;
    font-weight: 600;
    color: var(--success);
    margin-top: .4rem;
    animation: fadeIn .3s ease;
}

/* ─── Password Toggle ───────────────────────────────────────── */
.pwd-toggle {
    position: absolute;
    right: .75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #b0aecf;
    font-size: 1rem;
    line-height: 1;
    transition: color .2s;
}

.pwd-toggle:hover { color: var(--brand-purple); }

/* ─── Password Strength Bar ─────────────────────────────────── */
.pwd-strength-bar {
    display: flex;
    gap: 4px;
    margin-top: 6px;
    height: 4px;
}

.pwd-strength-bar span {
    flex: 1;
    border-radius: 2px;
    background: #e8e7f5;
    transition: background .3s;
}

.pwd-strength-bar.weak   span:nth-child(1)                          { background: #e17055; }
.pwd-strength-bar.fair   span:nth-child(-n+2)                       { background: #fdcb6e; }
.pwd-strength-bar.good   span:nth-child(-n+3)                       { background: #74b9ff; }
.pwd-strength-bar.strong span                                        { background: #00b894; }

/* ─── Submit Button ─────────────────────────────────────────── */
.btn-register {
    width: 100%;
    padding: .8rem;
    background: linear-gradient(135deg, #6c63ff 0%, #9b59b6 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: .95rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: transform .18s, box-shadow .18s, opacity .18s;
    box-shadow: 0 6px 20px rgba(108,99,255,.35);
    margin-top: .5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    letter-spacing: .02em;
}

.btn-register:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 28px rgba(108,99,255,.5);
    opacity: .95;
}

.btn-register:active { transform: translateY(0); }

.btn-register .spinner {
    display: none;
    width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,.5);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .6s linear infinite;
}

.btn-register.loading .spinner { display: block; }
.btn-register.loading .btn-text { display: none; }

/* ─── Step Dots ─────────────────────────────────────────────── */
.form-progress {
    display: flex;
    gap: .35rem;
    margin-bottom: 1.75rem;
}

.form-progress span {
    height: 4px;
    border-radius: 2px;
    flex: 1;
    background: #e8e7f5;
    transition: background .3s;
}

.form-progress span.active { background: var(--brand-purple); }

/* ─── Success Panel ──────────────────────────────────────────── */
.success-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem 0;
    animation: fadeUp .5s ease both;
    height: 100%;
}

/* Animated SVG tick */
.success-circle {
    width: 90px;
    height: 90px;
    margin-bottom: 1.5rem;
}

.tick-svg { width: 90px; height: 90px; }

.tick-circle {
    stroke: #6c63ff;
    stroke-width: 2.5;
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-linecap: round;
    animation: drawCircle .6s cubic-bezier(.65,0,.45,1) .2s forwards;
}

.tick-check {
    stroke: #6c63ff;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: drawCheck .4s cubic-bezier(.65,0,.45,1) .85s forwards;
}

@keyframes drawCircle {
    to { stroke-dashoffset: 0; }
}

@keyframes drawCheck {
    to { stroke-dashoffset: 0; }
}

.success-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1a1040;
    margin-bottom: .5rem;
    animation: fadeUp .4s ease .9s both;
}

.success-sub {
    font-size: .9rem;
    color: #6b6b8d;
    line-height: 1.65;
    margin-bottom: 1.4rem;
    animation: fadeUp .4s ease 1s both;
}

.success-sub strong { color: var(--brand-purple); }

.success-info-card {
    display: flex;
    align-items: center;
    gap: .65rem;
    background: #f0eeff;
    border: 1.5px solid #d8d4ff;
    border-radius: 10px;
    padding: .75rem 1rem;
    font-size: .82rem;
    color: #5a52cc;
    margin-bottom: 1.5rem;
    width: 100%;
    animation: fadeUp .4s ease 1.1s both;
}

.success-info-card i { font-size: 1.1rem; flex-shrink: 0; }

.success-steps {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: .65rem;
    animation: fadeUp .4s ease 1.2s both;
}

.success-step {
    display: flex;
    align-items: center;
    gap: .75rem;
    background: #fafafa;
    border: 1px solid #ebebf5;
    border-radius: 10px;
    padding: .65rem .9rem;
    font-size: .82rem;
    color: #4a4a6a;
    text-align: left;
}

.step-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6c63ff, #9b59b6);
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ─── Redirect Countdown ─────────────────────────────────────── */
.redirect-countdown {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .6rem;
    background: linear-gradient(135deg, #f0eeff, #e8f4ff);
    border: 1.5px solid #d0c8ff;
    border-radius: 14px;
    padding: 1.1rem 1.4rem;
    margin-bottom: 1.4rem;
    width: 100%;
    animation: fadeUp .4s ease 1.15s both;
}

.countdown-ring {
    position: relative;
    width: 56px;
    height: 56px;
}

.countdown-ring svg {
    width: 56px;
    height: 56px;
}

.countdown-track { stroke: #e0d8ff; }
.countdown-fill  {
    stroke: #6c63ff;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s linear;
}

.countdown-number {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    color: #6c63ff;
}

.countdown-label {
    font-size: .82rem;
    color: #5a52cc;
    margin: 0;
    line-height: 1.5;
}

.btn-go-now {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: var(--brand-purple);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: .5rem 1.1rem;
    font-size: .82rem;
    font-weight: 600;
    text-decoration: none;
    transition: background .2s, transform .15s;
}

.btn-go-now:hover {
    background: #5a52cc;
    color: #fff;
    transform: translateY(-1px);
}

/* ─── Footer ─────────────────────────────────────────────────── */
.reg-page-footer {
    text-align: center;
    padding: 1rem;
    font-size: .73rem;
    color: rgba(255,255,255,.3);
}

/* ─── Animations ─────────────────────────────────────────────── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

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

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
    .reg-card {
        flex-direction: column;
        border-radius: 20px;
        max-width: 480px;
    }

    .reg-left {
        flex: none;
        padding: 2rem 2rem 1.75rem;
    }

    .brand-logo { width: 160px; }
    .brand-name { font-size: 1rem; }
    .brand-identity { margin-bottom: 1.25rem; }

    .brand-tagline h1 { font-size: 1.4rem; }

    .feature-list { display: none; }

    .reg-right { padding: 2rem 1.75rem; }

    .form-header h2 { font-size: 1.35rem; }
}

@media (max-width: 480px) {
    .reg-wrapper { padding: 1rem .75rem; }

    .reg-left { padding: 1.5rem; }
    .brand-logo { width: 140px; }

    .reg-right { padding: 1.75rem 1.25rem; }
}
