/* ==========================================================================
   1. SCHRIFTARTEN & MIKROTYPOGRAFIE
   ========================================================================== */
input,
label {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI',
                 Roboto, Helvetica, Arial, sans-serif;
    letter-spacing: 0.15px;
    font-size: 14px;
}

/* ==========================================================================
   2. GLASSMORPHISM-CONTAINER & KARTEN
   ========================================================================== */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.login-card {
    width: 100%;
    max-width: 420px;
    padding: 40px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px) ;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.edit-card,
.add-card {
    max-width: 1100px;
    padding: 40px 50px;
    margin: 40px auto;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.login-title,
.add-title {
    text-align: center;
    margin-bottom: 25px;
}

.add-title {
    font-size: 26px;
}

.register-hint {
    text-align: center;
}

.login-divider {
    margin: 25px 0;
}

.edit-divider {
    width: 100%;
    height: 1px;
    border: none;
    margin: 35px 0 25px 0;
    background: linear-gradient(
        90deg,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0.25) 50%,
        rgba(0, 0, 0, 0) 100%
    );
}

.full-span {
    grid-column: 1 / -1;
}

/* ==========================================================================
   3. EINGABEFELDER, WRAPPER & LABELS
   ========================================================================== */
.input-wrapper {
    position: relative;
    width: 100%;
    padding-top: 12px;
    margin-bottom: 14px;
}

.input-field.glass,
.input-field-image.glass {
    position: relative;
    width: 100%;
    background: rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(22px) saturate(180%);
    -webkit-backdrop-filter: blur(22px) saturate(180%);
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.18);
}

.input-field-image.glass {
    padding-left: 25px;
    padding-top: 8px;
    padding-bottom: 8px;
}

.input-field input,
.input-field textarea,
.input-field select {
    width: 100%;
    padding: 10px 10px 10px 56px;
    font-size: 14px;
    font-weight: 400;
    background: transparent;
    border: none;
    outline: none;
    color: #003366;
    box-sizing: border-box;
}

.input-field select {
    -webkit-appearance: none;
    appearance: none;
}

.input-field textarea {
    min-height: 80px;
    max-height: 95px;
}

.input-field ::placeholder {
    color: rgba(0, 0, 0, 0.4);
    font-style: italic;
}

/* Floating Labels */
.input-field label,
.input-field-image label {
    position: absolute;
    top: -10px;
    left: 35px;
    transform: translateY(-50%);
    font-size: 12px;
    font-weight: 500;
    color: #003366;
    letter-spacing: 0.2px;
    background: rgba(255, 255, 255, 0.28);
    padding: 0 6px;
    border-radius: 6px;
    pointer-events: none;
    transition: all 0.25s ease;
}

/* Icons in Eingabefeldern */
.input-field .input-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.6;
}

.input-field .input-icon svg {
    width: 20px;
    height: 20px;
    fill: #003366;
}

.header-icon {
    display: block;
    width: 40px;
    height: 40px;
}

.icon {
    display: block;
}

.icon16 {
    display: block;
    width: 16px;
    height: 16px;
}

/* ==========================================================================
   4. PASSWORT-REGELN & VALIDIERUNG
   ========================================================================== */
.pw-check {
    margin-top: 10px;
    font-size: 13px;
    color: #555;
}

.rule {
    margin: 4px 0;
}

.rule.ok {
    color: #4cb050;
    font-weight: bold;
}

.error-msg {
    margin-top: 15px;
    color: #d9534f;
    font-weight: bold;
    text-align: center;
}

/* ==========================================================================
   5. BUTTONS IM APPLE- & GLAS-STIL
   ========================================================================== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
    width: 100%;
    padding: 14px;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    color: #ffffff;
    background-color: #2d3748;
    background: -webkit-linear-gradient(bottom right, #4a5568, #2d3748);
    background: linear-gradient(135deg, #4a5568, #2d3748);
    box-shadow: 0 4px 12px rgba(45, 55, 72, 0.25);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    color: #ffffff;
    background-color: #374151;
    background: -webkit-linear-gradient(bottom right, #5a657d, #374151);
    background: linear-gradient(135deg, #5a657d, #374151);
    box-shadow: 0 6px 18px rgba(45, 55, 72, 0.35);
}

@supports not (backdrop-filter: blur(10px)) {
    .btn-primary {
        background-color: #2d3748;
        border: 2px solid #a0aec0;
        box-shadow: 0 0 0 1px #fff, 0 4px 12px rgba(0, 0, 0, 0.5);
    }
}

.btn-secondary {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    width: 100%;
    padding: 14px;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    background: linear-gradient(135deg, #f7f7f7, #e5e5e5);
    border: 1px solid #ccc;
    color: #333;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #ffffff, #eaeaea);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

.login-btn-glass {
    width: 100%;
    padding: 14px 0;
    margin-top: 20px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI',
                 Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.2px;
    color: #003366;
    background: rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(22px) saturate(180%);
    -webkit-backdrop-filter: blur(22px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.18),
                inset 0 0 0 rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.25s ease;
}

.login-btn-glass:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.35);
    box-shadow: 0 12px 45px rgba(0, 0, 0, 0.22),
                inset 0 0 0 rgba(255, 255, 255, 0.5);
}

.login-btn-glass:active {
    transform: translateY(0);
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
}

.btn-delete {
    display: inline-block;
    padding: 10px;
    font-size: 12px;
    border-radius: 15px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.45);
    color: #003366;
    opacity: 0.85;
    transition: all 0.2s ease;
}

.btn-delete:hover {
    background: rgba(255, 255, 255, 0.55);
    opacity: 1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.btn-delete:active {
    transform: scale(0.97);
}

/* ==========================================================================
   6. BILD-UPLOAD & VORSCHAU
   ========================================================================== */
.upload-wrapper {
    margin-top: 10px;
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.upload-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: center;
}

.upload-left {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.upload-preview {
    display: flex;
    justify-content: center;
    align-items: center;
}

.upload-preview img {
    max-width: 180px;
    max-height: 180px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#preview {
    margin-top: 10px;
    max-width: 150px;
    border-radius: 10px;
    display: none;
}

#remove-image {
    display: none;
}

/* ==========================================================================
   7. FORMULAR-GRIDS & DESKTOP-LAYOUT
   ========================================================================== */
.add-grid {
    display: grid;
    grid-template-columns: 1fr;
}

.add-grid.single-column {
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .edit-form-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 30px 40px;
    }

    .edit-form-grid .input-wrapper {
        margin-bottom: 0;
    }
}

/* ==========================================================================
   8. RESPONSIVE DESIGN (MEDIA QUERIES)
   ========================================================================== */

/* Tablet (<= 1024px) */
@media (max-width: 1024px) {
    .login-card {
        padding: 30px;
        border-radius: 20px;
    }
}

/* Mobile (<= 768px) */
@media (max-width: 768px) {
    .login-card {
        padding: 24px;
        border-radius: 16px;
    }

    .input-wrapper input {
        padding: 13px 46px;
        font-size: 15px;
    }

    .upload-grid {
        grid-template-columns: 1fr;
    }
}

/* Smartphone Portrait (<= 480px) */
@media (max-width: 480px) {
    .login-card,
    .edit-card,
    .add-card {
        padding: 20px;
        max-width: 100%;
        border-radius: 12px;
    }

    .input-wrapper input {
        padding: 12px 44px;
        font-size: 15px;
    }
}
