/**
 * IT-Dokumentation - Auth Stylesheet
 * AdminLTE-style Login
 */

.auth-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #e9ecef;
    padding: 1rem;
}

.auth-body--bg {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.auth-body--bg .auth-box {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

.auth-body--bg .auth-container {
    /* slight overlay behind the card for readability */
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.2));
}

/* ── Container ──────────────────────────────────────────── */
.auth-container {
    width: 100%;
    max-width: 380px;
}

/* ── Card ───────────────────────────────────────────────── */
.auth-box {
    background: #fff;
    border-radius: 0.25rem;
    box-shadow: 0 0 1px rgba(0,0,0,.125), 0 1px 3px rgba(0,0,0,.2);
    overflow: hidden;
}

/* ── Card Header (Logo + App-Name) ─────────────────────── */
.auth-box-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.75rem 1.5rem 1.25rem;
    border-bottom: 1px solid #f0f0f0;
    text-align: center;
}

.auth-box-header .logo-icon {
    font-size: 2.5rem;
    line-height: 1;
}

.auth-logo-img {
    max-height: 52px;
    max-width: 220px;
    object-fit: contain;
}

.auth-app-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #343a40;
    letter-spacing: 0.01em;
}

/* ── Card Body ──────────────────────────────────────────── */
.auth-box-body {
    padding: 1.5rem;
}

/* ── Card Footer ────────────────────────────────────────── */
.auth-box-footer {
    padding: 0.75rem 1.5rem;
    border-top: 1px solid #f0f0f0;
    text-align: center;
    font-size: 0.78rem;
    color: #6c757d;
    background: #f8f9fa;
}

.auth-box-msg {
    font-size: 0.88rem;
    color: #6c757d;
    text-align: center;
    margin: 0 0 1.25rem;
}

/* ── Inputs ─────────────────────────────────────────────── */
.auth-input-group {
    margin-bottom: 0.875rem;
}

/* ── Divider ────────────────────────────────────────────── */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 1.25rem 0;
    color: #6c757d;
    font-size: 0.8rem;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #dee2e6;
}
.auth-divider span { padding: 0 0.75rem; }

/* ── Microsoft button ───────────────────────────────────── */
.btn-microsoft {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    background: #2f2f2f;
    color: #fff;
    border-color: #2f2f2f;
    font-weight: 500;
}
.btn-microsoft:hover,
.btn-microsoft:focus {
    background: #1a1a1a;
    border-color: #1a1a1a;
    color: #fff;
    text-decoration: none;
}
.btn-microsoft .microsoft-logo { flex-shrink: 0; }

/* ── Error / Flash ──────────────────────────────────────── */
.auth-alert {
    padding: 0.625rem 0.875rem;
    border-radius: 0.25rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    border: 1px solid transparent;
}
.auth-alert-error {
    background: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}
.auth-alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border-color: #bee5eb;
}

.flash-messages { margin-bottom: 1rem; }
.flash-message {
    padding: 0.625rem 0.875rem;
    border-radius: 0.25rem;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    border: 1px solid transparent;
}
.flash-success { background:#d4edda; color:#155724; border-color:#c3e6cb; }
.flash-error   { background:#f8d7da; color:#721c24; border-color:#f5c6cb; }
.flash-info    { background:#d1ecf1; color:#0c5460; border-color:#bee5eb; }

/* ── Error page ─────────────────────────────────────────── */
.auth-error { text-align: center; }
.auth-error .error-icon { font-size: 3rem; color: #dc3545; margin-bottom: 0.75rem; }
.auth-error h2 { color: #dc3545; margin-bottom: 0.75rem; }
.auth-error p { color: #6c757d; margin-bottom: 1rem; }

/* ── Session warning ────────────────────────────────────── */
.session-warning {
    padding: 0.625rem 0.875rem;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 0.25rem;
    margin-bottom: 1rem;
    font-size: 0.82rem;
    color: #856404;
}
.session-warning p { margin: 0; }

@media (max-width: 480px) {
    .auth-container { max-width: 100%; }
    .auth-box-body  { padding: 1.25rem; }
}
