/* ========================================
   Login Page - Full Screen 3-Column
   ======================================== */

.login-container {
    --login-accent: #2563eb;
    --login-accent-hover: #1d4ed8;
    --login-text: #1a1a2e;
    --login-text-sub: #555;
    --login-text-muted: #999;
    --login-input-bg: #f7f7f7;
    --login-input-border: #ddd;
    --login-input-focus: #2563eb;
    --login-brand-bg: #2563eb;
}

/* ========================================
   GLOBAL OVERRIDE - scanline/grid 해제
   ======================================== */
body::before,
body::after {
    display: none;
}

/* ========================================
   CONTAINER
   ======================================== */
.login-container {
    display: flex;
    min-height: 100vh;
    padding: 0;
    background: #fff;
    word-break: keep-all;
}

/* ========================================
   3-COLUMN SPLIT
   ======================================== */
.login-split {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* ========================================
   PANEL 공통
   ======================================== */
.login-panel {
    display: flex;
    flex-direction: column;
    position: relative;
}

.login-panel::before,
.login-panel::after {
    display: none;
}

/* ========================================
   1단: 브랜드 (50%)
   ======================================== */
.login-panel-brand {
    flex: 0 0 60%;
    background: linear-gradient(135deg, #0a0f1e, #0f1628, #0b1124);
    background-size: 400% 400%;
    animation: baseDrift 20s ease-in-out infinite;
    color: #fff;
    padding: 0 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

@keyframes baseDrift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 성운 레이어 - 경계 안 보이도록 200% 크기 */
.login-panel-brand::before,
.login-panel-brand::after {
    content: '';
    display: block;
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    pointer-events: none;
}

/* 남색 계열 성운 */
.login-panel-brand::before {
    background:
        radial-gradient(ellipse 35% 30% at 30% 60%, rgba(32, 58, 110, 0.42) 0%, transparent 100%),
        radial-gradient(ellipse 25% 35% at 70% 30%, rgba(28, 48, 92, 0.32) 0%, transparent 100%),
        radial-gradient(ellipse 30% 25% at 50% 80%, rgba(22, 42, 88, 0.27) 0%, transparent 100%);
    animation: nebula1 25s ease-in-out infinite;
}

/* 짙은 남색 계열 성운 */
.login-panel-brand::after {
    background:
        radial-gradient(ellipse 30% 35% at 65% 65%, rgba(22, 38, 72, 0.37) 0%, transparent 100%),
        radial-gradient(ellipse 35% 25% at 25% 35%, rgba(28, 48, 82, 0.27) 0%, transparent 100%),
        radial-gradient(ellipse 25% 30% at 75% 15%, rgba(20, 33, 62, 0.32) 0%, transparent 100%);
    animation: nebula2 30s ease-in-out infinite;
}

/* 별 레이어 */
.brand-stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.brand-stars canvas {
    display: block;
    width: 100%;
    height: 100%;
}

@keyframes nebula1 {
    0% { transform: translate(0%, 0%) rotate(0deg); opacity: 0.9; }
    25% { transform: translate(5%, -3%) rotate(2deg); opacity: 0.6; }
    50% { transform: translate(-3%, 5%) rotate(-1deg); opacity: 1; }
    75% { transform: translate(4%, 2%) rotate(1deg); opacity: 0.7; }
    100% { transform: translate(0%, 0%) rotate(0deg); opacity: 0.9; }
}

@keyframes nebula2 {
    0% { transform: translate(0%, 0%) rotate(0deg); opacity: 0.5; }
    25% { transform: translate(-4%, 3%) rotate(-2deg); opacity: 0.9; }
    50% { transform: translate(5%, -4%) rotate(1deg); opacity: 0.6; }
    75% { transform: translate(-2%, -3%) rotate(-1deg); opacity: 1; }
    100% { transform: translate(0%, 0%) rotate(0deg); opacity: 0.5; }
}

/* 로고 - 헤더 h1과 동일 스타일 */
.brand-logo {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.2rem;
    color: #fff;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin: 0;
    position: absolute;
    top: 20px;
    left: 30px;
    z-index: 2;
}

.brand-content {
    display: flex;
    flex-direction: column;
    max-width: 420px;
    width: 100%;
    z-index: 2;
}

.brand-tagline {
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 600;
    font-size: 1.85rem;
    color: #fff;
    margin: 0 0 40px 0;
    line-height: 1.55;
    letter-spacing: -0.5px;
}

.brand-dot {
    display: inline-block;
    width: 1.2em;
    text-align: center;
}

/* ========================================
   브랜드 피처 - fade 순환
   ======================================== */
.brand-features {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.brand-feature {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.brand-feature.active {
    opacity: 1;
    transform: translateY(0);
}

.brand-feature-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    flex-shrink: 0;
    margin-top: 2px;
}

.brand-feature-icon svg {
    stroke: #fff;
    width: 20px;
    height: 20px;
}

.brand-feature-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.brand-feature-text strong {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 1.02rem;
    font-weight: 500;
    color: #fff;
}

.brand-feature-text span {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 0.88rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.6);
}

/* ========================================
   2단: 로그인 (50%)
   ======================================== */
.login-panel-center {
    flex: 0 0 40%;
    background: #fff;
    padding: 0 60px;
    justify-content: center;
    align-items: center;
}

.login-panel-center form,
.login-panel-center .panel-title,
.login-panel-center .panel-desc,
.login-panel-center .two-factor-section,
.login-panel-center .error-message,
.login-panel-center .social-login-section {
    width: 100%;
    max-width: 360px;
}

/* ========================================
   PANEL TITLES - 상단 정렬
   ======================================== */
.panel-title {
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--login-text);
    letter-spacing: -0.5px;
    text-transform: none;
    margin: 0 0 4px 0;
}

.panel-desc {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 0.9rem;
    color: var(--login-text-muted);
    margin: 0 0 20px 0;
    line-height: 1.6;
}

/* ========================================
   DIVIDER (사용 안함)
   ======================================== */
.login-divider {
    display: none;
}

/* ========================================
   FORM OVERRIDES
   ======================================== */
.login-container .form-group {
    margin-bottom: 20px;
}

.login-container .form-group label {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--login-text-sub);
    letter-spacing: 0;
    margin-bottom: 6px;
}

.login-container .form-group label::before {
    display: none;
}

.login-container .form-group input {
    background: var(--login-input-bg);
    border: 0;
    border-radius: 8px;
    color: var(--login-text);
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 1.2rem;
    font-weight: 400;
    height: 52px;
    padding: 0 14px;
    transition: border-color 0.2s;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.login-container .form-group input::placeholder {
    color: #bbb;
}

.login-container .form-group input:focus {
    outline: none;
    border-color: var(--login-input-focus);
    box-shadow: inset 0 0 0 2px rgba(37, 99, 235, 0.08);
    background: #fff;
}

.login-container .password-toggle {
    color: var(--login-text-muted);
}

.login-container .password-toggle:hover,
.login-container .password-toggle.active {
    color: var(--login-accent);
}

/* ========================================
   BUTTON OVERRIDES
   ======================================== */
.login-container .btn-primary {
    background: var(--login-accent);
    border: 0;
    border-radius: 8px;
    color: #fff;
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    height: 52px;
    padding: 0 16px;
    margin-top: 4px;
    transition: background 0.2s;
}

.login-container .btn-primary::before {
    display: none;
}

.login-container .btn-primary:hover {
    background: var(--login-accent-hover);
    box-shadow: none;
    transform: none;
}

.login-container .btn-primary:active {
    transform: none;
}

.login-container .btn-primary:disabled {
    background: #ddd;
    color: #999;
    border: none;
}

.login-container .btn-primary:disabled:hover {
    background: #ddd;
    transform: none;
    box-shadow: none;
}

/* ========================================
   소셜 로그인 섹션
   ======================================== */
.social-login-section {
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid #eee;
}

.social-login-section .panel-title {
    margin-bottom: 4px;
}

.social-login-section .panel-desc {
    margin-bottom: 20px;
}

/* ========================================
   소셜 로그인 버튼
   ======================================== */
.social-login-buttons {
    display: flex;
    gap: 12px;
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1;
    height: 52px;
    padding: 0 20px;
    border-radius: 6px;
    font-size: 0.93rem;
    font-weight: 500;
    text-decoration: none;
    transition: opacity 0.15s;
    border: 0;
    cursor: pointer;
}

.btn-social:hover {
    opacity: 0.85;
    transform: none;
}

.btn-social.loading {
    background: #e0e0e0 !important;
    color: #999 !important;
    border-color: #e0e0e0 !important;
    pointer-events: none;
    cursor: default;
}

/* 네이버: 공식 가이드 - #03C75A 배경, 흰색 텍스트 */
.btn-social-naver {
    background: #03A94D;
    color: #fff;
    font-family: 'Noto Sans KR', sans-serif;
}

.btn-social-kakao {
    background: #FEE500;
    color: rgba(0, 0, 0, 0.85);
    font-family: 'Noto Sans KR', sans-serif;
}

.btn-social-google {
    background: #fff;
    color: #1f1f1f;
    font-family: 'Roboto', 'Noto Sans KR', sans-serif;
    font-weight: 500;
    border: 1px solid #e5e5e5;
}

.btn-social-google:hover {
    background: #fff;
    border-color: #eee;
    opacity: 1;
}

/* 공식 아이콘 SVG */
.btn-social-icon-svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

/* ========================================
   에러 메시지
   ======================================== */
.login-container .error-message {
    margin-top: 16px;
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #dc2626;
    border-radius: 8px;
    font-family: 'Noto Sans KR', sans-serif;
}

/* ========================================
   2FA 이메일 인증
   ======================================== */
.two-factor-section {
    animation: twoFaFadeIn 0.3s ease;
}

@keyframes twoFaFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.two-factor-header {
    text-align: center;
    margin-bottom: 24px;
}

.two-factor-title {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--login-text);
    letter-spacing: 0;
    text-transform: none;
    margin: 0 0 10px 0;
}

.two-factor-desc {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 0.85rem;
    color: var(--login-text-sub);
    line-height: 1.6;
    margin: 0;
}

.two-factor-section #verifyCode {
    text-align: center;
    font-size: 1.4rem;
    letter-spacing: 8px;
    font-family: var(--font-mono);
    font-weight: 600;
}

