:root {
    --bg: rgba(94, 114, 103, 0.10);
    --card: #ffffff;
    --ink: #26332d;
    --muted: #6d786f;
    --line: rgba(94, 114, 103, 0.24);
    --forest: #334c40;
    --forest-deep: #24352d;
    --error-bg: #fbe8e6;
    --error-text: #7f1d1d;
    --warn-bg: #fff3cd;
    --warn-text: #7a5b1a;
    --success-bg: #e9f7ef;
    --success-text: #1f5b34;
    --shadow: 0 14px 34px rgba(34, 43, 37, 0.09);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--bg);
    color: var(--ink);
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

.login-wrap,
.wrap,
.reset-wrap {
    width: 100%;
    max-width: 460px;
}

.signup-wrap {
    width: 100%;
    max-width: 560px;
}

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 30px;
}

h3 {
    margin: 0 0 18px;
    color: var(--forest-deep);
    font-size: 1.45rem;
    letter-spacing: 0.01em;
}

.signup-wrap h3 {
    margin-bottom: 12px;
}

.subhead {
    margin: 0 0 24px;
    color: var(--muted);
    font-size: 0.95rem;
}

.alert {
    border-radius: 12px;
    border: 1px solid transparent;
    padding: 11px 12px;
    margin-bottom: 16px;
    font-size: 0.92rem;
    line-height: 1.35;
}

.alert-danger {
    background: var(--error-bg);
    color: var(--error-text);
    border-color: #f5c6c1;
}

.alert-warning {
    background: var(--warn-bg);
    color: var(--warn-text);
    border-color: #ffe69c;
}

.alert-success {
    background: var(--success-bg);
    color: var(--success-text);
    border-color: #b7e4c7;
}

.alert a {
    color: inherit;
    font-weight: 600;
    text-decoration: underline;
}

.field {
    margin-bottom: 16px;
}

.field:last-of-type {
    margin-bottom: 20px;
}

.field-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 7px;
    font-size: 0.9rem;
    color: var(--forest-deep);
    font-weight: 600;
}

input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    color: var(--ink);
    font-size: 1rem;
    padding: 12px 13px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

input:focus {
    border-color: var(--forest);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(51, 76, 64, 0.15);
}

.btn {
    width: 100%;
    border: 0;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 0.98rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    background: linear-gradient(180deg, #3c564a 0%, #2d4338 100%);
    color: #fff;
    cursor: pointer;
    transition: transform 0.08s ease, box-shadow 0.2s ease, filter 0.2s ease;
    box-shadow: 0 10px 20px rgba(51, 76, 64, 0.24);
}

.btn:hover {
    filter: brightness(1.03);
}

.btn:active {
    transform: translateY(1px);
}

.forgot-link,
.back-link {
    display: inline-block;
    margin-top: 12px;
    font-size: 0.88rem;
}

.forgot-link a,
.back-link a,
.signup-link a,
.help-row a {
    color: var(--forest-deep);
    text-decoration: none;
    font-weight: 600;
}

.forgot-link a:hover,
.back-link a:hover,
.signup-link a:hover,
.help-row a:hover {
    text-decoration: underline;
}

.signup-link {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    font-size: 0.88rem;
    color: var(--muted);
    text-align: center;
}

.help-row {
    margin-top: 14px;
    font-size: 0.88rem;
    color: var(--muted);
    text-align: center;
}

.benefits {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    font-size: 0.88rem;
    color: var(--muted);
    flex-wrap: wrap;
    justify-content: center;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.benefit-check {
    color: var(--forest);
    font-weight: 700;
    font-size: 1rem;
}

@media (max-width: 560px) {
    body {
        padding: 16px;
    }

    .card {
        padding: 22px;
    }

    .field-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .benefits {
        gap: 14px;
        font-size: 0.8rem;
    }

    .benefit-item {
        flex-basis: 100%;
        justify-content: center;
    }

    h3 {
        font-size: 1.25rem;
    }
}
