:root {
    --brand-dark:   #0f1923;
    --brand-mid:    #1a2d42;
    --brand-accent: #2f80ed;
    --brand-light:  #e8f0fb;
    --text-muted:   #6b7a90;
    --border:       #dde3ed;
}

* { box-sizing: border-box; }

html, body {
    height: 100%;
    margin: 0;
    font-family: 'Inter', system-ui, sans-serif;
    background: #f0f3f8;
}

/* ── Layout ── */
.portal-wrap {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

/* ── Left panel ── */
.panel-left {
    background: var(--brand-dark);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.panel-left::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 50% at 30% 20%, rgba(47,128,237,.18) 0%, transparent 70%),
        radial-gradient(ellipse 50% 40% at 80% 80%, rgba(47,128,237,.10) 0%, transparent 70%);
    pointer-events: none;
}

.panel-logo {
    display: flex;
    align-items: center;
    gap: .75rem;
    color: #fff;
    text-decoration: none;
    position: relative;
    z-index: 1;
}

.panel-logo-img {
    height: 38px;
    width: auto;
    display: block;
}

.panel-headline {
    position: relative;
    z-index: 1;
}

.panel-headline h1 {
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    font-weight: 300;
    color: #fff;
    line-height: 1.25;
    letter-spacing: -.03em;
    margin: 0 0 1rem;
}

.panel-headline h1 strong {
    font-weight: 600;
    color: #fff;
}

.panel-headline p {
    color: #8da4be;
    font-size: .95rem;
    line-height: 1.6;
    margin: 0;
    max-width: 340px;
}

.panel-footer {
    position: relative;
    z-index: 1;
    color: #3d5570;
    font-size: .8rem;
}

/* ── Footer-Links ── */
.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem 1.1rem;
    margin-bottom: .6rem;
}

.footer-links a {
    font-size: .8rem;
    text-decoration: none;
    transition: color .15s;
}

.footer-copy {
    font-size: .8rem;
}

/* Auf dem dunklen Panel (Desktop) */
.panel-left .footer-links a       { color: #8da4be; }
.panel-left .footer-links a:hover { color: #fff; }
.panel-left .footer-copy          { color: #3d5570; }

/* Mobiler Footer – nur sichtbar wenn das linke Panel ausgeblendet ist */
.mobile-footer {
    display: none;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.mobile-footer .footer-links a       { color: var(--text-muted); }
.mobile-footer .footer-links a:hover { color: var(--brand-accent); }
.mobile-footer .footer-copy          { color: var(--text-muted); }

/* ── Right panel ── */
.panel-right {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-card {
    width: 100%;
    max-width: 400px;
}

.login-card h2 {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--brand-dark);
    letter-spacing: -.02em;
    margin-bottom: .35rem;
}

.login-card .subtitle {
    color: var(--text-muted);
    font-size: .9rem;
    margin-bottom: 2rem;
}

/* Form */
.form-label {
    font-size: .82rem;
    font-weight: 500;
    color: #3d4f65;
    margin-bottom: .4rem;
}

.form-control {
    border: 1.5px solid var(--border);
    border-radius: 8px;
    padding: .65rem .9rem;
    font-size: .95rem;
    color: var(--brand-dark);
    transition: border-color .15s, box-shadow .15s;
}

.form-control:focus {
    border-color: var(--brand-accent);
    box-shadow: 0 0 0 3px rgba(47,128,237,.12);
    outline: none;
}

.input-group .form-control {
    border-right: none;
    border-radius: 8px 0 0 8px;
}

.input-group .btn-outline-secondary {
    border: 1.5px solid var(--border);
    border-left: none;
    border-radius: 0 8px 8px 0;
    color: var(--text-muted);
    background: #fff;
    padding: .65rem .9rem;
    transition: color .15s;
}

.input-group .btn-outline-secondary:hover {
    color: var(--brand-dark);
    background: #f7f9fc;
}

.input-group:focus-within .btn-outline-secondary {
    border-color: var(--brand-accent);
}

.btn-login {
    background: #eb5c2c;
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: .95rem;
    font-weight: 500;
    padding: .7rem 1rem;
    width: 100%;
    transition: background .15s, transform .1s;
    position: relative;
}

.btn-login:hover  { background: #d94d20; color: #fff; }
.btn-login:active { transform: scale(.99); }

.btn-login .spinner-border {
    width: 1rem;
    height: 1rem;
    border-width: 2px;
}

/* Alert */
.alert-login {
    border: none;
    border-radius: 8px;
    background: #fff0f0;
    color: #c0392b;
    font-size: .88rem;
    padding: .75rem 1rem;
    display: flex;
    align-items: flex-start;
    gap: .6rem;
}

.alert-login svg {
    flex-shrink: 0;
    margin-top: 1px;
}

/* Hinweis (DNS / Wiki) – Bootstrap alert-warning */
.login-hint {
    margin-top: 1.25rem;
    margin-bottom: 0;
    font-size: .82rem;
    line-height: 1.5;
}

.login-hint a {
    color: #eb5c2c;
    font-weight: 500;
    text-decoration: none;
}

.login-hint a:hover {
    color: #d94d20;
    text-decoration: underline;
}

/* ── Mobile ── */
@media (max-width: 768px) {
    .portal-wrap { grid-template-columns: 1fr; }

    /* Branding (Logo + Infotext) kompakt oben anzeigen statt ausblenden */
    .panel-left {
        min-height: auto;
        padding: 2.5rem 1.5rem;
        justify-content: flex-start;
        gap: 1.5rem;
    }
    .panel-logo-img { height: 32px; }
    .panel-headline h1 { font-size: 1.7rem; }
    .panel-headline p  { max-width: none; }
    /* Footer-Links erscheinen auf Mobil unter dem Formular (mobile-footer) */
    .panel-left .panel-footer { display: none; }

    .panel-right {
        padding: 2rem 1.5rem;
        background: #fff;
        flex-direction: column;
        align-items: flex-start;
    }
    .login-card    { max-width: 100%; }
    .mobile-footer { display: block; }
}
