/* =============================================
   Verdi CRM — Main Stylesheet
   ============================================= */

/* ============================================
   Backup / Restore Page (CEO 전용)
   ============================================ */
.backup-wrapper { max-width: 1100px; margin: 0 auto; }

.backup-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
  padding: 28px;
  margin-bottom: 18px;
}

.backup-section-title {
  font-size: 17px; font-weight: 700; color: #1b4332;
  margin-bottom: 14px;
  display: flex; align-items: center; gap: 10px;
}
.backup-section-title i { color: #2d6a4f; }

.backup-desc { color: #6b7280; font-size: 13px; margin-bottom: 12px; }

.backup-info-box {
  background: #eff6ff;
  border-left: 4px solid #3b82f6;
  padding: 12px 16px;
  border-radius: 8px;
  margin: 12px 0;
  color: #1e40af;
  font-size: 13px;
  line-height: 1.7;
}
.backup-danger-box {
  background: #fee2e2;
  border-left: 4px solid #dc2626;
  padding: 12px 16px;
  border-radius: 8px;
  margin: 12px 0;
  color: #991b1b;
  font-size: 13px;
  line-height: 1.7;
}

.backup-stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 12px; margin: 14px 0;
}
.backup-stat-box {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 14px;
  text-align: center;
}
.backup-stat-label { font-size: 12px; color: #6b7280; margin-bottom: 4px; }
.backup-stat-value { font-size: 22px; font-weight: 700; color: #111827; }

.backup-btn-group {
  display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px;
}
.backup-btn-group .btn-large { padding: 14px 26px; font-size: 14px; }

.backup-file-input-wrap {
  display: inline-flex; align-items: center; gap: 10px;
  background: #f3f4f6; border-radius: 10px;
  padding: 8px 8px 8px 16px; border: 1px dashed #9ca3af;
}
.backup-file-input-wrap i { color: #2d6a4f; }
.backup-file-input-wrap input[type="file"] {
  font-size: 13px; max-width: 280px;
}

.bk-log-box {
  background: #1f2937; color: #d1fae5;
  padding: 12px 14px; border-radius: 8px;
  font-family: 'Courier New', monospace;
  font-size: 12px; line-height: 1.7;
  max-height: 240px; overflow-y: auto;
  margin-top: 12px;
  white-space: pre-wrap; word-break: break-all;
}
.bk-log-box .ok { color: #34d399; }
.bk-log-box .err { color: #f87171; }
.bk-log-box .warn { color: #fbbf24; }
.bk-log-box .info { color: #93c5fd; }

.backup-history-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 8px; }
.backup-history-table th, .backup-history-table td {
  padding: 10px 12px; text-align: left;
  border-bottom: 1px solid #f3f4f6;
}
.backup-history-table th { background: #f9fafb; font-weight: 600; color: #374151; }
.backup-empty {
  color: #6b7280; font-size: 13px; padding: 14px;
  background: #f9fafb; border-radius: 8px;
}

.bk-restore-btn {
  background: #2563eb; color: #fff;
  border: none; padding: 6px 10px;
  border-radius: 6px; font-size: 12px;
  cursor: pointer; margin-right: 4px;
}
.bk-restore-btn:hover { background: #1d4ed8; }
.bk-restore-btn.bk-restore-danger { background: #dc2626; }
.bk-restore-btn.bk-restore-danger:hover { background: #b91c1c; }
.bk-restore-btn.bk-restore-delete { background: #ef4444; }
.bk-restore-btn.bk-restore-delete:hover { background: #b91c1c; }

/* 헤더 [⬇ 즉시 백업] 단축 버튼 */
.btn-quick-backup {
  background: linear-gradient(135deg, #059669, #10b981);
  color: #fff; border: none;
  padding: 8px 14px; border-radius: 8px;
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(16,185,129,0.25);
}
.btn-quick-backup:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16,185,129,0.35);
}
.btn-quick-backup.hidden { display: none; }

@media (max-width: 768px) {
  .backup-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .btn-quick-backup span { display: none; }
  .btn-quick-backup { padding: 8px 10px; }
}


/* ── Font family by lang ── */
:root { --font: 'Inter', 'Noto Sans TC', 'Noto Sans KR', sans-serif; }
html[lang="ko"] { --font: 'Inter', 'Noto Sans KR', 'Noto Sans TC', sans-serif; }
html[lang="zh-TW"] { --font: 'Inter', 'Noto Sans TC', 'Noto Sans KR', sans-serif; }

:root {
  --primary: #2d6a4f;
  --primary-light: #52b788;
  --primary-dark: #1b4332;
  --accent: #40916c;
  --accent2: #74c69d;

  --bg: #f4f6f9;
  --sidebar-bg: #111827;
  --sidebar-text: #d1d5db;
  --sidebar-hover: #1f2937;
  --sidebar-active: #2d6a4f;
  --sidebar-width: 240px;

  --white: #ffffff;
  --card-bg: #ffffff;
  --border: #e5e7eb;
  --text-primary: #111827;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;

  --blue: #3b82f6;
  --green: #22c55e;
  --yellow: #f59e0b;
  --purple: #a855f7;
  --red: #ef4444;
  --orange: #f97316;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);

  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 18px;

  --font: 'Inter', 'Noto Sans KR', sans-serif;
  --transition: 0.2s ease;

  /* ============================================
     UTO-Inspired Brand Gradients (v4.8.0)
     CRM 내부에서는 액센트로만 사용 - 가독성 우선
     ============================================ */
  --grad-primary: linear-gradient(135deg, #2d6a4f 0%, #40916c 100%);
  --grad-brand: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --grad-coral: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --grad-cyan: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --grad-sunset: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
  --grad-mint: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
  --grad-violet: linear-gradient(135deg, #a855f7 0%, #6366f1 100%);
  --shadow-soft: 0 10px 40px rgba(45,106,79,0.08);
  --shadow-pop: 0 14px 38px rgba(102,126,234,0.18);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 14px; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-primary);
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
}

/* =============================================
   SIDEBAR
   ============================================= */
.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  z-index: 200;
  transition: width var(--transition), transform var(--transition);
  overflow: hidden;
}

.sidebar.collapsed {
  width: 64px;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  min-height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}

.logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--grad-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(45,106,79,0.35);
}

.logo-text {
  display: flex;
  flex-direction: column;
  white-space: nowrap;
  overflow: hidden;
  transition: opacity var(--transition);
}
.sidebar.collapsed .logo-text { opacity: 0; width: 0; }

.logo-main {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.4px;
}
.logo-sub {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.3px;
}

.sidebar-toggle {
  background: none;
  border: none;
  color: var(--sidebar-text);
  cursor: pointer;
  font-size: 16px;
  padding: 6px;
  border-radius: 6px;
  flex-shrink: 0;
  transition: background var(--transition);
}
.sidebar-toggle:hover { background: rgba(255,255,255,0.08); }

.sidebar-nav {
  flex: 1;
  padding: 12px 0;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-nav ul { list-style: none; }

.nav-section-title {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  padding: 16px 20px 6px;
  white-space: nowrap;
  overflow: hidden;
  transition: opacity var(--transition);
}
.sidebar.collapsed .nav-section-title { opacity: 0; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  border-radius: 0;
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
  position: relative;
}
.nav-item i {
  width: 18px;
  text-align: center;
  font-size: 15px;
  flex-shrink: 0;
}
.nav-item span:not(.nav-badge) {
  overflow: hidden;
  transition: opacity var(--transition);
}
.sidebar.collapsed .nav-item span:not(.nav-badge) { opacity: 0; width: 0; }

.nav-item:hover { background: var(--sidebar-hover); color: #fff; }
.nav-item.active {
  background: var(--sidebar-active);
  color: #fff;
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent2);
  border-radius: 0 3px 3px 0;
}

.nav-badge {
  margin-left: auto;
  background: var(--primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
  transition: opacity var(--transition);
}
.sidebar.collapsed .nav-badge { opacity: 0; }

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid rgba(255,255,255,0.07);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.user-detail {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: opacity var(--transition);
}
.sidebar.collapsed .user-detail { opacity: 0; width: 0; }

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
}
.user-role {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* =============================================
   MAIN WRAPPER
   ============================================= */
.main-wrapper {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left var(--transition);
}
.sidebar.collapsed ~ .main-wrapper { margin-left: 64px; }

/* =============================================
   TOPBAR
   ============================================= */
.topbar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.topbar-left { display: flex; align-items: center; gap: 14px; }
.topbar-right { display: flex; align-items: center; gap: 14px; }

.page-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.topbar-date {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 13px;
}

/* ── Language Switcher ── */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 3px;
}
.lang-btn {
  background: transparent;
  border: none;
  border-radius: 6px;
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  color: var(--text-secondary);
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
  white-space: nowrap;
  line-height: 1.4;
}
.lang-btn:hover {
  background: var(--white);
  color: var(--text-primary);
}
.lang-btn.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 1px 4px rgba(45,106,79,0.25);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 4px 8px;
}

/* =============================================
   BUTTONS
   ============================================= */
.btn-primary {
  background: var(--grad-primary);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  box-shadow: 0 4px 14px rgba(45,106,79,0.25);
  transition: box-shadow var(--transition), transform var(--transition), filter var(--transition);
}
.btn-primary:hover {
  filter: brightness(1.08);
  box-shadow: 0 6px 20px rgba(45,106,79,0.35);
  transform: translateY(-1px);
}

.btn-secondary {
  background: #fff;
  color: var(--text-primary);
  border: 1px solid var(--border);
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}
.btn-secondary:hover { background: #f9fafb; border-color: var(--primary-light); transform: translateY(-1px); }

.btn-danger {
  background: #fee2e2;
  color: var(--red);
  border: 1px solid #fca5a5;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: background var(--transition);
}
.btn-danger:hover { background: #fecaca; }

.btn-icon {
  background: none;
  border: 1px solid var(--border);
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-secondary);
  transition: background var(--transition), color var(--transition);
}
.btn-icon:hover { background: var(--bg); color: var(--primary); }

/* =============================================
   PAGES
   ============================================= */
.page { display: none; padding: 24px; flex: 1; }
.page.active { display: block; }

/* =============================================
   DASHBOARD
   ============================================= */
.dashboard-grid { display: flex; flex-direction: column; gap: 24px; }

/* KPI Cards */
.kpi-section {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
}

.kpi-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border);
  transition: box-shadow var(--transition), transform var(--transition);
  position: relative;
  overflow: hidden;
}
.kpi-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--grad-primary);
  opacity: 0.85;
}
.kpi-card:hover { box-shadow: var(--shadow-pop); transform: translateY(-3px); }

.kpi-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #fff;
  flex-shrink: 0;
}
.bg-blue    { background: linear-gradient(135deg, #3b82f6, #6366f1); }
.bg-green   { background: linear-gradient(135deg, #22c55e, #16a34a); }
.bg-yellow  { background: linear-gradient(135deg, #f59e0b, #f97316); }
.bg-purple  { background: linear-gradient(135deg, #a855f7, #7c3aed); }
.bg-red     { background: linear-gradient(135deg, #ef4444, #dc2626); }
.bg-teal    { background: linear-gradient(135deg, #14b8a6, #0f766e); }

.kpi-info { display: flex; flex-direction: column; }
.kpi-label { font-size: 12px; color: var(--text-secondary); font-weight: 500; margin-bottom: 4px; }
.kpi-value { font-size: 26px; font-weight: 700; color: var(--text-primary); }

/* Charts */
.charts-section {
  display: grid;
  grid-template-columns: 1fr 1fr 1.5fr;
  gap: 18px;
}

.chart-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border);
  transition: box-shadow var(--transition), transform var(--transition);
}
.chart-card:hover { box-shadow: var(--shadow); }
.chart-card.chart-wide { grid-column: 1 / -1; }

.chart-card-sub {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 500;
}

.chart-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.chart-card-header h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.chart-container { position: relative; }

/* Bottom Section */
.bottom-section {
  display: grid;
  grid-template-columns: 1.8fr 1fr;
  gap: 18px;
}

.table-card, .action-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.table-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.table-card-header h3 { font-size: 14px; font-weight: 700; }
.link-all {
  font-size: 12px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}
.link-all:hover { text-decoration: underline; }

.mini-table { width: 100%; border-collapse: collapse; }
.mini-table th {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.mini-table td {
  padding: 10px 10px;
  font-size: 13px;
  border-bottom: 1px solid #f3f4f6;
  vertical-align: middle;
}
.mini-table tr:last-child td { border-bottom: none; }
.mini-table tr:hover td { background: #f9fafb; }

.action-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.action-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: #f9fafb;
  border-left: 3px solid var(--primary);
  transition: background var(--transition);
}
.action-item:hover { background: #f0fdf4; }
.action-icon { font-size: 14px; color: var(--primary); margin-top: 1px; }
.action-info { display: flex; flex-direction: column; }
.action-company { font-size: 13px; font-weight: 600; }
.action-desc { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

/* =============================================
   CUSTOMERS PAGE
   ============================================= */
.customers-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.search-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 14px;
  flex: 1;
  min-width: 200px;
  max-width: 360px;
  box-shadow: var(--shadow-sm);
}
.search-wrap i { color: var(--text-muted); font-size: 14px; }
.search-wrap input {
  border: none;
  outline: none;
  font-size: 13.5px;
  color: var(--text-primary);
  background: transparent;
  padding: 10px 0;
  width: 100%;
  font-family: var(--font);
}

.filter-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-wrap select {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 13px;
  font-family: var(--font);
  color: var(--text-primary);
  background: var(--white);
  cursor: pointer;
  outline: none;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition);
}
.filter-wrap select:focus { border-color: var(--primary); }

.customers-summary {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  font-weight: 500;
}

.customer-table-wrap {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  overflow: hidden;
}

.customer-table {
  width: 100%;
  border-collapse: collapse;
}
.customer-table th {
  background: #f9fafb;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.customer-table td {
  padding: 13px 16px;
  font-size: 13.5px;
  border-bottom: 1px solid #f3f4f6;
  vertical-align: middle;
}
.customer-table tbody tr { transition: background var(--transition); cursor: pointer; }
.customer-table tbody tr:hover td { background: #f0fdf4; }
.customer-table tbody tr:last-child td { border-bottom: none; }

/* Stars */
.stars { color: #f59e0b; font-size: 12px; letter-spacing: 1px; }

/* Status Badge */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.badge-active { background: #dcfce7; color: #15803d; }
.badge-potential { background: #fef9c3; color: #854d0e; }
.badge-dormant { background: #f3f4f6; color: #6b7280; }
.badge-lost { background: #fee2e2; color: #b91c1c; }

/* Channel Tag */
.channel-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}
.ch-kr         { background: #eff6ff; color: #1d4ed8; }
.ch-tw         { background: #fdf2f8; color: #a21caf; }
.ch-dealer     { background: #fff7ed; color: #c2410c; }
.ch-end        { background: #f0fdf4; color: #15803d; }
.ch-outsource  { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }
.ch-supply     { background: #fff7ed; color: #c2410c; border: 1px solid #fdba74; }

.no-results {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.no-results i { font-size: 40px; margin-bottom: 12px; display: block; }
.no-results p { font-size: 14px; }

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
  padding: 20px 0;
}
.page-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--white);
  font-size: 13px;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  font-family: var(--font);
  color: var(--text-primary);
}
.page-btn:hover { background: var(--bg); }
.page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* =============================================
   PIPELINE
   ============================================= */
.pipeline-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  align-items: start;
}

.pipeline-col {
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.pipeline-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 2px solid;
}
.pipeline-col-header h3 { font-size: 13px; font-weight: 700; }
.pipeline-col-header .col-count {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
}

.col-active .pipeline-col-header { border-color: #22c55e; }
.col-active .col-count { background: #dcfce7; color: #15803d; }
.col-potential .pipeline-col-header { border-color: #f59e0b; }
.col-potential .col-count { background: #fef9c3; color: #854d0e; }
.col-dormant .pipeline-col-header { border-color: #9ca3af; }
.col-dormant .col-count { background: #f3f4f6; color: #6b7280; }
.col-lost .pipeline-col-header { border-color: #ef4444; }
.col-lost .col-count { background: #fee2e2; color: #b91c1c; }

.pipeline-card {
  background: #f9fafb;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: box-shadow var(--transition), transform var(--transition);
}
.pipeline-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.pipeline-card:last-child { margin-bottom: 0; }

.pipeline-card-company { font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.pipeline-card-contact { font-size: 12px; color: var(--text-secondary); margin-bottom: 8px; }
.pipeline-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
}
.pipeline-card-value { font-size: 12px; font-weight: 700; color: var(--primary); }

/* ── 파이프라인 제품 배지 ── */
.pipe-prod-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
}
.pipe-prod-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  border: 1px solid transparent;
}
.pipe-prod-badge i { font-size: 9px; }

/* ── 파이프라인 제품 필터 툴바 ── */
.pipeline-toolbar {
  margin-bottom: 16px;
}
.pipeline-toolbar-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 16px;
  box-shadow: var(--shadow-sm);
}
.pipeline-toolbar-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  white-space: nowrap;
  margin-right: 4px;
}
.pipe-filter-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.pipe-filter-btn {
  padding: 4px 12px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: #f8fafc;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: var(--font);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.pipe-filter-btn:hover {
  background: var(--bg);
  border-color: var(--primary);
  color: var(--primary);
}
.pipe-filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.pipe-filter-count {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 2px 10px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* =============================================
   ACTIVITIES
   ============================================= */
.activities-container {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  padding: 24px;
}

.activity-timeline { position: relative; padding-left: 32px; }
.activity-timeline::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 0; bottom: 0;
  width: 2px;
  background: var(--border);
}

.activity-item {
  position: relative;
  margin-bottom: 24px;
}
.activity-item:last-child { margin-bottom: 0; }

.activity-dot {
  position: absolute;
  left: -26px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--white);
  box-shadow: 0 0 0 2px var(--primary-light);
}

.activity-content {
  background: #f9fafb;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  transition: background var(--transition);
}
.activity-content:hover { background: #f0fdf4; }

.activity-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.activity-company { font-size: 13px; font-weight: 700; }
.activity-date { font-size: 11px; color: var(--text-muted); }
.activity-action { font-size: 13px; color: var(--text-secondary); }
.activity-assigned { font-size: 11px; color: var(--primary); font-weight: 600; margin-top: 4px; }

/* =============================================
   MODAL
   ============================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  backdrop-filter: blur(2px);
}

.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 760px;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.25s ease;
}

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

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 28px 18px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--white);
  z-index: 10;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.modal-header h2 { font-size: 17px; font-weight: 700; }

.modal-close {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 6px;
  border-radius: 6px;
  transition: background var(--transition);
}
.modal-close:hover { background: var(--bg); color: var(--text-primary); }

.modal-body { padding: 24px 28px; }

/* Detail View */
.detail-top {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 24px;
}
.detail-avatar {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  background: var(--primary);
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.detail-main h2 { font-size: 20px; font-weight: 800; margin-bottom: 4px; }
.detail-main p { font-size: 13px; color: var(--text-secondary); margin-bottom: 6px; }
.detail-badges { display: flex; gap: 8px; flex-wrap: wrap; }

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 20px;
}
.detail-field { display: flex; flex-direction: column; gap: 4px; }
.detail-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.detail-value { font-size: 14px; color: var(--text-primary); font-weight: 500; }

.detail-notes {
  background: #f9fafb;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* =============================================
   FORM DESIGN SYSTEM — 공용 폼 디자인 시스템
   ============================================= */

/* ── 모달 크기 오버라이드 ── */
.modal { max-width: 680px; width: 95vw; }

/* v4.14.3 버그 B 재수정 (이중 셀렉터): 고객 상세 모달 가로 폭 확대
   - 1차: .modal-detail-wide 명시적 클래스 (JS에서 추가) — 모든 브라우저 호환
   - 2차: .modal:has(.detail-top) — 안전망 (최신 브라우저)
   - !important 적용 — 운영 환경 CDN 캐시 / CSS 우선순위 충돌 방지
   - 일반 모달에는 영향 없음, 폼 모달과 격리 */
.modal.modal-detail-wide,
.modal:has(.detail-top) {
  max-width: 1040px !important;        /* 860px → 1040px 으로 추가 확대 */
  width: 92vw !important;              /* 좁은 화면에서는 뷰포트 92% */
}

/* v4.14.5: 영업 → 프로젝트 변환 모달 전용 폭 (중간 사이즈)
   - 2열 폼이 많아 680px로는 답답함
   - 고객 상세(1040px)보다는 좁고 일반 폼(680px)보다는 넓은 820px
   - 변환 모달 컨텐츠(고객 정보 그리드 + 2열 폼)에 최적화 */
.modal.modal-convert-wide {
  max-width: 820px !important;
  width: 92vw !important;
}
.modal.modal-convert-wide .modal-body {
  padding: 22px 28px;
}
.modal.modal-convert-wide .modal-header {
  padding: 20px 28px 16px;
}
@media (max-width: 900px) {
  .modal.modal-convert-wide { max-width: 95vw !important; }
}
@media (max-width: 768px) {
  .modal.modal-convert-wide {
    max-width: 100vw !important;
    width: 100vw !important;
    max-height: 100vh;
    border-radius: 0;
  }
  .modal.modal-convert-wide .modal-body { padding: 16px 14px; }
  .modal.modal-convert-wide .modal-header { padding: 14px 14px 12px; }
}
.modal.modal-detail-wide .modal-body,
.modal:has(.detail-top) .modal-body {
  padding: 24px 32px;       /* 좌우 패딩 28px → 32px 로 약간 확대 */
}
.modal.modal-detail-wide .modal-header,
.modal:has(.detail-top) .modal-header {
  padding: 22px 32px 18px;  /* 헤더 패딩도 동일하게 정합 */
}
/* 상세 그리드 항목 내부 텍스트가 잘리지 않도록 보강 */
.modal.modal-detail-wide .detail-value,
.modal:has(.detail-top) .detail-value {
  word-break: break-word;   /* 긴 이메일·전화번호 줄바꿈 허용 */
  overflow-wrap: anywhere;
}
.modal.modal-detail-wide .detail-field a,
.modal:has(.detail-top) .detail-field a {
  word-break: break-all;    /* mailto 링크 잘림 방지 */
}

/* 반응형: 화면이 좁아지면 단계적으로 줄임 */
@media (max-width: 1100px) {
  .modal.modal-detail-wide,
  .modal:has(.detail-top) { max-width: 95vw !important; }
}
@media (max-width: 768px) {
  .modal.modal-detail-wide,
  .modal:has(.detail-top) {
    max-width: 100vw !important;
    width: 100vw !important;
    max-height: 100vh;
    border-radius: 0;
  }
  .modal.modal-detail-wide .modal-body,
  .modal:has(.detail-top) .modal-body { padding: 18px 16px; }
  .modal.modal-detail-wide .modal-header,
  .modal:has(.detail-top) .modal-header { padding: 16px 16px 14px; }
}
.modal-header {
  padding: 20px 28px 16px;
  border-bottom: 2px solid var(--border);
}
.modal-header h2 {
  font-size: 18px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ── 폼 섹션 구분선 ── */
.form-section {
  margin-bottom: 0;
  padding: 20px 28px;
  border-bottom: 1px solid #f1f5f9;
}
.form-section:last-of-type { border-bottom: none; }
.form-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.form-section-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}
.form-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}
.form-section-desc {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}

/* ── 그리드 레이아웃 ── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group.full { grid-column: span 2; }
.form-group.full-3 { grid-column: span 3; }
.form-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.form-row .form-group { flex: 1; }

/* ── 레이블 ── */
.form-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 5px;
  letter-spacing: 0.2px;
}
.form-label i {
  font-size: 11px;
  color: var(--primary);
  opacity: 0.8;
}
.form-label .required,
.form-label .req { color: var(--red); margin-left: 1px; font-weight: 900; }

/* ── 입력 필드 공통 ── */
.form-control,
.form-section input[type="text"],
.form-section input[type="email"],
.form-section input[type="number"],
.form-section input[type="date"],
.form-section input[type="password"],
.form-section select,
.form-section textarea,
.rpt-form-wrap input[type="text"],
.rpt-form-wrap input[type="number"],
.rpt-form-wrap input[type="date"],
.rpt-form-wrap select,
.rpt-form-wrap textarea {
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 13px;
  font-size: 13.5px;
  font-family: var(--font);
  color: var(--text-primary);
  background: #ffffff;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  width: 100%;
  line-height: 1.5;
}
.form-control:hover,
.form-section input:hover,
.form-section select:hover,
.form-section textarea:hover,
.rpt-form-wrap input:hover,
.rpt-form-wrap select:hover,
.rpt-form-wrap textarea:hover {
  border-color: #94a3b8;
}
.form-control:focus,
.form-section input:focus,
.form-section select:focus,
.form-section textarea:focus,
.rpt-form-wrap input:focus,
.rpt-form-wrap select:focus,
.rpt-form-wrap textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(45,106,79,0.1);
  background: #f8fffa;
}
.form-control::placeholder,
.form-section input::placeholder,
.form-section textarea::placeholder,
.rpt-form-wrap input::placeholder,
.rpt-form-wrap textarea::placeholder {
  color: #c0cfe0;
  font-size: 13px;
}
.form-control.textarea,
.form-section textarea,
.rpt-form-wrap textarea {
  resize: vertical;
  min-height: 88px;
  line-height: 1.65;
}
select.form-control,
.form-section select,
.rpt-form-wrap select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
}

/* ── 입력 필드 상태 ── */
.form-control.input-readonly,
.input-readonly {
  background: #f8fafc !important;
  color: var(--text-muted);
  cursor: not-allowed;
  border-color: #e2e8f0 !important;
  box-shadow: none !important;
}

/* ── 입력 필드 프리픽스/서픽스 래퍼 ── */
.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.input-wrap .input-icon {
  position: absolute;
  left: 11px;
  color: var(--text-muted);
  font-size: 13px;
  pointer-events: none;
  z-index: 1;
}
.input-wrap input,
.input-wrap select {
  padding-left: 34px !important;
}
.input-wrap .input-suffix {
  position: absolute;
  right: 12px;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  pointer-events: none;
}

/* ── 폼 힌트 / 에러 ── */
.form-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.form-hint i { font-size: 10px; }
.form-error {
  background: #fff5f5;
  border: 1px solid #fed7d7;
  color: #c53030;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── 폼 액션 버튼 영역 ── */
.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 16px 28px 20px;
  border-top: 1px solid var(--border);
  background: #fafbfc;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  margin: 0 -0px;
}
.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* ── 라디오 옵션 그룹 (역할 선택 등) ── */
.radio-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.radio-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 2px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
  flex: 1;
  min-width: 120px;
  background: var(--white);
}
.radio-option input[type="radio"] { display: none; }
.radio-option:hover { border-color: var(--primary-light); background: #f0fdf4; }
.radio-option.selected {
  border-color: var(--primary);
  background: #ecfdf5;
  box-shadow: 0 0 0 3px rgba(45,106,79,0.1);
}

/* ── Products checkboxes ── */
.product-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.product-checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: all var(--transition);
  user-select: none;
  background: var(--white);
}
.product-checkbox input { display: none; }
.product-checkbox:has(input:checked) {
  background: var(--prod-color, var(--primary));
  color: #fff;
  border-color: var(--prod-color, var(--primary));
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* ── 비밀번호 입력 래퍼 ── */
.pw-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.pw-wrap input { padding-right: 44px; width: 100%; }
.pw-toggle {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  padding: 4px 6px;
  border-radius: 4px;
  transition: color var(--transition);
}
.pw-toggle:hover { color: var(--text-primary); }

/* Products checkboxes (customer form) */
.product-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.product-checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  transition: all var(--transition);
  user-select: none;
}
.product-checkbox input { display: none; }
.product-checkbox:has(input:checked) {
  background: var(--prod-color, var(--primary));
  color: #fff;
  border-color: var(--prod-color, var(--primary));
}

/* ── 직접 입력 제품 체크박스 (회색 계열) ── */
.product-checkbox-custom {
  border-style: dashed;
  color: var(--text-secondary);
}
.product-checkbox-custom:has(input:checked) {
  background: #6b7280;
  color: #fff;
  border-color: #6b7280;
  border-style: solid;
}
/* 직접 입력 제품 삭제 버튼 */
.prod-custom-del {
  background: none;
  border: none;
  color: inherit;
  opacity: 0.6;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0 0 0 4px;
  margin: 0;
  font-family: var(--font);
}
.prod-custom-del:hover { opacity: 1; }

/* ── 제품 직접입력 행 ── */
.prod-custom-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  align-items: center;
}
.prod-custom-input {
  flex: 1;
  font-size: 13px;
}
.btn-prod-custom-add {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border: 1.5px solid var(--primary);
  border-radius: 8px;
  background: none;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font);
  white-space: nowrap;
  transition: all 0.15s ease;
}
.btn-prod-custom-add:hover {
  background: var(--primary);
  color: #fff;
}

/* ── 업체 입력 컨테이너 ── */
.vendor-input-wrap {
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
  background: #f8fafc;
  position: relative;  /* 피커/서제스트 절대위치 기준 */
}
/* 태그 목록 */
.vendor-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 4px;
  margin-bottom: 8px;
}
.vendor-tag-list:empty { margin-bottom: 0; }

/* 업체 태그 공통 */
.vendor-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
}
/* 외주업체 — 파란 계열 */
.vendor-tag-outsource {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}
/* 공급업체 — 주황 계열 */
.vendor-tag-supply {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}
/* 태그 삭제 버튼 */
.vendor-tag-del {
  background: none;
  border: none;
  color: inherit;
  opacity: 0.55;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  padding: 0;
  margin-left: 2px;
  font-family: var(--font);
}
.vendor-tag-del:hover { opacity: 1; }

/* 업체 추가 인풋 행 */
.vendor-add-row {
  display: flex;
  gap: 6px;
  align-items: center;
}
.vendor-add-row .form-control {
  flex: 1;
  font-size: 12.5px;
  padding: 7px 11px;
}
.btn-vendor-add {
  width: 34px;
  height: 34px;
  border: 1.5px solid var(--primary);
  border-radius: 8px;
  background: none;
  color: var(--primary);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s ease;
}
.btn-vendor-add:hover { background: var(--primary); color: #fff; }

/* ── 벤더 피커 드롭다운 (기존 업체 목록) ── */
.vendor-picker-box {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.13);
  z-index: 500;
  overflow: hidden;
  animation: dropdown-in 0.15s ease;
}
@keyframes dropdown-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.vendor-picker-header {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px 8px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-secondary);
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.vendor-picker-header i { color: var(--primary); font-size: 12px; }
.vendor-picker-list {
  max-height: 220px;
  overflow-y: auto;
  padding: 6px 0;
}
.vendor-picker-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 9px 14px;
  border: none;
  background: none;
  font-size: 13px;
  font-family: var(--font);
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
  transition: background 0.12s;
}
.vendor-picker-item:hover:not(:disabled) { background: #f0fdf4; color: var(--primary); }
.vendor-picker-item i {
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
  width: 14px;
  text-align: center;
}
.vendor-picker-item:hover:not(:disabled) i { color: var(--primary); }
.vendor-picker-item span { flex: 1; }
.vendor-picker-item-added {
  color: var(--text-muted);
  cursor: not-allowed;
}
.vendor-picker-item-added i { color: #22c55e !important; }
.vendor-picker-added-label {
  flex: none !important;
  font-size: 10.5px;
  font-weight: 700;
  color: #16a34a;
  background: #dcfce7;
  padding: 1px 7px;
  border-radius: 10px;
  border: 1px solid #bbf7d0;
}
.vendor-picker-empty {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  font-size: 12.5px;
  color: var(--text-muted);
}
.vendor-picker-empty i { font-size: 14px; }

/* ── 벤더 자동완성 서제스트 ── */
.vendor-suggest-box {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: var(--white);
  border: 1.5px solid #bfdbfe;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.10);
  z-index: 501;
  overflow: hidden;
  animation: dropdown-in 0.12s ease;
}
.vendor-suggest-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 13px;
  border: none;
  background: none;
  font-size: 12.5px;
  font-family: var(--font);
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
  transition: background 0.1s;
}
.vendor-suggest-item:hover { background: #eff6ff; color: #1d4ed8; }
.vendor-suggest-item i { font-size: 11px; color: var(--text-muted); flex-shrink: 0; }
.vendor-suggest-item mark {
  background: #fef9c3;
  color: #854d0e;
  border-radius: 2px;
  padding: 0 1px;
  font-weight: 700;
}

/* ── 상세 모달: 업체 표시 섹션 ── */
.detail-vendor-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.detail-vendor-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 140px;
}
.detail-vendor-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

/* form-label 보조 설명 */
.form-label-sub {
  font-size: 10.5px;
  font-weight: 400;
  color: var(--text-muted);
  margin-left: 6px;
}

/* =============================================
   PRODUCTS PAGE
   ============================================= */
.products-grid {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* Category section */
.prod-category-section {}

.prod-cat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.prod-cat-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  border: 1.5px solid transparent;
  letter-spacing: 0.3px;
}
.prod-cat-count {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 10px;
}

.prod-cards-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

/* Product Card */
.prod-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}
.prod-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.prod-card-inactive {
  opacity: 0.55;
  filter: grayscale(40%);
}

.prod-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 16px 14px;
  border-bottom: 2px solid var(--border);
}
.prod-card-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.prod-card-meta {
  flex: 1;
  min-width: 0;
}
.prod-card-name {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.prod-card-engname {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}
.prod-card-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.prod-card-body {
  padding: 12px 16px 14px;
}
.prod-card-desc {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 10px;
}
.prod-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.prod-card-order {
  font-size: 11px;
  color: var(--text-muted);
}
.prod-status-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 20px;
}
.prod-status-on  { background: #dcfce7; color: #15803d; }
.prod-status-off { background: #f3f4f6; color: #6b7280; }

/* btn-icon variants */
.btn-icon-warn  { color: #f59e0b; border-color: #fde68a; }
.btn-icon-warn:hover { background: #fffbeb; color: #d97706; }
.btn-icon-ok    { color: #9ca3af; }
.btn-icon-ok:hover { background: #f0fdf4; color: var(--primary); }
.btn-icon-danger { color: #ef4444; border-color: #fca5a5; }
.btn-icon-danger:hover { background: #fee2e2; }

/* empty state */
.prod-empty {
  text-align: center;
  padding: 80px 24px;
  color: var(--text-muted);
}
.prod-empty i {
  font-size: 48px;
  display: block;
  margin-bottom: 14px;
  opacity: 0.4;
}
.prod-empty p { font-size: 15px; }

/* ── Color Swatches ── */
.color-swatches-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.color-swatch-label {
  cursor: pointer;
  display: flex;
  align-items: center;
}
.color-swatch-label input { display: none; }
.color-swatch {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2.5px solid transparent;
  transition: transform var(--transition), border-color var(--transition);
}
.color-swatch-label:has(input:checked) .color-swatch {
  border-color: var(--text-primary);
  transform: scale(1.18);
}
.color-swatch-custom {
  background: var(--bg);
  border: 1.5px dashed var(--border);
  color: var(--text-muted);
  font-size: 11px;
}

/* ── Icon Options ── */
.icon-options-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.icon-option-label {
  cursor: pointer;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: var(--text-secondary);
  transition: all var(--transition);
  background: var(--white);
}
.icon-option-label input { display: none; }
.icon-option-label:hover { border-color: var(--primary); color: var(--primary); background: #f0fdf4; }
.icon-option-label.icon-selected {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

/* ── Toggle Switch ── */
.toggle-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  margin-top: 4px;
}
.toggle-switch input { display: none; }
.toggle-track {
  width: 44px;
  height: 24px;
  background: #d1d5db;
  border-radius: 12px;
  position: relative;
  transition: background var(--transition);
  flex-shrink: 0;
}
.toggle-switch:has(input:checked) .toggle-track { background: var(--primary); }
.toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: transform var(--transition);
}
.toggle-switch:has(input:checked) .toggle-thumb { transform: translateX(20px); }
.toggle-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}
.toggle-switch:has(input:checked) .toggle-label { color: var(--primary); }

/* =============================================
   TOAST
   ============================================= */
.toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #1f2937;
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  animation: slideInRight 0.3s ease;
  max-width: 320px;
}
.toast.success { background: #15803d; }
.toast.error { background: var(--red); }

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

/* =============================================
   ACCOUNT MANAGEMENT
   ============================================= */

/* 사이드바 로그아웃 버튼 */
.btn-logout {
  background: none;
  border: none;
  color: var(--sidebar-text);
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  font-size: 16px;
  opacity: 0.6;
  transition: opacity var(--transition), color var(--transition);
  flex-shrink: 0;
}
.btn-logout:hover { opacity: 1; color: var(--red); }

/* 사이드바 유저 역할 배지 */
.user-role-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 20px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  display: inline-block;
  margin-top: 2px;
}

/* ── 역할 배지 (테이블용 + 사이드바용 공용) ── */
.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.role-ceo {
  background: linear-gradient(135deg, #fef9c3, #fde68a);
  color: #92400e;
  border: 1px solid #f59e0b;
}
.role-manager {
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  color: #1e40af;
  border: 1px solid #3b82f6;
}
.role-staff {
  background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
  color: #374151;
  border: 1px solid #9ca3af;
}

/* 계정 관리 툴바 */
.acct-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 12px;
}
.acct-toolbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.acct-section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.acct-section-title i {
  color: var(--primary);
  font-size: 15px;
}
.acct-count-badge {
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 20px;
  min-width: 26px;
  text-align: center;
}

/* 계정 관리 테이블 */
.acct-table-wrap {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.acct-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.acct-table thead th {
  background: #f9fafb;
  padding: 12px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.acct-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.acct-table tbody tr:last-child { border-bottom: none; }
.acct-table tbody tr:hover { background: #f9fafb; }
.acct-table tbody tr.acct-row-self { background: #f0fdf4; }
.acct-table tbody td { padding: 12px 16px; vertical-align: middle; }

.acct-username {
  font-weight: 700;
  color: var(--text-primary);
  font-family: 'Courier New', monospace;
  font-size: 13px;
}
.acct-self-tag {
  display: inline-block;
  margin-left: 6px;
  font-size: 10px;
  font-weight: 700;
  color: var(--primary);
  background: #d1fae5;
  padding: 1px 6px;
  border-radius: 10px;
}
.link-email {
  color: var(--primary);
  text-decoration: none;
  font-size: 12px;
}
.link-email:hover { text-decoration: underline; }

/* 계정 액션 버튼 */
.acct-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.btn-icon-sm {
  width: 30px;
  height: 30px;
  border: none;
  border-radius: var(--radius-sm);
  background: #f3f4f6;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), color var(--transition);
}
.btn-icon-sm:hover { background: var(--primary); color: #fff; }
.btn-icon-sm:disabled { opacity: 0.35; cursor: not-allowed; }
.btn-danger-sm:hover { background: var(--red) !important; }

/* 폼 — 라디오 옵션 그룹 */
.radio-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.radio-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}
.radio-option input[type="radio"] { display: none; }
.radio-option:hover { border-color: var(--primary-light); background: #f0fdf4; }
.radio-option.selected { border-color: var(--primary); background: #ecfdf5; }

/* 읽기 전용 입력 필드 */
.input-readonly {
  background: #f3f4f6 !important;
  color: var(--text-secondary);
  cursor: not-allowed;
}

/* 비밀번호 입력 래퍼 */
.pw-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.pw-wrap input { padding-right: 44px; width: 100%; }
.pw-toggle {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  padding: 4px;
}
.pw-toggle:hover { color: var(--text-primary); }

/* 폼 힌트 / 에러 */
.form-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}
.form-error {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #dc2626;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-top: 12px;
}

/* =============================================
   PIPELINE → REPORT LINK SECTION
   고객 상세 모달 내 관련 일일보고서 링크
   ============================================= */

/* 섹션 컨테이너 */
.pipe-rpt-section {
  margin: 4px 0 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
}

/* 섹션 헤더 */
.pipe-rpt-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  border-bottom: 1px solid #d1fae5;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary-dark);
}
.pipe-rpt-section-header i {
  color: var(--primary);
  font-size: 13px;
}
.pipe-rpt-count {
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 20px;
  min-width: 22px;
  text-align: center;
  margin-left: 2px;
}

/* 보고서 목록 */
.pipe-rpt-list {
  padding: 6px 0;
}

/* 비어있을 때 */
.pipe-rpt-empty {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 18px;
  font-size: 12.5px;
  color: var(--text-muted);
}
.pipe-rpt-empty i { font-size: 14px; }

/* 개별 보고서 행 */
.pipe-rpt-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--transition);
}
.pipe-rpt-row:last-child { border-bottom: none; }
.pipe-rpt-row:hover {
  background: #f0fdf4;
}
.pipe-rpt-row:hover .pipe-rpt-go-btn {
  color: var(--primary);
  opacity: 1;
}

/* 왼쪽: 날짜 + 작성자 + 요약 */
.pipe-rpt-row-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.pipe-rpt-date {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}
.pipe-rpt-date i { color: var(--primary); font-size: 11px; }
.pipe-rpt-author {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  color: var(--text-secondary);
  background: #f3f4f6;
  padding: 2px 8px;
  border-radius: 20px;
  white-space: nowrap;
}
.pipe-rpt-author i { font-size: 10px; color: #7c3aed; }
.pipe-rpt-summary {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 240px;
}
.pipe-rpt-summary i { font-size: 10px; color: var(--primary); flex-shrink: 0; }
.pipe-rpt-summary em {
  font-style: normal;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 오른쪽: 상태 배지 + 이동 버튼 */
.pipe-rpt-row-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.pipe-rpt-status {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  white-space: nowrap;
}
.pipe-rpt-status-reviewed  { background: #d1fae5; color: #065f46; }
.pipe-rpt-status-submitted { background: #dbeafe; color: #1e40af; }
.pipe-rpt-status-draft     { background: #f3f4f6; color: #6b7280; }

.pipe-rpt-go-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 12px;
  opacity: 0.5;
  transition: color var(--transition), opacity var(--transition);
}

/* ── 보고서 카드 하이라이트 애니메이션 ── */
@keyframes rptHighlightPulse {
  0%   { box-shadow: 0 0 0 0 rgba(45,106,79,0.55), 0 4px 24px rgba(45,106,79,0.18); background: #ecfdf5; }
  40%  { box-shadow: 0 0 0 8px rgba(45,106,79,0.10), 0 4px 24px rgba(45,106,79,0.12); background: #f0fdf4; }
  100% { box-shadow: var(--shadow-sm);                                                background: var(--white); }
}
.rpt-card-highlight {
  animation: rptHighlightPulse 2.8s ease forwards;
  border-color: var(--primary-light) !important;
  scroll-margin-top: 80px;
}

/* =============================================
   UTILITIES
   ============================================= */
.hidden { display: none !important; }

.text-green { color: #15803d; }
.text-red { color: var(--red); }
.text-muted { color: var(--text-muted); }

.flag { font-size: 16px; }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1400px) {
  .kpi-section { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 1200px) {
  .charts-section { grid-template-columns: 1fr 1fr; }
  .chart-card.chart-wide { grid-column: 1 / -1; }
  .pipeline-board { grid-template-columns: repeat(2, 1fr); }
  .kpi-section { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  .kpi-section { grid-template-columns: repeat(2, 1fr); }
  .bottom-section { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-group.full { grid-column: span 1; }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    width: var(--sidebar-width) !important;
  }
  .sidebar.mobile-open { transform: translateX(0); }
  .main-wrapper { margin-left: 0 !important; }
  .mobile-menu-btn { display: flex; }
  .charts-section { grid-template-columns: 1fr; }
  .chart-card.chart-wide { grid-column: 1 / -1; }
  .pipeline-board { grid-template-columns: 1fr; }
  .topbar { padding: 0 16px; }
  .page { padding: 16px; }
  .btn-primary span { display: none; }
  .customer-table { font-size: 12px; }
  .customer-table th, .customer-table td { padding: 10px 10px; }
}

@media (max-width: 480px) {
  .kpi-section { grid-template-columns: 1fr; }
  .customers-toolbar { flex-direction: column; align-items: stretch; }
  .search-wrap { max-width: 100%; }
  .detail-grid { grid-template-columns: 1fr; }
}

/* =============================================
   WORK ITEM CARD — 업무 항목 카드 (보고서 폼)
   ============================================= */

/* ── 모달 내부 패딩 제거 (섹션이 자체 패딩 가짐) ── */
.modal-body { padding: 0; overflow-y: auto; max-height: 78vh; }
.rpt-form-wrap { display: flex; flex-direction: column; }

/* ── 업무 항목 카드 ── */
.wi-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
}
.wi-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  border-color: #cbd5e1;
}
.wi-card:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(45,106,79,0.08);
}

/* ── 카드 헤더 ── */
.wi-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  border-bottom: 1px solid #e2e8f0;
}
.wi-card-num {
  display: flex;
  align-items: center;
  gap: 8px;
}
.wi-num-badge {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.wi-num-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.3px;
}
.wi-remove-btn {
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 6px;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: background 0.15s ease, color 0.15s ease;
}
.wi-remove-btn:hover { background: #fee2e2; color: var(--red); }

/* ── 카드 내부 행 ── */
.wi-row-main {
  display: grid;
  grid-template-columns: 1fr 130px 90px;
  gap: 12px;
  padding: 14px 14px 8px;
}
.wi-row-sub {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 12px;
  padding: 0 14px 14px;
}
.wi-title-group {}
.wi-cat-group {}
.wi-hours-group {}
.wi-cust-group {}
.wi-detail-group {}

/* ── 연결 고객사 + 제품 행 ── */
.wi-row-link {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 14px 8px;
}

/* ★ v4.14.2 (Option B): 연결 프로젝트 행 ── */
.wi-row-project {
  padding: 0 14px 8px;
}
.wi-row-project .form-label {
  font-size: 11.5px;
  color: var(--text-secondary);
  margin-bottom: 5px;
  display: block;
}
.wi-row-project .form-label i {
  color: #7c3aed;
  margin-right: 4px;
}
.wi-project-sel {
  width: 100%;
  font-size: 13px;
  background-color: #faf5ff;
  border-color: #e9d5ff;
}
.wi-project-sel:focus {
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}
.wi-project-sel optgroup {
  font-weight: 700;
  color: #6d28d9;
  background: #faf5ff;
}

/* ── 업무 상세 설명 행 ── */
.wi-row-detail {
  padding: 0 14px 14px;
}
.wi-row-detail .form-label {
  font-size: 11.5px;
  color: var(--text-secondary);
  margin-bottom: 5px;
  display: block;
}
.wi-detail-input {
  width: 100%;
  font-size: 13px;
}

/* ── 업무항목 추가 버튼 ── */
.btn-add-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 11px 16px;
  border: 2px dashed #cbd5e1;
  border-radius: 10px;
  background: none;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  justify-content: center;
  margin-top: 2px;
  font-family: var(--font);
}
.btn-add-item:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #f0fdf4;
}
.btn-add-item i { font-size: 12px; }

/* ── 반응형 ── */
@media (max-width: 600px) {
  .wi-row-main { grid-template-columns: 1fr 1fr; }
  .wi-hours-group { grid-column: span 2; }
  .wi-row-sub { grid-template-columns: 1fr; }
  .wi-row-link { grid-template-columns: 1fr; }
  .wi-row-project { padding: 0 12px 8px; }
  .form-section { padding: 16px 18px; }
  .form-actions { padding: 14px 18px 16px; }
}

/* =============================================
   v4.14.2 (Option B): 프로젝트 상세 — 관련 보고서 탭
   ============================================= */
.prj-reports-tab {
  padding: 4px 0 8px;
}

/* 상단 통계 카드 */
.prj-reports-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}
.prj-reports-stat {
  background: linear-gradient(135deg, #faf5ff 0%, #f5f3ff 100%);
  border: 1px solid #e9d5ff;
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.prj-reports-stat-label {
  font-size: 12px;
  color: #7c3aed;
  font-weight: 600;
}
.prj-reports-stat-value {
  font-size: 22px;
  font-weight: 800;
  color: #4c1d95;
  letter-spacing: -0.3px;
}

/* 보고서 카드 리스트 */
.prj-reports-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.prj-report-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  transition: box-shadow 0.18s ease, border-color 0.18s ease;
}
.prj-report-card:hover {
  border-color: #c4b5fd;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.08);
}
.prj-report-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: #fafafa;
  border-bottom: 1px solid #f1f5f9;
}
.prj-report-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  font-size: 12.5px;
  color: #475569;
}
.prj-report-meta i { color: #94a3b8; margin-right: 4px; }
.prj-report-date    { font-weight: 700; color: #1e293b; }
.prj-report-author  { color: #475569; }
.prj-report-hours   { color: #0f766e; font-weight: 600; }
.prj-report-count   { color: #6d28d9; font-weight: 600; }
.prj-report-open-btn {
  white-space: nowrap;
  font-size: 12px !important;
  padding: 6px 12px !important;
}

/* 항목 리스트 */
.prj-report-item-list {
  list-style: none;
  margin: 0;
  padding: 6px 0;
}
.prj-report-item-row {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 9px 16px;
  font-size: 13px;
  border-bottom: 1px solid #f8fafc;
}
.prj-report-item-row:last-child { border-bottom: none; }
.prj-report-item-cat {
  font-size: 11px;
  font-weight: 700;
  color: #6d28d9;
  background: #faf5ff;
  border: 1px solid #e9d5ff;
  border-radius: 4px;
  padding: 3px 6px;
  text-align: center;
}
.prj-report-item-title {
  font-weight: 600;
  color: #1e293b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.prj-report-item-detail {
  display: block;
  font-size: 12px;
  color: #64748b;
  font-weight: 400;
  margin-top: 2px;
  white-space: normal;
}
.prj-report-item-dur {
  font-size: 12px;
  font-weight: 700;
  color: #0f766e;
  white-space: nowrap;
}

/* 반응형 */
@media (max-width: 768px) {
  .prj-reports-summary { grid-template-columns: 1fr; gap: 8px; }
  .prj-report-card-head { flex-direction: column; align-items: flex-start; }
  .prj-report-item-row { grid-template-columns: 56px 1fr; }
  .prj-report-item-dur { grid-column: 2; text-align: right; }
}

/* =============================================
   REPORTS PAGE — 일일 보고서 시스템
   ============================================= */

/* ── 탭 바 ── */
.rpt-tab-bar {
  display: flex;
  gap: 4px;
  background: var(--white);
  border-radius: var(--radius);
  padding: 6px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  width: fit-content;
}
.rpt-tab-btn {
  padding: 8px 18px;
  border: none;
  background: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.rpt-tab-btn:hover { background: var(--bg); color: var(--text-primary); }
.rpt-tab-btn.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(45,106,79,0.25);
}
/* v4.13.0: 탭 배지 (업무 캘린더 피드백 대기 카운트) */
.rpt-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  margin-left: 2px;
  border-radius: 9px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}
.rpt-tab-btn.active .rpt-tab-badge {
  background: #fff;
  color: #ef4444;
}
.rpt-tab-badge.hidden { display: none; }
.rpt-tab-body { min-height: 300px; }

/* v4.13.0: 업무 캘린더가 일일 보고서 탭에 임베디드된 경우 보정
   - 기존 .page는 padding:24px를 가지나, 탭 안에 들어오면 이중 패딩이 되므로 제거
   - 탭 바디는 이미 page-reports 안쪽에서 24px 패딩을 받고 있음 */
.rpt-cal-host {
  margin: 0;
}
.rpt-cal-embedded.page {
  display: block !important;
  padding: 0 !important;
}
.rpt-cal-embedded .cal-toolbar { margin-top: 0; }

/* ── 미확인 배지 (사이드바) ── */
.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  margin-left: auto;
}
.nav-badge-alert { background: var(--red); color: #fff; }

/* ── KPI 스트립 ── */
.rpt-kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}
.rpt-kpi-item {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  overflow: hidden;
}
.rpt-kpi-item::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--primary);
  border-radius: 3px 3px 0 0;
}
.rpt-kpi-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.rpt-kpi-num {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
}
.rpt-kpi-sub {
  font-size: 11px;
  color: var(--text-secondary);
}
.rpt-kpi-action {
  margin-top: 8px;
}

/* ── 툴바 ── */
.rpt-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
  flex-wrap: wrap;
}
.rpt-toolbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.rpt-team-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.rpt-date-select {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text-primary);
  background: var(--white);
  font-family: var(--font);
  outline: none;
  cursor: pointer;
  transition: border-color var(--transition);
}
.rpt-date-select:focus { border-color: var(--primary); }

/* ============================================================
   v4.12.0: 매니저 팀 탭 날짜 네비게이션 (input type=date)
   ============================================================ */
.rpt-date-nav-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.rpt-date-nav-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all var(--transition);
}
.rpt-date-nav-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #f0fdf4;
}
.rpt-date-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-size: 13px;
  color: var(--text-primary);
  position: relative;
}
.rpt-date-input-wrap > i {
  color: var(--primary);
  font-size: 14px;
}
.rpt-date-input {
  border: none;
  outline: none;
  font-family: var(--font);
  font-size: 13px;
  color: var(--text-primary);
  background: transparent;
  width: 130px;
  cursor: pointer;
}
.rpt-date-label-text {
  font-weight: 600;
  color: var(--text-primary);
  padding-left: 8px;
  border-left: 1px solid var(--border);
  white-space: nowrap;
}
.rpt-date-today-btn {
  padding: 8px 14px;
  border: 1px solid var(--primary);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--primary);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition);
}
.rpt-date-today-btn:hover {
  background: var(--primary);
  color: var(--white);
}
.rpt-date-quick-wrap {
  position: relative;
}
.rpt-date-quick-btn {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--text-primary);
  cursor: pointer;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition);
}
.rpt-date-quick-btn:hover { border-color: var(--primary); color: var(--primary); }
.rpt-date-quick-count {
  background: var(--primary);
  color: var(--white);
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}
.rpt-date-quick-list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 100;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  padding: 6px;
  min-width: 240px;
  max-height: 320px;
  overflow-y: auto;
}
.rpt-date-quick-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  border: none;
  background: transparent;
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-primary);
  cursor: pointer;
  transition: background var(--transition);
}
.rpt-date-quick-item:hover { background: #f1f5f9; }
.rpt-date-quick-item.active {
  background: #ecfdf5;
  color: var(--primary);
  font-weight: 600;
}

/* ============================================================
   v4.12.0: 내 보고서 기간 필터 + PDF 추출
   ============================================================ */
.rpt-myrange-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 16px 0 12px 0;
  padding: 14px 18px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  flex-wrap: wrap;
}
.rpt-myrange-presets {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.rpt-range-preset {
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--white);
  color: var(--text-primary);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all var(--transition);
  font-family: var(--font);
}
.rpt-range-preset:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.rpt-range-preset.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
  font-weight: 600;
}
.rpt-myrange-custom {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 12px;
  border-left: 1px solid var(--border);
}
.rpt-range-input {
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-size: 13px;
  color: var(--text-primary);
  font-family: var(--font);
  outline: none;
  cursor: pointer;
  width: 140px;
}
.rpt-range-input:focus { border-color: var(--primary); }
.rpt-range-tilde {
  color: var(--text-muted);
  font-weight: 600;
}
.rpt-myrange-actions {
  margin-left: auto;
}
.rpt-range-export-btn {
  padding: 9px 18px;
  border: none;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  color: var(--white);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition);
  box-shadow: 0 2px 6px rgba(220,38,38,0.25);
  font-family: var(--font);
}
.rpt-range-export-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(220,38,38,0.35);
}
.rpt-range-export-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: var(--text-muted);
  box-shadow: none;
}

.rpt-myrange-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding: 10px 14px;
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border: 1px solid #bbf7d0;
  border-radius: var(--radius);
  flex-wrap: wrap;
}
.rpt-myrange-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: var(--white);
  border-radius: 14px;
  font-size: 12px;
  color: var(--text-primary);
}
.rpt-myrange-chip > i {
  color: var(--primary);
  font-size: 12px;
}
.rpt-myrange-chip > strong {
  color: var(--primary);
  font-weight: 700;
  font-size: 14px;
}
.rpt-myrange-range-label {
  margin-left: auto;
  font-size: 12px;
  color: #047857;
  font-weight: 600;
}

@media (max-width: 768px) {
  .rpt-myrange-bar { flex-direction: column; align-items: stretch; gap: 10px; }
  .rpt-myrange-custom { padding-left: 0; border-left: none; }
  .rpt-myrange-actions { margin-left: 0; }
  .rpt-range-export-btn { width: 100%; justify-content: center; }
  .rpt-myrange-range-label { margin-left: 0; }
  .rpt-date-nav-wrap { width: 100%; }
  .rpt-date-input { width: 100%; }
}

/* ============================================================
   v4.12.2: 내 보고서 — 뷰 모드 토글 + 날짜별 그리드 카드
   ============================================================ */
.rpt-my-view-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: #f1f5f9;
  border-radius: 10px;
  margin-bottom: 14px;
}
.rpt-view-btn {
  padding: 7px 14px;
  border: none;
  background: transparent;
  border-radius: 7px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition);
  font-family: var(--font);
}
.rpt-view-btn:hover { color: var(--text-primary); }
.rpt-view-btn.active {
  background: var(--white);
  color: var(--primary);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* ── 그리드 컨테이너 ───────────────────── */
.rpt-my-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}

/* ── 그리드 카드 ───────────────────── */
.rpt-mygc-card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px 12px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all var(--transition);
  overflow: hidden;
  cursor: default;
}
.rpt-mygc-card:hover {
  border-color: var(--primary);
  box-shadow: 0 6px 18px rgba(16,185,129,0.10);
  transform: translateY(-2px);
}
/* v4.12.3: 선택된 카드 강조 (카드는 그대로 유지, 컬러만 변경) */
.rpt-mygc-card.selected {
  border-color: var(--primary);
  border-width: 2px;
  background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 60%);
  box-shadow: 0 10px 24px rgba(16,185,129,0.22), 0 0 0 3px rgba(16,185,129,0.12);
  transform: translateY(-2px);
}
.rpt-mygc-card.selected:hover {
  /* 선택 상태가 hover보다 우선 */
  border-color: var(--primary);
  box-shadow: 0 10px 24px rgba(16,185,129,0.22), 0 0 0 3px rgba(16,185,129,0.12);
}
.rpt-mygc-card.selected .rpt-mygc-status-bar {
  width: 7px;
  background: linear-gradient(180deg, #34d399, #059669);
}
.rpt-mygc-selected-flag {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(16,185,129,0.35);
  animation: rptMygcFlagIn 0.25s ease-out;
}
.rpt-mygc-selected-flag i { font-size: 10px; }
@keyframes rptMygcFlagIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.rpt-mygc-status-bar {
  position: absolute;
  top: 0; left: 0;
  width: 5px;
  height: 100%;
  background: #cbd5e1;
}
.rpt-mygc-draft     .rpt-mygc-status-bar { background: linear-gradient(180deg, #fbbf24, #f59e0b); }
.rpt-mygc-submitted .rpt-mygc-status-bar { background: linear-gradient(180deg, #3b82f6, #2563eb); }
.rpt-mygc-reviewed  .rpt-mygc-status-bar { background: linear-gradient(180deg, #10b981, #059669); }

/* ── 헤더 (날짜 + 상태) ───────────────────── */
.rpt-mygc-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}
.rpt-mygc-date-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.rpt-mygc-date-accent {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  background: #ecfdf5;
  padding: 1px 8px;
  border-radius: 10px;
  width: fit-content;
}
.rpt-mygc-date-main {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.rpt-mygc-date-main > i { color: var(--text-muted); font-size: 12px; }
.rpt-mygc-head-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.rpt-mygc-unread {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: #f97316;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

/* ── 통계 칩 ───────────────────── */
.rpt-mygc-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  cursor: pointer;
}
.rpt-mygc-stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  font-size: 11.5px;
  color: var(--text-primary);
}
.rpt-mygc-stat-chip > i { color: var(--text-muted); font-size: 10.5px; }
.rpt-mygc-stat-chip > strong { color: var(--text-primary); font-weight: 700; }
.rpt-mygc-cmt { background: #f0f9ff; border-color: #bae6fd; }
.rpt-mygc-cmt > i, .rpt-mygc-cmt > strong { color: #0369a1; }
.rpt-mygc-fut { background: #fef3c7; border-color: #fde68a; }
.rpt-mygc-fut > i, .rpt-mygc-fut > strong { color: #b45309; }
.rpt-mygc-supp { background: #f0fdf4; border-color: #bbf7d0; }
.rpt-mygc-supp > i, .rpt-mygc-supp > strong { color: #047857; }

/* ── 카테고리 분포 ───────────────────── */
.rpt-mygc-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  cursor: pointer;
}
.rpt-mygc-cat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  background: #f1f5f9;
}
.rpt-mygc-cat > i { font-size: 10px; }
.rpt-mygc-cat-n {
  background: rgba(255,255,255,0.85);
  padding: 0 5px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 700;
}

/* ── 업무 항목 미니 리스트 ───────────────────── */
.rpt-mygc-items {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  border-top: 1px dashed var(--border);
  padding-top: 10px;
  cursor: pointer;
}
.rpt-mygc-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  padding: 3px 0;
}
.rpt-mygc-item-icon {
  font-size: 11px;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}
.rpt-mygc-item-title {
  flex: 1;
  min-width: 0;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rpt-mygc-item-hours {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  background: #f1f5f9;
  padding: 1px 7px;
  border-radius: 8px;
  flex-shrink: 0;
}
.rpt-mygc-future {
  color: #b45309;
  font-size: 12px;
  flex-shrink: 0;
}
.rpt-mygc-more {
  font-size: 11.5px;
  color: var(--text-muted);
  font-style: italic;
  padding-left: 26px;
}
.rpt-mygc-empty {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  padding: 10px;
}

/* ── 푸터 (펼침 버튼) ───────────────────── */
.rpt-mygc-foot {
  border-top: 1px solid var(--border);
  padding-top: 8px;
  margin-top: 2px;
}
.rpt-mygc-toggle-btn {
  width: 100%;
  padding: 6px 10px;
  border: none;
  background: transparent;
  color: var(--primary);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 6px;
  transition: background var(--transition);
  font-family: var(--font);
}
.rpt-mygc-toggle-btn:hover { background: #ecfdf5; }
.rpt-mygc-toggle-btn.is-selected {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  box-shadow: 0 2px 6px rgba(16,185,129,0.30);
}
.rpt-mygc-toggle-btn.is-selected:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

/* ── v4.12.3: 그리드 하단 별도 상세 패널 (인라인 확장 폐지) ───────────────────── */
.rpt-my-detail-panel {
  margin-top: 18px;
  background: var(--white);
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(16,185,129,0.18);
  overflow: hidden;
  animation: rptMyDetailIn 0.28s ease-out;
}
@keyframes rptMyDetailIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.rpt-my-detail-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
}
.rpt-my-detail-panel-title {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 15px;
  font-weight: 700;
}
.rpt-my-detail-panel-title i { font-size: 16px; }
.rpt-my-detail-close {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.4);
  color: #fff;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
  font-family: var(--font);
}
.rpt-my-detail-close:hover { background: rgba(255,255,255,0.32); }
.rpt-my-detail-panel-body {
  padding: 18px;
  background: #fafafa;
}
.rpt-my-detail-panel-body .rpt-card {
  margin: 0;
}

/* ── 모바일 반응형 ───────────────────── */
@media (max-width: 768px) {
  .rpt-my-grid { grid-template-columns: 1fr; gap: 10px; }
  .rpt-mygc-card { padding: 14px 14px 10px 14px; }
  .rpt-mygc-cat-name { display: none; } /* 모바일은 아이콘+숫자만 */
  .rpt-my-detail-panel-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .rpt-my-detail-panel-body { padding: 12px; }
}

/* ── 보고서 목록 ── */
.rpt-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.rpt-empty {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
  background: var(--white);
  border-radius: var(--radius);
  border: 1px dashed var(--border);
}
.rpt-empty i {
  font-size: 40px;
  display: block;
  margin-bottom: 12px;
  opacity: 0.35;
}
.rpt-empty p { font-size: 14px; }
.rpt-empty .btn-secondary { margin-top: 14px; }

/* ==============================================
   팀 보고서 — 갤러리 카드 (재설계: 2026-05-12)
   ============================================== */
.rpt-team-summary {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.rpt-team-chip {
  background: #f3f4f6;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.rpt-team-chip strong { color: var(--primary); margin-left: 4px; }
.rpt-team-chip.chip-submitted { background: rgba(59,130,246,0.08); border-color: rgba(59,130,246,0.3); }
.rpt-team-chip.chip-submitted strong { color: #2563eb; }
.rpt-team-chip.chip-draft     { background: rgba(245,158,11,0.08); border-color: rgba(245,158,11,0.3); }
.rpt-team-chip.chip-draft strong { color: #d97706; }
.rpt-team-chip.chip-reviewed  { background: rgba(16,185,129,0.08); border-color: rgba(16,185,129,0.3); }
.rpt-team-chip.chip-reviewed strong { color: #059669; }

/* ── 갤러리 그리드 ── */
.rpt-team-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 1100px) {
  .rpt-team-gallery { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .rpt-team-gallery { grid-template-columns: 1fr; }
}

/* ── 갤러리 카드 ── */
.rpt-gal-card {
  position: relative;
  background: var(--white);
  border-radius: var(--radius-lg, 14px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft, 0 6px 18px rgba(15,23,42,0.05));
  padding: 16px 16px 14px 20px;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
  outline: none;
}
.rpt-gal-card:hover,
.rpt-gal-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--shadow-pop, 0 14px 38px rgba(102,126,234,0.18));
  border-color: rgba(102,126,234,0.4);
}
.rpt-gal-card:focus-visible { box-shadow: 0 0 0 3px rgba(102,126,234,0.35); }

/* 좌측 상태바 (그라디언트) */
.rpt-gal-status-bar {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 5px;
  background: var(--grad-brand, linear-gradient(135deg,#667eea 0%,#764ba2 100%));
}
.rpt-gal-submitted .rpt-gal-status-bar { background: var(--grad-cyan,    linear-gradient(135deg,#4facfe 0%,#00f2fe 100%)); }
.rpt-gal-draft     .rpt-gal-status-bar { background: var(--grad-sunset,  linear-gradient(135deg,#fa709a 0%,#fee140 100%)); }
.rpt-gal-reviewed  .rpt-gal-status-bar { background: var(--grad-mint,    linear-gradient(135deg,#43e97b 0%,#38f9d7 100%)); }

.rpt-gal-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.rpt-gal-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--grad-brand, linear-gradient(135deg,#667eea 0%,#764ba2 100%));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(102,126,234,0.25);
}
.rpt-gal-head-info { flex: 1; min-width: 0; }
.rpt-gal-author {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rpt-gal-role { margin-top: 3px; }

.rpt-gal-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.rpt-gal-meta-chip {
  font-size: 11px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 9px;
  color: var(--text-secondary, #475569);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.rpt-gal-meta-chip i { font-size: 10px; }
.rpt-gal-cmt-chip  { background: rgba(99,102,241,0.08);  border-color: rgba(99,102,241,0.25);  color: #4f46e5; }
.rpt-gal-supp-chip { background: rgba(245,158,11,0.08);  border-color: rgba(245,158,11,0.25);  color: #d97706; }

.rpt-gal-cats { display: flex; gap: 5px; flex-wrap: wrap; }
.rpt-gal-cat-mini {
  font-size: 10.5px;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #eef2ff;
  color: #4338ca;
}
.rpt-gal-cat-mini.cat-meeting { background: rgba(99,102,241,0.12);  color: #4f46e5; }
.rpt-gal-cat-mini.cat-sales   { background: rgba(16,185,129,0.12);  color: #047857; }
.rpt-gal-cat-mini.cat-dev     { background: rgba(59,130,246,0.12);  color: #2563eb; }
.rpt-gal-cat-mini.cat-admin   { background: rgba(245,158,11,0.12);  color: #b45309; }
.rpt-gal-cat-mini.cat-other   { background: rgba(148,163,184,0.18); color: #475569; }

.rpt-gal-preview {
  background: #f8fafc;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12.5px;
  color: var(--text-secondary, #475569);
  line-height: 1.45;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  border-left: 3px solid rgba(102,126,234,0.4);
}
.rpt-gal-preview > i {
  font-size: 10px;
  color: rgba(102,126,234,0.6);
  margin-top: 3px;
  flex-shrink: 0;
}
.rpt-gal-preview-text {
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.rpt-gal-more {
  font-size: 11px;
  font-weight: 700;
  color: #4f46e5;
  background: rgba(99,102,241,0.12);
  border-radius: 999px;
  padding: 2px 7px;
  flex-shrink: 0;
  align-self: flex-start;
}
.rpt-gal-preview-empty { border-left-color: var(--border); }

.rpt-gal-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
  font-size: 12px;
}
.rpt-gal-date { color: var(--text-muted); display: inline-flex; align-items: center; gap: 5px; }
.rpt-gal-cta {
  color: #4f46e5;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: gap .18s ease;
}
.rpt-gal-card:hover .rpt-gal-cta { gap: 9px; }

/* ==============================================
   팀 보고서 — 상세 화면 (페이지 전환)
   ============================================== */
.rpt-dt-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  gap: 10px;
  flex-wrap: wrap;
}
.rpt-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: all .18s ease;
}
.rpt-back-btn:hover {
  border-color: rgba(102,126,234,0.5);
  color: #4f46e5;
  transform: translateX(-2px);
  box-shadow: var(--shadow-soft, 0 6px 18px rgba(15,23,42,0.05));
}
.rpt-dt-toolbar-right { display: flex; gap: 8px; flex-wrap: wrap; }

.rpt-dt-card {
  background: var(--white);
  border-radius: var(--radius-lg, 14px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft, 0 6px 18px rgba(15,23,42,0.05));
  overflow: hidden;
}
.rpt-dt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  background: linear-gradient(135deg, rgba(102,126,234,0.06) 0%, rgba(118,75,162,0.04) 100%);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.rpt-dt-author-block { display: flex; align-items: center; gap: 12px; }
.rpt-dt-avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--grad-brand, linear-gradient(135deg,#667eea 0%,#764ba2 100%));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 22px;
  box-shadow: 0 6px 16px rgba(102,126,234,0.3);
}
.rpt-dt-author-name { margin: 0; font-size: 18px; font-weight: 700; color: var(--text-primary); }
.rpt-dt-author-sub { display: flex; align-items: center; gap: 10px; margin-top: 5px; flex-wrap: wrap; }
.rpt-dt-date { font-size: 13px; color: var(--text-secondary, #475569); display: inline-flex; align-items: center; gap: 5px; }
.rpt-dt-header-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.rpt-dt-items { padding: 12px 16px; display: flex; flex-direction: column; gap: 14px; }

.rpt-dt-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: #fdfdff;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.rpt-dt-item:hover { border-color: rgba(102,126,234,0.35); box-shadow: 0 4px 14px rgba(15,23,42,0.04); }

.rpt-dt-item-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 14px 16px;
  gap: 12px;
  background: var(--white);
}
.rpt-dt-item-left { display: flex; gap: 12px; flex: 1; min-width: 0; align-items: flex-start; }
.rpt-dt-item-info { flex: 1; min-width: 0; }
.rpt-dt-item-right { flex-shrink: 0; }

/* 항목별 코멘트 영역 */
.rpt-wi-cmt-section {
  background: #f8fafc;
  border-top: 1px dashed var(--border);
  padding: 12px 16px;
}
.rpt-wi-cmt-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary, #475569);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}
.rpt-wi-cmt-label i { color: #4f46e5; }
.rpt-wi-cmt-list { display: flex; flex-direction: column; gap: 8px; }
.rpt-wi-cmt-list .rpt-comment {
  background: var(--white);
  border-radius: 8px;
  padding: 10px 12px;
  border: 1px solid var(--border);
}
.rpt-comment-empty-sm {
  font-size: 12px;
  color: var(--text-muted);
  padding: 6px 0;
  margin: 0;
  font-style: italic;
}
.rpt-wi-cmt-form {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  align-items: flex-end;
}
.rpt-wi-cmt-form textarea {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  font-family: var(--font);
  resize: vertical;
  min-height: 40px;
  outline: none;
  transition: border-color .18s ease;
  background: var(--white);
}
.rpt-wi-cmt-form textarea:focus { border-color: rgba(102,126,234,0.6); }
.rpt-wi-cmt-form .btn-primary { flex-shrink: 0; }

/* 모바일 대응 */
@media (max-width: 720px) {
  .rpt-dt-header { padding: 14px 16px; }
  .rpt-dt-items  { padding: 10px; }
  .rpt-dt-item-main { padding: 12px; flex-direction: column; }
  .rpt-wi-cmt-form { flex-direction: column; align-items: stretch; }
  .rpt-wi-cmt-form .btn-primary { width: 100%; justify-content: center; }
}

/* ── 보고서 카드 ── */
.rpt-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--transition);
}
.rpt-card:hover { box-shadow: var(--shadow); }
.rpt-card.rpt-card-draft { border-left: 4px solid var(--text-muted); }
.rpt-card.rpt-card-submitted { border-left: 4px solid var(--blue); }
.rpt-card.rpt-card-reviewed { border-left: 4px solid var(--green); }

.rpt-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: #fafafa;
}
.rpt-author-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.rpt-card-meta { flex: 1; min-width: 0; }
.rpt-card-author {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}
.rpt-card-date {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 1px;
}
.rpt-card-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: wrap;
}
.rpt-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* ── 상태 배지 ── */
.rpt-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.rpt-badge-draft {
  background: #f3f4f6;
  color: #6b7280;
  border: 1px solid #d1d5db;
}
.rpt-badge-submitted {
  background: #dbeafe;
  color: #1d4ed8;
  border: 1px solid #93c5fd;
}
.rpt-badge-reviewed {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}

/* ── 카테고리 배지 ── */
.rpt-cat-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.cat-meeting  { background: #ede9fe; color: #6d28d9; }
.cat-sales    { background: #fef9c3; color: #92400e; }
.cat-dev      { background: #dbeafe; color: #1e40af; }
.cat-admin    { background: #f3f4f6; color: #374151; }
.cat-other    { background: #fce7f3; color: #9d174d; }

/* ── 카드 본문 ── */
.rpt-card-body { padding: 16px 18px; }

.rpt-section-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.rpt-section-label i { font-size: 12px; }

/* ── 업무 항목 ── */
.rpt-work-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}
.rpt-work-item {
  background: #f9fafb;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.rpt-work-item-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.rpt-work-item-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
  flex: 1;
  min-width: 0;
}
.rpt-work-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  flex-wrap: wrap;
}
.rpt-work-item-detail {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--border);
}
.rpt-customer-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #ecfdf5;
  color: var(--primary);
  border: 1px solid #a7f3d0;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}
.rpt-customer-tag.tag-internal {
  background: #f3f4f6;
  color: var(--text-secondary);
  border-color: var(--border);
}
/* 제품 배지 */
.rpt-product-tag {
  background: #f5f3ff;
  color: #7c3aed;
  border-color: #ddd6fe;
}
/* 태그 묶음 행 */
.rpt-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 5px;
}

/* ══════════════════════════════════════════
   첨부 링크 — 보고서 카드 뷰
   ══════════════════════════════════════════ */
.rpt-attach-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 8px;
}
.rpt-attach-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  font-size: 12px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: background 0.15s, box-shadow 0.15s;
  max-width: 100%;
  overflow: hidden;
}
.rpt-attach-item:hover {
  background: #dcfce7;
  box-shadow: 0 2px 6px rgba(45,106,79,0.12);
}
.rpt-att-type-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--primary);
  color: #fff;
  white-space: nowrap;
  flex-shrink: 0;
}
/* 타입별 배지 색상 */
.rpt-att-type-minutes   .rpt-att-type-badge { background: #3b82f6; }
.rpt-att-type-recording .rpt-att-type-badge { background: #ef4444; }
.rpt-att-type-proposal  .rpt-att-type-badge { background: #f59e0b; color: #000; }
.rpt-att-type-contract  .rpt-att-type-badge { background: #8b5cf6; }
.rpt-att-type-report    .rpt-att-type-badge { background: #0ea5e9; }
.rpt-att-type-other     .rpt-att-type-badge { background: #6b7280; }

.rpt-att-drive-icon { color: #4285f4; font-size: 13px; flex-shrink: 0; }
.rpt-att-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  color: var(--text-primary);
}
.rpt-att-ext-icon { font-size: 10px; color: var(--text-secondary); flex-shrink: 0; }

/* ══════════════════════════════════════════
   첨부 링크 — 보고서 작성 폼 (입력 UI)
   ══════════════════════════════════════════ */
.wi-row-attach {
  padding: 0 14px 16px;
  border-top: 1px dashed #e2e8f0;
  margin-top: 4px;
}
.wi-attach-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0 8px;
  flex-wrap: wrap;
}
.wi-attach-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.wi-attach-label .fa-google-drive { color: #4285f4; font-size: 13px; }
.wi-attach-desc {
  font-size: 11px;
  color: var(--text-muted);
  flex: 1;
}
.wi-attach-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border: 1.5px dashed var(--primary);
  border-radius: 8px;
  background: #f0fdf4;
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--font);
  white-space: nowrap;
}
.wi-attach-add-btn:hover {
  background: var(--primary);
  color: #fff;
  border-style: solid;
}

/* 첨부 행 (타입 select + 설명 input + URL input + 삭제 버튼) */
.wi-attach-list { display: flex; flex-direction: column; gap: 6px; }
.wi-attach-row {
  display: grid;
  grid-template-columns: 120px 1fr 1.6fr 32px;
  gap: 6px;
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 7px 10px;
  animation: attachFadeIn 0.18s ease;
}
@keyframes attachFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.wi-att-type  { font-size: 12px; padding: 5px 8px; height: 34px; }
.wi-att-label { font-size: 12px; padding: 5px 8px; height: 34px; }
.wi-att-url   {
  font-size: 11px;
  padding: 5px 8px;
  height: 34px;
  font-family: 'Courier New', monospace;
  color: #3b82f6;
}
.wi-att-del-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: #fee2e2;
  color: var(--red);
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: background 0.15s;
  flex-shrink: 0;
}
.wi-att-del-btn:hover { background: #fca5a5; }

/* 모바일 반응형 */
@media (max-width: 600px) {
  .wi-attach-row { grid-template-columns: 1fr 32px; grid-template-rows: auto auto auto; }
  .wi-att-type  { grid-column: 1; }
  .wi-att-label { grid-column: 1; }
  .wi-att-url   { grid-column: 1; }
  .wi-att-del-btn { grid-column: 2; grid-row: 1 / 4; align-self: center; }
}
.rpt-duration-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fdba74;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}

/* ── 내일 계획 섹션 ── */
.rpt-tomorrow {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.6;
}

/* ── 총 시간 배지 ── */
.rpt-total-hours {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--primary);
  color: #fff;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}

/* ── 코멘트 섹션 ── */
.rpt-comments-section {
  border-top: 1px solid var(--border);
  padding: 14px 18px;
  background: #fafafa;
}
.rpt-comments-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}
.rpt-comment {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}
.rpt-comment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
}
.rpt-comment-author {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}
.rpt-comment-time {
  font-size: 11px;
  color: var(--text-muted);
}
.rpt-comment-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}
.rpt-comment-empty {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 10px;
}
.rpt-comment-form {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.rpt-comment-input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 13px;
  font-family: var(--font);
  color: var(--text-primary);
  background: var(--white);
  outline: none;
  resize: none;
  min-height: 38px;
  max-height: 100px;
  transition: border-color var(--transition);
}
.rpt-comment-input:focus { border-color: var(--primary); }

/* ── 보고서 폼 (모달) ── */
.rpt-form-section {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.rpt-form-section:last-child { border-bottom: none; margin-bottom: 0; }
.rpt-form-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.rpt-form-section-title i { color: var(--primary); }

/* ── 업무 항목 추가 버튼 ── */
.btn-add-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 16px;
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  background: none;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
  justify-content: center;
  margin-top: 8px;
}
.btn-add-item:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #f0fdf4;
}

/* ── 폼 업무 항목 행 ── */
.rpt-item-row {
  background: #f9fafb;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 10px;
  position: relative;
}
.rpt-item-row-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.rpt-item-num {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.rpt-item-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.rpt-item-fields .full { grid-column: span 2; }

/* ── 확인완료 버튼 ── */
.btn-review {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: #ecfdf5;
  color: var(--primary);
  border: 1.5px solid #6ee7b7;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-review:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ── 통계 탭 ── */
.rpt-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.rpt-stats-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 20px 22px;
}
.rpt-stats-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.rpt-stats-card-title i { color: var(--primary); }
.rpt-stats-chart-wrap {
  height: 240px;
  position: relative;
}
.rpt-stats-chart-wrap.doughnut { height: 220px; }

/* ── 팀 보고서 날짜 그룹 헤더 ── */
.rpt-date-group-header {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  padding: 8px 14px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── 진행 스트릭 ── */
.rpt-streak-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #fff7ed, #fef3c7);
  color: #d97706;
  border: 1px solid #fde68a;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}

/* ── 반응형 ── */
@media (max-width: 900px) {
  .rpt-kpi-strip { grid-template-columns: repeat(2, 1fr); }
  .rpt-stats-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .rpt-kpi-strip { grid-template-columns: 1fr 1fr; }
  .rpt-tab-bar { width: 100%; }
  .rpt-tab-btn { flex: 1; justify-content: center; font-size: 12px; padding: 8px 10px; }
  .rpt-item-fields { grid-template-columns: 1fr; }
  .rpt-item-fields .full { grid-column: span 1; }
  .rpt-card-header { flex-wrap: wrap; }
}

/* =============================================
   고객 목록 — 외주/공급업체 인라인 배지
   ============================================= */
.cust-vendor-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}
.cust-vendor-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid transparent;
  white-space: nowrap;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: default;
}
.cust-vendor-out {
  background: #eff6ff;
  color: #2563eb;
  border-color: #bfdbfe;
}
.cust-vendor-sup {
  background: #fff7ed;
  color: #c2410c;
  border-color: #fdba74;
}
.cust-vendor-out i,
.cust-vendor-sup i { font-size: 9px; flex-shrink: 0; }

/* =============================================
   파이프라인 툴바 — 외주업체 필터 탭
   ============================================= */
.pipeline-toolbar-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 8px 14px;
  border-top: 1px solid var(--border);
  background: #f8fafc;
}
.pipeline-toolbar-tab-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-right: 4px;
  white-space: nowrap;
}
.pipe-outsource-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  border: 1.5px solid #bfdbfe;
  background: #eff6ff;
  color: #2563eb;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.pipe-outsource-btn.active {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}
.pipe-outsource-btn:hover:not(.active) {
  background: #dbeafe;
  border-color: #93c5fd;
}
.pipe-outsource-btn i { font-size: 9px; }

/* =============================================
   대시보드 — 공급업체별 연계 고객 차트
   ============================================= */
.supply-chart-wrap {
  height: 260px;
  position: relative;
}

/* =============================================
   제품 관리 — 커스텀 제품 일괄 관리 섹션
   ============================================= */
.custom-prod-manage-section {
  background: var(--white);
  border-radius: var(--radius);
  border: 1.5px dashed #cbd5e1;
  padding: 20px 24px;
  margin-top: 28px;
}
.custom-prod-manage-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.custom-prod-manage-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}
.custom-prod-manage-title i { color: var(--primary); }
.custom-prod-manage-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
}
.custom-prod-manage-empty {
  text-align: center;
  padding: 28px 0;
  color: var(--text-muted);
  font-size: 12.5px;
}
.custom-prod-manage-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.custom-prod-manage-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 600;
  background: #f8fafc;
  border: 1.5px dashed #cbd5e1;
  color: var(--text-secondary);
}
.custom-prod-manage-tag i { font-size: 10px; color: var(--text-muted); }
.btn-custom-prod-del {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0 2px;
  font-size: 11px;
  line-height: 1;
  transition: color 0.15s;
}
.btn-custom-prod-del:hover { color: var(--red); }
.btn-clear-all-custom {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  border: 1px solid #fca5a5;
  background: #fef2f2;
  color: #dc2626;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-clear-all-custom:hover { background: #fee2e2; }

/* =============================================
   [E] 조직구조 + 보고서 개편 스타일
   ============================================= */

/* ── 직무 체크박스 그룹 (계정 폼) ── */
.job-checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.job-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: #f8fafc;
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}
.job-checkbox-label:hover {
  border-color: #0ea5e9;
  background: #f0f9ff;
  color: #0284c7;
}
.job-checkbox-label input[type="checkbox"] { display: none; }
.job-checkbox-label:has(input:checked) {
  border-color: #0ea5e9;
  background: #0ea5e9;
  color: #fff;
}
/* :has() 미지원 브라우저 폴백 */
.job-checkbox-label.job-checked {
  border-color: #0ea5e9;
  background: #0ea5e9;
  color: #fff;
}

/* ── 직무 배지 (계정 테이블) ── */
.job-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10.5px;
  font-weight: 700;
  background: #f0f9ff;
  color: #0284c7;
  border: 1px solid #bae6fd;
  white-space: nowrap;
  margin: 1px 2px 1px 0;
}
.acct-jobs-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  max-width: 220px;
}

/* ── 미읽은 코멘트 배지 (사이드바) ── */
.nav-badge-unread {
  background: #f97316;
  color: #fff;
  animation: pulse-badge 1.5s infinite;
}
@keyframes pulse-badge {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.2); }
}

/* ── 보고서 카드 — 미읽은 코멘트 표시 ── */
.rpt-comment-unread {
  background: #fffbeb;
  border-left: 3px solid #f59e0b;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* ============================================================
   v4.12.1: 코멘트 컨텍스트 칩 — 어떤 업무 항목에 단 코멘트인지 표시
   ============================================================ */
.rpt-cmt-context {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11.5px;
  margin-bottom: 8px;
  max-width: 100%;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}
.rpt-cmt-context > i {
  color: #64748b;
  font-size: 11px;
}
.rpt-cmt-context-report {
  background: #ecfeff;
  border-color: #a5f3fc;
  color: #0e7490;
  font-weight: 600;
}
.rpt-cmt-context-report > i { color: #0891b2; }
.rpt-cmt-context-wi {
  background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
  border-color: #d8b4fe;
  color: #6b21a8;
  flex-wrap: wrap;
}
.rpt-cmt-context-wi > i { color: #9333ea; }
.rpt-cmt-context-cat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 6px;
  border-radius: 8px;
  font-size: 10.5px;
  font-weight: 600;
  background: rgba(255,255,255,0.6);
}
.rpt-cmt-context-cat > i { font-size: 9px; }
.rpt-cmt-context-title {
  font-weight: 600;
  color: #0f172a;
  max-width: 280px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rpt-cmt-context-orphan {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}
.rpt-cmt-context-orphan > i { color: #dc2626; }
.rpt-unread-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  background: #f97316;
  color: #fff;
  margin-left: 6px;
  animation: pulse-badge 1.5s infinite;
}
.rpt-unread-label {
  font-size: 11px;
  font-weight: 700;
  color: #f97316;
  margin-left: 6px;
  background: #fff7ed;
  padding: 1px 6px;
  border-radius: 10px;
  border: 1px solid #fdba74;
}

/* ── 코멘트 답글 ── */
.rpt-reply {
  margin: 8px 0 0 20px;
  padding: 8px 12px;
  background: #f8fafc;
  border-left: 2px solid #cbd5e1;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.rpt-reply-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.rpt-reply-meta i { color: var(--text-muted); font-size: 10px; }
.rpt-reply-author { font-weight: 700; color: var(--text-primary); }
.rpt-reply-body {
  font-size: 12.5px;
  color: var(--text-primary);
  line-height: 1.6;
  margin: 0;
}

/* ── 답글 버튼 + 폼 ── */
.rpt-comment-footer {
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.rpt-reply-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--primary);
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: background var(--transition);
}
.rpt-reply-btn:hover { background: #f0fdf4; }
.rpt-reply-form {
  margin-top: 8px;
  padding: 10px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.rpt-reply-input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  font-size: 13px;
  font-family: var(--font);
  color: var(--text-primary);
  background: var(--white);
  outline: none;
  resize: none;
  transition: border-color var(--transition);
}
.rpt-reply-input:focus { border-color: var(--primary); }
.rpt-reply-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 6px;
}

/* ── 보충설명 버튼 ── */
.btn-supplement {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  background: #f0fdf4;
  color: var(--primary);
  border: 1.5px solid #bbf7d0;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.btn-supplement:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ── 보충설명 섹션 ── */
.rpt-supplement-section {
  border-top: 1px solid var(--border);
  padding: 14px 18px;
  background: #f0fdf4;
}
.rpt-supplement-list {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rpt-supplement-item {
  background: var(--white);
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  position: relative;
}
.rpt-supplement-item::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--primary);
  border-radius: 3px 0 0 3px;
}
.rpt-supplement-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--text-secondary);
  margin-bottom: 5px;
}
.rpt-supplement-meta i { color: var(--primary); font-size: 10px; }
.rpt-supplement-author { font-weight: 700; color: var(--primary); }
.rpt-supplement-body {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.65;
  margin: 0;
}

/* ── 보충설명 폼 (모달) ── */
.supplement-form-wrap { padding: 4px 0; }
.supplement-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: #fff7ed;
  border: 1px solid #fdba74;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 12.5px;
  color: #c2410c;
  font-weight: 600;
}
.supplement-note i { color: #f59e0b; flex-shrink: 0; margin-top: 1px; }

/* ── 제출 완료 칩 (버튼 대체) ── */
.rpt-submitted-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 600;
  background: #f3f4f6;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.rpt-submitted-chip i { font-size: 11px; color: var(--text-muted); }

/* ── CEO 전용 안내 배너 ── */
.rpt-ceo-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border: 1px solid #bfdbfe;
  border-left: 4px solid #3b82f6;
  border-radius: 10px;
  color: #1d4ed8;
  font-size: 13.5px;
  font-weight: 500;
}
.rpt-ceo-notice i { font-size: 16px; flex-shrink: 0; }

/* ── 미읽은 코멘트 알림 팝업 ── */
.comment-notif-popup {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9999;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  border: 1px solid #fed7aa;
  border-left: 4px solid #f97316;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
  min-width: 300px;
  max-width: 380px;
  animation: slide-up-notif 0.3s ease;
}
@keyframes slide-up-notif {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.notif-popup-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f97316, #fb923c);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
  flex-shrink: 0;
}
.notif-popup-body { flex: 1; }
.notif-popup-title {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 3px;
}
.notif-popup-msg {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0 0 10px;
}
.notif-popup-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* ── 범용 소형 버튼 ── */
.btn-sm {
  padding: 5px 12px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}
.btn-xs {
  padding: 3px 9px;
  font-size: 11px;
  border-radius: 4px;
}

/* =============================================
   PROFILE PAGE — 내 프로필 페이지
   ============================================= */

/* ── 페이지 래퍼 ── */
.profile-page-wrap {
  display: flex;
  flex-direction: column;
  gap: 22px;
  max-width: 860px;
}

/* ── 헤더 카드 (아바타 + 이름 + 기본 정보) ── */
.profile-header-card {
  background: linear-gradient(135deg, #1b4332 0%, #2d6a4f 60%, #40916c 100%);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  display: flex;
  align-items: center;
  gap: 24px;
  box-shadow: 0 8px 32px rgba(27, 67, 50, 0.22);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.profile-header-card::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
}
.profile-header-card::after {
  content: '';
  position: absolute;
  bottom: -30px; left: 180px;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
}

/* ── 대형 아바타 ── */
.profile-avatar-lg {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  border: 3px solid rgba(255,255,255,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  letter-spacing: -1px;
  text-shadow: 0 2px 6px rgba(0,0,0,0.18);
}

/* ── 헤더 텍스트 영역 ── */
.profile-header-info {
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 1;
}
.profile-display-name {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 6px;
  line-height: 1.2;
  letter-spacing: -0.3px;
}
.profile-header-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.profile-username-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 20px;
  padding: 3px 11px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
}
.profile-username-chip i { font-size: 10px; opacity: 0.75; }
.profile-jobs-row {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}
.profile-job-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(255,255,255,0.13);
  border: 1px solid rgba(255,255,255,0.22);
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
}
.profile-last-login {
  font-size: 11.5px;
  color: rgba(255,255,255,0.6);
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
  position: relative;
  z-index: 1;
}
.profile-last-login i { font-size: 10px; }

/* ── 2열 그리드 레이아웃 ── */
.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.profile-grid .profile-section-card.full-width {
  grid-column: 1 / -1;
}

/* ── 섹션 카드 ── */
.profile-section-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

/* ── 섹션 헤더 ── */
.profile-section-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--border);
  background: #fafafa;
}
.profile-section-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border: 1.5px solid #bbf7d0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--primary);
  flex-shrink: 0;
}
.profile-section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.profile-section-desc {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ── 섹션 바디 ── */
.profile-section-body {
  padding: 20px 22px;
}

/* ── 기본 정보 그리드 (읽기 전용) ── */
.profile-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 20px;
}
.profile-info-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.profile-info-item.profile-info-full {
  grid-column: 1 / -1;
}
.profile-info-label {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.profile-info-value {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
}

/* ── 읽기 전용 안내 ── */
.profile-readonly-note {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 14px;
}
.profile-readonly-note i {
  color: var(--primary);
  font-size: 13px;
  flex-shrink: 0;
}
.profile-readonly-card {
  background: #f9fafb;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  padding: 22px;
}

/* ── 폼 저장 성공 메시지 ── */
.form-success {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f0fdf4;
  border: 1px solid #86efac;
  color: #15803d;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  margin-top: 12px;
  animation: fadeInDown 0.25s ease;
}
.form-success i { font-size: 14px; flex-shrink: 0; }

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── 비밀번호 강도 바 (profile.js 용) ── */
.pw-strength-wrap {
  margin-top: 6px;
}
.pw-strength-bar {
  height: 5px;
  background: #e5e7eb;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 4px;
}
.pw-strength-fill {
  height: 100%;
  border-radius: 3px;
  width: 0%;
  transition: width 0.3s ease, background 0.3s ease;
}
.pw-strength-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}
/* 강도 레벨별 색상 */
.pw-strength-wrap.strength-weak   .pw-strength-fill  { width: 25%; background: #ef4444; }
.pw-strength-wrap.strength-weak   .pw-strength-label { color: #ef4444; }
.pw-strength-wrap.strength-fair   .pw-strength-fill  { width: 55%; background: #f59e0b; }
.pw-strength-wrap.strength-fair   .pw-strength-label { color: #d97706; }
.pw-strength-wrap.strength-strong .pw-strength-fill  { width: 80%; background: #22c55e; }
.pw-strength-wrap.strength-strong .pw-strength-label { color: #16a34a; }
.pw-strength-wrap.strength-very-strong .pw-strength-fill  { width: 100%; background: #10b981; }
.pw-strength-wrap.strength-very-strong .pw-strength-label { color: #059669; }

/* =============================================
   TEMP PASSWORD MODAL — 임시 비밀번호 안내 모달
   ============================================= */

/* ── 오버레이 ── */
.temp-pw-modal-wrap {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.2s ease;
  padding: 20px;
}

/* ── 모달 박스 ── */
.temp-pw-modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0,0,0,0.22);
  width: 100%;
  max-width: 460px;
  overflow: hidden;
  animation: slideUp 0.25s ease;
}

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

/* ── 배너 (상단 그라디언트 헤더) ── */
.temp-pw-banner {
  background: linear-gradient(135deg, #1b4332, #2d6a4f);
  padding: 22px 26px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.temp-pw-banner-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(255,255,255,0.15);
  border: 1.5px solid rgba(255,255,255,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #fff;
  flex-shrink: 0;
}
.temp-pw-banner-text h3 {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 3px;
}
.temp-pw-banner-text p {
  font-size: 12px;
  color: rgba(255,255,255,0.7);
  margin: 0;
}

/* ── 모달 내용 영역 ── */
.temp-pw-info {
  padding: 22px 26px;
}
.temp-pw-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}
.temp-pw-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
  min-width: 60px;
}
.temp-pw-value {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  font-family: 'Courier New', monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.temp-pw-highlight {
  flex: 1;
  font-size: 18px;
  font-weight: 800;
  color: var(--primary-dark);
  font-family: 'Courier New', monospace;
  letter-spacing: 2px;
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid #86efac;
  text-align: center;
  user-select: all;
}

/* ── 복사 버튼 ── */
.btn-copy-pw {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 600;
  background: var(--primary);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: background var(--transition), transform 0.1s ease;
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-copy-pw:hover { background: var(--primary-dark); }
.btn-copy-pw:active { transform: scale(0.96); }
.btn-copy-pw i { font-size: 11px; }

/* ── 안내 문구 ── */
.temp-pw-notice {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 12.5px;
  color: #92400e;
  line-height: 1.5;
}
.temp-pw-notice i {
  color: #f59e0b;
  font-size: 14px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ── 모달 푸터 ── */
.temp-pw-footer {
  padding: 14px 26px 22px;
  display: flex;
  justify-content: flex-end;
}

/* =============================================
   ACCOUNT TABLE — 임시PW 배지 (acct-first-tag)
   ============================================= */
.acct-first-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border-radius: 20px;
  font-size: 10.5px;
  font-weight: 700;
  background: linear-gradient(135deg, #fef9c3, #fde68a);
  color: #92400e;
  border: 1px solid #f59e0b;
  white-space: nowrap;
  margin-left: 5px;
  letter-spacing: 0.2px;
}
.acct-first-tag i {
  font-size: 9px;
  color: #b45309;
}

/* ── 임시PW 행 하이라이트 ── */
.acct-table tbody tr.acct-row-first-login {
  background: #fffbeb;
}
.acct-table tbody tr.acct-row-first-login:hover {
  background: #fef3c7;
}

/* ── KPI 스트립 액션 그룹 (보고서 페이지) ── */
.rpt-kpi-action-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* ── 보충설명 소형 버튼 ── */
.btn-supplement-sm {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 11px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  background: #f0fdf4;
  color: var(--primary);
  border: 1.5px solid #bbf7d0;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.btn-supplement-sm:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn-supplement-sm i { font-size: 10px; }

/* ── 제출 완료 칩 (녹색, 오늘 제출 완료) ── */
.rpt-submitted-done-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 700;
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #6ee7b7;
  white-space: nowrap;
}
.rpt-submitted-done-chip i { font-size: 10px; color: #059669; }

/* =============================================
   PROFILE PAGE — 반응형
   ============================================= */
@media (max-width: 900px) {
  .profile-grid {
    grid-template-columns: 1fr;
  }
  .profile-grid .profile-section-card.full-width {
    grid-column: 1;
  }
}

@media (max-width: 600px) {
  .profile-header-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 22px 20px;
    gap: 16px;
  }
  .profile-info-grid {
    grid-template-columns: 1fr;
  }
  .profile-info-item.profile-info-full {
    grid-column: 1;
  }
  .temp-pw-modal {
    max-width: 100%;
  }
  .temp-pw-highlight {
    font-size: 15px;
    letter-spacing: 1px;
  }
}

/* =============================================
   MOBILE — 보고서 & 코멘트 전용 반응형
   기준: 768px 이하 = 스마트폰 환경
   ============================================= */

/* ── 모바일에서 페이지 하단 여백 (하단 네비 가림 방지) ── */
@media (max-width: 768px) {
  .page { padding-bottom: 80px !important; }

  /* ── 상단 topbar 간소화 ── */
  .topbar-date { display: none; }
  .topbar-right .lang-switcher { gap: 4px; }
  .lang-btn { padding: 5px 8px; font-size: 11px; }

  /* ── 보고서 탭바: 전폭 + 터치 친화 ── */
  .rpt-tab-bar {
    width: 100%;
    box-sizing: border-box;
    padding: 4px;
    gap: 3px;
  }
  .rpt-tab-btn {
    flex: 1;
    justify-content: center;
    padding: 10px 6px;
    font-size: 12px;
    gap: 4px;
  }
  .rpt-tab-btn span { display: none; }      /* 아이콘만 표시 */
  .rpt-tab-btn i { font-size: 16px; }

  /* ── KPI 스트립: 2×2 그리드 ── */
  .rpt-kpi-strip {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
  }
  .rpt-kpi-item { padding: 14px 14px; }
  .rpt-kpi-num  { font-size: 22px; }
  .rpt-kpi-action { grid-column: span 2; }

  /* ── 보고서 카드 헤더: 세로 스택 ── */
  .rpt-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
  }
  .rpt-card-header-left,
  .rpt-card-header-right {
    width: 100%;
    flex-wrap: wrap;
  }
  .rpt-card-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-start;
  }
  .rpt-card-actions { margin-left: auto; }

  /* ── 업무 항목: 터치 영역 확대 ── */
  .rpt-work-item {
    padding: 14px 14px;
  }
  .rpt-work-item-left {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .rpt-work-item-right { margin-top: 6px; }
  .rpt-duration-badge { font-size: 13px; padding: 4px 12px; }

  /* ── 코멘트 섹션 ── */
  .rpt-comments-section { padding: 12px 14px; }
  .rpt-comment { padding: 12px 14px; }
  .rpt-comment-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
  }
  .rpt-comment-body {
    font-size: 14px;
    line-height: 1.7;
    margin-top: 6px;
  }

  /* ── 코멘트 입력폼: 세로 스택 ── */
  .rpt-comment-form {
    flex-direction: column;
    gap: 8px;
  }
  .rpt-comment-input {
    width: 100%;
    font-size: 15px;          /* iOS 자동 확대 방지 (16px 미만이면 확대됨) */
    min-height: 80px;
    border-radius: 10px;
    padding: 10px 14px;
  }
  .rpt-comment-btn {
    width: 100%;
    justify-content: center;
    padding: 12px;
    font-size: 14px;
    border-radius: 10px;
  }

  /* ── 답글 폼 ── */
  .rpt-reply-input {
    font-size: 15px;
    padding: 10px 12px;
  }
  .rpt-reply-form-actions {
    flex-direction: row;
    gap: 8px;
  }
  .rpt-reply-form-actions button { flex: 1; padding: 10px; }

  /* ── 보충설명 버튼 / 확인완료 버튼: 터치 영역 확대 ── */
  .btn-supplement,
  .btn-review {
    padding: 10px 16px;
    font-size: 13px;
  }

  /* ── 팀 보고서 날짜 셀렉터 ── */
  .rpt-team-toolbar { flex-direction: column; align-items: stretch; }
  .rpt-date-select-wrap { width: 100%; }
  #rpt-team-date { width: 100%; font-size: 15px; padding: 10px 12px; }

  /* ── 통계 탭 그리드: 1열 ── */
  .rpt-stats-grid { grid-template-columns: 1fr; gap: 12px; }
  .rpt-stats-chart-wrap { height: 200px; }
}

/* ── 매우 작은 화면 (iPhone SE 등 375px) ── */
@media (max-width: 400px) {
  .rpt-tab-btn i { font-size: 14px; }
  .rpt-kpi-num  { font-size: 18px; }
  .rpt-card-header { padding: 10px 12px; }
  .rpt-comments-section { padding: 10px 12px; }
}

/* =============================================
   MOBILE — 보고서 작성 폼 모달 최적화
   ============================================= */
@media (max-width: 768px) {
  /* 모달 전체화면 전환 */
  #customer-modal .modal-box {
    width: 100% !important;
    max-width: 100% !important;
    min-width: unset !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
    margin: 0 !important;
    display: flex;
    flex-direction: column;
  }
  #customer-modal .modal-header {
    padding: 14px 16px;
    flex-shrink: 0;
  }
  #customer-modal .modal-body {
    flex: 1;
    overflow-y: auto;
    max-height: unset !important;
    -webkit-overflow-scrolling: touch;
    padding: 0;
  }

  /* 보고서 폼 내부 섹션 */
  .rpt-form-wrap .form-section { padding: 16px 14px; }
  .rpt-form-wrap .form-actions { padding: 12px 14px; }

  /* 업무 항목 카드 모바일 */
  .wi-card { border-radius: 10px; }
  .wi-row-main {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px 12px 6px;
  }
  .wi-row-link  { grid-template-columns: 1fr; padding: 0 12px 8px; gap: 10px; }
  .wi-row-sub   { grid-template-columns: 1fr; padding: 0 12px 10px; gap: 10px; }
  .wi-row-detail { padding: 0 12px 14px; }
  .wi-row-attach { padding: 0 12px 14px; }

  /* 입력 필드 크기 (iOS 확대 방지: 16px 이상) */
  .form-control,
  .wi-title-input,
  .wi-detail-input,
  select.form-control,
  input.form-control,
  textarea.form-control {
    font-size: 16px !important;
    padding: 11px 13px;
  }

  /* 버튼 높이 확대 (손가락 탭 영역) */
  .btn-primary, .btn-secondary, .btn-danger {
    min-height: 44px;
  }

  /* 폼 액션 버튼 영역 */
  .form-actions {
    flex-direction: column;
    gap: 8px;
  }
  .form-actions button { width: 100%; justify-content: center; }
}

/* =============================================
   MOBILE — 하단 네비게이션 바
   ============================================= */
.mobile-bottom-nav {
  display: none;              /* 데스크탑: 숨김 */
}

@media (max-width: 768px) {
  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 60px;
    background: var(--sidebar-bg);
    border-top: 1px solid rgba(255,255,255,0.08);
    z-index: 900;
    align-items: stretch;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.25);
  }
  .mob-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: none;
    border: none;
    color: var(--sidebar-text);
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    padding: 6px 4px;
    transition: color 0.2s, background 0.2s;
    position: relative;
    font-family: var(--font);
    letter-spacing: 0.2px;
    opacity: 0.7;
  }
  .mob-nav-item i {
    font-size: 20px;
    line-height: 1;
  }
  .mob-nav-item.active {
    color: var(--accent2);
    opacity: 1;
  }
  .mob-nav-item.active::after {
    content: '';
    position: absolute;
    top: 0; left: 20%; right: 20%;
    height: 2px;
    background: var(--accent2);
    border-radius: 0 0 3px 3px;
  }
  .mob-nav-item:active { background: rgba(255,255,255,0.06); }

  /* 배지 (미읽음/미제출) */
  .mob-nav-badge {
    position: absolute;
    top: 4px;
    right: calc(50% - 18px);
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: #ef4444;
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
  }
  .mob-nav-badge.hidden { display: none; }

  /* FAB — 보고서 빠른 작성 버튼 */
  .mob-fab {
    position: fixed;
    right: 20px;
    bottom: 76px;             /* 하단 네비 위 */
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    border: none;
    box-shadow: 0 4px 16px rgba(45,106,79,0.45);
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 901;
    transition: transform 0.2s, box-shadow 0.2s;
    -webkit-tap-highlight-color: transparent;
  }
  .mob-fab:active {
    transform: scale(0.93);
    box-shadow: 0 2px 8px rgba(45,106,79,0.3);
  }
  .mob-fab.hidden { display: none; }

  /* FAB 툴팁 라벨 */
  .mob-fab-label {
    position: fixed;
    right: 80px;
    bottom: 89px;
    background: rgba(17,24,39,0.9);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 6px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    white-space: nowrap;
  }
  .mob-fab:hover + .mob-fab-label,
  .mob-fab:focus + .mob-fab-label { opacity: 1; }
}

/* =============================================
   업무 캘린더 (v4.9.0 — 2026-05-13)
   ============================================= */
.cal-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  gap: 12px;
  flex-wrap: wrap;
}
.cal-nav-group {
  display: flex;
  align-items: center;
  gap: 6px;
}
.cal-nav-btn {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: 36px;
  height: 36px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  transition: all .15s ease;
}
.cal-nav-btn:hover { border-color: rgba(102,126,234,0.5); color: #4f46e5; }
.cal-month-label {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  min-width: 160px;
  text-align: center;
}
.cal-today-btn {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-primary);
  margin-left: 6px;
  transition: all .15s ease;
}
.cal-today-btn:hover { border-color: rgba(102,126,234,0.5); color: #4f46e5; }
.cal-today-btn i { color: #4f46e5; font-size: 10px; }

.cal-filter-group { display: inline-flex; gap: 6px; }
.cal-filter-btn {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-primary);
  transition: all .15s ease;
}
.cal-filter-btn:hover { border-color: rgba(102,126,234,0.5); }
.cal-filter-btn.active {
  background: var(--grad-brand, linear-gradient(135deg,#667eea 0%,#764ba2 100%));
  color: #fff;
  border-color: transparent;
}
.cal-filter-btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

/* 팀 필터 (드롭다운 결합) — v4.9.1 */
.cal-filter-team-wrap {
  display: inline-flex;
  align-items: stretch;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.cal-filter-team-wrap:hover { border-color: rgba(102,126,234,0.5); }
.cal-filter-team-wrap.active {
  border-color: transparent;
  box-shadow: 0 2px 6px rgba(102,126,234,0.25);
}
.cal-filter-team-wrap .cal-filter-team-btn {
  border: none;
  border-radius: 999px 0 0 999px;
  background: transparent;
}
.cal-filter-team-wrap.active .cal-filter-team-btn {
  background: var(--grad-brand, linear-gradient(135deg,#667eea 0%,#764ba2 100%));
  color: #fff;
  border-radius: 999px 0 0 999px;
}
.cal-team-select {
  border: none;
  border-left: 1px solid var(--border);
  background: var(--white);
  padding: 0 28px 0 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='%23666' d='M0 0l5 6 5-6z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: background-color .15s ease;
}
.cal-filter-team-wrap.active .cal-team-select {
  background-color: #f5f3ff;
  border-left-color: rgba(255,255,255,0.4);
  color: #4c1d95;
}
.cal-team-select:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.cal-team-select:focus {
  background-color: #eef2ff;
}

/* v4.9.2: 개인 검색 드롭다운 (옵션 多 → 폭 보정) */
.cal-filter-person-wrap .cal-person-select {
  min-width: 140px;
  max-width: 220px;
  text-overflow: ellipsis;
}

/* ============================================
   v4.9.3: 일정 수정 폼 모달
   ============================================ */
.cal-edit-wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.cal-edit-note {
  background: #f0f9ff;
  border-left: 3px solid #38bdf8;
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 12px;
  color: #0c4a6e;
  line-height: 1.5;
  margin: 0;
}
.cal-edit-note i {
  color: #0284c7;
  margin-right: 6px;
}
.cal-edit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.cal-edit-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.cal-edit-row-full {
  grid-column: 1 / -1;
}
.cal-edit-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}
.cal-edit-input {
  width: 100%;
  padding: 8px 10px;
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  color: var(--text-primary);
  transition: border-color .15s ease, box-shadow .15s ease;
  box-sizing: border-box;
  font-family: inherit;
}
.cal-edit-input:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}
.cal-edit-textarea {
  resize: vertical;
  min-height: 80px;
  line-height: 1.5;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
  .cal-edit-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   v4.10.0: 매니저 검토 인박스 (Review Inbox)
   ============================================ */

/* 헤더 알림 버튼 */
.btn-review-inbox {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all .2s ease;
}
.btn-review-inbox:hover {
  border-color: #6366f1;
  color: #4f46e5;
  background: #eef2ff;
}
.btn-review-inbox.has-pending {
  background: var(--grad-brand, linear-gradient(135deg,#667eea 0%,#764ba2 100%));
  color: #fff;
  border-color: transparent;
  animation: ri-pulse 2s ease-in-out infinite;
}
@keyframes ri-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(99,102,241,0.6); }
  50%      { box-shadow: 0 0 0 8px rgba(99,102,241,0); }
}
.ri-badge-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--white);
}

/* 모달 확장 (좌우 2컬럼 레이아웃용) — v4.10.2 클래스명 정정 (.modal-content → .modal) */
.modal-overlay.modal-xl .modal {
  max-width: 1200px !important;
  width: 95vw;
  height: 90vh;             /* ★ 고정 높이 */
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden !important;  /* ★ 기본 .modal의 overflow-y:auto 오버라이드 */
}
.modal-overlay.modal-xl .modal-header {
  flex-shrink: 0;            /* ★ 헤더는 절대 줄이지 않음 */
}
.modal-overlay.modal-xl .modal-body {
  padding: 0 !important;
  flex: 1 1 auto;            /* ★ 남은 공간 모두 */
  min-height: 0;             /* ★ flex 자식 overflow 작동 보장 */
  max-height: unset !important;  /* ★ 기본 .modal-body의 max-height 무력화 */
  overflow: hidden;
  display: flex;             /* ★ 내부 .ri-wrap이 100% 높이 차지하도록 */
  flex-direction: column;
}

/* 메인 래퍼 — flex로 헤더/바디 분리, 바디만 스크롤 */
.ri-wrap {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;          /* ★ flex column 자식의 overflow 작동 보장 */
  overflow: hidden;
}

/* 상단 바 */
.ri-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  background: var(--grad-brand, linear-gradient(135deg,#667eea 0%,#764ba2 100%));
  color: #fff;
}
.ri-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;          /* v4.12.3 ↑ 14 → 16 */
  font-weight: 600;
}
.ri-header-info i { font-size: 18px; }
.ri-header-info strong { font-size: 16px; }
.ri-header-count {
  background: rgba(255,255,255,0.25);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 13.5px;        /* v4.12.3 ↑ 12 → 13.5 */
  font-weight: 700;
}
.ri-snooze-btn {
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.35);
  color: #fff;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13.5px;        /* v4.12.3 ↑ 12 → 13.5 */
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background .15s ease;
}
.ri-snooze-btn:hover { background: rgba(255,255,255,0.3); }

/* v4.15.5: 헤더 우측 액션 컨테이너 (일괄 확인 + 스누즈 나란히) */
.ri-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
/* v4.15.5: 모두 일괄 확인 버튼 — 강조 컬러 (초록 그라디언트) */
.ri-ack-all-btn {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border: 1px solid rgba(255,255,255,0.4);
  color: #fff;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: transform .15s ease, box-shadow .15s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.ri-ack-all-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.5);
}
.ri-ack-all-btn:active {
  transform: translateY(0);
}
/* 모바일 대응 */
@media (max-width: 640px) {
  .ri-header-actions { gap: 6px; }
  .ri-ack-all-btn,
  .ri-snooze-btn {
    padding: 6px 10px;
    font-size: 12px;
  }
}

/* 바디: 좌측 리스트 + 우측 상세 — v4.10.1 잘림 수정 */
.ri-body {
  display: grid;
  grid-template-columns: 300px 1fr;   /* v4.12.3 ↑ 280 → 300 (이름 길어짐 대응) */
  flex: 1 1 auto;
  min-height: 0;          /* ★ flex 자식 overflow 보장 */
  overflow: hidden;
  height: 100%;
}

/* 좌측 리스트 — v4.12.3 폰트/패딩 상향 */
.ri-list {
  border-right: 1px solid var(--border);
  background: #f8fafc;
  overflow-y: auto;
  min-height: 0;          /* ★ */
  padding: 10px 0;
}
.ri-list-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 14px 16px;       /* v4.12.3 ↑ 12,14 → 14,16 */
  background: transparent;
  border: none;
  border-left: 3px solid transparent;
  cursor: pointer;
  text-align: left;
  transition: background .15s ease, border-color .15s ease;
}
.ri-list-item:hover { background: rgba(99,102,241,0.06); }
.ri-list-item.active {
  background: #fff;
  border-left-color: #6366f1;
  box-shadow: inset 0 0 0 1px rgba(99,102,241,0.15);
}
.ri-list-avatar .role-badge {
  font-size: 12.5px;        /* v4.12.3 ↑ 11 → 12.5 */
  padding: 4px 8px;
}
.ri-list-meta { flex: 1; min-width: 0; }
.ri-list-name {
  font-weight: 700;
  font-size: 15px;          /* v4.12.3 ↑ 13 → 15 */
  color: var(--text-primary);
  margin-bottom: 5px;
}
.ri-list-sub {
  font-size: 12.5px;        /* v4.12.3 ↑ 11 → 12.5 */
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.ri-list-cnt {
  background: #e0e7ff;
  color: #4338ca;
  padding: 2px 9px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;          /* v4.12.3 명시 */
}
.ri-list-arrow {
  color: var(--text-secondary);
  font-size: 12px;
  opacity: 0.6;
}
.ri-list-item.active .ri-list-arrow {
  color: #6366f1;
  opacity: 1;
}

/* 우측 상세 — v4.10.1 잘림 수정: 헤더 sticky + 본체만 스크롤 */
.ri-detail {
  overflow-y: auto;
  min-height: 0;
  padding: 0;
  background: var(--white);
  display: flex;
  flex-direction: column;
}
.ri-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 22px;
  margin-bottom: 0;
  border-bottom: 1px solid var(--border);
  background: #fff;
  position: sticky;       /* ★ [확인] 버튼 항상 노출 */
  top: 0;
  z-index: 5;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.ri-detail-body {
  padding: 16px 22px 22px;
  flex: 1;
}
.ri-detail-author {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;          /* v4.12.3 ↑ 14 → 16 */
}
.ri-detail-author strong {
  color: var(--text-primary);
  font-size: 17px;          /* v4.12.3 작성자명 강조 */
  font-weight: 700;
}
.ri-detail-date {
  font-size: 13.5px;        /* v4.12.3 ↑ 12 → 13.5 */
  color: var(--text-secondary);
}
.ri-ack-btn {
  background: linear-gradient(135deg,#10b981 0%,#059669 100%) !important;
  font-weight: 700;
  font-size: 14.5px;        /* v4.12.3 [확인] 버튼 강조 */
  padding: 10px 20px;
}
.ri-ack-btn:hover {
  box-shadow: 0 3px 8px rgba(16,185,129,0.35);
}

/* v4.14.6: AI 학습용 다운로드 버튼 (Markdown + PDF) */
.ri-detail-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.ri-export-btn {
  font-size: 12.5px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: var(--text-secondary, #475569);
  cursor: pointer;
  transition: all .15s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.ri-export-btn:hover {
  border-color: #667eea;
  color: #667eea;
  box-shadow: 0 2px 6px rgba(102,126,234,0.15);
  transform: translateY(-1px);
}
.ri-export-btn.ri-export-md:hover {
  border-color: #10b981;
  color: #10b981;
  box-shadow: 0 2px 6px rgba(16,185,129,0.15);
}
.ri-export-btn.ri-export-pdf:hover {
  border-color: #ef4444;
  color: #ef4444;
  box-shadow: 0 2px 6px rgba(239,68,68,0.15);
}
.ri-export-btn i { font-size: 13px; }

@media (max-width: 768px) {
  .ri-detail-actions { width: 100%; justify-content: stretch; }
  .ri-export-btn { flex: 1; justify-content: center; }
}

.ri-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;          /* v4.12.3 ↑ 12.5 → 14 */
  font-weight: 700;
  color: var(--text-primary); /* v4.12.3 가독성↑ secondary → primary */
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin: 20px 0 10px;
}
.ri-section-title:first-child { margin-top: 0; }
.ri-section-title i { color: #6366f1; font-size: 15px; }

/* 업무 카드 — v4.12.3 가독성 대폭 향상 */
.ri-wi-card {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;       /* v4.12.3 ↑ 12 → 14/16 */
  margin-bottom: 12px;
}
.ri-wi-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.ri-wi-title {
  font-size: 16px;          /* v4.12.3 ↑ 13.5 → 16 (핵심 가독성) */
  font-weight: 700;
  color: var(--text-primary);
  flex: 1;
  min-width: 0;
  line-height: 1.4;
}
.ri-wi-dur {
  font-size: 13px;          /* v4.12.3 ↑ 11 → 13 */
  color: var(--text-secondary);
  background: #fff;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-weight: 600;
}
.ri-wi-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;          /* v4.12.3 ↑ 11.5 → 13 */
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.ri-wi-meta i { color: #94a3b8; margin-right: 4px; }
.ri-wi-detail {
  font-size: 14.5px;        /* v4.12.3 ↑ 12.5 → 14.5 (업무 본문) */
  color: var(--text-primary);
  line-height: 1.6;
  margin: 8px 0;
  padding: 10px 12px;
  background: #fff;
  border-radius: 6px;
  white-space: pre-wrap;
}

/* 항목별 코멘트 영역 */
.ri-wi-comments {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* 코멘트 행 — v4.12.3 가독성 강화 */
.ri-cmt-row {
  display: flex;
  gap: 10px;
  padding: 10px 12px;       /* v4.12.3 ↑ 8 → 10/12 */
  background: #fff;
  border-radius: 8px;
  border-left: 3px solid #c7d2fe;
}
.ri-cmt-row .role-badge {
  font-size: 11.5px;        /* v4.12.3 ↑ 10 → 11.5 */
  padding: 3px 8px;
  height: fit-content;
}
.ri-cmt-body { flex: 1; }
.ri-cmt-name {
  font-size: 13.5px;        /* v4.12.3 ↑ 11.5 → 13.5 */
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.ri-cmt-time {
  font-size: 12px;          /* v4.12.3 ↑ 10.5 → 12 */
  color: var(--text-secondary);
  font-weight: 400;
}
.ri-cmt-content {
  font-size: 14.5px;        /* v4.12.3 ↑ 12.5 → 14.5 (핵심 — 코멘트 본문) */
  color: var(--text-primary);
  margin-top: 5px;
  white-space: pre-wrap;
  line-height: 1.55;
}

/* 인라인 코멘트 입력 폼 — v4.12.3 */
.ri-wi-cmt-form {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.ri-cmt-input {
  flex: 1;
  padding: 10px 14px;       /* v4.12.3 ↑ 7,10 → 10,14 */
  font-size: 14px;          /* v4.12.3 ↑ 12.5 → 14 */
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.ri-cmt-input::placeholder { font-size: 13.5px; color: #94a3b8; }
.ri-cmt-input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}
.ri-wi-cmt-form .btn-primary {
  white-space: nowrap;
  font-size: 13.5px;        /* v4.12.3 전송 버튼 명확화 */
  font-weight: 600;
  padding: 8px 14px;
}

/* 내일 계획 박스 — v4.12.3 가독성 강화 */
.ri-tomorrow {
  background: #fffbeb;
  border-left: 4px solid #f59e0b;
  border-radius: 6px;
  padding: 14px 16px;       /* v4.12.3 ↑ 10,12 → 14,16 */
  font-size: 14.5px;        /* v4.12.3 ↑ 12.5 → 14.5 */
  color: #78350f;
  line-height: 1.65;
  white-space: pre-wrap;
  font-weight: 500;
}

/* 보고서 전체 코멘트 리스트 */
.ri-cmt-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}

/* 빈 상태 */
.ri-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-secondary);
  gap: 12px;
}
.ri-empty i { font-size: 56px; color: #10b981; }
.ri-empty p { font-size: 15.5px; font-weight: 500; }
.ri-empty-mini {
  font-size: 13.5px;        /* v4.12.3 ↑ 12 → 13.5 */
  color: var(--text-secondary);
  font-style: italic;
  padding: 10px 14px;
  background: #f8fafc;
  border-radius: 6px;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
  .modal-overlay.modal-xl .modal-content {
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }
  .modal-overlay.modal-xl .modal-body {
    max-height: calc(100vh - 60px);
  }
  .ri-body {
    grid-template-columns: 1fr;
  }
  .ri-list {
    max-height: 35vh;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .ri-header-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .ri-detail-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .ri-ack-btn { width: 100%; justify-content: center; }
}

/* ============================================
   v4.11.0: 실무자 받은 코멘트 인박스 (Feedback Inbox)
   - 단일 컬럼 스크롤 리스트 + sticky [확인했음] 하단 바
   ============================================ */

/* 헤더 알림 버튼 (전 직원) */
.btn-feedback-inbox {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all .2s ease;
}
.btn-feedback-inbox:hover {
  border-color: #10b981;
  color: #059669;
  background: #ecfdf5;
}
.btn-feedback-inbox.has-pending {
  background: linear-gradient(135deg,#10b981 0%,#059669 100%);
  color: #fff;
  border-color: transparent;
  animation: fi-pulse 2s ease-in-out infinite;
}
@keyframes fi-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16,185,129,0.6); }
  50%      { box-shadow: 0 0 0 8px rgba(16,185,129,0); }
}
.fi-badge-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--white);
}

/* 메인 래퍼 — modal-xl 패턴 재사용 (잘림 방지 검증 완료) */
.fi-wrap {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

/* 상단 바 (그린 그라디언트 — 매니저 검토 인박스와 시각적 구분) */
.fi-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 18px;
  background: linear-gradient(135deg,#10b981 0%,#059669 100%);
  color: #fff;
  flex-shrink: 0;
}
.fi-header-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}
.fi-header-info i { font-size: 16px; }
.fi-header-count {
  background: rgba(255,255,255,0.25);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.fi-header-hint {
  font-size: 11.5px;
  background: rgba(255,255,255,0.15);
  padding: 5px 10px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* 바디 — 단일 컬럼 스크롤 */
.fi-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 20px;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* 카드 */
.fi-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

/* 컨텍스트 (원본 업무항목) */
.fi-context {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 14px;
  background: #f0f9ff;
  border-bottom: 1px solid #e0f2fe;
  font-size: 12.5px;
}
.fi-context.fi-context-report {
  background: #fffbeb;
  border-bottom-color: #fde68a;
}
.fi-context-label {
  font-weight: 700;
  color: #0369a1;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.fi-context.fi-context-report .fi-context-label { color: #b45309; }
.fi-context-title {
  font-size: 13px;
  color: var(--text-primary);
  flex: 1;
  min-width: 0;
}
.fi-context-cust {
  font-size: 11.5px;
  color: var(--text-secondary);
  background: #fff;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
}
.fi-context-cust i { color: #94a3b8; margin-right: 3px; }
.fi-context-date {
  font-size: 11.5px;
  color: var(--text-secondary);
}

/* 코멘트 본문 영역 */
.fi-comment-block {
  padding: 14px 16px;
}
.fi-commenter {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
.fi-commenter .role-badge {
  font-size: 11px;
  padding: 3px 8px;
}
.fi-commenter-name {
  font-size: 13px;
  color: var(--text-primary);
}
.fi-commenter-time {
  font-size: 11.5px;
  color: var(--text-secondary);
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.fi-commenter-date {
  color: var(--text-muted);
  margin-left: 4px;
}
.fi-comment-content {
  background: #f8fafc;
  border-left: 3px solid #6366f1;
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 13.5px;
  color: var(--text-primary);
  line-height: 1.55;
  white-space: pre-wrap;
  margin: 0 0 10px 0;
}

/* 기존 답글 (있을 경우) */
.fi-replies {
  margin: 8px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.fi-reply-row {
  display: flex;
  gap: 8px;
  padding: 8px 10px;
  background: #f1f5f9;
  border-radius: 8px;
}
.fi-reply-arrow {
  color: #64748b;
  margin-top: 3px;
}
.fi-reply-body { flex: 1; min-width: 0; }
.fi-reply-body strong {
  font-size: 12px;
  color: var(--text-primary);
  margin-right: 6px;
}
.fi-reply-time {
  font-size: 10.5px;
  color: var(--text-secondary);
}
.fi-reply-body p {
  margin: 3px 0 0 0;
  font-size: 12.5px;
  color: var(--text-primary);
  white-space: pre-wrap;
  line-height: 1.45;
}

/* 답글 입력 폼 */
.fi-reply-form {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-top: 8px;
}
.fi-reply-input {
  flex: 1;
  padding: 8px 10px;
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  outline: none;
  resize: vertical;
  min-height: 38px;
  max-height: 120px;
  font-family: inherit;
  line-height: 1.45;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.fi-reply-input:focus {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16,185,129,0.15);
}
.fi-reply-btn { white-space: nowrap; flex-shrink: 0; }

/* sticky 하단 바 [확인했음] */
.fi-footer-bar {
  flex-shrink: 0;
  padding: 12px 18px;
  background: #fff;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  box-shadow: 0 -2px 6px rgba(0,0,0,0.04);
}
.fi-ack-all-btn {
  background: linear-gradient(135deg,#10b981 0%,#059669 100%) !important;
  font-weight: 700;
  padding: 10px 22px !important;
  font-size: 13.5px;
}
.fi-ack-all-btn:hover {
  box-shadow: 0 3px 10px rgba(16,185,129,0.35);
}

/* 모바일 반응형 */
@media (max-width: 768px) {
  .fi-header-bar {
    flex-direction: column;
    align-items: flex-start;
  }
  .fi-header-hint {
    font-size: 11px;
  }
  .fi-body { padding: 12px; }
  .fi-comment-block { padding: 12px; }
  .fi-commenter-time {
    margin-left: 0;
    width: 100%;
  }
  .fi-reply-form { flex-direction: column; }
  .fi-reply-btn { width: 100%; justify-content: center; }
  .fi-ack-all-btn { width: 100%; justify-content: center; }
}

/* 범례 */
.cal-legend {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 12px;
  padding: 10px 12px;
  background: #f8fafc;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border);
  font-size: 11.5px;
}
.cal-legend-label { font-weight: 600; color: var(--text-secondary,#475569); display: inline-flex; align-items: center; gap: 4px; }
.cal-legend-chip {
  padding: 3px 9px;
  border-radius: 999px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* 그리드 */
.cal-grid-wrap {
  background: var(--white);
  border-radius: var(--radius-lg, 14px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft, 0 6px 18px rgba(15,23,42,0.05));
  overflow: hidden;
}
.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: linear-gradient(135deg, rgba(102,126,234,0.06) 0%, rgba(118,75,162,0.04) 100%);
  border-bottom: 1px solid var(--border);
}
.cal-weekday {
  padding: 10px 6px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary,#475569);
}
.cal-weekday.cal-sun { color: #ef4444; }
.cal-weekday.cal-sat { color: #2563eb; }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-auto-rows: minmax(110px, auto);
}
.cal-cell {
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 6px 6px 8px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--white);
  transition: background .15s ease;
}
.cal-cell:nth-child(7n) { border-right: none; }
.cal-cell.cal-out { background: #fafafa; color: var(--text-muted); }
.cal-cell.cal-has-events { cursor: pointer; }
.cal-cell.cal-has-events:hover { background: rgba(102,126,234,0.04); }
.cal-cell.cal-today { background: linear-gradient(135deg, rgba(102,126,234,0.08) 0%, rgba(118,75,162,0.05) 100%); }

.cal-day-num {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 5px;
}
.cal-out .cal-day-num { color: var(--text-muted); font-weight: 500; }
.cal-sun .cal-day-num { color: #ef4444; }
.cal-sat .cal-day-num { color: #2563eb; }
.cal-today-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--grad-brand, linear-gradient(135deg,#667eea 0%,#764ba2 100%));
  display: inline-block;
}

.cal-events {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 2px;
}
.cal-event {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 6px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  background: #f3f4f6;
  border-left: 3px solid #94a3b8;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: transform .12s ease, box-shadow .12s ease;
}
.cal-event:hover { transform: translateX(2px); box-shadow: 0 2px 6px rgba(0,0,0,0.08); }
.cal-event i { font-size: 9px; flex-shrink: 0; }
.cal-event-time { font-weight: 700; color: var(--text-secondary,#475569); font-size: 10px; }
.cal-event-title {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cal-event.cal-overdue {
  background: rgba(239,68,68,0.08);
  border-left-color: #ef4444;
  color: #b91c1c;
}
.cal-event-more {
  font-size: 10.5px;
  font-weight: 600;
  color: #4f46e5;
  background: rgba(99,102,241,0.08);
  border-radius: 5px;
  padding: 2px 6px;
  cursor: pointer;
  text-align: center;
}
.cal-event-more:hover { background: rgba(99,102,241,0.16); }

/* 카테고리별 색상 (RPT_CAT_CONFIG와 동기화) */
.cal-event.cal-cat-cat-meeting { background: rgba(99,102,241,0.10);  border-left-color: #6366f1; color: #4338ca; }
.cal-event.cal-cat-cat-sales   { background: rgba(16,185,129,0.10);  border-left-color: #10b981; color: #047857; }
.cal-event.cal-cat-cat-dev     { background: rgba(59,130,246,0.10);  border-left-color: #3b82f6; color: #1d4ed8; }
.cal-event.cal-cat-cat-admin   { background: rgba(245,158,11,0.10);  border-left-color: #f59e0b; color: #b45309; }
.cal-event.cal-cat-cat-other   { background: rgba(148,163,184,0.14); border-left-color: #94a3b8; color: #475569; }

.cal-legend-chip.cal-cat-cat-meeting { background: rgba(99,102,241,0.12); color: #4338ca; }
.cal-legend-chip.cal-cat-cat-sales   { background: rgba(16,185,129,0.12); color: #047857; }
.cal-legend-chip.cal-cat-cat-dev     { background: rgba(59,130,246,0.12); color: #1d4ed8; }
.cal-legend-chip.cal-cat-cat-admin   { background: rgba(245,158,11,0.12); color: #b45309; }
.cal-legend-chip.cal-cat-cat-other   { background: rgba(148,163,184,0.18); color: #475569; }

.cal-mobile-tip {
  display: none;
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 10px;
}

/* 일정 상세 모달 */
.cal-detail-wrap { padding: 0 4px; }
.cal-detail-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  margin: -20px -20px 16px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(102,126,234,0.05), rgba(118,75,162,0.03));
}
.cal-detail-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--grad-brand, linear-gradient(135deg,#667eea 0%,#764ba2 100%));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.cal-detail-header.cal-cat-cat-meeting .cal-detail-icon { background: linear-gradient(135deg, #818cf8, #6366f1); }
.cal-detail-header.cal-cat-cat-sales   .cal-detail-icon { background: linear-gradient(135deg, #34d399, #10b981); }
.cal-detail-header.cal-cat-cat-dev     .cal-detail-icon { background: linear-gradient(135deg, #60a5fa, #3b82f6); }
.cal-detail-header.cal-cat-cat-admin   .cal-detail-icon { background: linear-gradient(135deg, #fbbf24, #f59e0b); }
.cal-detail-header.cal-cat-cat-other   .cal-detail-icon { background: linear-gradient(135deg, #cbd5e1, #94a3b8); }

.cal-detail-title-block { flex: 1; min-width: 0; }
.cal-detail-title {
  margin: 0 0 5px;
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
}
.cal-detail-cat-chip {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.7);
  color: var(--text-secondary,#475569);
}

.cal-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 4px 8px;
}
.cal-detail-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.cal-detail-row-full { grid-column: span 2; }
.cal-detail-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary,#475569);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.cal-detail-label i { color: #4f46e5; font-size: 10px; }
.cal-detail-value {
  font-size: 13.5px;
  color: var(--text-primary);
  line-height: 1.5;
}
.cal-detail-multiline { white-space: pre-wrap; word-break: break-word; }
.cal-detail-sub { font-size: 11.5px; color: var(--text-muted); margin-left: 6px; }

/* 날짜별 일정 목록 모달 */
.cal-day-list { padding: 0 2px; }
.cal-day-list-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0 12px;
  border-bottom: 1px dashed var(--border);
  margin-bottom: 12px;
  font-size: 14px;
}
.cal-day-list-header i { color: #4f46e5; }
.cal-day-list-cnt {
  margin-left: auto;
  font-size: 11.5px;
  background: rgba(99,102,241,0.12);
  color: #4338ca;
  padding: 2px 9px;
  border-radius: 999px;
  font-weight: 700;
}
.cal-day-list-items { display: flex; flex-direction: column; gap: 8px; }
.cal-day-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  font-family: var(--font);
  transition: all .15s ease;
  border-left-width: 4px;
}
.cal-day-list-item:hover { background: #fff; box-shadow: 0 4px 12px rgba(15,23,42,0.06); border-color: rgba(102,126,234,0.4); }
.cal-day-list-item.cal-cat-cat-meeting { border-left-color: #6366f1; }
.cal-day-list-item.cal-cat-cat-sales   { border-left-color: #10b981; }
.cal-day-list-item.cal-cat-cat-dev     { border-left-color: #3b82f6; }
.cal-day-list-item.cal-cat-cat-admin   { border-left-color: #f59e0b; }
.cal-day-list-item.cal-cat-cat-other   { border-left-color: #94a3b8; }
.cal-day-list-time {
  font-size: 13px;
  font-weight: 700;
  color: #4f46e5;
  width: 50px;
  flex-shrink: 0;
}
.cal-day-list-body { flex: 1; min-width: 0; }
.cal-day-list-title {
  font-weight: 600;
  font-size: 13.5px;
  margin-bottom: 4px;
  color: var(--text-primary);
}
.cal-day-list-meta {
  display: flex;
  gap: 10px;
  font-size: 11.5px;
  color: var(--text-secondary,#475569);
  flex-wrap: wrap;
}
.cal-day-list-meta i { font-size: 10px; margin-right: 3px; }
.cal-day-list-arrow { color: var(--text-muted); flex-shrink: 0; }

/* v4.13.1: 빈 날짜 상태 + [+ 일정 추가] 진입 */
.cal-day-list-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px 12px;
  color: var(--text-muted);
  background: #f8fafc;
  border: 1px dashed var(--border);
  border-radius: 10px;
}
.cal-day-list-empty i { font-size: 32px; color: #cbd5e1; }
.cal-day-list-empty p { margin: 0; font-size: 13.5px; }
.cal-day-list-actions {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.cal-day-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  font-weight: 700;
}
.cal-day-add-btn:hover {
  box-shadow: 0 4px 12px rgba(16,185,129,0.35);
}

/* v4.13.1: 캘린더 셀 — 빈 날짜도 클릭 가능 표시 */
.cal-cell[onclick] { cursor: pointer; }
.cal-cell[onclick]:hover {
  background: rgba(16,185,129,0.05);
  box-shadow: inset 0 0 0 1px rgba(16,185,129,0.20);
}
.cal-cell.cal-out[onclick] { cursor: default; }
.cal-cell.cal-out[onclick]:hover { background: inherit; box-shadow: none; }

/* v4.13.1: 일정 추가 모달 폼 */
.cal-add-form { padding: 0 2px; }
.cal-add-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border-left: 4px solid #10b981;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
  color: #065f46;
}
.cal-add-banner i { font-size: 18px; color: #059669; }
.cal-add-banner strong { font-size: 15px; font-weight: 700; }
.cal-add-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.cal-add-form .form-group {
  margin-bottom: 14px;
}
.cal-add-form label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.cal-add-form label i { color: #6366f1; font-size: 12px; }
.cal-add-form label .req { color: #ef4444; font-weight: 700; }
.cal-add-form input,
.cal-add-form select,
.cal-add-form textarea {
  width: 100%;
  padding: 9px 12px;
  font-size: 13.5px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
  font-family: var(--font);
}
.cal-add-form input:focus,
.cal-add-form select:focus,
.cal-add-form textarea:focus {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16,185,129,0.15);
}
.cal-add-form textarea { resize: vertical; min-height: 70px; }
.cal-add-tip {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  background: #fffbeb;
  border-left: 3px solid #f59e0b;
  border-radius: 6px;
  font-size: 12px;
  color: #78350f;
  line-height: 1.5;
  margin: 8px 0 14px;
}
.cal-add-tip i { color: #d97706; flex-shrink: 0; margin-top: 2px; }

/* v4.13.2: 등록 데이터 매핑 + 인라인 추가 */
.cal-add-hint {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted, #94a3b8);
  margin-left: 4px;
}
.cal-add-picker-row {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}
.cal-add-picker {
  flex: 1;
  padding: 8px 12px;
  font-size: 13.5px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  font-family: var(--font);
}
.cal-add-picker-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 14px;
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  white-space: nowrap;
  transition: box-shadow .15s ease;
}
.cal-add-picker-btn:hover { box-shadow: 0 3px 8px rgba(99,102,241,0.35); }

.cal-add-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.cal-add-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 4px 4px 10px;
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border: 1px solid #6ee7b7;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  color: #065f46;
}
.cal-add-chip i { font-size: 10px; color: #059669; }
.cal-add-chip-x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px; height: 18px;
  margin-left: 2px;
  background: rgba(5,150,105,0.15);
  border: none;
  border-radius: 50%;
  color: #047857;
  cursor: pointer;
  transition: background .15s ease;
}
.cal-add-chip-x:hover { background: rgba(5,150,105,0.30); }
.cal-add-chip-x i { font-size: 9px; }

.cal-add-extra-input {
  width: 100%;
  padding: 8px 12px;
  font-size: 12.5px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: #fafafa;
  font-family: var(--font);
}
.cal-add-extra-input:focus {
  border-color: #10b981;
  border-style: solid;
  background: #fff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(16,185,129,0.15);
}

.cal-add-empty-tip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: #f8fafc;
  border: 1px dashed var(--border);
  border-radius: 8px;
  font-size: 12px;
  color: var(--text-muted, #64748b);
  margin: 0 0 8px;
}

/* 고객사/제품: select + [+] 빠른 등록 버튼 */
.cal-add-pick-with-add {
  display: flex;
  gap: 6px;
}
.cal-add-mapping-sel {
  flex: 1;
  padding: 9px 12px;
  font-size: 13.5px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  font-family: var(--font);
}
.cal-add-quickadd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: box-shadow .15s ease;
  flex-shrink: 0;
}
.cal-add-quickadd-btn:hover { box-shadow: 0 3px 8px rgba(16,185,129,0.35); }

.cal-add-empty-pick {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: #fff7ed;
  border: 1px dashed #fdba74;
  border-radius: 8px;
}
.cal-add-empty-text {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: #9a3412;
  font-weight: 600;
}
.cal-add-empty-text i { color: #ea580c; }
.cal-add-empty-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 12px;
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  transition: box-shadow .15s ease;
}
.cal-add-empty-add:hover { box-shadow: 0 3px 8px rgba(249,115,22,0.35); }

.cal-add-quickadd {
  margin-top: 8px;
  padding: 10px;
  background: #f0fdf4;
  border: 1px solid #6ee7b7;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  animation: calAddQuickIn .2s ease-out;
}
.cal-add-quickadd.hidden { display: none; }
@keyframes calAddQuickIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.cal-add-quickadd input,
.cal-add-quickadd select {
  width: 100%;
  padding: 8px 10px;
  font-size: 12.5px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  font-family: var(--font);
}
.cal-add-quickadd input:focus,
.cal-add-quickadd select:focus {
  border-color: #10b981;
  outline: none;
  box-shadow: 0 0 0 3px rgba(16,185,129,0.15);
}
.cal-add-quickadd-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 2px;
}
.cal-add-quickadd-actions .btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--font);
}

@media (max-width: 600px) {
  .cal-add-row { grid-template-columns: 1fr; gap: 0; }
  .cal-day-list-actions { flex-direction: column; }
  .cal-day-list-actions .btn-primary,
  .cal-day-list-actions .btn-secondary { width: 100%; }
  .cal-add-picker-row { flex-direction: column; }
  .cal-add-picker-btn { width: 100%; justify-content: center; }
}

/* =============================================
   미래 일정 토글 (일일보고 작성 폼 내부)
   ============================================= */
.wi-row-sched {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}
.wi-sched-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary, #475569);
  padding: 6px 10px;
  border-radius: 8px;
  transition: all .15s ease;
  user-select: none;
}
.wi-sched-toggle:hover { background: rgba(99,102,241,0.06); color: #4f46e5; }
.wi-sched-toggle input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: #6366f1;
  cursor: pointer;
}
.wi-sched-toggle i { color: #6366f1; }
.wi-sched-fields {
  margin-top: 10px;
  padding: 12px;
  background: rgba(99,102,241,0.04);
  border: 1px solid rgba(99,102,241,0.18);
  border-radius: 10px;
  animation: schedFadeIn .2s ease;
}
.wi-sched-fields.hidden { display: none; }
@keyframes schedFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.wi-sched-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 2fr;
  gap: 10px;
}
.wi-sched-tip {
  margin: 8px 0 0;
  font-size: 11.5px;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.wi-sched-tip i { color: #6366f1; }

/* =============================================
   예정 항목 배너 (다음 일일보고 작성 시 상단)
   ============================================= */
.pending-banner {
  margin: 0 0 18px;
  padding: 16px 18px;
  background: linear-gradient(135deg, #fef9c3, #fef3c7);
  border: 1.5px solid #fde047;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(234,179,8,0.15);
}
.pending-banner-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}
.pending-banner-head > i {
  font-size: 22px;
  color: #d97706;
  flex-shrink: 0;
  margin-top: 1px;
}
.pending-banner-title {
  display: block;
  font-size: 14.5px;
  font-weight: 700;
  color: #78350f;
  margin-bottom: 3px;
}
.pending-banner-desc {
  margin: 0;
  font-size: 12.5px;
  color: #92400e;
  line-height: 1.5;
}
.pending-banner-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pending-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.85);
  border: 1px solid #fde68a;
  border-radius: 10px;
  border-left-width: 4px;
  transition: opacity .2s ease, transform .2s ease;
}
.pending-card.pending-card-filled { opacity: 0.55; transform: scale(0.98); }
.pending-card.cal-cat-cat-meeting { border-left-color: #6366f1; }
.pending-card.cal-cat-cat-sales   { border-left-color: #10b981; }
.pending-card.cal-cat-cat-dev     { border-left-color: #3b82f6; }
.pending-card.cal-cat-cat-admin   { border-left-color: #f59e0b; }
.pending-card.cal-cat-cat-other   { border-left-color: #94a3b8; }
.pending-card-left {
  display: flex;
  gap: 10px;
  align-items: center;
  flex: 1;
  min-width: 0;
}
.pending-card-icon {
  font-size: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(99,102,241,0.12);
  color: #4f46e5;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.pending-card-title {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 3px;
}
.pending-card-meta {
  display: flex;
  gap: 10px;
  font-size: 11.5px;
  color: var(--text-secondary, #475569);
  flex-wrap: wrap;
}
.pending-card-meta i { font-size: 10px; margin-right: 3px; }
.pending-fill-btn { flex-shrink: 0; }

/* =============================================
   캘린더 — 모바일 반응형
   ============================================= */
@media (max-width: 768px) {
  .cal-toolbar { flex-direction: column; align-items: stretch; }
  .cal-nav-group { justify-content: space-between; width: 100%; }
  .cal-month-label { font-size: 16px; min-width: auto; flex: 1; }
  .cal-filter-group { width: 100%; flex-wrap: wrap; }
  .cal-filter-btn { flex: 1; justify-content: center; }
  .cal-filter-team-wrap { flex: 2; min-width: 0; }
  .cal-filter-team-wrap .cal-filter-team-btn { flex: 0 0 auto; }
  .cal-team-select { flex: 1; min-width: 0; padding-right: 24px; }
  .cal-legend { font-size: 10.5px; padding: 8px; gap: 6px; }
  .cal-legend-chip { padding: 2px 7px; font-size: 10px; }

  .cal-grid { grid-auto-rows: minmax(72px, auto); }
  .cal-cell { padding: 3px 3px 4px; }
  .cal-day-num { font-size: 11.5px; }
  .cal-events { gap: 2px; }
  .cal-event {
    padding: 1px 4px;
    font-size: 9.5px;
    border-left-width: 2px;
    border-radius: 3px;
  }
  .cal-event i { display: none; }
  .cal-event-time { font-size: 9px; }
  .cal-event-more { font-size: 9.5px; padding: 1px 4px; }

  .cal-mobile-tip { display: block; }

  /* 상세 모달 2열 → 1열 */
  .cal-detail-grid { grid-template-columns: 1fr; }
  .cal-detail-row-full { grid-column: span 1; }

  /* 미래 일정 토글: 세로 적층 */
  .wi-sched-grid { grid-template-columns: 1fr; gap: 8px; }

  /* 예정 항목 배너 */
  .pending-card { flex-direction: column; align-items: stretch; }
  .pending-fill-btn { width: 100%; justify-content: center; }
}

/* =====================================================================
   v4.14.0 — 프로젝트 관리 모듈 (Phase 1)
   - 녹색 톤(#10b981) 일관성 유지
   - 모바일 반응형 (≤768px 사이드 메뉴 축소, ≤600px 카드/필터 적층)
   ===================================================================== */

/* ── Host & Loading ── */
.prj-host {
  padding: 4px 4px 32px;
  font-family: var(--font);
}
.prj-loading {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; padding: 60px 20px;
  color: var(--text-muted, #94a3b8); font-size: 14px;
}
.prj-loading i { color: #10b981; font-size: 18px; }

/* ── Header ── */
.prj-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px; margin-bottom: 22px;
  padding: 18px 22px;
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  border: 1px solid #bbf7d0;
  border-radius: 14px;
}
.prj-header-left { flex: 1; min-width: 0; }
.prj-title {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 6px; font-size: 22px; font-weight: 800;
  color: #064e3b; letter-spacing: -.3px;
}
.prj-title i { color: #10b981; font-size: 22px; }
.prj-subtitle {
  margin: 0; font-size: 13.5px; color: #047857;
  line-height: 1.5; font-weight: 500;
}
.prj-header-right { flex-shrink: 0; }

/* ── Buttons ── */
.prj-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; font-size: 13.5px; font-weight: 600;
  border-radius: 9px; cursor: pointer;
  border: 1px solid transparent;
  font-family: var(--font);
  transition: all .15s ease;
}
.prj-btn-primary {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(16,185,129,0.25);
}
.prj-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(16,185,129,0.35);
}
.prj-btn-ghost {
  background: #fff; color: var(--text-secondary, #475569);
  border-color: var(--border, #e2e8f0);
}
.prj-btn-ghost:hover { background: #f8fafc; border-color: #cbd5e1; }

.prj-btn-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border: 1px solid var(--border, #e2e8f0);
  background: #fff; color: var(--text-secondary, #475569);
  border-radius: 7px; cursor: pointer;
  transition: all .15s ease;
  margin-right: 4px;
}
.prj-btn-icon:hover {
  background: #ecfdf5; color: #10b981; border-color: #6ee7b7;
}
.prj-btn-icon-danger:hover {
  background: #fef2f2; color: #ef4444; border-color: #fecaca;
}

/* ── Stat Cards ── */
.prj-stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}
.prj-stat-card {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px;
  cursor: pointer;
  transition: all .15s ease;
}
.prj-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}
.prj-stat-icon {
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 11px; font-size: 18px;
  flex-shrink: 0;
}
.prj-stat-info { min-width: 0; }
.prj-stat-num {
  font-size: 22px; font-weight: 800;
  color: var(--text-primary, #0f172a);
  line-height: 1.1;
}
.prj-stat-label {
  font-size: 12px; font-weight: 600;
  color: var(--text-muted, #94a3b8);
  margin-top: 3px;
}
.prj-stat-planning    .prj-stat-icon { background: #f1f5f9; color: #64748b; }
.prj-stat-in_progress .prj-stat-icon { background: #ecfdf5; color: #10b981; }
.prj-stat-review      .prj-stat-icon { background: #eff6ff; color: #3b82f6; }
.prj-stat-completed   .prj-stat-icon { background: #f0fdf4; color: #22c55e; }
.prj-stat-delayed     .prj-stat-icon { background: #fef2f2; color: #ef4444; }

/* ── Toolbar ── */
.prj-toolbar {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; margin-bottom: 14px; flex-wrap: wrap;
}
.prj-toolbar-left  { flex: 1 1 280px; min-width: 220px; }
.prj-toolbar-right { display: flex; gap: 8px; flex-wrap: wrap; }

.prj-search {
  position: relative; display: flex; align-items: center;
}
.prj-search i {
  position: absolute; left: 12px; top: 50%;
  transform: translateY(-50%); color: #94a3b8; font-size: 13px;
}
.prj-search input {
  width: 100%; padding: 9px 12px 9px 34px;
  font-size: 13.5px; border: 1px solid var(--border, #e2e8f0);
  border-radius: 9px; background: #fff;
  outline: none; transition: border-color .15s, box-shadow .15s;
  font-family: var(--font);
}
.prj-search input:focus {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16,185,129,0.15);
}

.prj-filter-sel {
  padding: 9px 12px;
  font-size: 13px; font-weight: 500;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 9px;
  background: #fff; color: var(--text-primary, #0f172a);
  cursor: pointer; outline: none;
  font-family: var(--font);
  transition: border-color .15s, box-shadow .15s;
  min-width: 130px;
}
.prj-filter-sel:focus {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16,185,129,0.15);
}

/* ── Table ── */
.prj-table-wrap {
  background: #fff;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px; overflow: hidden;
}
.prj-table {
  width: 100%; border-collapse: collapse;
  font-size: 13.5px;
}
.prj-table thead th {
  text-align: left;
  padding: 12px 14px;
  font-size: 12.5px; font-weight: 700;
  color: var(--text-secondary, #475569);
  background: #f8fafc;
  border-bottom: 1px solid var(--border, #e2e8f0);
  white-space: nowrap;
}
.prj-table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid #f1f5f9;
  color: var(--text-primary, #0f172a);
  vertical-align: middle;
}
.prj-row { transition: background-color .12s; }
.prj-row:hover { background: #f0fdf4; }
.prj-row-delayed { background: #fffbeb; }
.prj-row-delayed:hover { background: #fef3c7; }

.prj-cell-name {
  display: flex; align-items: center; gap: 8px;
  min-width: 0;
}
.prj-name-text {
  font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  max-width: 280px;
}
.prj-tag-delayed {
  display: inline-flex; align-items: center;
  padding: 2px 8px;
  font-size: 11px; font-weight: 700;
  background: #ef4444; color: #fff;
  border-radius: 999px;
  flex-shrink: 0;
}

.prj-cell-dates {
  font-size: 12.5px; color: var(--text-secondary, #475569);
  white-space: nowrap;
}
.prj-date-sep { margin: 0 4px; color: #cbd5e1; }

.prj-cell-progress {
  min-width: 140px;
  display: flex; align-items: center; gap: 8px;
}
.prj-progress-bar {
  flex: 1; height: 6px;
  background: #f1f5f9;
  border-radius: 999px;
  overflow: hidden;
}
.prj-progress-fill {
  height: 100%;
  border-radius: 999px;
  transition: width .3s ease;
}
.prj-progress-num {
  font-size: 11.5px; font-weight: 700;
  color: var(--text-secondary, #475569);
  min-width: 36px; text-align: right;
}

.prj-status-badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px;
  font-size: 11.5px; font-weight: 700;
  border-radius: 999px;
  border: 1px solid;
  white-space: nowrap;
}

.prj-cell-amount {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  white-space: nowrap;
}
.prj-cell-actions {
  white-space: nowrap;
  text-align: right;
}

.prj-empty {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 10px;
  padding: 50px 20px;
  color: var(--text-muted, #94a3b8);
}
.prj-empty i { font-size: 36px; color: #cbd5e1; }
.prj-empty p { margin: 0; font-size: 13.5px; }

/* ── Modal Form ── */
.prj-modal-xl .modal-content {
  max-width: 720px;
}
.prj-form { padding: 0; }
.prj-form-tip {
  margin: 0 0 16px;
  font-size: 12px;
  color: var(--text-muted, #94a3b8);
  padding: 8px 12px;
  background: #f8fafc;
  border-left: 3px solid #10b981;
  border-radius: 6px;
}
.prj-form-row { margin-bottom: 14px; }
.prj-form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.prj-form-label {
  display: block;
  margin-bottom: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary, #475569);
}
.prj-req { color: #ef4444; font-weight: 700; }

.prj-form-input {
  width: 100%;
  padding: 9px 12px;
  font-size: 13.5px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 8px;
  background: #fff;
  outline: none;
  font-family: var(--font);
  transition: border-color .15s, box-shadow .15s;
  box-sizing: border-box;
}
.prj-form-input:focus {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16,185,129,0.15);
}
.prj-form-textarea {
  resize: vertical;
  min-height: 80px;
  line-height: 1.5;
}
.prj-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #f1f5f9;
}

/* ── Mobile Responsive ── */
@media (max-width: 900px) {
  .prj-table thead th:nth-child(5),
  .prj-table tbody td:nth-child(5) { display: none; }   /* 기간 */
}
@media (max-width: 768px) {
  .prj-header { flex-direction: column; align-items: stretch; padding: 14px 16px; }
  .prj-header-right .prj-btn { width: 100%; justify-content: center; }
  .prj-toolbar { flex-direction: column; align-items: stretch; }
  .prj-toolbar-right { width: 100%; }
  .prj-filter-sel { flex: 1; min-width: 0; }
  .prj-stat-cards { grid-template-columns: repeat(2, 1fr); }
  .prj-table thead th:nth-child(2),
  .prj-table tbody td:nth-child(2),
  .prj-table thead th:nth-child(8),
  .prj-table tbody td:nth-child(8) { display: none; }   /* 유형, 계약금액 */
  .prj-form-grid-2 { grid-template-columns: 1fr; gap: 0; }
}
@media (max-width: 600px) {
  .prj-table { font-size: 12.5px; }
  .prj-table thead th,
  .prj-table tbody td { padding: 10px 8px; }
  .prj-table thead th:nth-child(4),
  .prj-table tbody td:nth-child(4) { display: none; }   /* PM */
  .prj-name-text { max-width: 160px; }
  .prj-stat-cards { grid-template-columns: 1fr; }
  .prj-stat-num { font-size: 20px; }
}

/* =====================================================================
   v4.14.0 Phase 2 — 프로젝트 상세 페이지
   ===================================================================== */

/* 목록 행 클릭 가능 표시 */
.prj-row-clickable { cursor: pointer; }
.prj-name-link {
  color: #047857;
  text-decoration: none;
  transition: color .15s ease;
}
.prj-row-clickable:hover .prj-name-link { color: #065f46; text-decoration: underline; }

/* ── Detail Host ── */
.prj-detail-host { animation: prjFadeIn .25s ease; }
@keyframes prjFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.prj-detail-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  gap: 12px;
  flex-wrap: wrap;
}
.prj-detail-back {
  display: inline-flex; align-items: center; gap: 6px;
}
.prj-detail-actions {
  display: flex; gap: 8px;
}
.prj-btn-danger {
  color: #ef4444;
  border-color: #fecaca !important;
}
.prj-btn-danger:hover {
  background: #fef2f2 !important;
  border-color: #fca5a5 !important;
}

/* ── Detail Header ── */
.prj-detail-header {
  padding: 20px 24px;
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  border: 1px solid #bbf7d0;
  border-radius: 14px;
  margin-bottom: 18px;
}
.prj-detail-header-main { min-width: 0; }
.prj-detail-title {
  display: flex; align-items: center; gap: 12px;
  margin: 0 0 12px;
  font-size: 24px; font-weight: 800;
  color: #064e3b; letter-spacing: -.3px;
  flex-wrap: wrap;
}
.prj-detail-title > i { color: #10b981; font-size: 22px; }
.prj-detail-title > span:not(.prj-tag-delayed) {
  flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis;
}
.prj-detail-meta-inline {
  display: flex; flex-wrap: wrap;
  align-items: center; gap: 8px;
  font-size: 13px; color: #047857;
}
.prj-detail-meta-inline i { color: #10b981; margin-right: 4px; }
.prj-detail-meta-sep { color: #6ee7b7; font-weight: 700; }

/* ── Tabs ── */
.prj-detail-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 18px;
  border-bottom: 2px solid #e2e8f0;
  overflow-x: auto;
  scrollbar-width: thin;
}
.prj-detail-tab {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 11px 16px;
  font-size: 13.5px; font-weight: 600;
  color: var(--text-secondary, #475569);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: all .15s ease;
  font-family: var(--font);
  white-space: nowrap;
}
.prj-detail-tab i { font-size: 13px; }
.prj-detail-tab:hover:not(.disabled):not(.active) {
  color: #10b981;
  background: #f0fdf4;
}
.prj-detail-tab.active {
  color: #10b981;
  border-bottom-color: #10b981;
}
.prj-detail-tab.disabled {
  color: #cbd5e1;
  cursor: not-allowed;
}
.prj-tab-phase-tag {
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #94a3b8;
  margin-left: 4px;
}

/* ── Detail Body ── */
.prj-detail-body { min-height: 200px; }
.prj-tab-notice {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted, #94a3b8);
  font-size: 13.5px;
}
.prj-tab-h3 {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0;
  font-size: 16px; font-weight: 700;
  color: var(--text-primary, #0f172a);
}
.prj-tab-h3 > i { color: #10b981; font-size: 15px; }
.prj-tab-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px;
  padding: 0 7px;
  font-size: 11.5px; font-weight: 700;
  background: #ecfdf5; color: #047857;
  border-radius: 999px;
  margin-left: 4px;
}

/* ============== Overview Tab ============== */
.prj-ov-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 14px;
}
.prj-ov-card {
  background: #fff;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px;
  padding: 16px 18px;
}
.prj-ov-card-wide { grid-column: 1 / -1; }
.prj-ov-card-head {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 12px;
  font-size: 13px; font-weight: 700;
  color: var(--text-secondary, #475569);
}
.prj-ov-card-head > i { color: #10b981; }
.prj-ov-card-sub {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-muted, #94a3b8);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.prj-ov-progress-row {
  display: flex; align-items: center; gap: 16px;
}
.prj-ov-progress-num {
  font-size: 32px; font-weight: 800;
  min-width: 70px;
  font-variant-numeric: tabular-nums;
}
.prj-ov-progress-bar {
  flex: 1;
  height: 10px;
  background: #f1f5f9;
  border-radius: 999px;
  overflow: hidden;
}
.prj-ov-progress-fill {
  height: 100%;
  border-radius: 999px;
  transition: width .4s ease;
}

.prj-ov-stats {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
.prj-ov-stat {
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 11px;
}
.prj-ov-stat-label {
  font-size: 11.5px; font-weight: 600;
  color: var(--text-muted, #94a3b8);
  margin-bottom: 4px;
}
.prj-ov-stat-value {
  font-size: 22px; font-weight: 800;
  color: var(--text-primary, #0f172a);
}
.prj-ov-stat-unit {
  font-size: 12px; font-weight: 600;
  color: var(--text-muted, #94a3b8);
  margin-left: 2px;
}
.prj-ov-stat-danger { border-color: #fecaca; background: #fef2f2; }
.prj-ov-stat-danger .prj-ov-stat-value { color: #ef4444; }
.prj-ov-stat-danger .prj-ov-stat-label { color: #b91c1c; }

.prj-ov-meta {
  display: grid;
  grid-template-columns: minmax(80px, max-content) 1fr;
  gap: 8px 14px;
  margin: 0;
  font-size: 13px;
}
.prj-ov-meta dt {
  color: var(--text-muted, #94a3b8);
  font-weight: 600;
  font-size: 12px;
}
.prj-ov-meta dd {
  margin: 0;
  color: var(--text-primary, #0f172a);
  font-weight: 500;
}
.prj-ov-desc {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed #e2e8f0;
}
.prj-ov-desc-label {
  font-size: 11.5px; font-weight: 600;
  color: var(--text-muted, #94a3b8);
  margin-bottom: 5px;
}
.prj-ov-desc-text {
  font-size: 13px; line-height: 1.6;
  color: var(--text-primary, #0f172a);
}

.prj-ov-list { list-style: none; padding: 0; margin: 0; }
.prj-ov-list-item {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 0;
  border-bottom: 1px dashed #f1f5f9;
  font-size: 13px;
}
.prj-ov-list-item:last-child { border-bottom: none; }
.prj-ov-list-icon { color: #10b981; font-size: 12px; flex-shrink: 0; }
.prj-ov-list-name {
  flex: 1; min-width: 0;
  font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.prj-ov-list-date {
  font-size: 11.5px;
  color: var(--text-muted, #94a3b8);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.prj-ov-list-tag {
  font-size: 10px; font-weight: 700;
  background: #ef4444; color: #fff;
  padding: 1px 7px;
  border-radius: 999px;
}
.prj-ov-list-item.is-overdue .prj-ov-list-name { color: #b91c1c; }
.prj-ov-empty {
  padding: 18px 4px;
  text-align: center;
  font-size: 12.5px;
  color: var(--text-muted, #94a3b8);
  margin: 0;
}

/* ============== Milestones Tab ============== */
.prj-ms-toolbar,
.prj-mem-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.prj-ms-list {
  background: #fff;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px;
  overflow: hidden;
}
.prj-ms-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #f1f5f9;
  transition: background-color .12s;
}
.prj-ms-item:last-child { border-bottom: none; }
.prj-ms-item:hover { background: #f0fdf4; }
.prj-ms-item.is-completed {
  background: #f8fafc;
  opacity: 0.75;
}
.prj-ms-item.is-completed .prj-ms-name {
  text-decoration: line-through;
  color: var(--text-muted, #94a3b8);
}
.prj-ms-item.is-overdue:not(.is-completed) { background: #fef2f2; }

.prj-ms-check {
  display: inline-flex; align-items: center;
  cursor: pointer;
  flex-shrink: 0;
}
.prj-ms-check input[type="checkbox"] {
  width: 18px; height: 18px;
  accent-color: #10b981;
  cursor: pointer;
}
.prj-ms-check.is-disabled { cursor: not-allowed; opacity: 0.55; }
.prj-ms-check.is-disabled input { cursor: not-allowed; }
.prj-ms-check-mark { display: none; }

.prj-ms-info { flex: 1; min-width: 0; }
.prj-ms-name {
  font-size: 14px; font-weight: 700;
  color: var(--text-primary, #0f172a);
  margin-bottom: 4px;
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap;
}
.prj-ms-meta {
  display: flex; flex-wrap: wrap;
  align-items: center; gap: 12px;
  font-size: 12px;
  color: var(--text-secondary, #475569);
}
.prj-ms-meta i { color: #94a3b8; margin-right: 3px; }
.prj-ms-completed-at i { color: #10b981 !important; }
.prj-ms-note-inline {
  color: var(--text-muted, #94a3b8);
  font-style: italic;
}
.prj-ms-tag {
  font-size: 10.5px; font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.prj-ms-tag-overdue { background: #ef4444; color: #fff; }
.prj-ms-tag-soon    { background: #f59e0b; color: #fff; }

.prj-ms-actions {
  display: flex; gap: 4px;
  flex-shrink: 0;
}

/* ============== Members Tab ============== */
.prj-mem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.prj-mem-card {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px;
  transition: all .15s ease;
}
.prj-mem-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  border-color: #6ee7b7;
}
.prj-mem-avatar {
  flex-shrink: 0;
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 800;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  border-radius: 50%;
}
.prj-mem-info { flex: 1; min-width: 0; }
.prj-mem-name {
  font-size: 14px; font-weight: 700;
  color: var(--text-primary, #0f172a);
  margin-bottom: 4px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.prj-mem-role {
  font-size: 12px; font-weight: 600;
  color: #047857;
  margin-bottom: 2px;
}
.prj-mem-role i { color: #10b981; font-size: 10px; margin-right: 3px; }
.prj-mem-added {
  font-size: 11px;
  color: var(--text-muted, #94a3b8);
}
.prj-mem-added i { margin-right: 3px; }

/* ── Mobile responsive (Phase 2) ── */
@media (max-width: 768px) {
  .prj-detail-header { padding: 14px 16px; }
  .prj-detail-title { font-size: 18px; gap: 8px; }
  .prj-detail-title > i { font-size: 18px; }
  .prj-detail-actions { width: 100%; }
  .prj-detail-actions .prj-btn { flex: 1; justify-content: center; }
  .prj-detail-tabs { gap: 0; }
  .prj-detail-tab { padding: 10px 12px; font-size: 12.5px; }
  .prj-detail-tab span:not(.prj-tab-phase-tag) { display: none; }
  .prj-detail-tab.active span:not(.prj-tab-phase-tag) { display: inline; }
  .prj-ov-grid { grid-template-columns: 1fr; }
  .prj-ov-progress-num { font-size: 26px; min-width: 56px; }
  .prj-ms-item { flex-wrap: wrap; }
  .prj-ms-actions { width: 100%; justify-content: flex-end; margin-top: 6px; }
  .prj-mem-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .prj-detail-meta-inline { font-size: 11.5px; gap: 6px; }
  .prj-ov-progress-num { font-size: 22px; }
  .prj-ms-name { font-size: 13px; }
  .prj-ms-meta { gap: 8px; font-size: 11.5px; }
}

/* =====================================================================
   v4.14.0 Phase 3 — 이슈 / 파일 / 수익성 탭
   ===================================================================== */

/* 탭 자물쇠 아이콘 (수익성 탭) */
.prj-tab-lock {
  font-size: 9.5px;
  color: #94a3b8;
  margin-left: 4px;
}

/* =====================================================================
   Issues Tab
   ===================================================================== */
.prj-issue-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.prj-issue-toolbar-right {
  display: flex; gap: 8px; flex-wrap: wrap;
}

.prj-issue-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.prj-issue-item {
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--border, #e2e8f0);
  border-left: 4px solid #e2e8f0;
  border-radius: 10px;
  transition: all .15s ease;
}
.prj-issue-item:hover {
  border-left-color: #10b981;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.prj-issue-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.prj-issue-sev-badge,
.prj-issue-status-badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px;
  font-size: 11px; font-weight: 700;
  border-radius: 999px;
  border: 1px solid;
  white-space: nowrap;
  flex-shrink: 0;
}
.prj-issue-title-text {
  flex: 1; min-width: 0;
  font-size: 14px; font-weight: 700;
  color: var(--text-primary, #0f172a);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.prj-issue-actions {
  display: flex; gap: 4px;
  flex-shrink: 0;
}
.prj-issue-desc {
  margin: 8px 0;
  padding: 10px 12px;
  background: #f8fafc;
  border-radius: 7px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-secondary, #475569);
}
.prj-issue-meta {
  display: flex; flex-wrap: wrap;
  gap: 12px;
  font-size: 11.5px;
  color: var(--text-muted, #94a3b8);
}
.prj-issue-meta i { margin-right: 3px; }
.prj-issue-resolved-at { color: #10b981; font-weight: 600; }
.prj-issue-resolved-at i { color: #10b981; }

/* =====================================================================
   Files Tab
   ===================================================================== */
.prj-file-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.prj-file-tip {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 13px;
  background: #fffbeb;
  border-left: 3px solid #f59e0b;
  border-radius: 7px;
  font-size: 12px;
  color: #78350f;
  line-height: 1.5;
  margin-bottom: 14px;
}
.prj-file-tip i { color: #d97706; flex-shrink: 0; margin-top: 2px; }

.prj-file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.prj-file-card {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 11px;
  transition: all .15s ease;
}
.prj-file-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  border-color: #6ee7b7;
}
.prj-file-icon {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 18px;
  background: #ecfdf5; color: #10b981;
  border-radius: 9px;
  flex-shrink: 0;
}
.prj-file-info { flex: 1; min-width: 0; }
.prj-file-name {
  font-size: 13.5px; font-weight: 700;
  color: var(--text-primary, #0f172a);
  margin-bottom: 5px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.prj-file-url { margin-bottom: 5px; }
.prj-file-url a {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 600;
  color: #10b981;
  text-decoration: none;
  padding: 3px 9px;
  background: #ecfdf5;
  border-radius: 6px;
  transition: all .15s ease;
}
.prj-file-url a:hover { background: #d1fae5; }
.prj-file-url a i { font-size: 10px; }
.prj-file-url-invalid {
  display: inline-block;
  font-size: 11.5px;
  color: #ef4444;
  font-style: italic;
}
.prj-file-meta {
  display: flex; flex-wrap: wrap;
  gap: 10px;
  font-size: 11px;
  color: var(--text-muted, #94a3b8);
}
.prj-file-meta i { margin-right: 3px; }

/* =====================================================================
   Profit Tab (수익성)
   ===================================================================== */
.prj-cost-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.prj-cost-summary {
  padding: 18px 20px;
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  border: 1px solid #bbf7d0;
  border-radius: 14px;
  margin-bottom: 16px;
}
.prj-cost-summary-head {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 14px;
  font-size: 14px; font-weight: 700;
  color: #064e3b;
}
.prj-cost-summary-head > i { color: #10b981; }
.prj-cost-summary-cur {
  margin-left: auto;
  padding: 2px 9px;
  font-size: 11px; font-weight: 700;
  background: #10b981; color: #fff;
  border-radius: 999px;
  letter-spacing: .3px;
}

.prj-cost-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.prj-cost-summary-cell {
  padding: 12px 14px;
  background: #fff;
  border: 1px solid #d1fae5;
  border-radius: 10px;
}
.prj-cost-summary-label {
  font-size: 11.5px; font-weight: 600;
  color: var(--text-muted, #94a3b8);
  margin-bottom: 5px;
}
.prj-cost-summary-value {
  font-size: 20px; font-weight: 800;
  color: var(--text-primary, #0f172a);
  font-variant-numeric: tabular-nums;
}

.prj-cost-margin-bar {
  height: 8px;
  background: #fff;
  border: 1px solid #d1fae5;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 14px;
}
.prj-cost-margin-fill {
  height: 100%;
  border-radius: 999px;
  transition: width .4s ease;
}

.prj-cost-no-contract {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 13px;
  background: #fff;
  border-left: 3px solid #f59e0b;
  border-radius: 7px;
  font-size: 12.5px;
  color: #78350f;
  margin-bottom: 14px;
}
.prj-cost-no-contract i { color: #d97706; flex-shrink: 0; }

.prj-cost-bycat {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px dashed #d1fae5;
}
.prj-cost-bycat-row {
  display: grid;
  grid-template-columns: 140px 1fr 120px;
  align-items: center;
  gap: 10px;
}
.prj-cost-bycat-label {
  display: flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 600;
  color: var(--text-secondary, #475569);
}
.prj-cost-bycat-label i { font-size: 12px; }
.prj-cost-bycat-bar {
  height: 6px;
  background: #fff;
  border: 1px solid #d1fae5;
  border-radius: 999px;
  overflow: hidden;
}
.prj-cost-bycat-fill {
  height: 100%;
  border-radius: 999px;
  transition: width .4s ease;
}
.prj-cost-bycat-val {
  text-align: right;
  font-size: 12.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary, #0f172a);
}

.prj-cost-other-cur {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed #d1fae5;
}
.prj-cost-other-cur-head {
  display: flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 700;
  color: var(--text-secondary, #475569);
  margin-bottom: 8px;
}
.prj-cost-other-cur-head i { color: #f59e0b; }
.prj-cost-other-cur-list {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.prj-cost-other-cur-chip {
  padding: 3px 10px;
  font-size: 11.5px; font-weight: 600;
  background: #fff;
  border: 1px solid #d1fae5;
  border-radius: 999px;
  color: var(--text-secondary, #475569);
  font-variant-numeric: tabular-nums;
}

/* 비용 항목 테이블 */
.prj-cost-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  overflow: hidden;
  font-size: 13px;
}
.prj-cost-table thead th {
  text-align: left;
  padding: 11px 14px;
  font-size: 12px; font-weight: 700;
  color: var(--text-secondary, #475569);
  background: #f8fafc;
  border-bottom: 1px solid var(--border, #e2e8f0);
}
.prj-cost-table tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}
.prj-cost-table tbody tr:last-child td { border-bottom: none; }
.prj-cost-table tbody tr:hover { background: #f0fdf4; }
.prj-cost-cat-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px;
  font-size: 11px; font-weight: 700;
  border-radius: 999px;
  border: 1px solid;
  white-space: nowrap;
}
.prj-cost-cat-badge i { font-size: 10px; }

/* ── Mobile responsive (Phase 3) ── */
@media (max-width: 768px) {
  .prj-issue-head { flex-wrap: wrap; }
  .prj-issue-title-text { width: 100%; order: 3; white-space: normal; }
  .prj-issue-actions { margin-left: auto; }
  .prj-file-grid { grid-template-columns: 1fr; }
  .prj-cost-summary-grid { grid-template-columns: repeat(2, 1fr); }
  .prj-cost-bycat-row { grid-template-columns: 100px 1fr 100px; gap: 8px; }
  .prj-cost-bycat-label span {
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .prj-cost-table { font-size: 12px; }
  .prj-cost-table thead th,
  .prj-cost-table tbody td { padding: 9px 8px; }
}
@media (max-width: 600px) {
  .prj-cost-summary-grid { grid-template-columns: 1fr 1fr; }
  .prj-cost-summary-value { font-size: 17px; }
  .prj-cost-bycat-row { grid-template-columns: 80px 1fr 80px; }
  .prj-issue-toolbar-right { width: 100%; }
  .prj-issue-toolbar-right .prj-filter-sel,
  .prj-issue-toolbar-right .prj-btn { flex: 1; }
}

/* =====================================================================
   Phase 4 (v4.14.0): 영업 연동 + 대시보드 위젯
   ===================================================================== */

/* ── 고객 상세 [프로젝트로 전환] 버튼 ── */
.prj-convert-btn {
  background: linear-gradient(135deg, #10b981, #059669) !important;
  color: #fff !important;
  border: none !important;
  font-weight: 700;
  display: inline-flex; align-items: center; gap: 6px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.prj-convert-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(16, 185, 129, 0.35);
}
.prj-convert-btn i { font-size: 12px; }
.prj-convert-btn-done {
  background: #eef2ff !important;
  color: #4338ca !important;
  border: 1px solid #c7d2fe !important;
}
.prj-convert-btn-done:hover {
  background: #e0e7ff !important;
  transform: translateY(-1px);
}

/* ── 변환 모달: 원본 고객 정보 박스 ── */
.prj-convert-source {
  background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 16px;
}
.prj-convert-source-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700;
  color: #15803d;
  margin-bottom: 10px;
}
.prj-convert-source-head i { font-size: 14px; }
.prj-convert-source-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px;
}
.prj-convert-source-grid > div { display: flex; flex-direction: column; gap: 2px; }
.prj-convert-lbl {
  font-size: 11px; color: #64748b; font-weight: 600;
}
.prj-convert-val {
  font-size: 13.5px; color: #0f172a; font-weight: 600;
}
.prj-convert-extra-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700;
  color: var(--primary, #2d6a4f);
  margin: 8px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px dashed #e2e8f0;
}
.prj-convert-extra-head i { font-size: 14px; }
@media (max-width: 600px) {
  .prj-convert-source-grid { grid-template-columns: 1fr; }
}

/* ── 프로젝트 상세 개요 탭: 원본 영업 건 링크 ── */
.prj-source-deal-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--primary, #2d6a4f);
  font-weight: 600;
  text-decoration: none;
  padding: 3px 9px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  font-size: 12.5px;
  transition: all 0.15s ease;
}
.prj-source-deal-link:hover {
  background: #dcfce7;
  border-color: #86efac;
  transform: translateX(2px);
}
.prj-source-deal-link i { font-size: 10px; }

/* ── 영업 파이프라인 카드 "프로젝트화됨" 배지 ── */
.pipeline-card.is-converted {
  border-left: 3px solid #4338ca;
  background: linear-gradient(135deg, #fafbff, #fff);
  position: relative;
}
.pipeline-card-converted-tag {
  position: absolute;
  top: 6px; right: 6px;
  display: inline-flex; align-items: center; gap: 4px;
  background: linear-gradient(135deg, #6366f1, #4338ca);
  color: #fff;
  font-size: 10px; font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(67, 56, 202, 0.3);
  letter-spacing: 0.2px;
}
.pipeline-card-converted-tag i { font-size: 9px; }

/* ── 대시보드: 프로젝트 위젯 섹션 ── */
.dash-prj-section {
  grid-column: 1 / -1;
  margin-top: 4px;
}
.dash-prj-section-head {
  display: flex; align-items: center;
  margin-bottom: 12px;
}
.dash-prj-section-head h3 {
  font-size: 15px; font-weight: 800;
  color: #0f172a;
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0;
}
.dash-prj-section-head h3 i {
  color: var(--primary, #2d6a4f);
  font-size: 16px;
}
.dash-widget-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}
.dash-widget {
  background: #fff;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px;
  padding: 16px 18px;
  display: flex; align-items: center; gap: 14px;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.dash-widget:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  border-color: #cbd5e1;
}
.dash-widget.is-alert { border-color: #fecaca; background: #fff7f7; }
.dash-widget.is-alert:hover { border-color: #fca5a5; }
.dash-widget.is-warn { border-color: #fde68a; background: #fffdf6; }
.dash-widget.is-warn:hover { border-color: #fcd34d; }
.dash-widget-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 20px;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}
.dash-widget-body { flex: 1; min-width: 0; }
.dash-widget-label {
  font-size: 12.5px; font-weight: 700;
  color: #475569;
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 4px;
}
.dash-widget-value {
  font-size: 26px; font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
  display: inline-flex; align-items: baseline; gap: 4px;
}
.dash-widget-unit {
  font-size: 13px; font-weight: 600;
  color: #64748b;
  margin-left: 3px;
}
.dash-widget-sub {
  font-size: 11px; color: #94a3b8;
  margin-top: 3px;
  font-weight: 500;
}
.dash-widget-admin-tag {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 10px; font-weight: 700;
  color: #be123c;
  background: #fff1f2;
  border: 1px solid #fecdd3;
  padding: 1px 6px;
  border-radius: 999px;
}
.dash-widget-admin-tag i { font-size: 9px; }
.dash-widget-loading {
  justify-content: center;
  color: #94a3b8; font-size: 13px;
  cursor: default;
}
.dash-widget-loading i { font-size: 16px; }

@media (max-width: 768px) {
  .dash-widget-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .dash-widget { padding: 12px 14px; gap: 10px; }
  .dash-widget-icon { width: 40px; height: 40px; font-size: 17px; }
  .dash-widget-value { font-size: 22px; }
}
@media (max-width: 480px) {
  .dash-widget-grid { grid-template-columns: 1fr; }
}

/* =====================================================================
   v4.15.0 — 일일 보고서 활동 통계 대시보드 모듈
   - 시나리오 A (제품·업체 구조화)
   - 화면 A: 대시보드 월별 카드
   - 화면 B: 월별 상세 분석
   - 화면 C: 직원 개인 활동 (히트맵 포함)
   - 색상: 녹색 계열(#10b981/#0ea5a3) + 보조(보라/주황/파랑)
   ===================================================================== */

/* ───── 공통 로딩/엠프티 ───── */
.rs-loading {
  display: flex; align-items: center; justify-content: center;
  padding: 50px 20px; color: #94a3b8; font-size: 16px;
}
.rs-loading i { color: #10b981; font-size: 22px; }
.rs-empty {
  text-align: center; padding: 30px 16px;
  color: #94a3b8; font-size: 13px; font-style: italic;
}

/* =====================================================================
   화면 A: 대시보드 내 월별 보고서 카드 섹션
   ===================================================================== */
/* v4.15.2: 부모 컨테이너 폭 100% + 박스사이징 일관성 (쏠림 해소) */
#dash-report-stats {
  width: 100%;
  box-sizing: border-box;
}
#dash-report-stats * { box-sizing: border-box; }

.rs-section {
  width: 100%;
  margin: 22px 0 26px;
  padding: 18px 20px;
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  border: 1px solid #bbf7d0;
  border-radius: 14px;
  box-sizing: border-box;
}
.rs-section-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px; gap: 12px; flex-wrap: wrap;
}
.rs-section-title {
  margin: 0;
  font-size: 16px; font-weight: 800;
  color: #064e3b;
  display: inline-flex; align-items: center; gap: 9px;
  letter-spacing: -0.2px;
}
.rs-section-title i { color: #10b981; font-size: 17px; }
.rs-section-link {
  font-size: 13px; font-weight: 600;
  color: #047857;
  text-decoration: none;
  padding: 5px 11px;
  border-radius: 7px;
  border: 1px solid #6ee7b7;
  background: #fff;
  transition: all .15s ease;
}
.rs-section-link:hover {
  background: #10b981; color: #fff; border-color: #10b981;
}

/* 카드 그리드 (PC 6열 / 모바일 가로 스크롤) */
.rs-month-cards {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 11px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.rs-month-card {
  position: relative;
  background: #fff;
  border: 1px solid #d1fae5;
  border-radius: 11px;
  padding: 14px 12px;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s;
  text-align: center;
}
.rs-month-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(16,185,129,0.18);
  border-color: #10b981;
}
.rs-month-card.rs-current {
  border: 2px solid #10b981;
  background: linear-gradient(180deg, #ecfdf5 0%, #fff 70%);
  box-shadow: 0 4px 14px rgba(16,185,129,0.20);
}
.rs-month-label {
  font-size: 12px; font-weight: 600;
  color: #475569;
  margin-bottom: 6px;
  letter-spacing: 0.2px;
}
.rs-month-count {
  font-size: 26px; font-weight: 800;
  color: #0f172a;
  line-height: 1.05;
  display: inline-flex; align-items: baseline; gap: 2px;
}
.rs-month-unit {
  font-size: 11px; font-weight: 600;
  color: #94a3b8;
  margin-left: 2px;
}
.rs-month-delta {
  margin-top: 7px;
  font-size: 12px;
}
.rs-delta { font-weight: 700; }
.rs-delta-up      { color: #059669; }
.rs-delta-down    { color: #dc2626; }
.rs-delta-neutral { color: #94a3b8; }

.rs-current-badge {
  position: absolute;
  top: -8px; right: 10px;
  font-size: 10.5px; font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #10b981, #059669);
  padding: 3px 9px;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(16,185,129,0.35);
  letter-spacing: 0.3px;
}

/* 모바일: 가로 스크롤 */
@media (max-width: 900px) {
  .rs-month-cards {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 10px;
    padding-bottom: 6px;
  }
  .rs-month-card {
    flex: 0 0 140px;
    scroll-snap-align: start;
  }
}

/* =====================================================================
   화면 B/C: 통계 페이지 (오버레이)
   v4.15.3: 다른 .page들과 동일한 부착 위치(body 직속, sidebar 형제)
   → 기존 .page 클래스가 flex:1 + margin-left 처리하므로 추가 보정 불필요
   ===================================================================== */
.rs-overlay-page {
  display: none;
  padding: 24px;
  box-sizing: border-box;
  width: 100%;
}
.rs-overlay-page.active { display: block; }

.rs-page-container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  box-sizing: border-box;
}

.rs-page-header {
  margin-bottom: 22px;
}
.rs-back-link {
  display: inline-flex; align-items: center;
  font-size: 13px; font-weight: 600;
  color: #047857;
  text-decoration: none;
  margin-bottom: 10px;
  padding: 5px 11px;
  border-radius: 7px;
  background: #ecfdf5;
  transition: all .15s ease;
}
.rs-back-link:hover {
  background: #10b981; color: #fff;
}
.rs-page-title {
  font-size: 24px; font-weight: 800;
  color: #064e3b;
  margin: 0;
  letter-spacing: -0.3px;
}

/* ── 상단 요약 카드 4개 ── */
.rs-summary-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}
.rs-sum-card {
  display: flex; align-items: center; gap: 14px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px 18px;
  transition: transform .15s, box-shadow .15s;
}
.rs-sum-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.07);
}
.rs-sum-icon {
  width: 44px; height: 44px;
  border-radius: 11px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 18px;
  flex-shrink: 0;
  box-shadow: 0 3px 8px rgba(0,0,0,0.10);
}
.rs-sum-icon.bg-teal   { background: linear-gradient(135deg,#10b981,#059669); }
.rs-sum-icon.bg-blue   { background: linear-gradient(135deg,#3b82f6,#2563eb); }
.rs-sum-icon.bg-violet { background: linear-gradient(135deg,#8b5cf6,#7c3aed); }
.rs-sum-icon.bg-amber  { background: linear-gradient(135deg,#f59e0b,#d97706); }
.rs-sum-info { min-width: 0; }
.rs-sum-value {
  font-size: 24px; font-weight: 800;
  color: #0f172a; line-height: 1.05;
}
.rs-sum-label {
  font-size: 12.5px; font-weight: 600;
  color: #64748b;
  margin-top: 4px;
}

@media (max-width: 900px) {
  .rs-summary-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .rs-summary-cards { grid-template-columns: 1fr; }
}

/* ── 차트 섹션 공통 ── */
.rs-chart-section {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 16px;
}
.rs-chart-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap; gap: 10px;
}
.rs-chart-header h3 {
  margin: 0;
  font-size: 15px; font-weight: 800;
  color: #1e293b;
  display: inline-flex; align-items: center; gap: 8px;
}
.rs-chart-header h3 i { color: #10b981; font-size: 15px; }

.rs-chart-body {
  position: relative;
  min-height: 100px;
}

/* CSV 버튼 */
.rs-csv-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 600;
  padding: 7px 13px;
  border-radius: 7px;
  background: #fff;
  color: #047857;
  border: 1px solid #6ee7b7;
  cursor: pointer;
  transition: all .15s ease;
  font-family: var(--font);
}
.rs-csv-btn:hover {
  background: #10b981; color: #fff; border-color: #10b981;
}
.rs-csv-btn i { font-size: 12px; }

/* ── 직원별 활동량 리스트 (수동 가로 막대) ── */
.rs-user-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rs-user-row {
  display: grid;
  grid-template-columns: 130px 1fr 50px;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s;
}
.rs-user-row:hover {
  background: #f0fdf4;
}
.rs-user-name {
  font-size: 13.5px; font-weight: 600;
  color: #0f172a;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rs-user-bar-wrap {
  background: #f1f5f9;
  border-radius: 999px;
  overflow: hidden;
  height: 14px;
}
.rs-user-bar {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #059669);
  border-radius: 999px;
  transition: width .4s ease;
}
.rs-user-count {
  text-align: right;
  font-size: 14px; font-weight: 700;
  color: #047857;
}

.rs-toggle-btn {
  margin-top: 12px;
  padding: 7px 14px;
  font-size: 12.5px; font-weight: 600;
  background: #fff;
  color: #475569;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  cursor: pointer;
  display: block;
  margin-left: auto;
  margin-right: auto;
  font-family: var(--font);
  transition: all .15s;
}
.rs-toggle-btn:hover {
  border-color: #10b981; color: #10b981; background: #ecfdf5;
}

/* ── 2단 레이아웃 (제품/업체) ── */
.rs-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
@media (max-width: 900px) {
  .rs-two-col { grid-template-columns: 1fr; }
}

/* ── 히트맵 (캘린더형) ── */
.rs-heatmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(42px, 1fr));
  gap: 5px;
  padding: 8px 0;
}
.rs-hm-cell {
  position: relative;
  aspect-ratio: 1 / 1;
  min-height: 42px;
  border-radius: 6px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  font-size: 11px;
  border: 1px solid #e2e8f0;
  transition: transform .15s;
}
.rs-hm-cell:hover { transform: scale(1.06); z-index: 2; }
.rs-hm-day { font-size: 10px; color: #64748b; font-weight: 600; }
.rs-hm-cnt { font-size: 12px; font-weight: 700; color: #fff; line-height: 1.1; }
.rs-hm-l0 { background: #f8fafc; }
.rs-hm-l1 { background: #d1fae5; }
.rs-hm-l1 .rs-hm-day { color: #047857; }
.rs-hm-l1 .rs-hm-cnt { color: #047857; }
.rs-hm-l2 { background: #6ee7b7; }
.rs-hm-l2 .rs-hm-day { color: #064e3b; }
.rs-hm-l3 { background: #10b981; }
.rs-hm-l4 { background: #047857; }
.rs-hm-weekend {
  border: 1px dashed #cbd5e1;
}
.rs-hm-weekend.rs-hm-l0 { background: #f1f5f9; }
.rs-hm-weekend .rs-hm-day { color: #94a3b8; }

.rs-hm-legend {
  display: flex; align-items: center; gap: 6px;
  margin-top: 10px;
  font-size: 11px;
  color: #64748b;
}
.rs-hm-legend .rs-hm-cell {
  min-height: 16px;
  width: 16px;
  aspect-ratio: unset;
}
.rs-hm-weekend-tag {
  margin-left: 12px;
  font-size: 11px;
  color: #64748b;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px dashed #cbd5e1;
  background: #f1f5f9;
}

/* ── 보고서 목록 테이블 ── */
.rs-report-list {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.rs-report-list thead th {
  text-align: left;
  padding: 10px 12px;
  font-size: 12px; font-weight: 700;
  color: #475569;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.rs-report-list tbody td {
  padding: 11px 12px;
  border-bottom: 1px solid #f1f5f9;
  color: #0f172a;
}
.rs-report-list tbody tr:hover {
  background: #f0fdf4;
}
.rs-cmt-pill {
  display: inline-flex; align-items: center;
  font-size: 12px; font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #bbf7d0;
}

/* ── 모바일 반응형 (≤768px) ── */
@media (max-width: 768px) {
  .rs-overlay-page { padding: 16px 14px; }
  .rs-page-title { font-size: 19px; }
  .rs-chart-section { padding: 14px 14px; }
  .rs-user-row { grid-template-columns: 100px 1fr 44px; gap: 8px; }
  .rs-user-name { font-size: 12.5px; }
  .rs-heatmap-grid { grid-template-columns: repeat(7, 1fr); }
  .rs-csv-btn { padding: 6px 11px; font-size: 11.5px; }
  .rs-chart-header h3 { font-size: 14px; }
  .rs-report-list { font-size: 12.5px; }
  .rs-report-list thead th,
  .rs-report-list tbody td { padding: 8px 8px; }
}

/* =====================================================================
   v4.15.2 — 매니저별 코멘트 매트릭스 모달
   (요약 카드 클릭 → 상세 통계 모달)
   ===================================================================== */

/* 클릭 가능 카드 스타일 */
.rs-sum-card-clickable {
  cursor: pointer;
  position: relative;
  transition: all .18s ease;
}
.rs-sum-card-clickable:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(139,92,246,0.18);
  border-color: #c4b5fd;
}
.rs-info-icon {
  margin-left: 5px;
  font-size: 11px;
  color: #8b5cf6;
  opacity: 0.7;
}
.rs-sum-card-clickable:hover .rs-info-icon { opacity: 1; }

/* 모달 내부 컨테이너 */
.rs-mc-modal-body {
  padding: 8px 4px;
}

/* 상단 요약 셀 4개 */
.rs-mc-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px;
  background: linear-gradient(135deg, #faf5ff 0%, #f5f3ff 100%);
  border: 1px solid #e9d5ff;
  border-radius: 12px;
}
.rs-mc-sum-cell {
  display: flex; align-items: center; gap: 10px;
  background: #fff;
  border: 1px solid #ede9fe;
  border-radius: 9px;
  padding: 10px 12px;
  min-width: 0;
}
.rs-mc-sum-ic {
  font-size: 22px;
  width: 36px; text-align: center;
  flex-shrink: 0;
}
.rs-mc-sum-num {
  font-size: 19px; font-weight: 800;
  color: #0f172a;
  line-height: 1.05;
}
.rs-mc-sum-num small {
  font-size: 11px; font-weight: 600;
  color: #94a3b8;
  margin-left: 2px;
}
.rs-mc-sum-lbl {
  font-size: 11.5px; font-weight: 600;
  color: #64748b;
  margin-top: 3px;
}

/* 상세 테이블 */
.rs-mc-table-wrap {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 14px;
  max-height: 480px;
  overflow-y: auto;
}
.rs-mc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.rs-mc-table thead {
  position: sticky; top: 0;
  background: #f8fafc;
  z-index: 1;
}
.rs-mc-table thead th {
  padding: 10px 12px;
  text-align: left;
  font-size: 11.5px; font-weight: 700;
  color: #475569;
  border-bottom: 1px solid #e2e8f0;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.rs-mc-th-rank { width: 50px; text-align: center !important; }
.rs-mc-th-num  { width: 18%; text-align: left !important; }
.rs-mc-th-mini { width: 80px; text-align: right !important; }

.rs-mc-table tbody td {
  padding: 11px 12px;
  border-bottom: 1px solid #f1f5f9;
  color: #0f172a;
  vertical-align: middle;
}
.rs-mc-table tbody tr:hover { background: #faf5ff; }
.rs-mc-table tbody tr:last-child td { border-bottom: 0; }

.rs-mc-rank {
  text-align: center;
  font-weight: 700;
  color: #8b5cf6;
}
.rs-mc-name {
  font-weight: 600;
  white-space: nowrap;
}

/* 역할 배지 */
.rs-mc-role {
  display: inline-block;
  font-size: 10.5px; font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.3px;
}
.rs-mc-role-ceo { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.rs-mc-role-mgr { background: #e0e7ff; color: #3730a3; border: 1px solid #c7d2fe; }
.rs-mc-role-pm  { background: #d1fae5; color: #064e3b; border: 1px solid #6ee7b7; }
.rs-mc-role-gen { background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; }

/* 막대 셀 */
.rs-mc-num {
  min-width: 130px;
}
.rs-mc-bar-wrap {
  position: relative;
  background: #f1f5f9;
  border-radius: 999px;
  height: 22px;
  overflow: hidden;
}
.rs-mc-bar {
  height: 100%;
  border-radius: 999px;
  transition: width .4s ease;
}
.rs-mc-bar-count {
  background: linear-gradient(90deg, #8b5cf6, #7c3aed);
}
.rs-mc-bar-chars {
  background: linear-gradient(90deg, #f59e0b, #d97706);
}
.rs-mc-bar-text {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  color: #1e293b;
  text-shadow: 0 0 4px rgba(255,255,255,0.7);
}
.rs-mc-bar-text small {
  font-weight: 600; opacity: 0.7;
  margin-left: 1px;
}

/* 미니 숫자 셀 */
.rs-mc-num-mini {
  text-align: right;
  font-size: 12.5px; font-weight: 600;
  color: #475569;
  white-space: nowrap;
}
.rs-mc-num-mini small {
  font-size: 10.5px; color: #94a3b8;
  margin-left: 2px;
}

/* 빈 상태 */
.rs-mc-empty {
  text-align: center;
  padding: 30px;
  color: #94a3b8;
  font-style: italic;
}

/* 액션 영역 */
.rs-mc-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}

/* 모바일 (≤768px) */
@media (max-width: 768px) {
  .rs-mc-summary { grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 10px; }
  .rs-mc-sum-num { font-size: 16px; }
  .rs-mc-sum-lbl { font-size: 10.5px; }
  .rs-mc-table { font-size: 11.5px; }
  .rs-mc-table thead th,
  .rs-mc-table tbody td { padding: 7px 6px; }
  .rs-mc-th-mini { width: 60px; }
  .rs-mc-num { min-width: 90px; }
  .rs-mc-bar-text { font-size: 10.5px; }
  /* 매니저 매트릭스 모달은 화면 폭의 95% 사용 */
  .modal-overlay.modal-mc-wide .modal-content { width: 95vw; max-width: 95vw; }
}
