:root {
    --auth-bg: #030914;
    --auth-panel: rgba(7, 15, 29, 0.78);
    --auth-panel-strong: rgba(10, 19, 35, 0.86);
    --auth-border: rgba(124, 146, 177, 0.45);
    --auth-border-soft: rgba(124, 146, 177, 0.28);
    --auth-text: #f7fbff;
    --auth-muted: #a7b3c5;
    --auth-green: #1bc799;
    --auth-green-dark: #0c9272;
    --auth-danger: #ef6b75;
    --auth-warning: #f3c96a;
    --auth-font: 'Poppins', Arial, sans-serif;
}

body.bglogin {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at 18% 18%, rgba(27, 199, 153, 0.14), transparent 30%),
        radial-gradient(circle at 84% 76%, rgba(27, 199, 153, 0.1), transparent 34%),
        linear-gradient(180deg, #ffffff 0%, #f7fbfa 100%) !important;
    background-attachment: scroll;
    color: var(--auth-text);
    font-family: var(--auth-font);
    position: relative;
    overflow-x: hidden;
}

body.bglogin::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.22;
    background-image: url("data:image/svg+xml,%3Csvg width='180' height='180' viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%231bc799' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' opacity='0.45'%3E%3Cpath d='M28 42c8-10 25-8 31 4 7 14-4 29-19 29-14 0-24-12-20-25'/%3E%3Cpath d='M43 31c1-7 10-7 12 0M25 35c-4-6 4-12 9-7M65 43c7-2 10 8 3 11'/%3E%3Cpath d='M103 45c10-9 27-7 34 5 7 12 1 27-12 32-13 5-28-3-31-17'/%3E%3Cpath d='M103 45c-9-6-18-1-21 8 9-1 16 2 21 8'/%3E%3Cpath d='M126 39c0-7 9-9 12-3M151 54c8-1 9 11 1 12'/%3E%3Cpath d='M34 130c8-11 25-10 34 0 9 11 2 27-13 29-13 2-24-5-27-17'/%3E%3Cpath d='M48 119c2-8 12-7 13 1M32 124c-6-5 1-13 7-8'/%3E%3Cpath d='M105 125c11-10 29-6 35 8 5 12-2 25-15 29-14 4-29-6-30-21'/%3E%3Cpath d='M106 125c-8-7-17-3-21 6 8 0 15 3 20 9'/%3E%3Cpath d='M140 112c12 1 20 8 23 17M139 112c7-4 17-3 23 4'/%3E%3Cpath d='M18 95c7-10 21-10 29 0M47 95c8-9 21-9 28 0'/%3E%3Cpath d='M92 94c7-10 20-10 28 0M120 94c8-9 21-9 28 0'/%3E%3Ccircle cx='76' cy='38' r='2'/%3E%3Ccircle cx='156' cy='91' r='2'/%3E%3Ccircle cx='82' cy='148' r='2'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 180px 180px;
}

.auth-page {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    position: relative;
    z-index: 1;
}

.auth-page-login {
    min-height: 100vh;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    overflow: hidden;
}

.auth-page-login .auth-card {
    padding-top: 1.35rem;
    padding-bottom: 1.35rem;
}

.auth-page-login .auth-logo {
    margin-bottom: 0.85rem;
}

.auth-page-login .auth-heading {
    margin-bottom: 0.78rem;
}

.auth-page-login .auth-divider {
    margin: 0.78rem 0 0.68rem;
}

.auth-card {
    width: min(100%, 390px);
    padding: 1.7rem 2rem 1.75rem;
    border: 1px solid var(--auth-border);
    border-radius: 1rem;
    background: linear-gradient(180deg, rgba(9, 18, 34, 0.78), rgba(6, 14, 27, 0.88));
    box-shadow: 0 1.4rem 3rem rgba(10, 31, 44, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(18px);
}

.auth-card-wide {
    width: min(100%, 560px);
    padding-top: 1.65rem;
}

.auth-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 1.15rem;
}

.auth-logo img {
    width: 145px;
    max-width: 54%;
    height: auto;
    object-fit: contain;
}

.auth-heading {
    text-align: center;
    margin-bottom: 1rem;
}

.auth-heading h1 {
    margin: 0 0 0.35rem;
    color: var(--auth-text);
    font-size: 0.98rem;
    font-weight: 700;
    letter-spacing: 0;
}

.auth-heading p {
    margin: 0;
    color: var(--auth-muted);
    font-size: 0.76rem;
    font-weight: 400;
}

.auth-form {
    width: 100%;
}

.auth-grid-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.58rem;
}

.auth-grid-form .auth-heading {
    grid-column: 1 / -1;
    margin-bottom: 0.72rem;
}

