/* ===================================================
   HWAVE - Recruit Marketing Intelligence Platform
   Design System & Styles
   =================================================== */

/* ── Design Tokens ── */
:root {
  /* Brand Colors */
  --hwave-primary: #009EE2;
  --hwave-primary-light: #33B5F0;
  --hwave-primary-dark: #007BB5;
  --hwave-primary-alpha-10: rgba(0, 158, 226, 0.10);
  --hwave-primary-alpha-15: rgba(0, 158, 226, 0.15);
  --hwave-primary-alpha-20: rgba(0, 158, 226, 0.20);

  /* Neutral Palette */
  --white: #FFFFFF;
  --gray-50: #F8FAFC;
  --gray-100: #F1F5F9;
  --gray-200: #E2E8F0;
  --gray-300: #CBD5E1;
  --gray-400: #94A3B8;
  --gray-500: #64748B;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1E293B;
  --gray-900: #0F172A;

  /* Semantic Colors */
  --success: #10B981;
  --success-light: #D1FAE5;
  --warning: #F59E0B;
  --warning-light: #FEF3C7;
  --danger: #EF4444;
  --danger-light: #FEE2E2;

  /* Stage Colors */
  --stage-1: #009EE2;
  --stage-2: #06B6D4;
  --stage-3: #8B5CF6;
  --stage-4: #F59E0B;
  --stage-5: #10B981;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 0 20px rgba(0, 158, 226, 0.25);

  /* Layout */
  --nav-height: 64px;
  --sidebar-width: 260px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 400ms;
}

/* ── Reset & Base ── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Utility ── */
.icon-xs { width: 14px; height: 14px; flex-shrink: 0; }
.icon-sm { width: 18px; height: 18px; flex-shrink: 0; }
.icon-md { width: 22px; height: 22px; flex-shrink: 0; }
.icon-lg { width: 40px; height: 40px; flex-shrink: 0; color: var(--gray-400); }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }

/* =====================================================
   NAVIGATION
   ===================================================== */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.92);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  cursor: pointer;
  user-select: none;
}

.logo-h {
  color: var(--hwave-primary);
}

.logo-wave {
  color: var(--gray-800);
}

.nav-divider {
  width: 1px;
  height: 28px;
  background: var(--gray-200);
}

.project-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-700);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.project-selector:hover {
  border-color: var(--hwave-primary);
  background: var(--hwave-primary-alpha-10);
}

.chevron-down {
  transition: transform var(--duration-fast) var(--ease-out);
}

.project-selector:hover .chevron-down {
  transform: translateY(2px);
}

.nav-center {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--gray-100);
  padding: 4px;
  border-radius: var(--radius-md);
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-500);
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
}

a.nav-tab {
  text-decoration: none;
  color: var(--gray-500);
}

.nav-tab:hover {
  color: var(--gray-700);
}

.nav-tab.active {
  background: var(--white);
  color: var(--hwave-primary);
  box-shadow: var(--shadow-sm);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.sync-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--success-light);
  border-radius: var(--radius-full);
}

.sync-dot {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
}

.sync-dot.pulse {
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

.sync-text {
  font-size: 12px;
  font-weight: 600;
  color: #065F46;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--hwave-primary-alpha-15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--hwave-primary);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.avatar:hover {
  background: var(--hwave-primary-alpha-20);
  transform: scale(1.05);
}

/* =====================================================
   VIEWS
   ===================================================== */
.view {
  display: none;
  padding-top: var(--nav-height);
}

.view.active {
  display: block;
  animation: fadeIn var(--duration-slow) var(--ease-out);
}

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

/* =====================================================
   DASHBOARD VIEW
   ===================================================== */

/* ── Funnel Section ── */
.funnel-section {
  padding: 32px 40px 0;
}

.section-header {
  margin-bottom: 28px;
}

.section-header h1 {
  font-size: 28px;
  font-weight: 800;
  color: var(--gray-900);
  letter-spacing: -0.5px;
}

.section-subtitle {
  font-size: 14px;
  color: var(--gray-500);
  margin-top: 4px;
  font-weight: 400;
}

.funnel-bar {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0;
  position: relative;
}

.funnel-step {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 16px 20px;
  background: var(--white);
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
  border: 1px solid var(--gray-200);
  margin-right: -1px;
}

.funnel-step:first-child {
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.funnel-step:last-child {
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  margin-right: 0;
}

.funnel-step.active {
  z-index: 2;
  border-color: var(--step-color);
  background: var(--white);
  box-shadow: 0 0 0 1px var(--step-color);
}

.funnel-step:hover {
  z-index: 3;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.funnel-step-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.funnel-step-number {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--step-color);
  opacity: 0.7;
}

.funnel-step-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-800);
}

