/* =========================================
   AUTHENTICATION
   ========================================= */

.auth-page {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 40px;
    background: #FAFAF7;
}

.auth-card {
    width: 100%;
    max-width: 460px;
    box-sizing: border-box;
    padding: 40px;

    background: #FFFFFF;
    border: 1px solid #E5E8E6;
    border-radius: 16px;
}


/* =========================================
   HEADER
   ========================================= */

.auth-header {
    margin-bottom: 28px;
}

.auth-header h1 {
    margin: 0 0 8px;

    color: #083F36;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
}

.auth-header p {
    margin: 0;

    color: #66706D;
    font-size: 15px;
    line-height: 1.5;
}


/* =========================================
   CRISPY FORM
   ========================================= */

.auth-form {
    display: flex;
    flex-direction: column;
}

.auth-form .mb-3 {
    margin-bottom: 18px !important;
}

.auth-form label {
    display: block;
    margin-bottom: 7px;

    color: #171A19;
    font-size: 14px;
    font-weight: 600;
}

.auth-form input,
.auth-form select,
.auth-form textarea {
    width: 100%;
    box-sizing: border-box;

    padding: 12px 14px;

    border: 1px solid #E5E8E6;
    border-radius: 8px;

    background: #FFFFFF;
    color: #171A19;

    font-family: inherit;
    font-size: 15px;

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.auth-form input::placeholder {
    color: #66706D;
}

.auth-form input:focus,
.auth-form select:focus,
.auth-form textarea:focus {
    border-color: #0F5B4D;

    box-shadow:
        0 0 0 3px rgba(15, 91, 77, 0.10);
}


/* =========================================
   HELP TEXT
   ========================================= */

.auth-form .form-text {
    margin-top: 6px;

    color: #66706D;
    font-size: 13px;
    line-height: 1.4;
}


/* =========================================
   ERRORS
   ========================================= */

.auth-form .invalid-feedback,
.auth-form .errorlist {
    display: block;

    margin-top: 6px;
    padding: 0;

    color: #C24141;
    font-size: 13px;
    line-height: 1.4;

    list-style: none;
}

.auth-form input.is-invalid,
.auth-form select.is-invalid {
    border-color: #C24141;
}


/* =========================================
   BUTTON
   ========================================= */

.auth-button {
    width: 100%;
    margin-top: 4px;

    padding: 13px 18px;

    border: none;
    border-radius: 8px;

    background: #0F5B4D;
    color: #FFFFFF;

    font-family: inherit;
    font-size: 15px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background 0.2s ease,
        transform 0.1s ease;
}

.auth-button:hover {
    background: #083F36;
}

.auth-button:active {
    transform: translateY(1px);
}


/* =========================================
   LINKS
   ========================================= */

.auth-link {
    color: #0F5B4D;
    font-weight: 600;
    text-decoration: none;
}

.auth-link:hover {
    text-decoration: underline;
}


/* =========================================
   FOOTER
   ========================================= */

.auth-footer {
    margin-top: 24px;

    text-align: center;

    color: #66706D;
    font-size: 14px;
    line-height: 1.5;
}


/* =========================================
   MESSAGES
   ========================================= */

.auth-messages {
    margin-bottom: 20px;
}

.auth-message {
    padding: 12px 14px;

    border-radius: 8px;

    font-size: 14px;
    line-height: 1.4;
}

.auth-message.success {
    background: #EAF6F1;
    color: #16845B;
}

.auth-message.error {
    background: #FDEEEE;
    color: #C24141;
}

.auth-message.warning {
    background: #FFF7E6;
    color: #B7791F;
}

.auth-message.info {
    background: #EEF6F5;
    color: #0F5B4D;
}


/* =========================================
   RESPONSIVE
   ========================================= */

@media (max-width: 500px) {

    .auth-page {
        padding: 28px 16px;
    }

    .auth-card {
        padding: 28px 22px;
        border-radius: 12px;
    }

    .auth-header h1 {
        font-size: 25px;
    }

    .auth-header p {
        font-size: 14px;
    }

    .auth-form .mb-3 {
        margin-bottom: 16px !important;
    }
}

.terms-card {
    width: 100%;
    max-width: 760px;
}

.terms-content {
    margin: 24px 0;
}

.terms-content h2 {
    margin: 22px 0 8px;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
}

.terms-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
}

.terms-version {
    margin-top: 20px;
    font-size: 0.8rem !important;
}

.terms-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
    color: var(--text-primary);
    font-size: 0.9rem;
    line-height: 1.6;
}

.terms-checkbox input {
    flex-shrink: 0;
    margin-top: 5px;
    accent-color: var(--brand-primary);
}

.terms-error {
    margin: 16px 0;
    color: var(--status-error);
    font-size: 0.9rem;
}

/* Terms and Conditions Form */
.terms-card .auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.terms-card .terms-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    margin: 0;
    position: static;
}

.terms-card .terms-checkbox input[type="checkbox"] {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    margin: 4px 0 0;
    padding: 0;
    position: static;
    appearance: auto;
    accent-color: var(--brand-primary);
}

.terms-card .terms-checkbox span {
    flex: 1;
    min-width: 0;
    line-height: 1.6;
}

.terms-card .auth-button {
    display: block;
    position: static;
    width: 100%;
    margin: 0;
}