/**
 * ePayslip Employee Login - Futuristic UI
 * Modern, Glassmorphism, Neon Accents
 */

:root {
    /* Primary - Soft Blue with Neon Glow */
    --primary: #4f7cff;
    --primary-glow: rgba(79, 124, 255, 0.4);
    --primary-light: rgba(79, 124, 255, 0.15);
    --primary-dark: #3d6ae8;
    
    /* Accent - Cyan Neon */
    --accent: #00d4ff;
    --accent-glow: rgba(0, 212, 255, 0.4);
    
    /* Success Green */
    --success: #10b981;
    --success-glow: rgba(16, 185, 129, 0.4);
    
    /* Background Gradients */
    --bg-dark: #0a0f1c;
    --bg-medium: #111827;
    --bg-light: #1f2937;
    
    /* Glass Effect */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    
    /* Text */
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.4);
    
    /* Danger */
    --danger: #ef4444;
    
    /* Borders & Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-2xl: 32px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* ================================
   Futuristic Background
   ================================ */
.background-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.bg-gradient {
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse 80% 50% at 20% 0%, rgba(79, 124, 255, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 100%, rgba(0, 212, 255, 0.1) 0%, transparent 40%),
        linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-medium) 50%, var(--bg-dark) 100%);
}

.bg-grid {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(79, 124, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(79, 124, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    animation: float 15s ease-in-out infinite;
}

.shape-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    top: -20%;
    left: -10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    bottom: -10%;
    right: -5%;
    animation-delay: -7s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -30px) scale(1.05); }
    50% { transform: translate(0, -50px) scale(1); }
    75% { transform: translate(-30px, -30px) scale(0.95); }
}

/* Animated Particles */
.background-wrapper::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(1px 1px at 20% 30%, rgba(255, 255, 255, 0.3) 1px, transparent 0),
                      radial-gradient(1px 1px at 40% 70%, rgba(79, 124, 255, 0.4) 1px, transparent 0),
                      radial-gradient(1px 1px at 60% 20%, rgba(0, 212, 255, 0.3) 1px, transparent 0),
                      radial-gradient(1px 1px at 80% 80%, rgba(255, 255, 255, 0.2) 1px, transparent 0);
    background-size: 300px 300px;
    animation: sparkle 10s linear infinite;
}

@keyframes sparkle {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

/* ================================
   Login Container Layout
   ================================ */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    gap: 40px;
}

/* ================================
   Glass Card - Login
   ================================ */
.login-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-2xl);
    padding: 48px 40px;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--glass-shadow);
    position: relative;
    overflow: hidden;
}

/* Neon Border Glow */
.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), var(--accent), transparent);
    animation: borderGlow 3s ease-in-out infinite;
}

@keyframes borderGlow {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* ================================
   Login Header
   ================================ */
.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.seal-wrapper {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    position: relative;
}

.seal-wrapper::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 50%;
    opacity: 0.3;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.1); opacity: 0.5; }
}

.seal {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 0 10px var(--primary-glow));
}

.login-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.login-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.header-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--primary-light);
    border: 1px solid rgba(79, 124, 255, 0.3);
    border-radius: 50px;
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 500;
}

.header-badge i {
    font-size: 0.75rem;
}

/* ================================
   Alert Container
   ================================ */
.alert-container {
    margin-bottom: 20px;
}

.alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.alert-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.alert-success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
}

.alert i {
    margin-top: 2px;
}

/* ================================
   Step Indicator
   ================================ */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 32px;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.step-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.step.active .step-dot {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-color: transparent;
    color: var(--text-primary);
    box-shadow: 0 0 20px var(--primary-glow);
}

.step.completed .step-dot {
    background: var(--success);
    border-color: transparent;
    color: var(--text-primary);
}

.step-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.step.active .step-label,
.step.completed .step-label {
    color: var(--text-secondary);
}

.step-line {
    width: 40px;
    height: 2px;
    background: var(--glass-border);
    margin-bottom: 20px;
}

/* ================================
   Form Styles
   ================================ */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-intro {
    text-align: center;
    padding: 20px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    margin-bottom: 8px;
}

.form-intro h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.form-intro p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.form-intro.success {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
}

.success-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 16px;
    background: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 0 30px var(--success-glow);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-label i {
    color: var(--primary);
    font-size: 0.8rem;
}

.input-wrapper {
    position: relative;
}

.form-input {
    width: 100%;
    padding: 14px 48px 14px 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light), 0 0 20px var(--primary-glow);
}