.two-factor-section #verifyCode::placeholder {
    letter-spacing: 8px;
    color: #bbb;
    font-weight: 400;
}

.two-factor-timer {
    text-align: center;
    margin-bottom: 16px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--login-accent);
}

.two-factor-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 14px;
}

.login-container .btn-text {
    background: none;
    border: none;
    color: var(--login-text-muted);
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 0.8rem;
    cursor: pointer;
    padding: 8px 4px;
    transition: color 0.2s;
}

.login-container .btn-text:hover:not(:disabled) {
    color: var(--login-accent);
}

.login-container .btn-text:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

/* ========================================
   기존 유지: 온라인 등록 페이지 (register)
   ======================================== */
.class-code-hint {
    margin-top: 10px;
    padding: 12px;
    background: var(--cyan-05);
    border: 1px solid var(--cyan-15);
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.8;
    max-height: 62px;
    overflow-y: auto;
}

.role-checkbox-group {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
}

.role-checkbox-group > label.role-checkbox::before {
    display: none;
}

.role-checkbox {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 13px 20px;
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-secondary);
    background: var(--bg-primary);
    border: 1px solid var(--cyan-30);
    transition: all 0.2s ease;
    text-align: center;
}

.role-checkbox:first-child {
    border-radius: 4px 0 0 4px;
    border-right: none;
}

