:root {
  --paper: #f6f1ea;
  --paper-2: #ece4d8;
  --ink: #2a1818;
  --muted: #7a6a5c;
  --card: #fffaf4;
  --line: #e2d5c4;
  --accent: #6b1d2a;
  --accent-dark: #4e121c;
  --ok: #3d5c47;
  --ok-soft: #dce8df;
  --wait: #c24e27;
  --wait-soft: #f4ddd3;
  --shadow: 0 20px 50px rgba(36, 29, 24, 0.08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: radial-gradient(1200px 500px at 10% -10%, #f7e7d4 0%, transparent 55%), var(--paper);
  color: var(--ink);
  font-family: "Outfit", sans-serif;
}

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.18;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
}

a { color: inherit; text-decoration: none; }

.topbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px 20px;
  width: min(1180px, calc(100% - 56px));
  margin: 22px auto 8px;
  padding: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  overflow: hidden;
  flex-shrink: 0;
  background: #f3ece3;
  box-shadow: inset 0 0 0 1px rgba(107, 29, 42, 0.08);
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 170%;
  object-fit: cover;
  object-position: 50% 4%;
  transform: scale(1.12);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1;
}

.brand-copy strong {
  font-family: "Fraunces", serif;
  font-weight: 620;
  font-size: 1.18rem;
  letter-spacing: -0.03em;
  color: var(--accent);
}

.brand-copy em {
  font-family: "Fraunces", serif;
  font-style: normal;
  font-weight: 500;
  font-size: 0.68rem;
  letter-spacing: 0.32em;
  color: #b89a6a;
  text-transform: uppercase;
}

nav,
.nav-main {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
}

nav a {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--muted);
  white-space: nowrap;
}

nav a.is-active {
  background: #fff;
  color: var(--ink);
}

.top-actions {
  margin-left: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.account-cluster {
  display: flex;
  align-items: center;
  gap: 2px;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  border-radius: 999px;
  cursor: pointer;
}

.icon-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-btn:hover {
  background: #fff;
}

.icon-btn[hidden] {
  display: none;
}

.icon-btn svg[hidden] {
  display: none;
}

.nav-help {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--muted);
  white-space: nowrap;
}

.nav-help.is-active {
  background: #fff;
  color: var(--ink);
}

main {
  padding: 12px 0 48px;
  width: min(1180px, calc(100% - 56px));
  margin: 0 auto;
}

.hero, .card-head, .kpis {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
}

.eyebrow {
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  color: var(--muted);
}

h1 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: clamp(2rem, 4vw, 3.1rem);
  font-weight: 620;
}

.hero-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.money-toggle {
  width: 42px;
  height: 42px;
  color: var(--muted);
}

.money-toggle[aria-pressed="true"] {
  color: var(--accent);
}

html.values-hidden [data-money] {
  color: transparent !important;
  text-shadow: none;
  position: relative;
  user-select: none;
}

html.values-hidden [data-money]::after {
  content: "R$ ••••";
  color: var(--ink);
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  letter-spacing: 0.08em;
}

html.values-hidden .kpi [data-money]::after {
  font-family: "Fraunces", serif;
}

html.values-hidden .proj-end[data-money]::after,
html.values-hidden .ranking [data-money]::after,
html.values-hidden .pay-actions [data-money]::after {
  left: auto;
  right: 0;
}

html.values-hidden .proj-end[data-money]::after {
  color: var(--accent);
}

h2 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: 1.25rem;
}

.muted, .card-head p, .kpi small {
  color: var(--muted);
}

.kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: stretch;
  margin: 28px 0 22px;
}

.kpi {
  flex: 1;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px 20px;
  box-shadow: var(--shadow);
}