.funnel-step-count {
  font-size: 12px;
  color: var(--gray-500);
  font-weight: 500;
}

.funnel-step.active .funnel-step-name {
  color: var(--step-color);
}

.funnel-arrow {
  position: absolute;
  right: -12px;
  z-index: 5;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.funnel-arrow svg {
  width: 16px;
  height: 16px;
  color: var(--gray-400);
}

/* ── Donut Charts Section ── */
.donut-section {
  display: flex;
  gap: 20px;
  padding: 28px 40px;
  overflow-x: auto;
}

.donut-card {
  flex: 1;
  min-width: 200px;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--gray-200);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  transition: all var(--duration-normal) var(--ease-out);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.donut-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--card-color);
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-out);
}

.donut-card:hover {
  border-color: var(--card-color);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.donut-card:hover::before {
  opacity: 1;
}

.donut-chart-wrapper {
  position: relative;
  width: 120px;
  height: 120px;
}

.donut-chart {
  width: 120px;
  height: 120px;
  transform: rotate(-90deg);
}

.donut-bg {
  fill: none;
  stroke: var(--gray-100);
  stroke-width: 10;
}

.donut-fg {
  fill: none;
  stroke-width: 10;
  stroke-linecap: round;
  transition: stroke-dashoffset 1.2s var(--ease-out);
}

.donut-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.donut-percent {
  font-size: 26px;
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1;
}

.donut-percent-sign {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-400);
}

.donut-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-800);
}

.donut-sub {
  font-size: 12px;
  color: var(--gray-500);
}

/* ── Programs Section ── */
.programs-section {
  padding: 0 40px 40px;
}

.stage-group {
  margin-bottom: 32px;
}

.stage-group-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.stage-indicator {
  width: 4px;
  height: 28px;
  border-radius: var(--radius-full);
}

.stage-group-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-800);
}

.stage-group-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-400);
  background: var(--gray-100);
  padding: 2px 10px;
  border-radius: var(--radius-full);
}

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

.program-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 20px;
  border: 1px solid var(--gray-200);
  transition: all var(--duration-normal) var(--ease-out);
  cursor: default;
  position: relative;
}

.program-card:hover {
  border-color: var(--gray-300);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.program-card.exceeded {
  border-color: var(--hwave-primary);
  box-shadow: var(--shadow-glow);
}

.program-card.exceeded::after {
  content: '🎯 목표 달성!';
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 10px;
  font-weight: 700;
  color: var(--hwave-primary);
  background: var(--hwave-primary-alpha-10);
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.program-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
}

.program-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-800);
  line-height: 1.3;
}

.program-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.program-metrics {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 12px;
}

.metric-block {}

.metric-label {
  font-size: 11px;
  color: var(--gray-500);
  font-weight: 500;
  margin-bottom: 2px;
}

.metric-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1;
}

.metric-value.target {
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-400);
}

.program-progress-bar {
  width: 100%;
  height: 6px;
  background: var(--gray-100);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.program-progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 1s var(--ease-out);
  min-width: 2px;
}

.program-progress-label {
  display: flex;
  justify-content: flex-end;
  margin-top: 6px;
}

.progress-percent {
  font-size: 12px;
  font-weight: 700;
}

/* =====================================================
   ADMIN VIEW
   ===================================================== */
.admin-layout {
  display: flex;
  min-height: calc(100vh - var(--nav-height));
}

/* 관리자 패널 전용 페이지: 고정 top-nav 아래부터 레이아웃 시작 (.view 가 없을 때) */
body.admin-panel-page .admin-layout {
  padding-top: var(--nav-height);
  min-height: 100vh;
  box-sizing: border-box;
}

