/* ============================================================
   METRO PALM – REGISTER PAGE (APPLE STYLE)
   ============================================================ */

/* Loading screen (shared) */
#loading-screen {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}
#loading-screen.hidden { opacity: 0; visibility: hidden; }
.loader-logo {
    width: 3.5rem; height: 3.5rem; border-radius: 1rem;
    background: var(--accent); color: var(--bg-primary);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 1.5rem;
    animation: loaderPulse 1.2s ease-in-out infinite;
}
.loader-logo i { width: 1.8rem; height: 1.8rem; }
@keyframes loaderPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.08); opacity: 0.8; }
}
.loader-bar {
    width: 100px; height: 3px; background: var(--border);
    border-radius: 3px; overflow: hidden;
}
.loader-bar-fill {
    width: 0%; height: 100%; background: var(--accent);
    animation: loaderFill 1.4s ease-in-out infinite;
}
@keyframes loaderFill {
    0% { width: 0%; } 50% { width: 100%; } 100% { width: 0%; }
}

/* Centered layout */
.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1.5rem;
    background: var(--bg-primary);
}

/* Container – wider than login, no card on mobile */
.auth-container {
    width: 100%;
    max-width: 480px;
}

/* Brand */
.auth-brand {
    text-align: center;
    margin-bottom: 2rem;
}
.brand-icon {
    width: 3.5rem; height: 3.5rem; border-radius: 1rem;
    background: var(--accent); color: var(--bg-primary);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1rem;
}
.brand-icon i { width: 1.8rem; height: 1.8rem; }
.auth-brand h1 { font-size: 1.8rem; font-weight: 700; letter-spacing: -0.5px; }
.brand-tagline { color: var(--text-muted); margin-top: 0.3rem; font-size: 0.95rem; }

/* Progress Steps */
.progress-track {
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 2rem; gap: 0;
}
.progress-step {
    display: flex; flex-direction: column; align-items: center;
    color: var(--text-muted); font-size: 0.75rem; font-weight: 500;
    transition: color var(--transition);
}
.progress-step .step-bullet {
    width: 2rem; height: 2rem; border-radius: 50%;
    background: var(--bg-tertiary); border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 0.3rem; font-weight: 600;
    transition: all var(--transition);
}
.progress-step.active .step-bullet {
    background: var(--accent); border-color: var(--accent);
    color: var(--bg-primary);
}
.progress-step.completed .step-bullet {
    background: var(--accent); border-color: var(--accent);
    color: var(--bg-primary);
}
.progress-line {
    width: 2.5rem; height: 1px; background: var(--border);
    margin-bottom: 1rem;
}

/* Form steps */
.form-step { display: none; }
.form-step.active { display: block; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Input groups – same as components but tweaked */
.input-group { margin-bottom: 1.25rem; }
.input-label { display: block; margin-bottom: 0.4rem; font-weight: 500; font-size: 0.85rem; color: var(--text-secondary); }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap .input-icon {
    position: absolute; left: 1rem; width: 1.1rem; height: 1.1rem;
    color: var(--text-muted); pointer-events: none; z-index: 1;
}
.input-wrap input, .input-wrap select, .input-wrap textarea {
    width: 100%; padding: 0.85rem 1rem 0.85rem 2.8rem;
    background: var(--input-bg); border: 1px solid var(--border);
    border-radius: var(--radius-md); color: var(--text-primary);
    font-size: 1rem; transition: all var(--transition);
}
.input-wrap input:focus, .input-wrap select:focus, .input-wrap textarea:focus {
    outline: none; border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}
.input-wrap input::placeholder { color: var(--text-muted); }

/* Password toggle */
.password-toggle {
    position: absolute; right: 0.75rem; background: none;
    border: none; color: var(--text-muted); cursor: pointer;
    padding: 0.25rem; display: flex; align-items: center;
    transition: color var(--transition);
}
.password-toggle:hover { color: var(--accent); }
.password-toggle i { width: 1.1rem; height: 1.1rem; }

/* Hint text */
.hint-text { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.25rem; }

/* Terms checkbox */
.terms-check { margin: 1.5rem 0; }
.checkbox-label {
    display: flex; align-items: flex-start; gap: 0.5rem;
    font-size: 0.85rem; color: var(--text-secondary);
}
.checkbox-label input[type="checkbox"] { accent-color: var(--accent); margin-top: 0.2rem; }
.checkbox-label a { color: var(--accent); text-decoration: underline; font-weight: 500; }

/* Buttons */
.mt-2 { margin-top: 0.75rem; }

/* OTP specific */
.otp-header { text-align: center; margin-bottom: 1.5rem; }
.otp-icon-wrap {
    width: 3rem; height: 3rem; border-radius: 50%;
    background: var(--bg-tertiary); display: flex;
    align-items: center; justify-content: center;
    margin: 0 auto 0.75rem;
}
.otp-icon-wrap i { width: 1.5rem; height: 1.5rem; color: var(--accent); }
.otp-inputs { display: flex; gap: 0.6rem; justify-content: center; margin: 1.5rem 0; }
.otp-digit {
    width: 2.8rem; height: 3.2rem; text-align: center;
    font-size: 1.4rem; font-weight: 600; font-family: var(--font-mono);
    background: var(--input-bg); border: 1px solid var(--border);
    border-radius: var(--radius-sm); color: var(--text-primary);
    transition: border-color var(--transition);
}
.otp-digit:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }

/* Profile setup */
.profile-header { text-align: center; margin-bottom: 1.5rem; }
.profile-icon { width: 2.5rem; height: 2.5rem; color: var(--accent); margin-bottom: 0.5rem; }
.avatar-upload { text-align: center; margin-bottom: 1.5rem; }
.avatar-preview {
    width: 5rem; height: 5rem; border-radius: 50%;
    border: 2px dashed var(--border);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 0.75rem; cursor: pointer; overflow: hidden;
    transition: border-color var(--transition);
}
.avatar-preview:hover { border-color: var(--accent); }
.avatar-placeholder { width: 2rem; height: 2rem; color: var(--text-muted); }
#avatar-img { width: 100%; height: 100%; object-fit: cover; }
.hidden-file-input { display: none; }
.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%238e8e93' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 1rem center;
    background-size: 1rem; cursor: pointer;
}

/* Success */
.success-animation { text-align: center; margin-bottom: 1rem; }
.success-icon { width: 5rem; height: 5rem; color: var(--success); animation: scaleUp 0.5s ease; }
@keyframes scaleUp { from { transform: scale(0); } to { transform: scale(1); } }
.progress-bar { height: 4px; background: var(--border); border-radius: 2px; margin-top: 1.5rem; overflow: hidden; }
.progress-fill { height: 100%; width: 0; background: var(--accent); transition: width 3s linear; }

/* Error */
.error-message { color: var(--danger); font-size: 0.85rem; margin-bottom: 1rem; display: none; text-align: center; }

/* Footer */
.auth-footer { text-align: center; margin-top: 2rem; font-size: 0.95rem; color: var(--text-muted); }
.accent-link { color: var(--accent); font-weight: 600; }
.accent-link:hover { text-decoration: underline; }

/* ========== MOBILE ========== */
@media (max-width: 480px) {
    .auth-wrapper { padding: 1rem; }
    .auth-container { max-width: 100%; }
    .otp-digit { width: 2.4rem; height: 2.8rem; font-size: 1.2rem; }
    .input-wrap input, .input-wrap select, .input-wrap textarea {
        padding: 0.8rem 0.8rem 0.8rem 2.5rem;
    }
}