:root {
  --navy: #053f68;
  --navy-2: #082f4f;
  --blue: #075f94;
  --cyan: #00a3c7;
  --teal: #0f9f9a;
  --green: #62bd19;
  --yellow: #f6b93b;
  --danger: #de3f4f;
  --ink: #102032;
  --muted: #66758a;
  --line: #dce7ef;
  --soft: #f3f7fa;
  --card: #ffffff;
  --shadow: 0 22px 70px rgba(5, 63, 104, 0.16);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--soft);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

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

button,
input,
textarea {
  font: inherit;
}

button,
a,
input,
textarea {
  outline-offset: 4px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(0, 163, 199, 0.55);
}

.page {
  min-height: 100vh;
}

.dashboard {
  padding-bottom: 42px;
}

.dashboard-hero {
  position: relative;
  overflow: hidden;
  color: white;
  background:
    radial-gradient(circle at 85% 18%, rgba(98, 189, 25, 0.35), transparent 28%),
    linear-gradient(135deg, var(--navy), #064b78 54%, #058aa6);
  padding: 22px clamp(18px, 4vw, 56px) 48px;
}

.dashboard-hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -45% 38%;
  height: 240px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  transform: rotate(-8deg);
}

.topbar,
.simple-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.topbar nav,
.simple-header {
  color: inherit;
}

.topbar nav {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 700;
}

.logout-button {
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: white;
  cursor: pointer;
  padding: 10px 14px;
  font-weight: 800;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand img {
  width: 146px;
  height: auto;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.16));
}

.brand span {
  display: grid;
  gap: 2px;
}

.brand small {
  color: rgba(255, 255, 255, 0.72);
}

.brand--compact span {
  color: var(--ink);
}

.brand--compact small {
  color: var(--muted);
}

.demo-badge,
.status-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: white;
  padding: 8px 12px;
  font-size: 0.82rem;
  font-weight: 800;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 28px;
  align-items: end;
  max-width: 1180px;
  margin: 66px auto 0;
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 12px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 780px;
  margin-bottom: 12px;
  font-size: clamp(2.2rem, 6vw, 4.7rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero-grid p,
.qr-copy p,
.form-intro p {
  max-width: 620px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.1rem;
  line-height: 1.6;
}

.qr-cta-card,
.panel,
.summary-card,
.qr-card,
.feedback-form,
.auth-card,
.denied-card {
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}

.auth-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 14% 14%, rgba(0, 163, 199, 0.22), transparent 28%),
    radial-gradient(circle at 84% 18%, rgba(98, 189, 25, 0.18), transparent 24%),
    linear-gradient(145deg, #f4f8fb, #e8f1f6);
}

.auth-page {
  display: grid;
  gap: 18px;
  width: min(520px, 100%);
}

.auth-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.auth-brand .demo-badge {
  border-color: #cfebf3;
  background: white;
  color: var(--navy);
}

.auth-card {
  display: grid;
  gap: 20px;
  padding: clamp(24px, 5vw, 36px);
}

.auth-copy h1 {
  margin-bottom: 10px;
  color: var(--navy);
  font-size: clamp(2.2rem, 8vw, 3.6rem);
  line-height: 1;
}

.auth-copy p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  border-radius: 18px;
  background: #edf4f8;
  padding: 6px;
}

.auth-tabs button {
  min-height: 44px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 900;
}

.auth-tabs button.is-active {
  background: white;
  color: var(--navy);
  box-shadow: 0 8px 22px rgba(5, 63, 104, 0.12);
}

.auth-form {
  display: grid;
  gap: 16px;
}

.auth-secondary {
  justify-self: center;
  color: var(--blue);
  font-weight: 900;
}

.qr-cta-card {
  display: grid;
  gap: 8px;
  min-height: 160px;
  padding: 24px;
  color: var(--ink);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.qr-cta-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 28px 80px rgba(0, 32, 60, 0.22);
}

.qr-cta-card strong {
  font-size: 1.5rem;
}

.qr-cta-card small {
  color: var(--muted);
}

.pulse-dot {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(98, 189, 25, 0.5);
  animation: pulse 1.8s infinite;
}

.summary-grid,
.content-grid {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: -28px;
}

.summary-card {
  display: grid;
  gap: 8px;
  min-height: 156px;
  padding: 22px;
  overflow: hidden;
  position: relative;
}