.kpi span { color: var(--muted); font-size: 0.9rem; }
.kpi strong {
  display: block;
  margin: 8px 0 4px;
  font-family: "Fraunces", serif;
  font-size: clamp(1.35rem, 1.7vw, 1.85rem);
}
.kpi-ok { background: linear-gradient(180deg, #f3f8f4, var(--card)); }
.kpi-wait { background: linear-gradient(180deg, #fbf1ea, var(--card)); }
.kpi-permuta { background: linear-gradient(180deg, #f6f1f8, var(--card)); }
.kpi-total {
  background: linear-gradient(180deg, #f7efe4, var(--card));
  border-color: #c4a574;
}

.kpi-money {
  position: relative;
  overflow: hidden;
}
.kpi-coins {
  position: absolute;
  right: 8px;
  bottom: 4px;
  width: 78px;
  height: 60px;
  opacity: 0.92;
  pointer-events: none;
  z-index: 0;
}
.kpi-money > span,
.kpi-money > strong,
.kpi-money > small { position: relative; z-index: 1; }
.kpi-coins .coin { transform-origin: center; }
.kpi-coins .coin-a { animation: coin-float 3.4s ease-in-out infinite; }
.kpi-coins .coin-b { animation: coin-float 4s ease-in-out infinite 0.35s; }
.kpi-coins .coin-c { animation: coin-float 3.1s ease-in-out infinite 0.7s; }
@keyframes coin-float {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-4px) rotate(4deg); }
}

.kpi-shine {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(140px 90px at 90% 12%, rgba(255, 232, 170, 0.55), transparent 62%),
    linear-gradient(145deg, #5c1522 0%, #8a2438 48%, #c4a574 130%);
  color: #fffaf2;
  border-color: #d7b57a;
  box-shadow:
    0 18px 40px rgba(107, 29, 42, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
.kpi-shine span,
.kpi-shine small { color: rgba(255, 248, 232, 0.82); }
.kpi-shine strong {
  color: #fff8e8;
  text-shadow: 0 0 22px rgba(255, 220, 140, 0.55);
}
.kpi-shine::before {
  content: "";
  position: absolute;
  inset: -20%;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.38) 50%, transparent 65%);
  transform: translateX(-130%) rotate(8deg);
  animation: shine-sweep 3.8s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}
.kpi-shine > * { position: relative; z-index: 1; }
.shine-sparkle {
  position: absolute;
  top: 12px;
  right: 16px;
  color: #ffe9a8;
  font-size: 1.05rem;
  line-height: 1;
  pointer-events: none;
  animation: sparkle 2.4s ease-in-out infinite;
}
.share-brands {
  margin-top: 10px;
  align-self: flex-start;
  border: 1px solid rgba(255, 233, 168, 0.45);
  background: rgba(255, 248, 232, 0.14);
  color: #fff8e8;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 0.76rem;
  cursor: pointer;
  z-index: 2;
}
.share-brands:hover { background: rgba(255, 248, 232, 0.24); }

.share-sheet { width: min(420px, 94vw); }
.share-preview {
  display: grid;
  place-items: center;
  background: #2a1818;
  border-radius: 18px;
  padding: 12px;
}
.share-preview canvas {
  width: min(220px, 100%);
  height: auto;
  border-radius: 12px;
  background: #3d0e16;
}
@media (max-height: 820px) {
  .share-preview canvas { width: min(168px, 100%); }
}
.share-caption { margin: 0; }
.share-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
@keyframes shine-sweep {
  0%, 50% { transform: translateX(-130%) rotate(8deg); }
  80%, 100% { transform: translateX(130%) rotate(8deg); }
}
@keyframes sparkle {
  0%, 100% { opacity: 0.45; transform: scale(0.9) rotate(-8deg); }
  50% { opacity: 1; transform: scale(1.15) rotate(8deg); }
}
@media (prefers-reduced-motion: reduce) {
  .kpi-shine::before,
  .shine-sparkle,
  .kpi-coins .coin { animation: none; }
}

.kpis-admin {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: stretch;
}

.pill-admin { background: #f3e4e6; color: var(--accent); }
.pill-creator { background: var(--ok-soft); color: var(--ok); }
.pill-plan-active { background: var(--ok-soft); color: var(--ok); }
.pill-plan-trialing { background: var(--wait-soft); color: var(--wait); }
.pill-plan-none,
.pill-plan-canceled,
.pill-plan-cancelled,
.pill-plan-past_due { background: #eee8df; color: var(--muted); }

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(168px, 210px) minmax(0, 0.9fr);
  gap: 18px;
  align-items: stretch;
}

.stack { display: grid; gap: 18px; }

.nicho-rail {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 18px;
  padding: 40px 16px 28px;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(107, 29, 42, 0.06), rgba(196, 165, 116, 0.12)),
    var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.nicho-rail > p {
  margin: 0;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.68rem;
  color: var(--muted);
}

.nicho-rail ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.nicho-rail li { display: grid; gap: 6px; }

.nicho-rail li span {
  font-size: 0.78rem;
  line-height: 1.25;
  color: var(--ink);
}

.nicho-rail li b {
  display: block;
  height: 10px;
  width: 100%;
  border-radius: 999px;
  background: rgba(107, 29, 42, 0.08);
  position: relative;
  overflow: hidden;
}

.nicho-rail li b::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--p, 0%);
  border-radius: inherit;
  background: linear-gradient(90deg, #6b1d2a, #c4a574);
}

.nicho-rail li small {
  color: var(--muted);
  font-size: 0.72rem;
}

.nicho-rail li strong {
  font-size: 0.72rem;
  font-weight: 650;
  color: var(--ink);
  letter-spacing: 0;
}

.nicho-rail em {
  font-style: normal;
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.chart-stack {
  display: grid;
  gap: 18px;
  align-content: start;
  min-width: 0;
}

.chart-card .card-head {
  align-items: start;
  flex-wrap: wrap;
}

.chart-wrap { height: 320px; margin-top: 12px; }
.chart-wrap-line { height: 220px; }

.proj-end {
  font-family: "Fraunces", serif;
  font-size: 1.15rem;
  font-weight: 620;
  color: var(--accent);
  text-align: right;
}

.chart-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.chart-filters button {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 999px;
  padding: 6px 12px;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 560;
  color: var(--muted);
  cursor: pointer;
}

.chart-filters button[aria-pressed="true"] {
  color: #fffaf4;
}

.chart-filters button[data-chart-filter="tudo"][aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
}

.chart-filters button[data-chart-filter="recebido"][aria-pressed="true"] {
  background: #3d5c47;
  border-color: #3d5c47;
}

.chart-filters button[data-chart-filter="a_receber"][aria-pressed="true"] {
  background: #c24e27;
  border-color: #c24e27;
}

.chart-filters button[data-chart-filter="permuta"][aria-pressed="true"] {
  background: #5b3d73;
  border-color: #5b3d73;
}

.ranking, .pay-list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
}

.ranking li, .pay-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.ranking li {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 10px;
  align-items: baseline;
}

.rank-n {
  grid-row: 1 / span 2;
  font-family: "Fraunces", serif;
  color: var(--muted);
}

.rank-name { grid-column: 2; }
.ranking li strong { grid-column: 3; grid-row: 1; justify-self: end; }
.ranking li small {
  grid-column: 2 / 4;
  grid-row: 2;
  color: var(--muted);
}

.ranking li:last-child, .pay-list li:last-child { border-bottom: 0; }

.rank-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 8px;
}

.rank-grid h3 {
  margin: 0;
  font-size: 0.95rem;
  font-family: "Outfit", sans-serif;
  font-weight: 560;
  color: var(--muted);
}

.brands-card { margin-top: 18px; }

.pay-list small, .pay-list .linkish { display: block; }
.pay-actions { text-align: right; }

.mini-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.mini-pager a,
.mini-pager span {
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 560;
  color: var(--muted);
}

.mini-pager a {
  border: 1px solid var(--line);
  background: var(--card);
}

.mini-pager a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.mini-pager a[aria-current="page"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fffaf4;
}

.mini-pager .is-off {
  opacity: 0.35;
}

.btn, select, input, textarea {
  font: inherit;
}

.btn {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  cursor: pointer;
}

.btn-accent {
  background: var(--accent);
  color: #fffaf2;
}

.btn-accent:hover { background: var(--accent-dark); }

.btn-danger {
  background: #8a1f1a;
  color: #fffaf2;
}

.btn-danger:hover { background: #6e1612; }

.btn-ghost {
  background: transparent;
  color: var(--muted);
}

.filters, .year-switch, .grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.year-switch { grid-template-columns: 140px; }

.page-filters {
  grid-template-columns: 140px 160px minmax(200px, 280px);
  margin: 0 0 22px;
  justify-content: start;
}

.page-filters .filter-search input[type="search"] {
  border-radius: 14px;
}

.hero-title-row {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.hero-title-row .brand-search {
  display: block;
  width: 260px;
  flex: 0 0 260px;
  margin: 0;
}

.hero-title-row .brand-search label {
  width: 100%;
}

.hero-title-row .brand-search input[type="search"] {
  border-radius: 999px;
  padding: 10px 16px;
  text-align: left;
  background: var(--card);
  box-shadow: var(--shadow);
}

.hero-title-row .brand-search input[type="search"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(107, 29, 42, 0.14);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.year-switch-wide { grid-template-columns: minmax(180px, 240px); }

label {
  display: grid;
  gap: 6px;
  font-size: 0.92rem;
}

input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 14px;
  padding: 10px 12px;
  color: var(--ink);
}

.table-wrap { overflow: auto; }

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  text-align: left;
  padding: 12px 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th { color: var(--muted); font-weight: 560; font-size: 0.85rem; }

.row-actions, .top-actions, .pay-actions, form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.sheet-form, .login-form, .filters, .year-switch, .admin-form { display: grid; }

.linkish {
  background: none;
  border: 0;
  padding: 0;
  color: var(--accent);
  cursor: pointer;
  font: inherit;
}

.danger { color: #9b1c1c; }

.pill {
  display: inline-block;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.82rem;
}

.pill-recebido { background: var(--ok-soft); color: var(--ok); }
.pill-a_receber { background: var(--wait-soft); color: var(--wait); }
.pill-atrasada { background: #f8d7d3; color: #8a1f1a; }
.pill-hoje { background: #f3e4e6; color: var(--accent); }
.pill-amanha { background: #f7ead8; color: #8a4b1c; }
.pill-proxima { background: var(--wait-soft); color: var(--wait); }
.pill-sem_data { background: #eee8df; color: var(--muted); }
.pill-entregue { background: var(--ok-soft); color: var(--ok); }

.priority-card { padding: 14px 16px; }
.priority-card .card-head { margin-bottom: 4px; }
.priority-card h2 { font-size: 1.05rem; }

.priority-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.priority-list li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}

.priority-list li:last-child { border-bottom: 0; }
.priority-name {
  color: var(--accent);
  font-weight: 560;
  font-size: 0.92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.priority-name:hover { text-decoration: underline; }
.priority-date {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
}
.priority-card .rank-n {
  width: 22px;
  height: 22px;
  font-size: 0.72rem;
}

.job.is-atrasada { border-color: #e8b4ae; background: #fff6f5; }
.job.is-hoje { border-color: #d4b4b8; background: #fbf6f6; }
.job.is-amanha { border-color: #e8d2b0; background: #fff8ef; }
.job.is-proxima { border-color: #e8cfc4; }

.empty {
  padding: 42px 12px;
  text-align: center;
}

.flash {
  margin: 8px auto 0;
  padding: 12px 16px;
  border-radius: 14px;
  width: min(1180px, calc(100% - 56px));
}

.flash-ok { background: var(--ok-soft); color: var(--ok); }
.flash-erro { background: #f8d7d3; color: #8a1f1a; }
.flash a { text-decoration: underline; font-weight: 560; }

.push-alerts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin: 0 0 18px;
  align-items: start;
}

.push-alert {
  display: grid;
  gap: 4px;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow);
}

.push-alert strong {
  font-size: 1.05rem;
}

.push-alert span {
  color: var(--muted);
  font-size: 0.92rem;
}

.push-alert-gravacao {
  background: #fff6ea;
  border-color: #ead4b4;
}

.push-alert-prazo {
  background: #f3e4e6;
  border-color: #e4c8cd;
}

.push-setup {
  margin: 0 0 12px;
}

.sheet {
  border: 0;
  border-radius: 24px;
  padding: 0;
  width: min(560px, 94vw);
  max-height: 90vh;
  overflow: auto;
  background: var(--card);
  box-shadow: var(--shadow);
}

.sheet::backdrop { background: rgba(36, 29, 24, 0.35); }

.sheet-form { padding: 22px; gap: 12px; }
.sheet-form header p { margin: 0; color: var(--muted); }
.sheet-form footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

.admin-form { gap: 14px; }
.admin-form footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

.danger-card {
  margin-top: 16px;
  border-color: #f0c7c3;
}
.danger-card h2 {
  margin: 0 0 8px;
  font-family: "Fraunces", serif;
  font-size: 1.25rem;
}
.danger-card .muted { margin-bottom: 14px; }

tr.is-inactive { opacity: 0.58; }
.hero .eyebrow a { color: var(--muted); }

.login-wrap {
  min-height: 70vh;
  display: grid;
  place-items: center;
  width: 100%;
  gap: 22px;
}

.auth-lockup {
  display: grid;
  place-items: center;
}

.auth-lockup img {
  display: block;
  height: min(220px, 42vw);
  width: auto;
  border-radius: 28px;
  background: #f7f1e8;
  box-shadow: 0 22px 48px rgba(42, 24, 24, 0.1);
}

.login-card { width: min(420px, 100%); }
.login-form { gap: 14px; }

body.is-auth {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.is-auth .topbar {
  justify-content: space-between;
  width: min(1180px, calc(100% - 32px));
  margin-top: 22px;
}

body.is-auth main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(460px, calc(100% - 32px));
  padding: 12px 0 72px;
}

body.is-auth .login-wrap {
  min-height: 0;
}

body.is-auth .flash {
  width: min(460px, calc(100% - 32px));
}

body.is-auth.is-login {
  background:
    radial-gradient(900px 520px at 8% -12%, #8a2438 0%, transparent 56%),
    radial-gradient(720px 460px at 100% 110%, #2a090f 0%, transparent 52%),
    linear-gradient(165deg, #6b1d2a 0%, #4e121c 52%, #3a0c14 100%);
}

body.is-auth.is-login .grain {
  opacity: 0.32;
  mix-blend-mode: overlay;
}

body.is-auth.is-login .topbar {
  width: min(1040px, calc(100% - 40px));
}

body.is-auth.is-login .brand-copy strong { color: #fffaf2; }
body.is-auth.is-login .brand-copy em { color: #e4c49a; }

body.is-auth.is-login nav a,
body.is-auth.is-login .nav-help {
  color: rgba(255, 250, 242, 0.78);
}

body.is-auth.is-login nav a.is-active,
body.is-auth.is-login .nav-help.is-active {
  background: rgba(255, 250, 242, 0.12);
  color: #fffaf2;
}

body.is-auth.is-login .topbar .btn-ghost {
  color: #fffaf2;
}

body.is-auth.is-login .topbar .btn-accent {
  background: #fffaf2;
  color: var(--accent);
}

body.is-auth.is-login .topbar .btn-accent:hover {
  background: #f3e6d6;
}

body.is-auth.is-login main {
  width: min(1040px, calc(100% - 40px));
  padding: 12px 0 56px;
  align-items: center;
}

body.is-auth.is-login .flash {
  width: min(1040px, calc(100% - 40px));
  box-shadow: 0 12px 32px rgba(20, 8, 10, 0.18);
}

.auth-screen {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 420px);
  gap: 48px 56px;
  width: 100%;
  align-items: center;
}

.auth-brand {
  color: #fffaf2;
}

.auth-brand .auth-lockup {
  justify-items: start;
  margin-bottom: 22px;
}

.auth-brand .auth-lockup img {
  height: min(168px, 34vw);
  box-shadow: 0 24px 50px rgba(20, 8, 10, 0.32);
}

.auth-brand .eyebrow {
  color: #e4c49a;
}

.auth-brand h1 {
  color: #fffaf2;
  font-size: clamp(2.1rem, 4.2vw, 3.35rem);
  line-height: 1.08;
  max-width: 14ch;
}

.auth-brand p:not(.eyebrow) {
  margin: 14px 0 0;
  max-width: 34ch;
  color: rgba(255, 250, 242, 0.78);
  font-size: 1.05rem;
  line-height: 1.5;
}

.auth-panel {
  background: var(--card);
  border: 1px solid rgba(255, 250, 242, 0.16);
  border-radius: 28px;
  padding: 28px 26px 24px;
  box-shadow: 0 30px 70px rgba(20, 8, 10, 0.28);
  color: var(--ink);
}

.auth-panel h2 {
  margin: 0 0 6px;
  font-family: "Fraunces", serif;
  font-size: 1.85rem;
  font-weight: 620;
}

.auth-panel .muted {
  margin: 0 0 18px;
}

.auth-panel .login-form input {
  padding: 12px 14px;
  border-radius: 16px;
}

.auth-panel .login-form input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(107, 29, 42, 0.14);
}

.auth-panel .login-form .btn {
  width: 100%;
  padding: 13px 16px;
  margin-top: 2px;
}

.auth-panel .auth-alt {
  margin-top: 16px;
}

.auth-panel .legal-links a {
  color: var(--muted);
}

body.is-auth.is-about main {
  width: min(860px, calc(100% - 32px));
  align-items: start;
  justify-content: start;
}

body.is-auth.is-about .flash {
  width: min(860px, calc(100% - 32px));
}

.legal {
  max-width: 68ch;
}

.legal h1 {
  margin: 0 0 8px;
}

.legal h2 {
  margin: 28px 0 8px;
  font-size: 1.05rem;
}

.legal p,
.legal li {
  color: var(--muted);
  line-height: 1.55;
}

.legal ul {
  margin: 0 0 12px;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

.legal a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.terms-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 4px 0 16px;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--muted);
  cursor: pointer;
}

.terms-check input {
  width: auto;
  margin-top: 3px;
  flex-shrink: 0;
}

.terms-check a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  margin: 18px 0 0;
  font-size: 0.86rem;
  color: var(--muted);
}

.about .legal-links {
  justify-content: flex-start;
}

.legal-links a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.help-contact {
  margin-bottom: 16px;
}

.help-mail {
  display: inline-block;
  margin-top: 10px;
  font-family: "Fraunces", serif;
  font-size: 1.35rem;
  color: var(--accent);
  word-break: break-word;
}

.help-mail:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.help-page .card a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.help-page .about-points a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.about-hero {
  display: grid;
  grid-template-columns: minmax(200px, 260px) 1fr;
  gap: 36px;
  align-items: center;
  margin-bottom: 32px;
}

.about-lockup {
  background: linear-gradient(180deg, #fbf6ef, #f1e6d8);
  border: 1px solid var(--line);
  border-radius: 32px;
  padding: 18px 16px 10px;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
}

.about-lockup img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 320px;
  object-fit: contain;
}

.about-lead {
  max-width: 52ch;
  font-size: 1.12rem;
  line-height: 1.55;
  color: var(--muted);
  margin: 12px 0 0;
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 22px;
}
.about-points {
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
}
.about-points li {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.about-points li:last-child { border-bottom: 0; }
.about-cta { display: flex; gap: 8px; flex-wrap: wrap; }

.phone-guide .hero {
  align-items: center;
  margin-bottom: 22px;
}

.phone-icon-preview {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  object-fit: cover;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  flex-shrink: 0;
}

.phone-steps {
  margin: 14px 0 12px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
  counter-reset: passo;
}

.phone-steps li {
  position: relative;
  padding-left: 38px;
  color: var(--ink);
  line-height: 1.45;
  counter-increment: passo;
}

.phone-steps li::before {
  content: counter(passo);
  position: absolute;
  left: 0;
  top: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #f3e4e6;
  color: var(--accent);
  font-family: "Fraunces", serif;
  font-size: 0.95rem;
}

.pill-instagram { background: #f8e3ee; color: #8a2a5a; }
.pill-tiktok { background: #e7e7ee; color: #1c1c24; }

.user-chip {
  color: var(--muted);
  font-size: 0.92rem;
  padding: 8px 4px;
}

.auth-alt {
  margin: 18px 0 0;
  text-align: center;
  color: var(--muted);
}

.auth-alt a {
  color: var(--accent);
}

.login-form small {
  font-size: 0.8rem;
}

.plan-card { width: min(440px, 100%); }
.plan-price {
  margin: 8px 0 12px;
  font-family: "Fraunces", serif;
  font-size: 2rem;
}
.plan-list {
  margin: 0 0 18px;
  padding-left: 18px;
  color: var(--muted);
  display: grid;
  gap: 6px;
}

.pay-choice {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.pay-choice form { display: block; }
.checkout-form .pay-choice { margin-top: 4px; }
.pay-choice .btn { width: 100%; }
.pay-choice .btn-ghost {
  border: 1px solid var(--accent);
  color: var(--accent);
}

.obs { max-width: 240px; color: var(--muted); }

nav { flex-wrap: wrap; }

.choice {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px 12px;
  display: grid;
  gap: 8px;
}

.choice legend {
  padding: 0 4px;
  color: var(--muted);
  font-size: 0.92rem;
}

.choice-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.choice-item input { width: auto; }

.extra-toggle {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 2px 0 4px;
}

.extra-toggle input {
  width: auto;
  margin-top: 3px;
}

.extra-toggle span {
  display: grid;
  gap: 2px;
}

.extra-toggle small {
  font-weight: 420;
}

.pill-pago { background: var(--ok-soft); color: var(--ok); }
.pill-permuta { background: #efe6f6; color: #5b3d73; }

.btn-tiny {
  padding: 6px 12px;
  font-size: 0.85rem;
}

.board {
  display: flex;
  align-items: stretch;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin: 8px 0 22px;
}

.lane {
  flex: 1 1 0;
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 12px;
  min-height: 220px;
}

.lane header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
}

.lane header span {
  font-family: "Fraunces", serif;
  color: var(--accent);
}

.lane header h2 {
  font-size: 0.82rem;
  line-height: 1.25;
  font-family: "Outfit", sans-serif;
  font-weight: 560;
  flex: 1;
}

.lane header small { color: var(--muted); }

.lane-list, .done-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.job {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
  display: grid;
  gap: 4px;
  background: #fff;
}

.job small, .done-list small { color: var(--muted); display: block; }

.job-lost {
  margin-top: 2px;
  justify-content: flex-end;
}

.job-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 6px;
}

.lane-empty { font-size: 0.88rem; }

.done-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.done-list li:last-child { border-bottom: 0; }

table small { display: block; }

@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .topbar, main, .flash { width: calc(100% - 32px); }
  .topbar {
    grid-template-columns: 1fr auto;
  }
  .nav-main {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
  .top-actions { margin-left: 0; width: auto; }
  .about-grid, .layout, .kpis, .kpis-admin, .filters, .page-filters, .grid-2, .rank-grid, .about-hero { grid-template-columns: 1fr; }
  .nicho-rail {
    border-radius: 28px;
    flex-direction: row;
    align-items: center;
    padding: 16px 20px;
  }
  .nicho-rail ol {
    flex: 1;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  }
  .board { flex-direction: column; }
  .lane { min-width: 0; }
  .kpis, .hero { flex-direction: column; align-items: stretch; }
  .hero-title-row .brand-search { width: 100%; flex: 1 1 220px; }
  table, thead, tbody, th, td, tr { display: block; }
  thead { display: none; }
  tr { padding: 12px 0; border-bottom: 1px solid var(--line); }
  td {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border: 0;
    padding: 6px 0;
  }
  td::before {
    content: attr(data-label);
    color: var(--muted);
  }
  .row-actions { justify-content: flex-end; }
  .about-lockup { max-width: 240px; justify-self: start; }
  .priority-list li { grid-template-columns: 22px minmax(0, 1fr) auto; }
  .auth-screen {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .auth-brand {
    text-align: center;
  }
  .auth-brand .auth-lockup {
    justify-items: center;
    margin-bottom: 12px;
  }
  .auth-brand .auth-lockup img {
    height: min(112px, 28vw);
  }
  .auth-brand h1 {
    max-width: none;
    font-size: clamp(1.7rem, 7vw, 2.2rem);
  }
  .auth-brand p:not(.eyebrow) {
    margin-left: auto;
    margin-right: auto;
  }
}
