:root {
  --bg: #0f172a;
  --bg-elev: #1e293b;
  --bg-input: #111827;
  --fg: #e2e8f0;
  --muted: #94a3b8;
  --border: #334155;
  --accent: #60a5fa;
  --accent-empresa: #38bdf8;
  --accent-vendafeita: #34d399;
  --accent-bets: #fbbf24;
  --error: #f87171;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  background:
    radial-gradient(1200px 600px at 20% -10%, rgba(56, 189, 248, 0.14), transparent 60%),
    radial-gradient(900px 500px at 90% 110%, rgba(52, 211, 153, 0.1), transparent 60%),
    var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  display: flex;
  justify-content: center;
}

.shell {
  width: 100%;
  max-width: 960px;
  padding: 72px 24px 48px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.hero {
  text-align: center;
  margin-bottom: 48px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #e2e8f0, #94a3b8);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero .tagline {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 1rem;
  letter-spacing: 0.02em;
}

/* Gate */
.gate {
  max-width: 380px;
  width: 100%;
  margin: 24px auto 0;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

.gate__title {
  margin: 0 0 16px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.gate form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gate label {
  font-size: 0.9rem;
  color: var(--muted);
}

.gate input {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--fg);
  padding: 12px 14px;
  font-family: inherit;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.gate input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
}

.gate button {
  margin-top: 6px;
  background: var(--accent);
  color: #0b1220;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.15s ease;
}

.gate button:hover {
  filter: brightness(1.08);
}

.gate .error {
  margin: 4px 0 0;
  color: var(--error);
  font-size: 0.9rem;
}

/* Dashboards */
.cards-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.cards {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border-top: 4px solid transparent;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.card:hover {
  transform: translateY(-3px);
}

.card h2 {
  margin: 0 0 8px;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--fg);
}

.card p {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 0.95rem;
  flex: 1;
}

.card a {
  align-self: flex-start;
  text-decoration: none;
  background: var(--fg);
  color: var(--bg);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.15s ease;
}

.card a:hover {
  transform: translateX(2px);
}

.card--empresa {
  border-top-color: var(--accent-empresa);
}

.card--vendafeita {
  border-top-color: var(--accent-vendafeita);
}

.card--bets {
  border-top-color: var(--accent-bets);
}

.logout {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.logout:hover {
  color: var(--fg);
  border-color: var(--muted);
}

/* Footer */
.footer {
  margin-top: auto;
  padding-top: 48px;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

@media (prefers-reduced-motion: reduce) {
  .card,
  .card a,
  .gate input,
  .gate button,
  .logout {
    transition: none;
  }
}

@media (max-width: 480px) {
  .shell {
    padding: 48px 16px 32px;
  }
  .hero {
    margin-bottom: 32px;
  }
  .gate {
    padding: 20px;
  }
}
