/* Anmeldung: gemeinsame Styles fuer die Login-Seite (/login) und das
   Login-Modal aus dem Header. Global eingebunden, weil das Modal auf jeder
   Seite geoeffnet werden kann. */

.auth-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 1rem 5rem;
    background:
        radial-gradient(circle at 15% 15%, rgba(251, 191, 36, 0.18), transparent 45%),
        radial-gradient(circle at 85% 80%, rgba(245, 158, 11, 0.14), transparent 50%),
        #f7f7f8;
    min-height: calc(100vh - 160px);
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

/* Im Modal liefert der Header-Container die Rundung/Schatten schon mit. */
.auth-modal .modal-content {
    border-radius: 20px;
    border: none;
    overflow: hidden;
}

.auth-modal {
    max-width: 440px;
}

/* Markenverlauf wie in der Navigation -- das Pluvius-Logo liegt nur in
   dunkler Schrift vor und wuerde auf dunklem Grund verschwinden. */
.auth-head {
    position: relative;
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    padding: 2.25rem 2rem 1.75rem;
    text-align: center;
    color: #1a1a1a;
}

.auth-head img {
    height: 40px;
    width: auto;
    margin-bottom: 1rem;
}

.auth-head h1 {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0;
    color: #1a1a1a;
}

.auth-head p {
    margin: 0.4rem 0 0;
    font-size: 0.9rem;
    color: rgba(26, 26, 26, 0.7);
}

.auth-close {
    position: absolute;
    top: 0.9rem;
    right: 1rem;
    border: 0;
    background: transparent;
    color: rgba(26, 26, 26, 0.55);
    font-size: 1rem;
    line-height: 1;
    padding: 0.35rem;
    cursor: pointer;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
}

.auth-close:hover {
    color: #1a1a1a;
    background: rgba(0, 0, 0, 0.08);
}

.auth-body {
    padding: 2rem;
}

.auth-body label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.35rem;
    display: block;
}

.auth-body .form-control {
    border-radius: 11px;
    border: 1.5px solid #e5e7eb;
    padding: 0.7rem 0.9rem;
    font-size: 0.97rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-body .form-control:focus {
    border-color: #fbbf24;
    box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.15);
}

.auth-submit {
    display: block;
    width: 100%;
    margin-top: 1.5rem;
    padding: 0.8rem;
    border: 0;
    border-radius: 50px;
    background: #1a1a1a;
    color: #fbbf24;
    font-weight: 700;
    font-size: 1rem;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, color 0.2s;
}

.auth-submit:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(251, 191, 36, 0.35);
}

.auth-foot {
    padding: 1.1rem 2rem 1.6rem;
    text-align: center;
    font-size: 0.85rem;
    color: #6b7280;
    border-top: 1px solid #f1f1f4;
}

.auth-foot a {
    color: #1a1a1a;
    font-weight: 600;
    text-decoration: none;
}

.auth-foot a:hover {
    text-decoration: underline;
}

.auth-alert {
    border-radius: 11px;
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #991b1b;
    padding: 0.8rem 1rem;
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
}

.auth-info {
    border-radius: 11px;
    border: 1px solid #fde68a;
    background: #fffbeb;
    color: #78350f;
    padding: 0.8rem 1rem;
    font-size: 0.87rem;
    margin-bottom: 1.25rem;
}

/* ── Phase 2: Firmenauswahl ─────────────────────────────────────────── */

.auth-welcome {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #166534;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 11px;
    padding: 0.7rem 1rem;
    margin-bottom: 1.25rem;
}

.auth-lead {
    font-size: 0.95rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.9rem;
}

.auth-firmen {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    max-height: 320px;
    overflow-y: auto;
}

/* Muss '.auth-body label' schlagen (dort steht display:block fuer die
   Formularlabels) -- deshalb zweiklassig statt nur '.auth-firma'. */
.auth-body .auth-firma {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    border: 1.5px solid #e5e7eb;
    border-radius: 13px;
    cursor: pointer;
    margin: 0;
    font-size: inherit;
    font-weight: 400;
    color: inherit;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.auth-firma:hover {
    border-color: #fbbf24;
    background: #fffdf5;
}

.auth-firma:has(input:checked) {
    border-color: #f59e0b;
    background: #fffbeb;
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.15);
}

.auth-firma input[type="radio"] {
    flex: 0 0 auto;
    width: 1.15rem;
    height: 1.15rem;
    accent-color: #f59e0b;
    margin: 0;
    cursor: pointer;
}

.auth-firma-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1 1 auto;
}

.auth-firma-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1a1a1a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.auth-firma-host {
    font-size: 0.78rem;
    color: #6b7280;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.auth-firma-icon {
    flex: 0 0 auto;
    color: #9ca3af;
    font-size: 0.85rem;
}

.auth-link {
    display: block;
    margin-top: 1rem;
    text-align: center;
    font-size: 0.85rem;
    color: #6b7280;
    text-decoration: none;
}

.auth-link:hover {
    color: #1a1a1a;
    text-decoration: underline;
}

/* ── Kundenportal (/login): eigene Seite ohne Marketing-Rahmen ───────── */

.portal-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 2rem;
    background: #fff;
    border-bottom: 1px solid #ececf0;
}

.portal-bar-logo img {
    height: 30px;
    width: auto;
}

