/* register.css — ebuyhubpay registration (paired with login.css visual language) */

:root {
    --reg-bg-deep: #0c1222;
    --reg-bg-mid: #151d32;
    --reg-accent: #4f6fff;
    --reg-accent-hover: #3d5aee;
    --reg-accent-soft: rgba(79, 111, 255, 0.12);
    --reg-text: #0f172a;
    --reg-muted: #64748b;
    --reg-border: #e2e8f0;
    --reg-card: #ffffff;
    --reg-radius: 20px;
    --reg-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.18);
    --reg-font: "DM Sans", system-ui, -apple-system, sans-serif;
    --reg-danger: #dc2626;
    --reg-danger-bg: #fef2f2;
    --reg-success: #16a34a;
    --reg-success-bg: #f0fdf4;
}

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

html {
    -webkit-font-smoothing: antialiased;
}

body.register-page {
    margin: 0;
    min-height: 100vh;
    font-family: var(--reg-font);
    color: var(--reg-text);
    background: var(--reg-bg-deep);
    overflow-x: hidden;
}

.register-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse 80% 50% at 20% 40%, rgba(79, 111, 255, 0.35), transparent 55%),
        radial-gradient(ellipse 60% 40% at 80% 20%, rgba(56, 189, 248, 0.12), transparent 50%),
        radial-gradient(ellipse 70% 60% at 50% 100%, rgba(79, 111, 255, 0.15), transparent 45%),
        linear-gradient(165deg, var(--reg-bg-deep) 0%, var(--reg-bg-mid) 48%, #0a0f1a 100%);
}

.register-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.4;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.register-shell {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);
    max-width: 1140px;
    margin: 0 auto;
    align-items: stretch;
}

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

/* Brand */
.register-brand {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(2rem, 5vw, 4rem);
    padding-right: clamp(1.5rem, 4vw, 3rem);
    color: #f1f5f9;
}

@media (max-width: 960px) {
    .register-brand {
        padding: 2.5rem 1.5rem 1rem;
        text-align: center;
        align-items: center;
    }
}

.register-brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(241, 245, 249, 0.7);
    margin-bottom: 1.25rem;
}

.register-brand-badge span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 12px rgba(74, 222, 128, 0.55);
}

.register-logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
    border: 1px solid rgba(255, 255, 255, 0.12);
    margin-bottom: 1.25rem;
    font-size: 1.4rem;
    color: #fff;
}

.register-brand h1 {
    font-size: clamp(1.65rem, 4vw, 2.2rem);
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 0.65rem;
    letter-spacing: -0.02em;
}

.register-brand h1 em {
    font-style: normal;
    background: linear-gradient(135deg, #fff 0%, #94a8ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.register-brand-lead {
    font-size: 1rem;
    line-height: 1.65;
    color: rgba(241, 245, 249, 0.72);
    margin: 0 0 1.75rem;
    max-width: 30ch;
}

@media (max-width: 960px) {
    .register-brand-lead {
        max-width: 38ch;
    }
}

.register-perks {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

@media (max-width: 960px) {
    .register-perks {
        display: none;
    }
}

.register-perks li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.92rem;
    color: rgba(241, 245, 249, 0.88);
}

.register-perks li i {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(79, 111, 255, 0.2);
    color: #a5b4fc;
    font-size: 0.88rem;
}

.register-back-home {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.25rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: rgba(241, 245, 249, 0.55);
    text-decoration: none;
    transition: color 0.2s;
}

.register-back-home:hover {
    color: #fff;
}

@media (min-width: 961px) {
    .register-back-home {
        position: fixed;
        bottom: 1.5rem;
        left: 1.5rem;
        z-index: 2;
        margin-top: 0;
    }
}

@media (max-width: 960px) {
    .register-back-home {
        display: none;
    }
}

/* Form column */
.register-panel {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: clamp(1.25rem, 3vw, 2.75rem);
    padding-left: clamp(1rem, 2.5vw, 2rem);
    max-height: 100vh;
    overflow-y: auto;
}

@media (max-width: 960px) {
    .register-panel {
        max-height: none;
        overflow: visible;
        padding: 0 1.15rem 2.5rem;
    }
}

.register-card {
    width: 100%;
    max-width: 460px;
    background: var(--reg-card);
    border-radius: var(--reg-radius);
    box-shadow: var(--reg-shadow);
    padding: clamp(1.5rem, 3.5vw, 2.25rem);
    border: 1px solid rgba(255, 255, 255, 0.08);
    animation: reg-card-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes reg-card-in {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.99);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.register-home-mobile {
    display: none;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--reg-accent);
    text-decoration: none;
    margin-bottom: 0.5rem;
}

.register-home-mobile:hover {
    text-decoration: underline;
}

@media (max-width: 960px) {
    .register-home-mobile {
        display: inline-block;
    }
}

.register-card-header h2 {
    font-size: 1.45rem;
    font-weight: 700;
    margin: 0 0 0.35rem;
    letter-spacing: -0.02em;
}

.register-card-header p {
    margin: 0 0 1.25rem;
    font-size: 0.9rem;
    color: var(--reg-muted);
    line-height: 1.5;
}

.reg-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    margin-bottom: 1.1rem;
    font-size: 0.875rem;
    line-height: 1.45;
}

