/* ========== Page ========== */
.login-body {
    margin: 0;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px 16px;
    color: var(--app-text);
    background: radial-gradient(1200px 600px at 50% -10%,
    rgba(80, 140, 255, 0.18),
    transparent 60%),
    linear-gradient(180deg,
            rgba(250, 251, 255, 1),
            rgba(245, 247, 252, 1));
}

html[data-theme="dark"] .login-body {
    background: radial-gradient(1200px 600px at 50% -10%,
    rgba(80, 140, 255, 0.20),
    transparent 60%),
    linear-gradient(180deg,
            rgba(14, 14, 16, 1),
            rgba(18, 18, 22, 1));
}

.login-body--nbh {
    background: radial-gradient(1100px 560px at 50% -10%,
    rgba(20, 184, 166, 0.18),
    transparent 60%),
    linear-gradient(180deg,
            rgba(248, 253, 250, 1),
            rgba(241, 248, 246, 1));
}

html[data-theme="dark"] .login-body--nbh {
    background: radial-gradient(1100px 560px at 50% -10%,
    rgba(20, 184, 166, 0.18),
    transparent 60%),
    linear-gradient(180deg,
            rgba(7, 18, 20, 1),
            rgba(12, 24, 27, 1));
}

.login-body--selection {
    background: radial-gradient(1180px 580px at 50% -10%,
    rgba(59, 130, 246, 0.16),
    transparent 58%),
    radial-gradient(900px 520px at 82% 16%,
            rgba(20, 184, 166, 0.12),
            transparent 62%),
    linear-gradient(180deg,
            rgba(250, 252, 255, 1),
            rgba(245, 249, 250, 1));
}

html[data-theme="dark"] .login-body--selection {
    background: radial-gradient(1180px 580px at 50% -10%,
    rgba(59, 130, 246, 0.18),
    transparent 58%),
    radial-gradient(900px 520px at 82% 16%,
            rgba(20, 184, 166, 0.14),
            transparent 62%),
    linear-gradient(180deg,
            rgba(10, 15, 22, 1),
            rgba(11, 21, 24, 1));
}

/* Optional: dein Spotlight – aber "ruhig" */
.spotlight {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(700px 500px at 50% 25%,
    rgba(80, 140, 255, 0.12),
    transparent 60%);
    filter: blur(0.2px);
}

/* ========== Card ========== */
.login-container {
    width: min(420px, 100%);
    border-radius: 18px;
    padding: 28px 26px 22px;
    position: relative;
    z-index: 1;

    /* glass */
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow:
            0 18px 45px rgba(0,0,0,0.10),
            0 2px 6px rgba(0,0,0,0.06);
}

html[data-theme="dark"] .login-container {
    background: rgba(30, 30, 34, 0.72);
    border-color: rgba(255,255,255,0.10);
    box-shadow:
            0 20px 60px rgba(0,0,0,0.55),
            0 2px 8px rgba(0,0,0,0.40);
}

.login-container--nbh {
    border-color: rgba(15, 118, 110, 0.16);
}

.login-container--selection {
    width: min(560px, 100%);
}

/* ========== Header ========== */
.glass-logo {
    display: grid;
    place-items: center;
    margin-bottom: 10px;
    width: 88px;
    height: 88px;
    margin-left: auto;
    margin-right: auto;
}

.glass-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 8px 18px rgba(0,0,0,0.12));
    transition: transform .16s ease, opacity .16s ease;
    display: block;
}

.login-title {
    margin: 6px 0 0;
    text-align: center;
    font-size: 1.55rem;
    letter-spacing: -0.02em;
    font-weight: 750;
}

.login-subtitle {
    margin: 6px 0 18px;
    text-align: center;
    font-size: .95rem;
    opacity: .70;
}

/* ========== Form ========== */
.login-form {
    display: grid;
    gap: 14px;
}

.login-form--account-help {
    gap: 12px;
}

.login-field {
    display: grid;
    gap: 6px;
}

.login-field label {
    margin: 0;
    font-size: .85rem;
    font-weight: 550;
    opacity: .78;
}

.login-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0;
    font-weight: 550;
    opacity: .78;
}

