/* ============================================
   AUTH PAGES STYLESHEET - NCC Training Portal
   For login.html and register.html
   ============================================ */

/* ==========================================
   Auth Section Layout
   ========================================== */

.auth-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a472a 0%, #2d5a3d 50%, #1a472a 100%);
    padding: 100px 20px 40px;
    position: relative;
    overflow: hidden;
}

/* Animated Background Pattern */
.auth-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(255,255,255,.02) 35px, rgba(255,255,255,.02) 70px),
        repeating-linear-gradient(-45deg, transparent, transparent 35px, rgba(255,255,255,.02) 35px, rgba(255,255,255,.02) 70px);
    animation: bgMove 20s linear infinite;
    pointer-events: none;
}

@keyframes bgMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(70px, 70px); }
}

.auth-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

.auth-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    display: grid;
    grid-template-columns: 40% 60%;
    min-height: 600px;
    animation: slideUp 0.6s ease-out;
}

.auth-card-wide {
    grid-template-columns: 35% 65%;
}

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

/* ==========================================
   Auth Branding (Left Side)
   ========================================== */

.auth-branding {
    background: linear-gradient(165deg, #1a472a 0%, #2d5a3d 100%);
    color: #fff;
    padding: 50px 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.auth-branding::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.2); opacity: 0.8; }
}

.auth-branding-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.auth-logo {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin-bottom: 20px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.auth-branding h1 {
    font-family: 'Roboto Slab', serif;
    font-size: 2rem;
    margin-bottom: 10px;
    color: #d4af37;
}

.auth-branding > p,
.auth-branding-content > p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 30px;
}

/* Auth Features */
.auth-features {
    margin: 30px 0;
}

.auth-feature {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.auth-feature:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(5px);
}

.auth-feature i {
    font-size: 1.5rem;
    color: #d4af37;
}

.auth-feature span {
    font-size: 0.95rem;
    color: #fff;
}

