:root {
  --bg: #0b0e14;
  --panel: #121826;
  --panel2: #0f1420;
  --text: #e6e9ef;
  --muted: #9aa4b2;
  --border: rgba(255,255,255,0.10);
  --border2: rgba(255,255,255,0.16);
  --success: #25d366;
  --danger: #ff4d4d;
  --highlight: #6ea8fe;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(900px 500px at 12% 8%, rgba(110,168,254,0.18), rgba(11,14,20,0) 60%),
    radial-gradient(700px 420px at 90% 18%, rgba(37,211,102,0.10), rgba(11,14,20,0) 55%),
    linear-gradient(180deg, var(--bg), var(--bg));
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji", "Segoe UI Emoji";
}

body[data-page="login"],
body[data-page="admin"] {
  font-size: 12px;
}

body[data-page="admin"] .main {
  padding: 14px 0 18px;
}

/* Fundo com efeitos sutis (somente CSS) */
body::before,
body::after {
  content: "";
  position: fixed;
  inset: -40vmax;
  pointer-events: none;
  z-index: -1;
  opacity: 0.6;
}

body::before {
  background:
    radial-gradient(520px 520px at 22% 18%, rgba(110,168,254,0.16), rgba(11,14,20,0) 62%),
    radial-gradient(520px 520px at 82% 38%, rgba(37,211,102,0.10), rgba(11,14,20,0) 62%),
    radial-gradient(520px 520px at 58% 86%, rgba(110,168,254,0.08), rgba(11,14,20,0) 62%);
  filter: blur(10px);
  animation: floatGlow 14s ease-in-out infinite;
}

body::after {
  background:
    radial-gradient(900px 340px at 50% 0%, rgba(255,255,255,0.03), rgba(11,14,20,0) 58%),
    radial-gradient(900px 340px at 50% 100%, rgba(255,255,255,0.02), rgba(11,14,20,0) 58%);
  opacity: 0.35;
}

@keyframes floatGlow {
  0% { transform: translate3d(0,0,0) scale(1); }
  50% { transform: translate3d(2.2vmax, -1.6vmax, 0) scale(1.02); }
  100% { transform: translate3d(0,0,0) scale(1); }
}

a { color: inherit; text-decoration: none; }

.container {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
}

.container.narrow {
  width: min(980px, calc(100% - 32px));
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(11,14,20,0.72);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
  font-size: clamp(18px, 2.2vw, 28px);
  line-height: 1;
}

.brand-badge {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: url('/images/icon128.png') center / contain no-repeat;
  box-shadow: 0 0 0 6px rgba(110,168,254,0.18);
}