.summary-card::after {
  content: "";
  position: absolute;
  width: 92px;
  height: 92px;
  right: -22px;
  bottom: -22px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.11;
}

.summary-card span,
.summary-card small {
  color: var(--muted);
  font-weight: 700;
}

.summary-card strong {
  font-size: 2.45rem;
  color: var(--navy);
}

.summary-card--blue { color: var(--blue); }
.summary-card--teal { color: var(--cyan); }
.summary-card--green { color: var(--green); }
.summary-card--yellow { color: var(--yellow); }

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 22px;
  margin-top: 24px;
}

.panel {
  padding: 24px;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.panel h2 {
  margin-bottom: 6px;
  font-size: 1.25rem;
}

.panel p {
  color: var(--muted);
  margin-bottom: 0;
}

.status-pill {
  border-color: #ccead4;
  background: #effaef;
  color: #28640b;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th,
td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.type {
  display: inline-flex;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 0.78rem;
  font-weight: 900;
}

.type.positive {
  background: #eef9ea;
  color: #2b7410;
}

.type.negative {
  background: #fff1f2;
  color: #a72834;
}

.stars-mini {
  color: #f5a623;
  white-space: nowrap;
}

.visual-panel {
  display: grid;
  align-content: start;
  gap: 20px;
}

.donut {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 210px;
  height: 210px;
  margin: 4px auto 8px;
  border-radius: 50%;
  background: conic-gradient(var(--green) 0 75%, #e5edf3 75% 100%);
  position: relative;
}

.donut::before {
  content: "";
  position: absolute;
  inset: 24px;
  border-radius: 50%;
  background: white;
}

.donut span,
.donut small {
  position: relative;
  z-index: 1;
}

.donut span {
  font-size: 2.6rem;
  font-weight: 900;
  line-height: 1;
  color: var(--navy);
}

.donut small {
  margin-top: 8px;
  color: var(--muted);
  font-weight: 800;
}

.bar-list {
  display: grid;
  gap: 14px;
}

.bar-row {
  display: grid;
  grid-template-columns: 70px 1fr 42px;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.bar-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eff4;
}

.bar-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.qr-shell {
  min-height: 100vh;
  color: white;
  background:
    radial-gradient(circle at 20% 24%, rgba(0, 163, 199, 0.34), transparent 31%),
    radial-gradient(circle at 80% 20%, rgba(98, 189, 25, 0.26), transparent 26%),
    linear-gradient(145deg, #052f52, #064a75 58%, #057d98);
  padding: 22px clamp(18px, 4vw, 56px) 48px;
}

.simple-header {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.simple-header > a:not(.brand) {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: white;
  padding: 10px 14px;
  font-weight: 800;
}

.qr-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 470px);
  gap: clamp(26px, 5vw, 72px);
  align-items: center;
  width: min(1080px, 100%);
  min-height: calc(100vh - 118px);
  margin: 28px auto 0;
}

.qr-copy h1 {
  margin-bottom: 16px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  padding: 0 20px;
  cursor: pointer;
  font-weight: 900;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.button--primary {
  background: linear-gradient(135deg, var(--cyan), var(--green));
  color: #04243c;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.18);
}

.qr-copy .button {
  margin-top: 28px;
}

.qr-card {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: clamp(20px, 4vw, 34px);
  color: var(--ink);
  border-color: rgba(255, 255, 255, 0.55);
  background:
    linear-gradient(white, white) padding-box,
    linear-gradient(135deg, var(--cyan), var(--green)) border-box;
}

.qr-frame {
  position: relative;
  display: grid;
  place-items: center;
  width: min(100%, 390px);
  aspect-ratio: 1;
  border: 12px solid #ecf8fb;
  border-radius: 36px;
  background: white;
  box-shadow: inset 0 0 0 2px rgba(0, 163, 199, 0.16);
}

#qrCanvas {
  width: 100%;
  height: 100%;
}

.qr-badge {
  position: absolute;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 4px solid white;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--navy), var(--cyan));
  color: white;
  font-weight: 1000;
  box-shadow: 0 12px 30px rgba(5, 63, 104, 0.25);
}

.qr-card > strong {
  color: var(--navy);
  font-size: 1.35rem;
}

.qr-card > small {
  max-width: 100%;
  overflow-wrap: anywhere;
  color: var(--muted);
  text-align: center;
}

.sparkle {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: var(--green);
  transform: rotate(45deg);
  animation: twinkle 2.4s ease-in-out infinite;
}

.sparkle-a {
  top: 26px;
  right: 42px;
}

.sparkle-b {
  bottom: 86px;
  left: 30px;
  width: 12px;
  height: 12px;
  background: var(--cyan);
  animation-delay: 0.6s;
}

.feedback-shell {
  min-height: 100vh;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(5, 63, 104, 0.08), transparent 280px),
    var(--soft);
}

