@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700&display=swap');

/* ==========================================================================
   1. Root Variables (색상 통일)
   ========================================================================== */
:root {
    --color-primary: #004166; 
    --color-primary-hover: #002D47;
    --bg-main: #F9FAFB;   
    --bg-card: #FFFFFF;   
    --text-strong: #111827;      
    --text-normal: #4B5563;      
    --text-muted: #6B7280;       
    --text-placeholder: #9CA3AF; 
    --border-light: #E5E7EB; 
    --color-border: #D1D5DB; 
    --status-error: #E11D48;   
    --status-warning: #D97706; 
    --status-success: #16A34A; 
    --status-info: #2563EB;    
    --bg-error: #FFF1F2;
    --bg-warning: #FFFBEB;
    --bg-success: #F0FDF4;
    --bg-info: #EFF6FF;
}

/* ==========================================================================
   2. Reset & Base Layouts
   ========================================================================== */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Noto Sans KR', sans-serif; color: var(--text-strong); }

/* 배경 처리 */
body.auth-body { background: var(--bg-main); }
body.workspace-body { display: flex; height: 100vh; background: var(--bg-card); overflow: hidden; }

/* 페이지 공통 */
.page { position: relative; width: 1200px; margin: 0 auto; height: 100vh; }
/* 회원가입 컨테이너가 있는 경우 페이지 높이를 1120px로 자동 확장 */
.page:has(.signup-container) { height: 1120px; } 

/* ==========================================================================
   3. Auth Common Components (로그인/회원가입 공통 요소)
   ========================================================================== */
.form-group { position: absolute; z-index: 5; }
.label { font-weight: 700; color: var(--text-strong); }
.input-box {
    background: transparent; border: none; border-bottom: 2px solid var(--color-border);
    border-radius: 0; font-size: 15px; font-family: inherit; color: var(--text-strong);
    outline: none; transition: border-bottom-color 0.2s ease;
}
.input-box::placeholder { color: var(--text-placeholder); }
input[type="password"]::-ms-reveal { display: none; }

.error-message { position: absolute; color: var(--status-error); font-weight: 500; z-index: 5; }
.capslock-warning { display: none; color: var(--status-warning); font-weight: 500; }

/* 공통 그라데이션 버튼 */
.login-btn, .signup-btn {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-hover) 100%);
    border: none; border-radius: 12px; font-weight: 700; color: #FFFFFF;
    cursor: pointer; transition: 0.2s;
}

/* ==========================================================================
   4. Login Page Specific
   ========================================================================== */
.login-container {
    position: absolute; width: 540px; height: 600px; 
    left: 50%; top: 50%; transform: translate(-50%, -50%);
}
.login-box {
    position: absolute; width: 100%; height: 100%; 
    background: var(--bg-card); border-radius: 24px;
    border: 1px solid var(--border-light); box-shadow: 0 12px 30px rgba(0,0,0,0.06); z-index: 1;
}
.system-logo { position: absolute; width: 200px; height: auto; left: 50%; transform: translateX(-50%); top: 45px; object-fit: contain; z-index: 5; }
.company-logo { position: absolute; width: 120px; height: auto; left: 50%; transform: translateX(-50%); top: 510px; object-fit: contain; z-index: 5; }

.login-container .form-group { width: 360px; left: 94px; }
.login-container .id-group { top: 145px; }
.login-container .pw-group { top: 255px; }
.login-container .label { font-size: 16px; margin-bottom: 6px; }
.login-container .input-box { width: 100%; height: 50px; padding: 0 10px; }
.login-container .capslock-warning { margin-top: 5px; font-size: 13px; }
.login-container .error-message { left: 94px; top: 345px; font-size: 14px; }

.login-btn { position: absolute; width: 360px; height: 60px; left: 94px; top: 395px; font-size: 20px; z-index: 5; }