.nav {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.nav a {
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.nav a:hover {
  color: var(--text);
  border-color: var(--border);
  background: rgba(255,255,255,0.04);
  transform: translateY(-1px);
}

.nav a.active {
  color: var(--text);
  border-color: var(--border);
  background: rgba(255,255,255,0.04);
}

.nav-user {
  color: var(--text);
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  font-weight: 600;
}

.topbar-toggle {
  display: none;
  height: 36px;
  width: 40px;
  padding: 0;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  cursor: pointer;
}

.topbar-toggle .bar {
  display: block;
  width: 16px;
  height: 2px;
  margin: 2px 0;
  background: currentColor;
  border-radius: 2px;
}

.main {
  padding: 26px 0 46px;
}

/* Home premium layout */
.main.flush {
  padding: 0;
}

.hero-full {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 0;
}

.hero-stage {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
  text-align: center;
}

.headline {
  margin: 14px 0 10px;
  font-size: clamp(34px, 4.6vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.5px;
}

.subheadline {
  margin: 0 auto 18px;
  color: var(--muted);
  font-size: clamp(14px, 1.35vw, 18px);
  line-height: 1.55;
  max-width: 72ch;
}

.hero-art {
  margin: 20px auto 0;
  width: min(880px, 100%);
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(18,24,38,0.35);
  overflow: hidden;
}

.hero-art svg {
  display: block;
  width: 100%;
  height: auto;
}

.glass {
  border: 1px solid var(--border);
  background: rgba(18,24,38,0.50);
  backdrop-filter: blur(10px);
}

.glass:hover {
  border-color: rgba(110,168,254,0.35);
}

.section {
  padding: 66px 0;
}

.section-title {
  font-size: clamp(20px, 2.4vw, 32px);
  margin: 0 0 10px;
}

.section-sub {
  margin: 0;
  color: var(--muted);
  max-width: 70ch;
}

.stack {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.eco-card {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 14px;
  align-items: start;
  padding: 18px;
  border-radius: 14px;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.eco-card.equal {
  min-height: 132px;
}

.eco-body {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.eco-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.eco-actions.bottom {
  margin-top: auto;
  padding-top: 10px;
}

.eco-card:hover {
  transform: translateY(-2px);
  border-color: rgba(110,168,254,0.40);
  background: rgba(18,24,38,0.58);
}

.eco-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
}

.eco-icon svg {
  width: 22px;
  height: 22px;
}

.eco-card h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.eco-card p {
  margin: 0;
  color: var(--muted);
}

.cta-panel {
  border-radius: 14px;
  padding: 22px;
}

.footer.minimal {
  padding: 22px 0;
  text-align: center;
}

/* Buttons: premium */
.btn.big {
  padding: 12px 18px;
  border-radius: 14px;
  font-size: 20px;
}

.btn.primary.gradient {
  background: linear-gradient(135deg, rgba(110,168,254,0.22), rgba(110,168,254,0.10));
  border-color: rgba(110,168,254,0.55);
}

.btn.primary.gradient:hover {
  background: linear-gradient(135deg, rgba(110,168,254,0.28), rgba(110,168,254,0.12));
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 520ms ease, transform 520ms ease;
  will-change: opacity, transform;
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media (max-width: 860px) {
  .topbar-inner {
    align-items: center;
    gap: 10px;
    padding: 10px 0;
  }

  .brand {
    font-size: 22px;
  }

  .topbar-toggle {
    display: inline-flex;
  }

  .nav {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 16px;
    left: 16px;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(11,14,20,0.96);
    backdrop-filter: blur(10px);
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    z-index: 30;
  }

  .topbar.nav-open .nav {
    display: flex;
  }

  .nav a,
  .nav .nav-user {
    text-align: left;
  }
}

/* Login premium layout */
.auth-shell {
  min-height: calc(100vh - 68px);
  display: grid;
  place-items: center;
  padding: 26px 0 46px;
}

.auth-grid {
  width: min(1080px, calc(100% - 32px));
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 14px;
  align-items: stretch;
}

.auth-grid.auth-grid-single {
  width: min(720px, calc(100% - 32px));
  grid-template-columns: 1fr;
}

.auth-left {
  border-radius: 14px;
  padding: 22px;
}

.auth-right {
  border-radius: 14px;
  padding: 22px;
}

.auth-title {
  margin: 0 0 10px;
  font-size: 26px;
  line-height: 1.15;
}

.seal-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.seal {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
  color: var(--muted);
  font-size: 12px;
}

.seal svg { width: 14px; height: 14px; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 6px 0 2px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,0.14), rgba(255,255,255,0));
}

.google-entry {
  display: grid;
  gap: 10px;
}

.google-entry-host {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  border-radius: 14px;
  border: 1px dashed rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.02);
}

.google-entry-host.is-busy {
  opacity: 0.76;
}

.google-entry-frame {
  width: 100%;
  display: flex;
  justify-content: center;
}

.google-entry-message {
  min-height: 16px;
}

@media (max-width: 900px) {
  .auth-grid {
    grid-template-columns: 1fr;
  }
  .auth-shell {
    min-height: auto;
    place-items: stretch;
  }
}

.hero {
  padding: 26px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(18,24,38,0.88), rgba(15,20,32,0.78));
  border-radius: 14px;
}

.hero.minimal {
  position: relative;
  overflow: hidden;
}

.hero.minimal::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 16px;
  background:
    radial-gradient(520px 220px at 12% 10%, rgba(110,168,254,0.18), rgba(18,24,38,0) 55%),
    radial-gradient(520px 220px at 88% 16%, rgba(37,211,102,0.12), rgba(18,24,38,0) 55%),
    radial-gradient(520px 220px at 45% 92%, rgba(110,168,254,0.10), rgba(18,24,38,0) 55%);
  opacity: 0.95;
  filter: blur(0px);
  z-index: 0;
}

.hero.minimal::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 14px;
  background: radial-gradient(700px 260px at 50% 0%, rgba(255,255,255,0.06), rgba(18,24,38,0) 62%);
  opacity: 0.55;
  animation: sheen 9s ease-in-out infinite;
  z-index: 0;
}

@keyframes sheen {
  0% { transform: translate3d(-2%, -2%, 0); opacity: 0.35; }
  50% { transform: translate3d(2%, 2%, 0); opacity: 0.60; }
  100% { transform: translate3d(-2%, -2%, 0); opacity: 0.35; }
}

.hero > * {
  position: relative;
  z-index: 1;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
  color: var(--muted);
  font-size: clamp(13px, 1.15vw, 15px);
  letter-spacing: 0.28px;
  text-transform: uppercase;
}

.kicker .spark {
  width: 16px;
  height: 16px;
  border-radius: 5px;
  background: url('/icons/icon128.png?v=20260223') center / contain no-repeat;
  box-shadow: 0 0 0 6px rgba(110,168,254,0.10);
}

.gridline {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(18,24,38,0.40);
}

.split {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 14px;
  align-items: stretch;
}

@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
}

.hero h1 {
  margin: 0 0 8px;
  font-size: clamp(26px, 3.2vw, 40px);
  line-height: 1.1;
}

.hero p {
  margin: 0 0 18px;
  color: var(--muted);
  max-width: 70ch;
}

