/* ========================================
   EDUCAID STUDENT REGISTRATION - UNIFIED THEME
   ======================================== */

/* Use same CSS variables as universal.css */
:root {
    /* Primary EducAid Colors - Match universal.css */
    --trias-primary: #0068DA;
    --trias-secondary: #00B1C6;
    --trias-accent: #0088C8;
    --trias-success: #3DAD10;
    --trias-light: #67D6C6;
    --trias-fresh: #6CC748;
    --trias-gold: #FFD700;
    --trias-dark: #1a365d;
    
    /* Consistent Background System */
    --background-base: #ffffff;
    --background-pattern: 
        radial-gradient(circle at 20% 80%, rgba(0, 104, 218, 0.02) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(103, 214, 198, 0.015) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(0, 177, 198, 0.01) 0%, transparent 50%);
    
    /* Card System - Same as Login */
    --card-background: rgba(255, 255, 255, 0.98);
    --card-shadow: 
        0 25px 50px -12px rgba(0, 104, 218, 0.08),
        0 0 0 1px rgba(0, 104, 218, 0.02);
    --card-border-radius: 1.5rem;
    
    /* Typography Scale - Match universal.css */
    --font-family: 'Poppins', 'Inter', 'Segoe UI', system-ui, sans-serif;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    
    /* Spacing Scale - Consistent */
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    
    /* Form System */
    --form-border: 2px solid #e2e8f0;
    --form-border-focus: var(--trias-primary);
    --form-border-radius: 0.75rem;
    --form-shadow-focus: 0 0 0 3px rgba(0, 104, 218, 0.1);
    
    /* Button System - Match Login */
    --btn-primary-bg: var(--trias-success);
    --btn-primary-hover: #359C0E;
    --btn-border-radius: 0.75rem;
    --btn-shadow: 0 4px 12px rgba(61, 173, 16, 0.25);
    
    /* Transition System */
    --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   GLOBAL STYLES - MATCH LOGIN SYSTEM
   ======================================== */

body {
    font-family: var(--font-family);
    background: var(--background-base);
    /* Use your actual background image - NO blur on main background */
    background-image: url('../images/background.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    color: #2d3748;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Soft bokeh overlay blur - NOT the background itself */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Create a subtle pattern overlay that will be blurred */
    background: 
        radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.3) 0%, transparent 25%),
        radial-gradient(circle at 75% 75%, rgba(255, 255, 255, 0.2) 0%, transparent 30%),
        radial-gradient(circle at 50% 80%, rgba(0, 104, 218, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 80% 20%, rgba(103, 214, 198, 0.1) 0%, transparent 35%),
        radial-gradient(circle at 20% 60%, rgba(255, 255, 255, 0.25) 0%, transparent 20%);
    filter: blur(25px) saturate(150%); /* Heavy blur for soft bokeh effect */
    z-index: -2;
    opacity: 0.8;
}

/* Light overlay for better readability */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65); /* 65% black overlay */
    z-index: -1;
}

/* ========================================
   MAIN CONTAINER - CENTERED LIKE LOGIN
   Scoped to registration main only to avoid
   affecting header/topbar containers
   ======================================== */

.registration-main {
    display: flex;
    justify-content: center;
    align-items: center;
    /* subtract approximate header (topbar+navbar) height */
    min-height: calc(100vh - 120px);
    padding: var(--space-8) var(--space-4);
}

/* ========================================
   REGISTRATION CARD - MATCH LOGIN CARD
   ======================================== */

.register-card {
    background: rgba(255, 255, 255, 0.98) !important;
    border-radius: 24px;
    box-shadow:
        0 24px 60px rgba(15, 23, 42, 0.16),
        0 1px 0 rgba(255, 255, 255, 0.75) inset !important;
    border: 1px solid rgba(148, 163, 184, 0.18) !important;
    position: relative;
    overflow: hidden;
    max-width: 560px !important;
    width: 100%;
    margin: 0 auto;
    padding: 2.25rem 2rem !important;
}

