/* =====================================================
   auth.css — Login & Register Pages ka Design
   UKIBS Trainer Portal
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --pink:       #F8069D;
    --pink-dark:  #d40585;
    --pink-light: #ff4db8;
    --pink-glow:  rgba(248, 6, 157, 0.18);
    --dark:       #1a0f2e;
    --white:      #ffffff;
    --gray-100:   #f7f7f7;
    --gray-300:   #e0e0e0;
    --gray-500:   #9e9e9e;
    --gray-700:   #555555;
    --success:    #22c55e;
    --error:      #ef4444;
    --warning:    #f59e0b;
}

body {
    font-family: 'Poppins', sans-serif;
    min-height: 100vh;
    background: var(--gray-100);
}

/* =====================================================
   AUTH WRAPPER — Full page layout
   ===================================================== */
.auth-page {
    min-height: 100vh;
    display: flex;
}

/* =====================================================
   LEFT SIDE — Branding Panel (only on desktop)
   ===================================================== */
.auth-branding {
    display: none; /* Mobile pe hidden */
    width: 45%;
    background: linear-gradient(145deg, var(--dark) 0%, #3d1273 50%, var(--pink-dark) 100%);
    position: relative;
    overflow: hidden;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 50px;
    color: white;
}

/* Animated Background Circles */
.auth-branding::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(248,6,157,0.3) 0%, transparent 70%);
    top: -100px;
    right: -100px;
    border-radius: 50%;
    animation: pulse-glow 4s ease-in-out infinite;
}

.auth-branding::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(248,6,157,0.2) 0%, transparent 70%);
    bottom: -80px;
    left: -80px;
    border-radius: 50%;
    animation: pulse-glow 4s ease-in-out infinite 2s;
}

@keyframes pulse-glow {
    0%, 100% { transform: scale(1); opacity: 0.7; }
    50%       { transform: scale(1.1); opacity: 1; }
}

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

.auth-branding .logo-img {
    width: 100px;
    height: 100px;
    margin-bottom: 25px;
    filter: drop-shadow(0 0 20px rgba(248,6,157,0.5));
    animation: float 3s ease-in-out infinite;
}

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

.auth-branding h1 {
    font-size: 38px;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.2;
}

.auth-branding h1 span {
    color: var(--pink-light);
}

.auth-branding p {
    font-size: 16px;
    opacity: 0.85;
    line-height: 1.6;
    max-width: 320px;
    margin: 0 auto 35px;
}

.auth-features {
    list-style: none;
    text-align: left;
    margin-top: 10px;
}

.auth-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    font-size: 14px;
    opacity: 0.9;
}

.auth-features li i {
    width: 32px;
    height: 32px;
    background: rgba(248,6,157,0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: var(--pink-light);
    flex-shrink: 0;
}

/* =====================================================
   RIGHT SIDE — Form Panel
   ===================================================== */
.auth-form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    background: white;
    min-height: 100vh;
}

.auth-card {
    width: 100%;
    max-width: 450px;
    animation: slideUp 0.5s ease-out;
}

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

/* Mobile Logo (only visible on mobile) */
.auth-mobile-logo {
    text-align: center;
    margin-bottom: 30px;
}

.auth-mobile-logo img {
    width: 65px;
    height: 65px;
    margin-bottom: 10px;
}

.auth-mobile-logo .site-name {
    font-size: 22px;
    font-weight: 700;
    color: var(--pink);
}

.auth-card-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 6px;
}

.auth-card-subtitle {
    font-size: 14px;
    color: var(--gray-500);
    margin-bottom: 28px;
}

/* =====================================================
   ALERT MESSAGES
   ===================================================== */
.auth-alert {
    padding: 13px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.5;
}

.auth-alert i {
    margin-top: 1px;
    flex-shrink: 0;
    font-size: 15px;
}

.auth-alert.error {
    background: #fff0f0;
    color: #c0392b;
    border: 1px solid #fecaca;
}

.auth-alert.success {
    background: #f0fff4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.auth-alert.warning {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

.auth-alert.info {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* =====================================================
   FORM ELEMENTS
   ===================================================== */
.form-group {
    margin-bottom: 18px;
    position: relative;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 7px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-500);
    font-size: 15px;
    transition: color 0.2s;
    pointer-events: none;
}

.form-input {
    width: 100%;
    padding: 13px 45px 13px 42px;
    border: 2px solid var(--gray-300);
    border-radius: 12px;
    font-size: 15px;
    font-family: 'Poppins', sans-serif;
    color: var(--dark);
    background: white;
    transition: border-color 0.25s, box-shadow 0.25s;
    outline: none;
}

.form-input:focus {
    border-color: var(--pink);
    box-shadow: 0 0 0 4px var(--pink-glow);
}

.form-input:focus + .input-icon,
.input-wrapper:focus-within .input-icon {
    color: var(--pink);
}

/* Password toggle button */
.pass-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-500);
    font-size: 15px;
    padding: 4px;
    transition: color 0.2s;
}

.pass-toggle:hover { color: var(--pink); }

/* Field validation icons */
.field-status {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 15px;
    display: none;
}

.field-status.valid   { color: var(--success); display: block; }
.field-status.invalid { color: var(--error);   display: block; }

/* Password field — right side me both toggle + status */
.input-wrapper.has-toggle .field-status {
    right: 42px;
}

/* Field hint text */
.field-hint {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 5px;
}

.field-hint.error   { color: var(--error); }
.field-hint.success { color: var(--success); }

/* =====================================================
   PASSWORD STRENGTH BAR
   ===================================================== */
.password-strength {
    margin-top: 8px;
}

.strength-bar {
    height: 4px;
    background: var(--gray-300);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 5px;
}

.strength-fill {
    height: 100%;
    width: 0;
    border-radius: 4px;
    transition: width 0.3s ease, background 0.3s ease;
}

.strength-text {
    font-size: 12px;
    font-weight: 500;
}

/* Strength levels */
.strength-weak   .strength-fill { width: 33%; background: var(--error); }
.strength-medium .strength-fill { width: 66%; background: var(--warning); }
.strength-strong .strength-fill { width: 100%; background: var(--success); }

.strength-weak   .strength-text { color: var(--error); }
.strength-medium .strength-text { color: var(--warning); }
.strength-strong .strength-text { color: var(--success); }

/* =====================================================
   SUBMIT BUTTON
   ===================================================== */
.btn-auth {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--pink) 0%, var(--pink-dark) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
    position: relative;
    overflow: hidden;
}

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

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

.btn-auth:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(248,6,157,0.4);
}

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

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

/* Loading spinner inside button */
.btn-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

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

/* =====================================================
   BOTTOM LINKS
   ===================================================== */
.auth-switch {
    text-align: center;
    margin-top: 22px;
    font-size: 14px;
    color: var(--gray-500);
}

.auth-switch a {
    color: var(--pink);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

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

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: var(--gray-500);
    font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--gray-300);
}

/* =====================================================
   RESPONSIVE — Desktop Layout
   ===================================================== */
@media (min-width: 768px) {
    .auth-branding {
        display: flex;
    }

    .auth-mobile-logo {
        display: none;
    }

    .auth-form-panel {
        background: var(--gray-100);
    }

    .auth-card {
        background: white;
        padding: 45px 40px;
        border-radius: 20px;
        box-shadow: 0 20px 60px rgba(0,0,0,0.1);
    }
}

@media (max-width: 767px) {
    .auth-form-panel {
        padding: 20px 16px;
        align-items: flex-start;
        padding-top: 30px;
    }
}
