/* ═══════════════════════════════════════════════
   TalentCore HR System — Main Stylesheet
   design-system.css 와 함께 로드됨
   (충돌하는 .card .btn .grid-2 .form-* 는 design-system.css 가 담당)
   ═══════════════════════════════════════════════ */

/* ── Variables ────────────────────────────────── */
:root {
  --sidebar-w: 260px;
  --header-h: 64px;

  /* Brand — reference design */
  --primary:       #2b5bff;
  --primary-dark:  #001954;
  --primary-light: #6b8eff;
  --accent:        #6b8eff;

  /* Surface */
  --bg:       #f6f9ff;
  --card:     #ffffff;
  --border:   #e2e8f0;
  --header-bg:#ffffff;

  /* Text */
  --tx-1: #0f172a;
  --tx-2: #475569;
  --tx-3: #94a3b8;

  /* Status */
  --green:  #16a34a;
  --orange: #ea580c;
  --red:    #dc2626;
  --purple: #9333ea;

  /* Shadow */
  --sh-xs: 0 1px 2px rgba(0,0,0,.05);
  --sh-sm: 0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.04);
  --sh:    0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -1px rgba(0,0,0,.04);
  --sh-md: 0 10px 15px -3px rgba(0,0,0,.08), 0 4px 6px -2px rgba(0,0,0,.04);

  --r-sm: 6px;
  --r:    10px;
  --r-lg: 16px;

  --font: 'Plus Jakarta Sans', 'Apple SD Gothic Neo', 'Malgun Gothic', -apple-system, sans-serif;
}

/* ── Reset ────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--tx-1);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
button { font-family: var(--font); }
input, select, textarea { font-family: var(--font); }

/* ── App Shell ────────────────────────────────── */
.app-layout { display: flex; min-height: 100vh; width: 100%; }
.app-shell { display: flex; width: 100%; min-height: 100vh; }

/* ── Sidebar ──────────────────────────────────── */
.sidebar {
  width: 220px;
  min-width: 220px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  flex-shrink: 0;
  box-shadow: 1px 0 0 rgba(21,28,35,0.06);
  transition: width .22s ease, min-width .22s ease;
  z-index: 10;
}
.sidebar::-webkit-scrollbar { width: 0; }

/* ── Sidebar collapsed ───────────────────────── */
.sidebar.collapsed {
  width: 64px;
  min-width: 64px;
}
.sidebar.collapsed .brand-name,
.sidebar.collapsed .brand-sub,
.sidebar.collapsed .nav-item span,
.sidebar.collapsed .nav-category-btn span,
.sidebar.collapsed .nav-chevron,
.sidebar.collapsed .sidebar-footer-label {
  display: none;
}
.sidebar.collapsed .brand { padding: 6px 14px; justify-content: center; }
.sidebar.collapsed .brand-mark { margin: 0; }
.sidebar.collapsed .nav-category-btn {
  justify-content: center;
  padding: 8px 0;
}
.sidebar.collapsed .nav-item {
  justify-content: center;
  padding: 10px 0;
  gap: 0;
  border-radius: 10px;
}
.sidebar.collapsed .nav-item i { width: auto; font-size: 16px; }
.sidebar.collapsed .nav-section-body { padding: 0 8px; }
.sidebar.collapsed .sidebar-footer { padding: 10px 8px; }
.sidebar.collapsed .nav-section-divider { display: none; }

/* collapsed 상태에서 nav-item 툴팁 */
.sidebar.collapsed .nav-item[title]:hover::after {
  content: attr(title);
  position: absolute;
  left: 72px;
  background: #151c23;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 7px;
  white-space: nowrap;
  z-index: 999;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0,0,0,.2);
}
.sidebar.collapsed .nav-item[title] { position: relative; }

/* 사이드바 토글 버튼 */
.sidebar-toggle-btn {
  display: flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--tx-3);
  cursor: pointer;
  font-size: 11px;
  transition: background .15s, color .15s;
  flex-shrink: 0;
}
.sidebar-toggle-btn:hover { background: var(--bg); color: var(--tx-1); }

/* 섹션 구분선 */
.nav-section-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 14px;
}

