/* SCN Ads — minimal design system */
* { box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Roboto, sans-serif;
  margin: 0;
  background: #f5f6fa;
  color: #1a1a1a;
  line-height: 1.5;
}
a { color: #2962ff; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Topbar */
.topbar {
  display: flex;
  align-items: center;
  background: #1a1a2e;
  color: #fff;
  padding: 12px 24px;
  gap: 24px;
}
.topbar .brand a { color: #fff; font-weight: 700; font-size: 18px; }
.nav-main { display: flex; gap: 16px; flex: 1; }
.nav-main a { color: #cdd1e0; padding: 4px 8px; border-radius: 4px; }
.nav-main a:hover { background: #2d2f4a; color: #fff; text-decoration: none; }
.user-area { display: flex; gap: 12px; align-items: center; color: #cdd1e0; font-size: 14px; }
.btn-link { color: #ff5252; }

/* Layout */
.main-content { max-width: 1400px; margin: 0 auto; padding: 24px; }
.container { background: #fff; padding: 24px; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.04); margin-bottom: 24px; }
.footer { text-align: center; padding: 24px; color: #888; font-size: 13px; }
.footer a { color: #888; }

/* Auth */
.auth-body { background: #1a1a2e; min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.auth-card { background: #fff; padding: 40px; border-radius: 12px; min-width: 360px; box-shadow: 0 8px 32px rgba(0,0,0,0.3); }
.auth-card h1 { margin: 0 0 24px; text-align: center; }
.auth-card label { display: block; margin: 16px 0; }
.auth-card input { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 4px; font-size: 15px; margin-top: 4px; }
.auth-footer { font-size: 12px; color: #888; margin-top: 16px; text-align: center; }

/* Buttons */
.btn { display: inline-block; padding: 8px 16px; border: 1px solid #ddd; background: #fff; border-radius: 4px; cursor: pointer; font-size: 14px; }
.btn:hover { background: #f0f0f0; }
.btn.primary { background: #2962ff; color: #fff; border-color: #2962ff; }
.btn.primary:hover { background: #0039cb; }
.btn.small { padding: 4px 10px; font-size: 12px; }

/* Stats grid */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px; margin: 24px 0; }
.stat-card { background: #f8f9fb; padding: 20px; text-align: center; border-radius: 6px; border: 1px solid #e5e7eb; }
.stat-card .num { display: block; font-size: 32px; font-weight: 700; color: #1a1a2e; }
.stat-card .lbl { color: #666; font-size: 13px; margin-top: 4px; }

/* Tables */
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 16px 0; }
.data-table th, .data-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #eee; }
.data-table th { background: #f8f9fb; font-weight: 600; }
.data-table tr:hover { background: #fafbff; }
.data-table .mono { font-family: SFMono-Regular, Consolas, monospace; font-size: 12px; color: #555; }

/* Forms */
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px; background: #f8f9fb; border-radius: 6px; margin: 12px 0; }
.inline-form input, .inline-form select { padding: 6px 10px; border: 1px solid #ddd; border-radius: 4px; font-size: 13px; }
.inline-form label { display: flex; align-items: center; gap: 4px; font-size: 13px; }

/* Alerts / Status */
.alert { padding: 10px 14px; border-radius: 4px; margin: 12px 0; }
.alert.error { background: #ffe5e5; color: #c62828; border-left: 3px solid #c62828; }
.error-msg { background: #ffe5e5; padding: 12px; border-radius: 4px; white-space: pre-wrap; word-break: break-all; }
.muted { color: #888; }
.good { color: #2e7d32; font-weight: 600; }
.bad { color: #c62828; font-weight: 600; }
.status-active, .status-ACTIVE { color: #2e7d32; }
.status-pending, .status-pending_smoke, .status-pending_review { color: #f57c00; }
.status-restricted, .status-disabled, .status-PAUSED { color: #c62828; }
.prio-P0 { background: #ffe5e5; }
.prio-P1 { background: #fff8e1; }

/* Onboard sections */
.onboard-section { margin: 24px 0; padding-top: 16px; border-top: 1px solid #eee; }
.onboard-section h2 { margin: 0 0 12px; }
.onboard-section details { margin: 12px 0; }
.onboard-section summary { cursor: pointer; padding: 8px; background: #eef; border-radius: 4px; user-select: none; }

/* Next steps */
.next-steps { margin-top: 32px; padding: 16px; background: #eef5ff; border-left: 3px solid #2962ff; border-radius: 4px; }
.next-steps h3 { margin: 0 0 8px; }
.next-steps ol { margin: 0; padding-left: 20px; }

/* Actions row */
.actions { display: flex; gap: 12px; margin: 16px 0; }

/* AI assistant */
.ai-answer { margin: 24px 0; }
.ai-result { background: #f8f9fb; padding: 16px; border-radius: 6px; margin: 12px 0; border-left: 3px solid #2962ff; }
.ai-result h3 { margin: 0 0 8px; color: #1a1a2e; }
.ai-result pre { white-space: pre-wrap; word-break: break-word; font-size: 13px; }
