@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,200..800;1,200..800&display=swap');

.auth-login-body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: #f7f9fc;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    box-sizing: border-box;
    position: relative;
    isolation: isolate;
}

.auth-login-body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    background: radial-gradient(circle at 20% 15%, rgba(0, 103, 71, 0.16), transparent 45%),
        radial-gradient(circle at 85% 85%, rgba(224, 176, 0, 0.16), transparent 35%),
        #f7f9fc;
    pointer-events: none;
}

.auth-page-loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #f7f9fc;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.auth-page-loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.auth-page-loader-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.auth-page-loader-spinner {
    width: 44px;
    height: 44px;
    border: 4px solid #d7e7de;
    border-top-color: #006747;
    border-radius: 50%;
    animation: authSpin 0.8s linear infinite;
}

.auth-page-loader-text {
    margin: 0;
    color: #335b4e;
    font-size: 14px;
    font-weight: 600;
}

@keyframes authSpin {
    to {
        transform: rotate(360deg);
    }
}

.auth-login-container {
    width: 100%;
    max-width: 440px;
}

.auth-login-card {
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid rgba(0, 103, 71, 0.14);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

.auth-login-card h1 {
    margin: 0 0 24px;
    color: rgb(0, 103, 71);
    font-size: 32px;
    line-height: 1.2;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.auth-login-card h1 i {
    margin-right: 0;
}

.auth-login-title-text {
    position: relative;
    top: 1px;
}

.auth-login-challenge {
    margin: 32px 0 32px;
    padding: 12px 12px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(0, 103, 71, 0.08), rgba(224, 176, 0, 0.12));
    border: 1px dashed rgba(0, 103, 71, 0.28);
    color: #1f4e3f;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
}

.auth-login-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
    border-radius: 10px;
    padding: 12px 14px;
    margin: 6px 0 16px;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
}

.auth-login-error-icon {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    width: 18px;
    min-height: 100%;
    font-size: 16px;
    line-height: 1;
}

.auth-login-error-message {
    flex: 1 1 auto;
    min-width: 0;
}

.auth-login-unavailable {
    margin: 6px 0 18px;
    padding: 18px 18px 16px;
    border-radius: 14px;
    border: 1px solid rgba(185, 28, 28, 0.22);
    background: linear-gradient(135deg, rgba(254, 242, 242, 0.98), rgba(254, 226, 226, 0.98));
    color: #7f1d1d;
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.auth-login-unavailable-copy {
    flex: 1 1 auto;
    min-width: 0;
}

.auth-login-unavailable-copy h2 {
    margin: 0 0 6px;
    font-size: 17px;
    line-height: 1.25;
    color: #991b1b;
}

.auth-login-unavailable-copy p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: #7f1d1d;
}

.auth-login-field-group {
    margin-bottom: 14px;
}

.auth-login-field-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: rgb(0, 103, 71);
}

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

.auth-login-input-wrap .auth-field-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #4b7766;
    font-size: 16px;
}

.auth-login-input-wrap input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 48px 12px 48px;
    height: 44px;
    border-radius: 10px;
    border: 1px solid #bdc3c7;
    background: #ecf0f1;
    font-size: 15px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-login-input-wrap input::placeholder {
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.auth-login-input-wrap input:focus {
    border-color: #006747;
    box-shadow: 0 0 0 3px rgba(0, 103, 71, 0.15);
}

.auth-login-input-wrap input.auth-login-input-invalid {
    border-color: #b91c1c;
    box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.12);
}

.auth-password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: #4b7766;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    font-size: 16px;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.auth-password-toggle i {
    position: static;
    top: auto;
    left: auto;
    transform: none;
}

.auth-password-toggle:hover {
    color: #006747;
}

.auth-login-field-error {
    margin: 4px 2px 0;
    color: #b91c1c;
    font-size: 12px;
    display: none;
}

.auth-login-field-error.auth-login-field-error-show {
    display: block;
}

.auth-login-turnstile-wrap {
    margin-top: 22px;
    margin-bottom: 16px;
}

.auth-login-turnstile-wrap .cf-turnstile {
    width: 100%;
}

.auth-login-button {
    width: 100%;
    margin-top: 12px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #006747 0%, #0f7f58 100%);
    color: #ffffff;
    height: 48px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    font-family: 'Plus Jakarta Sans', sans-serif;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-user-drag: none;
}

.auth-login-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(0, 103, 71, 0.2);
}