/* ── Sidebar ── */
.admin-sidebar {
  width: var(--sidebar-width);
  background: var(--white);
  border-right: 1px solid var(--gray-200);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px 12px;
  position: sticky;
  top: var(--nav-height);
  height: calc(100vh - var(--nav-height));
}

.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: none;
  background: transparent;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-600);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  text-align: left;
  width: 100%;
}

a.sidebar-item {
  text-decoration: none;
  color: var(--gray-600);
}

.sidebar-item:hover {
  background: var(--gray-50);
  color: var(--gray-800);
}

.sidebar-item.active {
  background: var(--hwave-primary-alpha-10);
  color: var(--hwave-primary);
  font-weight: 600;
}

.sidebar-footer {
  border-top: 1px solid var(--gray-200);
  padding-top: 16px;
}

.sidebar-alert-config {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 500;
  color: var(--gray-600);
  background: var(--gray-50);
  border-radius: var(--radius-md);
}

.sidebar-alert-config span {
  flex: 1;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--gray-300);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-out);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  background: var(--white);
  border-radius: 50%;
  transition: transform var(--duration-fast) var(--ease-spring);
  box-shadow: var(--shadow-sm);
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--hwave-primary);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(18px);
}

/* ── Admin Main ── */
.admin-main {
  flex: 1;
  padding: 24px;
  overflow-x: auto;
}

/* ── Bulk Upload Zone ── */
.bulk-upload-zone {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

/* 프로그램 관리: 업로드 영역 아래에 양식 다운로드 */
.bulk-upload-zone--stacked {
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}

.bulk-upload-zone--stacked .upload-dropzone {
  flex: none;
  width: 100%;
}

.bulk-upload-zone--stacked .btn-template-download {
  align-self: flex-start;
}

/* 프로그램 CSV 일괄: 업로드 영역 내 로딩·결과 */
.program-bulk-dropzone {
  position: relative;
  min-height: 148px;
  justify-content: center;
}

.program-bulk-dropzone.program-bulk-dropzone--loading,
.program-bulk-dropzone.program-bulk-dropzone--result {
  cursor: default;
}

.program-bulk-dropzone.program-bulk-dropzone--loading:hover,
.program-bulk-dropzone.program-bulk-dropzone--result:hover {
  border-color: var(--gray-300);
  background: var(--white);
}

.program-bulk-pane {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
  text-align: center;
}

/* [hidden]은 display:flex 규칙보다 우선해야 함 (로딩 패널이 기본으로 보이는 버그 방지) */
.program-bulk-dropzone .program-bulk-pane[hidden] {
  display: none !important;
}

.program-bulk-pane--loading {
  gap: 14px;
  padding: 8px 0 4px;
}

.program-bulk-pane__lead {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-800);
}

.program-bulk-pane__sub {
  margin: 0;
  font-size: 12px;
  color: var(--gray-500);
}

.program-bulk-progress {
  width: 100%;
  max-width: 280px;
  height: 7px;
  border-radius: 999px;
  background: var(--gray-200);
  overflow: hidden;
}

.program-bulk-progress__bar {
  width: 36%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    var(--hwave-primary),
    #22d3ee,
    var(--hwave-primary)
  );
  animation: program-bulk-shift 1.25s ease-in-out infinite;
}

@keyframes program-bulk-shift {
  0% {
    transform: translateX(-130%);
  }

  100% {
    transform: translateX(380%);
  }
}

.program-bulk-result {
  align-items: stretch;
  text-align: left;
  padding: 4px 4px 0;
}

.program-bulk-result__row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.program-bulk-result__icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
}

.program-bulk-result__icon--ok {
  color: #059669;
  background: rgba(16, 185, 129, 0.12);
}

.program-bulk-result__icon--err {
  color: #dc2626;
  background: rgba(239, 68, 68, 0.1);
}

.program-bulk-result__text {
  flex: 1;
  min-width: 0;
}

.program-bulk-result__title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-900);
}

.program-bulk-result__body {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--gray-600);
}

.program-bulk-result__body:empty {
  display: none;
}

.program-bulk-result__body strong {
  color: var(--hwave-primary);
  font-weight: 700;
}