.feedback-page,
.denied {
  width: min(760px, 100%);
  margin: 0 auto;
}

.feedback-shell .simple-header {
  color: var(--ink);
  margin-bottom: 18px;
}

.feedback-shell .simple-header .demo-badge {
  border-color: #cfebf3;
  background: white;
  color: var(--navy);
}

.feedback-form {
  display: grid;
  gap: 18px;
  padding: clamp(22px, 5vw, 36px);
}

.form-intro h1 {
  margin-bottom: 10px;
  color: var(--navy);
  font-size: clamp(2rem, 7vw, 3.15rem);
}

.form-intro p {
  color: var(--muted);
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field {
  display: grid;
  gap: 8px;
}

.field span,
.fieldset legend {
  color: var(--navy);
  font-weight: 900;
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fbfdff;
  color: var(--ink);
  padding: 14px 15px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.field textarea {
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(0, 163, 199, 0.12);
}

.fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.sentiment-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 10px;
}

.sentiment-card {
  display: grid;
  gap: 4px;
  min-height: 96px;
  border: 2px solid var(--line);
  border-radius: 20px;
  background: #fbfdff;
  color: var(--ink);
  cursor: pointer;
  padding: 16px;
  text-align: left;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.sentiment-card:hover,
.sentiment-card.is-selected {
  transform: translateY(-2px);
  border-color: var(--cyan);
  background: linear-gradient(135deg, rgba(0, 163, 199, 0.1), rgba(98, 189, 25, 0.12));
}

.sentiment-card strong {
  color: var(--navy);
  font-size: 1.15rem;
}

.sentiment-card small {
  color: var(--muted);
}

.star-rating {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.star {
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 14px;
  background: #edf4f8;
  color: #a7b6c3;
  cursor: pointer;
  font-size: 2rem;
  line-height: 1;
  transition: transform 0.16s ease, color 0.16s ease, background 0.16s ease;
}

.star:hover,
.star.is-active {
  background: #fff8e7;
  color: #f5a623;
  transform: translateY(-2px) scale(1.04);
}

.popia {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: start;
  color: var(--muted);
  line-height: 1.45;
}

.popia input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--green);
}

.error {
  min-height: 1.2em;
  margin: 4px 0 0;
  color: #b42333;
  font-size: 0.88rem;
  font-weight: 750;
}

.submit-button {
  width: 100%;
  min-height: 54px;
  margin-top: 4px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(4, 27, 45, 0.56);
  padding: 20px;
  z-index: 10;
}

.success-modal {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 12px;
  width: min(420px, 100%);
  overflow: hidden;
  border-radius: 26px;
  background: white;
  padding: 34px;
  text-align: center;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.28);
}

.checkmark {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--green));
  color: white;
  font-size: 2.6rem;
  font-weight: 1000;
  animation: pop 0.4s ease both;
}

.success-modal h2 {
  margin-bottom: 0;
  color: var(--navy);
}

.success-modal p {
  color: var(--muted);
}

.success-burst span {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--green);
  animation: confetti 1s ease both;
}

.success-burst span:nth-child(1) { top: 34px; left: 54px; }
.success-burst span:nth-child(2) { top: 42px; right: 64px; background: var(--cyan); animation-delay: .08s; }
.success-burst span:nth-child(3) { bottom: 78px; left: 72px; background: var(--yellow); animation-delay: .14s; }
.success-burst span:nth-child(4) { bottom: 64px; right: 76px; animation-delay: .2s; }

.denied {
  display: grid;
  gap: 28px;
  min-height: calc(100vh - 36px);
  align-content: center;
}

.denied-card {
  display: grid;
  justify-items: start;
  gap: 12px;
  padding: clamp(24px, 6vw, 42px);
}

.denied-card h1 {
  margin-bottom: 0;
  color: var(--navy);
  font-size: clamp(2rem, 8vw, 3.3rem);
}

