/* ── Farben: Hell- und Dunkel-Modus ── */
:root {
    --bg: #f0f4f8;
    --container-bg: #ffffff;
    --text: #1a202c;
    --text-muted: #718096;
    --border: #e2e8f0;
    --input-bg: #f7fafc;
    --btn-bg: #4299e1;
    --btn-hover: #3182ce;
    --shadow: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
    --bg: #1a202c;
    --container-bg: #2d3748;
    --text: #f7fafc;
    --text-muted: #a0aec0;
    --border: #4a5568;
    --input-bg: #1a202c;
    --btn-bg: #4299e1;
    --btn-hover: #63b3ed;
    --shadow: rgba(0, 0, 0, 0.4);
}

/* ── Topbar ── */
.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--container-bg);
    border-bottom: 2px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 20px;
    box-shadow: 0 2px 8px var(--shadow);
    z-index: 200;
}

.topbar img {
    height: 40px;
    object-fit: contain;
}

/* ── Reset ── */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow: hidden;
    touch-action: manipulation;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background-color: var(--bg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-top: 60px;
    transition: background 0.3s ease;
}

/* ── Login Box ── */
.login-box {
    background: var(--container-bg);
    border-radius: 16px;
    padding: 40px 32px;
    width: 100%;
    max-width: 360px;
    box-shadow: 0 8px 32px var(--shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    animation: slideUp 0.4s ease;
}

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

.login-logo img {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.login-box h2 {
    color: var(--text);
    font-size: 24px;
    font-weight: 700;
}

.login-subtitle {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 8px;
}

/* ── Formular ── */
.login-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.login-form input {
    width: 100%;
    padding: 12px 14px;
    background: var(--input-bg);
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 15px;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s ease;
    font-family: inherit;
}

.login-form input:focus {
    border-color: var(--btn-bg);
}

.login-form input::placeholder {
    color: var(--text-muted);
}

.login-form button {
    width: 100%;
    padding: 12px;
    background: var(--btn-bg);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
    font-family: inherit;
}

.login-form button:hover {
    background: var(--btn-hover);
    transform: scale(1.02);
}

/* ── Fehlermeldung ── */
.login-fehler {
    color: #c53030;
    font-size: 13px;
    text-align: center;
    min-height: 18px;
}

[data-theme="dark"] .login-fehler {
    color: #feb2b2;
}

/* ── Responsive ── */
@media (max-width: 400px) {
    .login-box {
        border-radius: 0;
        padding: 32px 20px;
        min-height: 100dvh;
        justify-content: center;
        box-shadow: none;
    }
}
