/* ==========================================================================
   CANDIDATE REGISTRATION - MODERN DESIGN SYSTEM
   ========================================================================== */

/* CSS Variables for Registration Theme */
:root {
    --register-gradient-start: #3b82f6;
    --register-gradient-end: #2563eb;
    --register-accent: #10b981;
    --register-danger: #ef4444;
    --register-warning: #f59e0b;
}

/* Override main content padding for full-width hero */
.main-content {
    padding: 0 !important;
    min-height: calc(100vh - 160px);
}

/* ==========================================================================
   HERO SECTION WITH ANIMATED BACKGROUND
   ========================================================================== */

.register-hero-section {
    min-height: calc(100vh - 160px);
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: var(--space-12) 0;
}

.register-hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,138.7C960,139,1056,117,1152,96C1248,75,1344,53,1392,42.7L1440,32L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>');
    background-size: cover;
    background-position: bottom;
    animation: wave 15s ease-in-out infinite;
}

@keyframes wave {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* ==========================================================================
   FLOATING PARTICLES BACKGROUND
   ========================================================================== */

.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    animation: float 20s infinite;
}

.particle:nth-child(1) { 
    width: 80px; 
    height: 80px; 
    left: 10%; 
    animation-delay: 0s; 
}

.particle:nth-child(2) { 
    width: 60px; 
    height: 60px; 
    left: 25%; 
    animation-delay: 2s; 
}

.particle:nth-child(3) { 
    width: 100px; 
    height: 100px; 
    left: 40%; 
    animation-delay: 4s; 
}

.particle:nth-child(4) { 
    width: 70px; 
    height: 70px; 
    left: 60%; 
    animation-delay: 6s; 
}

.particle:nth-child(5) { 
    width: 90px; 
    height: 90px; 
    left: 80%; 
    animation-delay: 8s; 
}

@keyframes float {
    0%, 100% { 
        transform: translateY(100vh) rotate(0deg); 
        opacity: 0; 
    }
    10% { opacity: 0.3; }
    90% { opacity: 0.3; }
    100% { 
        transform: translateY(-100px) rotate(360deg); 
        opacity: 0; 
    }
}

/* ==========================================================================
   CONTAINER & GLASS CARD
   ========================================================================== */

.register-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
    padding: 0 var(--space-4);
}

/* Modern Glass Morphism Card */
.register-glass-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-radius: var(--radius-2xl);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15), 
                0 0 100px rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    overflow: hidden;
    width: 100%;
    animation: cardEntrance 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

/* ==========================================================================
   CARD HEADER
   ========================================================================== */

.register-glass-header {
    padding: var(--space-10) var(--space-8) var(--space-8);
    text-align: center;
    background: linear-gradient(180deg, rgba(59, 130, 246, 0.05) 0%, transparent 100%);
    border-bottom: 1px solid rgba(59, 130, 246, 0.1);
}

.register-logo-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-6);
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
    animation: logoFloat 3s ease-in-out infinite;
    position: relative;
}