.form-input.error {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.input-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.form-error {
    font-size: 0.8rem;
    color: #fca5a5;
    display: none;
}

.form-error:not(:empty) {
    display: block;
}

/* ================================
   PIN Input Group
   ================================ */
.pin-input-group {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.pin-input {
    width: 56px;
    height: 64px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.pin-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light), 0 0 20px var(--primary-glow);
    transform: scale(1.05);
}

.pin-input.filled {
    background: var(--primary-light);
    border-color: var(--primary);
}

/* ================================
   PIN Rules
   ================================ */
.pin-rules {
    padding: 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
}

.rules-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rules-title i {
    color: var(--accent);
}

.pin-rules ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pin-rules li {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 10px;
}

.pin-rules li i {
    font-size: 0.5rem;
    color: var(--text-muted);
}

.pin-rules li.valid {
    color: var(--success);
}

.pin-rules li.valid i {
    color: var(--success);
}

/* ================================
   CAPTCHA Container
   ================================ */
.captcha-container {
    padding: 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
}

.captcha-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.captcha-notice i {
    color: var(--accent);
}

/* ================================
   Buttons
   ================================ */
.btn-login {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border: none;
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-login:hover::before {
    left: 100%;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px var(--primary-glow);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-login .btn-loader {
    display: none;
}

.btn-login.loading .btn-text,
.btn-login.loading .btn-icon {
    display: none;
}

.btn-login.loading .btn-loader {
    display: block;
}

/* Make login button expand to full width when processing and center loader */
.btn-login.loading {
    width: 100%;
    padding: 14px 18px;
    justify-content: center;
}

.btn-login.loading .btn-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

/* Improve loader/icon sizing and alignment */
.btn-login .btn-loader i {
    font-size: 1.2rem;
}

.btn-login .btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Loader hidden by default; shown only when button has .loading */
.btn-login .btn-loader {
    display: none;
    align-items: center;
    justify-content: center;
}

/* Make the Verify button full width with consistent padding/alignment */
#verifyButton {
    width: 100%;
    padding: 18px 18px 14px; /* extra top padding */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Slightly increase verify button text size for clarity */
#verifyButton .btn-text {
    font-size: 1rem;
}

/* ================================
   Form Links
   ================================ */
.form-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.link-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.link-btn:hover {
    color: var(--primary);
}

.link-btn i {
    font-size: 0.85rem;
}

/* ================================
   Quick Links
   ================================ */
.quick-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--glass-border);
}

.quick-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.quick-link:hover {
    color: var(--primary);
}

.quick-link i {
    font-size: 0.9rem;
}

/* ================================
   Info Panel
   ================================ */
.info-panel {
    max-width: 400px;
    display: none;
}

.info-content {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-2xl);
    padding: 40px;
    height: 100%;
}

.info-header {
    text-align: center;
    margin-bottom: 32px;
}

.info-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: var(--text-primary);
    box-shadow: 0 0 40px var(--primary-glow);
}

.info-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.info-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.info-features {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 32px;
}

.info-feature {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
}

.info-feature:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary);
    transform: translateX(4px);
}

.feature-icon {
    width: 44px;
    height: 44px;
    background: var(--primary-light);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
}

.feature-content h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.feature-content p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.info-help {
    padding: 20px;
    background: rgba(0, 212, 255, 0.05);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: var(--radius-lg);
}

.info-help h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 12px;
}

.info-help p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.help-email {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
}

.help-email i {
    color: var(--accent);
}

/* ================================
   Footer
   ================================ */
.login-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 16px 24px;
    background: rgba(10, 15, 28, 0.9);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--glass-border);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-text {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-links .separator {
    color: var(--text-muted);
    opacity: 0.5;
}

/* ================================
   Responsive Design
   ================================ */
@media (min-width: 1024px) {
    .info-panel {
        display: block;
    }
}

@media (max-width: 768px) {
    .login-container {
        padding: 60px 16px 100px;
    }
    
    .login-card {
        padding: 32px 24px;
    }
    
    .seal-wrapper {
        width: 64px;
        height: 64px;
    }
    
    .login-title {
        font-size: 1.5rem;
    }
    
    .pin-input {
        width: 48px;
        height: 56px;
        font-size: 1.25rem;
    }
    
    .step-indicator {
        gap: 8px;
    }
    
    .step-line {
        width: 24px;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 24px 20px;
    }
    
    .pin-input-group {
        gap: 8px;
    }
    
    .pin-input {
        width: 44px;
        height: 52px;
    }
    
    .quick-links {
        flex-direction: column;
        gap: 12px;
    }
}