/* HOW TO READ THIS FILE:
   1. Variables are stored in :root.
   2. General rules style common HTML elements.
   3. Section rules style specific parts of the page.
   4. @media rules make the page responsive on smaller screens.
   ========================================= */

/* =========================================
   NJANGI TRACKER - AUTH PAGES
   ========================================= */

.auth-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 8% 25%, rgba(23, 107, 77, 0.09), transparent 28%),
        linear-gradient(135deg, #f8faf9 0%, #ffffff 65%, #eef7f2 100%);
}

.auth-page .header {
    position: relative;
}

.back-link {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 600;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: var(--primary);
}

.auth-main {
    min-height: calc(100vh - 76px);
    display: flex;
    align-items: center;
    padding: 65px 0;
}

.auth-container {
    width: min(92%, 1040px);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 0.9fr 0.75fr;
    gap: 80px;
    align-items: center;
}

.auth-intro h1 {
    max-width: 500px;
    margin-top: 20px;
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1.06;
    letter-spacing: -2.5px;
}

.auth-intro h1 span {
    color: var(--primary);
}

.auth-intro > p {
    max-width: 500px;
    margin-top: 20px;
    color: var(--muted);
    font-size: 0.98rem;
}

.auth-benefits {
    display: grid;
    gap: 13px;
    margin-top: 30px;
}

.auth-benefits div {
    display: flex;
    align-items: center;
    gap: 11px;
    color: #45534c;
    font-size: 0.82rem;
    font-weight: 600;
}

.auth-benefits span {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    border-radius: 9px;
    color: var(--primary);
    background: var(--primary-light);
    font-size: 0.64rem;
    font-weight: 800;
}

.auth-card {
    padding: 34px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow);
}

.auth-card-heading h2 {
    font-size: 1.45rem;
    letter-spacing: -0.7px;
}

.auth-card-heading p {
    margin-top: 5px;
    color: var(--muted);
    font-size: 0.78rem;
}

.auth-card form {
    margin-top: 25px;
}

.form-group {
    margin-bottom: 17px;
}

.form-group label,
.label-row label {
    display: block;
    margin-bottom: 7px;
    color: #3c4842;
    font-size: 0.75rem;
    font-weight: 700;
}

.label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.label-row label {
    margin-bottom: 7px;
}

.label-row a {
    margin-bottom: 7px;
    color: var(--primary);
    font-size: 0.68rem;
    font-weight: 700;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="number"],
.form-group select,
.password-wrap input {
    width: 100%;
    height: 46px;
    padding: 0 13px;
    border: 1px solid #dce4df;
    border-radius: 10px;
    outline: none;
    color: var(--text);
    background: #fbfcfb;
    font: inherit;
    font-size: 0.8rem;
    transition: 0.2s ease;
}

.form-group input:focus {
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(23, 107, 77, 0.08);
}

.form-group input.input-error {
    border-color: #c44f4f;
}

.password-wrap {
    position: relative;
}

.password-wrap input {
    padding-right: 58px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 9px;
    transform: translateY(-50%);
    border: 0;
    color: var(--primary);
    background: transparent;
    cursor: pointer;
    font: inherit;
    font-size: 0.68rem;
    font-weight: 800;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 5px 0 19px;
    color: var(--muted);
    font-size: 0.7rem;
    cursor: pointer;
}

.checkbox-row input {
    width: 15px;
    height: 15px;
    accent-color: var(--primary);
}

.terms-row {
    margin-bottom: 3px;
}

.error-message {
    display: block;
    min-height: 0;
    margin-top: 4px;
    color: #b13e3e;
    font-size: 0.64rem;
}

.auth-submit {
    width: 100%;
    border: 0;
    cursor: pointer;
    font-family: inherit;
}

.form-message {
    min-height: 18px;
    margin-top: 10px;
    text-align: center;
    font-size: 0.7rem;
    font-weight: 600;
}

.form-message.success {
    color: var(--primary);
}

.form-message.error {
    color: #b13e3e;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 22px 0;
    color: #a0aaa4;
    font-size: 0.62rem;
    font-weight: 700;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    height: 1px;
    flex: 1;
    background: var(--border);
}

.switch-auth {
    color: var(--muted);
    text-align: center;
    font-size: 0.72rem;
}

.switch-auth a {
    color: var(--primary);
    font-weight: 800;
}

.password-strength {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    margin-top: 7px;
}

.password-strength span {
    height: 3px;
    border-radius: 99px;
    background: #dce3df;
    transition: background 0.2s ease;
}

.strength-text {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 0.62rem;
}

@media (max-width: 850px) {
    .auth-container {
        grid-template-columns: 1fr;
        max-width: 560px;
        gap: 40px;
    }

    .auth-intro {
        text-align: center;
    }

    .auth-intro .badge {
        margin-left: auto;
        margin-right: auto;
    }

    .auth-intro h1,
    .auth-intro > p {
        margin-left: auto;
        margin-right: auto;
    }

    .auth-benefits {
        width: fit-content;
        margin-left: auto;
        margin-right: auto;
        text-align: left;
    }
}

@media (max-width: 520px) {
    .auth-main {
        padding: 40px 0 55px;
    }

    .auth-card {
        padding: 25px 20px;
        border-radius: 17px;
    }

    .back-link {
        font-size: 0.7rem;
    }
}
