/* =========================================
   AUTH — Login & Register Pages
   ========================================= */

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.auth-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 460px;
}

.auth-card {
    background: var(--bg-card);
    border-radius: 28px;
    padding: 48px 40px 40px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--accent-gradient);
}

/* Header */
.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo {
    text-decoration: none;
    display: inline-block;
    margin-bottom: 18px;
}

.auth-logo-icon {
    width: 64px; height: 64px;
    border-radius: 20px;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.6rem;
    margin: 0 auto;
    box-shadow: 0 8px 30px rgba(124,58,237,0.25);
    transition: transform 0.3s ease;
}

.auth-logo:hover .auth-logo-icon {
    transform: scale(1.08) rotate(-3deg);
}

.auth-header h1 {
    font-size: 1.6rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 6px;
}

.auth-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Alert */
.auth-alert {
    padding: 12px 16px;
    border-radius: 14px;
    margin-bottom: 20px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: fadeDown 0.3s ease;
}

.auth-alert-error {
    background: rgba(239,68,68,0.08);
    color: #ef4444;
    border: 1px solid rgba(239,68,68,0.15);
}

.auth-alert-success {
    background: rgba(34,197,94,0.08);
    color: #22c55e;
    border: 1px solid rgba(34,197,94,0.15);
}

@keyframes fadeDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Fields */
.auth-field {
    margin-bottom: 18px;
}

.auth-field label {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.auth-field label i {
    color: var(--accent-1);
    margin-left: 4px;
}

.auth-field input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border-color);
    border-radius: 14px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.92rem;
    font-family: inherit;
    outline: none;
    transition: all 0.3s ease;
}

.auth-field input:focus {
    border-color: var(--accent-1);
    box-shadow: 0 0 0 4px rgba(124,58,237,0.08);
}

.auth-field input::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

/* Password toggle */
.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-left: 48px;
}

body.resume-page.en .password-wrapper input {
    padding-left: 18px;
    padding-right: 48px;
}

.password-toggle {
    position: absolute;
    left: 14px; top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 4px;
    transition: color 0.2s;
}

body.resume-page.en .password-toggle {
    left: auto;
    right: 14px;
}

.password-toggle:hover {
    color: var(--accent-1);
}

/* Row (2 columns) */
.auth-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* Extras */
.auth-extras {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
}

.auth-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.82rem;
    color: var(--text-secondary);
    user-select: none;
}

.auth-checkbox input {
    display: none;
}

.checkbox-mark {
    width: 20px; height: 20px;
    border-radius: 6px;
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.auth-checkbox input:checked + .checkbox-mark {
    background: var(--accent-gradient);
    border-color: transparent;
}

.auth-checkbox input:checked + .checkbox-mark::after {
    content: '✓';
    color: #fff;
    font-size: 0.7rem;
    font-weight: 900;
}

/* Submit Button */
.auth-btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 14px;
    background: var(--accent-gradient);
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 30px rgba(124,58,237,0.25);
}

.auth-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 45px rgba(124,58,237,0.4);
}

.auth-btn:active {
    transform: translateY(0);
}

/* Footer */
.auth-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.auth-footer p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.auth-footer a {
    color: var(--accent-1);
    text-decoration: none;
    font-weight: 700;
    transition: color 0.2s;
}

.auth-footer a:hover {
    color: var(--accent-3);
}

.auth-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
}

/* Controls (lang/theme) */
.auth-controls {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.auth-controls .topbar-btn {
    width: 40px; height: 40px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 800;
    font-family: inherit;
    transition: all 0.25s ease;
    text-decoration: none;
    backdrop-filter: blur(10px);
}

.auth-controls .topbar-btn:hover {
    border-color: var(--accent-1);
    color: var(--accent-1);
    background: var(--accent-gradient-soft);
}

/* Entrance animation */
.auth-container {
    animation: authFadeIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes authFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Responsive */
@media (max-width: 480px) {
    .auth-card {
        padding: 36px 24px 28px;
        border-radius: 20px;
    }
    .auth-row {
        grid-template-columns: 1fr;
    }
    .auth-header h1 {
        font-size: 1.35rem;
    }
}
