/* =========================================
   PTBOS Mail - Finaler Zentrierungs-Fix
   ========================================= */

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

/* Radikaler Reset */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg-gradient);
    background-attachment: fixed;
    min-height: 100vh;
    width: 100%;
    /* Das ist die sicherste Methode für Firefox: */
    display: grid;
    place-items: center; /* Zentriert alles (horizontal & vertikal) perfekt in der Mitte */
    padding: 40px 20px;
}

/* Der Wrapper bündelt Text und Box */
.page-wrapper {
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    align-items: center; /* Zentriert die Kinder (Sektionen) horizontal */
    justify-content: center;
}

/* Sektion über der Box */
.welcome-text {
    width: 100%;
    text-align: center;
    color: white;
    margin-bottom: 40px;
}

.welcome-text h1 {
    font-size: 2.2rem;
    color: white;
    margin-bottom: 10px;
}

.welcome-text .lead {
    color: #94a3b8;
    font-size: 1.1rem;
    margin-bottom: 30px;
}

/* Grid für die zwei Feature-Spalten */
.features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    text-align: left;
    width: 100%;
}

.feature-item h3 {
    color: #60a5fa;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.feature-item p {
    color: #cbd5e1;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Die weiße Login-Box */
.container {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 420px;
    /* margin: 0 auto; ist bei place-items:center im Body oft gar nicht mehr nötig, schadet aber nicht */
    margin-top: 20px; 
}
/* Responsive: Wenn das Display schmaler als 600px ist */
@media (max-width: 600px) {
    .features-grid {
        grid-template-columns: 1fr; /* Spalten untereinander */
    }
    .welcome-text h1 {
        font-size: 1.8rem;
    }
}
.error-box {
    background: #fef2f2;
    color: #b91c1c;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    font-size: 0.9rem;
    border: 1px solid #fecaca;
}

<style>
    .input-group {
        display: flex;
        align-items: stretch;
        width: 100%;
        margin-bottom: 1rem;
    }

    .input-group input {
        flex: 1;
        /* Verhindert doppelte Rahmen und rundet nur links */
        border-top-right-radius: 0 !important;
        border-bottom-right-radius: 0 !important;
        border-right: none !important;
    }

    .domain-addon {
        display: flex;
        align-items: center;
        background: #f1f5f9; /* Ein helles Grau, passend zum Design */
        color: #64748b;
        padding: 0 15px;
        border: 1px solid #e2e8f0;
        border-left: none; /* Verhindert dicken Doppelrahmen in der Mitte */
        border-top-right-radius: 8px;
        border-bottom-right-radius: 8px;
        font-family: monospace;
        font-weight: 600;
        font-size: 0.9rem;
        white-space: nowrap;
    }
</style>
.button {
    width: 100%;
    height: 48px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.register-hint {
    margin-top: 2rem;
    border-top: 1px solid #e2e8f0;
    padding-top: 1.5rem;
    text-align: center;
}

/* Spinner Overlay */
#overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.9);
    z-index: 9999;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top: 4px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

@media (max-width: 600px) {
    .features-grid { grid-template-columns: 1fr; }
    .welcome-text h1 { font-size: 1.8rem; }
}