.denied-card p {
  max-width: 560px;
  color: var(--muted);
  line-height: 1.55;
}

.lock-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background: #fff4df;
  color: #a76200;
  font-weight: 1000;
}

@keyframes pulse {
  70% { box-shadow: 0 0 0 16px rgba(98, 189, 25, 0); }
  100% { box-shadow: 0 0 0 0 rgba(98, 189, 25, 0); }
}

@keyframes twinkle {
  0%, 100% { opacity: 0.45; transform: rotate(45deg) scale(0.78); }
  50% { opacity: 1; transform: rotate(45deg) scale(1.12); }
}

@keyframes pop {
  from { transform: scale(0.76); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes confetti {
  from { transform: translateY(12px) scale(0.65) rotate(0deg); opacity: 0; }
  to { transform: translateY(-8px) scale(1) rotate(35deg); opacity: 1; }
}

@media (max-width: 920px) {
  .hero-grid,
  .content-grid,
  .qr-layout {
    grid-template-columns: 1fr;
  }

  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .qr-layout {
    min-height: auto;
    padding-top: 36px;
  }
}

@media (max-width: 640px) {
  body {
    background: white;
  }

  .dashboard-hero {
    padding: 18px 18px 42px;
  }

  .topbar,
  .simple-header {
    align-items: flex-start;
  }

  .brand img {
    width: 118px;
  }

  .brand span {
    display: none;
  }

  .topbar nav {
    gap: 8px;
    font-size: 0.9rem;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .logout-button {
    padding: 8px 10px;
    font-size: 0.86rem;
  }

  h1 {
    font-size: clamp(2.1rem, 12vw, 3.2rem);
  }

  .summary-grid {
    grid-template-columns: 1fr;
    margin-top: 18px;
  }

  .content-grid {
    width: min(100% - 24px, 1180px);
  }

  .panel {
    padding: 18px;
  }

  .panel-heading {
    display: grid;
  }

  .qr-shell {
    padding: 14px;
  }

  .qr-layout {
    gap: 20px;
    margin-top: 18px;
    padding-top: 18px;
  }

  .qr-copy h1 {
    margin-bottom: 10px;
  }

  .qr-copy p {
    color: rgba(255, 255, 255, 0.82);
    font-size: 1rem;
    line-height: 1.45;
  }

  .qr-copy .button {
    width: 100%;
    margin-top: 18px;
  }

  .qr-card {
    border-radius: 22px;
    gap: 10px;
    padding: 16px;
  }

  .qr-frame {
    width: min(100%, 320px);
    border-width: 8px;
    border-radius: 26px;
  }

  .qr-badge {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    font-size: 0.95rem;
  }

  .qr-card > small {
    font-size: 0.76rem;
  }

  .feedback-shell {
    padding: 10px;
    background:
      linear-gradient(180deg, rgba(5, 63, 104, 0.1), transparent 210px),
      #f7fafc;
  }

  .feedback-shell .simple-header {
    align-items: center;
    margin-bottom: 10px;
  }

  .feedback-shell .simple-header .demo-badge {
    padding: 7px 10px;
    font-size: 0.76rem;
  }

  .feedback-form {
    gap: 14px;
    border-radius: 20px;
    padding: 18px;
    box-shadow: 0 14px 42px rgba(5, 63, 104, 0.12);
  }

  .form-intro h1 {
    font-size: 2rem;
    line-height: 1.05;
  }

  .form-intro p {
    font-size: 0.98rem;
    line-height: 1.45;
  }

  .field input,
  .field textarea {
    border-radius: 14px;
    padding: 13px 14px;
  }

  .field-grid,
  .sentiment-selector {
    grid-template-columns: 1fr;
  }

  .star {
    width: 100%;
    height: 46px;
    font-size: 1.75rem;
  }

  .star-rating {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
  }

  .sentiment-card {
    min-height: 82px;
  }

  .popia {
    font-size: 0.9rem;
  }

  .auth-shell {
    align-items: start;
    padding: 14px;
  }

  .auth-page {
    padding-top: 8px;
  }

  .auth-brand {
    align-items: center;
  }

  .auth-card {
    gap: 16px;
    border-radius: 20px;
    padding: 20px;
  }

  .auth-copy h1 {
    font-size: 2.35rem;
  }
}
