/* ===== LOGIN PAGE SPEZIFISCHE STYLES ===== */

/* ===== ANIMATED BACKGROUND ===== */
.animation-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

[data-theme="dark"] .animation-canvas {
    opacity: 0.6;
}

/* ===== LOGIN CONTAINER ===== */
.login-container {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    backdrop-filter: blur(10px);
    background: radial-gradient(ellipse at center, transparent 30%, var(--color-background) 90%);
}

/* ===== LOGIN CARD ===== */
.login-card {
    background: var(--color-surface);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 8px 32px var(--color-shadow);
    width: 100%;
    max-width: 420px;
    animation: slideUp 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    transition: background-color 0.3s ease;
    border: 1px solid rgba(var(--color-primary-rgb), 0.1);
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(var(--color-primary-rgb),0.05) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
    z-index: -1;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

/* login-logo styling now handled by framework _login.css */
/* Supports both img (portal logo) and text (h1) variants */
img.login-logo {
    height: 90px;
    width: auto;
    max-width: 280px;
    display: block;
    margin: 0 auto 1rem;
    object-fit: contain;
}

h1.login-logo {
    font-family: 'Quicksand', sans-serif;
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--color-primary);
    letter-spacing: -1px;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--color-primary), var(--color-main-c), var(--color-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 3s ease infinite;
    background-size: 200% 200%;
}

.login-subtitle {
    color: var(--color-text-secondary);
    font-size: 0.875rem;
}

/* ===== FORM ELEMENTS ===== */
.form-group {
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--color-text-primary);
    font-size: 0.875rem;
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--color-border-2);
    border-radius: 12px;
    font-size: 1rem;
    background: var(--color-surface-2);
    color: var(--color-text-primary);
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--color-primary);
    background: var(--color-surface);
    box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.2);
}

/* ===== PASSWORD TOGGLE ===== */
.password-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    cursor: pointer;
    opacity: 0.5;
    color: var(--color-text-secondary);
    transition: opacity 0.2s ease, color 0.2s ease;
}

.password-toggle:hover {
    opacity: 1;
    stroke: var(--color-primary);
}

/* ===== CHECKBOX ===== */
.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--color-primary);
    cursor: pointer;
}

.checkbox-label {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    cursor: pointer;
}

.checkbox-label a {
    color: var(--color-primary);
    text-decoration: none;
}

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

/* ===== BUTTONS ===== */
.btn {
    width: 100%;
    padding: 0.875rem;
    background: var(--color-primary);
    color: var(--color-text-inverse);
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
    justify-content: center;
}

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

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

.btn:hover {
    background: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(var(--color-primary-rgb),0.4);
}

.btn-secondary {
    background: var(--color-surface-2);
    color: var(--color-text-primary);
    border: 1px solid var(--color-border);
}

.btn-secondary:hover {
    background: var(--color-surface-3);
}

/* ===== VIEW SWITCHING ===== */
.view {
    display: none;
    animation: fadeIn 0.5s ease;
}

.view.active {
    display: block;
}

/* ===== PROGRESS INDICATOR ===== */
.progress-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.step {
    flex: 1;
    height: 4px;
    background: var(--color-border);
    border-radius: 2px;
    position: relative;
}

.step.active {
    background: var(--color-primary);
}

.step::after {
    content: attr(data-step);
    position: absolute;
    top: -1.5rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    color: var(--color-text-tertiary);
}

.step.active::after {
    color: var(--color-primary);
    font-weight: 600;
}

/* ===== SOCIAL LOGIN ===== */
.divider {
    position: relative;
    text-align: center;
    margin: 2rem 0;
}

.divider::before, .divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 45%;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--color-border), transparent);
}

.divider::before {
    left: 0;
}

.divider::after {
    right: 0;
}

.divider-text {
    background: var(--color-surface);
    padding: 0 1rem;
    color: var(--color-text-tertiary);
    font-size: 0.75rem;
    font-weight: 600;
}

.social-buttons {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.btn-social {
    flex: 1;
    padding: 0.75rem;
    background: var(--color-surface-2);
    border: 1px solid var(--color-border);
    color: var(--color-text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.btn-social:hover {
    background: var(--color-surface-3);
    border-color: var(--color-primary);
    transform: translateY(-1px);
}

/* ===== FOOTER LINKS ===== */
.login-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
}



.login-links {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.login-footer a, .login-links a {
    color: var(--color-primary);
    text-decoration: none;
}

.login-footer a:hover, .login-links a:hover {
    text-decoration: underline;
}

.signup-text {
    color: var(--color-text-secondary);
    font-size: 0.875rem;
}

.signup-text a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
}

.signup-text a:hover {
    text-decoration: underline;
}

/* ===== THEME TOGGLE ===== */
.theme-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 20;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow);
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-hover);
}

.theme-toggle svg {
    width: 24px;
    height: 24px;
    stroke: var(--color-text-primary);
}

/* ===== FORM VALIDATION ===== */
.form-input.error {
    border-color: var(--color-danger);
    background: rgba(var(--color-danger-rgb), 0.05);
}

.form-error {
    color: var(--color-danger);
    font-size: 0.75rem;
    margin-top: 0.5rem;
    display: none;
}

.form-error.show {
    display: block;
}

/* ===== FORGOT STEPS ===== */
.forgot-step {
    display: none;
}

.forgot-step.active {
    display: block;
}

/* ===== CODE INPUT (6 Fields) ===== */
.code-input-container {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
    margin: 1rem 0;
}

.code-input {
    width: 48px;
    height: 56px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    border: 2px solid var(--color-border-2);
    border-radius: 12px;
    background: var(--color-surface-2);
    color: var(--color-text-primary);
    transition: all 0.2s ease;
    caret-color: var(--color-primary);
}

.code-input:focus {
    outline: none;
    border-color: var(--color-primary);
    background: var(--color-surface);
    box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.2);
    transform: scale(1.05);
}

.code-input.filled {
    border-color: var(--color-primary);
    background: rgba(var(--color-primary-rgb), 0.1);
}

.code-input.error {
    border-color: var(--color-danger);
    background: rgba(var(--color-danger-rgb), 0.1);
    animation: shake 0.3s ease;
}

.code-separator {
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--color-text-tertiary);
    margin: 0 4px;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

/* Responsive Code Input */
@media (max-width: 480px) {
    .code-input-container {
        gap: 6px;
    }

    .code-input {
        width: 40px;
        height: 48px;
        font-size: 1.25rem;
    }

    .code-separator {
        font-size: 1.25rem;
        margin: 0 2px;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

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

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

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .login-container {
        padding: 1rem;
    }

    .login-card {
        padding: 1.75rem;
        border-radius: 20px;
    }

    h1.login-logo {
        font-size: 2.2rem;
    }

    img.login-logo {
        height: 70px;
    }

    .login-links {
        flex-direction: column;
        gap: 0.75rem;
    }

    .social-buttons {
        flex-direction: column;
    }

    .theme-toggle {
        top: 1rem;
        right: 1rem;
        width: 42px;
        height: 42px;
    }
}
