﻿:root {
  --bg: #eef7fb;
  --bg-deep: #dceff6;
  --panel: rgba(255, 255, 255, 0.82);
  --panel-border: rgba(34, 92, 117, 0.12);
  --text: #16313d;
  --muted: #5e7a87;
  --accent: #0e9dc4;
  --accent-strong: #067191;
  --critical: #c2573a;
  --warning: #e08d12;
  --drop: #2f7bbd;
  --manifest: #d8b100;
  --success: #2d8b69;
  --shadow: 0 18px 45px rgba(10, 72, 94, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Trebuchet MS", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(14, 157, 196, 0.17), transparent 30%),
    radial-gradient(circle at top right, rgba(6, 113, 145, 0.18), transparent 28%),
    linear-gradient(180deg, #f4fbff 0%, var(--bg) 55%, var(--bg-deep) 100%);
  min-height: 100vh;
}

.page-shell {
  max-width: 1440px;
  margin: 0 auto;
  padding: 32px 20px 56px;
}

.hero {
  display: grid;
  grid-template-columns: 1.6fr 0.78fr;
  gap: 24px;
  margin-bottom: 28px;
}

.hero-copy,
.glass-card,
.panel {
  background: var(--panel);
  backdrop-filter: blur(14px);
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 34px;
  border-radius: 28px;
  min-height: 280px;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.78) 46%, rgba(255, 255, 255, 0.44) 72%, rgba(255, 255, 255, 0.16) 100%),
    url("/hero-water-drops.svg") center/cover no-repeat;
}

.hero-copy::after {
  content: "";
  position: absolute;
  inset: auto -40px -70px auto;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(14, 157, 196, 0.28), rgba(14, 157, 196, 0));
}

.eyebrow,
.mini-label {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
  color: var(--accent-strong);
  font-weight: 700;
}

h1 {
  font-size: clamp(2.4rem, 5vw, 4.5rem);
  line-height: 0.95;
  margin: 18px 0 18px;
}

.lede,
.section-copy {
  max-width: 62ch;
  color: var(--muted);
  font-size: 1.04rem;
  margin: 8px 0 0;
}

.glass-card,
.panel {
  border-radius: 24px;
}

.glass-card,
.panel {
  padding: 22px;
}

textarea,
input,
button,
select {
  font: inherit;
}

textarea,
input[type="search"],
select {
  width: 100%;
  border: 1px solid rgba(22, 49, 61, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.8);
  padding: 14px 16px;
  color: var(--text);
}

textarea {
  min-height: 92px;
  max-height: 140px;
  resize: vertical;
  margin: 12px 0 12px;
}

.hero-panel .glass-card {
  padding: 20px;
}

.hero-actions,
.audit-filters,
.form-actions,
.inline-meta {
  display: flex;
  gap: 12px;
}

button {
  border: none;
  border-radius: 999px;
  padding: 12px 18px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: white;
  font-weight: 700;
  cursor: pointer;
}

button:disabled,
textarea:disabled,
input:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

button.secondary {
  background: white;
  color: var(--accent-strong);
  border: 1px solid rgba(6, 113, 145, 0.18);
}

.status-line {
  min-height: 20px;
  color: var(--muted);
  margin: 12px 0 0;
}

.kpi-grid,
.content-grid,
.audit-grid {
  display: grid;
  gap: 20px;
}

.kpi-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-bottom: 20px;
}

.content-grid,
.audit-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 20px;
}

.stack-panel {
  display: grid;
  gap: 20px;
}

.lower-grid {
  align-items: start;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.panel-head-stack {
  align-items: flex-start;
}

.panel-head h2 {
  margin: 0;
  font-size: 1.15rem;
}

.pill,
.status-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.83rem;
  font-weight: 700;
}

.alert-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.8rem;
  font-weight: 700;
}

.alert-pill.shift-major {
  background: rgba(194, 87, 58, 0.14);
  color: var(--critical);
}

.alert-pill.manifest,
.chart-dot.manifest,
.chart-line.manifest {
  background: rgba(216, 177, 0, 0.2);
  color: #9b7f00;
}

.alert-pill.drop {
  background: rgba(47, 123, 189, 0.14);
  color: var(--drop);
}

.alert-pill.shift-minor {
  background: rgba(212, 151, 43, 0.16);
  color: var(--warning);
}

.alert-pill.other {
  background: rgba(14, 157, 196, 0.12);
  color: var(--accent-strong);
}

.pill {
  background: rgba(14, 157, 196, 0.12);
  color: var(--accent-strong);
}

.pill.muted {
  background: rgba(94, 122, 135, 0.12);
  color: var(--muted);
}

.status-chip.OPEN {
  background: rgba(6, 113, 145, 0.12);
  color: var(--accent-strong);
}

