:root {
  --bg: #0b1f24;
  --overlay: rgba(6, 10, 13, 0.67);
  --card: rgba(255, 255, 255, 0.09);
  --card-border: rgba(255, 255, 255, 0.16);
  --text: rgba(255, 255, 255, 0.95);
  --muted: rgba(255, 255, 255, 0.72);
  --accent: #22c55e;
  --brand: #1877f2;
  --brand-dark: #1558c8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background-color: #031211;
  background-image: linear-gradient(180deg, rgba(23, 47, 43, 0.68), rgba(4, 7, 9, 0.84)),
    url('/images/bg.svg?v=3');
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-blend-mode: normal;
}

.auth-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 2rem 1rem;
}

.auth-card {
  width: min(440px, 100%);
  border-radius: 22px;
  padding: 2.25rem 2rem;
  border: 1px solid var(--card-border);
  background: var(--card);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(18px);
}

/* Dashboard candidate grid */
.candidates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-top: 1.75rem;
}

.candidate-card {
  padding: 1.35rem 1.25rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(20, 42, 38, 0.42);
  backdrop-filter: blur(12px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  transition: transform 0.18s ease, border 0.18s ease;
}

.candidate-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.18);
}

.candidate-card.eliminated {
  opacity: 0.45;
  filter: grayscale(80%);
}

.candidate-card h3 {
  margin: 0 0 0.4rem 0;
  font-size: 1.2rem;
}

.candidate-desc {
  margin: 0 0 0.8rem 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.93rem;
  line-height: 1.3;
}

.candidate-tag {
  display: inline-block;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  font-weight: 700;
}

.candidate-tag.active {
  background: rgba(34, 197, 94, 0.18);
  color: rgba(157, 255, 216, 0.9);
}

.candidate-tag.eliminated {
  background: rgba(248, 113, 113, 0.2);
  color: rgba(255, 224, 224, 0.9);
}

.dashboard-hero {
  max-width: 840px;
  margin: 0 auto;
}

.dashboard-hero h2 {
  margin-top: 0;
  font-size: 2.2rem;
}

.dashboard-subtitle {
  margin: 0.4rem 0 0;
  color: rgba(255, 255, 255, 0.72);
  max-width: 680px;
}

main {
  padding-top: 96px;
}

.auth-logo {
  text-align: center;
  margin-bottom: 2.1rem;
}

.auth-logo h1 {
  font-size: 2.4rem;
  letter-spacing: 0.2em;
  margin: 0;
  text-transform: uppercase;
}

.auth-logo p {
  margin: 0.65rem 0 0;
  color: var(--muted);
}

.btn {
  display: inline-flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.95rem 1.1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.14s ease, opacity 0.14s ease;
}

.btn:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.btn-facebook {
  background: var(--brand);
  color: white;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: white;
}

.btn-outline {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.35);
  color: var(--text);
}

.form-group {
  display: grid;
  gap: 0.85rem;
  margin-top: 1.3rem;
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-weight: 600;
  color: var(--muted);
  font-size: 0.9rem;
}

input {
  padding: 0.9rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  outline: none;
}

input:focus {
  border-color: rgba(59, 130, 246, 0.9);
}

.alert-error,
.alert-success {
  padding: 0.9rem 1rem;
  border-radius: 14px;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.alert-error {
  background: rgba(248, 113, 113, 0.22);
  color: #fee2e2;
}

.alert-success {
  background: rgba(34, 197, 94, 0.22);
  color: #dcfce7;
}

.auth-footer {
  margin-top: 1.3rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.auth-footer a {
  color: var(--text);
  text-decoration: underline;
}

@media (max-width: 480px) {
  .auth-card {
    padding: 2rem 1.5rem;
  }

  .auth-logo h1 {
    font-size: 2rem;
  }
}

/* Site header for dashboard/layout pages */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: rgba(0, 0, 0, 0.42);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
}

.site-header h1 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-header nav {
  display: flex;
  gap: 0.9rem;
  align-items: center;
}

.site-header a {
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  transition: background 0.18s ease, color 0.18s ease;
}

.site-header a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 1);
}

main {
  padding-top: 84px;
}
