@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@500;700;800&family=Unbounded:wght@500;700&display=swap");

:root {
  --bg: #f7efe1;
  --bg-soft: rgba(255, 251, 243, 0.76);
  --card: rgba(255, 255, 255, 0.74);
  --card-strong: rgba(255, 255, 255, 0.92);
  --ink: #17211f;
  --muted: #65716f;
  --line: rgba(23, 33, 31, 0.1);
  --brand: #0f766e;
  --brand-2: #e08f2f;
  --danger: #c24132;
  --good: #16805c;
  --shadow: 0 22px 80px rgba(40, 53, 47, 0.18);
  --radius: 26px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  color: var(--ink);
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  padding: max(18px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  font-family: "Manrope", "Trebuchet MS", sans-serif;
  background:
    radial-gradient(circle at 12% 8%, rgba(224, 143, 47, 0.34), transparent 30%),
    radial-gradient(circle at 86% 12%, rgba(15, 118, 110, 0.28), transparent 34%),
    linear-gradient(135deg, #faf0dd 0%, #eaf4ef 55%, #f8e8d4 100%);
}

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

button {
  cursor: pointer;
}

.aurora {
  position: fixed;
  inset: auto -20vw -30vh -20vw;
  height: 48vh;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(15, 118, 110, 0.18), rgba(224, 143, 47, 0.24));
  filter: blur(42px);
  transform: rotate(-4deg);
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1180px, 100%);
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(255, 247, 233, 0.52));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--brand);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: -0.04em;
}

h1 {
  font-family: "Unbounded", "Manrope", sans-serif;
  font-size: clamp(34px, 9vw, 78px);
  line-height: 0.94;
}

h2 {
  font-size: clamp(23px, 6vw, 38px);
}

h3 {
  font-size: 18px;
}

.subtitle {
  max-width: 760px;
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.identity {
  display: flex;
  align-items: center;
  gap: 12px;
  align-self: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.58);
}

.avatar {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 18px;
  color: white;
  font-family: "Unbounded", sans-serif;
  font-size: 13px;
  background: linear-gradient(135deg, var(--brand), #173d3a);
}

.identity-name {
  font-weight: 800;
}

.identity-meta {
  color: var(--muted);
  font-size: 13px;
}

.notice {
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(194, 65, 50, 0.22);
  border-radius: 20px;
  color: #7f291f;
  background: rgba(255, 237, 231, 0.86);
}

.hidden {
  display: none !important;
}

.tabs {
  display: flex;
  gap: 8px;
  margin: 18px 0;
  padding: 8px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.48);
  backdrop-filter: blur(16px);
}

.tab {
  flex: 0 0 auto;
  border: 0;
  border-radius: 17px;
  padding: 11px 15px;
  color: var(--muted);
  background: transparent;
  font-weight: 800;
}

.tab.active {
  color: white;
  background: var(--ink);
}

.tab-panel {
  display: none;
  animation: rise 220ms ease-out;
}

.tab-panel.active {
  display: block;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.grid {
  display: grid;
  gap: 14px;
}

.grid.two,
.grid.three,
.grid.four {
  grid-template-columns: 1fr;
}

.card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 12px 42px rgba(23, 33, 31, 0.08);
  backdrop-filter: blur(16px);
}

.card.strong {
  background: var(--card-strong);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0 12px;
}

.metric {
  min-height: 118px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.metric span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.metric strong {
  font-family: "Unbounded", sans-serif;
  font-size: clamp(28px, 9vw, 46px);
  letter-spacing: -0.06em;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
}

.field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.field label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(23, 33, 31, 0.14);
  border-radius: 17px;
  padding: 12px 13px;
  color: var(--ink);
  outline: none;
  background: rgba(255, 255, 255, 0.72);
}

textarea {
  min-height: 94px;
  resize: vertical;
}

select[multiple] {
  min-height: 170px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border: 0;
  border-radius: 17px;
  padding: 11px 15px;
  color: white;
  background: var(--brand);
  font-weight: 900;
  text-decoration: none;
}

.button.secondary {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
}

.button.warning {
  background: var(--brand-2);
}

.button.danger {
  background: var(--danger);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.5);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid rgba(23, 33, 31, 0.08);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

tr:last-child td {
  border-bottom: 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--brand);
  background: rgba(15, 118, 110, 0.11);
  font-size: 12px;
  font-weight: 900;
}

.pill.good {
  color: var(--good);
  background: rgba(22, 128, 92, 0.12);
}

.pill.bad {
  color: var(--danger);
  background: rgba(194, 65, 50, 0.12);
}

.muted {
  color: var(--muted);
}

.list {
  display: grid;
  gap: 10px;
}

.list-item {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: rgba(255, 255, 255, 0.56);
}

.split {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
}

.chart {
  display: grid;
  gap: 7px;
}

.bar-row {
  display: grid;
  grid-template-columns: 82px 1fr 42px;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.bar-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(23, 33, 31, 0.09);
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
}

.empty {
  padding: 18px;
  border: 1px dashed rgba(23, 33, 31, 0.24);
  border-radius: 20px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.38);
}

.mono {
  font-family: "SFMono-Regular", Consolas, monospace;
}

.toast {
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 10;
  padding: 13px 15px;
  border-radius: 18px;
  color: white;
  background: var(--ink);
  box-shadow: var(--shadow);
  animation: rise 180ms ease-out;
}

@media (min-width: 720px) {
  body {
    padding: 28px;
  }

  .hero {
    grid-template-columns: 1fr auto;
    padding: 30px;
  }

  .grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .grid.four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
