:root {
  --bg: #f7f8fb;
  --panel: #ffffff;
  --ink: #121826;
  --muted: #657084;
  --line: #d9dee8;
  --amplify-blue: #1b3fe4;
  --amplify-red: #e4003a;
  --amplify-cyan: #25f4ee;
  --green: #0c8f67;
  --green-soft: #dff7ed;
  --blue: #2158c7;
  --blue-soft: #e8eefc;
  --amber: #b86b00;
  --amber-soft: #fff1d6;
  --red: #b42318;
  --shadow: 0 16px 40px rgba(18, 24, 38, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
}

.brand-mark svg {
  width: 28px;
  height: 28px;
}

.brand h1,
.brand p {
  margin: 0;
}

.brand h1 {
  font-size: 18px;
  line-height: 1.1;
}

.brand p {
  color: var(--muted);
  font-size: 13px;
}

.nav {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav a,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.nav a:hover,
.button:hover {
  transform: translateY(-1px);
  border-color: var(--amplify-blue);
  box-shadow: 0 10px 26px rgba(27, 63, 228, 0.12);
}

.nav a.active,
.button.primary {
  border-color: var(--amplify-blue);
  background: var(--amplify-blue);
  color: #fff;
}

.layout {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.hero-band {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
  gap: 24px;
  align-items: stretch;
  margin-bottom: 24px;
}

.headline {
  padding: 26px 0;
}

.eyebrow {
  color: var(--amplify-blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.headline h2 {
  max-width: 760px;
  margin: 8px 0 10px;
  font-size: 42px;
  line-height: 1.04;
}

.headline p {
  max-width: 660px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.progress-visual {
  min-height: 220px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.ring {
  --pct: 0%;
  display: grid;
  width: 164px;
  height: 164px;
  margin: 0 auto 18px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--amplify-blue) var(--pct), #e8ebf1 0);
}

.ring::before {
  content: "";
  position: absolute;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: #fff;
}

.ring-value {
  position: relative;
  font-size: 30px;
  font-weight: 850;
}

.ring-label {
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.kpi {
  min-height: 106px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.kpi:hover,
.phase-card:hover,
.creator-link:hover {
  transform: translateY(-2px);
  border-color: rgba(27, 63, 228, 0.35);
  box-shadow: 0 14px 34px rgba(27, 63, 228, 0.12);
}

.kpi span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.kpi strong {
  display: block;
  margin-top: 8px;
  font-size: 25px;
  line-height: 1.15;
}

.kpi small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel + .panel {
  margin-top: 18px;
}

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

.panel-header h3 {
  margin: 0;
  font-size: 18px;
}

.panel-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.phase-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.phase-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.phase-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.phase-card strong {
  display: block;
  margin-top: 6px;
  font-size: 28px;
}

.phase-card dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.phase-card dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.phase-card dd {
  margin: 4px 0 0;
  font-weight: 800;
}

.table-wrap {
  overflow-x: auto;
}

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

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 14px;
  white-space: nowrap;
}

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

td a {
  color: var(--amplify-blue);
  font-weight: 750;
  text-decoration: none;
}

td a:hover {
  color: var(--amplify-red);
  text-decoration: underline;
}

.status {
  display: inline-flex;
  min-width: 82px;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.status.Pendente {
  background: var(--amber-soft);
  color: var(--amber);
}

.status.Batida {
  background: var(--green-soft);
  color: var(--green);
}

.status.Abaixo {
  background: #ffe7e4;
  color: var(--red);
}

.bar {
  position: relative;
  width: 150px;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8ebf1;
}

.bar span {
  display: block;
  width: min(var(--bar), 100%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--amplify-blue), var(--amplify-cyan));
}

.creator-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.creator-link {
  display: block;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.creator-link strong,
.creator-link span {
  display: block;
}

.creator-link span {
  margin-top: 4px;
  color: var(--muted);
}

.auth-box {
  width: min(420px, calc(100vw - 32px));
  margin: 14vh auto;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.auth-box h2 {
  margin: 0 0 8px;
}

.auth-box p {
  margin: 0 0 16px;
  color: var(--muted);
}

.auth-row {
  display: flex;
  gap: 8px;
}

.auth-row input {
  min-width: 0;
  flex: 1;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.loading,
.error {
  display: grid;
  min-height: 100vh;
  place-items: center;
  text-align: center;
  color: var(--muted);
}

.error {
  color: var(--red);
}

@media (max-width: 840px) {
  .topbar,
  .panel-header,
  .hero-band {
    display: block;
  }

  .nav {
    justify-content: flex-start;
    margin-top: 12px;
  }

  .headline h2 {
    font-size: 32px;
  }

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

  .phase-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .headline h2 {
    font-size: 28px;
  }

  .auth-row {
    display: block;
  }

  .auth-row .button {
    width: 100%;
    margin-top: 8px;
  }
}
