:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: #172b3a;
  background: #f3f6f8;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
}

.page-shell {
  width: min(100% - 32px, 760px);
  margin: 0 auto;
  padding: 56px 0 28px;
}

.brand {
  margin-bottom: 28px;
}

.eyebrow {
  color: #486b80;
  font-size: 0.76rem;
  font-weight: 750;
  letter-spacing: 0.13em;
}

h1 {
  margin: 8px 0;
  font-size: clamp(2rem, 7vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.brand-description,
.muted {
  color: #536675;
  line-height: 1.6;
}

.access-card {
  padding: clamp(22px, 5vw, 36px);
  background: #fff;
  border: 1px solid #dce4e9;
  border-radius: 16px;
  box-shadow: 0 12px 36px rgb(23 43 58 / 6%);
}

h2 {
  margin-top: 0;
  font-size: 1.45rem;
}

form {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

label {
  margin-top: 8px;
  font-weight: 650;
  font-size: 0.94rem;
}

input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid #bccbd4;
  border-radius: 8px;
  background: #fff;
  color: inherit;
  font: inherit;
}

input:focus-visible,
button:focus-visible {
  outline: 3px solid #8cbde0;
  outline-offset: 2px;
}

button {
  min-height: 48px;
  margin-top: 12px;
  border: 0;
  border-radius: 8px;
  background: #173f58;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.status {
  min-height: 1.5em;
  margin: 4px 0;
  color: #536675;
  font-size: 0.92rem;
}

.invite-note {
  margin: 24px 0 0;
  padding-top: 18px;
  border-top: 1px solid #e5ebef;
  color: #536675;
  font-size: 0.9rem;
  line-height: 1.5;
}

footer {
  margin-top: 24px;
  color: #617380;
  font-size: 0.82rem;
  line-height: 1.6;
}

@media (max-width: 480px) {
  .page-shell {
    padding-top: 32px;
  }
}

/* Ensure the HTML hidden attribute wins over layout rules such as form { display: grid }. */
[hidden] {
  display: none !important;
}


/* PAID DASHBOARD STYLES */
.paid-dashboard {
  width: 100%;
  min-width: 0;
  margin-top: 24px;
  color: #172b3a;
  font-size: 0.95rem;
  line-height: 1.5;
}
.paid-dashboard *,
.paid-dashboard *::before,
.paid-dashboard *::after {
  box-sizing: border-box;
}
.paid-dashboard .hidden {
  display: none !important;
}
.paid-dashboard h2,
.paid-dashboard h3,
.paid-dashboard h4,
.paid-dashboard p {
  margin-top: 0;
}
.paid-dashboard .hero {
  padding: 22px;
  border: 1px solid #dce6ec;
  border-radius: 14px;
  background: #f5f8fa;
}
.paid-dashboard .hero-label {
  margin-bottom: 8px;
  color: #47677b;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}
.paid-dashboard .hero h2 {
  margin-bottom: 10px;
  font-size: clamp(1.35rem, 5vw, 1.9rem);
  line-height: 1.2;
}
.paid-dashboard .hero p {
  margin-bottom: 0;
  color: #536675;
}
.paid-dashboard .stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 26px;
}
.paid-dashboard .stat-card {
  display: flex;
  min-width: 0;
  min-height: 90px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 5px;
  padding: 14px;
  border: 1px solid #dce5eb;
  border-radius: 12px;
  background: #fff;
  color: #172b3a;
  text-align: left;
  white-space: normal;
  cursor: pointer;
}
.paid-dashboard .stat-card.action {
  border-left: 4px solid #b44a3d;
}
.paid-dashboard .stat-card.investigate {
  border-left: 4px solid #bd8424;
}
.paid-dashboard .stat-card.low {
  border-left: 4px solid #62866b;
}
.paid-dashboard .stat-number {
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1.1;
}
.paid-dashboard .stat-label {
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.025em;
}
.paid-dashboard .section-heading,
.paid-dashboard .page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 20px 0 12px;
}
.paid-dashboard .section-heading h3,
.paid-dashboard .page-header h2 {
  margin: 0;
}
.paid-dashboard button {
  max-width: 100%;
  white-space: normal;
}
.paid-dashboard .text-button,
.paid-dashboard .back-button {
  padding: 8px 11px;
  border: 1px solid #ccd9e1;
  border-radius: 8px;
  background: #fff;
  color: #234d65;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.paid-dashboard .alert-list {
  display: grid;
  gap: 10px;
  min-width: 0;
}
.paid-dashboard .alert-card {
  min-width: 0;
  padding: 15px;
  border: 1px solid #dce5eb;
  border-radius: 11px;
  background: #fff;
  color: #172b3a;
  font: inherit;
  text-align: left;
  cursor: pointer;
  overflow-wrap: anywhere;
}
.paid-dashboard .alert-card h3,
.paid-dashboard .alert-card h4 {
  margin-bottom: 6px;
}
.paid-dashboard .alert-card p {
  margin-bottom: 6px;
}
.paid-dashboard .alert-card p:last-child {
  margin-bottom: 0;
}
.paid-dashboard .search-box {
  margin: 14px 0;
}
.paid-dashboard .search-box input,
.paid-dashboard .filter-row select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 10px;
  border: 1px solid #cbd8e0;
  border-radius: 8px;
  background: #fff;
  color: #172b3a;
  font: inherit;
}
.paid-dashboard .filter-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 14px;
}
.paid-dashboard .result-count,
.paid-dashboard .muted {
  margin: 8px 0 12px;
  color: #536675;
  font-size: 0.88rem;
}
.paid-dashboard .detail-section {
  margin: 14px 0;
  padding: 16px;
  border: 1px solid #dce5eb;
  border-radius: 10px;
  background: #fff;
  overflow-wrap: anywhere;
}
.paid-dashboard .detail-section h3 {
  margin-bottom: 10px;
  font-size: 1rem;
}
.paid-dashboard .detail-section p:last-child {
  margin-bottom: 0;
}
.paid-dashboard .disclaimer,
.paid-dashboard .dashboard-disclaimer {
  color: #536675;
  font-size: 0.85rem;
  line-height: 1.6;
}
.paid-dashboard .dashboard-disclaimer {
  margin: 24px 0 4px;
  padding-top: 14px;
  border-top: 1px solid #dce5eb;
}
@media (min-width: 620px) {
  .paid-dashboard .stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .paid-dashboard .filter-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 360px) {
  .paid-dashboard .hero {
    padding: 16px;
  }
  .paid-dashboard .stats-grid {
    gap: 7px;
  }
  .paid-dashboard .stat-card {
    padding: 10px;
  }
  .paid-dashboard .filter-row {
    grid-template-columns: minmax(0, 1fr);
  }
}


