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

.auth-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 20% 15%, rgba(34, 211, 238, 0.16), transparent 28rem),
        radial-gradient(circle at 80% 82%, rgba(34, 197, 94, 0.12), transparent 26rem),
        #0f2233;
    padding: 1rem;
}

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

.auth-body--bg .auth-box {
    box-shadow: var(--shadow-lg);
}

.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: 420px;
}

/* ── Card ───────────────────────────────────────────────── */
.auth-box {
    background: var(--color-bg);
    border: 1px solid rgba(226, 232, 240, 0.74);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

html[data-theme="dark"] .auth-box {
    border-color: rgba(148, 163, 184, 0.22);
}

/* ── Card Header (Logo + App-Name) ─────────────────────── */
.auth-box-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 2rem 1.5rem 1.65rem;
    border-bottom: 1px solid var(--color-border);
    background: linear-gradient(180deg, #1b3a57 0%, #0f2233 100%);
    text-align: center;
}

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

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

.auth-app-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #f8fafc;
    letter-spacing: 0;
}

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

/* ── Card Footer ────────────────────────────────────────── */
.auth-box-footer {
    padding: 0.875rem 1.5rem;
    border-top: 1px solid var(--color-border);
    text-align: center;
    font-size: 0.78rem;
    color: var(--color-text-muted);
    background: var(--color-gray-50);
}

.auth-box-msg {
    font-size: 0.88rem;
    color: var(--color-text-muted);
    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: var(--color-text-muted);
    font-size: 0.8rem;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--color-border);
}
.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: var(--radius);
    margin-bottom: 1rem;
    font-size: 0.85rem;
    border: 1px solid transparent;
}
.auth-alert-error {
    background: #fdecea;
    color: #a02d20;
    border-color: #f5c2bb;
}
.auth-alert-info {
    background: #e7f8fb;
    color: #0b6b7a;
    border-color: #b5e7f0;
}

.flash-messages { margin-bottom: 1rem; }
.flash-message {
    padding: 0.625rem 0.875rem;
    border-radius: var(--radius);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    border: 1px solid transparent;
}
.flash-success { background:#eafaf1; color:#1b6b3a; border-color:#abe7c4; }
.flash-error   { background:#fdecea; color:#a02d20; border-color:#f5c2bb; }
.flash-info    { background:#e7f8fb; color:#0b6b7a; border-color:#b5e7f0; }

html[data-theme="dark"] .auth-alert-error,
html[data-theme="dark"] .flash-error {
    background: rgba(248, 113, 113, 0.14);
    color: #fca5a5;
    border-color: rgba(248, 113, 113, 0.35);
}

html[data-theme="dark"] .auth-alert-info,
html[data-theme="dark"] .flash-info {
    background: rgba(34, 211, 238, 0.13);
    color: #67e8f9;
    border-color: rgba(34, 211, 238, 0.34);
}

html[data-theme="dark"] .flash-success {
    background: rgba(34, 197, 94, 0.14);
    color: #86efac;
    border-color: rgba(34, 197, 94, 0.35);
}

/* ── 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: var(--color-text-muted); margin-bottom: 1rem; }

/* ── Session warning ────────────────────────────────────── */
.session-warning {
    padding: 0.625rem 0.875rem;
    background: rgba(251, 191, 36, 0.14);
    border: 1px solid rgba(251, 191, 36, 0.35);
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: 0.82rem;
    color: #8a5a00;
}
.session-warning p { margin: 0; }

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