/* Auth Quote */
.auth-quote {
    margin-top: 40px;
    padding: 20px;
    border-left: 4px solid #d4af37;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.auth-quote i {
    color: #d4af37;
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.auth-quote p {
    font-family: 'Roboto Slab', serif;
    font-size: 1.1rem;
    font-style: italic;
    margin: 10px 0;
    color: #fff;
}

.auth-quote span {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Registration Stats */
.registration-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 30px;
}

.stat-item {
    text-align: center;
    padding: 15px 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.stat-item strong {
    display: block;
    font-size: 1.5rem;
    color: #d4af37;
    font-family: 'Roboto Slab', serif;
    margin-bottom: 5px;
}

.stat-item span {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.9);
}

/* ==========================================
   Auth Form Container (Right Side)
   ========================================== */

.auth-form-container {
    padding: 50px 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
}

.auth-form-content {
    width: 100%;
    max-width: 500px;
}

.auth-form-content h2 {
    font-family: 'Roboto Slab', serif;
    color: #1a472a;
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.auth-subtitle {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 30px;
}

/* ==========================================
   Form Styles
   ========================================== */

.auth-form {
    width: 100%;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: #333;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.form-group label i {
    color: #1a472a;
    margin-right: 5px;
    width: 16px;
}

.required {
    color: #e74c3c;
    margin-left: 2px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    font-family: 'Open Sans', sans-serif;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #1a472a;
    box-shadow: 0 0 0 4px rgba(26, 71, 42, 0.1);
}

.form-group input.error,
.form-group select.error {
    border-color: #e74c3c;
}

.form-group input.success,
.form-group select.success {
    border-color: #27ae60;
}

.error-message {
    display: block;
    color: #e74c3c;
    font-size: 0.85rem;
    margin-top: 5px;
    min-height: 20px;
}

/* Password Input Wrapper */
.password-input-wrapper {
    position: relative;
}

.password-input-wrapper input {
    padding-right: 45px;
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 8px;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: #1a472a;
}

.password-toggle i {
    font-size: 1.1rem;
}

/* Password Strength Indicator */
.password-strength {
    margin-top: 10px;
}

.strength-bar {
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 8px;
}

.strength-bar-fill {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.strength-bar-fill.weak {
    width: 25%;
    background: #e74c3c;
}

.strength-bar-fill.fair {
    width: 50%;
    background: #f39c12;
}

.strength-bar-fill.good {
    width: 75%;
    background: #3498db;
}

.strength-bar-fill.strong {
    width: 100%;
    background: #27ae60;
}

.strength-text {
    font-size: 0.85rem;
    color: #666;
}

.strength-text strong {
    color: #333;
}

/* Password Requirements */
.password-requirements {
    list-style: none;
    padding: 10px 0 0;
    margin: 0;
}

.password-requirements li {
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.password-requirements li i {
    font-size: 0.5rem;
    color: #ccc;
}

.password-requirements li.met {
    color: #27ae60;
}

.password-requirements li.met i {
    color: #27ae60;
}

/* Form Row (Remember Me & Forgot Password) */
.form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

/* Checkbox */
.form-group-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
}

.form-group-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    margin-top: 2px;
    flex-shrink: 0;
}

.form-group-checkbox label {
    font-size: 0.9rem;
    color: #555;
    cursor: pointer;
    margin: 0;
    line-height: 1.5;
}

.form-group-checkbox a {
    color: #1a472a;
    text-decoration: none;
    font-weight: 600;
}

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

.forgot-link {
    color: #1a472a;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
}

.forgot-link:hover {
    text-decoration: underline;
}

/* Submit Button */
.btn-block {
    width: 100%;
    padding: 14px 20px;
    font-size: 1rem;
    font-weight: 600;
    margin-top: 10px;
}

.btn-block i {
    margin-right: 8px;
}

/* Divider */
.auth-divider {
    text-align: center;
    margin: 25px 0;
    position: relative;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 45%;
    height: 1px;
    background: #e0e0e0;
}

.auth-divider::before {
    left: 0;
}

.auth-divider::after {
    right: 0;
}

.auth-divider span {
    background: #fff;
    padding: 0 15px;
    color: #999;
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
}

/* Social Login */
.social-login {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-social {
    width: 100%;
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    background: #fff;
    color: #333;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-social:hover:not(:disabled) {
    background: #f8f9fa;
    border-color: #ccc;
}

.btn-social:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-google i {
    color: #DB4437;
}

/* Auth Footer */
.auth-footer {
    text-align: center;
    margin-top: 25px;
}

.auth-footer p {
    color: #666;
    font-size: 0.95rem;
}

.auth-footer a {
    color: #1a472a;
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Auth Help */
.auth-help {
    margin-top: 30px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: center;
}

.auth-help p {
    margin: 0;
    font-size: 0.85rem;
    color: #666;
}

.auth-help i {
    color: #3498db;
    margin-right: 5px;
}

.auth-help a {
    color: #1a472a;
    text-decoration: none;
    font-weight: 600;
}

.auth-help a:hover {
    text-decoration: underline;
}

/* ==========================================
   Responsive Design
   ========================================== */

@media (max-width: 1024px) {
    .auth-card {
        grid-template-columns: 1fr;
    }
    
    .auth-card-wide {
        grid-template-columns: 1fr;
    }
    
    .auth-branding {
        padding: 40px 30px;
        min-height: 300px;
    }
    
    .auth-logo {
        width: 80px;
        height: 80px;
    }
    
    .auth-branding h1 {
        font-size: 1.6rem;
    }
    
    .auth-features {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .registration-stats {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .auth-section {
        padding: 80px 15px 30px;
    }
    
    .auth-form-container {
        padding: 30px 25px;
    }
    
    .auth-form-content h2 {
        font-size: 1.5rem;
    }
    
    .auth-branding {
        padding: 30px 20px;
    }
    
    .auth-features {
        grid-template-columns: 1fr;
    }
    
    .registration-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .form-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .password-requirements {
        display: grid;
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .auth-form-container {
        padding: 25px 20px;
    }
    
    .auth-branding {
        min-height: 250px;
    }
    
    .registration-stats {
        grid-template-columns: 1fr;
    }
    
    .stat-item strong {
        font-size: 1.3rem;
    }
}

/* ==========================================
   Animations
   ========================================== */

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

/* Form field focus animation */
.form-group input:focus,
.form-group select:focus {
    animation: focusPulse 0.3s ease;
}

@keyframes focusPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(26, 71, 42, 0.4);
    }
    100% {
        box-shadow: 0 0 0 4px rgba(26, 71, 42, 0.1);
    }
}

/* ==========================================
   Print Styles
   ========================================== */

@media print {
    .auth-section {
        background: #fff;
    }
    
    .auth-branding {
        display: none;
    }
    
    .auth-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