.auth-login-button:disabled {
    opacity: 0.75;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.auth-login-button i {
    margin-right: 8px;
    pointer-events: none;
    -webkit-user-drag: none;
}

.auth-verify-code-wrap {
    margin-bottom: 10px;
}

.auth-resend-row {
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 24px;
}

.auth-resend-countdown {
    color: #5a7067;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.auth-resend-link {
    border: 0;
    background: transparent;
    padding: 0;
    color: #006747;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
}

.auth-resend-link:disabled {
    color: #7d9188;
    cursor: not-allowed;
    text-decoration-color: transparent;
}

.auth-login-footer {
    margin-top: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #335b4e;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}

.auth-login-footer a {
    color: #006747;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.auth-login-footer a:hover {
    text-decoration: underline;
}

.auth-status-panel {
    margin-bottom: 16px;
    padding: 14px 15px;
    border-radius: 12px;
    border: 1px solid rgba(0, 103, 71, 0.16);
    background: linear-gradient(135deg, rgba(0, 103, 71, 0.08), rgba(224, 176, 0, 0.08));
    color: #1f4e3f;
    font-size: 14px;
    line-height: 1.65;
}

.auth-status-panel strong {
    color: #006747;
}

.auth-status-panel.auth-status-panel-error {
    background: #fff1f1;
    border-color: #f5bcbc;
    color: #991b1b;
}

.auth-status-panel.auth-status-panel-success {
    background: #eef7f2;
    border-color: rgba(0, 103, 71, 0.18);
    color: #1f4e3f;
}

.auth-helper-text {
    margin: 8px 2px 0;
    color: #5a7067;
    font-size: 13px;
    line-height: 1.5;
}

.auth-helper-text-tight {
    margin-top: 10px;
}

.auth-form-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.auth-secondary-button {
    flex: 1;
    border: 1px solid #cfe2d8;
    border-radius: 10px;
    background: #eef7f2;
    color: #006747;
    height: 48px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    font-family: 'Plus Jakarta Sans', sans-serif;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease, border-color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.auth-secondary-button:hover {
    transform: translateY(-1px);
    border-color: rgba(0, 103, 71, 0.28);
    box-shadow: 0 8px 16px rgba(0, 103, 71, 0.12);
}

.auth-secondary-button:disabled {
    opacity: 0.75;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.auth-secondary-button i {
    margin-right: 8px;
}

.auth-verify-code-wrap .auth-login-input-wrap input {
    text-transform: uppercase;
    letter-spacing: 0.28em;
    font-weight: 700;
}

.auth-pending-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    margin: 4px 0 22px;
}

.auth-pending-avatar {
    width: 62px;
    height: 62px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(0, 103, 71, 0.12), rgba(224, 176, 0, 0.16));
    border: 1px solid rgba(0, 103, 71, 0.16);
    color: #006747;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-top: 2px;
}

.auth-pending-name {
    margin: 0;
    color: #006747;
    font-size: 25px;
    line-height: 1.18;
    font-weight: 700;
    text-align: center;
}

.auth-pending-copy {
    margin: 2px 0 0;
    color: #335b4e;
    font-size: 14px;
    line-height: 1.65;
    text-align: center;
    max-width: 30ch;
}

.auth-signout-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
    text-decoration: none;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, #b91c1c 0%, #dc2626 100%);
    color: #ffffff;
    height: 48px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    font-family: 'Plus Jakarta Sans', sans-serif;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    margin-top: 4px;
}

.auth-signout-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(185, 28, 28, 0.2);
}

.auth-signout-button i {
    margin-right: 0;
}

::selection {
    background-color: #aad2c1;
    color: #003a2c;
}

::-moz-selection {
    background-color: #aad2c1;
    color: #003a2c;
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background-color: #f1f8f3;
    border-radius: 8px;
}

::-webkit-scrollbar-thumb {
    background-color: rgb(0, 103, 71);
    border-radius: 8px;
    border: 2px solid #f1f8f3;
}

::-webkit-scrollbar-thumb:hover {
    background-color: rgb(0, 85, 58);
}

* {
    scrollbar-width: thin;
    scrollbar-color: rgb(0, 103, 71) #f1f8f3;
}

@media (max-width: 540px) {
    .auth-login-body {
        padding: 10px;
    }

    .auth-login-card {
        padding: 18px 14px;
        border-radius: 14px;
    }

    .auth-login-card h1 {
        font-size: 27px;
        margin-bottom: 9px;
    }

    .auth-login-challenge {
        margin-top: 24px;
        margin-bottom: 24px;
        font-size: 12px;
        padding: 9px 10px;
    }

    .auth-login-field-group {
        margin-bottom: 12px;
    }

    .auth-login-field-group label {
        margin-bottom: 6px;
    }

    .auth-login-input-wrap input {
        padding: 12px 42px 12px 40px;
    }

    .auth-login-input-wrap .auth-field-icon {
        left: 12px;
    }

    .auth-password-toggle {
        right: 8px;
    }

    .auth-login-turnstile-wrap {
        margin-top: 22px;
        margin-bottom: 14px;
    }

    .auth-login-button {
        margin-top: 14px;
        padding: 0 14px;
    }

    .auth-verify-code-wrap .auth-login-input-wrap input {
        font-size: 14px;
        letter-spacing: 0.18em;
    }

    .auth-login-footer {
        margin-top: 14px;
        font-size: 12px;
        line-height: 1.2;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 4px;
        white-space: nowrap;
    }

    .auth-resend-row {
        align-items: flex-start;
    }
}

@media (max-width: 380px) {
    .auth-login-body {
        padding: 8px;
    }

    .auth-login-card {
        padding: 20px 14px;
    }

    .auth-login-input-wrap input {
        padding: 12px 40px 12px 34px;
    }

    .auth-login-input-wrap .auth-field-icon {
        left: 10px;
    }

    .auth-password-toggle {
        right: 6px;
    }

    .auth-login-button {
        padding: 0 12px;
    }

    .auth-login-footer {
        font-size: 12px;
    }

    .auth-verify-code-wrap .auth-login-input-wrap input {
        font-size: 13px;
        letter-spacing: 0.14em;
    }

    .auth-form-actions {
        flex-direction: column;
    }

    .auth-pending-name {
        font-size: 22px;
    }

    .auth-pending-hero {
        gap: 12px;
        margin-bottom: 20px;
    }
}