:root {
  --ink: #14213d;
  --muted: #5f6f86;
  --line: #dbe3ec;
  --panel: #ffffff;
  --page: #f3f6f9;
  --nav: #12233f;
  --nav-2: #194f72;
  --accent: #0077b6;
  --accent-soft: #dff3ff;
  --good: #176b3a;
  --good-bg: #dff5e8;
  --warn: #8a5700;
  --warn-bg: #fff1c7;
  --bad: #a1252d;
  --bad-bg: #fde2e3;
  --shadow: 0 10px 28px rgba(20, 33, 61, .08);
}

html { min-height: 100%; }
body {
  min-height: 100vh;
  background: var(--page);
  color: var(--ink);
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
.container-fluid.wide { max-width: 1440px; padding-left: 28px; padding-right: 28px; }
.app-nav {
  background: linear-gradient(112deg, var(--nav), var(--nav-2));
  min-height: 66px;
  box-shadow: 0 2px 14px rgba(9, 27, 52, .25);
}
.navbar-brand { gap: .65rem; letter-spacing: -.01em; }
.brand-mark {
  align-items: center;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 11px;
  display: inline-flex;
  height: 38px;
  justify-content: center;
  width: 38px;
}
.app-nav .nav-link { border-radius: 7px; margin-left: .15rem; }
.app-nav .active .nav-link, .app-nav .nav-link:hover { background: rgba(255,255,255,.11); }
.app-footer {
  background: #e8eef4;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .875rem;
  margin-top: 3rem;
  padding: 1.3rem 0;
}
.hero {
  background:
    radial-gradient(circle at 90% 20%, rgba(0, 180, 216, .15), transparent 35%),
    linear-gradient(145deg, #eef8ff, #fff);
  border: 1px solid #d5e7f3;
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
  padding: 2.8rem;
  position: relative;
}
.hero h1 { font-weight: 750; letter-spacing: -.035em; }
.hero .lead { color: var(--muted); max-width: 760px; }
.eyebrow {
  color: var(--accent);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.card {
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(20, 33, 61, .045);
}
.card-header {
  background: #f8fafc;
  border-bottom-color: var(--line);
  border-radius: 12px 12px 0 0 !important;
}
.metric-card .metric-value { font-size: 2rem; font-weight: 750; letter-spacing: -.04em; }
.metric-card .metric-label { color: var(--muted); font-size: .82rem; font-weight: 650; text-transform: uppercase; }
.metric-icon {
  align-items: center;
  background: var(--accent-soft);
  border-radius: 10px;
  color: var(--accent);
  display: inline-flex;
  height: 42px;
  justify-content: center;
  width: 42px;
}
.section-title { font-size: 1.1rem; font-weight: 700; }
.lookup-tile { color: inherit; transition: transform .15s ease, box-shadow .15s ease; }
.lookup-tile:hover { box-shadow: var(--shadow); color: inherit; text-decoration: none; transform: translateY(-2px); }
.stat-badge {
  border-radius: 999px;
  display: inline-block;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .02em;
  padding: .3rem .65rem;
  text-transform: capitalize;
  white-space: nowrap;
}
.stat-badge.success { background: var(--good-bg); color: var(--good); }
.stat-badge.warning { background: var(--warn-bg); color: var(--warn); }
.stat-badge.danger { background: var(--bad-bg); color: var(--bad); }
.stat-badge.secondary { background: #e8edf2; color: #516172; }
.data-table { margin-bottom: 0; }
.data-table thead th {
  border-top: 0;
  color: var(--muted);
  font-size: .74rem;
  letter-spacing: .055em;
  text-transform: uppercase;
}
.data-table tbody td { vertical-align: middle; }
.data-table tbody tr:hover { background: #f8fbfd; }
.filter-bar {
  align-items: flex-end;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  padding: 1rem;
}
.filter-bar .form-group { margin-bottom: 0; min-width: 150px; }
.field-label {
  color: var(--muted);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  margin-bottom: .2rem;
  text-transform: uppercase;
}
.field-value { font-size: 1rem; font-weight: 550; overflow-wrap: anywhere; }
.code-panel {
  background: #111c2d;
  border-radius: 10px;
  color: #d9e8f6;
  font-size: .83rem;
  max-height: 560px;
  overflow: auto;
  padding: 1rem;
  white-space: pre-wrap;
}
.signal-list { list-style: none; margin: 0; padding: 0; }
.signal-list li { border-bottom: 1px solid var(--line); padding: .65rem 0; }
.signal-list li:last-child { border-bottom: 0; }
.empty-state { color: var(--muted); padding: 3rem 1rem; text-align: center; }
.empty-state i { font-size: 1.7rem; margin-bottom: .6rem; }
.skeleton {
  animation: shimmer 1.25s infinite linear;
  background: linear-gradient(90deg, #edf1f5 20%, #f8fafb 40%, #edf1f5 60%);
  background-size: 200% 100%;
  border-radius: 5px;
  height: 18px;
}
@keyframes shimmer { to { background-position: -200% 0; } }
.assurance-callout {
  background: #fff8e4;
  border: 1px solid #f1d487;
  border-left: 5px solid #d69800;
  border-radius: 9px;
  color: #5e4708;
  padding: 1rem;
}
.source-official { color: var(--good); font-weight: 650; }
.source-community { color: var(--warn); font-weight: 650; }
code { color: #075985; }

@media (max-width: 767.98px) {
  .container-fluid.wide { padding-left: 16px; padding-right: 16px; }
  .hero { padding: 1.6rem; }
  .hero h1 { font-size: 2rem; }
  .filter-bar { align-items: stretch; display: block; }
  .filter-bar .form-group { margin-bottom: .7rem; }
  .app-footer .wide { gap: .5rem; }
}