/* brand 블록 */
.brand { display: flex; align-items: center; gap: 12px; padding: 6px 10px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 12px;
  background: linear-gradient(135deg, #2b5bff, #6b8eff);
  display: grid; place-items: center;
  color: white; font-weight: 800; font-size: 15px; letter-spacing: -0.03em;
}
.brand-name {
  font-weight: 700; font-size: 18px; letter-spacing: -0.02em;
  color: #151c23;
}

.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
/* ── Nav Category (Me / Team / Admin) ─────────── */
.nav-category { margin-bottom: 2px; }

.nav-category-btn {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 10px 14px 6px;
  background: none; border: none; cursor: pointer;
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.16em;
  color: #6b7a8c; font-family: var(--font);
  transition: color .15s;
}
.nav-category-btn:hover { color: #3a4a5c; }
.nav-chevron {
  font-size: 9px; transition: transform .2s ease;
}
.nav-section-body { display: block; }

/* 하위 호환 */
.nav-section { margin-bottom: 4px; }
.nav-section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #6b7a8c;
  padding: 16px 14px 8px;
  display: block;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 12px;
  color: #4a5568;
  font-size: 14px;
  font-weight: 500;
  transition: background .15s, color .15s;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  text-decoration: none;
}
.nav-item:hover {
  background: #edf4fe;
  color: #151c23;
}
.nav-item.active {
  background: #edf4fe;
  color: #151c23;
  font-weight: 600;
}
.nav-item.active i { color: #2b5bff; }
.nav-item i { width: 16px; font-size: 14px; flex-shrink: 0; color: #6b7a8c; }
.nav-item:hover i { color: #151c23; }

/* ── 사이드바 접이식 서브그룹 ─────────────────────── */
.nav-subgroup-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 12px;
  color: #4a5568;
  font-size: 14px;
  font-weight: 500;
  transition: background .15s, color .15s;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}
.nav-subgroup-btn:hover { background: #edf4fe; color: #151c23; }
.nav-subgroup-btn:hover i { color: #151c23; }
.nav-subgroup-btn i.sg-icon { width: 16px; font-size: 14px; flex-shrink: 0; color: #6b7a8c; }
.nav-subgroup-btn .sg-label { flex: 1; }
.nav-subgroup-btn .sg-arrow {
  font-size: 10px;
  color: #6b7a8c;
  transition: transform .2s;
}
.nav-subgroup-btn.open .sg-arrow { transform: rotate(180deg); }
.nav-subgroup-btn.active-group { color: #151c23; font-weight: 600; }
.nav-subgroup-btn.active-group i.sg-icon { color: #2b5bff; }

.nav-subgroup-body {
  overflow: hidden;
  max-height: 0;
  transition: max-height .25s ease;
}
.nav-subgroup-body.open { max-height: 200px; }
.nav-subgroup-body .nav-item {
  padding-left: 36px;
  font-size: 13px;
}

/* collapsed 사이드바에서 서브그룹 버튼 */
.sidebar.collapsed .nav-subgroup-btn {
  justify-content: center;
  padding: 10px 0;
  gap: 0;
  border-radius: 10px;
}
.sidebar.collapsed .nav-subgroup-btn .sg-label,
.sidebar.collapsed .nav-subgroup-btn .sg-arrow { display: none; }
.sidebar.collapsed .nav-subgroup-body { max-height: 0 !important; }

.sidebar-footer {
  padding: 10px;
  flex-shrink: 0;
}

/* ── Main Wrapper ─────────────────────────────── */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0; /* 그리드 overflow 방지 */
}

/* ── Header ───────────────────────────────────── */
.header {
  height: var(--header-h);
  background: var(--header-bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 0 rgba(21,28,35,0.06);
}
.header-left { display: flex; align-items: center; gap: 14px; }
.page-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.5px;
  background: linear-gradient(90deg, var(--primary) 0%, #6b8eff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  padding-left: 12px;
  border-left: 3px solid var(--primary);
  line-height: 1.2;
}
.header-right { display: flex; align-items: center; gap: 10px; position: relative; }

.icon-btn {
  position: relative;
  background: none; border: none; cursor: pointer;
  width: 38px; height: 38px;
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--tx-2); font-size: 15px;
  transition: all .15s;
}
.icon-btn:hover { background: var(--bg); color: var(--tx-1); }
.notif-badge {
  position: absolute; top: 5px; right: 5px;
  background: var(--red); color: #fff;
  font-size: 9px; font-weight: 700;
  width: 15px; height: 15px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

.divider-v {
  width: 1px; height: 28px;
  background: var(--border); flex-shrink: 0;
}

.user-pill {
  display: flex; align-items: center; gap: 10px;
  padding: 5px 10px;
  border-radius: var(--r);
  cursor: pointer; transition: background .15s;
  position: relative;
  user-select: none;
}
.user-pill:hover { background: var(--bg); }

/* ── 유저 드롭다운 ──────────────────────────────── */
.user-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 220px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  z-index: 200;
}
.user-dropdown.open { display: block; }
.user-dropdown-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  font-size: 13.5px; font-weight: 500;
  color: var(--tx-1);
  border-radius: 8px;
  text-decoration: none;
  transition: background .12s;
  cursor: pointer;
}
.user-dropdown-item:hover { background: var(--bg); }
.user-dropdown-item i { width: 16px; font-size: 13px; color: var(--tx-3); }
.user-avatar {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 13px;
  flex-shrink: 0;
}
.user-info-wrap { display: flex; flex-direction: column; line-height: 1.25; }
.user-fullname { font-size: 13.5px; font-weight: 700; color: var(--tx-1); }
.user-rolelabel { font-size: 11px; color: var(--tx-3); }

/* ── Page Content ─────────────────────────────── */
.page-content { flex: 1; padding: 28px 24px 64px; }

/* ── Dashboard layout helpers ─────────────────── */
.grid-dash { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; }
@media (max-width: 900px) { .grid-dash { grid-template-columns: 1fr; } }
/* card with card-head: reset outer padding so inner sections control spacing */
.card:has(> .card-head) { padding: 0; overflow: hidden; }

/* ── Card shell (layout helpers, design-system.css 가 .card 기본 담당) */
.card-head {
  padding: 16px 22px;
  display: flex; align-items: center; justify-content: space-between;
}
.card-title { font-size: 14.5px; font-weight: 700; color: var(--tx-1); }
.card-body  { padding: 22px; }

/* ── Welcome Banner ───────────────────────────── */
.welcome-banner {
  background: linear-gradient(135deg, #0f2544 0%, #1e3a8a 55%, #2563eb 100%);
  border-radius: var(--r-lg);
  padding: 26px 32px;
  margin-bottom: 22px;
  color: #fff;
  display: flex; align-items: center; justify-content: space-between;
  position: relative; overflow: hidden;
}
.welcome-banner::before {
  content: '';
  position: absolute; right: -50px; top: -50px;
  width: 220px; height: 220px; border-radius: 50%;
  background: rgba(255,255,255,.04);
}
.welcome-banner::after {
  content: '';
  position: absolute; right: 80px; bottom: -70px;
  width: 170px; height: 170px; border-radius: 50%;
  background: rgba(255,255,255,.04);
}
.welcome-greeting { font-size: 20px; font-weight: 800; letter-spacing: -.3px; margin-bottom: 4px; }
.welcome-sub { font-size: 13px; opacity: .75; }
.welcome-icon { font-size: 52px; opacity: .15; z-index: 1; }

/* ── Stat Grid ────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}
.stat-card {
  background: var(--card);
  border-radius: var(--r);
  padding: 20px;
  box-shadow: var(--sh-sm);
  display: flex; align-items: flex-start; gap: 14px;
}
.stat-ico {
  width: 46px; height: 46px; border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 19px; flex-shrink: 0;
}
.ico-blue   { background: #eff6ff; color: #2563eb; }
.ico-green  { background: #f0fdf4; color: var(--green); }
.ico-orange { background: #fff7ed; color: var(--orange); }
.ico-purple { background: #faf5ff; color: var(--purple); }
.ico-red    { background: #fef2f2; color: var(--red); }

.stat-body {}
.stat-val {
  font-size: 28px; font-weight: 900;
  color: var(--tx-1); line-height: 1;
  margin-bottom: 3px; letter-spacing: -.5px;
}
.stat-lbl { font-size: 12.5px; color: var(--tx-3); font-weight: 500; }

/* ── Table ────────────────────────────────────── */
.tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
thead { background: #f8fafc; }
th {
  padding: 10px 16px;
  text-align: left;
  font-size: 11px; font-weight: 700;
  color: var(--tx-3);
  text-transform: uppercase; letter-spacing: .5px;
  white-space: nowrap;
}
td {
  padding: 13px 16px;
  color: var(--tx-1); vertical-align: middle;
}
tbody tr:hover { background: #fafbfd; }

/* ── User cell ────────────────────────────────── */
.u-cell { display: flex; align-items: center; gap: 10px; }
.avatar-xs {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 11px; font-weight: 800; flex-shrink: 0;
}
.u-name { font-weight: 600; font-size: 13.5px; }
.u-sub  { font-size: 11.5px; color: var(--tx-3); }

/* ── Status Badge ─────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 20px;
  font-size: 11.5px; font-weight: 700;
}
.badge::before {
  content: '';
  width: 5px; height: 5px; border-radius: 50%;
  background: currentColor; flex-shrink: 0;
}
.badge-active   { background: #f0fdf4; color: var(--green); }
.badge-pending  { background: #fff7ed; color: var(--orange); }
.badge-inactive { background: #f1f5f9; color: #64748b; }
.badge-reject   { background: #fef2f2; color: var(--red); }
.badge-info     { background: #eff6ff; color: #2563eb; }

/* ── Pipeline Kanban (Recruiter) ──────────────── */
.pipeline-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.pipeline-col {
  background: var(--bg);
  border-radius: var(--r);
  padding: 14px;
}
.pipeline-col-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.pipeline-col-title { font-size: 12.5px; font-weight: 700; color: var(--tx-2); }
.pipeline-count {
  background: var(--card);
  border-radius: 20px;
  padding: 1px 8px;
  font-size: 11px; font-weight: 700; color: var(--tx-3);
}
.candidate-card {
  background: var(--card);
  border-radius: var(--r-sm);
  padding: 13px;
  margin-bottom: 8px;
  box-shadow: var(--sh-xs);
  cursor: pointer; transition: box-shadow .15s;
}
.candidate-card:hover { box-shadow: var(--sh); }
.cand-name { font-size: 13.5px; font-weight: 700; margin-bottom: 3px; }
.cand-pos  { font-size: 11.5px; color: var(--tx-3); margin-bottom: 8px; }
.cand-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* ── Info List (Employee profile) ─────────────── */
.info-list { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px; }
.info-item {}
.info-label { font-size: 11px; font-weight: 700; text-transform: uppercase;
              letter-spacing: .5px; color: var(--tx-3); margin-bottom: 3px; }
.info-value { font-size: 14px; font-weight: 600; color: var(--tx-1); }

/* ── Leave Bar ────────────────────────────────── */
.leave-bar-wrap { margin-top: 6px; }
.leave-bar-track {
  height: 7px; border-radius: 99px;
  background: var(--bg); overflow: hidden; margin: 6px 0 4px;
}
.leave-bar-fill {
  height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
}
.leave-bar-labels {
  display: flex; justify-content: space-between;
  font-size: 11px; color: var(--tx-3);
}

/* ── Login ────────────────────────────────────── */
.login-page { min-height: 100vh; display: flex; }
.login-left {
  flex: 1;
  background: linear-gradient(160deg, #0d0f14 0%, #141824 55%, #1c2235 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 60px; position: relative; overflow: hidden;
  -webkit-font-smoothing: auto;
}
.login-left::before {
  content: '';
  position: absolute;
  width: 500px; height: 500px; border-radius: 50%;
  background: rgba(255,255,255,.03);
  top: -150px; right: -150px;
}
.login-left::after {
  content: '';
  position: absolute;
  width: 350px; height: 350px; border-radius: 50%;
  background: rgba(255,255,255,.03);
  bottom: -100px; left: -80px;
}
.login-brand { text-align: center; z-index: 1; }
.brand-icon-wrap {
  width: 76px; height: 76px;
  background: rgba(255,255,255,.1);
  border-radius: 22px;
  display: flex; align-items: center; justify-content: center;
  font-size: 34px; margin: 0 auto 20px;
  backdrop-filter: blur(10px);
}
.login-brand-name { font-size: 34px; font-weight: 900; color: #fff; letter-spacing: -.5px; margin-bottom: 10px; }
.brand-tagline { font-size: 15px; color: rgba(255,255,255,.55); max-width: 260px; line-height: 1.6; margin: 0 auto; }

.login-features { display: flex; flex-direction: column; gap: 14px; margin-top: 40px; z-index: 1; }
.login-feature {
  display: flex; align-items: center; gap: 13px;
  background: rgba(255,255,255,.06);
  border-radius: var(--r);
  padding: 14px 18px;
  color: rgba(255,255,255,.8);
}
.login-feature i { font-size: 18px; color: var(--accent); flex-shrink: 0; }
.login-feature-text { font-size: 13.5px; font-weight: 500; }

.login-right {
  width: 500px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 60px 56px; background: #fff;
}
.login-form-box { width: 100%; max-width: 380px; }
.login-title { font-size: 26px; font-weight: 900; color: var(--tx-1); letter-spacing: -.5px; margin-bottom: 6px; }
.login-sub { font-size: 13.5px; color: var(--tx-3); margin-bottom: 32px; }
.login-fg { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; }
.login-label { font-size: 12px; font-weight: 600; color: var(--tx-2); letter-spacing: .02em; }
.login-input {
  width: 100%; padding: 12px 16px;
  border: 1.5px solid #e2e8f0;
  border-radius: var(--r-sm);
  font-size: 14px; color: var(--tx-1);
  background: #f8fafc;
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
  font-family: inherit;
}
.login-input:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.login-input::placeholder { color: #94a3b8; }
.btn-login {
  width: 100%; padding: 12px;
  background: var(--primary); color: #fff;
  border: none; border-radius: var(--r-sm);
  font-size: 14.5px; font-weight: 700;
  cursor: pointer; margin-top: 6px;
  transition: all .2s; letter-spacing: -.1px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-login:hover { background: #1d4ed8; box-shadow: 0 4px 14px rgba(37,99,235,.3); transform: translateY(-1px); }
.btn-login:active { transform: translateY(0); }
.login-error {
  background: #fef2f2;
  color: var(--red); padding: 10px 13px;
  border-radius: var(--r-sm); font-size: 13px;
  margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}
.test-accounts {
  margin-top: 26px; padding: 15px;
  background: #f8fafc;
  border-radius: var(--r-sm);
}

/* ── Global Search ────────────────────────────── */
.global-search-wrap {
  position: relative;
  flex: 1; max-width: 420px; margin: 0 20px;
}
.global-search-inner {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  padding: 7px 12px;
  transition: border-color .15s, box-shadow .15s;
}
.global-search-wrap.search-focused .global-search-inner {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(43,91,255,.1);
  background: #fff;
}
.global-search-icon { color: var(--tx-3); font-size: 13px; flex-shrink: 0; }
.global-search-input {
  flex: 1; border: none; background: none; outline: none;
  font-size: 13.5px; color: var(--tx-1); font-family: var(--font);
}
.global-search-input::placeholder { color: var(--tx-3); }
.search-kbd {
  background: #f1f5f9; border: 1px solid #e2e8f0;
  border-radius: 4px; padding: 1px 6px;
  font-size: 11px; color: var(--tx-3); font-family: var(--font);
  flex-shrink: 0;
}
.global-search-results {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: #fff; border-radius: var(--r);
  box-shadow: 0 8px 24px rgba(0,0,0,.12), 0 2px 6px rgba(0,0,0,.06);
  border: 1px solid var(--border);
  z-index: 500; overflow: hidden;
}
.search-result-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; text-decoration: none;
  color: var(--tx-1); font-size: 13.5px; font-weight: 500;
  transition: background .1s;
  outline: none;
}
.search-result-item:hover, .search-result-item:focus { background: #f1f5fb; }
.search-result-icon { width: 14px; color: var(--tx-3); font-size: 13px; flex-shrink: 0; }
.search-empty { padding: 14px; text-align: center; color: var(--tx-3); font-size: 13px; }
.search-section-label { padding: 6px 14px 3px; font-size: 10px; font-weight: 700; color: var(--tx-3); text-transform: uppercase; letter-spacing: .06em; }

/* ── Inbox Widget ─────────────────────────────── */
.inbox-widget { }
.inbox-empty {
  display: flex; flex-direction: column; align-items: center;
  padding: 36px 20px; gap: 10px; color: var(--tx-3);
}
.inbox-empty i { font-size: 30px; opacity: .35; }
.inbox-empty-text { font-size: 13px; font-weight: 500; }
.inbox-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 22px;
  border-bottom: 1px solid rgba(21,28,35,.05);
  transition: background .12s;
}
.inbox-item:last-child { border-bottom: none; }
.inbox-item:hover { background: #fafbfd; }
.inbox-item-ico {
  width: 38px; height: 38px; border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; flex-shrink: 0;
}
.inbox-item-body { flex: 1; min-width: 0; }
.inbox-item-title { font-size: 13.5px; font-weight: 600; color: var(--tx-1); }
.inbox-item-sub { font-size: 12px; color: var(--tx-3); margin-top: 1px; }
.inbox-item-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* ── Quick Actions Grid ───────────────────────── */
.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
@media (max-width: 900px) { .quick-actions-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .quick-actions-grid { grid-template-columns: repeat(2, 1fr); } }
.qa-btn {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 16px 8px;
  background: var(--bg); border-radius: var(--r);
  text-decoration: none; color: var(--tx-2);
  font-size: 12px; font-weight: 600;
  transition: background .15s, color .15s, transform .1s, box-shadow .15s;
  border: 1.5px solid transparent;
  text-align: center;
}
.qa-btn:hover {
  background: #fff; color: var(--tx-1);
  border-color: var(--border);
  box-shadow: var(--sh-sm);
  transform: translateY(-1px);
}
.qa-btn-ico {
  width: 42px; height: 42px; border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}

/* ── Scrollbar ────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ══════════════════════════════════════════════
   Responsive
   ══════════════════════════════════════════════ */
.hamburger {
  display: none;
  background: none; border: none; cursor: pointer;
  width: 38px; height: 38px; border-radius: var(--r-sm);
  align-items: center; justify-content: center;
  color: var(--tx-2); font-size: 18px;
  transition: background .15s; flex-shrink: 0;
}
.hamburger:hover { background: var(--bg); }

.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 99;
}
.sidebar-overlay.active { display: block; }

@media (max-width: 768px) {
  /* 레이아웃 */
  .app-shell { grid-template-columns: 1fr; }
  .hamburger { display: flex; }
  .sidebar-toggle-btn { display: none !important; }
  .sidebar {
    position: fixed; inset: 0 auto 0 0;
    transform: translateX(-100%);
    transition: transform .25s ease;
    z-index: 200;
    width: 240px !important; /* collapsed 상태 무시 */
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar.collapsed { width: 240px !important; }
  .sidebar.collapsed .nav-item span,
  .sidebar.collapsed .nav-category-btn span,
  .sidebar.collapsed .brand-name,
  .sidebar.collapsed .sidebar-footer-name { display: block !important; }

  /* 헤더 */
  .header { padding: 0 16px; }
  .user-info-wrap { display: none; }
  .divider-v { display: none; }
  .global-search-wrap { max-width: 180px; }

  /* 콘텐츠 */
  .page-content { padding: 16px; }
  .info-list { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }

  /* 인라인 grid 2컬럼 → 1컬럼 강제 (계약서뷰, 직원상세 등) */
  [style*="grid-template-columns:1fr 320px"],
  [style*="grid-template-columns: 1fr 320px"],
  [style*="grid-template-columns:2fr 1fr"],
  [style*="grid-template-columns: 2fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* 달력 */
  .cal-cell { min-height: 60px; padding: 4px; }
  .cal-event { font-size: 10px; padding: 1px 4px; }

  /* 파이프라인 */
  .pipeline-board { grid-template-columns: repeat(4, 240px); overflow-x: auto; padding-bottom: 10px; }

  /* 로그인 */
  .login-left { display: none; }
  .login-right { width: 100%; padding: 40px 28px; }

  /* 대시보드 배너 */
  .welcome-greeting { font-size: 16px; }
  .welcome-icon { font-size: 36px; }
  .welcome-banner { padding: 20px 22px; }

  /* 성과 */
  .cycles-layout { grid-template-columns: 1fr !important; }

  /* 테이블 */
  td, th { padding: 10px 12px; font-size: 12.5px; }
}

@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr; }
  .page-title { font-size: 14px; }
  .btn-sm .btn-label { display: none; }
  .welcome-icon { display: none; }
  .cal-date { font-size: 10px; }
  .cal-extra { font-size: 9.5px; }

  /* 검색바 숨김 (너무 좁음) */
  .global-search-wrap { display: none; }

  /* 헤더 우측 아이콘만 */
  .user-pill-name { display: none; }
}
