/* ---- Account Nurture - Polished Minimalist Redesign ---- */

.an-mode .tool-hero {
  display: none;
}

.an-mode .tool-detail-head {
  display: none;
}

.an-mode {
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
  backdrop-filter: none;
}

.an-root {
  width: 100%;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow-x: hidden;
}

.an-root,
.an-root * {
  box-sizing: border-box;
}

.an-back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-bottom: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
}

.an-back-link:hover {
  background: #f1f5f9;
  color: #334155;
}

.an-back-link:active {
  background: #e2e8f0;
}

.an-back-link svg {
  width: 18px;
  height: 18px;
  color: #6366f1;
}

.an-page {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.an-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
}

.an-card--header {
  gap: 12px;
}

.an-header,
.an-section-head,
.an-console-header,
.an-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.an-header-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: #ede9fe;
  color: #6366f1;
  flex-shrink: 0;
}

.an-header-icon svg {
  width: 16px;
  height: 16px;
}

.an-header-copy {
  flex: 1;
  min-width: 0;
}

.an-header-eyebrow,
.an-section-tag {
  margin: 0 0 4px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
}

.an-header-title,
.an-section-title,
.an-modal-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #1e293b;
}

.an-chips {
  display: flex;
  gap: 8px;
}

.an-chip,
.an-mode-chip,
.an-param-toggle,
.an-inline-btn,
.an-btn-restore,
.an-btn-confirm,
.an-btn-start,
.an-btn-stop,
.an-keyword-add,
.an-keyword-input-btn,
.an-comment-add-btn,
.an-comment-input-btn,
.an-modal-close {
  font: inherit;
}

.an-chip,
.an-mode-chip {
  flex: 1;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.an-mode-chip {
  min-height: 36px;
  font-size: 0.76rem;
}

.an-chip:hover,
.an-mode-chip:hover {
  background: #f1f5f9;
  color: #334155;
}

.an-chip.active {
  border-color: #6366f1;
  background: #6366f1;
  color: #fff;
}

.an-mode-chip.active {
  border-color: #6366f1;
  background: #eef2ff;
  color: #4f46e5;
}

.an-chip:disabled,
.an-mode-chip:disabled,
.an-btn-start:disabled,
.an-btn-stop:disabled,
.an-param-toggle:disabled,
.an-inline-btn:disabled,
.an-keyword-add:disabled,
.an-keyword-input-btn:disabled,
.an-comment-add-btn:disabled,
.an-comment-input-btn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.an-param-grid,
.an-freq-grid,
.an-counter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.an-param-card,
.an-freq-card,
.an-comment-list,
.an-log-box {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
}

.an-param-card,
.an-freq-card {
  padding: 14px;
}

.an-param-card.is-expanded {
  grid-column: 1 / -1;
}

.an-param-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.an-param-label,
.an-freq-label,
.an-editor-label,
.an-btn-hint,
.an-log-empty,
.an-comment-empty,
.an-empty {
  font-size: 0.74rem;
  line-height: 1.6;
  color: #64748b;
}

.an-param-label,
.an-freq-label,
.an-editor-label {
  margin: 0;
  font-weight: 600;
}

.an-param-value,
.an-editor-val,
.an-comment-summary strong,
.an-counter-val {
  margin: 4px 0 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: #1e293b;
}

.an-param-toggle,
.an-inline-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  color: #475569;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.an-param-toggle:hover,
.an-inline-btn:hover {
  background: #f8fafc;
  color: #334155;
}

.an-editor {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

.an-editor-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.an-editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.an-slider {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: #dbe2f0;
  outline: none;
  appearance: none;
}

.an-slider::-webkit-slider-thumb {
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #6366f1;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.24);
  cursor: pointer;
}

.an-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #6366f1;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.24);
  cursor: pointer;
}

.an-editor-actions,
.an-console-btns,
.an-keyword-input-wrap,
.an-comment-input-wrap {
  display: flex;
  gap: 8px;
}

.an-btn-restore,
.an-btn-confirm,
.an-btn-start,
.an-btn-stop,
.an-keyword-input-btn,
.an-comment-input-btn {
  flex: 1;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.an-btn-restore,
.an-btn-stop {
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
}

.an-btn-confirm,
.an-btn-start,
.an-keyword-input-btn,
.an-comment-input-btn {
  border: 0;
  background: #6366f1;
  color: #fff;
}

.an-btn-confirm:hover,
.an-btn-start:hover,
.an-keyword-input-btn:hover,
.an-comment-input-btn:hover {
  opacity: 0.92;
}

.an-freq-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.an-freq-input,
.an-keyword-input,
.an-comment-input {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  color: #334155;
  font: inherit;
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

.an-freq-input:focus,
.an-keyword-input:focus,
.an-comment-input:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.an-keywords-area,
.an-comment-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.an-keyword-tag,
.an-comment-preview span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef2ff;
  color: #4f46e5;
  font-size: 0.74rem;
  font-weight: 700;
}

.an-keyword-remove,
.an-comment-del {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.14);
  color: inherit;
  font-size: 0.75rem;
  cursor: pointer;
}

.an-keyword-add,
.an-comment-add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px dashed #c7d2fe;
  border-radius: 10px;
  background: #f8fafc;
  color: #4f46e5;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
}

