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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    background: linear-gradient(135deg, #f5e6d3 0%, #d8c9b6 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    color: #2c2418;
}

.card {
    background: white;
    padding: 2.5rem 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 380px;
}

h1 {
    font-size: 1.4rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: #2c2418;
}

.subtitle {
    color: #7a6e5d;
    font-size: 0.875rem;
    margin-bottom: 1.75rem;
}

form { display: flex; flex-direction: column; gap: 1rem; }

label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

label span {
    font-size: 0.8rem;
    color: #5a4f40;
    font-weight: 500;
}

input[type="text"], input[type="password"] {
    padding: 0.65rem 0.85rem;
    border: 1px solid #d8c9b6;
    border-radius: 6px;
    font-size: 1rem;
    background: #fafaf7;
    transition: border-color 0.15s, background 0.15s;
    width: 100%;
}

input[type="text"]:focus, input[type="password"]:focus {
    outline: none;
    border-color: #8b7355;
    background: white;
}

.password-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrap input {
    padding-right: 3rem;
    letter-spacing: 0.02em; /* etwas lesbarer wenn revealed */
}

.toggle-password {
    /* 44x44 touch target (Apple/Google guideline), Icon ist visuell mittiger 20x20 */
    position: absolute;
    right: 2px;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    color: #9c8d78;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: color 0.15s, background 0.15s;
}

.toggle-password:hover {
    color: #5a4f40;
    background: rgba(0,0,0,0.04);
}

.toggle-password:active {
    background: rgba(0,0,0,0.08);
}

.toggle-password:focus-visible {
    outline: 2px solid #8b7355;
    outline-offset: -2px;
}

.eye-icon {
    width: 20px;
    height: 20px;
    display: none;
}

/* aria-pressed = false → Passwort ist hidden → "show eye" zeigen */
.toggle-password[aria-pressed="false"] .eye-show { display: block; }
.toggle-password[aria-pressed="true"]  .eye-hide { display: block; }

/* Wenn revealed: subtile Andeutung am Input dass es offen ist */
.toggle-password[aria-pressed="true"] {
    color: #8b7355;
}

button {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: #8b7355;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
}

button:hover { background: #6f5b42; }
button:active { background: #574630; }

.error {
    margin-top: 1rem;
    padding: 0.6rem 0.75rem;
    background: #fbe4e4;
    color: #9b2c2c;
    border-radius: 4px;
    font-size: 0.875rem;
}

.footer {
    margin-top: 1.5rem;
    font-size: 0.75rem;
    color: #9c8d78;
    text-align: center;
}

.footer a {
    color: #7a6e5d;
    text-decoration: none;
}

.footer a:hover { text-decoration: underline; }
