/*
 * Styles fuer Anmeldung, Registrierung und Passwort-Reset.
 * Mobile First: einspaltig bis 480px, ab 640px zwei Spalten fuer Register.
 */

:root {
    --bg: #1d1a16;
    --bg-soft: #262119;
    --surface: #2b251c;
    --border: #4a4033;
    --text: #f3ead8;
    --text-muted: #c8bda9;
    --accent: #d4a86a;
    --accent-dark: #b98c50;
    --error: #ff9b8a;
    --success: #9fd39b;
    --focus: #ffd9a0;
    --radius: 12px;
    --gap: 16px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: "DM Serif Display", Georgia, "Times New Roman", serif;
    font-size: 17px;
    line-height: 1.5;
    overflow-x: hidden;
}

.auth-shell {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    padding: 24px 16px 48px;
}

.auth-card {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 16px 24px;
}

.auth-brand {
    display: inline-block;
    margin-bottom: 12px;
    color: var(--accent);
    font-size: 22px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-decoration: none;
}

.auth-title {
    margin: 0 0 6px;
    font-size: 30px;
    line-height: 1.15;
    font-weight: 400;
}

.auth-subtitle {
    margin: 0 0 20px;
    color: var(--text-muted);
    font-size: 15px;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
}

.auth-tab {
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: transparent;
    color: var(--text-muted);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 15px;
    cursor: pointer;
}

.auth-tab.is-active {
    background: var(--surface);
    border-color: var(--accent);
    color: var(--text);
}

.auth-or {
    margin: 0 0 16px;
    color: var(--text-muted);
    font-size: 13px;
    text-align: center;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.field {
    margin-bottom: var(--gap);
}

.field-label {
    display: block;
    margin-bottom: 6px;
    color: var(--text);
    font-size: 15px;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.field-input {
    display: block;
    width: 100%;
    min-height: 46px;
    padding: 11px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.4;
}

.field-input::placeholder {
    color: #9d9280;
}

.field-hint {
    margin: 6px 0 0;
    color: var(--text-muted);
    font-size: 13px;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.field-check {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    margin-bottom: var(--gap);
    color: var(--text-muted);
    font-size: 15px;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.field-check input {
    width: 20px;
    height: 20px;
    accent-color: var(--accent);
}

.country-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.country-select {
    flex: 1 1 auto;
    min-width: 0;
}

.flag-badge {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 21px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 3px;
    background: var(--surface) center / cover no-repeat;
}

.flag-badge svg {
    display: block;
    width: 28px;
    height: 21px;
}

.btn {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: 12px 16px;
    border-radius: var(--radius);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 16px;
    cursor: pointer;
}

.btn + .btn {
    margin-top: 10px;
}

.btn-primary {
    border: 1px solid var(--accent);
    background: var(--accent);
    color: #201a12;
    font-weight: 600;
}

.btn-primary:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
}

.btn-link {
    border: 1px solid transparent;
    background: transparent;
    color: var(--accent);
    text-decoration: underline;
}

.btn-link:hover {
    color: var(--focus);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-error,
.form-success {
    margin: 0 0 var(--gap);
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 15px;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.form-error {
    border: 1px solid #7a3f34;
    background: #3a211c;
    color: var(--error);
}

.form-success {
    border: 1px solid #3f6b3c;
    background: #1f2f1e;
    color: var(--success);
}

.auth-forgot {
    margin: 18px 0 0;
    text-align: center;
}

.auth-link {
    color: var(--accent);
    font-size: 15px;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.auth-link:hover {
    color: var(--focus);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

[hidden] {
    display: none !important;
}

@media (min-width: 640px) {
    .auth-shell {
        padding-top: 48px;
    }

    .auth-card {
        padding: 28px 28px 32px;
    }

    #panelRegister {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0 var(--gap);
    }

    #panelRegister .field:first-child,
    #panelRegister .field:nth-child(4),
    #panelRegister .btn {
        grid-column: 1 / -1;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}
