/* ==========================================
   ORINEST MODERN REGISTRATION & LOGIN STYLES
   Centered Layout | Brand Colors | No Side Panels
   ========================================== */

:root {
    /* Brand Colors */
    --accent-color: #FF6600;
    --surface-color: #e3fbff;
    --contrast-color: #e3fbff;
    --primary-color: #1e3a8a;
    --primary-hover: #152a61;
    
    /* Extended Palette */
    --primary-light: #3b5ea8;
    --accent-light: #ff8533;
    --accent-dark: #cc5200;
    --surface-dark: #d0f0ff;
    --background: #f8fcff;
    --white: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --text-light: #999999;
    --border: #e0e0e0;
    --border-focus: #FF6600;
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    
    /* Gradients */
    --gradient-brand: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    --gradient-accent: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-dark) 100%);
    --gradient-surface: linear-gradient(135deg, var(--surface-color) 0%, var(--white) 100%);
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 12px 40px rgba(0, 0, 0, 0.2);
    
    /* Animations */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================
   RESET & BASE STYLES
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ==========================================
   AUTH WRAPPER - CENTERED LAYOUT
   ========================================== */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    position: relative;
    overflow: hidden;
}

/* Background Gradient */
.auth-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-surface);
    z-index: 0;
}

/* Floating Shapes */
.auth-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: var(--primary-color);
    opacity: 0.05;
    animation: float 20s infinite ease-in-out;
}

.shape:nth-child(1) {
    width: 400px;
    height: 400px;
    top: -200px;
    left: -200px;
    animation-delay: 0s;
}

.shape:nth-child(2) {
    width: 300px;
    height: 300px;
    bottom: -150px;
    right: -150px;
    animation-delay: 5s;
}

.shape:nth-child(3) {
    width: 200px;
    height: 200px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(50px, -50px) scale(1.1); }
    50% { transform: translate(-30px, 30px) scale(0.9); }
    75% { transform: translate(30px, 50px) scale(1.05); }
}

/* ==========================================
   CARD FORM - CENTERED CONTAINER
   ========================================== */
.card-form {
    position: relative;
    z-index: 10;
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 480px;
    padding: 2rem 2rem;
    animation: slideUp 0.6s ease-out;
}

.card-form.card-wide {
    max-width: 900px;
    padding: 2rem 2.5rem;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================
   FORM HEADER
   ========================================== */
.form-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.logo-mark {
    width: 50px;
    height: 50px;
    margin: 0 auto 0.75rem;
    background: var(--gradient-brand);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.5rem;
    font-weight: 700;
    box-shadow: var(--shadow-md);
}

.form-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.375rem;
    letter-spacing: -0.025em;
}

.form-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* ==========================================
   ALERT MESSAGES
   ========================================== */
.alert {
    padding: 0.875rem 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid var(--success);
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid var(--error);
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border-left: 4px solid #3b82f6;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border-left: 4px solid var(--warning);
}

/* ==========================================
   FORM GROUPS
   ========================================== */
.form-group {
    margin-bottom: 1rem;
}

.label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.375rem;
}

.label .required {
    color: var(--error);
    margin-left: 2px;
}

.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 1rem;
    color: var(--text-light);
    font-size: 1rem;
    pointer-events: none;
    z-index: 2;
}

.input, .select {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    font-size: 0.9375rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: var(--white);
    color: var(--text-primary);
    transition: all var(--transition-fast);
    font-family: inherit;
}

.input:focus, .select:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 4px rgba(255, 102, 0, 0.1);
}

.input::placeholder {
    color: var(--text-light);
}

.input:disabled, .select:disabled {
    background: #f9fafb;
    cursor: not-allowed;
    opacity: 0.6;
}

.select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23999'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.25rem;
    padding-right: 3rem;
}

/* Password Toggle */
.password-toggle {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.5rem;
    z-index: 2;
    transition: color var(--transition-fast);
}

.password-toggle:hover {
    color: var(--primary-color);
}

/* ==========================================
   PASSWORD STRENGTH METER
   ========================================== */
.password-strength {
    margin-top: 0.75rem;
}

.strength-bar {
    height: 4px;
    border-radius: 2px;
    background: var(--border);
    overflow: hidden;
    margin-bottom: 0.5rem;
    transition: all var(--transition-base);
}

.strength-bar::after {
    content: '';
    display: block;
    height: 100%;
    width: 0;
    background: var(--border);
    transition: all var(--transition-base);
}

.strength-bar.weak::after {
    width: 33%;
    background: var(--error);
}

.strength-bar.medium::after {
    width: 66%;
    background: var(--warning);
}

.strength-bar.strong::after {
    width: 100%;
    background: var(--success);
}

.strength-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ==========================================
   BUTTONS
   ========================================== */
.btn-primary {
    width: 100%;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--white);
    background: var(--gradient-accent);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 100%);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary:hover::before {
    opacity: 1;
}

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

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    width: 100%;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color);
    background: var(--white);
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--white);
}

.btn-nav {
    padding: 0.75rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 500;
    border-radius: 6px;
}

/* Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ==========================================
   STEP NAVIGATION
   ========================================== */
.step-nav {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.step-pill {
    width: 40px;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    transition: all var(--transition-base);
    cursor: pointer;
}

.step-pill.active {
    background: var(--gradient-accent);
    width: 60px;
}

.step-pill.completed {
    background: var(--success);
}

/* ==========================================
   MULTI-STEP FORM
   ========================================== */
.steps-container {
    position: relative;
    min-height: 300px;
}

.step {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.step.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.step-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.375rem;
}

.step-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* ==========================================
   PROFILE TYPE SELECTOR
   ========================================== */
.profile-type-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.profile-type-card {
    position: relative;
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    background: var(--white);
}

.profile-type-card:hover {
    border-color: var(--accent-color);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.profile-type-card input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.profile-type-card input[type="radio"]:checked + .profile-type-content {
    border-color: var(--accent-color);
}

.profile-type-card input[type="radio"]:checked ~ .checkmark {
    opacity: 1;
    transform: scale(1);
}

.profile-type-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
}

.profile-type-icon {
    width: 48px;
    height: 48px;
    background: var(--gradient-brand);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.5rem;
}

.profile-type-card.selected {
    border-color: var(--accent-color);
    background: rgba(255, 102, 0, 0.05);
}

.profile-type-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.profile-type-desc {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin: 0;
}

.checkmark {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 24px;
    height: 24px;
    background: var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 0.875rem;
    opacity: 0;
    transform: scale(0.5);
    transition: all var(--transition-fast);
}

/* ==========================================
   PLAN CATEGORY SELECTOR
   ========================================== */
.plan-category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .plan-category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

.plan-category-card {
    position: relative;
    border: 2px solid var(--border);
    border-radius: 10px;
    padding: 1rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    background: var(--white);
}

.plan-category-card:hover {
    border-color: var(--accent-color);
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

.plan-category-card input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.plan-category-card input[type="radio"]:checked ~ .plan-category-content {
    color: var(--accent-color);
}

.plan-category-card input[type="radio"]:checked ~ .checkmark {
    opacity: 1;
    transform: scale(1);
}

.plan-category-card.selected {
    border-color: var(--accent-color);
    background: rgba(255, 102, 0, 0.05);
}

.plan-category-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
}

.plan-category-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-brand);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.25rem;
}

.plan-category-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.plan-category-card input[type="radio"]:checked ~ .plan-category-content .plan-category-icon {
    background: var(--gradient-accent);
}

/* ==========================================
   FORM SECTIONS
   ========================================== */
.form-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section h3 {
    color: var(--primary-color);
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (max-width: 640px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-top: 1rem;
}

.checkbox-group input[type="checkbox"] {
    margin-top: 0.25rem;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--accent-color);
}

.checkbox-group label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1.5;
}

.checkbox-group a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
}

.checkbox-group a:hover {
    text-decoration: underline;
}

/* ==========================================
   NAVIGATION BUTTONS
   ========================================== */
.form-nav {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.form-nav .btn-nav {
    flex: 1;
}

/* ==========================================
   OTP MODAL
   ========================================== */
.otp-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1rem;
    animation: fadeInModal 0.3s ease-out;
}

.otp-modal.active {
    display: flex;
}

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

.otp-modal-content {
    background: var(--white);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    max-width: 440px;
    width: 100%;
    box-shadow: var(--shadow-xl);
    position: relative;
    animation: scaleIn 0.3s ease-out;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.otp-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-light);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all var(--transition-fast);
}

.otp-close:hover {
    background: var(--surface-color);
    color: var(--text-primary);
}

.otp-header {
    text-align: center;
    margin-bottom: 2rem;
}

.otp-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    background: var(--gradient-brand);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 2rem;
}

.otp-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.otp-message {
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.otp-inputs {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin: 2rem 0;
}

.otp-input {
    width: 48px;
    height: 56px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: var(--white);
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.otp-input:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 4px rgba(255, 102, 0, 0.1);
}

.otp-resend {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.otp-resend button {
    background: none;
    border: none;
    color: var(--accent-color);
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
    transition: color var(--transition-fast);
}

.otp-resend button:hover {
    color: var(--accent-dark);
}

.otp-resend button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ==========================================
   AUTH FOOTER
   ========================================== */
.auth-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--transition-fast);
}

.auth-footer a:hover {
    color: var(--accent-dark);
    text-decoration: underline;
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */
@media (max-width: 640px) {
    .auth-wrapper {
        padding: 1rem;
    }
    
    .card-form {
        padding: 2rem 1.5rem;
    }
    
    .form-title {
        font-size: 1.5rem;
    }
    
    .profile-type-grid {
        grid-template-columns: 1fr;
    }
    
    .otp-modal-content {
        padding: 2rem 1.5rem;
    }
    
    .otp-inputs {
        gap: 0.5rem;
    }
    
    .otp-input {
        width: 40px;
        height: 48px;
        font-size: 1.25rem;
    }
}

/* ==========================================
   UTILITY CLASSES
   ========================================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.hidden { display: none !important; }
.visible { display: block !important; }