.status-chip.IN_REVIEW {
  background: rgba(14, 157, 196, 0.14);
  color: var(--accent-strong);
}

.status-chip.RESOLVED {
  background: rgba(45, 139, 105, 0.14);
  color: var(--success);
}

.status-chip.FALSE_POSITIVE {
  background: rgba(94, 122, 135, 0.14);
  color: var(--muted);
}

.kpi-card {
  padding: 20px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(240, 249, 252, 0.9));
  border: 1px solid rgba(14, 157, 196, 0.08);
  box-shadow: var(--shadow);
}

.kpi-card h3,
.kpi-card p {
  margin: 0;
}

.kpi-card h3 {
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 10px;
}

.kpi-card p {
  font-size: 2rem;
  font-weight: 800;
}

.list,
.audit-list,
.audit-summary {
  display: grid;
  gap: 12px;
}

.demo-panel {
  margin-bottom: 20px;
}

.list-item,
.audit-card,
.summary-card {
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(22, 49, 61, 0.08);
  padding: 14px 16px;
}

.list-item strong,
.audit-card strong {
  display: block;
  margin-bottom: 6px;
}

.meta,
.muted-text {
  color: var(--muted);
  font-size: 0.9rem;
}

.severity-critical {
  border-left: 5px solid var(--critical);
}

.severity-warning {
  border-left: 5px solid var(--warning);
}

.type-shift-major {
  border-left: 5px solid var(--critical);
}

.type-manifest {
  border-left: 5px solid var(--manifest);
}

.type-shift-minor {
  border-left: 5px solid var(--warning);
}

.type-drop {
  border-left: 5px solid var(--drop);
}

.audit-card {
  cursor: pointer;
}

.audit-card.active {
  outline: 2px solid rgba(14, 157, 196, 0.4);
  background: rgba(233, 249, 253, 0.95);
}

.audit-card-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}

.audit-card-tags {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.audit-summary {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 14px;
}

.summary-card span {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  margin-bottom: 6px;
}

.summary-card strong {
  font-size: 1.5rem;
}

.chart-wrap {
  display: grid;
  gap: 12px;
}

.chart-legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.chart-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.chart-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
}

.chart-dot.shift-major {
  background: var(--critical);
}

.chart-dot.shift-minor {
  background: var(--warning);
}

.chart-dot.manifest {
  background: var(--manifest);
}

.chart-dot.drop {
  background: var(--drop);
}

.chart-svg {
  width: 100%;
  height: 260px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(236,247,252,0.88));
  border: 1px solid rgba(22, 49, 61, 0.08);
}

.chart-axis {
  stroke: rgba(22, 49, 61, 0.14);
  stroke-width: 1;
}

.chart-grid {
  stroke: rgba(22, 49, 61, 0.07);
  stroke-width: 1;
}

.chart-line {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-line.shift-major {
  stroke: var(--critical);
}

.chart-line.shift-minor {
  stroke: var(--warning);
}

.chart-line.manifest {
  stroke: var(--manifest);
}

.chart-line.drop {
  stroke: var(--drop);
}

.chart-label {
  fill: var(--muted);
  font-size: 12px;
}

.chart-subnote {
  color: var(--muted);
  font-size: 0.9rem;
}

.table-wrap {
  overflow: auto;
}

.table-actions {
  margin-top: 14px;
  display: flex;
  justify-content: center;
}

.modal-shell[hidden] {
  display: none;
}

.modal-shell {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(14, 35, 46, 0.35);
  backdrop-filter: blur(6px);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(960px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 24px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow);
}

.auth-card {
  width: min(520px, calc(100vw - 32px));
}

.modal-close {
  min-width: 110px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid rgba(22, 49, 61, 0.08);
  white-space: nowrap;
}

tr[data-clickable="true"] {
  cursor: pointer;
}

tr[data-clickable="true"]:hover {
  background: rgba(14, 157, 196, 0.06);
}

.detail-empty {
  color: var(--muted);
  min-height: 180px;
  display: grid;
  place-items: center;
}

.detail-grid,
.audit-form {
  display: grid;
  gap: 16px;
}

.detail-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.mini-stat {
  padding: 14px;
  border-radius: 18px;
  background: rgba(14, 157, 196, 0.08);
}

.mini-stat strong {
  display: block;
  font-size: 1.4rem;
  margin-top: 4px;
}

.audit-form textarea {
  min-height: 140px;
  margin: 0;
}

@media (max-width: 1180px) {
  .hero,
  .content-grid,
  .kpi-grid,
  .audit-grid,
  .audit-summary,
  .detail-stats {
    grid-template-columns: 1fr;
  }

  .panel-head,
  .panel-head-stack,
  .audit-filters,
  .hero-actions,
  .form-actions,
  .inline-meta {
    flex-direction: column;
  }
}
