/* ========================================
   BOSPlusWEB – Login-Seiten CSS
   Gilt für: index.php, login.php
   ======================================== */

/* ── Basis-Reset & Typographie ── */
*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: 'Inter', 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    font-size: 1rem;
    font-weight: 400;
    color: #212529;
    line-height: 1.5;
    background: #f4f6f8;
}

h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-weight: 600;
    line-height: 1.2;
    color: inherit;
}

p { margin-top: 0; margin-bottom: 1rem; }
a { color: #dc3545; text-decoration: none; }
a:hover { color: #b02a37; }

/* ── Split-Screen Wrapper ── */
.login-wrapper {
    min-height: 100vh;
    display: flex;
}

/* ── Linkes Branding-Panel ── */
.branding-panel {
    width: 42%;
    background: linear-gradient(160deg, #2d3748 0%, #1a202c 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem 2.5rem;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.branding-panel::before {
    content: '';
    position: absolute;
    top: -30%; right: -20%;
    width: 70%; height: 70%;
    background: radial-gradient(circle, rgba(220,53,69,0.18) 0%, transparent 70%);
    pointer-events: none;
}

.branding-panel::after {
    content: '';
    position: absolute;
    bottom: -20%; left: -10%;
    width: 60%; height: 60%;
    background: radial-gradient(circle, rgba(220,53,69,0.08) 0%, transparent 70%);
    pointer-events: none;
}

.brand-logo {
    max-height: 90px;
    max-width: 200px;
    object-fit: contain;
    margin-bottom: 2rem;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.4));
    position: relative;
    z-index: 1;
}

.brand-title {
    color: #ffffff;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    text-align: center;
    position: relative;
    z-index: 1;
}

.brand-subtitle {
    color: rgba(255,255,255,0.55);
    font-size: 0.92rem;
    text-align: center;
    margin-bottom: 2.5rem;
    position: relative;
    z-index: 1;
}

.brand-features {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
    width: 100%;
    max-width: 270px;
    position: relative;
    z-index: 1;
}

.brand-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: rgba(255,255,255,0.72);
    font-size: 0.88rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    margin-bottom: 0;
}

.brand-features li:last-child { border-bottom: none; }

.brand-features li i {
    color: #dc3545;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.brand-footer {
    position: absolute;
    bottom: 1.5rem;
    color: rgba(255,255,255,0.22);
    font-size: 0.78rem;
    text-align: center;
    z-index: 1;
}

/* ── Rechtes Formular-Panel ── */
.form-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem 1.5rem;
    background: #f4f6f8;
    overflow-y: auto;
}

/* ── Login-Card ── */
.login-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    border: none;
    margin: 0;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header .mobile-logo {
    max-height: 60px;
    margin-bottom: 1rem;
    display: none;
}

.login-title {
    color: #2d3748;
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 0.35rem;
    text-align: center;
}

.login-subtitle {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 0;
    text-align: center;
}


/* ── Select-Feld (Label oben, kein floating) ── */
.select-group {
    margin-bottom: 1.25rem;
}

.select-group-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.4rem;
    padding-left: 0.25rem;
}

.select-input-wrap {
    position: relative;
}

.select-input-wrap .select-icon {
    position: absolute;
    left: 1.1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #adb5bd;
    font-size: 1.05rem;
    pointer-events: none;
    z-index: 4;
}

.select-input-wrap .form-select,
.select-input-wrap .form-control {
    border-radius: 8px !important;
    border: 2px solid #e9ecef !important;
    padding: 0.75rem 1.25rem 0.75rem 3.25rem !important;
    height: 50px;
    font-size: 0.95rem;
    color: #212529;
    background-color: #ffffff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    line-height: 1.4;
}

.select-input-wrap .form-select { cursor: pointer; }

.select-input-wrap .form-select:focus,
.select-input-wrap .form-control:focus {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220,53,69,0.12) !important;
    outline: none;
}

