/* --- CSS/auth.css --- */
/* Premium Light Theme for Login and Register pages */

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

:root {
    --primary-color: #4f46e5;       /* Indigo 600 */
    --secondary-color: #6366f1;     /* Indigo 500 */
    --accent-light: #e0e7ff;        /* Indigo 100 */
    --danger-color: #ef4444;        /* Red 500 */
    --success-color: #10b981;       /* Emerald 500 */
    --text-dark: #0f172a;           /* Slate 900 */
    --text-light: #64748b;          /* Slate 500 */
    --border-color: #e2e8f0;        /* Slate 200 */
    --focus-ring: rgba(79, 70, 229, 0.15);
    --card-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.04), 0 0 0 1px rgba(0, 0, 0, 0.02);
    --input-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

/* 1. Layout & Background */
body {
    margin: 0;
    padding: 0;
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: radial-gradient(circle at 100% 0%, #e0e7ff 0%, #f8fafc 50%, #e0f2fe 100%);
    background-attachment: fixed;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-dark);
}

body.register-body {
    height: auto;
    min-height: 100vh;
    padding: 40px 0;
}

/* 2. The Card Container */
.auth-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(255, 255, 255, 0.7);
    width: 420px;
    max-width: 90%;
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

body.register-body .auth-card {
    width: 520px;
}

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

/* 3. Logo & Header */
.auth-logo {
    width: auto;
    min-width: 70px;
    height: 70px;
    padding: 0 16px;
    background: linear-gradient(135deg, #e0e7ff, #e0f2fe);
    color: var(--primary-color);
    border-radius: 16px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.3px;
    line-height: 1;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.1);
    transition: transform 0.3s ease;
}

.auth-logo:hover {
    transform: scale(1.05) rotate(5deg);
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h2 {
    color: var(--text-dark);
    font-weight: 700;
    font-size: 1.6rem;
    margin: 0 0 6px 0;
    letter-spacing: -0.5px;
}

.auth-header p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin: 0;
    font-weight: 500;
}

/* 4. Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-control {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: inherit;
    font-weight: 500;
    background-color: #ffffff;
    color: var(--text-dark);
    box-shadow: var(--input-shadow);
    transition: all 0.25s ease;
    box-sizing: border-box;
}

.form-control:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 4px var(--focus-ring), var(--input-shadow);
    background-color: #ffffff;
}

.form-control::placeholder {
    color: #a1a1aa;
}

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

/* Default Icon (Left side) */
.input-icon i {
    position: absolute;
    left: 14px;
    top: 15px;
    color: var(--text-light);
    font-size: 1rem;
    transition: color 0.25s;
}

.input-icon input:focus + i,
.input-icon input:focus ~ i {
    color: var(--primary-color);
}

/* Input field padding for left icon */
.input-icon input {
    padding-left: 42px;
}

/* Toggle Password Eye Icon (Right side) */
.toggle-password {
    left: auto !important;
    right: 14px !important;
    cursor: pointer;
    color: var(--text-light) !important;
    transition: color 0.25s;
    font-size: 1rem;
    top: 15px !important;
    z-index: 10;
}

.toggle-password:hover {
    color: var(--primary-color) !important;
}

/* Add right padding to password inputs so text doesn't go under the eye icon */
.input-icon input[type="password"],
.input-icon input[type="text"] {
    padding-right: 42px;
}

.form-row {
    display: flex;
    gap: 16px;
}

.form-row .form-group {
    flex: 1;
}

/* 5. Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.95rem;
    font-family: inherit;
    font-weight: 600;
    text-align: center;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    gap: 8px;
}

.btn-block {
    width: 100%;
    display: flex;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.3);
    opacity: 0.95;
}

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

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

/* 6. Responsive */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    body.register-body .auth-card {
        width: 95%;
        padding: 24px;
    }
    .auth-card {
        padding: 24px;
    }
}
/* Back-to-home link + captcha widget (login page) */
.auth-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-light);
    text-decoration: none;
    margin-bottom: 18px;
    transition: color 0.2s;
}
.auth-back:hover { color: var(--primary-color); }

.captcha-group .captcha-label {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}
.captcha-group .captcha-label i.fa-shield-halved { color: var(--primary-color); }
.captcha-refresh {
    margin-left: auto;
    background: var(--accent-light);
    border: none;
    color: var(--primary-color);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.captcha-refresh:hover { background: #c7d2fe; }
