* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #071019;
    --bg-soft: #0b1724;
    --card: rgba(10, 20, 31, 0.88);
    --card-border: rgba(201, 169, 97, 0.18);
    --primary: #c9a961;
    --primary-strong: #e0bf78;
    --text: #eef3f8;
    --muted: #9ca9b8;
    --input: #0f1c2b;
    --input-border: rgba(255, 255, 255, 0.08);
    --danger-bg: rgba(176, 52, 52, 0.12);
    --danger-border: rgba(255, 99, 99, 0.25);
    --danger-text: #ffb4b4;
    --shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
}

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: radial-gradient(circle at top, #102033 0%, #071019 55%, #050c14 100%);
    color: var(--text);
    min-height: 100vh;
}

.login-page {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
}

.login-background {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.22;
}

.glow-1 {
    width: 340px;
    height: 340px;
    background: #c9a961;
    top: -80px;
    left: -80px;
}

.glow-2 {
    width: 420px;
    height: 420px;
    background: #234d7c;
    right: -120px;
    bottom: -120px;
}

.grid-overlay {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,0.5), transparent 85%);
}

.login-wrapper {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: 48px;
    padding: 40px 6%;
}

.login-brand {
    max-width: 640px;
}

.brand-badge {
    display: inline-flex;
    align-items: center;
    padding: 10px 16px;
    border: 1px solid rgba(201, 169, 97, 0.25);
    background: rgba(201, 169, 97, 0.08);
    color: var(--primary-strong);
    border-radius: 999px;
    font-size: 0.92rem;
    letter-spacing: 0.4px;
    margin-bottom: 22px;
}

.login-brand h1 {
    font-size: 3.2rem;
    line-height: 1.08;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.login-brand h1 span {
    display: block;
    color: var(--primary);
}

.brand-text {
    font-size: 1.08rem;
    line-height: 1.8;
    color: var(--muted);
    max-width: 560px;
    margin-bottom: 34px;
}

.brand-features {
    display: grid;
    gap: 14px;
    margin-bottom: 34px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #d7e0ea;
    font-size: 1rem;
}

.feature-icon {
    color: var(--primary);
    font-size: 1rem;
    min-width: 18px;
}

.brand-footer {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--muted);
    font-size: 0.95rem;
}

.brand-line {
    width: 56px;
    height: 2px;
    background: linear-gradient(to right, var(--primary), transparent);
    border-radius: 10px;
}

.login-card-area {
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-card {
    width: 100%;
    max-width: 470px;
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    padding: 34px;
}

.login-card-header {
    text-align: center;
    margin-bottom: 26px;
}

.logo-mark {
    width: 76px;
    height: 76px;
    margin: 0 auto 18px;
    border-radius: 22px;
    padding: 2px;
    background: linear-gradient(135deg, var(--primary), #8f7138);
    box-shadow: 0 12px 32px rgba(201, 169, 97, 0.22);
}

.logo-inner {
    width: 100%;
    height: 100%;
    border-radius: 20px;
    background: #0a1520;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 1px;
}

.login-card-header h2 {
    font-size: 1.8rem;
    margin-bottom: 8px;
    color: var(--text);
}

.login-card-header p {
    color: var(--muted);
    font-size: 0.97rem;
}

.alert {
    padding: 14px 16px;
    border-radius: 14px;
    margin-bottom: 18px;
    font-size: 0.95rem;
}

.alert-error {
    background: var(--danger-bg);
    border: 1px solid var(--danger-border);
    color: var(--danger-text);
}

.login-form {
    display: grid;
    gap: 18px;
}

.form-group label {
    display: block;
    font-size: 0.94rem;
    color: #d8e1ea;
    margin-bottom: 8px;
    font-weight: 600;
}

.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    font-size: 0.95rem;
    opacity: 0.8;
}

.input-wrap input {
    width: 100%;
    height: 54px;
    border-radius: 16px;
    border: 1px solid var(--input-border);
    background: var(--input);
    color: var(--text);
    font-size: 1rem;
    outline: none;
    padding: 0 92px 0 44px;
    transition: 0.2s ease;
}

.input-wrap input::placeholder {
    color: #7f8c9a;
}

.input-wrap input:focus {
    border-color: rgba(201, 169, 97, 0.5);
    box-shadow: 0 0 0 4px rgba(201, 169, 97, 0.08);
}

.toggle-password {
    position: absolute;
    right: 10px;
    border: none;
    background: transparent;
    color: var(--primary);
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    padding: 8px 10px;
    border-radius: 10px;
}

.toggle-password:hover {
    background: rgba(201, 169, 97, 0.08);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
    margin-bottom: 4px;
}

.remember-me {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 0.94rem;
}

.remember-me input {
    accent-color: var(--primary);
}

.forgot-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.94rem;
}

.forgot-link:hover {
    color: var(--primary-strong);
}

.btn-login {
    height: 56px;
    border: none;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary), #a78647);
    color: #08111a;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
    box-shadow: 0 16px 28px rgba(201, 169, 97, 0.18);
}

.btn-login:hover {
    transform: translateY(-1px);
    filter: brightness(1.03);
}

.login-card-footer {
    margin-top: 22px;
    text-align: center;
}

.login-card-footer p {
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.6;
}

@media (max-width: 1100px) {
    .login-wrapper {
        grid-template-columns: 1fr;
        gap: 26px;
        padding-top: 50px;
        padding-bottom: 50px;
    }

    .login-brand {
        max-width: 100%;
        text-align: center;
    }

    .brand-text {
        margin-left: auto;
        margin-right: auto;
    }

    .brand-features {
        max-width: 520px;
        margin-left: auto;
        margin-right: auto;
        text-align: left;
    }

    .brand-footer {
        justify-content: center;
    }
}

@media (max-width: 640px) {
    .login-wrapper {
        padding: 24px 16px;
    }

    .login-brand h1 {
        font-size: 2.2rem;
    }

    .brand-text {
        font-size: 0.98rem;
        line-height: 1.7;
    }

    .login-card {
        padding: 22px 18px;
        border-radius: 20px;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
    }

    .input-wrap input {
        height: 52px;
    }

    .btn-login {
        height: 54px;
    }
}