/* 로그인 화면 하단 회원가입 링크 */
.signup { position: absolute; width: 280px; height: 22px; left: 50%; transform: translateX(-50%); top: 477px; display: flex; gap: 8px; justify-content: center; align-items: center; font-size: 15px; z-index: 5; }
.signup-text { font-weight: 400; color: var(--text-muted); }
.signup-link { font-weight: 700; color: var(--color-primary); text-decoration: none; }
.signup-link:hover { text-decoration: underline; }

/* ==========================================================================
   5. Sign Up Page Specific
   ========================================================================== */
.signup-container {
    position: absolute; width: 540px; height: 1000px;
    left: 50%; top: 129px; transform: translateX(-50%);
}
.signup-box {
    position: absolute; width: 100%; height: 960px;
    background: var(--bg-card); border-radius: 24px; 
    border: 1px solid var(--border-light); box-shadow: 0 12px 30px rgba(0,0,0,0.06);
}

/* 1안 */
.signup-container .warning-text {
    position: absolute;
    width: 412px;
    left: 64px;
    top: 30px;
    font-size: 14px; 
    font-weight: 500;
    color: var(--text-normal); 
    text-align: center;
    z-index: 5;
    letter-spacing: -0.5px;
}

.signup-container .warning-text .highlight {
    color: #991B1B;; 
    font-weight: 700;
}


/* 2, 3, 4안 */
/* #78350F #991B1B; #C2410C;*/

.signup-container .form-group { width: 412px; left: 64px; }
.signup-container .secret-group { top: 92px; }      /* 기존 62px -> 92px */
.signup-container .id-group { top: 205px; }         /* 기존 175px -> 205px */
.signup-container .dept-group { top: 318px; }       /* 기존 288px -> 318px */
.signup-container .email-group { top: 431px; }      /* 기존 401px -> 431px */
.signup-container .pw-group { top: 544px; }         /* 기존 514px -> 544px */
.signup-container .pw-check-group { top: 657px; }   /* 기존 627px -> 657px */


.signup-container .label { font-size: 18px; margin-bottom: 5px; }
.signup-container .input-box { width: 100%; height: 58px; padding: 0 18px; }
.signup-container .capslock-warning { margin-top: 3px; font-size: 13px; }
.signup-container .error-message { 
    left: 64px; 
    top: 745px; /* 기존 715px -> 745px */
    width: 460px; 
    font-size: 16px; 
    display: flex; 
    align-items: center; 
}
.email-wrapper, .pw-wrapper { position: relative; width: 100%; }
.email-input { padding-right: 170px !important; }
.email-domain { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); color: var(--text-normal); font-size: 15px; font-weight: 500; pointer-events: none; }
.pw-conditions-inline { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 2px; pointer-events: none; text-align: right; }
.pw-conditions-inline.horizontal { flex-direction: row; gap: 6px; }
.pw-cond { font-size: 11px; font-weight: 600; color: var(--color-border); transition: color 0.2s; }
.pw-cond.met { color: var(--color-primary); }

.signup-btn { 
    position: absolute; 
    width: 412px; 
    height: 68px; 
    left: 64px; 
    top: 785px; /* 기존 755px -> 785px */
    font-size: 22px; 
    box-shadow: 0 4px 12px rgba(0, 65, 102, 0.2); 
}
/* 회원가입 화면 하단 로그인 링크 (원래 클래스명 복구) */
.login-link-wrapper { 
    position: absolute; 
    width: 285px; 
    left: 50%; 
    transform: translateX(-50%); 
    top: 870px; /* 기존 840px -> 870px */
    display: flex; 
    justify-content: center; 
    align-items: center; 
    gap: 8px; 
    font-size: 16px; 
    z-index: 5; 
}
.login-text { font-weight: 400; color: var(--text-muted); }
.login-link { font-weight: 700; color: var(--color-primary); text-decoration: none; }
.login-link:hover { text-decoration: underline; }

/* ==========================================================================
   6. Workspace Page Specific
   ========================================================================== */