.portal-bar-link {
    font-size: 0.88rem;
    font-weight: 600;
    color: #1a1a1a;
    text-decoration: none;
}

.portal-bar-link:hover {
    color: #b45309;
}

.portal-wrap {
    padding: 3rem 1.5rem 4rem;
    background:
        radial-gradient(circle at 12% 10%, rgba(251, 191, 36, 0.16), transparent 42%),
        radial-gradient(circle at 88% 85%, rgba(245, 158, 11, 0.12), transparent 48%),
        #f7f7f8;
    min-height: calc(100vh - 150px);
}

.portal-grid {
    display: grid;
    grid-template-columns: minmax(0, 420px) minmax(0, 380px);
    gap: 2.5rem;
    justify-content: center;
    align-items: start;
}

.portal-card {
    max-width: none;
}

.portal-instanz {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.85rem;
    color: #78350f;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 11px;
    padding: 0.65rem 0.9rem;
    margin-bottom: 1.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-panel {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.portal-block {
    background: #fff;
    border: 1px solid #ececf0;
    border-radius: 18px;
    padding: 1.4rem 1.5rem;
}

.portal-block h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 1rem;
}

.portal-block h2 i {
    color: #f59e0b;
}

.portal-patch {
    padding-bottom: 0.9rem;
    margin-bottom: 0.9rem;
    border-bottom: 1px solid #f4f4f6;
}

.portal-patch:last-of-type {
    border-bottom: 0;
    margin-bottom: 0.25rem;
    padding-bottom: 0;
}

.portal-patch header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.4rem;
}

.portal-version {
    font-size: 0.82rem;
    font-weight: 700;
    color: #1a1a1a;
    background: #fef3c7;
    border-radius: 50px;
    padding: 0.15rem 0.6rem;
}

.portal-patch time {
    font-size: 0.78rem;
    color: #9ca3af;
}

.portal-patch-text {
    font-size: 0.87rem;
    color: #4b5563;
    line-height: 1.5;
}

/* Freitext aus dem Patch -- Absaetze nicht doppelt Abstand geben. */
.portal-patch-text p {
    margin: 0 0 0.4rem;
}

.portal-patch-text p:last-child {
    margin-bottom: 0;
}

.portal-mehr {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #b45309;
    text-decoration: none;
}

.portal-mehr:hover {
    text-decoration: underline;
}

.portal-liste {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.portal-liste li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.89rem;
    color: #4b5563;
}

.portal-liste i {
    color: #9ca3af;
    flex: 0 0 auto;
}

.portal-liste a {
    color: #1a1a1a;
    font-weight: 600;
    text-decoration: none;
}

.portal-liste a:hover {
    color: #b45309;
    text-decoration: underline;
}

.portal-zeiten {
    color: #6b7280;
}

.portal-foot {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    padding: 1.25rem;
    background: #fff;
    border-top: 1px solid #ececf0;
    font-size: 0.82rem;
    color: #9ca3af;
}

.portal-foot a {
    color: #6b7280;
    text-decoration: none;
}

.portal-foot a:hover {
    color: #1a1a1a;
    text-decoration: underline;
}

@media (max-width: 900px) {
    .portal-grid {
        grid-template-columns: minmax(0, 440px);
    }
}

@media (max-width: 600px) {
    .portal-bar,
    .portal-wrap {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Grussformel ueber dem Firmennamen -- der Name ist die Ueberschrift. */
.auth-kicker {
    margin: 0 0 0.15rem !important;
    font-size: 0.8rem !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(26, 26, 26, 0.6) !important;
}

/* Zusatzangaben je System: letztes Update und Neuerungen seit dann. */
.auth-firma-meta {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0.2rem;
    font-size: 0.74rem;
    color: #9ca3af;
}

.auth-firma-neu {
    background: #fef3c7;
    color: #92400e;
    font-weight: 600;
    border-radius: 50px;
    padding: 0.05rem 0.45rem;
}

/* Merk-Vorgabe unter der Systemliste. Muss '.auth-body label' schlagen. */
.auth-body .auth-direkt {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin: 1.1rem 0 0;
    padding: 0;
    font-size: 0.87rem;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
}

.auth-direkt input[type="checkbox"] {
    flex: 0 0 auto;
    width: 1.05rem;
    height: 1.05rem;
    margin-top: 0.1rem;
    accent-color: #f59e0b;
    cursor: pointer;
}

.auth-direkt small {
    display: block;
    font-size: 0.78rem;
    font-weight: 400;
    color: #9ca3af;
}

/* Ausstieg aus dem Direktsprung an der Anmeldemaske: etwas abgesetzt,
   damit er nicht als Teil der Zugangsdaten gelesen wird. */
.auth-body .auth-direkt-login {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f1f1f4;
}

/* Hinweistext unter Formularfeldern (Passwort-Seiten). */
.auth-hinweis {
    font-size: 0.82rem;
    color: #6b7280;
    margin-top: 0.4rem;
    line-height: 1.5;
}

/* "Passwort vergessen?" -- rechtsbuendig unter dem Passwortfeld. */
.auth-vergessen {
    display: block;
    margin-top: 0.5rem;
    text-align: right;
    font-size: 0.82rem;
    color: #6b7280;
    text-decoration: none;
}

.auth-vergessen:hover {
    color: #b45309;
    text-decoration: underline;
}
