/* static/css/meta-ads-security.css — 메타 보안 설정 "조회 전용" 화면(#metaAdsView .mads-root) 전용 CSS.
   이슈 #38 2단계-3. ads(메타 소재 라이브 자동화) 원본 VIEW-SECURITY를 조회 표시만 복제한다
   (설정 변경/토글/삭제/즉시실행 컨트롤은 없음 → 스위치·입력·저장 버튼 스타일 자체가 없다).
   meta-ads.js(.mad-*)와 동일하게 전역 토큰(common.css) 기반, 클래스는 전부 mads- 프리픽스로 스코프. */

#metaAdsView .mads-root { font-size: 14px; }

#metaAdsView .mads-back {
  background: none; border: none; color: var(--muted); font-size: 13px; font-weight: 600;
  cursor: pointer; padding: 6px 0; margin-bottom: 10px; display: inline-flex; align-items: center; gap: 4px;
}
#metaAdsView .mads-back:hover { color: var(--brand-ink); }

#metaAdsView .mads-root h2 { font-size: 18px; font-weight: 700; color: var(--text); margin: 0 0 6px; display: flex; align-items: center; gap: 10px; }
#metaAdsView .mads-root h3 { font-size: 14.5px; font-weight: 700; color: var(--text); margin: 0 0 4px; }
#metaAdsView .mads-readonly-badge {
  font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: var(--radius-pill);
  background: var(--sage-tint); color: var(--brand-ink); vertical-align: middle;
}
#metaAdsView .mads-note { font-size: 12.5px; color: var(--muted); margin: 0 0 18px; }
#metaAdsView .mads-sub { font-size: 12px; color: var(--muted); }

/* ═══════ 카드 ═══════ */
#metaAdsView .mads-card {
  background: var(--surface); border-radius: var(--radius, 18px); box-shadow: var(--shadow-card);
  padding: 20px 22px; margin-bottom: 16px;
}
#metaAdsView .mads-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
#metaAdsView .mads-card-head h3 { margin: 0; }

#metaAdsView .mads-refresh-btn { font-size: 12.5px; padding: 6px 14px; height: auto; }

/* ═══════ 상태 배지 ═══════ */
#metaAdsView .mads-status-badge {
  font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: var(--radius-pill);
  background: var(--line); color: var(--muted);
}
#metaAdsView .mads-status-badge.is-on { background: var(--pos-bg); color: var(--pos); }
#metaAdsView .mads-status-badge.is-off { background: var(--neg-bg); color: var(--neg); }

/* ═══════ 통계 2열 ═══════ */
#metaAdsView .mads-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
#metaAdsView .mads-stat { background: var(--thead-bg); border-radius: var(--radius-md, 12px); padding: 12px 14px; }
#metaAdsView .mads-stat-label { font-size: 11.5px; color: var(--muted); margin-bottom: 4px; }
#metaAdsView .mads-stat-value { font-size: 14px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
#metaAdsView .mads-hint { font-size: 11.5px; color: var(--muted); margin-top: 12px; line-height: 1.5; }

/* ═══════ 화이트리스트 칩 ═══════ */
#metaAdsView .mads-chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
#metaAdsView .mads-chip {
  font-size: 12.5px; font-weight: 600; padding: 6px 14px; border-radius: var(--radius-pill);
  background: var(--thead-bg); color: var(--text-2); border: 1px solid var(--line);
}

/* ═══════ 목록(픽셀 도메인·가드 룰 공용) ═══════ */
#metaAdsView .mads-list { display: flex; flex-direction: column; }
#metaAdsView .mads-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 4px; border-bottom: 1px solid var(--line);
}
#metaAdsView .mads-row:last-child { border-bottom: none; }
#metaAdsView .mads-row-left { display: flex; align-items: center; gap: 10px; }
#metaAdsView .mads-row-right { display: flex; align-items: center; gap: 12px; }
#metaAdsView .mads-row-name { font-size: 13.5px; font-weight: 600; color: var(--text); }
#metaAdsView .mads-row-name.is-bad { color: var(--neg); font-weight: 700; }
#metaAdsView .mads-row-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
#metaAdsView .mads-row-count { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
#metaAdsView .mads-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
#metaAdsView .mads-dot.is-ok { background: var(--pos); }
#metaAdsView .mads-dot.is-bad { background: var(--neg); }

#metaAdsView .mads-tag {
  font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: var(--radius-pill);
  background: var(--line); color: var(--muted); white-space: nowrap;
}
#metaAdsView .mads-tag.is-ok { background: var(--pos-bg); color: var(--pos); }
#metaAdsView .mads-tag.is-bad { background: var(--neg-bg); color: var(--neg); }
#metaAdsView .mads-tag.is-warn { background: #FBF4E6; color: #8A5A00; }
#metaAdsView .mads-tag.is-info { background: var(--sage-tint); color: var(--brand-ink); }
#metaAdsView .mads-tag.is-off { background: var(--line); color: var(--muted); }

#metaAdsView .mads-empty { color: var(--muted); font-size: 13px; padding: 14px 0; text-align: center; }
#metaAdsView .mads-empty.is-error { color: var(--neg); }

/* ═══════ 로그 필터바 ═══════ */
#metaAdsView .mads-filterbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
#metaAdsView .mads-filter-btn {
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-pill);
  padding: 6px 14px; font-size: 12.5px; font-weight: 600; color: var(--text-2); cursor: pointer;
  transition: background-color .12s, border-color .12s, color .12s;
}
#metaAdsView .mads-filter-btn:hover { border-color: var(--brand); }
#metaAdsView .mads-filter-btn.is-active { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ═══════ 로그 표 ═══════ */
#metaAdsView .mads-log-table { display: flex; flex-direction: column; }
#metaAdsView .mads-log-row {
  display: grid; grid-template-columns: 150px 90px 1fr 70px; gap: 10px; align-items: center;
  padding: 10px 4px; border-bottom: 1px solid var(--line); font-size: 12.5px;
}
#metaAdsView .mads-log-row.mads-log-head {
  font-size: 11.5px; font-weight: 700; color: var(--muted); border-bottom: 2px solid var(--line-strong);
}
#metaAdsView .mads-log-time { color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; }
#metaAdsView .mads-log-content { word-break: break-all; color: var(--text-2); }

@media (max-width: 640px) {
  #metaAdsView .mads-grid2 { grid-template-columns: 1fr; }
  #metaAdsView .mads-log-row { grid-template-columns: 1fr; gap: 4px; }
}