.reg-alert i {
    margin-top: 0.12rem;
    flex-shrink: 0;
}

.reg-alert--error {
    background: var(--reg-danger-bg);
    color: #991b1b;
    border: 1px solid #fecaca;
}

.reg-alert--success {
    background: #eef2ff;
    color: #3730a3;
    border: 1px solid #c7d2fe;
}

.reg-field {
    margin-bottom: 1rem;
}

.reg-field label {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--reg-text);
    margin-bottom: 0.45rem;
}

.reg-field label i {
    color: var(--reg-accent);
    font-size: 0.85rem;
    opacity: 0.9;
}

.reg-field input[type="text"],
.reg-field input[type="tel"],
.reg-field input[type="email"],
.reg-field input[type="password"] {
    width: 100%;
    padding: 0.78rem 0.95rem;
    font-size: 0.93rem;
    font-family: inherit;
    border: 1.5px solid var(--reg-border);
    border-radius: 12px;
    background: #fafbfc;
    color: var(--reg-text);
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.reg-field input::placeholder {
    color: #94a3b8;
}

.reg-field input:hover:not(:read-only) {
    border-color: #cbd5e1;
    background: #fff;
}

.reg-field input:focus {
    outline: none;
    border-color: var(--reg-accent);
    background: #fff;
    box-shadow: 0 0 0 4px var(--reg-accent-soft);
}

.reg-field input:read-only {
    background: #f1f5f9;
    color: var(--reg-muted);
    cursor: default;
}

.reg-input-row {
    display: flex;
    gap: 0.65rem;
    align-items: stretch;
}

.reg-input-row input {
    flex: 1;
    min-width: 0;
}

.btn-send-otp {
    flex-shrink: 0;
    padding: 0 1rem;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, var(--reg-accent) 0%, #3b4fd9 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 8px 20px -6px rgba(79, 111, 255, 0.45);
    transition: filter 0.2s, transform 0.15s;
}

.btn-send-otp:hover:not(:disabled) {
    filter: brightness(1.06);
}

.btn-send-otp:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    box-shadow: none;
}

.reg-section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.35rem 0 1rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--reg-muted);
}

.reg-section-title::before,
.reg-section-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--reg-border), transparent);
}

.reg-otp-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 1rem;
    margin-top: 0.5rem;
}

.otp-timer {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--reg-danger);
    margin: 0;
}

.resend-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    margin-top: 0.35rem;
}

.resend-link {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--reg-accent);
    text-decoration: none;
}

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

.voice-link {
    color: #0ea5e9;
}

.feedback-msg {
    font-size: 0.8rem;
    margin-top: 0.35rem;
    font-weight: 500;
}

.feedback-msg.error {
    color: var(--reg-danger);
}

.feedback-msg.success {
    color: var(--reg-success);
}

.reg-password-wrap {
    position: relative;
}