.auth-field {
    min-height: 2.65rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0 0.78rem;
    margin-bottom: 0.7rem;
    border: 1px solid var(--auth-border-soft);
    border-radius: 0.48rem;
    background: rgba(2, 8, 18, 0.94);
    color: var(--auth-muted);
}

.auth-grid-form .auth-field {
    margin-bottom: 0;
}

.auth-field-full {
    grid-column: 1 / -1;
}

.auth-field i {
    width: 0.92rem;
    flex: 0 0 0.92rem;
    color: #aab6c8;
    font-size: 0.82rem;
    text-align: center;
}

.auth-field input {
    min-width: 0;
    flex: 1;
    border: 0;
    outline: 0;
    background: transparent !important;
    color: var(--auth-text) !important;
    font-family: var(--auth-font);
    font-size: 0.78rem;
    font-weight: 500;
}

.auth-field input::placeholder {
    color: #a2adbf;
    opacity: 1;
}

.auth-field input:-webkit-autofill,
.auth-field input:-webkit-autofill:hover,
.auth-field input:-webkit-autofill:focus,
.auth-field input:-webkit-autofill:active {
    -webkit-text-fill-color: var(--auth-text) !important;
    caret-color: var(--auth-text);
    transition: background-color 999999s ease-in-out 0s;
    box-shadow: 0 0 0 1000px rgba(2, 8, 18, 0.94) inset !important;
}

.auth-field:focus-within {
    border-color: rgba(27, 199, 153, 0.78);
    box-shadow: 0 0 0 4px rgba(27, 199, 153, 0.08);
}

.auth-password-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: #aab6c8;
    cursor: pointer;
}

.auth-password-toggle i {
    font-size: 0.82rem;
}

.auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 0.1rem 0 0.85rem;
    color: #dce5f2;
    font-size: 0.72rem;
    font-weight: 500;
}

.auth-options a,
.auth-switch a {
    color: var(--auth-green);
    font-weight: 600;
    text-decoration: none;
}

.auth-options a:hover,
.auth-switch a:hover {
    color: #31e0af;
}

.auth-check {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0;
    cursor: pointer;
}

.auth-check input {
    position: absolute;
    opacity: 0;
}

.auth-check span {
    width: 0.95rem;
    height: 0.95rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.35rem;
    background: var(--auth-green);
    box-shadow: 0 0.35rem 1rem rgba(27, 199, 153, 0.22);
}

.auth-check span::after {
    content: "";
    width: 0.26rem;
    height: 0.46rem;
    border: solid #ffffff;
    border-width: 0 0.12rem 0.12rem 0;
    transform: rotate(45deg) translate(-1px, -1px);
}

.auth-check input:not(:checked) + span {
    background: transparent;
    border: 1px solid var(--auth-border-soft);
    box-shadow: none;
}

.auth-check input:not(:checked) + span::after {
    display: none;
}

.auth-submit {
    width: 100%;
    min-height: 2.75rem;
    border: 0;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, #1fc79b 0%, #0d9271 100%);
    color: #ffffff;
    font-family: var(--auth-font);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 1rem 2.4rem rgba(13, 146, 113, 0.22);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.auth-submit:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
    box-shadow: 0 1.2rem 2.8rem rgba(13, 146, 113, 0.28);
}

.auth-divider {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 0.75rem;
    margin: 1rem 0 0.85rem;
    color: #aab6c8;
    font-size: 0.68rem;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    height: 1px;
    background: rgba(124, 146, 177, 0.24);
}

.auth-switch {
    margin: 0;
    text-align: center;
    color: #aab6c8;
    font-size: 0.74rem;
}

.auth-alert {
    margin: -0.25rem 0 0.85rem;
    padding: 0.58rem 0.7rem;
    border-radius: 0.52rem;
    border: 1px solid rgba(27, 199, 153, 0.28);
    background: rgba(27, 199, 153, 0.1);
    color: #ddfff5;
    font-size: 0.72rem;
    line-height: 1.5;
}

.auth-alert-danger {
    border-color: rgba(239, 107, 117, 0.32);
    background: rgba(239, 107, 117, 0.1);
    color: #ffdfe2;
}

.auth-alert-warning {
    border-color: rgba(243, 201, 106, 0.32);
    background: rgba(243, 201, 106, 0.1);
    color: #fff0c8;
}

@media (max-width: 720px) {
    .auth-page {
        padding: 1.25rem;
        align-items: flex-start;
    }

    .auth-card,
    .auth-card-wide {
        padding: 1.45rem 1rem;
        border-radius: 0.9rem;
    }

    .auth-logo {
        margin-bottom: 1rem;
    }

    .auth-logo img {
        width: 132px;
    }

    .auth-grid-form {
        grid-template-columns: 1fr;
    }

    .auth-field,
    .auth-submit {
        min-height: 2.65rem;
    }

    .auth-options {
        align-items: flex-start;
        flex-direction: column;
    }
}