.an-keyword-add:hover,
.an-comment-add-btn:hover {
  background: #eef2ff;
}

.an-comment-summary {
  display: flex;
  align-items: center;
  gap: 10px;
}

.an-comment-summary span {
  font-size: 0.76rem;
  color: #64748b;
}

.an-console-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.an-console-status.running {
  background: #ecfdf3;
  color: #15803d;
}

.an-console-status.idle {
  background: #eef2ff;
  color: #4f46e5;
}

.an-counter-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  justify-content: center;
  min-height: 78px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
}

.an-counter-item span {
  font-size: 0.74rem;
  color: #64748b;
}

.an-counter-val {
  margin: 0;
}

.an-counter-val.liked {
  color: #2563eb;
}

.an-counter-val.followed {
  color: #7c3aed;
}

.an-counter-val.collected {
  color: #d97706;
}

.an-log-box {
  max-height: 260px;
  overflow: auto;
  padding: 12px;
}

.an-log-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 0;
  border-bottom: 1px solid #e2e8f0;
}

.an-log-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.an-log-item span {
  font-size: 0.7rem;
  color: #94a3b8;
}

.an-log-item strong {
  font-size: 0.78rem;
  line-height: 1.55;
  color: #334155;
  font-weight: 600;
}

.an-log-empty,
.an-comment-empty,
.an-empty {
  padding: 18px 14px;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
  text-align: center;
}

.an-btn-hint {
  margin-top: -2px;
}

.an-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  background: rgba(15, 23, 42, 0.36);
  backdrop-filter: blur(2px);
}

.an-modal {
  width: min(100%, 430px);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
}

.an-modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  color: #64748b;
  font-size: 1rem;
  cursor: pointer;
}

.an-modal-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.an-comment-list {
  overflow: hidden;
}

.an-comment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.8rem;
  font-weight: 700;
  color: #334155;
}

.an-comment-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid #e2e8f0;
}

.an-comment-item:last-child {
  border-bottom: 0;
}

.an-comment-text {
  flex: 1;
  min-width: 0;
  font-size: 0.78rem;
  line-height: 1.6;
  color: #334155;
}

@media (max-width: 640px) {
  .an-card {
    padding: 14px;
  }

  .an-chips,
  .an-editor-actions,
  .an-console-btns,
  .an-keyword-input-wrap,
  .an-comment-input-wrap {
    flex-direction: column;
  }

  .an-param-grid,
  .an-freq-grid,
  .an-counter-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .an-header,
  .an-section-head,
  .an-console-header,
  .an-modal-header,
  .an-param-top,
  .an-comment-header,
  .an-comment-item {
    flex-direction: column;
    align-items: flex-start;
  }
}