.program-bulk-result--success .program-bulk-result__title {
  color: #047857;
}

.program-bulk-result__list {
  margin: 0 0 8px;
  padding-left: 1.15em;
  font-size: 12px;
  line-height: 1.45;
  color: var(--gray-500);
}

.program-bulk-result__hint {
  margin: 0;
  font-size: 11px;
  color: var(--gray-400);
}

.upload-dropzone {
  flex: 1;
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
  background: var(--white);
}

.upload-dropzone:hover,
.upload-dropzone.drag-over {
  border-color: var(--hwave-primary);
  background: var(--hwave-primary-alpha-10);
}

.upload-dropzone.drag-over .icon-lg {
  color: var(--hwave-primary);
  transform: translateY(-4px);
  transition: all var(--duration-normal) var(--ease-spring);
}

.upload-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-700);
}

.upload-subtitle {
  font-size: 12px;
  color: var(--gray-400);
}

.btn-template-download {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  background: var(--hwave-primary);
  color: var(--white);
  border: none;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--duration-fast) var(--ease-out);
  box-shadow: 0 2px 8px rgba(0, 158, 226, 0.3);
}

.btn-template-download:hover {
  background: var(--hwave-primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 158, 226, 0.4);
}

.btn-template-download:disabled {
  opacity: 0.72;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-template-download:disabled:hover {
  background: var(--hwave-primary);
  transform: none;
  box-shadow: 0 2px 8px rgba(0, 158, 226, 0.3);
}

.programs-page-empty-block {
  padding: 32px 24px;
  background: var(--gray-50);
  border: 1px dashed var(--gray-300);
  border-radius: var(--radius-lg);
  text-align: center;
}

.programs-page-empty-text {
  margin: 0;
  font-size: 14px;
  color: var(--gray-600);
}

/* 서버 렌더 칸반: 드래그 없음 (예시 UI 정렬) */
.kanban-card[draggable="true"] {
  cursor: grab;
}

.kanban-card[draggable="true"]:active {
  cursor: grabbing;
}

.kanban-card .js-metric-edit {
  cursor: pointer;
}

.kanban-card .js-metric-edit:hover {
  background: var(--gray-100);
}


.kanban-card-unit {
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-500);
  margin: -4px 0 10px;
  line-height: 1.35;
}

.kanban-add-card:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.kanban-add-card:disabled:hover {
  border-color: var(--gray-300);
  color: var(--gray-400);
  background: transparent;
}

/* ── 관리자 모달 (프로그램 추가 등) ── */
.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 220;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.admin-modal[hidden] {
  display: none !important;
}

.admin-modal:not([hidden]) {
  display: flex;
}

.admin-modal__overlay {
  position: absolute;
  inset: 0;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  background: rgba(15, 23, 42, 0.45);
}

.admin-modal__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-xl);
  max-height: min(90vh, 640px);
  overflow: auto;
}

.admin-modal__panel--wide {
  max-width: 520px;
}

.admin-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 12px;
  border-bottom: 1px solid var(--gray-100);
}

.admin-modal__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.35;
}

.admin-modal__stage {
  font-weight: 600;
  color: var(--hwave-primary);
}

.admin-modal__close {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--gray-500);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out);
}

.admin-modal__close:hover {
  background: var(--gray-100);
  color: var(--gray-800);
}

.admin-modal__body {
  padding: 16px 20px;
}

.admin-modal__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  padding: 12px 20px 18px;
  border-top: 1px solid var(--gray-100);
  background: var(--gray-50);
}

.admin-modal-form {
  margin: 0;
}

.admin-modal__grid {
  margin-top: 4px;
}

/* 프로그램 추가 모달: 유형 ↔ 수치 그리드 간격 */
.admin-modal__body--program-add .admin-field--program-kind {
  margin-top: 2px;
  margin-bottom: 0;
}

.admin-modal__body--program-add .admin-modal__program-metrics-grid {
  margin-top: 22px;
}

.admin-field-hint--sm {
  font-size: 11px;
  line-height: 1.45;
  color: var(--gray-400);
  margin: 6px 0 0;
  font-weight: 400;
}