.select-input-wrap:focus-within .select-icon { color: #dc3545; }

/* ── Login-Button ── */
.btn-login {
    width: 100%;
    padding: 0.875rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    background: linear-gradient(135deg, #dc3545 0%, #b02a37 100%);
    border: none;
    color: #ffffff !important;
    transition: all 0.2s ease;
    box-shadow: 0 3px 10px rgba(220,53,69,0.3);
    margin-top: 0.25rem;
    cursor: pointer;
    display: inline-block;
    text-align: center;
    text-decoration: none;
    letter-spacing: 0.01em;
}

.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 16px rgba(220,53,69,0.4);
    background: linear-gradient(135deg, #c82333 0%, #9c1d28 100%);
    color: #ffffff !important;
}

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

/* ── SSO Divider ── */
.sso-divider {
    display: flex;
    align-items: center;
    margin: 1.25rem 0;
}

.sso-divider::before,
.sso-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e9ecef;
}

.sso-divider span {
    padding: 0 1rem;
    color: #adb5bd;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ── SSO Button ── */
.btn-sso {
    display: block;
    width: 100%;
    padding: 0.875rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 8px;
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    border: none;
    color: #ffffff !important;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s ease;
    box-shadow: 0 3px 10px rgba(45,55,72,0.25);
    cursor: pointer;
}

.btn-sso:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 16px rgba(45,55,72,0.35);
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    color: #ffffff !important;
}

/* ── Zurück-Button ── */
.btn-back {
    display: inline-flex;
    align-items: center;
    color: #6c757d;
    text-decoration: none;
    font-size: 0.88rem;
    padding: 0.4rem 0;
    transition: color 0.2s ease;
}

.btn-back:hover { color: #dc3545; }
.btn-back i { transition: transform 0.2s ease; }
.btn-back:hover i { transform: translateX(-3px); }

/* ── Alert ── */
.alert-custom {
    border-radius: 8px;
    border-left: 4px solid #dc3545;
    background: rgba(220,53,69,0.08);
    color: #b02a37;
    padding: 0.875rem 1rem;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
}

/* ── Support-Bereich ── */
.support-info {
    margin-top: 1.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid #f0f0f0;
}

.support-info small {
    color: #adb5bd;
    display: block;
    margin-bottom: 0.75rem;
    font-size: 0.82rem;
    text-align: center;
}

.support-btns {
    display: flex;
    gap: 0.75rem;
}

.btn-support {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    border: 1.5px solid #e9ecef;
    background: #f8f9fa;
    color: #495057;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-support i { font-size: 1rem; }

.btn-support:hover {
    border-color: #dc3545;
    background: rgba(220,53,69,0.06);
    color: #dc3545;
    text-decoration: none;
}

/* ── Footer im Formular-Panel ── */
.form-footer {
    margin-top: 1.5rem;
    color: #ced4da;
    font-size: 0.78rem;
    text-align: center;
}

/* ── Modal-Header (einheitliches Design) ── */
.modal-content {
    border: none;
    border-radius: 12px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.18);
    overflow: hidden;
}

.modal-header {
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%) !important;
    color: #ffffff !important;
    border-bottom: none;
    padding: 1.25rem 1.5rem;
}

.modal-header .btn-close { filter: brightness(0) invert(1); opacity: 0.85; }
.modal-title { color: #ffffff !important; font-weight: 600; }

.modal-body { padding: 1.75rem 1.5rem; }
.modal-footer { border-top: 1px solid #e9ecef; padding: 1rem 1.5rem; }

/* ── SSO Required Modal ── */
.sso-icon-large {
    width: 72px;
    height: 72px;
    background: rgba(220,53,69,0.12);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.sso-icon-large i { font-size: 2rem; color: #dc3545; }

#ssoRequiredModal .btn-info {
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    border: none;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 8px;
    color: #ffffff;
}

/* ── Loading Spinner ── */
.spinner-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.65);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.spinner-overlay.active { display: flex; }
.spinner-content { text-align: center; color: #ffffff; }

.spinner-border-custom {
    width: 3rem;
    height: 3rem;
    border: 0.35rem solid rgba(255,255,255,0.25);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.85s linear infinite;
}

/* ── Animationen ── */
@keyframes spin { to { transform: rotate(360deg); } }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.fade-in-up { animation: fadeInUp 0.4s ease; }

/* ── Responsive ── */
@media (max-width: 900px) {
    .branding-panel { width: 36%; padding: 2rem 1.5rem; }
    .brand-title { font-size: 1.6rem; }
    .brand-features li { font-size: 0.82rem; }
}

@media (max-width: 650px) {
    .branding-panel { display: none; }

    .form-panel {
        background: linear-gradient(160deg, #2d3748 0%, #1a202c 100%);
        justify-content: flex-start;
        padding-top: 3rem;
    }

    .login-card {
        border-radius: 16px;
        box-shadow: 0 8px 40px rgba(0,0,0,0.3);
    }

    .login-header .mobile-logo { display: block; margin: 0 auto; }
    .form-footer { color: rgba(255,255,255,0.35); }
}

@media (max-width: 400px) {
    .login-card { padding: 1.75rem 1.5rem; }
    .form-panel { padding: 1.5rem 1rem; }
}
