@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@500;600;700;800&display=swap');

:root {
  --paper: #f8f8f2;
  --ink: #38454e;
  --muted: #626b6c;
  --lime: #bdd400;
  --lime-ink: #718300;
  --line: #daddd1;
  --dark: #303e45;
  --white: #ffffff;
  --danger: #b42318;
  --danger-bg: #fef3f2;
  --font: 'DM Sans', Arial, sans-serif;
  --heading: 'Manrope', Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: var(--heading);
  font-weight: 700;
  letter-spacing: -0.02em;
}

::selection {
  background: var(--lime);
  color: var(--dark);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 16px;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 4px rgba(189, 212, 0, 0.25);
  display: inline-block;
}

/* ==================== DISPLAY (TELA DA FESTA) ==================== */
.display-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    radial-gradient(circle at 90% 10%, rgba(189, 212, 0, 0.16), transparent 36%),
    radial-gradient(circle at 8% 88%, rgba(48, 62, 69, 0.08), transparent 34%),
    var(--paper);
}

.display-header {
  width: min(1280px, calc(100% - 64px));
  margin: 0 auto;
  padding: 28px 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand-logo {
  height: 52px;
  width: auto;
  display: block;
}

.header-tag {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.6px;
}

.display-main {
  width: min(1280px, calc(100% - 64px));
  margin: auto;
  padding: 32px 0;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: center;
}

.display-title {
  font-size: clamp(36px, 4.3vw, 60px);
  line-height: 1.08;
  color: var(--dark);
  margin-bottom: 22px;
}

.display-title em {
  font-style: normal;
  color: var(--lime-ink);
  text-decoration: underline;
  text-decoration-color: var(--lime);
  text-decoration-thickness: 5px;
  text-underline-offset: 8px;
}

.display-lead {
  font-size: clamp(18px, 1.5vw, 22px);
  color: var(--muted);
  max-width: 56ch;
  margin-bottom: 28px;
}

.display-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 26px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.pill strong {
  color: var(--lime-ink);
}

.counter-box {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  background: var(--dark);
  color: var(--paper);
  padding: 16px 24px;
  border-radius: 14px;
  border-left: 5px solid var(--lime);
}

.counter-value {
  font-family: var(--heading);
  font-size: 38px;
  font-weight: 800;
  line-height: 1;
  color: var(--lime);
}

.counter-label {
  font-size: 15px;
  line-height: 1.3;
}

.qr-card {
  background: var(--dark);
  color: var(--paper);
  border-radius: 24px;
  padding: 36px 32px;
  text-align: center;
  border: 2px solid var(--lime);
  box-shadow: 0 24px 48px rgba(48, 62, 69, 0.16);
}

.qr-card-kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--lime);
  margin-bottom: 18px;
}

.qr-frame {
  background: var(--white);
  padding: 18px;
  border-radius: 18px;
  width: min(300px, 65vw);
  aspect-ratio: 1 / 1;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-frame svg {
  width: 100%;
  height: 100%;
  display: block;
}

.qr-instruction {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 8px;
}

.qr-url {
  font-size: 13px;
  color: #c7d1d6;
  word-break: break-all;
}

.display-footer {
  background: var(--dark);
  color: var(--paper);
  padding: 14px 32px;
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 13px;
  letter-spacing: 1.5px;
  font-weight: 700;
  text-transform: uppercase;
}

.display-footer span.star {
  color: var(--lime);
}

/* ==================== MOBILE FORM & THANKS ==================== */
.mobile-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px 40px;
}

.mobile-card {
  width: 100%;
  max-width: 520px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px 24px;
  box-shadow: 0 12px 32px rgba(48, 62, 69, 0.08);
}

.mobile-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 18px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.mobile-brand img {
  height: 36px;
  width: auto;
}

.quota-badge {
  font-size: 12px;
  font-weight: 700;
  background: rgba(189, 212, 0, 0.22);
  color: var(--dark);
  padding: 6px 12px;
  border-radius: 999px;
}

.mobile-card h1 {
  font-size: 26px;
  line-height: 1.2;
  color: var(--dark);
  margin-bottom: 10px;
}

.mobile-subtitle {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 6px;
}

.optional-tag {
  font-weight: 500;
  color: var(--muted);
  font-size: 13px;
}

.form-control {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #c3c8bc;
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--dark);
  box-shadow: 0 0 0 3px rgba(189, 212, 0, 0.4);
  background: var(--white);
}

textarea.form-control {
  min-height: 88px;
  resize: vertical;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 10px;
  padding: 14px 20px;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  transition: transform 0.1s, background-color 0.2s;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  width: 100%;
  background: var(--dark);
  color: var(--paper);
}

.btn-primary:hover {
  background: #232e34;
}

.btn-lime {
  background: var(--lime);
  color: var(--dark);
}

.btn-outline {
  width: 100%;
  background: transparent;
  color: var(--dark);
  border: 1px solid var(--line);
}

.alert-error {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid #fecdca;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 18px;
}

.thanks-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--lime);
  color: var(--dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 16px;
}

.idea-preview {
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 4px solid var(--lime);
  border-radius: 10px;
  padding: 14px 16px;
  margin: 18px 0 22px;
}

.idea-preview strong {
  display: block;
  font-size: 18px;
  color: var(--dark);
}

.idea-preview span {
  font-size: 14px;
  color: var(--muted);
}

/* ==================== ADMIN ==================== */
.admin-wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 32px auto 64px;
}

.admin-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
}

.stat-card .stat-num {
  font-family: var(--heading);
  font-size: 28px;
  font-weight: 800;
  color: var(--dark);
}

.stat-card .stat-name {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

.table-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  vertical-align: top;
}

th {
  background: var(--paper);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--muted);
}

tr:last-child td {
  border-bottom: none;
}

.badge-dept {
  display: inline-block;
  background: rgba(189, 212, 0, 0.2);
  color: var(--dark);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 960px) {
  .display-main {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 24px 0;
  }

  .display-header {
    width: calc(100% - 32px);
  }

  .display-main {
    width: calc(100% - 32px);
  }
}