.register-logo-icon::before {
    content: '';
    position: absolute;
    inset: -4px;
    background: linear-gradient(45deg, #3b82f6, #2563eb, #3b82f6);
    border-radius: var(--radius-xl);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
    filter: blur(10px);
}

.register-logo-icon:hover::before {
    opacity: 0.6;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.register-glass-title:not(input):not(textarea):not(select):not(button) {
    font-family: var(--font-primary);
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: var(--space-3);
    letter-spacing: -0.025em;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ═════════════════════════════════════════════════════════════════════
   CRITICAL FIX: Prevent gradient text from affecting form inputs
   ═════════════════════════════════════════════════════════════════════ */
.register-glass-title input,
.register-glass-title textarea,
.register-glass-title select,
.register-glass-title button,
.register-glass-card input,
.register-glass-card textarea,
.register-glass-card select,
.register-glass-card button,
.register-glass-body input,
.register-glass-body textarea,
.register-glass-body select,
.register-glass-body button,
.form-control-register,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
textarea,
select {
    color: var(--text-primary, #1e293b) !important;
    -webkit-text-fill-color: var(--text-primary, #1e293b) !important;
    background-clip: padding-box !important;
    -webkit-background-clip: padding-box !important;
}

input::placeholder,
textarea::placeholder {
    color: var(--secondary-400, #94a3b8) !important;
    -webkit-text-fill-color: var(--secondary-400, #94a3b8) !important;
    opacity: 0.7 !important;
}

.register-glass-subtitle {
    color: var(--secondary-600);
    font-size: 1rem;
    font-weight: 500;
    margin: 0;
}

/* ═══════════════════════════════════════════════════════
   CRITICAL: Protect Registration Form Inputs
   ═══════════════════════════════════════════════════════ */
.auth-glass-card input,
.auth-glass-card textarea,
.auth-glass-card select,
.form-control-modern {
    color: var(--secondary-900) !important;
    -webkit-text-fill-color: var(--secondary-900) !important;
    background-clip: padding-box !important;
    -webkit-background-clip: padding-box !important;
}

/* CRITICAL: Ensure form inputs NEVER inherit gradient text */
.register-glass-card input,
.register-glass-card textarea,
.register-glass-card select,
.register-glass-card .form-control-modern {
    color: var(--secondary-900) !important;
    -webkit-text-fill-color: var(--secondary-900) !important;
    background-clip: padding-box !important;
    -webkit-background-clip: padding-box !important;
}

/* ==========================================================================
   CARD BODY
   ========================================================================== */

.register-glass-body {
    padding: var(--space-8);
}

/* ==========================================================================
   FORM SECTION STYLES
   ========================================================================== */

.form-section-modern {
    margin-bottom: var(--space-8);
    padding-bottom: var(--space-6);
    border-bottom: 2px solid var(--secondary-100);
}

.form-section-modern:last-of-type {
    border-bottom: none;
    margin-bottom: var(--space-6);
}

.form-section-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-6);
    padding: var(--space-3) var(--space-4);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(37, 99, 235, 0.05));
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--register-gradient-start);
}

.form-section-header i {
    font-size: 1.25rem;
    color: var(--register-gradient-start);
}

.form-section-header h6 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--secondary-800);
    letter-spacing: -0.025em;
}

/* ==========================================================================
   FORM STYLES
   ========================================================================== */

.form-group-modern {
    margin-bottom: var(--space-6);
    position: relative;
}

.form-label-modern {
    font-weight: 600;
    color: var(--secondary-700);
    margin-bottom: var(--space-3);
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-label-modern i {
    color: var(--register-gradient-start);
    margin-right: var(--space-2);
    font-size: 1rem;
}

.form-control-modern {
    border: 2px solid var(--secondary-200);
    border-radius: var(--radius-lg);
    padding: var(--space-4) var(--space-5);
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    width: 100%;
    position: relative;
    font-family: inherit;
    outline: none;
    color: var(--secondary-900);
}

.form-control-modern:focus {
    border-color: var(--register-gradient-start);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
}

.form-control-modern::placeholder {
    color: var(--secondary-400);
}

/* Input with Icon Wrapper */
.input-icon-wrapper {
    position: relative;
}

.input-icon-wrapper .input-icon {
    position: absolute;
    right: var(--space-4);
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary-400);
    font-size: 1.125rem;
    transition: color 0.3s ease;
    cursor: pointer;
}

.input-icon-wrapper .form-control-modern {
    padding-right: calc(var(--space-10) + var(--space-4));
}

.input-icon-wrapper:focus-within .input-icon {
    color: var(--register-gradient-start);
}

/* ==========================================================================
   ALERT SYSTEM
   ========================================================================== */

.alert-form {
    border: none;
    border-radius: var(--radius-lg);
    padding: var(--space-4) var(--space-5);
    margin-top: var(--space-3);
    margin-bottom: 0;
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
    animation: alertSlide 0.4s ease-out;
    position: relative;
    overflow: hidden;
}

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

.alert-form::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
}

.alert-form i {
    margin-right: var(--space-3);
    font-size: 1.125rem;
}

.alert-danger.alert-form {
    background: rgba(239, 68, 68, 0.1);
    color: #991b1b;
}

.alert-danger.alert-form::before {
    background: #ef4444;
}

.alert-warning.alert-form {
    background: rgba(245, 158, 11, 0.1);
    color: #92400e;
}

.alert-warning.alert-form::before {
    background: #f59e0b;
}

.alert-success.alert-form {
    background: rgba(16, 185, 129, 0.1);
    color: #065f46;
}

.alert-success.alert-form::before {
    background: #10b981;
}

.alert-info.alert-form {
    background: rgba(59, 130, 246, 0.1);
    color: #1e40af;
}

.alert-info.alert-form::before {
    background: #3b82f6;
}

/* ==========================================================================
   FILE UPLOAD AREA
   ========================================================================== */

.file-upload-area {
    border: 3px dashed var(--secondary-300);
    border-radius: var(--radius-xl);
    padding: var(--space-10) var(--space-6);
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.02), rgba(37, 99, 235, 0.05));
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.file-upload-area::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.file-upload-area:hover {
    border-color: var(--register-gradient-start);
    background: rgba(59, 130, 246, 0.05);
    transform: translateY(-2px);
}