.admin-modal__body--program-add .admin-field-hint--sm {
  margin-top: 5px;
}

.admin-field--program-kind .admin-field-hint--sm {
  margin-top: 10px;
}

/* 유형: 세그먼트형 라디오 */
.admin-segmented {
  display: flex;
  width: 100%;
  padding: 4px;
  gap: 4px;
  margin-top: 8px;
  box-sizing: border-box;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
}

.admin-segmented__item {
  flex: 1;
  position: relative;
  margin: 0;
  min-width: 0;
}

.admin-segmented__item input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.admin-segmented__text {
  position: relative;
  z-index: 0;
  display: block;
  text-align: center;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-500);
  transition: background var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out);
  pointer-events: none;
}

.admin-segmented__item:hover .admin-segmented__text {
  color: var(--gray-700);
}

.admin-segmented__item input:checked + .admin-segmented__text {
  background: var(--white);
  color: var(--hwave-primary);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.admin-segmented__item input:focus-visible + .admin-segmented__text {
  outline: 2px solid var(--hwave-primary);
  outline-offset: 2px;
}

/* ── Kanban Board ── */
.kanban-board {
  display: flex;
  gap: 16px;
  min-height: 500px;
  overflow-x: auto;
  padding-bottom: 16px;
}

.kanban-column {
  min-width: 280px;
  flex: 1;
  background: var(--gray-50);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: all var(--duration-normal) var(--ease-out);
}

.kanban-column.drag-over {
  border-color: var(--hwave-primary);
  background: var(--hwave-primary-alpha-10);
  box-shadow: 0 0 0 2px var(--hwave-primary-alpha-20);
}

.kanban-column-header {
  padding: 16px;
  border-bottom: 1px solid var(--gray-200);
  background: var(--white);
}

.kanban-column-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.kanban-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.kanban-title-text {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-800);
}

.kanban-count {
  font-size: 11px;
  font-weight: 700;
  background: var(--gray-100);
  color: var(--gray-500);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  margin-left: auto;
}

.kanban-cards {
  flex: 1;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  min-height: 100px;
}

/* ── Kanban Card ── */
.kanban-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 16px;
  border: 1px solid var(--gray-200);
  cursor: grab;
  transition: all var(--duration-normal) var(--ease-out);
  position: relative;
}

.kanban-card:active {
  cursor: grabbing;
}

.kanban-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--gray-300);
  transform: translateY(-1px);
}

.kanban-card.dragging {
  opacity: 0.55;
  transform: rotate(2deg) scale(1.02);
  box-shadow: var(--shadow-xl);
  cursor: grabbing;
}

.kanban-card.exceeded {
  border-color: var(--hwave-primary);
  box-shadow: 0 0 12px rgba(0, 158, 226, 0.15);
}

.kanban-card.exceeded .kanban-card-alert {
  display: flex;
}

.kanban-card-alert {
  display: none;
  align-items: center;
  gap: 4px;
  margin-bottom: 8px;
  font-size: 10px;
  font-weight: 700;
  color: var(--hwave-primary);
}

.kanban-card-alert svg {
  width: 14px;
  height: 14px;
}

.kanban-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.kanban-card-head .kanban-card-name {
  margin-bottom: 0;
  flex: 1;
  min-width: 0;
}

.kanban-card-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 12px;
  line-height: 1.4;
}

.kanban-card-name.js-program-name-edit {
  display: block;
  cursor: pointer;
  padding: 2px 4px;
  margin: -2px -4px;
  border-radius: var(--radius-sm);
  word-break: break-word;
  transition: background var(--duration-fast) var(--ease-out);
}

.kanban-card-name.js-program-name-edit:hover {
  background: var(--gray-100);
}

.kanban-card-head .kanban-card-name.js-program-name-edit {
  margin-bottom: 0;
}

.kanban-name-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  color: var(--hwave-primary);
  border: 1px solid var(--hwave-primary);
  border-radius: var(--radius-sm);
  padding: 2px 4px;
  margin: -3px -5px;
  background: var(--hwave-primary-alpha-10);
  outline: none;
  line-height: 1.4;
}

.kanban-card-remove {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  margin: -4px -6px 0 0;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--gray-400);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out);
}

