/* =========================================
   Reset & Base Styles
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: #f3f4f6;
    color: #111827;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

/* =========================================
   Single Card Shell
   ========================================= */
.reg-shell {
    width: 100%;
    max-width: 460px;
    /* Clean, modern width for single-card forms */
}

.reg-card {
    background-color: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05), 0 4px 6px rgba(0, 0, 0, 0.02);
    padding: 40px;
}

/* =========================================
   Header & Logo
   ========================================= */
.reg-logo {
    width: 48px;
    height: 48px;
    background-color: #2563eb;
    color: #ffffff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 20px;
    margin-bottom: 24px;
}

header h2.reg-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #111827;
}

header p.reg-subtitle {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* =========================================
   UI Indicators (Progress Bar, Alerts, Badge)
   ========================================= */
.progress-track {
    width: 100%;
    height: 6px;
    background-color: #e5e7eb;
    border-radius: 9999px;
    margin-bottom: 24px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: #2563eb;
    width: 50%;
    /* Default Step 1 */
    transition: width 0.3s ease-in-out;
}

.reg-alert {
    background-color: #fef2f2;
    border: 1px solid #f87171;
    color: #b91c1c;
    padding: 12px 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 20px;
}

.referral-badge {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #ecfdf5;
    border: 1px solid #a7f3d0;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.referral-badge p {
    font-size: 11px;
    color: #047857;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
}

.referral-badge strong {
    font-size: 15px;
    color: #065f46;
}

/* =========================================
   Form Elements
   ========================================= */
.reg-field {
    margin-bottom: 20px;
}

.reg-field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.reg-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.reg-input {
    width: 100%;
    padding: 12px 40px;
    /* Room for icon inside */
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: #111827;
    transition: all 0.2s ease;
}

.reg-input::placeholder {
    color: #9ca3af;
}

.reg-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.reg-input-icon {
    position: absolute;
    left: 12px;
    color: #9ca3af;
    display: flex;
    pointer-events: none;
}

.reg-pass-toggle,
.phone-check {
    position: absolute;
    right: 12px;
    background: transparent;
    border: none;
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reg-pass-toggle {
    cursor: pointer;
    transition: color 0.2s;
}

.reg-pass-toggle:hover {
    color: #4b5563;
}

.phone-check {
    color: #10b981;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.phone-check.is-visible {
    opacity: 1;
}

.password-match {
    font-size: 12px;
    margin-top: 6px;
    color: transparent;
    font-weight: 500;
}

.terms-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: #4b5563;
    margin-bottom: 24px;
    line-height: 1.4;
}

.terms-row input[type="checkbox"] {
    margin-top: 2px;
    width: 16px;
    height: 16px;
    accent-color: #2563eb;
    cursor: pointer;
}

.terms-row a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

.terms-row a:hover {
    text-decoration: underline;
}

/* =========================================
   Buttons & Actions
   ========================================= */
.reg-btn {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    font-family: inherit;
    border: none;
    transition: all 0.2s ease;
}

.reg-btn-dark {
    background-color: #111827;
    color: #ffffff;
}

.reg-btn-dark:hover {
    background-color: #1f2937;
}

.reg-btn-primary {
    background-color: #2563eb;
    color: #ffffff;
    flex: 1;
}

.reg-btn-primary:hover:not(:disabled) {
    background-color: #1d4ed8;
}

.reg-btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.reg-btn-row {
    display: flex;
    gap: 12px;
}

.reg-btn-back {
    background-color: #f3f4f6;
    color: #4b5563;
    width: auto;
    padding: 12px 16px;
}

.reg-btn-back:hover {
    background-color: #e5e7eb;
}

.reg-switch {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: #6b7280;
}

.reg-switch a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
    margin-left: 4px;
}

.reg-switch a:hover {
    text-decoration: underline;
}

/* =========================================
   Step Transitions & Utilities
   ========================================= */
.hidden {
    display: none !important;
}

.step-enter {
    animation: fadeSlideUp 0.3s ease-out forwards;
}

@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}