/* ===================================================================
 * Login page — DSM-style split card over full-screen background.
 *
 * 풀스크린 배경 이미지 위에 글래스모피즘 분할 카드 배치.
 * CSS custom property --login-bg 는 app.js 에서 동적 설정.
 * ================================================================= */

.login-page {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #1a1b1e;
    background-image: var(--login-bg, none);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    overflow: hidden;
}

/* 미세 오버레이 — 배경 위 카드 가독성 향상 (밝은 톤 유지) */
.login-page::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.03);
    z-index: 0;
}

body.eve-authed .login-page { display: none; }
body:not(.eve-authed) #app { display: none; }

/* 스플릿 카드 컨테이너 */
.login-split-card {
    position: relative;
    z-index: 1;
    display: flex;
    width: 90%;
    max-width: 820px;
    min-height: 420px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* 좌측: 브랜드 패널 */
.login-brand-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 40px 32px;
    background: linear-gradient(135deg, rgba(99, 144, 234, 0.9), rgba(54, 112, 228, 0.85));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #ffffff;
}

.login-brand-panel .eve-logo {
    width: 160px;
    height: 160px;
    border-radius: 16px;
    object-fit: contain;
    image-rendering: -webkit-optimize-contrast;
}

.login-brand-title {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.login-brand-desc {
    font-size: 13px;
    opacity: 0.85;
    text-align: center;
    line-height: 1.5;
}

/* 우측: 로그인 폼 패널 */
.login-form-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 40px 36px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

[data-theme="dark"] .login-form-panel {
    background: rgba(26, 27, 30, 0.92);
}

.login-form-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary, #111);
}

.login-form-subtitle {
    font-size: 13px;
    color: var(--text-tertiary, #888);
    margin-top: -12px;
}

.login-form {
    width: 100%;
    max-width: 280px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.login-form input {
    appearance: none;
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text-primary, #111);
    background: var(--bg-input, #f5f5f7);
    border: 1px solid var(--border-color, #e5e5e7);
    border-radius: 10px;
    outline: none;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.login-form input:focus {
    border-color: var(--accent, #6390ea);
    box-shadow: 0 0 0 3px rgba(99, 144, 234, 0.15);
    background: var(--bg-primary, #fff);
}

.login-form .login-submit {
    margin-top: 6px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    color: #fff;
    background: var(--accent, #6390ea);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 150ms ease, transform 100ms ease;
}

.login-form .login-submit:hover {
    background: var(--accent-hover, #3670e4);
    transform: translateY(-1px);
}

.login-form .login-submit:active {
    transform: translateY(0);
}

.login-form .login-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.login-error {
    font-size: 12px;
    color: var(--red, #ef4444);
    min-height: 16px;
    text-align: center;
}

/* 모바일 반응형: 스플릿 카드를 수직 스택으로 */
@media (max-width: 640px) {
    .login-split-card {
        flex-direction: column;
        max-width: 400px;
        min-height: auto;
    }
    .login-brand-panel {
        padding: 28px 24px;
    }
    .login-brand-panel .eve-logo {
        width: 100px;
        height: 100px;
    }
    .login-brand-title {
        font-size: 18px;
    }
    .login-form-panel {
        padding: 28px 24px;
    }
}

/* ===== 상단바 사용자 정보 영역 (DSM 스타일) ===== */
.topbar-user {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    font-size: 12px;
    color: var(--text-primary);
    background: transparent;
    border: none;
}

.topbar-user .topbar-user-identity {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 12px;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    box-sizing: border-box;
}

.topbar-user .topbar-user-role {
    padding: 2px 6px;
    border-radius: 4px;
    background: linear-gradient(135deg, var(--accent), #4f7fd8);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.topbar-user .topbar-user-email {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
    font-size: 12px;
    color: var(--text-primary);
}

.topbar-user .btn-icon {
    width: 32px;
    height: 32px;
    position: relative;
    color: var(--text-primary);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: background 0.15s ease, border-color 0.15s ease;
}

.topbar-user .btn-icon:hover {
    color: var(--accent);
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(0, 0, 0, 0.12);
}
.topbar-dot {
    position: absolute;
    top: 4px; right: 4px;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #f59e0b;
    box-shadow: 0 0 0 2px var(--bg-primary, #fff);
}
.topbar-dot[hidden] { display: none; }