/* SNF TRANSITION WATCH VISUAL REFRESH V1 */
.page-shell:has(.paid-dashboard) { width: min(100% - 32px, 1120px); }
.paid-dashboard {
  --intel-navy: #163447;
  --intel-teal: #087f8c;
  --intel-border: #d8e4e9;
  color: #1b3342;
  line-height: 1.6;
}
.paid-dashboard h2,
.paid-dashboard h3,
.paid-dashboard h4 { color: var(--intel-navy); letter-spacing: -0.02em; }
.paid-dashboard .hero {
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid #d4e4e9;
  border-radius: 16px;
  background: linear-gradient(125deg, #edf7f8, #f8fbfc 65%, #e9f3f6);
  box-shadow: 0 5px 18px rgb(22 52 71 / 5%);
}
.paid-dashboard .hero-label { color: #076873; letter-spacing: .12em; }
.paid-dashboard .stats-grid { gap: 12px; margin-bottom: 28px; }
.paid-dashboard .stat-card {
  min-height: 104px;
  gap: 8px;
  padding: 15px;
  border: 1px solid var(--intel-border);
  border-top: 3px solid #8da5b1;
  border-radius: 12px;
  background: #fff;
  color: var(--intel-navy);
  box-shadow: 0 3px 10px rgb(22 52 71 / 4%);
}
.paid-dashboard .stat-card.action { border-top-color: #b84f49; }
.paid-dashboard .stat-card.investigate { border-top-color: #bd8424; }
.paid-dashboard .stat-card.low { border-top-color: #43836c; }
.paid-dashboard .stat-card.total { border-top-color: var(--intel-teal); }
.paid-dashboard .stat-number { color: var(--intel-navy); font-variant-numeric: tabular-nums; }
.paid-dashboard .stat-label { color: #5a6e7b; line-height: 1.4; }
.paid-dashboard .section-heading,
.paid-dashboard .page-header {
  margin-top: 28px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e2eaee;
}
.paid-dashboard .text-button,
.paid-dashboard .back-button {
  min-height: 40px;
  border: 1px solid #c8dce2;
  border-radius: 9px;
  background: #f5fafb;
  color: #176675;
}
.paid-dashboard .alert-list { gap: 12px; }
.paid-dashboard .alert-card {
  padding: 16px;
  border: 1px solid var(--intel-border);
  border-left: 4px solid #8da5b1;
  border-radius: 12px;
  background: #fff;
  color: #294352;
  box-shadow: 0 3px 12px rgb(22 52 71 / 4%);
  line-height: 1.6;
}
.paid-dashboard .alert-card h3,
.paid-dashboard .alert-card h4 { color: var(--intel-navy); }
.paid-dashboard .search-box input,
.paid-dashboard .filter-row select {
  min-height: 46px;
  border: 1px solid #cbdbe2;
  border-radius: 9px;
}
.paid-dashboard .detail-section {
  padding: clamp(16px, 3vw, 22px);
  border: 1px solid var(--intel-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 3px 12px rgb(22 52 71 / 3%);
}
.paid-dashboard .dashboard-disclaimer {
  margin-top: 28px;
  padding-top: 15px;
  border-top: 1px solid #dbe6ea;
  line-height: 1.7;
}
.paid-dashboard button:focus-visible,
.paid-dashboard input:focus-visible,
.paid-dashboard select:focus-visible {
  outline: 3px solid rgb(8 127 140 / 28%);
  outline-offset: 3px;
}
@media (hover: hover) {
  .paid-dashboard .stat-card:hover,
  .paid-dashboard .alert-card:hover {
    border-color: #b6d3da;
    box-shadow: 0 6px 16px rgb(22 52 71 / 8%);
  }
}
@media (max-width: 620px) {
  .page-shell:has(.paid-dashboard) { width: min(100% - 24px, 1120px); }
  .paid-dashboard .stats-grid { gap: 9px; }
  .paid-dashboard .stat-card { min-height: 94px; padding: 12px; }
  .paid-dashboard .alert-card { padding: 14px; }
}
@media (max-width: 360px) {
  .paid-dashboard .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .paid-dashboard .filter-row { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .paid-dashboard * { scroll-behavior: auto; }
}


/* SNF SIGNAL CARD COLORS V1 */
/* Colors reflect workflow classifications, not probabilities. */
.paid-dashboard .alert-card:has(.badge-A_ACTION) {
  border-color: #e8b8b8;
  border-left: 5px solid #c44747;
  background: #fff7f6;
}
.paid-dashboard .alert-card:has(.badge-B_INVESTIGATE) {
  border-color: #ead5a2;
  border-left: 5px solid #bd8517;
  background: #fffbf1;
}
.paid-dashboard .alert-card:has(.badge-C_LOW_PRIORITY) {
  border-color: #b9ddca;
  border-left: 5px solid #32845b;
  background: #f5fbf7;
}
