/* 공통 — 모든 화면에서 import */
html { font-size: 17px; }
body {
  font-family: "Noto Sans KR", system-ui, sans-serif;
  font-feature-settings: "tnum";
  color: #1e293b;
}
.num { font-variant-numeric: tabular-nums; }

/* 상단 시험운영 띠 */
.poc-banner {
  background: #fffbeb;
  border-bottom: 1px solid #fde68a;
  text-align: center;
  padding: 6px;
  font-size: 14px;
  color: #92400e;
}

/* 상단 네비 */
.app-nav {
  background: white;
  border-bottom: 1px solid #e2e8f0;
}
.app-nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.app-brand {
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.01em;
}
.app-brand small {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
  margin-left: 8px;
}
.app-tabs { display: flex; gap: 4px; }
.app-tab {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 15px;
  color: #475569;
  font-weight: 500;
  transition: background 0.1s;
}
.app-tab:hover { background: #f1f5f9; color: #0f172a; }
.app-tab.active { background: #eff6ff; color: #0048a8; }
.app-user { font-size: 14px; color: #475569; }

/* 출처 호버 */
.src {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 1px 6px; border-radius: 4px;
  background: #f1f5f9; color: #64748b;
  font-size: 11px; font-weight: 500;
  margin-left: 6px; cursor: help; position: relative;
  vertical-align: middle;
}
.src:hover { background: #e2e8f0; color: #334155; }
.src > .pop {
  position: absolute; left: 50%; bottom: calc(100% + 8px);
  transform: translateX(-50%);
  width: 320px; background: #0f172a; color: #f1f5f9;
  padding: 14px 16px; border-radius: 10px;
  font-size: 13px; line-height: 1.6; font-weight: 400;
  text-align: left;
  opacity: 0; visibility: hidden;
  transition: opacity 0.15s, visibility 0.15s, transform 0.15s;
  box-shadow: 0 12px 32px -8px rgba(15, 23, 42, 0.5);
  z-index: 50; pointer-events: none;
}
.src:hover > .pop {
  opacity: 1; visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.src > .pop::after {
  content: ""; position: absolute; top: 100%; left: 50%;
  transform: translateX(-50%);
  border: 7px solid transparent; border-top-color: #0f172a;
}
.pop .k { color: #94a3b8; }
.pop .warn { color: #fbbf24; }
.pop hr { border-color: #1e293b; margin: 8px 0; }

/* 버튼 */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; min-height: 56px; padding: 0 28px;
  border-radius: 10px; font-size: 17px; font-weight: 600;
  transition: background 0.1s; cursor: pointer;
}
.btn-primary { background: #0048a8; color: white; border: none; }
.btn-primary:hover { background: #003a8c; }
.btn-secondary { background: white; color: #1e293b; border: 1.5px solid #cbd5e1; }
.btn-secondary:hover { background: #f8fafc; }
.btn-danger { background: white; color: #b91c1c; border: 1.5px solid #fca5a5; }
.btn-danger:hover { background: #fef2f2; }

.link-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 8px;
  border: 1px solid #cbd5e1; background: white;
  color: #1e293b; font-size: 14px; font-weight: 500;
  transition: background 0.1s; cursor: pointer;
}
.link-btn:hover { background: #f8fafc; }

/* 칩 */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 4px;
  font-size: 13px; font-weight: 500;
}
.chip-ok { background: #dcfce7; color: #166534; }
.chip-warn { background: #fef3c7; color: #92400e; }
.chip-danger { background: #fee2e2; color: #991b1b; }
.chip-info { background: #dbeafe; color: #1e40af; }
.chip-neutral { background: #f1f5f9; color: #475569; }
.check {
  display: inline-block; width: 6px; height: 6px;
  border-radius: 9999px; background: currentColor;
}

/* 토스트 */
.toast {
  position: fixed; bottom: 32px; left: 50%;
  transform: translateX(-50%) translateY(40px);
  background: #0f172a; color: white;
  padding: 14px 24px; border-radius: 10px;
  font-size: 15px;
  box-shadow: 0 12px 32px -8px rgba(15, 23, 42, 0.5);
  opacity: 0; visibility: hidden;
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  z-index: 100;
}
.toast.show {
  opacity: 1; visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* 모달 */
dialog {
  max-width: 720px; width: calc(100% - 48px);
  border: none; border-radius: 16px; padding: 0;
  box-shadow: 0 24px 48px -12px rgba(15, 23, 42, 0.35);
}
dialog::backdrop { background: rgba(15, 23, 42, 0.55); }
.modal-head {
  padding: 20px 28px; border-bottom: 1px solid #e2e8f0;
  display: flex; align-items: center; justify-content: space-between;
}
.modal-body { padding: 24px 28px; max-height: 65vh; overflow-y: auto; }
.modal-foot {
  padding: 16px 28px; border-top: 1px solid #e2e8f0;
  display: flex; justify-content: flex-end; gap: 8px;
}
.close-x {
  width: 36px; height: 36px; border-radius: 8px;
  border: none; background: transparent;
  font-size: 20px; color: #64748b; cursor: pointer;
}
.close-x:hover { background: #f1f5f9; }
