:root {
  --cd-primary: #1769E0;
  --cd-primary-hover: #1256BA;
  --cd-primary-light: #EAF3FF;
  --cd-navy: #102A56;
  --cd-background: #F5F8FC;
  --cd-surface: #FFFFFF;
  --cd-surface-hover: #F8FAFC;
  --cd-text: #172B4D;
  --cd-text-secondary: #64748B;
  --cd-text-muted: #94A3B8;
  --cd-border: #E2E8F0;
  --cd-success: #16A34A;
  --cd-warning: #F59E0B;
  --cd-danger: #DC2626;
  --cd-info: #0284C7;
  --cd-font: "Pretendard", "Noto Sans KR", Arial, sans-serif;
  --cd-radius-sm: 6px;
  --cd-radius-md: 8px;
  --cd-radius-lg: 12px;
  --cd-radius-xl: 16px;
  --cd-shadow-sm: 0 1px 3px rgba(16,42,86,.05);
  --cd-shadow-md: 0 2px 10px rgba(16,42,86,.08);
  --cd-shadow-lg: 0 8px 24px rgba(16,42,86,.12);
  --cd-sidebar-width: 240px;
  --cd-header-height: 68px;
  --cd-content-padding: 28px;
}

.cd-app {
  min-height: 100vh;
  background: var(--cd-background);
  color: var(--cd-text);
  font: 400 14px/1.6 var(--cd-font);
}
.cd-layout { display: flex; min-height: 100vh; }
.cd-sidebar {
  width: var(--cd-sidebar-width);
  flex-shrink: 0;
  background: var(--cd-navy);
  color: #fff;
}
.cd-main { flex: 1; min-width: 0; }
.cd-header {
  min-height: var(--cd-header-height);
  display: flex;
  align-items: center;
  background: var(--cd-surface);
  border-bottom: 1px solid var(--cd-border);
  padding: 0 24px;
}
.cd-content {
  max-width: 1600px;
  margin: 0 auto;
  padding: var(--cd-content-padding);
}
.cd-page-title { font-size: 26px; line-height: 1.3; font-weight: 700; }
.cd-section-title { font-size: 20px; line-height: 1.4; font-weight: 600; }
.cd-card-title { font-size: 16px; line-height: 1.4; font-weight: 600; }
.cd-muted { color: var(--cd-text-secondary); }
.cd-card {
  background: var(--cd-surface);
  border: 1px solid var(--cd-border);
  border-radius: var(--cd-radius-lg);
  padding: 24px;
  box-shadow: var(--cd-shadow-sm);
}
.cd-card:hover { box-shadow: var(--cd-shadow-md); }
.cd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--cd-radius-md);
  font: 600 14px/1.3 var(--cd-font);
  cursor: pointer;
  transition: background-color .2s ease, box-shadow .2s ease;
}
.cd-btn-primary { background: var(--cd-primary); color: #fff; }
.cd-btn-primary:hover { background: var(--cd-primary-hover); }
.cd-btn-secondary { background: #fff; color: var(--cd-text); border-color: var(--cd-border); }
.cd-btn-secondary:hover { background: var(--cd-surface-hover); }
.cd-btn-danger { background: var(--cd-danger); color: #fff; }
.cd-btn-ghost { background: transparent; color: var(--cd-text-secondary); }
.cd-btn:focus-visible, .cd-input:focus-visible, .cd-select:focus-visible {
  outline: 2px solid var(--cd-primary);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(23, 105, 224, .22);
}
/* 링크·탭 등 키보드 포커스도 또렷하게 (흰 배경에서 안 보이던 연한 링 교체) */
a:focus-visible, .nav-link:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--cd-primary);
  outline-offset: 2px;
  border-radius: 4px;
}
.cd-btn:disabled { opacity: .5; cursor: not-allowed; }
.cd-input, .cd-select {
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  background: #fff;
  color: var(--cd-text);
  border: 1px solid var(--cd-border);
  border-radius: var(--cd-radius-md);
  font: 400 14px var(--cd-font);
}
.cd-input::placeholder { color: var(--cd-text-muted); }
.cd-input:focus, .cd-select:focus { border-color: var(--cd-primary); }
.cd-table-wrapper { width: 100%; overflow-x: auto; }
.cd-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.cd-table th {
  padding: 14px 16px;
  background: #F1F5F9;
  color: var(--cd-text-secondary);
  font-weight: 600;
  text-align: left;
  border-bottom: 1px solid var(--cd-border);
}
.cd-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--cd-border);
}
.cd-table tbody tr:hover { background: #F0F7FF; }
.cd-badge {
  display: inline-flex;
  align-items: center;
  border-radius: var(--cd-radius-sm);
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
}
.cd-badge-success { background: #DCFCE7; color: #166534; }
.cd-badge-warning { background: #FEF3C7; color: #92400E; }
.cd-badge-danger { background: #FEE2E2; color: #991B1B; }
.cd-badge-info { background: #DBEAFE; color: #1D4ED8; }
.cd-sidebar-menu { display: flex; flex-direction: column; gap: 4px; padding: 16px 12px; }
.cd-sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: var(--cd-radius-md);
  color: #CBD5E1;
  text-decoration: none;
}
.cd-sidebar-item:hover { background: rgba(255,255,255,.08); color: #fff; }
.cd-sidebar-item[aria-current="page"], .cd-sidebar-item.is-active {
  background: var(--cd-primary);
  color: #fff;
  font-weight: 600;
}
.cd-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15,23,42,.5);
}
.cd-modal {
  width: min(100%, 560px);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  padding: 24px;
  background: var(--cd-surface);
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(15,23,42,.18);
}
@media (max-width: 1439px) {
  :root { --cd-content-padding: 20px; }
}
@media (max-width: 767px) {
  :root { --cd-content-padding: 16px; --cd-header-height: 60px; }
  .cd-sidebar { display: none; }
  .cd-main { width: 100%; }
  .cd-card { padding: 16px; }
  .cd-modal { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .cd-app *, .cd-app *::before, .cd-app *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