.row {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
  margin-top: 14px;
}

.col-6 { grid-column: span 6; }
.col-4 { grid-column: span 4; }
.col-12 { grid-column: span 12; }

@media (max-width: 900px) {
  .col-6, .col-4 { grid-column: span 12; }
}

.card {
  border: 1px solid var(--border);
  background: rgba(18,24,38,0.62);
  border-radius: 14px;
  padding: 16px;
}

/* SaaS admin cards */
.stat-card {
  border-radius: 14px;
  padding: 18px;
}

.stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.stat-icon {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  display: grid;
  place-items: center;
}

.stat-icon svg { width: 18px; height: 18px; }

.stat-value {
  margin-top: 10px;
  font-size: 34px;
  letter-spacing: -0.5px;
}

.stat-label {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.card.soft {
  background: rgba(18,24,38,0.52);
}

.card h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.muted { color: var(--muted); }

.btns {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border2);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
  user-select: none;
}

.btn:hover {
  transform: translateY(-1px);
  border-color: rgba(110,168,254,0.40);
  background: rgba(110,168,254,0.08);
}

.btn.primary {
  border-color: rgba(110,168,254,0.55);
  background: rgba(110,168,254,0.14);
}

.btn.primary:hover {
  background: rgba(110,168,254,0.20);
}

.btn.danger {
  border-color: rgba(255,77,77,0.55);
  background: rgba(255,77,77,0.10);
}

.btn.danger:hover {
  background: rgba(255,77,77,0.16);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  background: rgba(255,255,255,0.02);
}

.pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(37,211,102,0.10);
}

.alert {
  border: 1px solid var(--border2);
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.03);
}

.alert.info { border-color: rgba(110,168,254,0.35); }
.alert.warn { border-color: rgba(255,77,77,0.35); }

.status-pill,
.countdown-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border2);
  background: rgba(255,255,255,0.04);
  font-size: 12px;
  font-weight: 700;
}

.status-pill.warning,
.countdown-chip {
  border-color: rgba(110,168,254,0.35);
  background: rgba(110,168,254,0.12);
}

.status-pill.danger {
  border-color: rgba(255,77,77,0.35);
  background: rgba(255,77,77,0.12);
}

.status-pill.success {
  border-color: rgba(37,211,102,0.35);
  background: rgba(37,211,102,0.12);
}

.form {
  display: grid;
  gap: 10px;
}

.profile-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.profile-form-grid .profile-field-full {
  grid-column: 1 / -1;
}

.profile-secondary-nicks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.inline-check {
  display: flex;
  align-items: center;
  gap: 8px;
}

.inline-check label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.inline-check input[type="checkbox"] {
  width: auto;
  margin: 0;
}

.field-error {
  min-height: 16px;
  padding-top: 4px;
  font-size: 12px;
  color: #ff9e9e;
}

input[aria-invalid="true"],
select[aria-invalid="true"] {
  border-color: rgba(255,77,77,0.55);
}

.info-list {
  display: grid;
  gap: 10px;
}

.info-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(15,20,32,0.42);
}

.info-line strong {
  font-size: 13px;
}

@media (max-width: 640px) {
  .info-line {
    flex-direction: column;
    align-items: flex-start;
  }
}

label {
  font-size: 13px;
  color: var(--muted);
}

input, select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(15,20,32,0.75);
  color: var(--text);
  outline: none;
}

input:focus, select:focus {
  border-color: rgba(110,168,254,0.55);
}

input:disabled, select:disabled {
  opacity: 0.72;
  cursor: not-allowed;
}

.code-input {
  text-align: center;
  letter-spacing: 0.45em;
  font-size: 24px;
  font-weight: 700;
}

.otp-group {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.otp-input {
  width: 100%;
  padding: 14px 0;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(15,20,32,0.82);
  color: var(--text);
  text-align: center;
  font-size: 24px;
  font-weight: 800;
  outline: none;
}

.otp-input:focus {
  border-color: rgba(110,168,254,0.7);
  box-shadow: 0 0 0 3px rgba(110,168,254,0.14);
}

@media (max-width: 640px) {
  .profile-form-grid {
    grid-template-columns: 1fr;
  }

  .profile-secondary-nicks {
    grid-template-columns: 1fr;
  }

  .otp-group {
    gap: 8px;
  }

  .otp-input {
    font-size: 20px;
  }
}

.table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid var(--border);
}

.table th, .table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.table th {
  background: rgba(18,24,38,0.72);
  color: var(--muted);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.table tr:hover td {
  background: rgba(255,255,255,0.02);
}

.footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  padding: 20px 0;
}

.toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: min(420px, calc(100% - 32px));
  border-radius: 14px;
  border: 1px solid var(--border2);
  background: rgba(18,24,38,0.92);
  padding: 12px 14px;
  transform: translateY(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .btn, .nav a, .toast { transition: none; }
  .btn:hover, .nav a:hover { transform: none; }
}
