* {
    box-sizing: border-box;
}

:root {
    --auth-bg: #f6f8fb;
    --auth-card: #ffffff;
    --auth-text: #111827;
    --auth-muted: #6b7280;
    --auth-border: #dfe3e8;
    --auth-primary: #111827;
    --auth-primary-hover: #000000;
    --auth-focus: #2563eb;
    --auth-danger: #dc2626;
    --auth-success: #16a34a;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    min-height: 100vh;
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;

    background:
        radial-gradient(
            circle at top left,
            rgba(37, 99, 235, 0.07),
            transparent 32%
        ),
        var(--auth-bg);

    color: var(--auth-text);
}

.auth-page {
    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 40px 20px;
}

.auth-wrapper {
    width: 100%;
    max-width: 430px;
}

.auth-brand {
    text-align: center;
    margin-bottom: 28px;
}

.auth-logo {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    width: 48px;
    height: 48px;

    margin-bottom: 14px;

    border-radius: 12px;

    background: #111827;
    color: white;

    font-size: 21px;
    font-weight: 700;

    letter-spacing: -0.5px;
}

.auth-brand-name {
    font-size: 25px;
    font-weight: 700;

    letter-spacing: -0.7px;
}

.auth-brand-subtitle {
    margin-top: 6px;

    font-size: 14px;

    color: var(--auth-muted);
}

.auth-card {
    background: var(--auth-card);

    border: 1px solid rgba(17, 24, 39, 0.08);

    border-radius: 16px;

    padding: 34px;

    box-shadow:
        0 20px 45px rgba(15, 23, 42, 0.08),
        0 3px 10px rgba(15, 23, 42, 0.04);
}

.auth-title {
    margin: 0;

    font-size: 24px;
    font-weight: 700;

    letter-spacing: -0.5px;
}

.auth-description {
    margin: 8px 0 28px;

    color: var(--auth-muted);

    font-size: 14px;
    line-height: 1.55;
}

.auth-field {
    margin-bottom: 19px;
}

.auth-label {
    display: block;

    margin-bottom: 7px;

    font-size: 14px;
    font-weight: 600;
}

.auth-input-wrapper {
    position: relative;
}

.auth-input {
    width: 100%;

    height: 46px;

    padding: 0 13px;

    border: 1px solid var(--auth-border);

    border-radius: 9px;

    background: #fff;

    color: var(--auth-text);

    font-size: 15px;

    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

.auth-input::placeholder {
    color: #9ca3af;
}

.auth-input:hover {
    border-color: #c8cdd4;
}

.auth-input:focus {
    outline: none;

    border-color: var(--auth-focus);

    box-shadow:
        0 0 0 3px rgba(37, 99, 235, 0.10);
}

.auth-password-input {
    padding-right: 48px;
}

.auth-password-toggle {
    position: absolute;

    right: 12px;
    top: 50%;

    transform: translateY(-50%);

    border: 0;
    background: transparent;

    color: #6b7280;

    cursor: pointer;

    padding: 4px;

    font-size: 14px;
}

.auth-password-toggle:hover {
    color: #111827;
}

.auth-help {
    margin-top: 6px;

    font-size: 12px;

    color: var(--auth-muted);

    line-height: 1.4;
}

.auth-row {
    display: flex;

    justify-content: space-between;
    align-items: center;

    gap: 15px;

    margin-bottom: 22px;
}

.auth-link {
    color: #2563eb;

    text-decoration: none;

    font-size: 13px;
    font-weight: 600;
}

.auth-link:hover {
    text-decoration: underline;
}

.auth-button {
    width: 100%;

    height: 46px;

    border: 0;

    border-radius: 9px;

    background: var(--auth-primary);

    color: white;

    font-size: 15px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background 0.15s ease,
        transform 0.05s ease,
        box-shadow 0.15s ease;
}

.auth-button:hover {
    background: var(--auth-primary-hover);

    box-shadow:
        0 5px 14px rgba(17, 24, 39, 0.18);
}

.auth-button:active {
    transform: translateY(1px);
}

.auth-button:disabled {
    opacity: 0.65;

    cursor: not-allowed;

    box-shadow: none;
}

.auth-divider {
    display: flex;

    align-items: center;

    gap: 12px;

    margin: 24px 0;
}

.auth-divider::before,
.auth-divider::after {
    content: "";

    flex: 1;

    height: 1px;

    background: #e5e7eb;
}

.auth-divider span {
    color: #9ca3af;

    font-size: 12px;
}

.google-button {
    width: 100%;

    height: 46px;

    display: flex;

    align-items: center;
    justify-content: center;

    gap: 10px;

    border: 1px solid var(--auth-border);

    border-radius: 9px;

    background: white;

    color: #111827;

    font-size: 14px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background 0.15s ease,
        border-color 0.15s ease;
}

.google-button:hover {
    background: #f9fafb;

    border-color: #c8cdd4;
}

.google-icon {
    width: 18px;
    height: 18px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-weight: 700;

    color: #4285f4;
}

.auth-footer {
    margin-top: 23px;

    text-align: center;

    color: var(--auth-muted);

    font-size: 13px;
}

.auth-footer a {
    color: #2563eb;

    text-decoration: none;

    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.turnstile-container {
    margin: 22px 0;
}

.auth-message {
    margin-bottom: 20px;

    padding: 12px 14px;

    border-radius: 8px;

    font-size: 13px;

    line-height: 1.45;
}

.auth-message-error {
    background: #fef2f2;

    border: 1px solid #fecaca;

    color: #991b1b;
}

.auth-message-success {
    background: #f0fdf4;

    border: 1px solid #bbf7d0;

    color: #166534;
}

.auth-security-note {
    margin-top: 20px;

    color: #9ca3af;

    text-align: center;

    font-size: 11px;

    line-height: 1.5;
}

@media (max-width: 520px) {

    .auth-page {
        padding: 25px 15px;
    }

    .auth-card {
        padding: 26px 22px;

        border-radius: 14px;
    }

    .auth-title {
        font-size: 22px;
    }

}

.auth-message-card {
    text-align: center;
    padding-top: 38px;
    padding-bottom: 38px;
}

.auth-status-icon {
    width: 58px;
    height: 58px;

    margin: 0 auto 20px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    font-size: 25px;
    font-weight: 700;
}

.auth-status-success {
    background: #ecfdf3;
    color: #16a34a;
}

.auth-status-error {
    background: #fef2f2;
    color: #dc2626;
}

.auth-status-info {
    background: #eff6ff;
    color: #2563eb;
}

.auth-message-title {
    margin-bottom: 10px;
}

.auth-message-description {
    margin-bottom: 10px;
}

.auth-secondary-message {
    margin: 0 0 25px;

    color: var(--auth-muted);

    font-size: 13px;
    line-height: 1.5;
}

.auth-button-link {
    display: flex;

    align-items: center;
    justify-content: center;

    text-decoration: none;
}