/* ==========================================================
   GLOBAL RESET
========================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
    font-size: 16px;
}

body {
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;

    background-color: #020617;
    background-image:
        radial-gradient(circle at top left, rgba(99,102,241,0.25), transparent 40%),
        radial-gradient(circle at bottom right, rgba(34,211,238,0.25), transparent 40%);

    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    color: #f8fafc;

    padding: 16px;
}

/* ==========================================================
   LOGIN CONTAINER
========================================================== */
.login-container {
    width: 100%;
    max-width: 420px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ==========================================================
   LOGIN CARD
========================================================== */
.login-card {
    width: 100%;
    background-color: rgba(255,255,255,0.06);

    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.12);

    padding: 28px;

    backdrop-filter: blur(16px);

    box-shadow:
        0 20px 60px rgba(0,0,0,0.55);

    display: flex;
    flex-direction: column;
}

/* ==========================================================
   HEADER
========================================================== */
.login-header {
    width: 100%;
    text-align: center;
    margin-bottom: 28px;
}

.login-header h2 {
    font-size: 1.9rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 6px;
}

.login-header p {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.65);
}

/* ==========================================================
   FORM
========================================================== */
.login-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* ==========================================================
   FORM GROUP
========================================================== */
.form-group {
    width: 100%;
}

/* ==========================================================
   INPUT WRAPPER
========================================================== */
.input-wrapper {
    position: relative;
    width: 100%;
}

/* ==========================================================
   INPUT FIELD
========================================================== */
.input-wrapper input {
    width: 100%;
    height: 52px;

    padding-left: 14px;
    padding-right: 14px;

    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.2);

    background-color: rgba(255,255,255,0.05);

    color: #ffffff;
    font-size: 16px;

    outline: none;
}

.input-wrapper input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99,102,241,0.35);
}

/* ==========================================================
   LABEL (STATIC – KEINE FLOAT BUGS)
========================================================== */
.input-wrapper label {
    position: absolute;
    top: -9px;
    left: 12px;

    padding-left: 6px;
    padding-right: 6px;

    font-size: 12px;
    line-height: 1;

    background-color: #020617;
    color: rgba(255,255,255,0.7);

    pointer-events: none;
}

/* ==========================================================
   PASSWORD WRAPPER
========================================================== */
.password-wrapper {
    position: relative;
}

/* ==========================================================
   PASSWORD TOGGLE
========================================================== */
.password-toggle {
    position: absolute;
    top: 50%;
    right: 12px;

    transform: translateY(-50%);

    background: none;
    border: none;

    font-size: 18px;
    color: rgba(255,255,255,0.6);

    cursor: pointer;
}

.password-toggle:active {
    transform: translateY(-50%) scale(0.9);
}

/* ==========================================================
   BUTTON
========================================================== */
.btn {
    width: 100%;
    height: 54px;

    border-radius: 14px;
    border: none;

    background: linear-gradient(
        135deg,
        #6366f1,
        #22d3ee
    );

    color: #ffffff;
    font-size: 16px;
    font-weight: 600;

    cursor: pointer;
}

.btn:active {
    transform: scale(0.97);
}

/* ==========================================================
   ALERTS
========================================================== */
.alert {
    width: 100%;
    padding: 12px;

    border-radius: 12px;
    font-size: 14px;
    text-align: center;
}

.alert.error {
    background-color: rgba(239,68,68,0.18);
    color: #f87171;
}

/* ==========================================================
   POPUP OVERLAY
========================================================== */
.popup {
    position: fixed;
    inset: 0;

    display: flex;
    justify-content: center;
    align-items: center;

    background-color: rgba(0,0,0,0.75);
    z-index: 9999;
}

/* ==========================================================
   POPUP CONTENT
========================================================== */
.popup-content {
    width: 90%;
    max-width: 360px;

    background-color: #020617;

    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.15);

    padding: 22px;

    text-align: center;
}

.popup-content h2 {
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.popup-content p {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.7);
    line-height: 1.4;
}

/* ==========================================================
   MOBILE OPTIMIERUNG
========================================================== */
@media (max-width: 480px) {

    body {
        padding: 12px;
    }

    .login-card {
        padding: 22px;
    }

    .btn {
        font-size: 17px;
        height: 56px;
    }
}