/* ───── Reset & Base ───── */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #1a1d24;
  background: #f6f7f9;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input { font-family: inherit; outline: none; border: none; }
ul { list-style: none; }

/* ───── Demo Banner ───── */
.demo-banner {
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  color: white;
  padding: 8px 24px;
  text-align: center;
  font-size: 13px;
}
.demo-banner a {
  color: white;
  text-decoration: underline;
  margin-left: 12px;
  cursor: pointer;
}

/* ───── App Shell ───── */
.app-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  height: calc(100vh - 35px);
}

/* ───── Sidebar ───── */
.sidebar {
  background: #1a1d24;
  color: #c5c8cf;
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px 20px;
  border-bottom: 1px solid #2c3038;
  margin-bottom: 16px;
}
.brand-logo {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 700; font-size: 18px;
}
.brand-name { color: #fff; font-weight: 600; font-size: 14px; }
.brand-sub { color: #6b7280; font-size: 11px; }

.nav-main, .nav-projects { display: flex; flex-direction: column; gap: 2px; }
.nav-section-title {
  color: #6b7280;
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 600;
  padding: 16px 8px 6px;
  letter-spacing: 0.5px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
  color: #c5c8cf;
  position: relative;
  transition: background 0.15s;
}
.nav-item:hover { background: #2c3038; color: #fff; }
.nav-item.active { background: #6366f1; color: #fff; }
.nav-icon { width: 18px; text-align: center; }
.nav-badge {
  margin-left: auto;
  background: #ef4444;
  color: white;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 10px;
}
.nav-item.project { font-size: 12.5px; padding: 6px 10px; }
.nav-item.project.add { color: #6b7280; font-size: 12px; }
.dot {
  width: 8px; height: 8px; border-radius: 50%; display: inline-block;
}
.dot-blue { background: #3b82f6; }
.dot-green { background: #10b981; }
.dot-orange { background: #f59e0b; }
.dot-purple { background: #a855f7; }

.sidebar-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid #2c3038;
}
.powered {
  font-size: 10.5px;
  color: #6b7280;
  padding: 0 8px;
  text-align: center;
}
.powered strong { color: #a78bfa; }

/* ───── Main / Topbar ───── */
.main {
  background: #f6f7f9;
  overflow-y: auto;
}
.topbar {
  background: white;
  border-bottom: 1px solid #e5e7eb;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar-left { flex: 1; }
.search {
  width: 100%;
  max-width: 480px;
  padding: 8px 12px;
  background: #f3f4f6;
  border-radius: 8px;
  font-size: 13px;
}
.topbar-right { display: flex; align-items: center; gap: 12px; }
.icon-btn {
  position: relative;
  font-size: 16px;
  padding: 6px;
  border-radius: 6px;
}
.icon-btn:hover { background: #f3f4f6; }
.dot-badge {
  position: absolute;
  top: 2px; right: 2px;
  background: #ef4444;
  color: white;
  font-size: 9px;
  border-radius: 8px;
  padding: 1px 4px;
  font-weight: 600;
}
.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px 4px 4px;
  border-radius: 8px;
}
.user-chip:hover { background: #f3f4f6; }
.avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 13px;
}
.avatar.small { width: 28px; height: 28px; font-size: 12px; }
.avatar.tiny { width: 22px; height: 22px; font-size: 10px; }
.avatar.green { background: linear-gradient(135deg, #10b981, #059669); }
.avatar.ai-av { background: linear-gradient(135deg, #f59e0b, #ef4444); font-size: 14px; }
.user-info { line-height: 1.2; }
.user-name { font-size: 12.5px; font-weight: 600; }
.user-mail { font-size: 10.5px; color: #6b7280; }

/* ───── Views ───── */
.view {
  display: none;
  padding: 24px;
  max-width: 1400px;
  margin: 0 auto;
}
.view.active { display: block; }

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
.page-header h1 {
  font-size: 22px;
  font-weight: 700;
  color: #111827;
}
.page-header .subtitle {
  color: #6b7280;
  font-size: 13px;
  margin-top: 4px;
}
.page-sub { color: #9ca3af; font-weight: 400; font-size: 16px; }
.page-actions { display: flex; gap: 8px; }

.btn-primary, .btn-secondary {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  transition: opacity 0.15s;
}
.btn-primary { background: #6366f1; color: white; }
.btn-primary:hover { opacity: 0.9; }
.btn-secondary { background: white; color: #374151; border: 1px solid #e5e7eb; }
.btn-secondary:hover { background: #f9fafb; }

/* ───── Cards / Grid ───── */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
@media (max-width: 900px) {
  .grid-2 { grid-template-columns: 1fr; }
}
.card {
  background: white;
  border-radius: 12px;
  padding: 16px 18px;
  border: 1px solid #e5e7eb;
}
.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f3f4f6;
}
.card-title { font-weight: 600; font-size: 14px; }
.card-title .count {
  background: #f3f4f6;
  color: #6b7280;
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 10px;
  margin-left: 6px;
  font-weight: 600;
}
.card-link {
  font-size: 12px;
  color: #6366f1;
  font-weight: 500;
}

/* ───── Task list ───── */
.task-list { display: flex; flex-direction: column; gap: 8px; }
.task-list li {
  display: flex;
  gap: 10px;
  padding: 6px 0;
  align-items: flex-start;
}
.task-list input[type=checkbox] { margin-top: 4px; cursor: pointer; }
.task-content { flex: 1; }
.task-title { font-size: 13px; color: #111827; }
.task-meta { font-size: 11px; color: #6b7280; margin-top: 2px; }
.tag {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 600;
  margin-right: 4px;
}
.tag-blue { background: #dbeafe; color: #1e40af; }
.tag-green { background: #d1fae5; color: #047857; }
.tag-orange { background: #fed7aa; color: #c2410c; }
.tag-purple { background: #ede9fe; color: #6d28d9; }

/* ───── Schedule ───── */
.schedule-list { display: flex; flex-direction: column; gap: 10px; }
.schedule-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 6px 0;
}
.time {
  font-weight: 700;
  color: #6366f1;
  font-size: 13px;
  min-width: 50px;
}
.event { flex: 1; }
.event-title { font-size: 13px; color: #111827; font-weight: 500; }
.event-meta { font-size: 11px; color: #6b7280; margin-top: 2px; }
.badge-meet {
  background: #fef3c7;
  color: #92400e;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 3px;
  margin-left: 4px;
}

/* ───── Mail list (dashboard) ───── */
.mail-list, .notice-list { display: flex; flex-direction: column; gap: 10px; }
.mail-list li {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 4px 0;
}
.mail-body { flex: 1; min-width: 0; }
.mail-from { font-size: 12.5px; font-weight: 600; }
.mail-subject {
  font-size: 12px;
  color: #6b7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mail-time { font-size: 11px; color: #9ca3af; }

/* ───── Notice ───── */
.notice-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 4px 0;
}
.notice-list .pin { color: #f59e0b; font-weight: 700; }
.notice-title { font-size: 13px; }
.notice-meta { font-size: 11px; color: #6b7280; }

/* ───── AI prompt card ───── */
.ai-prompt-card {
  background: linear-gradient(135deg, #1a1d24, #2c3038);
  color: white;
  border-radius: 12px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.ai-icon { font-size: 28px; }
.ai-text { flex: 1; min-width: 200px; }
.ai-label { font-size: 14px; font-weight: 600; }
.ai-sub { font-size: 11.5px; color: #9ca3af; margin-top: 2px; }
.ai-input {
  flex: 2;
  min-width: 240px;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(255,255,255,0.1);
  color: white;
  font-size: 13px;
}
.ai-input::placeholder { color: rgba(255,255,255,0.5); }

/* ───── Kanban ───── */
.kanban {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
@media (max-width: 1100px) {
  .kanban { grid-template-columns: repeat(2, 1fr); }
}
.kanban-col {
  background: #f3f4f6;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 400px;
}
.kanban-head {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  color: #4b5563;
  text-transform: uppercase;
  padding: 4px 6px 8px;
  letter-spacing: 0.5px;
}
.kanban-head .count {
  background: white;
  color: #6b7280;
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 11px;
}
.kanban-card {
  background: white;
  border-radius: 8px;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  cursor: grab;
  transition: transform 0.1s, box-shadow 0.1s;
}
.kanban-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.kanban-card.done { opacity: 0.65; }
.kanban-card.add-card {
  background: transparent;
  border: 1px dashed #d1d5db;
  color: #9ca3af;
  text-align: center;
  font-size: 12px;
  cursor: pointer;
}
.card-tag {
  display: inline-block;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 3px;
  font-weight: 600;
  margin-bottom: 6px;
}
.card-title-sm { font-size: 13px; line-height: 1.4; }
.card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}
.due { font-size: 11px; color: #6b7280; }
.due.overdue, .due.hot { color: #ef4444; font-weight: 600; }

/* ───── Chat / AI view ───── */
.chat-container {
  background: white;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid #e5e7eb;
}
.chat-msg {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  align-items: flex-start;
}
.chat-msg.user { flex-direction: row-reverse; }
.msg-bubble {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.55;
}
.chat-msg.user .msg-bubble {
  background: #6366f1;
  color: white;
}
.ai-bubble {
  background: #f3f4f6;
  color: #1a1d24;
  width: 80%;
  max-width: 720px;
}
.msg-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px 14px;
  margin-top: 8px;
}
.msg-card-head {
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #f3f4f6;
}
.badge-tiro {
  background: #ede9fe;
  color: #6d28d9;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 6px;
  font-weight: 600;
}
.msg-bullets {
  padding-left: 20px;
  font-size: 12.5px;
}
.msg-bullets li { margin: 4px 0; list-style: disc; }
.msg-links {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #f3f4f6;
  font-size: 12px;
}
.msg-links a { color: #6366f1; text-decoration: underline; }

.mail-draft { font-size: 12.5px; }
.mail-draft hr { margin: 8px 0; border: 0; border-top: 1px solid #e5e7eb; }
.mail-body-text {
  white-space: pre-wrap;
  background: #f9fafb;
  padding: 10px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.7;
  color: #374151;
}
.msg-actions {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}
.msg-actions button {
  padding: 6px 10px;
  font-size: 11.5px;
}

.chat-input-bar {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
}
.quick-cmds {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.quick-cmds button {
  background: #f3f4f6;
  color: #6b7280;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 12px;
  font-family: 'JetBrains Mono', Monaco, monospace;
}
.quick-cmds button:hover { background: #e5e7eb; }
.input-row { display: flex; gap: 8px; }
.input-row input {
  flex: 1;
  padding: 10px 14px;
  background: #f3f4f6;
  border-radius: 8px;
  font-size: 13px;
}

/* ───── Mail Layout ───── */
.mail-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 16px;
  background: white;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  overflow: hidden;
}
.mail-folders {
  background: #f9fafb;
  padding: 12px;
  border-right: 1px solid #e5e7eb;
}
.folder {
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 2px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
}
.folder:hover { background: #f3f4f6; }
.folder.active { background: #6366f1; color: white; font-weight: 600; }
.folder.active .count { color: white; }
.folder .count { color: #9ca3af; font-size: 12px; }
.folder-section {
  font-size: 11px;
  text-transform: uppercase;
  color: #6b7280;
  font-weight: 600;
  padding: 16px 10px 6px;
  letter-spacing: 0.5px;
}

.mail-listing { padding: 0; }
.mail-row {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #f3f4f6;
  cursor: pointer;
}
.mail-row:hover { background: #f9fafb; }
.mail-row.unread { background: #fafbff; font-weight: 600; }
.mail-row.unread .mail-row-from { color: #1a1d24; }
.mail-row-body { flex: 1; min-width: 0; }
.mail-row-from { font-size: 13px; }
.mail-row-subject {
  font-size: 12.5px;
  color: #6b7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
  font-weight: 400;
}
.mail-row-time { font-size: 11px; color: #9ca3af; }

/* ───── Calendar ───── */
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: #e5e7eb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
}
.cal-head {
  background: #f9fafb;
  padding: 10px;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  color: #6b7280;
}
.cal-cell {
  background: white;
  min-height: 110px;
  padding: 8px;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cal-cell.weekend { background: #fafbfc; color: #9ca3af; }
.cal-cell.today { background: #fafbff; }
.cal-cell.today .day-num {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.today-tag {
  background: #6366f1;
  color: white;
  font-size: 9px;
  padding: 1px 6px;
  border-radius: 8px;
  font-weight: 600;
}
.ev {
  font-size: 10.5px;
  padding: 2px 6px;
  border-radius: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ev-blue { background: #dbeafe; color: #1e40af; }
.ev-orange { background: #fed7aa; color: #c2410c; }
.ev-purple { background: #ede9fe; color: #6d28d9; }
.ev-green { background: #d1fae5; color: #047857; }

/* ───── Files ───── */
.file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.file-card {
  background: white;
  border-radius: 10px;
  padding: 16px;
  border: 1px solid #e5e7eb;
  text-align: center;
  cursor: pointer;
  transition: box-shadow 0.15s;
}
.file-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.06); }
.file-icon {
  font-size: 32px;
  margin-bottom: 8px;
}
.file-name {
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 4px;
  word-break: break-all;
}
.file-meta { font-size: 11px; color: #6b7280; }

/* ───── Wiki ───── */
.wiki-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.wiki-card {
  background: white;
  border-radius: 12px;
  padding: 18px;
  border: 1px solid #e5e7eb;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.15s;
}
.wiki-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.wiki-icon { font-size: 28px; margin-bottom: 8px; }
.wiki-title { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.wiki-desc { font-size: 12.5px; color: #6b7280; line-height: 1.5; }
.wiki-meta {
  font-size: 11px;
  color: #9ca3af;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #f3f4f6;
}

/* ───── Mobile preview popup ───── */
.mobile-preview {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.85);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 20px;
}
.mobile-preview.active { display: flex; }
.phone-frame {
  width: 320px;
  height: 640px;
  background: #1a1d24;
  border-radius: 36px;
  padding: 12px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.phone-notch {
  position: absolute;
  top: 12px; left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 22px;
  background: #1a1d24;
  border-radius: 0 0 14px 14px;
  z-index: 2;
}
.phone-screen {
  background: #f6f7f9;
  border-radius: 28px;
  height: 100%;
  overflow-y: auto;
  padding: 30px 16px 16px;
}
.m-header {
  display: flex;
  justify-content: space-between;
  font-size: 16px;
  margin-bottom: 16px;
  padding: 0 4px;
}
.m-greet {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 14px;
}
.m-date { color: #6b7280; font-size: 11px; font-weight: 400; }
.m-section {
  background: white;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
  border: 1px solid #e5e7eb;
}
.m-title { font-size: 12px; font-weight: 700; margin-bottom: 8px; color: #374151; }
.m-item {
  font-size: 12px;
  padding: 6px 0;
  border-bottom: 1px solid #f3f4f6;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.m-item:last-child { border: 0; }
.m-btn {
  background: #6366f1;
  color: white;
  font-size: 9px;
  padding: 2px 8px;
  border-radius: 4px;
}
.m-ai {
  background: #1a1d24;
  color: white;
  text-align: center;
  padding: 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  margin-top: 10px;
}
.close-mobile {
  background: white;
  color: #1a1d24;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
}

/* ───── ERP: 사이드바 보조 ───── */
.nav-badge.orange { background: #f59e0b; }

/* ───── ERP: KPI 카드 ───── */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
@media (max-width: 1100px) { .kpi-row { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px) { .kpi-row { grid-template-columns: repeat(2, 1fr); } }
.kpi {
  background: white;
  border-radius: 10px;
  padding: 14px 16px;
  border: 1px solid #e5e7eb;
}
.kpi-label { font-size: 11.5px; color: #6b7280; font-weight: 500; }
.kpi-value { font-size: 22px; font-weight: 700; margin-top: 4px; color: #111827; }
.kpi-delta { font-size: 11px; margin-top: 4px; color: #6b7280; }
.kpi-delta.up { color: #059669; font-weight: 600; }
.kpi-delta.down { color: #dc2626; font-weight: 600; }

/* ───── ERP: 결재 대기 ───── */
.approval-list { display: flex; flex-direction: column; gap: 8px; }
.approval-list li {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px dashed #f3f4f6;
}
.approval-list li:last-child { border-bottom: 0; }
.ap-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
}
.ap-body { flex: 1; font-size: 12.5px; }
.ap-meta { font-size: 10.5px; color: #6b7280; margin-top: 2px; }
.btn-mini {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}
.btn-mini.ok { background: #10b981; color: white; }

/* ───── ERP: 영업 파이프라인 미리보기 ───── */
.pipe-mini {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 6px 0;
}
.pipe-step {
  flex: 1;
  text-align: center;
  background: #f3f4f6;
  border-radius: 8px;
  padding: 10px 4px;
}
.pipe-step.active { background: #ede9fe; border: 1px solid #a78bfa; }
.pipe-num { font-size: 18px; font-weight: 700; color: #1a1d24; }
.pipe-lbl { font-size: 11px; color: #6b7280; margin-top: 2px; }
.pipe-arrow { color: #9ca3af; font-size: 12px; }
.pipe-summary {
  margin-top: 10px;
  font-size: 12px;
  color: #6b7280;
  text-align: center;
  padding-top: 8px;
  border-top: 1px solid #f3f4f6;
}

/* ───── ERP: 프로젝트 미리보기 ───── */
.proj-mini { display: flex; flex-direction: column; gap: 10px; }
.proj-mini li { font-size: 12px; }
.proj-mini .proj-name { font-weight: 600; margin-bottom: 4px; }
.proj-mini .proj-meta { font-size: 10.5px; color: #6b7280; margin-top: 2px; }

/* ───── ERP: 공통 차트/바 ───── */
.bar {
  background: #f3f4f6;
  border-radius: 4px;
  height: 8px;
  overflow: hidden;
  flex: 1;
}
.bar-fill {
  height: 100%;
  border-radius: 4px;
  display: flex;
  align-items: center;
  padding: 0 6px;
  color: white;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}
.bar-fill.green { background: #10b981; }
.bar-fill.blue  { background: #3b82f6; }
.bar-fill.orange { background: #f59e0b; }

.bar-chart { display: flex; flex-direction: column; gap: 8px; padding: 4px 0; }
.bar-row { display: flex; align-items: center; gap: 10px; }
.bar-row .bar-label { width: 36px; font-size: 12px; color: #6b7280; font-weight: 600; }
.bar-row .bar { height: 22px; background: #f9fafb; }

/* ───── ERP: 데이터 테이블 ───── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.data-table th {
  text-align: left;
  padding: 8px 10px;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
  color: #6b7280;
  font-weight: 600;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.data-table td {
  padding: 9px 10px;
  border-bottom: 1px solid #f3f4f6;
  color: #1a1d24;
}
.data-table tr:hover td { background: #fafbff; }
.data-table .up { color: #059669; font-weight: 600; }
.data-table .down { color: #dc2626; font-weight: 600; }
.data-table .warn { color: #ea580c; font-weight: 600; }

.status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}
.status.on { background: #d1fae5; color: #047857; }
.status.off { background: #fef3c7; color: #92400e; }
.status.pend { background: #fed7aa; color: #c2410c; }

.proj-table .bar { display: inline-block; vertical-align: middle; width: 80px; margin-right: 6px; }

/* ───── ERP: 조직도 ───── */
.org-tree { padding: 12px 4px; }
.org-node {
  background: #6366f1;
  color: white;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  display: inline-block;
  margin-bottom: 12px;
}
.org-node.ceo { background: #1a1d24; }
.org-row { display: flex; gap: 12px; flex-wrap: wrap; padding-left: 20px; border-left: 2px solid #e5e7eb; margin-left: 16px; }
.org-branch { flex: 1; min-width: 140px; }
.org-leaf {
  font-size: 11.5px;
  color: #6b7280;
  padding: 3px 8px;
  margin-left: 6px;
}

/* ───── 이벤트/뱃지 리스트 ───── */
.event-list { display: flex; flex-direction: column; gap: 8px; }
.event-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  padding: 4px 0;
}
.ev-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  min-width: 40px;
  text-align: center;
}
.tag-pink { background: #fce7f3; color: #be185d; }
.tag-red { background: #fee2e2; color: #b91c1c; }

/* ───── 노무: 연차 사용 ───── */
.leave-list { display: flex; flex-direction: column; gap: 8px; }
.leave-list li {
  display: grid;
  grid-template-columns: 80px 1fr 50px;
  gap: 10px;
  align-items: center;
  font-size: 12px;
}
.leave-list .leave-num { font-size: 11.5px; color: #6b7280; text-align: right; font-weight: 600; }

/* ───── 링크 리스트 (회계 외부연동, 노무 등) ───── */
.link-list { display: flex; flex-direction: column; gap: 8px; }
.link-list li {
  font-size: 12.5px;
  padding: 6px 0;
  color: #374151;
  border-bottom: 1px dashed #f3f4f6;
}
.link-list li:last-child { border-bottom: 0; }

.ai-help-list { display: flex; flex-direction: column; gap: 8px; }
.ai-help-list li {
  font-size: 12.5px;
  padding: 8px 10px;
  background: #fafbff;
  border-radius: 6px;
  border-left: 3px solid #6366f1;
}

/* ───── AI 응답: 표/체크리스트 ───── */
.msg-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.msg-table th, .msg-table td {
  padding: 6px 10px;
  border-bottom: 1px solid #f3f4f6;
  text-align: left;
}
.msg-table th { background: #f9fafb; font-size: 11px; color: #6b7280; }
.msg-table .up { color: #059669; font-weight: 600; }
.msg-table .down { color: #dc2626; font-weight: 600; }
.msg-note {
  margin-top: 10px;
  padding: 8px 10px;
  background: #fffbeb;
  border-left: 3px solid #f59e0b;
  font-size: 11.5px;
  color: #78350f;
  border-radius: 4px;
}
.check-list { padding-left: 4px; font-size: 12.5px; }
.check-list li { padding: 3px 0; }

/* ───── card span ───── */
.card.span-2 { grid-column: span 2; }
@media (max-width: 900px) { .card.span-2 { grid-column: span 1; } }

.ev-pink { background: #fce7f3; color: #be185d; }
.ev-red { background: #fee2e2; color: #b91c1c; }

/* ───── 모바일 KPI ───── */
.m-kpi {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}
.m-kpi > div {
  background: white;
  border-radius: 8px;
  padding: 8px;
  text-align: center;
  border: 1px solid #e5e7eb;
}
.m-kpi-l { font-size: 10px; color: #6b7280; }
.m-kpi-v { font-size: 14px; font-weight: 700; color: #1a1d24; }
