/**
 * Auth Pages (Login + Register) – Design passend zur Landing Page
 */

/* ============================================================
   Reset & Basis
   ============================================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.auth-page {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    color: #1e293b;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #0f172a 100%);
    position: relative;
    overflow-x: hidden;
}

.auth-page::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 70%, rgba(56, 189, 248, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 70% 30%, rgba(99, 102, 241, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* ============================================================
   Navigation (schlank)
   ============================================================ */
.auth-nav {
    padding: 1.25rem 2rem;
    position: relative;
    z-index: 10;
}

.auth-nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.auth-nav-logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    letter-spacing: -0.02em;
}

.auth-nav-logo span {
    color: #38bdf8;
}

.auth-nav-link {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.auth-nav-link:hover {
    color: #fff;
}

/* ============================================================
   Container + Card
   ============================================================ */
.auth-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 1.5rem 3rem;
    position: relative;
    z-index: 1;
}

.auth-card {
    width: 100%;
    max-width: 460px;
    background: rgba(255, 255, 255, 0.97);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.auth-card.auth-card-wide {
    max-width: 580px;
}

/* ============================================================
   Header
   ============================================================ */
.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    font-size: 1.75rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
    margin-bottom: 0.4rem;
}

.auth-header p {
    color: #64748b;
    font-size: 0.95rem;
}

/* ============================================================
   Alerts (Error, Warning)
   ============================================================ */
.auth-alert-error {
    background: #fef2f2;
    color: #991b1b;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    margin-bottom: 1.25rem;
    border: 1px solid #fecaca;
    font-size: 0.9rem;
}

.auth-alert-error ul {
    margin: 0;
    padding-left: 1.25rem;
}

.auth-alert-error li {
    margin-bottom: 0.2rem;
}

.auth-alert-error li:last-child {
    margin-bottom: 0;
}

.auth-alert-warning {
    background: #fffbeb;
    color: #92400e;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    margin-bottom: 1.25rem;
    border: 1px solid #fde68a;
    font-size: 0.9rem;
}

/* Inline JS error */
.auth-alert-inline {
    display: none;
    background: #fef2f2;
    color: #991b1b;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    margin-top: 1rem;
    border: 1px solid #fecaca;
    font-size: 0.9rem;
    text-align: center;
}

/* ============================================================
   Form
   ============================================================ */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.auth-form-section {
    margin-top: 0.5rem;
}

.auth-form-section-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #0f172a;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.25rem;
}

.auth-form-section-desc {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-bottom: 0.75rem;
}

.auth-form-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 0.5rem 0;
}

/* Form Group */
.auth-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.auth-field label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
}

.auth-field input,
.auth-field textarea {
    padding: 0.75rem 1rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: inherit;
    color: #1e293b;
    background: #f8fafc;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    outline: none;
}

.auth-field input::placeholder,
.auth-field textarea::placeholder {
    color: #94a3b8;
}

.auth-field input:focus,
.auth-field textarea:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
    background: #fff;
}

.auth-field textarea {
    resize: vertical;
    min-height: 60px;
}

/* ============================================================
   Submit Button
   ============================================================ */
.auth-btn {
    display: block;
    width: 100%;
    padding: 0.85rem;
    background: linear-gradient(135deg, #38bdf8, #6366f1);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1.05rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.25s;
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.3);
    margin-top: 0.5rem;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(56, 189, 248, 0.4);
}

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

/* ============================================================
   Footer Links
   ============================================================ */
.auth-footer {
    text-align: center;
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid #e2e8f0;
}

.auth-footer p {
    color: #64748b;
    font-size: 0.9rem;
}

.auth-footer a {
    color: #3b82f6;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

.auth-footer a:hover {
    color: #38bdf8;
    text-decoration: underline;
}

.auth-footer-sub {
    color: #94a3b8;
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

/* ============================================================
   Page Footer
   ============================================================ */
.auth-page-footer {
    text-align: center;
    padding: 1.5rem 2rem;
    position: relative;
    z-index: 1;
}

.auth-page-footer p {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.8rem;
}

/* ============================================================
   Code-Eingabe (Verifizierung)
   ============================================================ */
.auth-code-input {
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
    padding: 1rem 1.25rem;
    font-size: 2rem;
    font-weight: 700;
    font-family: 'SF Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;
    letter-spacing: 0.5em;
    text-align: center;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    color: #0f172a;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    display: block;
}

.auth-code-input:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
    background: #fff;
}

.auth-code-input::placeholder {
    letter-spacing: 0.3em;
    color: #cbd5e1;
    font-size: 1.5rem;
}

.auth-code-info {
    text-align: center;
    color: #64748b;
    font-size: 0.9rem;
    margin-top: 0.75rem;
    line-height: 1.5;
}

.auth-code-info strong {
    color: #334155;
}

.auth-resend-btn {
    display: inline-block;
    background: none;
    border: none;
    color: #3b82f6;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    padding: 0.5rem 0;
    transition: color 0.2s;
    text-decoration: none;
}

.auth-resend-btn:hover {
    color: #38bdf8;
    text-decoration: underline;
}

.auth-code-actions {
    text-align: center;
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.auth-back-link {
    display: inline-block;
    background: none;
    border: none;
    color: #3b82f6;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    padding: 0.5rem 0;
    transition: color 0.2s;
    text-decoration: none;
}

.auth-back-link:hover {
    color: #38bdf8;
    text-decoration: underline;
}

.auth-alert-success {
    background: #f0fdf4;
    color: #166534;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    margin-bottom: 1.25rem;
    border: 1px solid #bbf7d0;
    font-size: 0.9rem;
    text-align: center;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 640px) {
    .auth-card {
        padding: 2rem 1.5rem;
        border-radius: 16px;
    }

    .auth-header h1 {
        font-size: 1.5rem;
    }

    .auth-nav {
        padding: 1rem 1.25rem;
    }
}

@media (max-width: 400px) {
    .auth-card {
        padding: 1.75rem 1.25rem;
    }

    .auth-container {
        padding: 0.5rem 1rem 2rem;
    }
}
