/* Login + Register pages.
 *
 * Deliberately avoids MDB's .md-form floating labels and <input type="submit" class="btn">: MDB's Waves.js
 * wraps a submit <input> in an <i> that takes over the button styling, so the big visible button was only
 * clickable in a small patch in the middle (~15% of its area). A real <button> is styled in place instead.
 *
 * Accent colour is the site's brand green - the same #007e33 as the top navigation bar.
 */

.auth-page {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    /* Bottom padding clears the absolutely-positioned site footer (style.css .footer). */
    padding: 40px 16px 120px;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: #ffffff;
    border-radius: 10px;
    border-top: 4px solid #007e33;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.10);
    padding: 40px 40px 32px;
}

.auth-card h1 {
    font-size: 28px;
    font-weight: 400;
    margin: 0 0 6px;
    color: #212529;
}

.auth-subtitle {
    color: #6c757d;
    font-size: 15px;
    margin-bottom: 28px;
}

.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 20px;
}

.auth-alert.error {
    background: #fdecea;
    color: #a4282b;
    border: 1px solid #f5c2c0;
}

.auth-alert.success {
    background: #e8f5e9;
    color: #1b5e20;
    border: 1px solid #b9dfbc;
}

.auth-alert i {
    margin-top: 2px;
}

.auth-field {
    margin-bottom: 18px;
}

.auth-field label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #343a40;
    margin-bottom: 6px;
}

.auth-label-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 6px;
}

.auth-label-row label {
    margin-bottom: 0;
}

.auth-forgot {
    font-size: 13px;
    color: #007e33;
}

.auth-forgot:hover {
    color: #006a2b;
}

.auth-input-wrap {
    position: relative;
}

.auth-input-wrap > .auth-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9aa1a8;
    font-size: 15px;
    pointer-events: none;
}

.auth-input {
    display: block;
    width: 100%;
    height: 48px;
    padding: 0 44px 0 42px;
    font-size: 16px; /* 16px stops iOS Safari zooming the page when the field is focused */
    color: #212529;
    background: #ffffff;
    border: 1px solid #ced4da;
    border-radius: 6px;
    box-shadow: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-input:focus {
    outline: none;
    border-color: #007e33;
    box-shadow: 0 0 0 3px rgba(0, 126, 51, 0.16);
}

.auth-input-wrap:focus-within > .auth-icon {
    color: #007e33;
}

.auth-hint {
    display: block;
    font-size: 12px;
    color: #868e96;
    margin-top: 6px;
}

/* Show / hide password. style.css gives every <button> vertical margins, so reset them here. */
.auth-toggle {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
    width: 40px;
    height: 40px;
    border: 0;
    background: transparent;
    color: #9aa1a8;
    border-radius: 6px;
    cursor: pointer;
}

.auth-toggle:hover,
.auth-toggle:focus {
    color: #007e33;
    outline: none;
}

.auth-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 52px;
    margin: 26px 0 0;
    border: 0;
    border-radius: 6px;
    background: #007e33;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.3px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 126, 51, 0.28);
    transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.05s ease;
}

.auth-submit:hover,
a.auth-submit:hover {
    color: #ffffff;
}

.auth-submit:hover {
    background: #006a2b;
    box-shadow: 0 6px 16px rgba(0, 126, 51, 0.36);
}

.auth-submit:active {
    transform: translateY(1px);
}

.auth-submit:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 126, 51, 0.35);
}

.auth-submit[disabled] {
    opacity: 0.7;
    cursor: wait;
}

.auth-switch {
    text-align: center;
    margin: 24px 0 0;
    padding-top: 20px;
    border-top: 1px solid #eee;
    font-size: 14px;
    color: #6c757d;
}

.auth-switch a {
    color: #007e33;
    font-weight: 600;
}

@media (max-width: 575px) {
    .auth-page {
        padding: 20px 12px 120px;
    }

    .auth-card {
        padding: 28px 22px 26px;
    }

    .auth-card h1 {
        font-size: 24px;
    }
}
