/* =============================================
   THE K-TEC Enterprise Login
   ============================================= */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Pretendard Variable', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #0b1120;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

/* --- 배경 장식 --- */
.bg-decoration {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}
.bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
}
.bg-orb-1 {
    width: 600px; height: 600px;
    background: radial-gradient(circle, #6366f1 0%, transparent 70%);
    top: -200px; left: -100px;
    animation: orbFloat 20s ease-in-out infinite;
}
.bg-orb-2 {
    width: 500px; height: 500px;
    background: radial-gradient(circle, #3b82f6 0%, transparent 70%);
    bottom: -150px; right: -100px;
    animation: orbFloat 25s ease-in-out infinite reverse;
}
.bg-orb-3 {
    width: 300px; height: 300px;
    background: radial-gradient(circle, #8b5cf6 0%, transparent 70%);
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    animation: orbFloat 15s ease-in-out infinite;
    opacity: 0.15;
}
@keyframes orbFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-40px) scale(1.05); }
}
.bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(99,102,241,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99,102,241,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
}

/* --- 메인 래퍼 --- */
.login-wrapper {
    position: relative;
    z-index: 1;
    display: flex;
    width: 960px;
    max-width: calc(100vw - 40px);
    min-height: 580px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.06),
        0 40px 100px rgba(0,0,0,0.5),
        0 0 80px rgba(99,102,241,0.1);
}

/* --- 좌측: 브랜딩 --- */
.login-brand {
    width: 420px;
    flex-shrink: 0;
    background: linear-gradient(165deg, #0f172a 0%, #1e293b 40%, #0f172a 100%);
    padding: 48px 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}
.login-brand::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(99,102,241,0.12) 0%, transparent 70%);
    pointer-events: none;
}
.login-brand::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -80px;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(59,130,246,0.08) 0%, transparent 70%);
    pointer-events: none;
}

.brand-content {
    position: relative;
    z-index: 1;
}
.brand-logo {
    margin-bottom: 24px;
}
.brand-logo-img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(99,102,241,0.3));
}
.brand-title {
    font-size: 32px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 2px;
    line-height: 1.2;
}
.brand-subtitle {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
    letter-spacing: 1px;
    margin-top: 4px;
}
.brand-divider {
    width: 48px;
    height: 3px;
    background: linear-gradient(90deg, #6366f1, #818cf8);
    border-radius: 3px;
    margin: 28px 0;
}
.brand-desc {
    font-size: 15px;
    color: #94a3b8;
    line-height: 1.7;
    font-weight: 500;
}

.brand-features {
    margin-top: 36px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.brand-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 500;
}
.brand-feature i {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99,102,241,0.1);
    border: 1px solid rgba(99,102,241,0.15);
    border-radius: 8px;
    color: #818cf8;
    font-size: 13px;
    flex-shrink: 0;
}

.brand-footer {
    position: relative;
    z-index: 1;
    font-size: 11px;
    color: #475569;
    margin-top: 24px;
}

/* --- 우측: 로그인 폼 --- */
.login-form-area {
    flex: 1;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 40px;
}
.login-card {
    width: 100%;
    max-width: 360px;
}

.login-mobile-logo {
    display: none;
    margin-bottom: 20px;
}
.login-mobile-logo img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    background: linear-gradient(135deg, #1e293b, #334155);
    border-radius: 14px;
    padding: 8px;
}

.login-header {
    margin-bottom: 36px;
}
.login-header h2 {
    font-size: 26px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.5px;
}
.login-header p {
    font-size: 13px;
    color: #94a3b8;
    margin-top: 6px;
    font-weight: 500;
}

/* --- 폼 필드 --- */
.form-field {
    margin-bottom: 20px;
}
.form-field label {
    display: block;
    font-size: 12.5px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 8px;
    letter-spacing: -0.2px;
}
.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.input-wrap > i {
    position: absolute;
    left: 16px;
    color: #94a3b8;
    font-size: 14px;
    transition: color 0.2s;
    z-index: 1;
}
.input-wrap input {
    width: 100%;
    padding: 14px 16px 14px 44px;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    font-size: 14px;
    font-family: inherit;
    color: #0f172a;
    outline: none;
    background: #f8fafc;
    transition: all 0.2s;
}
.input-wrap input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
    background: #fff;
}
.input-wrap input:focus + .btn-pw-toggle,
.input-wrap:focus-within > i {
    color: #6366f1;
}
.input-wrap input::placeholder {
    color: #cbd5e1;
}

/* 비밀번호 토글 */
.btn-pw-toggle {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
    font-size: 14px;
    transition: color 0.2s;
    z-index: 1;
}
.btn-pw-toggle:hover {
    color: #6366f1;
}

/* --- 로그인 버튼 --- */
.btn-login {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    margin-top: 8px;
    transition: all 0.25s;
    position: relative;
    overflow: hidden;
}
.btn-login::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.25s;
}
.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(99,102,241,0.35);
}
.btn-login:hover::before {
    opacity: 1;
}
.btn-login:active {
    transform: translateY(0) scale(0.99);
}
.btn-login:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
.btn-login-text,
.btn-login-loader {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* --- 하단 --- */
.login-footer {
    text-align: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #f1f5f9;
}
.login-footer span {
    font-size: 11px;
    color: #cbd5e1;
    letter-spacing: 0.3px;
}

/* --- 반응형 --- */
@media (max-width: 860px) {
    .login-brand {
        display: none;
    }
    .login-wrapper {
        width: 440px;
        min-height: auto;
        border-radius: 20px;
    }
    .login-form-area {
        border-radius: 20px;
    }
    .login-mobile-logo {
        display: block;
    }
}

@media (max-width: 480px) {
    body {
        align-items: flex-start;
        padding-top: 60px;
    }
    .login-wrapper {
        width: 100%;
        max-width: calc(100vw - 32px);
        border-radius: 16px;
    }
    .login-form-area {
        padding: 36px 28px;
    }
    .login-header h2 {
        font-size: 22px;
    }
    .input-wrap input {
        padding: 13px 16px 13px 42px;
    }
}