.role-checkbox:last-child {
    border-radius: 0 4px 4px 0;
}

.role-checkbox:hover {
    background: var(--cyan-05);
    color: var(--text-primary);
}

.role-checkbox input[type="checkbox"] {
    display: none;
}

.role-checkbox span {
    user-select: none;
}

.role-checkbox:has(input[type="checkbox"]:checked) {
    background: var(--cyan-15);
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
}

.role-checkbox:first-child:has(input[type="checkbox"]:checked) {
    border-right: 1px solid var(--neon-cyan);
}

.role-checkbox:last-child:has(input[type="checkbox"]:checked) {
    border-left: 1px solid var(--neon-cyan);
}

.online-org-label {
    padding: 12px 16px;
    background: var(--cyan-05);
    border: 1px solid var(--cyan-20);
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    color: var(--neon-cyan);
    letter-spacing: 1px;
}

.pricing-box {
    margin: 20px 0;
    padding: 20px;
    background: var(--cyan-05);
    border: 1px solid var(--cyan-20);
    border-radius: 6px;
    text-align: center;
    position: relative;
}

.pricing-badge {
    display: inline-block;
    padding: 4px 12px;
    background: var(--neon-pink);
    color: #fff;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 12px;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.pricing-original {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.pricing-original s {
    text-decoration: line-through;
}

.pricing-sale {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--neon-cyan);
    text-shadow: var(--glow-cyan);
}

.pricing-period {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--text-secondary);
}

.pricing-note {
    margin-top: 10px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--neon-pink);
    opacity: 0.8;
}

.terms-check {
    margin-bottom: 4px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.checkbox-label input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
    accent-color: var(--neon-cyan);
}

.checkbox-label a {
    color: var(--neon-cyan);
    text-decoration: none;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

/* ========================================
   RESPONSIVE: 1200px 이하 (상하 분리)
   ======================================== */
@media (max-width: 1200px) {
    .login-split {
        flex-wrap: wrap;
    }

    /* 상단: 브랜드 100% */
    .login-panel-brand {
        flex: 0 0 100%;
        padding: 60px 40px 50px;
        padding-top: 60px;
        align-items: center;
        min-height: auto;
    }

    .brand-logo {
        position: static;
        margin-bottom: 24px;
    }

    .brand-content {
        max-width: 100%;
        align-items: center;
        text-align: center;
    }

    .brand-tagline {
        font-size: 1.5rem;
        margin-bottom: 30px;
    }

    /* 피처: 상하 분리 시 숨김 */
    .brand-features {
        display: none;
    }

    /* 하단: 로그인 100% */
    .login-panel-center {
        flex: 0 0 100%;
        padding: 50px 40px;
    }
}
