* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    font-family: Inter, Arial, Helvetica, sans-serif;
}

body.login-page {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #08111b;
}

body.login-page::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url("/images/bg.png") center center / cover no-repeat;
    transform: scale(1.02);
    filter: blur(2px);
}

.bg-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top, rgba(32, 190, 105, 0.14), transparent 35%),
        linear-gradient(135deg, rgba(3, 10, 18, 0.78), rgba(7, 17, 28, 0.82));
    z-index: 1;
}

.auth-shell {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1200px;
    padding: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.auth-panel {
    width: 100%;
    max-width: 460px;
    padding: 32px;
    border-radius: 28px;
    background: rgba(8, 15, 25, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    color: #fff;
    animation: authFadeIn .45s ease;
}

@keyframes authFadeIn {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.auth-top {
    text-align: center;
    margin-bottom: 22px;
}

.auth-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(46, 230, 125, 0.12);
    border: 1px solid rgba(46, 230, 125, 0.24);
    color: #9df2b9;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 14px;
}

.auth-top h1 {
    margin: 0 0 10px;
    font-size: 36px;
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.8px;
}

.auth-subtitle {
    margin: 0;
    color: rgba(255, 255, 255, 0.75);
    font-size: 14px;
    line-height: 1.6;
}

.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 18px;
}

.auth-tab {
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.82);
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: .2s ease;
}

.auth-tab:hover {
    background: rgba(255, 255, 255, 0.10);
}

.auth-tab.active {
    background: linear-gradient(180deg, #2ee67d 0%, #15b85a 100%);
    color: #ffffff;
    border-color: rgba(46, 230, 125, 0.55);
    box-shadow: 0 14px 30px rgba(21, 184, 90, 0.24);
}

.auth-message {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.45;
}

.auth-message-error {
    background: rgba(255, 77, 77, 0.12);
    border: 1px solid rgba(255, 77, 77, 0.24);
    color: #ffb2b2;
}

.auth-message-success {
    background: rgba(46, 230, 125, 0.12);
    border: 1px solid rgba(46, 230, 125, 0.24);
    color: #b7f4ca;
}

.auth-box {
    display: none;
}

.auth-box.active {
    display: block;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.92);
}

.input-group input {
    width: 100%;
    height: 54px;
    padding: 0 16px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.07);
    color: #ffffff;
    font-size: 15px;
    outline: none;
    transition: .2s ease;
}

.input-group input::placeholder {
    color: rgba(255, 255, 255, 0.42);
}

.input-group input:focus {
    border-color: rgba(46, 230, 125, 0.72);
    background: rgba(255, 255, 255, 0.10);
    box-shadow: 0 0 0 4px rgba(46, 230, 125, 0.12);
}

.auth-btn {
    margin-top: 6px;
    height: 56px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(180deg, #2ee67d 0%, #15b85a 100%);
    color: #fff;
    font-size: 16px;
    font-weight: 900;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
    box-shadow: 0 16px 34px rgba(21, 184, 90, 0.28);
}

.auth-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.03);
}

.auth-btn:active {
    transform: translateY(0);
}

.auth-footer {
    margin-top: 18px;
    text-align: center;
    color: rgba(255, 255, 255, 0.74);
    font-size: 14px;
}

.auth-footer a {
    color: #86f0ad;
    text-decoration: none;
    font-weight: 800;
    margin-left: 6px;
}

.auth-footer a:hover {
    text-decoration: underline;
}

@media (max-width: 560px) {
    .auth-shell {
        padding: 16px;
    }

    .auth-panel {
        padding: 24px 18px;
        border-radius: 22px;
    }

    .auth-top h1 {
        font-size: 28px;
    }

    .auth-subtitle {
        font-size: 13px;
    }

    .input-group input,
    .auth-btn,
    .auth-tab {
        height: 50px;
    }
}