/* Login-/Registrierungs-Screen — GLOBAL, damit /login (LoginPage in MainLayout)
   und /register (Register in EmptyLayout) exakt identisch aussehen. Vorher lagen
   diese Regeln in den inline-<style>-Bloecken von MainLayout.razor (Rahmen) und
   LoginPage.razor (Karte) und griffen dadurch NICHT auf /register. */

.login-background {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, #060D1A 0%, #0A1526 55%, #0E2647 100%);
    position: relative;
    overflow: hidden;
}

.login-background::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(56,189,248,0.16) 0%, transparent 60%);
    animation: rotate 30s linear infinite;
}

.login-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.06;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='%23ffffff'%3E%3Crect x='10' y='10' width='24' height='30' rx='3' /%3E%3Crect x='14' y='16' width='16' height='2' rx='1' /%3E%3Crect x='14' y='22' width='12' height='2' rx='1' /%3E%3Crect x='14' y='28' width='8' height='2' rx='1' /%3E%3Crect x='50' y='12' width='16' height='16' rx='3' /%3E%3Cpath d='M54 20 L58 24 L62 16' stroke='%2338BDF8' stroke-width='2' fill='none' /%3E%3Crect x='80' y='8' width='28' height='35' rx='3' /%3E%3Crect x='84' y='14' width='20' height='2' rx='1' /%3E%3Crect x='84' y='20' width='16' height='2' rx='1' /%3E%3Crect x='84' y='26' width='12' height='2' rx='1' /%3E%3Crect x='84' y='32' width='18' height='2' rx='1' /%3E%3Crect x='45' y='55' width='2' height='40' rx='1' opacity='0.5' /%3E%3Crect x='75' y='55' width='2' height='40' rx='1' opacity='0.5' /%3E%3Crect x='12' y='60' width='14' height='14' rx='2' fill='none' stroke='%23ffffff' stroke-width='2' /%3E%3Crect x='52' y='58' width='18' height='22' rx='2' /%3E%3Crect x='55' y='63' width='12' height='2' rx='1' opacity='0.7' /%3E%3Crect x='55' y='68' width='8' height='2' rx='1' opacity='0.7' /%3E%3Ccircle cx='88' cy='65' r='3' /%3E%3Ccircle cx='97' cy='65' r='3' /%3E%3Ccircle cx='106' cy='65' r='3' opacity='0.4' /%3E%3Crect x='82' y='78' width='26' height='18' rx='2' /%3E%3Crect x='86' y='83' width='18' height='2' rx='1' opacity='0.7' /%3E%3Crect x='86' y='88' width='12' height='2' rx='1' opacity='0.7' /%3E%3Cpath d='M18 95 L24 101 L34 88' stroke='%23ffffff' stroke-width='3' fill='none' stroke-linecap='round' stroke-linejoin='round' /%3E%3C/g%3E%3C/svg%3E");
    background-size: 120px 120px;
    pointer-events: none;
}

.login-container {
    z-index: 1;
    animation: slideUp 0.5s ease-out;
    width: 100%;
    max-width: 450px;
    padding: 0 20px;
}

.legal-links {
    position: absolute;
    bottom: 18px;
    left: 0;
    right: 0;
    z-index: 1;
    text-align: center;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.55);
}

.legal-links a {
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    margin: 0 8px;
}

.legal-links a:hover {
    color: #fff;
    text-decoration: underline;
}

.login-card {
    /* Auf schmalen Handys schrumpfen statt überlaufen/abgeschnitten werden (kein festes min-width). */
    width: 100% !important;
    max-width: 400px !important;
    border-radius: 16px !important;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95) !important;
}

.logo-container {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: #0A1526;
    border: 1px solid rgba(56, 189, 248, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(56, 189, 248, 0.18);
}

.logo-icon {
    font-size: 40px !important;
    color: white;
}

.brand-title {
    font-weight: 800 !important;
    background: linear-gradient(135deg, #38BDF8 0%, #0284C7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-subtitle {
    color: rgba(0, 0, 0, 0.54);
}

.login-input {
    margin-bottom: 0 !important;
}

/* Die Login-Karte ist immer hell (weiß). Damit die Eingabefelder auch im Dark-Mode
   lesbar bleiben (sonst hellgrauer Rahmen + heller Text auf Weiß = unsichtbar),
   erzwingen wir hier theme-unabhaengig sichtbare Rahmen und dunklen Text/Label. */
.login-card .mud-input-outlined-border {
    border-color: #CBD5E1 !important;
    border-width: 1px !important;
}
.login-card .mud-input-control:hover:not(.mud-disabled) .mud-input-outlined-border {
    border-color: #94A3B8 !important;
}
.login-card .mud-input.mud-focused .mud-input-outlined-border {
    border-color: #0284C7 !important;
    border-width: 2px !important;
}
.login-card .mud-input-root,
.login-card .mud-input-root input {
    color: #0F1D33 !important;
}
.login-card .mud-input-label {
    color: #5B7189 !important;
}
.login-card .mud-input.mud-focused + .mud-input-label,
.login-card .mud-input-label.mud-focused {
    color: #0284C7 !important;
}
.login-card .mud-input-adornment .mud-icon-root {
    color: #5B7189 !important;
}

.error-alert {
    border-radius: 8px !important;
}

.login-button {
    height: 52px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    border-radius: 12px !important;
    background: linear-gradient(135deg, #38BDF8 0%, #0284C7 100%) !important;
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.4) !important;
    transition: all 0.3s ease !important;
}

.login-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(56, 189, 248, 0.5) !important;
}

.login-button:disabled {
    opacity: 0.7;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

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

/* Web-App-(PWA-)Ansicht: Login randlos wie das App-Design — seitliches Padding weg. */
@media all and (display-mode: standalone) {
    .login-container { padding: 0 !important; max-width: 100% !important; }
    .login-card { border-radius: 0 !important; box-shadow: none !important; }
}
