:root {
    --bg: #020707;
    --panel: rgba(9, 24, 20, 0.84);
    --panel-2: rgba(12, 31, 25, 0.7);
    --border: rgba(42, 255, 122, 0.18);
    --border-soft: rgba(255, 255, 255, 0.08);
    --text: #f5fff8;
    --muted: #b8c9c1;
    --muted-2: #7f968c;
    --primary: #17e86f;
    --primary-dark: #0fbd5a;
    --danger: #ff6b6b;
    --shadow: 0 28px 90px rgba(0, 0, 0, 0.48);
    --radius: 8px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    min-width: 320px;
}

body {
    min-height: 100vh;
    font-family: Inter, Arial, Helvetica, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 50% 10%, rgba(21, 226, 111, 0.12), transparent 28rem),
        linear-gradient(180deg, #020807 0%, #03110d 45%, #010504 100%);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(90deg, rgba(1, 8, 7, 0.98), rgba(2, 13, 9, 0.62), rgba(1, 7, 6, 0.94)),
        radial-gradient(circle at 28% 20%, rgba(255, 255, 210, 0.13), transparent 0.7rem),
        radial-gradient(circle at 53% 18%, rgba(255, 255, 210, 0.11), transparent 0.55rem),
        radial-gradient(circle at 72% 25%, rgba(31, 255, 131, 0.11), transparent 16rem),
        repeating-linear-gradient(8deg, rgba(255,255,255,0.025) 0 1px, transparent 1px 24px);
    pointer-events: none;
}

a {
    color: inherit;
}

.login-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(430px, 0.92fr);
}

.login-brand,
.login-panel {
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-brand {
    padding: 72px clamp(32px, 6vw, 90px);
}

.brand-content {
    width: min(100%, 560px);
}

.brand-badge {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    padding: 10px 17px;
    border: 1px solid rgba(23, 232, 111, 0.2);
    border-radius: 999px;
    color: var(--primary);
    background: rgba(23, 232, 111, 0.12);
    font-size: 0.9rem;
    font-weight: 900;
}

.brand-badge::before {
    content: "\26BD";
}

.brand-content h1 {
    margin-bottom: 20px;
    font-size: clamp(3rem, 5.7vw, 5.4rem);
    line-height: 1.04;
    font-weight: 900;
    letter-spacing: 0;
}

.brand-content h1 span {
    color: var(--primary);
}

.brand-content p {
    max-width: 540px;
    margin-bottom: 30px;
    color: #e2eee8;
    font-size: 1.08rem;
    font-weight: 650;
    line-height: 1.68;
}

.brand-highlights {
    display: grid;
    gap: 12px;
}

.highlight-item {
    position: relative;
    padding: 18px 18px 18px 48px;
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(10px);
}

.highlight-item::before {
    content: "";
    position: absolute;
    left: 18px;
    top: 21px;
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: var(--primary);
    box-shadow: 0 0 22px rgba(23, 232, 111, 0.55);
}

.highlight-item strong {
    display: block;
    margin-bottom: 5px;
    font-size: 0.98rem;
}

.highlight-item span {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.45;
}

.login-panel {
    min-height: 100vh;
    padding: 40px clamp(18px, 4vw, 72px);
}

.login-card {
    width: min(100%, 455px);
    padding: 34px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: linear-gradient(180deg, var(--panel), rgba(4, 13, 11, 0.82));
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.login-header {
    margin-bottom: 26px;
    text-align: center;
}

.logo-container {
    display: flex;
    justify-content: center;
    margin-bottom: 18px;
}

.logo-img {
    width: 156px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 18px rgba(23, 232, 111, 0.2));
}

.login-header h2 {
    margin-bottom: 8px;
    font-size: 2rem;
    line-height: 1.1;
}

.login-header p,
.login-footer,
.modal-box p {
    color: var(--muted);
}

.alert-error,
.alert-success {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    line-height: 1.45;
}

.alert-error {
    border: 1px solid rgba(255, 107, 107, 0.3);
    color: #ff9a9a;
    background: rgba(255, 107, 107, 0.12);
}

.alert-success {
    border: 1px solid rgba(23, 232, 111, 0.26);
    color: #82ffae;
    background: rgba(23, 232, 111, 0.12);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 17px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 800;
}

.form-group input,
.modal-box input {
    width: 100%;
    height: 54px;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    outline: none;
    color: var(--text);
    background: rgba(255, 255, 255, 0.045);
    padding: 0 16px;
    font: inherit;
    font-size: 0.96rem;
    transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.form-group input::placeholder,
.modal-box input::placeholder {
    color: rgba(184, 201, 193, 0.62);
}

.form-group input:focus,
.modal-box input:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 4px rgba(23, 232, 111, 0.12);
}

.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: -2px;
}