.left-pane {
    position: relative; width: 17.2%; 
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-hover) 100%); 
    padding: 60px 40px; display: flex; flex-direction: column; justify-content: space-between; 
    color: #FFFFFF; flex-shrink: 0;
}
.logo { position: absolute; top: 40px; left: 40px; }
.logo a { text-decoration: none; display: block; }
.logo img { height: 24px; filter: brightness(0) invert(1); display: block; }

.greeting { margin: auto 0; }
.greeting h1 { font-size: clamp(20px, 2.5vw, 28px); font-weight: 700; margin-bottom: 12px; line-height: 1.3; }
.greeting p { font-size: 14px; opacity: 0.8; font-weight: 300; line-height: 1.5; }

.user-badge { display: inline-flex; align-items: center; justify-content: space-between; background: rgba(255,255,255,0.1); padding: 10px 16px; border-radius: 12px; font-size: 13px; backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.1); }
.user-badge a { color: #FFFFFF; font-weight: 500; text-decoration: none; opacity: 0.8; transition: 0.2s; }
.user-badge a:hover { opacity: 1; text-decoration: underline; }

.right-pane { flex: 1; padding: 50px 60px; overflow-y: auto; background: var(--bg-main); display: flex; flex-direction: column; justify-content: center; }
.header-right { margin-bottom: 30px; font-size: 13px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }

.grid-wrap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; max-width: 1200px; }
.card { background: var(--bg-card); border: 1px solid var(--border-light); border-radius: 16px; padding: 24px; text-decoration: none; color: inherit; transition: 0.2s; display: flex; flex-direction: column; }
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(0,0,0,0.06); border-color: var(--color-border); }

.icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.icon svg { width: 24px; height: 24px; }
.i-blue  { background: var(--bg-info); color: var(--status-info); }
.i-rose  { background: var(--bg-error); color: var(--status-error); }
.i-green { background: var(--bg-success); color: var(--status-success); }
.i-amber { background: var(--bg-warning); color: var(--status-warning); }

.c-tag { font-size: 12px; font-weight: 600; color: var(--text-placeholder); margin-bottom: 4px; }
.c-title { font-size: 17px; font-weight: 700; margin-bottom: 8px; color: var(--text-strong); letter-spacing: -0.02em; }
.c-desc  { font-size: 13px; color: var(--text-muted); line-height: 1.6; font-weight: 300; flex: 1; }
.cf-lbl  { font-size: 16px; color: var(--text-placeholder); font-weight: 500; transition: color 0.2s; }
.cf-arr  { font-size: 16px; color: var(--text-placeholder); transition: transform 0.2s, color 0.2s; }
.card:hover .cf-lbl { color: var(--text-strong); }
.card:hover .cf-arr { transform: translateX(4px); color: var(--text-strong); }

/* --- 변경/추가할 user-badge 스타일 --- */
.user-badge { 
    display: flex; 
    align-items: center; 
    gap: 12px; /* 요소 간 간격 */
    background: rgba(255,255,255,0.1); 
    padding: 12px 16px; 
    border-radius: 12px; 
    font-size: 13px; 
    backdrop-filter: blur(10px); 
    border: 1px solid rgba(255,255,255,0.1); 
}

/* 이름 영역이 남은 공간을 차지해 우측 버튼들을 오른쪽으로 밀어냅니다 */
.user-name {
    flex: 1;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-badge a { 
    color: #FFFFFF; 
    font-weight: 500; 
    text-decoration: none; 
    opacity: 0.8; 
    transition: 0.2s; 
    white-space: nowrap;
}
.user-badge a:hover { 
    opacity: 1; 
    text-decoration: underline; 
}

/* 관리자 버튼 전용 포인트 스타일 (다크 배경에서 눈에 띄는 옐로우 톤) */
.user-badge .btn-admin {
    color: #FCD34D;
    font-weight: 700;
    opacity: 1;
}
.user-badge .btn-admin:hover {
    color: #F59E0B;
}
