/* AEO FAQ Generator — design system */

:root {
  --aeo-primary:    #4F8EF7;
  --aeo-primary-50: #EEF4FF;
  --aeo-purple:     #7B5CF6;

  --aeo-bg:           #F1F1F1;
  --aeo-card:         #FFFFFF;
  --aeo-border:       #E3E3E3;
  --aeo-border-strong:#ADADAD;

  --aeo-ink:    #303030;
  --aeo-ink-2:  #616161;
  --aeo-muted:  #616161;
  --aeo-muted-2:#8A8A8A;

  --aeo-green:      #008060;
  --aeo-green-bg:   #CDFEE1;
  --aeo-green-text: #0C5132;

  --aeo-amber-bg:   #FFEABD;
  --aeo-amber-text: #6A4304;
}

/* ─── Dashboard layout ─── */

.dash-main { display: flex; flex-direction: column; gap: 20px; }
.dash-side  { display: flex; flex-direction: column; gap: 16px; }

.dash-welcome {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 20px;
  background: linear-gradient(135deg, #EEF4FF 0%, #F0EBFC 100%);
  border: 1px solid #D5E6FF; border-radius: 12px;
}
.dash-welcome__icon {
  flex-shrink: 0; width: 44px; height: 44px;
  background: #fff; border: 1px solid #E5E7EB;
  border-radius: 10px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.dash-welcome__body { flex: 1; min-width: 0; }
.dash-welcome__title {
  font-size: 15px; font-weight: 700; color: #1F2937; margin: 0 0 4px;
}
.dash-welcome__row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dash-welcome__store { font-size: 12px; color: #6B7280; }
.dash-welcome__plan {
  font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 99px;
  background: var(--aeo-primary-50); color: var(--aeo-primary);
}

.dash-stat-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}
.dash-stat {
  background: var(--aeo-card); border: 1px solid var(--aeo-border);
  border-radius: 12px; padding: 18px 20px;
  box-shadow: 0 1px 0 rgba(0,0,0,.03);
}
.dash-stat__label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--aeo-muted); margin: 0 0 10px;
  display: block;
}
.dash-stat__num {
  font-size: 32px; font-weight: 700; letter-spacing: -0.02em; line-height: 1;
  color: var(--aeo-ink); font-variant-numeric: tabular-nums;
}
.dash-stat__sub { font-size: 12px; color: var(--aeo-muted); margin-top: 6px; }

/* Setup guide */
.setup-guide {
  background: var(--aeo-card); border: 1px solid var(--aeo-border);
  border-radius: 12px; overflow: hidden;
}
.setup-guide__head {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px; border-bottom: 1px solid var(--aeo-border);
}
.setup-guide__title { font-size: 13px; font-weight: 600; color: var(--aeo-ink); flex: 1; }
.setup-guide__pill {
  font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 99px;
  background: var(--aeo-primary-50); color: var(--aeo-primary);
}
.setup-step {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--aeo-border);
}
.setup-step:last-child { border-bottom: none; }
.setup-step__circle {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  border: 2px dashed var(--aeo-border-strong); display: inline-block;
}
.setup-step__label { font-size: 13px; font-weight: 500; color: var(--aeo-ink); flex: 1; }
.setup-step--done .setup-step__label {
  color: var(--aeo-muted); text-decoration: line-through;
  text-decoration-color: var(--aeo-border-strong);
}
.setup-step__action { margin-left: auto; }

/* AEO tip card */
.aeo-tip {
  display: flex; gap: 10px;
  padding: 12px 14px;
  background: var(--aeo-primary-50); border: 1px solid #D5E6FF;
  border-radius: 12px; font-size: 12px; color: #1E40AF; line-height: 1.55;
}
.aeo-tip__icon { flex-shrink: 0; margin-top: 1px; color: var(--aeo-primary); }

