/* 笔记收录查询 */
.niq-root {
  max-width: 1100px;
  margin: 0 auto;
  padding: 8px 12px 56px;
}

.niq-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 1px solid #eef2f7;
}

.niq-tab {
  border: 0;
  background: transparent;
  padding: 10px 18px;
  font-size: 14px;
  color: #64748b;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.niq-tab.is-active {
  color: #3c66ff;
  font-weight: 600;
  border-bottom-color: #3c66ff;
}

.niq-hero {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 22px;
}

.niq-hero-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(145deg, #6b8cff, #3c66ff);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 26px;
  flex-shrink: 0;
}

.niq-title {
  margin: 0 0 6px;
  font-size: 24px;
  font-weight: 700;
  color: #0f172a;
}

.niq-sub {
  margin: 0 0 8px;
  color: #64748b;
  font-size: 14px;
}

.niq-link {
  border: 0;
  background: none;
  color: #6366f1;
  cursor: pointer;
  font-size: 13px;
  padding: 0;
  text-decoration: none;
}

.niq-link:hover {
  text-decoration: underline;
}

.niq-section {
  background: #fff;
  border: 1px solid #eef2f7;
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 14px;
}

.niq-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.niq-section-head h3,
.niq-section h3 {
  margin: 0;
  font-size: 15px;
  color: #0f172a;
}

.niq-muted {
  color: #94a3b8;
  font-size: 13px;
  font-weight: 400;
}

.niq-add-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.niq-add-card {
  border: 1px dashed #a5b4fc;
  background: #eef2ff;
  color: #2952e6;
  border-radius: 10px;
  padding: 28px 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.niq-add-card:hover {
  background: #f3e8ff;
  border-color: #6b8cff;
}

.niq-note-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.niq-note-row,
.niq-r-note {
  display: flex;
  gap: 12px;
  align-items: center;
}

.niq-note-row {
  border: 1px solid #eef2f7;
  border-radius: 10px;
  padding: 10px 12px;
}

.niq-note-thumb {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  background: #f1f5f9;
  flex-shrink: 0;
  position: relative;
}

.niq-thumb-lg {
  width: 88px;
  height: 88px;
}

.niq-note-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.niq-thumb-ph {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: #94a3b8;
  font-size: 12px;
}

.niq-note-main {
  flex: 1;
  min-width: 0;
}

.niq-note-title {
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.niq-note-meta {
  margin-top: 4px;
  font-size: 12px;
  color: #64748b;
}

.niq-note-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.niq-text-btn {
  border: 0;
  background: none;
  color: #6366f1;
  cursor: pointer;
  font-size: 13px;
  padding: 2px 4px;
}

.niq-text-btn.niq-danger {
  color: var(--bd-down, #f53f3f);
}

.niq-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
}

.niq-badge-ok {
  background: #dcfce7;
  color: #15803d;
}

.niq-badge-no {
  background: #ede9fe;
  color: #2952e6;
}

.niq-group-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.niq-select,
.niq-input,
.niq-textarea {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 14px;
  color: #0f172a;
  background: #fff;
}

.niq-select {
  min-width: 200px;
}

.niq-input {
  flex: 1;
  min-width: 0;
}

.niq-textarea {
  width: 100%;
  resize: vertical;
  box-sizing: border-box;
}

.niq-cost p {
  margin: 8px 0 0;
  font-size: 14px;
  color: #475569;
}

.niq-cost strong {
  color: #3c66ff;
}

.niq-submit-wrap {
  text-align: center;
  margin-top: 8px;
}

.niq-btn-primary,
.niq-btn-ghost {
  border-radius: 8px;
  padding: 8px 18px;
  font-size: 14px;
  cursor: pointer;
}

.niq-btn-primary {
  border: 0;
  background: #3c66ff;
  color: #fff;
  font-weight: 600;
}

.niq-btn-primary:hover {
  background: #2952e6;
}

.niq-btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.niq-btn-lg {
  min-width: 200px;
  padding: 12px 28px;
  font-size: 15px;
}

.niq-btn-ghost {
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #475569;
}

.niq-error {
  margin: 10px 0;
  padding: 10px 12px;
  background: #fef2f2;
  color: #b91c1c;
  border-radius: 8px;
  font-size: 13px;
}

.niq-toast {
  margin: 10px 0;
  padding: 10px 12px;
  background: #f0fdf4;
  color: #166534;
  border-radius: 8px;
  font-size: 13px;
}

.niq-loading,
.niq-empty {
  padding: 48px 16px;
  text-align: center;
  color: #94a3b8;
  font-size: 14px;
}

/* reports */
.niq-report-bar {
  margin-bottom: 14px;
}

.niq-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.niq-filter-label {
  font-size: 13px;
  color: #64748b;
  margin-right: 4px;
}

.niq-chip {
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 6px;
  padding: 4px 12px;
  font-size: 13px;
  color: #475569;
  cursor: pointer;
}

.niq-chip.is-active {
  border-color: var(--bd-accent-border, #a5b4fc);
  color: var(--bd-accent-text, #2952e6);
  background: #eef2ff;
}

.niq-rate {
  margin-left: auto;
  font-size: 13px;
  color: #64748b;
}

.niq-rate strong {
  color: #3c66ff;
}

.niq-report-layout {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 16px;
}

.niq-side {
  border: 1px solid #eef2f7;
  border-radius: 12px;
  padding: 12px;
  background: #fff;
  height: fit-content;
}

.niq-side-head {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 8px;
}

.niq-side-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  color: #475569;
  cursor: pointer;
}

.niq-side-item.is-active,
.niq-side-item:hover {
  background: #eef2ff;
  color: #2952e6;
}

.niq-table-wrap {
  overflow: auto;
  border: 1px solid #eef2f7;
  border-radius: 12px;
  background: #fff;
}

.niq-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.niq-table th,
.niq-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #f1f5f9;
  text-align: left;
  vertical-align: middle;
  color: #334155;
}

.niq-table th {
  background: #f8fafc;
  color: #64748b;
  font-weight: 600;
  white-space: nowrap;
}

.niq-table-sm th,
.niq-table-sm td {
  padding: 8px 10px;
}

.niq-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.niq-tags span {
  background: #f1f5f9;
  color: #64748b;
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 11px;
}

.niq-st-ok {
  color: #0f172a;
  font-weight: 600;
}

.niq-st-no {
  color: #3c66ff;
  font-weight: 600;
}

.niq-st-run {
  color: #d97706;
  font-weight: 600;
}

/* detail */
.niq-detail-top {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 16px;
  margin: 14px 0;
}

.niq-detail-note {
  display: flex;
  gap: 14px;
  background: #fff;
  border: 1px solid #eef2f7;
  border-radius: 12px;
  padding: 16px;
}

.niq-detail-note h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.niq-detail-author {
  background: #fff;
  border: 1px solid #eef2f7;
  border-radius: 12px;
  padding: 16px;
}

.niq-author-name {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 8px;
}

.niq-detail-links {
  margin-top: 8px;
}

.niq-detail-links a {
  color: #6366f1;
  font-size: 13px;
  margin-right: 12px;
}

.niq-kpi-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.niq-kpi-row > div {
  background: #f8fafc;
  border-radius: 8px;
  padding: 12px;
  text-align: center;
}

.niq-kpi-row span {
  display: block;
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 4px;
}

.niq-kpi-row strong {
  font-size: 18px;
  color: #0f172a;
}

.niq-kw-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.niq-kw-panel h4 {
  margin: 0 0 8px;
  font-size: 14px;
}

.niq-tip {
  margin: 0 0 12px;
  font-size: 12px;
}

/* modal */
.niq-modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.niq-modal {
  width: min(560px, 100%);
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2);
  max-height: 90vh;
  overflow: auto;
}

.niq-modal-lg {
  width: min(820px, 100%);
}

.niq-modal-sm {
  width: min(420px, 100%);
}

.niq-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid #eef2f7;
}

