/* Auth Pages Styles - Matching Main Site Theme */

/* CSS Variables from main site */
:root {
    --primary-teal: #4ECDC4;
    --primary-green: #7BC67E;
    --primary-yellow: #F4D35E;
    --primary-blue: #5B9BD5;
    --dark-blue: #2C3E50;
    --text-dark: #2C3E50;
    --text-gray: #7F8C8D;
    --text-light: #95A5A6;
    --bg-light: #F5F7FA;
    --bg-white: #FFFFFF;
    --border-color: #E8ECF0;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --bg-gradient-1: rgba(168, 190, 200, 0.8);
    --bg-gradient-2: rgba(200, 180, 190, 0.7);
    --bg-gradient-3: rgba(180, 200, 180, 0.6);
    --bg-gradient-4: rgba(190, 175, 200, 0.5);
    --bg-linear: linear-gradient(135deg, #b8c6d1 0%, #d4c4cb 25%, #c9d4c5 50%, #d1c9d6 75%, #c5d0d8 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: var(--text-dark);
    position: relative;
}

/* Matching main site background */
body::before {
    content: '';
    position: fixed;
    top: -50px;
    left: -50px;
    right: -50px;
    bottom: -50px;
    background:
        radial-gradient(ellipse at 20% 20%, var(--bg-gradient-1) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, var(--bg-gradient-2) 0%, transparent 45%),
        radial-gradient(ellipse at 40% 80%, var(--bg-gradient-3) 0%, transparent 50%),
        radial-gradient(ellipse at 90% 70%, var(--bg-gradient-4) 0%, transparent 40%),
        var(--bg-linear);
    filter: blur(40px);
    z-index: -1;
}

.auth-container {
    width: 100%;
    max-width: 440px;
}

.auth-card {
    background: var(--bg-white);
    border-radius: 16px;
    box-shadow: var(--shadow-lg), 0 0 40px rgba(78, 205, 196, 0.1);
    overflow: hidden;
}

.auth-header {
    text-align: center;
    padding: 40px 40px 30px;
    background: linear-gradient(135deg, var(--dark-blue) 0%, #3d5266 100%);
    color: white;
}

.logo {
    display: block;
    margin-bottom: 10px;
    text-decoration: none;
}

.logo img {
    max-width: 150px;
    height: auto;
    display: block;
    margin: 0 auto;
    /* White color for dark header background */
    filter: brightness(0) saturate(100%) invert(100%);
}

.auth-subtitle {
    font-size: 1rem;
    opacity: 0.9;
}

.auth-form {
    padding: 30px 40px;
    background: var(--bg-white);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i:first-child {
    position: absolute;
    left: 15px;
    color: var(--text-light);
    font-size: 1rem;
}

.input-wrapper input {
    width: 100%;
    padding: 14px 45px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--bg-light);
    color: var(--text-dark);
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary-teal);
    background: var(--bg-white);
    box-shadow: 0 0 0 4px rgba(78, 205, 196, 0.15);
}

.input-wrapper input::placeholder {
    color: var(--text-light);
}

.toggle-password {
    position: absolute;
    right: 15px;
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s ease;
}

.toggle-password:hover {
    color: var(--primary-teal);
}

.form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Captcha Styles */
.captcha-group {
    margin-bottom: 20px;
}

.captcha-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.captcha-question {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: linear-gradient(135deg, var(--dark-blue) 0%, #3d5266 100%);
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    letter-spacing: 1px;
}

.captcha-question span {
    flex: 1;
}

.captcha-refresh {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.captcha-refresh:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(180deg);
}

.captcha-refresh i {
    font-size: 0.875rem;
}

.checkbox-group {
    margin-top: 5px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text-gray);
    line-height: 1.4;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    min-width: 20px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin-top: 2px;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: var(--primary-teal);
    border-color: var(--primary-teal);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '\2713';
    color: white;
    font-size: 12px;
}

.checkbox-label a {
    color: var(--primary-teal);
    text-decoration: none;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

.forgot-link {
    font-size: 0.875rem;
    color: var(--primary-teal);
    text-decoration: none;
}

.forgot-link:hover {
    text-decoration: underline;
}

.btn-primary {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary-teal) 0%, #3db8b0 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(78, 205, 196, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    width: 100%;
    padding: 14px;
    background: var(--bg-light);
    color: var(--primary-teal);
    border: 2px solid var(--primary-teal);
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: var(--primary-teal);
    color: white;
}

.auth-message {
    margin-top: 20px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.875rem;
    display: none;
}

.auth-message.error {
    display: block;
    background: #FEE2E2;
    color: #DC2626;
    border: 1px solid #FECACA;
}

.auth-message.success {
    display: block;
    background: #D1FAE5;
    color: #059669;
    border: 1px solid #A7F3D0;
}

.auth-message.info {
    display: block;
    background: #E0F7FA;
    color: #00838F;
    border: 1px solid #B2EBF2;
}

.resend-section {
    padding: 0 40px 20px;
    text-align: center;
}

.resend-section p {
    font-size: 0.875rem;
    color: var(--text-gray);
    margin-bottom: 10px;
}

.auth-footer {
    text-align: center;
    padding: 20px 40px 30px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-white);
}

.auth-footer p {
    font-size: 0.9rem;
    color: var(--text-gray);
}

.auth-footer a {
    color: var(--primary-teal);
    font-weight: 600;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 480px) {
    .auth-form {
        padding: 25px 25px;
    }

    .auth-header {
        padding: 30px 25px 25px;
    }

    .auth-footer {
        padding: 20px 25px 25px;
    }

    .logo img {
        max-width: 120px;
    }

    .form-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* Loading animation */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.fa-spin {
    animation: spin 1s linear infinite;
}