.kanban-card-remove:hover {
  background: rgba(239, 68, 68, 0.12);
  color: var(--danger, #ef4444);
}

.kanban-card-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.kanban-metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.kanban-metric-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.kanban-metric-value {
  font-size: 18px;
  font-weight: 800;
  color: var(--gray-800);
  cursor: pointer;
  padding: 2px 4px;
  margin: -2px -4px;
  border-radius: var(--radius-sm);
  transition: background var(--duration-fast) var(--ease-out);
  line-height: 1.2;
}

.kanban-metric-value:hover {
  background: var(--gray-100);
}

.kanban-metric-value--readonly {
  cursor: default;
  padding: 2px 4px;
  margin: -2px -4px;
  border-radius: var(--radius-sm);
  color: var(--gray-700);
}

.kanban-metric-value--readonly:hover {
  background: transparent;
}

.kanban-metric-input {
  width: 100%;
  font-family: inherit;
  font-size: 18px;
  font-weight: 800;
  color: var(--hwave-primary);
  border: 1px solid var(--hwave-primary);
  border-radius: var(--radius-sm);
  padding: 2px 4px;
  margin: -3px -5px;
  background: var(--hwave-primary-alpha-10);
  outline: none;
  line-height: 1.2;
}

.kanban-card-progress {
  height: 4px;
  background: var(--gray-100);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.kanban-card-progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.6s var(--ease-out);
}

.kanban-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

.kanban-card-percent {
  font-size: 11px;
  font-weight: 700;
}

.kanban-card-footer-spacer {
  flex: 1;
  min-width: 8px;
}

.kanban-card-daily-btn {
  flex-shrink: 0;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--hwave-primary);
  background: var(--hwave-primary-alpha-10);
  color: var(--hwave-primary);
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out);
}

.kanban-card-daily-btn:hover {
  background: var(--hwave-primary);
  color: var(--white);
}

.program-daily-list-wrap {
  margin-top: 20px;
}

.program-daily-form-actions {
  margin-top: 6px;
  margin-bottom: 2px;
}

.program-daily-submit-btn {
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--hwave-primary);
  background: var(--hwave-primary);
  color: var(--white);
  cursor: pointer;
  transition: opacity var(--duration-fast) var(--ease-out), filter var(--duration-fast) var(--ease-out);
}

.program-daily-submit-btn:hover {
  filter: brightness(1.05);
}

.program-daily-submit-btn:active {
  filter: brightness(0.97);
}

#programDailyModal .admin-field-hint--sm {
  margin-top: 8px;
  margin-bottom: 0;
  color: var(--gray-500);
  font-size: 11px;
}

.program-daily-row {
  cursor: pointer;
  user-select: none;
  transition: background var(--duration-fast) var(--ease-out);
}

.program-daily-row:hover {
  background: var(--gray-50);
}

.program-daily-row:focus {
  outline: none;
}

.program-daily-row:focus-visible {
  outline: 2px solid var(--hwave-primary);
  outline-offset: -2px;
}

.program-daily-row--selected {
  background: var(--hwave-primary-alpha-10);
}

.program-daily-row--selected:hover {
  background: rgba(0, 158, 226, 0.14);
}

.program-daily-td-num {
  font-variant-numeric: tabular-nums;
}

.program-daily-list-title {
  margin: 0 0 8px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--gray-800);
}

.program-daily-table {
  font-size: 13px;
  margin-bottom: 0;
}

.program-daily-th-num,
.program-daily-td-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.admin-table-scroll {
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
}

/* ── Add Card Button ── */
.kanban-add-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px;
  border: 1px dashed var(--gray-300);
  border-radius: var(--radius-md);
  background: transparent;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-400);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.kanban-add-card:hover {
  border-color: var(--hwave-primary);
  color: var(--hwave-primary);
  background: var(--hwave-primary-alpha-10);
}

.kanban-add-card svg {
  width: 16px;
  height: 16px;
}