/* Remove old decorative elements, keep it clean like login */
.register-card::before,
.register-card::after {
    display: none;
}

/* ========================================
   HEADER STYLING - MATCH LOGIN HEADER
   ======================================== */

.register-card h4 {
    font-size: 1.85rem;
    font-weight: 700;
    color: #182235;
    margin-bottom: 0.35rem;
    text-align: center;
    letter-spacing: -0.02em;
}

.register-card h4::after {
    content: '';
    display: block;
    width: 72px;
    height: 3px;
    background: linear-gradient(90deg, var(--trias-primary), var(--trias-secondary));
    margin: 0.8rem auto 1.35rem;
    border-radius: 999px;
}

.government-subtitle {
    text-align: center;
    color: #526173;
    font-size: var(--text-sm);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

/* ========================================
   STEP INDICATOR - ENHANCED BUT CONSISTENT
   ======================================== */

/* DELETE THIS ENTIRE SECTION */
.step-indicator {
    display: none !important;
}

.step {
    width: 40px;
    height: 40px;
    line-height: 40px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #718096;
    font-weight: 700;
    font-size: var(--text-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    position: relative;
}

.step.active {
    background: var(--trias-primary);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 104, 218, 0.3);
}

.step.completed {
    background: var(--trias-success);
    color: white;
}

.step.completed::after {
    content: '✓';
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--trias-gold);
    color: var(--trias-dark);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* ========================================
   FORM STEP PANELS
   ======================================== */

.step-panel {
    animation: slideIn 0.3s ease;
    padding: 1.1rem 1rem 0.35rem;
    margin-top: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.step-panel.d-none { 
    display: none !important; 
}

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

/* ========================================
   FORM ELEMENTS - MATCH LOGIN FORMS
   ======================================== */

.form-label {
    display: block;
    font-weight: 600;
    color: #243245;
    margin-bottom: 0.45rem;
    font-size: 0.85rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.form-control, 
.form-select {
    width: 100%;
    min-height: 48px;
    padding: 0.85rem 1rem;
    border: var(--form-border);
    border-radius: 14px;
    font-size: var(--text-base);
    transition: all var(--transition);
    background: rgba(248, 250, 252, 0.95);
    margin-bottom: 0.95rem;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.03);
}

.step-panel .form-text,
.step-panel small.form-text {
    color: #64748b;
    line-height: 1.45;
}

.step-panel .form-text.text-muted,
.step-panel small.text-muted {
    font-size: 0.84rem;
    font-weight: 400;
    letter-spacing: 0;
}

.step-panel label .text-muted,
.step-panel label small.text-muted {
    color: #64748b !important;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: none;
}

.step-panel .alert {
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.step-card-header {
    margin-bottom: 1.1rem;
    padding-bottom: 0.95rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.step-card-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 0.35rem;
}

.step-card-title {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.01em;
}

.step-card-title i {
    color: #0068DA;
    font-size: 1rem;
}

.step-card-subtitle {
    margin-top: 0.35rem;
    color: #64748b;
    font-size: 0.84rem;
    line-height: 1.45;
}

.form-control:focus, 
.form-select:focus {
    outline: none;
    border-color: var(--form-border-focus);
    box-shadow: var(--form-shadow-focus);
    background: white;
}

.form-control:hover, 
.form-select:hover {
    border-color: var(--trias-accent);
}

/* ========================================
   INPUT GROUP STYLING - PHONE NUMBER
   ======================================== */

.input-group-text {
    background: rgba(248, 251, 255, 0.8);
    border: var(--form-border);
    border-right: none;
    color: #4a5568;
    font-weight: 500;
    border-radius: 14px 0 0 14px;
    min-width: 60px;
    justify-content: center;
    min-height: 48px;
}

.input-group .form-control {
    border-left: none;
    border-radius: 0 14px 14px 0;
    margin-bottom: 0;
}

.input-group .form-control:focus {
    border-color: var(--form-border-focus);
    box-shadow: var(--form-shadow-focus);
}

.input-group .form-control:focus + .input-group-text,
.input-group .input-group-text:has(+ .form-control:focus) {
    border-color: var(--form-border-focus);
}

/* ========================================
   VALIDATION STYLING
   ======================================== */

#phoneValidation,
#strengthText {
    margin-top: var(--space-2);
    margin-bottom: var(--space-4);
}

#phoneValidation small,
#strengthText small {
    font-weight: 500;
    display: flex;
    align-items: center;
}

.text-success { color: var(--trias-success) !important; }
.text-danger { color: #dc3545 !important; }
.text-warning { color: #ffc107 !important; }
.text-info { color: var(--trias-primary) !important; }

.is-valid {
    border-color: var(--trias-success) !important;
    box-shadow: 0 0 0 0.2rem rgba(61, 173, 16, 0.25) !important;
}

.is-invalid {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

/* ========================================
   BUTTON SYSTEM - MATCH LOGIN BUTTONS
   ======================================== */

.btn {
    border-radius: 14px;
    padding: 0.9rem 1.25rem;
    font-weight: 600;
    font-size: var(--text-base);
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
    border: none;
    min-height: 48px;
}

.btn-primary {
    background-color: var(--btn-primary-bg) !important;
    border-color: var(--btn-primary-bg) !important;
    color: white !important;
}

.btn-primary:hover {
    background-color: var(--btn-primary-hover) !important;
    border-color: var(--btn-primary-hover) !important;
    transform: translateY(-1px);
    box-shadow: var(--btn-shadow);
}

.btn-primary:focus {
    box-shadow: 0 0 0 0.25rem rgba(61, 173, 16, 0.25) !important;
}

.btn-secondary {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    color: white !important;
}

.btn-secondary:hover {
    background-color: #5a6268 !important;
    border-color: #5a6268 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.25);
}

.btn-info {
    background: linear-gradient(135deg, #0d6efd, #0b5ed7) !important;
    color: #fff !important;
    box-shadow: 0 6px 14px rgba(13, 110, 253, 0.16);
}

.btn-info:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(13, 110, 253, 0.22);
}

.btn-outline-warning {
    border: 1px solid rgba(245, 158, 11, 0.35) !important;
    background: rgba(255, 251, 235, 0.85) !important;
    color: #92400e !important;
}

.btn-outline-warning:hover {
    background: rgba(255, 247, 214, 0.98) !important;
    color: #78350f !important;
}

.btn:disabled {
    background: #ccc !important;
    border-color: #ccc !important;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ========================================
   BUTTON CONTAINER
   ======================================== */

.button-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--space-8);
    padding-top: var(--space-6);
    border-top: 1px solid rgba(0, 104, 218, 0.1);
}

/* ========================================
   FILE UPLOAD STYLING
   ======================================== */

.form-control[type="file"] {
    border: 2px dashed var(--trias-light);
    background: rgba(248, 251, 255, 0.8);
    padding: var(--space-6);
    text-align: center;
    cursor: pointer;
}

.form-control[type="file"]:hover {
    border-color: var(--trias-accent);
    background: rgba(255, 255, 255, 0.9);
}

/* ========================================
   ALERT SYSTEM - MATCH LOGIN ALERTS
   ======================================== */

.alert {
    border: none;
    border-radius: var(--form-border-radius);
    font-size: var(--text-sm);
    padding: var(--space-4);
    margin-bottom: var(--space-5);
}

.alert-success {
    background: linear-gradient(180deg, rgba(34, 197, 94, 0.10), rgba(255, 255, 255, 0.96));
    color: #14532d;
    border-left: 4px solid rgba(34, 197, 94, 0.8);
}

.alert-danger {
    background: linear-gradient(180deg, rgba(239, 68, 68, 0.08), rgba(255, 255, 255, 0.96));
    color: #7f1d1d;
    border-left: 4px solid rgba(239, 68, 68, 0.85);
}

.alert-info {
    background: linear-gradient(180deg, rgba(0, 104, 218, 0.08), rgba(255, 255, 255, 0.96));
    color: #0f3d75;
    border-left: 4px solid rgba(0, 104, 218, 0.8);
}

.alert-warning {
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.08), rgba(255, 255, 255, 0.96));
    color: #7c2d12;
    border-left: 4px solid rgba(245, 158, 11, 0.85);
}

/* ========================================
   NOTIFICATION SYSTEM
   ======================================== */

.notifier {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 0;
    background: rgba(255,255,255,0.92);
    color: #222;
    border-radius: 16px;
    display: none;
    box-shadow: 0 12px 30px rgba(15,23,42,0.14);
    z-index: 10000;
    backdrop-filter: blur(10px) saturate(120%);
    border: 1px solid rgba(15,23,42,0.08);
    min-width: 320px;
    max-width: 720px;
    overflow: hidden;
}

.notifier .notifier-inner{display:flex;align-items:center;gap:12px;padding:14px 18px}
.notifier .notifier-icon{width:36px;height:36px;flex:0 0 36px;border-radius:8px;display:inline-flex;align-items:center;justify-content:center;color:#fff;font-size:18px}
.notifier .notifier-message{flex:1;font-weight:600;line-height:1.45}

.notifier.success .notifier-icon{background:linear-gradient(135deg,#28a745,#1f8a35)}
.notifier.success{background:linear-gradient(180deg, rgba(34,197,94,0.10), rgba(255,255,255,0.96));color:#14532d;border-left:4px solid rgba(34,197,94,0.18)}
.notifier.error .notifier-icon{background:linear-gradient(135deg,#dc3545,#b92b2b)}
.notifier.error{background:linear-gradient(180deg, rgba(239,68,68,0.08), rgba(255,255,255,0.96));color:#7f1d1d;border-left:4px solid rgba(239,68,68,0.14)}
.notifier.warning .notifier-icon{background:linear-gradient(135deg,#ffc107,#e0a800)}
.notifier.warning{background:linear-gradient(180deg, rgba(245,158,11,0.08), rgba(255,255,255,0.96));color:#7c2d12;border-left:4px solid rgba(245,158,11,0.14)}

/* ========================================
   SPECIAL STYLING
   ======================================== */

.verified-email {
    background: rgba(61, 173, 16, 0.1) !important;
    color: var(--trias-success) !important;
    border-color: var(--trias-success) !important;
}

/* Resend OTP button modern look */
#resendOtpBtn, .resend-otp-btn {
    border-radius: 999px;
    padding: 0.65rem 1rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(90deg,#0d6efd,#0069d9);
    border: none;
    box-shadow: 0 6px 14px rgba(13,110,253,0.18);
    transition: transform .14s ease, box-shadow .14s ease, opacity .14s ease;
}

#resendOtpBtn:disabled, .resend-otp-btn:disabled{
    opacity: .55;
    transform: none;
    box-shadow: none;
    background: linear-gradient(90deg,#9bbefc,#8fb1f8);
}

#otpInputGroup {
    gap: 0.65rem !important;
    margin-top: 0.25rem;
    max-width: 390px !important;
}

.otp-digit {
    width: 54px !important;
    height: 58px;
    border-radius: 14px !important;
    border: 1.5px solid rgba(148, 163, 184, 0.35) !important;
    background: #fff !important;
    font-size: 1.2rem;
    font-weight: 700;
    color: #0f172a;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
    margin-bottom: 0 !important;
}

.otp-digit:focus {
    border-color: var(--trias-primary) !important;
    box-shadow: 0 0 0 4px rgba(0, 104, 218, 0.12) !important;
}

#otpSection .alert-info {
    margin-bottom: 1rem;
}

#resendOtpBtn .bi, .resend-otp-btn .bi { vertical-align: -.15em; }

.verification-checklist .form-check {
    margin-bottom: var(--space-2);
    padding: var(--space-2);
    border-radius: var(--form-border-radius);
    transition: background-color var(--transition);
}

.verification-checklist .text-success {
    background: rgba(61, 173, 16, 0.1);
}

.verification-checklist .text-danger {
    background: rgba(220, 53, 69, 0.1);
}

/* ========================================
   LOADING ANIMATIONS
   ======================================== */

.btn:disabled::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

.btn-pulse {
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(61, 173, 16, 0.7);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(61, 173, 16, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(61, 173, 16, 0);
    }
}

/* ========================================
   PROGRESS INDICATOR
   ======================================== */

.progress-container {
    margin: var(--space-8) 0;
    background: rgba(0, 104, 218, 0.1);
    border-radius: var(--form-border-radius);
    height: 8px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--trias-primary) 0%, var(--trias-accent) 100%);
    border-radius: var(--form-border-radius);
    transition: width 0.5s ease;
}

/* ========================================
   TERMS AND CONDITIONS
   ======================================== */

.btn-link {
    color: var(--trias-primary) !important;
    text-decoration: none !important;
    border: none !important;
    background: none !important;
    padding: 0 !important;
    font-size: inherit !important;
}

.btn-link:hover {
    color: var(--trias-accent) !important;
    text-decoration: underline !important;
}

.terms-content {
    line-height: 1.6;
    font-size: var(--text-sm);
}

.terms-content h6 {
    color: #2d3748;
    margin-top: var(--space-6);
    margin-bottom: var(--space-2);
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: var(--space-2);
}

.terms-content ul {
    margin-bottom: var(--space-4);
}

.terms-content li {
    margin-bottom: var(--space-2);
}

#scrollIndicator,
#termsStatus {
    font-size: var(--text-sm);
    font-weight: 500;
}

/* ========================================
   RESPONSIVE DESIGN - MATCH LOGIN
   ======================================== */

@media (max-width: 768px) {
    .container {
        padding: var(--space-4) var(--space-2);
    }
    
    .register-card {
        padding: var(--space-8) var(--space-6) !important;
        border-radius: var(--form-border-radius);
        margin: var(--space-4);
        max-width: 480px !important;
    }

    .register-card h4 {
        font-size: var(--text-2xl);
    }

    .step {
        width: 35px;
        height: 35px;
        font-size: 0.8rem;
    }

    .step-indicator {
        gap: var(--space-3);
        padding: var(--space-4);
    }

    .button-container {
        flex-direction: column;
        gap: var(--space-4);
    }

    .button-container .btn {
        width: 100%;
    }

    body, body::before {
        background-attachment: scroll; /* Better mobile performance */
    }
    
    body::before {
        filter: blur(6px); /* Less blur on mobile for performance */
    }
    
    .register-card {
        background: rgba(255, 255, 255, 0.95) !important; /* More solid on mobile */
    }
}

@media (max-width: 480px) {
    .register-card {
        padding: var(--space-6) var(--space-4);
        margin: var(--space-2);
        max-width: 95% !important;
    }

    .register-card h4 {
        font-size: var(--text-xl);
    }

    .step {
        width: 30px;
        height: 30px;
        font-size: 0.75rem;
    }

    .step-indicator {
        gap: var(--space-2);
    }
}

/* ========================================
   ACCESSIBILITY - MATCH LOGIN SYSTEM
   ======================================== */

.form-control:focus,
.form-select:focus,
.btn:focus {
    outline: 2px solid var(--trias-primary);
    outline-offset: 2px;
}

/* Touch-friendly */
@media (hover: none) and (pointer: coarse) {
    .form-control {
        font-size: 16px; /* Prevents iOS zoom */
        min-height: 48px;
    }
    
    .btn {
        min-height: 48px;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}