.niq-modal-head h3 {
  margin: 0;
  font-size: 16px;
}

.niq-modal-head button {
  border: 0;
  background: none;
  font-size: 22px;
  line-height: 1;
  color: #94a3b8;
  cursor: pointer;
}

.niq-modal-body {
  padding: 16px 18px;
}

.niq-modal-foot {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  padding: 12px 18px 16px;
  border-top: 1px solid #eef2f7;
}

.niq-modal-foot .niq-link {
  margin-right: auto;
}

.niq-foot-right {
  display: flex;
  gap: 10px;
}

.niq-step {
  margin-bottom: 18px;
}

.niq-step h4 {
  margin: 0 0 10px;
  font-size: 14px;
}

.niq-ol {
  margin: 0 0 12px;
  padding-left: 18px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.7;
}

.niq-tpl-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #475569;
}

.niq-tpl-icon {
  font-size: 22px;
}

.niq-upload {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed #93c5fd;
  border-radius: 10px;
  padding: 36px 16px;
  color: #2563eb;
  cursor: pointer;
  background: #f8fbff;
  font-size: 14px;
}

.niq-upload:hover {
  background: #eff6ff;
}

.niq-fav-toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}

.niq-char {
  text-align: right;
  font-size: 12px;
  color: #94a3b8;
  margin-top: 4px;
}

@media (max-width: 900px) {
  .niq-add-grid {
    grid-template-columns: 1fr;
  }
  .niq-report-layout,
  .niq-detail-top,
  .niq-kw-grid,
  .niq-kpi-row {
    grid-template-columns: 1fr;
  }
}
