/* RT Internal Dashboard — matches DESIGN.md tokens.
   Poppins font, teal accent #0D7B8A, navy text #1A1A2E.
   No gradients, no glassmorphism. Tables use 2px teal bottom border on headers. */

:root {
  --rt-accent: #0D7B8A;
  --rt-accent-bg: #E8F5F7;
  --rt-text: #1A1A2E;
  --rt-muted: #6B7280;
  --rt-border: #E5E7EB;
  --rt-bg: #FFFFFF;
  --rt-bg-alt: #F9FAFB;
  --rt-danger: #B91C1C;
  --rt-warning: #B45309;
  --rt-success: #15803D;
  --rt-radius-sm: 3px;
  --rt-radius-md: 6px;
  --rt-radius-lg: 8px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  background: var(--rt-bg-alt);
  color: var(--rt-text);
  font-size: 14px;
  line-height: 1.5;
}

/* Header */
.rt-header {
  background: var(--rt-bg);
  border-bottom: 1px solid var(--rt-border);
  padding: 16px 0;
}
.rt-header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.rt-header h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.rt-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 12px;
  color: var(--rt-muted);
}
.rt-freshness {
  font-variant-numeric: tabular-nums;
}

/* Pills */
.rt-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.rt-pill-unknown { background: #F3F4F6; color: var(--rt-muted); }
.rt-pill-up      { background: #DCFCE7; color: var(--rt-success); }
.rt-pill-down    { background: #FEE2E2; color: var(--rt-danger); }

/* Banner */
.rt-banner {
  max-width: 1280px;
  margin: 16px auto 0;
  padding: 12px 16px;
  border-radius: var(--rt-radius-md);
  font-size: 13px;
}
.rt-banner.rt-banner-warn {
  background: #FFFBEB;
  color: var(--rt-warning);
  border: 1px solid #FDE68A;
}
.rt-banner.rt-banner-stale {
  background: var(--rt-accent-bg);
  color: var(--rt-accent);
  border: 1px solid #BFE6EC;
}

/* Main */
.rt-main {
  max-width: 1280px;
  margin: 24px auto 60px;
  padding: 0 24px;
}

/* Stats */
.rt-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.rt-stat {
  background: var(--rt-bg);
  border: 1px solid var(--rt-border);
  border-radius: var(--rt-radius-md);
  padding: 16px 18px;
}
.rt-stat-num {
  font-size: 24px;
  font-weight: 700;
  color: var(--rt-text);
  font-variant-numeric: tabular-nums;
}
.rt-stat-lbl {
  font-size: 12px;
  color: var(--rt-muted);
  margin-top: 2px;
}

/* Filters */
.rt-filters {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.rt-filters input[type=search],
.rt-filters select {
  font: inherit;
  padding: 8px 12px;
  border: 1px solid var(--rt-border);
  border-radius: var(--rt-radius-md);
  background: var(--rt-bg);
  color: var(--rt-text);
}
.rt-filters input[type=search] { flex: 1; min-width: 200px; }
.rt-filters input[type=search]:focus,
.rt-filters select:focus { outline: 2px solid var(--rt-accent); outline-offset: -1px; }
.rt-toggle { display: flex; align-items: center; gap: 6px; cursor: pointer; }

/* Loading / error */
.rt-loading,
.rt-error {
  background: var(--rt-bg);
  border: 1px solid var(--rt-border);
  border-radius: var(--rt-radius-md);
  padding: 32px;
  text-align: center;
  color: var(--rt-muted);
}
.rt-error { color: var(--rt-danger); border-color: #FECACA; background: #FEF2F2; }

/* Table */
.rt-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--rt-bg);
  border: 1px solid var(--rt-border);
  border-radius: var(--rt-radius-md);
  overflow: hidden;
}
.rt-table thead th {
  background: var(--rt-bg);
  text-align: left;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--rt-muted);
  padding: 12px 14px;
  border-bottom: 2px solid var(--rt-accent);
}
.rt-table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--rt-border);
  vertical-align: top;
}
.rt-table tbody tr:last-child td { border-bottom: 0; }
.rt-table tbody tr:hover { background: var(--rt-bg-alt); }
.rt-table tbody tr.rt-selected { background: var(--rt-accent-bg); }

.rt-name { font-weight: 500; }
.rt-summary {
  font-size: 13px;
  color: var(--rt-muted);
  max-width: 380px;
}
.rt-summary-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Status badges */
.rt-status {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--rt-radius-sm);
  font-size: 12px;
  font-weight: 500;
}
.rt-status.qualified   { background: #DCFCE7; color: var(--rt-success); }
.rt-status.borderline  { background: #FEF3C7; color: var(--rt-warning); }
.rt-status.unqualified { background: #FEE2E2; color: var(--rt-danger); }
.rt-status.unknown     { background: #F3F4F6; color: var(--rt-muted); }

/* Actions */
.rt-actions { display: flex; gap: 6px; }
.rt-btn {
  font: inherit;
  font-size: 12px;
  padding: 6px 12px;
  border: 1px solid var(--rt-border);
  background: var(--rt-bg);
  color: var(--rt-text);
  border-radius: var(--rt-radius-sm);
  cursor: pointer;
  white-space: nowrap;
}
.rt-btn:hover { border-color: var(--rt-accent); color: var(--rt-accent); }
.rt-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: var(--rt-bg-alt);
}
.rt-btn-primary { background: var(--rt-accent); color: #fff; border-color: var(--rt-accent); }
.rt-btn-primary:hover { background: #095966; border-color: #095966; color: #fff; }

.rt-row-error {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--rt-danger);
}

@media (max-width: 720px) {
  .rt-stats { grid-template-columns: repeat(2, 1fr); }
  .rt-summary { max-width: none; }
}
