:root {
  --brand: #EB862E;
  --brand-dark: #c56e22;
  --brand-soft: rgba(235, 134, 46, 0.12);
  --text: #1a1a1a;
  --muted: #5c5c5c;
  --border: #e4e4e4;
  --surface: #ffffff;
  --page-bg: linear-gradient(165deg, #faf8f6 0%, #f0f4f8 100%);
  --radius: 12px;
  --shadow: 0 4px 24px rgba(30, 42, 62, 0.08);
  font-size: 16px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--page-bg);
  line-height: 1.55;
  min-height: 100vh;
}

header.hero {
  position: relative;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff;
  padding: 2rem 1.25rem 2.5rem;
  text-align: center;
  box-shadow: var(--shadow);
}

.top-login {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  z-index: 2;
}

.top-login a {
  color: #fff;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  background: rgba(0,0,0,0.18);
}

.top-login a:hover {
  background: rgba(255,255,255,0.25);
}

.btn-login {
  border: 1px solid rgba(255,255,255,0.55);
}

header.hero h1 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.35rem, 3.5vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

header.hero p.badge {
  display: inline-block;
  margin: 0;
  padding: 0.25rem 0.75rem;
  background: rgba(255,255,255,0.2);
  border-radius: 999px;
  font-size: 0.85rem;
}

.wrap {
  max-width: 720px;
  margin: -1.25rem auto 2rem;
  padding: 0 1rem;
}

.intro, .survey-card, .dash-card, .admin-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem 1.35rem;
  margin-bottom: 1.25rem;
  border: 1px solid rgba(0,0,0,0.04);
}

.intro h2 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  color: var(--brand-dark);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.intro p { margin: 0 0 0.75rem; color: var(--muted); }
.intro p:last-child { margin-bottom: 0; }

.muted { color: var(--muted); }

.survey-card h2 {
  margin: 0 0 1rem;
  font-size: 1.15rem;
  color: var(--text);
}

fieldset.section {
  border: none;
  margin: 0 0 1.75rem;
  padding: 0;
}

fieldset.section:last-of-type { margin-bottom: 0; }

fieldset.section legend {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid var(--brand-soft);
  width: 100%;
  color: var(--text);
}

.q-block {
  margin-bottom: 1.35rem;
}

.q-block:last-child { margin-bottom: 0; }

.q-num {
  display: inline-block;
  font-weight: 700;
  color: var(--brand);
  margin-right: 0.35rem;
}

.q-title {
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.q-hint {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.65rem;
}

label.opt {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
  cursor: pointer;
  font-weight: 400;
}

label.opt input { margin-top: 0.25rem; accent-color: var(--brand); }

select, textarea {
  width: 100%;
  max-width: 100%;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  background: #fff;
}

select:focus, textarea:focus {
  outline: 2px solid var(--brand-soft);
  border-color: var(--brand);
}

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

.scale-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
}

.scale-row label.opt {
  display: inline-flex;
  margin-bottom: 0;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fafafa;
}

.scale-row label.opt:has(input:checked) {
  border-color: var(--brand);
  background: var(--brand-soft);
}

button.primary {
  display: inline-block;
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.85rem 1.25rem;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(235, 134, 46, 0.35);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

button.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(235, 134, 46, 0.45);
}

button.secondary {
  padding: 0.65rem 1.1rem;
  background: #fff;
  color: var(--brand-dark);
  border: 2px solid var(--brand);
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
}

button.secondary:hover { background: var(--brand-soft); }

.dash-card h2 { margin-top: 0; }

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.kpi {
  background: var(--brand-soft);
  border-radius: 10px;
  padding: 0.75rem;
  text-align: center;
}

.kpi .val { font-size: 1.35rem; font-weight: 700; color: var(--brand-dark); }
.kpi .lbl { font-size: 0.75rem; color: var(--muted); margin-top: 0.2rem; }

.chart-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 900px) {
  .chart-grid { grid-template-columns: 1fr 1fr; }
}

.chart-wrap {
  background: #fafafa;
  border-radius: var(--radius);
  padding: 1rem;
  border: 1px solid var(--border);
}

.chart-wrap h3 {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
}

.admin-card label { display: block; margin-bottom: 0.35rem; font-weight: 600; }
.admin-card input[type="text"],
.admin-card input[type="password"] {
  width: 100%; max-width: 360px;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
}
.admin-card table { width: 100%; border-collapse: collapse; margin-top: 1rem; font-size: 0.95rem; }
.admin-card th, .admin-card td { border-bottom: 1px solid var(--border); padding: 0.5rem 0.35rem; text-align: left; }
.admin-card .muted { color: var(--muted); font-size: 0.88rem; }