/* Aside quick-actions card */
.qs-card {
  background: var(--aeo-card); border: 1px solid var(--aeo-border);
  border-radius: 12px; overflow: hidden;
}
.qs-card__head {
  padding: 11px 14px; border-bottom: 1px solid var(--aeo-border);
  font-size: 11px; font-weight: 600; color: var(--aeo-muted);
  text-transform: uppercase; letter-spacing: 0.05em;
}
.qs-card__body { padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.qs-action {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 8px;
  border: 1px solid var(--aeo-border); background: var(--aeo-bg);
  text-decoration: none; color: var(--aeo-ink);
  cursor: pointer; font-family: inherit; font-size: inherit; text-align: left;
  width: 100%;
  transition: border-color .12s, background .12s;
}
.qs-action:hover { border-color: var(--aeo-border-strong); background: #E8E8E8; }
.qs-action__icon {
  width: 30px; height: 30px; border-radius: 7px; flex-shrink: 0;
  background: var(--aeo-primary-50); color: var(--aeo-primary);
  display: flex; align-items: center; justify-content: center;
}
.qs-action__label { font-size: 12px; font-weight: 600; color: var(--aeo-ink); display: block; }
.qs-action__sub   { font-size: 11px; color: var(--aeo-muted); display: block; }

/* ─── Product IndexTable ─── */

.aeo-index {
  background: var(--aeo-card); border: 1px solid var(--aeo-border);
  border-radius: 12px; overflow: hidden;
}
.aeo-index__toolbar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; border-bottom: 1px solid var(--aeo-border); flex-wrap: wrap;
}
.aeo-index__search { flex: 1; min-width: 180px; }

.aeo-filter-select {
  height: 32px; padding: 0 8px; border-radius: 6px;
  border: 1px solid var(--aeo-border-strong);
  background: #fff; color: var(--aeo-ink); font-size: 13px;
  font-family: inherit; cursor: pointer; flex-shrink: 0; outline: none;
}
.aeo-filter-select:focus {
  border-color: var(--aeo-primary);
  box-shadow: 0 0 0 2px rgba(79,142,247,.18);
}

.aeo-index__refresh {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; flex-shrink: 0;
  border: 1px solid var(--aeo-border-strong); border-radius: 6px;
  background: none; color: var(--aeo-muted); cursor: pointer;
  transition: border-color .12s, color .12s, background .12s;
}
.aeo-index__refresh:hover {
  border-color: var(--aeo-ink-2); color: var(--aeo-ink); background: var(--aeo-bg);
}

.aeo-spin { animation: aeo-rotate .7s linear infinite; }
@keyframes aeo-rotate { to { transform: rotate(360deg); } }

.aeo-index__count {
  margin-left: auto; font-size: 12px; color: var(--aeo-muted);
  white-space: nowrap; flex-shrink: 0;
}
.aeo-index__count b { font-weight: 600; color: var(--aeo-ink); }

.aeo-index__head {
  display: grid; padding: 8px 16px;
  background: var(--aeo-bg); border-bottom: 1px solid var(--aeo-border);
  font-size: 11px; font-weight: 600; color: var(--aeo-muted);
  letter-spacing: 0.02em; text-transform: uppercase; align-items: center;
}
.aeo-index__row {
  display: grid; padding: 10px 16px;
  align-items: center; border-bottom: 1px solid var(--aeo-border);
  transition: background .1s;
}
.aeo-index__row:last-child { border-bottom: none; }
.aeo-index__row:hover { background: #FAFAFA; }

.aeo-index--products .aeo-index__head,
.aeo-index--products .aeo-index__row {
  grid-template-columns: 36px minmax(0, 2.5fr) 110px 110px 130px;
}

/* Checkbox */
.aeo-checkbox {
  width: 16px; height: 16px; cursor: pointer; accent-color: var(--aeo-primary);
  flex-shrink: 0;
}

/* Bulk progress bar */
.aeo-bulk-progress {
  padding: 10px 16px; border-bottom: 1px solid var(--aeo-border);
  background: var(--aeo-primary-50);
}
.aeo-bulk-progress__label {
  font-size: 12px; font-weight: 600; color: var(--aeo-primary); margin-bottom: 6px;
}
.aeo-bulk-progress__track {
  height: 6px; border-radius: 99px; background: #D5E6FF; overflow: hidden;
}
.aeo-bulk-progress__fill {
  height: 100%; border-radius: 99px;
  background: var(--aeo-primary); transition: width 0.4s ease;
}

.aeo-index__name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.aeo-index__name-text { min-width: 0; }
.aeo-index__name-title {
  font-size: 13px; font-weight: 600; color: var(--aeo-ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-decoration: none; display: block;
}
.aeo-index__name-title:hover { text-decoration: underline; color: var(--aeo-primary); }
.aeo-index__name-sub {
  font-size: 11px; color: var(--aeo-muted); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.aeo-thumb {
  width: 40px; height: 40px; flex-shrink: 0;
  border-radius: 6px; object-fit: cover;
  border: 1px solid var(--aeo-border); background: var(--aeo-bg); display: block;
}
.aeo-thumb-ph {
  width: 40px; height: 40px; flex-shrink: 0;
  border-radius: 6px; border: 1px solid var(--aeo-border); background: var(--aeo-bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: var(--aeo-muted-2); letter-spacing: -0.02em;
}

.aeo-status-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 99px;
}
.aeo-status-badge--active { background: var(--aeo-green-bg); color: var(--aeo-green-text); }
.aeo-status-badge--draft  { background: #EBEBEB; color: var(--aeo-muted); }
.aeo-status-badge__dot {
  width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; background: currentColor;
}

.aeo-faq-count {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 99px;
}
.aeo-faq-count--has  { background: var(--aeo-green-bg); color: var(--aeo-green-text); }
.aeo-faq-count--none { background: #EBEBEB; color: var(--aeo-muted-2); }

.aeo-index__empty {
  padding: 64px 24px; display: flex; flex-direction: column;
  align-items: center; text-align: center;
}
.aeo-index__empty-icon { color: var(--aeo-muted-2); margin-bottom: 14px; }
.aeo-index__empty-title { font-size: 15px; font-weight: 600; color: var(--aeo-ink); margin: 0 0 6px; }
.aeo-index__empty-body  { font-size: 13px; color: var(--aeo-muted); margin: 0; max-width: 38ch; }

.aeo-index__footer {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 16px; border-top: 1px solid var(--aeo-border);
  font-size: 12px; color: var(--aeo-muted); gap: 12px; flex-wrap: wrap;
}
.aeo-pagination { display: flex; align-items: center; gap: 8px; }
.aeo-pagination__btn {
  display: inline-flex; align-items: center; gap: 4px;
  border: 1px solid var(--aeo-border); border-radius: 6px;
  padding: 4px 10px; font-size: 12px; font-weight: 500; color: var(--aeo-ink);
  background: none; cursor: pointer; font-family: inherit;
  transition: background .1s, border-color .1s;
}
.aeo-pagination__btn:hover:not(:disabled) {
  background: var(--aeo-bg); border-color: var(--aeo-border-strong);
}
.aeo-pagination__btn:disabled { opacity: .4; cursor: default; }
.aeo-pagination__info {
  font-size: 12px; color: var(--aeo-muted); min-width: 70px; text-align: center;
}