.remember-me {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--muted);
    font-size: 0.9rem;
    cursor: pointer;
}

.remember-me input {
    accent-color: var(--primary);
}

.forgot-link,
.create-account {
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 800;
    text-decoration: none;
}

.forgot-link:hover,
.create-account:hover {
    color: #62ff9f;
}

.btn-login,
.modal-box button#sendReset {
    width: 100%;
    height: 56px;
    border: 0;
    border-radius: var(--radius);
    color: #021008;
    background: linear-gradient(135deg, #1fff82, #13d966);
    box-shadow: 0 18px 44px rgba(20, 232, 111, 0.22);
    font: inherit;
    font-size: 1rem;
    font-weight: 900;
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.btn-login:hover,
.modal-box button#sendReset:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 54px rgba(20, 232, 111, 0.28);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 22px 0 16px;
    color: var(--muted-2);
    font-size: 0.83rem;
}

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

.google-auth-wrap {
    display: flex;
    justify-content: center;
    min-height: 54px;
}

.google-native-hidden {
    display: none !important;
}

.google-fallback-hidden {
    display: inline-flex !important;
}

.google-fallback-btn {
    width: 100%;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--radius);
    background: #fff;
    color: #111;
    font: inherit;
    font-size: 0.98rem;
    font-weight: 850;
    cursor: pointer;
    transition: transform 180ms ease, background 180ms ease;
}

.google-fallback-btn:hover {
    background: #eef2ef;
    transform: translateY(-1px);
}

.google-fallback-btn span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.google-auth-feedback,
.modal-feedback,
.field-error {
    display: block;
    min-height: 18px;
    margin-top: 9px;
    font-size: 0.78rem;
}

.google-auth-feedback {
    text-align: center;
    color: #82ffae;
}

.feedback-error,
.google-auth-feedback.feedback-error,
.field-error {
    color: #ff9a9a;
}

.feedback-success {
    color: #82ffae;
}

.login-footer {
    margin-top: 24px;
    text-align: center;
    font-size: 0.92rem;
}

.create-account {
    display: inline-flex;
    margin-top: 8px;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 22px;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(8px);
}

.modal-overlay.active {
    display: flex;
}

.modal-box {
    position: relative;
    width: min(100%, 500px);
    padding: 30px 24px 24px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: linear-gradient(180deg, var(--panel), rgba(4, 13, 11, 0.94));
    box-shadow: var(--shadow);
    text-align: center;
}

.modal-box h3 {
    margin-bottom: 8px;
    font-size: 1.55rem;
}

.modal-box p {
    margin-bottom: 18px;
    font-size: 0.92rem;
    line-height: 1.55;
}

.modal-form-group {
    margin-bottom: 14px;
    text-align: left;
}

.close-modal {
    position: absolute;
    top: 11px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
}

.input-error {
    border-color: var(--danger) !important;
    box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.11) !important;
}

@media (max-width: 980px) {
    .login-page {
        grid-template-columns: 1fr;
    }

    .login-panel {
        order: 1;
        min-height: auto;
        padding: 28px 18px 20px;
    }

    .login-brand {
        order: 2;
        padding: 8px 18px 36px;
    }

    .brand-content {
        text-align: center;
    }

    .brand-badge,
    .brand-content p {
        margin-left: auto;
        margin-right: auto;
    }

    .brand-content h1 {
        font-size: clamp(2.25rem, 10vw, 3.4rem);
    }

    .brand-highlights {
        grid-template-columns: repeat(3, 1fr);
        text-align: left;
    }
}

@media (max-width: 640px) {
    body {
        background: linear-gradient(180deg, #020807 0%, #03110d 100%);
    }

    .login-panel {
        padding: 18px 14px 16px;
    }

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

    .logo-img {
        width: 134px;
    }

    .login-header {
        margin-bottom: 22px;
    }

    .login-header h2 {
        font-size: 1.65rem;
    }

    .form-group input,
    .btn-login,
    .google-fallback-btn {
        height: 52px;
    }

    .login-options {
        align-items: flex-start;
    }

    .login-brand {
        padding-top: 2px;
    }

    .brand-badge {
        margin-bottom: 18px;
    }

    .brand-content p {
        margin-bottom: 18px;
        font-size: 0.98rem;
    }

    .brand-highlights {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .highlight-item {
        padding: 14px 14px 14px 42px;
    }

    .highlight-item::before {
        left: 16px;
        top: 18px;
    }

    .modal-box {
        border-radius: 14px;
        padding: 26px 18px 20px;
    }
}