.reg-password-wrap input {
    padding-right: 2.75rem;
}

.reg-toggle-pw {
    position: absolute;
    right: 0.65rem;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: none;
    padding: 0.35rem;
    border-radius: 8px;
    cursor: pointer;
    color: #94a3b8;
    font-size: 1rem;
    line-height: 1;
    transition: color 0.2s, background 0.2s;
}

.reg-toggle-pw:hover {
    color: var(--reg-accent);
    background: var(--reg-accent-soft);
}

.btn-register-submit {
    width: 100%;
    margin-top: 0.35rem;
    padding: 0.88rem 1.2rem;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, var(--reg-accent) 0%, #3b4fd9 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 10px 28px -8px rgba(79, 111, 255, 0.55);
    transition: filter 0.2s, transform 0.15s;
}

.btn-register-submit:hover:not(:disabled) {
    filter: brightness(1.05);
}

.btn-register-submit:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    box-shadow: none;
}

.register-footer {
    text-align: center;
    margin-top: 1.35rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--reg-border);
    font-size: 0.9rem;
    color: var(--reg-muted);
}

.register-footer a {
    color: var(--reg-accent);
    font-weight: 600;
    text-decoration: none;
}

.register-footer a:hover {
    text-decoration: underline;
}

/* Success modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 4000;
    background: rgba(12, 18, 34, 0.72);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    animation: reg-modal-bg 0.3s ease;
}

@keyframes reg-modal-bg {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-overlay[style*="flex"] {
    display: flex !important;
}

.modal-content.vibrant-modal {
    width: 100%;
    max-width: 400px;
    background: var(--reg-card);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 32px 64px -16px rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: reg-modal-pop 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes reg-modal-pop {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-decoration {
    display: none;
}

.modal-header-curve {
    background: linear-gradient(135deg, #4f6fff 0%, #3730a3 100%);
    height: 96px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    padding-bottom: 0;
}

.success-icon-large {
    width: 76px;
    height: 76px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
    position: absolute;
    bottom: -38px;
    border: 4px solid var(--reg-card);
}

.success-icon-large i {
    font-size: 2rem;
    color: var(--reg-success);
}

.modal-body {
    padding: 3rem 1.75rem 1.75rem;
    text-align: center;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.35rem;
    color: var(--reg-text);
}

.modal-subtitle {
    font-size: 0.92rem;
    color: var(--reg-muted);
    margin: 0 0 1.25rem;
    line-height: 1.5;
}

.user-details-card {
    background: #f8fafc;
    border-radius: 14px;
    padding: 1rem 1.1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--reg-border);
    text-align: left;
}

.card-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.55rem 0;
    border-bottom: 1px dashed #e2e8f0;
}

.card-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.card-row:first-child {
    padding-top: 0;
}

.card-label {
    font-size: 0.8rem;
    color: var(--reg-muted);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}

.card-value {
    font-size: 0.88rem;
    color: var(--reg-text);
    font-weight: 600;
    text-align: right;
    word-break: break-word;
    max-width: 58%;
}

.highlight-id {
    color: var(--reg-accent);
    font-weight: 700;
    background: var(--reg-accent-soft);
    padding: 0.15rem 0.5rem;
    border-radius: 8px;
}

.sensitive-data {
    font-family: ui-monospace, monospace;
    font-size: 0.82rem;
}

.screenshot-hint-box {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.78rem;
    color: var(--reg-muted);
    margin-bottom: 1.15rem;
    text-align: left;
    line-height: 1.45;
}

.screenshot-hint-box i {
    color: var(--reg-accent);
    margin-top: 0.1rem;
}

.btn-login-now {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.9rem 1.2rem;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    background: linear-gradient(135deg, var(--reg-accent) 0%, #3b4fd9 100%);
    box-shadow: 0 10px 24px -6px rgba(79, 111, 255, 0.5);
    transition: filter 0.2s, transform 0.15s;
}

.btn-login-now:hover {
    filter: brightness(1.06);
}

.btn-login-now i {
    font-size: 0.9rem;
}