.file-upload-area:hover::before {
    opacity: 1;
}

.file-upload-area.drag-over {
    border-color: var(--register-gradient-start);
    background: rgba(59, 130, 246, 0.1);
    transform: scale(1.02);
}

.file-upload-icon {
    font-size: 3rem;
    color: var(--register-gradient-start);
    margin-bottom: var(--space-4);
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.file-upload-text {
    color: var(--secondary-700);
    font-size: 1rem;
    margin-bottom: var(--space-2);
}

.file-upload-text strong {
    color: var(--register-gradient-start);
    font-weight: 600;
}

.file-upload-info {
    color: var(--secondary-500);
    font-size: 0.875rem;
    margin: 0;
}

.file-input-hidden {
    display: none;
}

/* File Name Display */
.file-name-display {
    margin-top: var(--space-4);
    padding: var(--space-4) var(--space-5);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(37, 99, 235, 0.05));
    border: 2px solid rgba(59, 130, 246, 0.2);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    animation: slideIn 0.3s ease-out;
}

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

.file-name-display i {
    color: var(--register-gradient-start);
    font-size: 1.25rem;
}

.file-name-display span {
    flex: 1;
    color: var(--secondary-700);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-remove-file {
    background: transparent;
    border: none;
    color: var(--danger-500);
    font-size: 1.125rem;
    cursor: pointer;
    padding: var(--space-2);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-remove-file:hover {
    background: rgba(239, 68, 68, 0.1);
    transform: scale(1.1);
}

/* ==========================================================================
   BUTTON SYSTEM
   ========================================================================== */

.btn-auth {
    width: 100%;
    padding: var(--space-4) var(--space-6);
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-lg);
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.025em;
    cursor: pointer;
    text-decoration: none;
}

.btn-auth::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s;
}

.btn-auth:hover::before {
    left: 100%;
}

.btn-primary-auth {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    margin-bottom: var(--space-6);
}

.btn-primary-auth:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
    color: white;
}

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

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

.btn-outline-auth {
    background: transparent;
    color: var(--secondary-700);
    border: 2px solid var(--secondary-300);
    box-shadow: none;
}

.btn-outline-auth:hover {
    background: var(--secondary-100);
    border-color: var(--secondary-400);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    color: var(--secondary-700);
    text-decoration: none;
}

/* ==========================================================================
   DIVIDER
   ========================================================================== */

.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: var(--space-8) 0;
    color: var(--secondary-500);
    font-size: 0.875rem;
    font-weight: 500;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--secondary-300), transparent);
}

.auth-divider:not(:empty)::before {
    margin-right: var(--space-4);
}

.auth-divider:not(:empty)::after {
    margin-left: var(--space-4);
}

/* ==========================================================================
   HELP SECTION
   ========================================================================== */

.help-section-auth {
    text-align: center;
    margin-top: var(--space-8);
    padding-top: var(--space-6);
    border-top: 1px solid var(--secondary-200);
}

.help-text-auth {
    color: var(--secondary-600);
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 0;
}

.help-text-auth a {
    color: var(--register-gradient-start);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.help-text-auth a:hover {
    color: var(--register-gradient-end);
}

/* ==========================================================================
   LOADING STATE
   ========================================================================== */

.btn-loading {
    opacity: 0.7;
    pointer-events: none;
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.6s linear infinite;
}

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

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

@media (max-width: 768px) {
    .register-hero-section {
        padding: var(--space-8) 0;
        min-height: calc(100vh - 120px);
    }

    .register-glass-header {
        padding: var(--space-8) var(--space-6) var(--space-6);
    }

    .register-glass-body {
        padding: var(--space-6);
    }

    .register-logo-icon {
        width: 64px;
        height: 64px;
        font-size: 2rem;
    }

    .register-glass-title {
        font-size: 1.75rem;
    }

    .form-section-header h6 {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .register-hero-section {
        padding: var(--space-6) 0;
    }

    .register-container {
        padding: 0 var(--space-3);
    }

    .register-glass-card {
        border-radius: var(--radius-xl);
    }

    .register-logo-icon {
        width: 56px;
        height: 56px;
        font-size: 1.75rem;
    }

    .register-glass-title {
        font-size: 1.5rem;
    }

    .btn-auth {
        padding: var(--space-3) var(--space-5);
        font-size: 0.9rem;
    }

    .file-upload-area {
        padding: var(--space-8) var(--space-4);
    }

    .file-upload-icon {
        font-size: 2.5rem;
    }
}