/* =====================================================
   TOAST NOTIFICATIONS
   ===================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  background: var(--gray-900);
  color: var(--white);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-xl);
  animation: toastIn var(--duration-normal) var(--ease-spring);
  max-width: 360px;
}

.toast.toast-exit {
  animation: toastOut var(--duration-fast) var(--ease-out) forwards;
}

.toast svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.toast.success svg { color: var(--success); }
.toast.info svg { color: var(--hwave-primary); }
.toast.warning svg { color: var(--warning); }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(16px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastOut {
  to { opacity: 0; transform: translateX(100px); }
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 1024px) {
  .funnel-bar {
    flex-wrap: wrap;
  }
  .funnel-step {
    min-width: 120px;
  }
  .donut-section {
    flex-wrap: wrap;
  }
  .admin-sidebar {
    width: 220px;
  }
  .kanban-column {
    min-width: 250px;
  }
}

@media (max-width: 768px) {
  .top-nav {
    padding: 0 16px;
  }
  .project-selector span {
    display: none;
  }
  .sync-text {
    display: none;
  }
  .funnel-section, .donut-section, .programs-section {
    padding-left: 16px;
    padding-right: 16px;
  }
  .admin-sidebar {
    display: none;
  }
  .kanban-board {
    flex-direction: column;
  }
  .kanban-column {
    min-width: 100%;
  }
  .bulk-upload-zone {
    flex-direction: column;
  }
}

/* ── Animations ── */
@keyframes countUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-in {
  animation: countUp 0.6s var(--ease-out) backwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* =====================================================
   LOGIN PAGE (관리자 로그인 — 대시보드와 동일 토큰)
   ===================================================== */
body.login-page {
  min-height: 100vh;
}

.login-nav .nav-left {
  flex: 1;
}

.login-nav-tag {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-500);
}

.login-main {
  min-height: 100vh;
  padding: calc(var(--nav-height) + 48px) 24px 48px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 32px 32px 28px;
}

.login-card-header {
  margin-bottom: 24px;
}

.login-title {
  margin: 0 0 8px;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--gray-900);
}

.login-lead {
  margin: 0;
  font-size: 0.9rem;
  color: var(--gray-500);
  line-height: 1.5;
}

.login-alert {
  padding: 12px 14px;
  margin-bottom: 20px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  background: var(--danger-light);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: var(--danger);
}

.login-alert p {
  margin: 0;
}

.login-form .login-field {
  margin-bottom: 16px;
}

.login-form label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: 6px;
}

.login-form input[type="text"],
.login-form input[type="password"] {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  background: var(--white);
  color: var(--gray-800);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out);
}

.login-form input:hover {
  border-color: var(--gray-300);
}

.login-form input:focus {
  outline: none;
  border-color: var(--hwave-primary);
  box-shadow: 0 0 0 3px var(--hwave-primary-alpha-20);
}

.login-submit {
  width: 100%;
  margin-top: 8px;
  padding: 12px 16px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--hwave-primary);
  color: var(--white);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out);
}

.login-submit:hover {
  background: var(--hwave-primary-dark);
  box-shadow: var(--shadow-glow);
}

.login-submit:focus-visible {
  outline: 2px solid var(--hwave-primary);
  outline-offset: 2px;
}

@media (max-width: 480px) {
  .login-main {
    padding-top: calc(var(--nav-height) + 24px);
  }
  .login-card {
    padding: 24px 20px;
  }
}

/* =====================================================
   ADMIN PANEL PAGES (목록 화면)
   ===================================================== */
.logo-link {
  text-decoration: none;
  color: inherit;
  align-items: center;
}

.project-selector.is-static {
  cursor: default;
}

.project-selector.is-static:hover {
  border-color: var(--gray-200);
  background: var(--gray-50);
}

/* 프로그램 관리: 로고 옆 프로젝트 선택 (exm/index.html 스타일에 맞춤) */
form.project-selector.project-selector--interactive {
  margin: 0;
  cursor: pointer;
}

.project-selector--interactive .project-selector__select {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-800);
  cursor: pointer;
  padding: 2px 4px 2px 0;
  margin: 0;
  min-width: 0;
  max-width: min(360px, 48vw);
  text-overflow: ellipsis;
  flex: 1;
}

.project-selector--interactive .project-selector__select:focus {
  outline: none;
}

.project-selector--interactive:focus-within {
  border-color: var(--hwave-primary);
  background: var(--hwave-primary-alpha-10);
}

