/* ---------------------------------------------------------
   TenantXM Network Test
   Base palette borrowed from XPS Solutions brand (brand/xps-solutions/brand.md).
   Branding is isolated to this file - swap here if a TenantXM kit arrives.
   --------------------------------------------------------- */

:root {
  --brand-primary:  #0756A1;
  --brand-accent:   #661BAA;
  --brand-ink:      #122B4E;
  --brand-gradient: linear-gradient(90deg, #1B87C8 0%, #661BAA 100%);

  --good:   #1a7f4b;
  --good-bg:#e7f5ec;
  --warn:   #b8860b;
  --warn-bg:#fbf3df;
  --bad:    #b4232a;
  --bad-bg: #fae8e9;
  --skip:   #5a5a5a;
  --skip-bg:#eef0f4;

  --text:        #1a1a1a;
  --text-muted:  #5a5a5a;
  --surface:     #ffffff;
  --surface-alt: #f6f7fb;
  --border:      #e3e6ee;
  --shadow-sm:   0 1px 2px rgba(7, 86, 161, 0.06);
  --shadow-md:   0 4px 12px rgba(7, 86, 161, 0.08);
  --radius:      8px;
  --max-width:   1000px;
  --font-sans:   Arial, "Helvetica Neue", Helvetica, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  color: var(--text);
  background: var(--surface);
  font-family: var(--font-sans);
  font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* ---- Header ---- */
.site-header {
  background: var(--surface);
  border-bottom: 3px solid transparent;
  border-image: var(--brand-gradient) 1;
}
.header-inner { display: flex; align-items: center; height: 64px; }
.logo { display: flex; align-items: center; gap: 14px; color: var(--brand-ink); font-weight: 600; }
.logo-mark {
  font-weight: 700; font-size: 20px; letter-spacing: 0.04em;
  background: var(--brand-gradient);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.logo-divider { width: 1px; height: 24px; background: var(--border); }
.logo-tagline { font-size: 15px; font-weight: 500; letter-spacing: 0.02em; color: var(--brand-ink); }

/* ---- Main ---- */
.main-content { padding: 40px 24px 72px; min-height: calc(100vh - 64px - 80px); }
.hero h1 { margin: 0 0 8px; font-size: 32px; line-height: 1.15; color: var(--brand-primary); }
.hero-sub { margin: 0 0 8px; color: var(--text-muted); font-size: 17px; max-width: 720px; }

/* ---- Run panel ---- */
.run-panel {
  margin: 28px 0 8px; padding: 20px 22px;
  background: var(--surface-alt); border: 1px solid var(--border); border-radius: var(--radius);
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px;
}
.site-field { display: flex; flex-direction: column; gap: 6px; flex: 1 1 280px; }
.site-field-label { font-size: 13px; color: var(--text-muted); }
.site-input {
  width: 100%; padding: 11px 14px; font-size: 16px; font-family: inherit;
  border: 1.5px solid var(--border); border-radius: var(--radius); background: var(--surface);
}
.site-input:focus { outline: none; border-color: var(--brand-primary); box-shadow: 0 0 0 3px rgba(7,86,161,0.15); }
.run-btn {
  padding: 12px 28px; font-size: 16px; font-weight: 600; font-family: inherit;
  color: #fff; background: var(--brand-primary); border: none; border-radius: var(--radius);
  cursor: pointer; transition: background 0.15s, transform 0.1s;
}
.run-btn:hover:not(:disabled) { background: var(--brand-accent); }
.run-btn:active:not(:disabled) { transform: translateY(1px); }
.run-btn:disabled { opacity: 0.6; cursor: default; }
.run-status { width: 100%; margin: 4px 0 0; font-size: 14px; color: var(--text-muted); }

/* ---- Overall verdict banner ---- */
.verdict {
  margin: 24px 0 8px; padding: 18px 20px; border-radius: var(--radius);
  border: 1px solid var(--border); font-size: 17px; font-weight: 600;
}
.verdict.good { background: var(--good-bg); border-color: var(--good); color: var(--good); }
.verdict.warn { background: var(--warn-bg); border-color: var(--warn); color: var(--warn); }
.verdict.bad  { background: var(--bad-bg);  border-color: var(--bad);  color: var(--bad);  }
.verdict-sub { display: block; margin-top: 6px; font-size: 14px; font-weight: 400; color: var(--text); }

/* ---- Result cards ---- */
.results {
  margin-top: 16px; display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px;
}
.result-card {
  padding: 18px 20px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow-sm);
}
.result-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.result-head h2 { margin: 0; font-size: 16px; color: var(--brand-ink); }
.result-metric { margin: 12px 0 4px; font-size: 26px; font-weight: 700; color: var(--brand-primary); }
.result-detail { margin: 0; font-size: 13.5px; color: var(--text-muted); line-height: 1.45; }

/* ---- Status badges ---- */
.badge {
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  padding: 3px 10px; border-radius: 999px; white-space: nowrap;
}
.badge-good    { background: var(--good-bg); color: var(--good); }
.badge-warn    { background: var(--warn-bg); color: var(--warn); }
.badge-bad     { background: var(--bad-bg);  color: var(--bad);  }
.badge-skip    { background: var(--skip-bg); color: var(--skip); }
.badge-pending { background: var(--skip-bg); color: var(--skip); }
.badge-running { background: #e7eefb; color: var(--brand-primary); }

/* ---- Raw details ---- */
.raw-wrap { margin-top: 28px; }
.raw-wrap summary { cursor: pointer; font-size: 14px; color: var(--brand-primary); font-weight: 600; }
.raw-json {
  margin-top: 12px; padding: 14px; background: var(--brand-ink); color: #d7e3f4;
  border-radius: var(--radius); font-size: 12.5px; line-height: 1.5;
  overflow-x: auto; white-space: pre; font-family: Consolas, "Courier New", monospace;
}
.copy-btn {
  margin-top: 10px; padding: 8px 16px; font-size: 14px; font-family: inherit;
  color: var(--brand-primary); background: var(--surface);
  border: 1.5px solid var(--brand-primary); border-radius: var(--radius); cursor: pointer;
}
.copy-btn:hover { background: var(--brand-primary); color: #fff; }

/* ---- Footer ---- */
.site-footer {
  background: var(--surface-alt); border-top: 1px solid var(--border);
  padding: 24px 0; color: var(--text-muted); font-size: 13px;
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
  .hero h1 { font-size: 26px; }
  .main-content { padding: 28px 20px 56px; }
  .run-btn { width: 100%; }
}