.login-toggle input {
    margin: 0;
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 1px solid var(--app-border);
    accent-color: var(--app-primary, #2563eb);
    cursor: pointer;
}

.login-toggle--disabled {
    opacity: .52;
}

.login-toggle input:disabled {
    cursor: not-allowed;
}

.login-field input {
    box-sizing: border-box;
    height: 44px;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid var(--app-border);
    font-size: 1rem;
    line-height: 1.2;
    background: rgba(255,255,255,0.90);
    color: var(--app-text);
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease, transform .06s ease;
}

.login-form--account-help .login-field {
    gap: 5px;
}

.login-form--account-help .login-field label {
    font-size: .82rem;
}

.login-form--account-help .login-field input {
    height: 38px;
    padding: 7px 12px;
    border-radius: 10px;
    font-size: .96rem;
}

.login-form--account-help input[name="Input.Token"] {
    font-size: .89rem;
    letter-spacing: -0.01em;
}

.login-field input::placeholder {
    opacity: .55;
}

.login-field input:focus {
    border-color: var(--app-primary);
    box-shadow: 0 0 0 4px var(--app-focus);
    background: rgba(255,255,255,0.98);
}

.login-field input:active {
    transform: scale(0.995);
}

.login-field input:disabled {
    cursor: not-allowed;
    opacity: .68;
    background: rgba(226, 232, 240, 0.55);
}

html[data-theme="dark"] .login-field input {
    background: rgba(18,18,20,0.55);
    color: var(--app-text);
    border-color: rgba(255,255,255,0.14);
}

html[data-theme="dark"] .login-field input:focus {
    background: rgba(18,18,20,0.75);
}

html[data-theme="dark"] .login-field input:disabled {
    background: rgba(15, 23, 42, 0.45);
}

.login-field-note {
    font-size: .8rem;
    line-height: 1.35;
    opacity: .68;
}

/* validation */
.login-validation {
    font-size: .82rem;
    color: rgba(185, 28, 28, 0.95);
}

html[data-theme="dark"] .login-validation {
    color: rgba(248, 113, 113, 0.95);
}

/* ========== Button ========== */
.login-button {
    width: 100%;
    height: 46px;
    margin-top: 6px;
    border-radius: 12px;
    border: none;
    background: var(--app-primary) !important;
    color: var(--app-on-primary);
    font-size: 1rem;
    font-weight: 650;
    cursor: pointer;
    transition: transform .06s ease, filter .2s ease, box-shadow .2s ease;
    box-shadow: 0 10px 22px rgba(0,0,0,0.10);
}

.login-button:hover {
    filter: brightness(0.96);
}

.login-button:active {
    transform: translateY(1px) scale(0.99);
    filter: brightness(0.94);
}

.login-button-link {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

/* ========== Login choice ========== */
.login-choice-list {
    display: grid;
    gap: 12px;
}

.login-choice {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    min-height: 72px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.10);
    background: rgba(255, 255, 255, 0.58);
    color: var(--app-text);
    text-decoration: none;
    transition: border-color .15s ease, background-color .15s ease, transform .08s ease, box-shadow .15s ease;
}

.login-choice:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.login-choice:focus-visible {
    outline: none;
    border-color: var(--app-primary);
    box-shadow: 0 0 0 4px var(--app-focus);
}

.login-choice strong,
.login-choice small,
.login-choice b {
    display: block;
}

.login-choice strong {
    font-size: 1rem;
    font-weight: 750;
}

.login-choice small {
    margin-top: 4px;
    font-size: .85rem;
    line-height: 1.35;
    opacity: .68;
}

.login-choice b {
    color: var(--app-primary, #2563eb);
    font-size: .88rem;
    font-weight: 720;
    white-space: nowrap;
}

.login-choice--nbh b {
    color: #0f766e;
}

html[data-theme="dark"] .login-choice {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(15, 23, 42, 0.34);
}

html[data-theme="dark"] .login-choice:hover {
    background: rgba(15, 23, 42, 0.48);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.28);
}

html[data-theme="dark"] .login-choice--nbh b {
    color: #5eead4;
}

/* ========== Error ========== */
.api-error-container {
    text-align: center;
    padding: 10px 0;
}

.api-error-icon {
    color: #dc2626;
    margin-bottom: 16px;
    opacity: 0.9;
}

.api-error-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.api-error-text {
    font-size: 0.95rem;
    opacity: 0.8;
    line-height: 1.5;
    margin-bottom: 24px;
}

html[data-theme="dark"] .api-error-icon {
    color: #f87171;
}

.login-error {
    background: rgba(220, 38, 38, 0.08);
    color: rgba(185, 28, 28, 0.95);
    padding: 10px 12px;
    border-radius: 12px;
    margin: 0 0 14px;
    font-size: .9rem;
    border: 1px solid rgba(220, 38, 38, 0.18);
}

html[data-theme="dark"] .login-error {
    background: rgba(248, 113, 113, 0.10);
    color: rgba(254, 202, 202, 0.95);
    border-color: rgba(248, 113, 113, 0.22);
}

.login-success,
.login-info-box {
    padding: 10px 12px;
    border-radius: 12px;
    font-size: .9rem;
    line-height: 1.5;
}

.login-success {
    background: rgba(22, 163, 74, 0.08);
    color: rgba(21, 128, 61, 0.95);
    border: 1px solid rgba(22, 163, 74, 0.18);
    margin: 0 0 14px;
}

.login-info-box {
    margin: 0 0 14px;
    background: rgba(37, 99, 235, 0.08);
    color: rgba(30, 64, 175, 0.95);
    border: 1px solid rgba(37, 99, 235, 0.14);
}

.login-info-box strong,
.login-info-box span {
    display: block;
}

.login-info-box span {
    margin-top: 4px;
}

html[data-theme="dark"] .login-success {
    background: rgba(74, 222, 128, 0.10);
    color: rgba(220, 252, 231, 0.95);
    border-color: rgba(74, 222, 128, 0.20);
}

html[data-theme="dark"] .login-info-box {
    background: rgba(59, 130, 246, 0.12);
    color: rgba(191, 219, 254, 0.96);
    border-color: rgba(96, 165, 250, 0.18);
}

.login-support-links {
    margin-top: 8px;
    text-align: center;
}

.login-support-link {
    font-size: .88rem;
    color: var(--app-primary, #2563eb);
    text-decoration: none;
}

.login-support-link:hover {
    text-decoration: underline;
}

/* ========== Footer (unten, aber ruhig) ========== */
.login-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 14px;
    text-align: center;
    font-size: .85rem;
    opacity: .60;
    z-index: 1;
    pointer-events: none;
}

.login-dev-panel {
    display: grid;
    gap: 12px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(15, 23, 42, 0.10);
}

.login-dev-eyebrow {
    margin-bottom: 4px;
    color: var(--app-primary, #2563eb);
    font-size: .72rem;
    font-weight: 750;
    letter-spacing: 0;
    text-transform: uppercase;
}

.login-dev-panel strong {
    display: block;
    font-size: .94rem;
}

.login-dev-panel p {
    margin: 5px 0 0;
    font-size: .82rem;
    line-height: 1.45;
    opacity: .72;
}

.login-dev-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.login-dev-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 8px 12px;
    border-radius: 10px;
    background: rgba(37, 99, 235, 0.10);
    color: var(--app-primary, #2563eb);
    font-size: .88rem;
    font-weight: 650;
    text-decoration: none;
}

.login-dev-button:hover {
    background: rgba(37, 99, 235, 0.16);
}

.login-dev-link {
    font-size: .85rem;
    color: var(--app-muted-text, #64748b);
    text-decoration: none;
}

.login-dev-link:hover {
    text-decoration: underline;
}

html[data-theme="dark"] .login-dev-panel {
    border-top-color: rgba(255, 255, 255, 0.12);
}

html[data-theme="dark"] .login-dev-button {
    background: rgba(96, 165, 250, 0.14);
}

html[data-theme="dark"] .login-dev-button:hover {
    background: rgba(96, 165, 250, 0.20);
}

/* Mobile: Footer nicht in den Button laufen lassen */
@media (max-height: 720px) {
    .login-footer { position: static; margin-top: 14px; }
}

@media (max-width: 560px) {
    .login-choice {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}