.admin-section-header {
  margin-bottom: 20px;
}

.admin-section-title {
  margin: 0 0 6px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gray-900);
  letter-spacing: -0.02em;
}

.admin-section-desc {
  margin: 0;
  font-size: 0.875rem;
  color: var(--gray-500);
  max-width: 720px;
  line-height: 1.55;
}

.admin-table-wrap {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.admin-table th,
.admin-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--gray-200);
  vertical-align: top;
}

.admin-table thead th {
  font-weight: 600;
  color: var(--gray-600);
  background: var(--gray-50);
  white-space: nowrap;
}

.admin-table tbody tr:hover {
  background: var(--gray-50);
}

.admin-table tbody tr:last-child td {
  border-bottom: none;
}

.admin-table .col-num {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.admin-table-empty {
  text-align: center;
  color: var(--gray-500);
  padding: 36px 16px !important;
}

.admin-code {
  font-size: 12px;
  padding: 2px 6px;
  background: var(--gray-100);
  border-radius: var(--radius-sm);
  color: var(--gray-700);
}

.admin-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.admin-pill--active {
  background: var(--success-light);
  color: var(--success);
}

.admin-pill--draft {
  background: var(--warning-light);
  color: var(--warning);
}

.admin-pill--archived {
  background: var(--gray-200);
  color: var(--gray-600);
}

.admin-flash {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  font-size: 0.875rem;
}

.admin-flash--error {
  background: var(--danger-light);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: var(--danger);
}

.admin-flash--success {
  background: var(--success-light);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: var(--success);
}

.admin-form-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 20px 22px 22px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
}

.admin-form-title {
  margin: 0 0 16px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-800);
}

.admin-form-subtitle {
  margin: 20px 0 12px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gray-700);
}

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px 20px;
}

.admin-form-grid .admin-field--span-row {
  grid-column: 1 / -1;
}

.admin-field label,
.admin-field .admin-field-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: 6px;
}

.admin-field .req {
  color: var(--danger);
}

.admin-field input[type="text"],
.admin-field input[type="password"],
.admin-field input[type="date"],
.admin-field select,
.admin-textarea {
  width: 100%;
  padding: 10px 11px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.9rem;
}

.admin-field select {
  cursor: pointer;
  background-color: var(--white);
}

.admin-field input:focus,
.admin-field select:focus,
.admin-textarea:focus {
  outline: none;
  border-color: var(--hwave-primary);
  box-shadow: 0 0 0 3px var(--hwave-primary-alpha-20);
}

.admin-form-actions {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.admin-submit-inline {
  width: auto;
  min-width: 120px;
  margin-top: 0;
}

.admin-table-heading {
  margin: 0 0 12px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gray-800);
}

.admin-section-header--row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.admin-section-header--row .admin-section-title {
  margin-bottom: 6px;
}

.admin-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  background: var(--hwave-primary);
  color: var(--white) !important;
  text-decoration: none !important;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: background var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out);
}

.admin-btn-primary:hover {
  background: var(--hwave-primary-dark);
  box-shadow: var(--shadow-glow);
}

.admin-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  background: var(--white);
  color: var(--gray-700) !important;
  text-decoration: none !important;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-family: inherit;
}

.admin-btn-secondary:hover {
  background: var(--gray-50);
  border-color: var(--gray-300);
}

.admin-back-link {
  margin: 8px 0 0;
  font-size: 0.875rem;
}

.admin-back-link a {
  color: var(--hwave-primary);
  text-decoration: none;
  font-weight: 600;
}

.admin-back-link a:hover {
  text-decoration: underline;
}

.admin-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gray-800);
  cursor: pointer;
}

.admin-checkbox-label input {
  width: 18px;
  height: 18px;
  accent-color: var(--hwave-primary);
}

.admin-hint {
  margin: 6px 0 0;
  font-size: 0.8rem;
  color: var(--gray-500);
  line-height: 1.4;
}

.admin-table-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--hwave-primary);
  text-decoration: none;
}

.admin-table-link:hover {
  text-decoration: underline;
}

.admin-table .col-actions {
  white-space: nowrap;
}
