/* =========================================
   PTBOS Mail - Index Style V2 (Clean & Robust)
   ========================================= */

:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --bg-gradient: linear-gradient(135deg, #0f172a 0%, #334155 100%);
    --text-on-dark: #ffffff;
    --text-muted-on-dark: #cbd5e1;
    --bg-card: #ffffff;
    --text-main: #1e293b;
}

/* --- Grund-Layout & Reset --- */
* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh; /* Volle Höhe erzwingen */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg-gradient); /* Dein gewünschter Verlauf */
    color: var(--text-main);
    
    /* Flex-Layout für Sticky Footer */
    display: flex;
    flex-direction: column;
}

/* Der Hauptbereich, der den verfügbaren Platz füllt */
.main-content-wrapper {
    flex: 1; /* Drückt den Footer nach unten */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    width: 100%;
}

/* Der Container für Text und Login-Box */
.split-layout {
    display: flex;
    flex-direction: row; /* Desktop: Nebeneinander */
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1000px; /* Maximale Breite auf großen Schirmen */
    gap: 60px;
}

/* --- Linke Seite: Willkommens-Text --- */
.welcome-side {
    flex: 1;
    color: var(--text-on-dark); /* WICHTIG: Weiße Schrift erzwingen */
    text-align: left;
}

.welcome-side h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.welcome-side .lead {
    font-size: 1.1rem;
    color: var(--text-muted-on-dark);
    margin-bottom: 2.5rem;
}

/* Features Liste - Clean & Einfach */
.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
}

.feature-icon {
    font-size: 1.5rem;
    margin-right: 15px;
    padding-top: 2px;
}

.feature-content h3 {
    margin: 0 0 5px 0;
    color: var(--text-on-dark);
    font-size: 1.1rem;
}

.feature-content p {
    margin: 0;
    color: var(--text-muted-on-dark);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* --- Rechte Seite: Die weiße Login-Box --- */
.login-side {
    flex: 0 0 400px; /* Fixe Breite auf Desktop */
    width: 400px;
}

.container.login-box {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.2);
    text-align: center;
    color: var(--text-main);
}

/* --- Formular Elemente (Safari iOS Fixes) --- */
.input-group {
    display: flex;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 1.25rem;
    background: #fff;
    overflow: hidden;
    transition: all 0.2s;
}

.input-group:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.input-group input {
    flex: 1;
    padding: 14px 16px;
    font-size: 16px; /* Verhindert Auto-Zoom auf iOS */
    border: none;
    outline: none;
    background: transparent;
    -webkit-appearance: none; /* WICHTIG für Safari */
    border-radius: 0;
}

.button {
    width: 100%;
    background-color: var(--primary);
    color: white;
    padding: 15px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    -webkit-appearance: none; /* WICHTIG für Safari Button */
    transition: background 0.2s, transform 0.1s;
}

.button:hover { background-color: var(--primary-hover); }
.button:active { transform: scale(0.98); }

/* Alerts & Hints */
.alert-box {
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 25px;
    text-align: center;
    font-weight: 500;
}
.alert-success { background: rgba(16, 185, 129, 0.15); color: #166534; border: 1px solid #10b981; }
.alert-error { background: rgba(239, 68, 68, 0.1); color: #b91c1c; border: 1px solid #ef4444; }

.register-hint { margin-top: 1.5rem; font-size: 0.9rem; color: #64748b; }
.register-hint a { color: var(--primary); text-decoration: none; font-weight: 600; }

/* --- MOBILE & TABLET ANPASSUNG --- */
@media (max-width: 900px) {
    .split-layout {
        flex-direction: column; /* Untereinander stapeln */
        gap: 40px;
    }

    .welcome-side {
        text-align: center;
    }

    .welcome-side h1 { font-size: 2rem; }
    
    /* Features auf Mobile zentrieren */
    .feature-item {
        flex-direction: column;
        align-items: center;
    }
    .feature-icon { margin-right: 0; margin-bottom: 10px; }

    .login-side {
        width: 100%; /* Volle Breite auf Mobile */
        flex: 1;
    }
    
    .container.login-box {
        padding: 2rem 1.5rem; /* Etwas weniger Padding auf kleinen Screens */
    }
}
