@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;600;700&family=IBM+Plex+Sans:wght@400;500;600&display=swap");

:root {
  --brand-950: #182949;
  --brand-800: #0e4a82;
  --brand-600: #1694ef;
  --accent-500: #5ce1e6;
  --accent-200: #d9f7fb;
  --bg: #e9f1fb;
  --card: #ffffff;
  --text: #182949;
  --muted: #4b5b7a;
  --border: #d1deef;
  --shadow: 0 30px 80px rgba(24, 41, 73, 0.2);
}

* {
  box-sizing: border-box;
}

.hidden {
  display: none;
}

body {
  margin: 0;
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  background: radial-gradient(1200px 720px at 85% -15%, #ffffff, transparent 60%),
    radial-gradient(900px 500px at -10% 10%, #cfe7ff, transparent 55%),
    linear-gradient(180deg, #e7f0ff 0%, #f6f9ff 100%);
  color: var(--text);
  min-height: 100vh;
}

body::before,
body::after {
  content: "";
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 36% 64% 59% 41% / 41% 41% 59% 59%;
  opacity: 0.22;
  z-index: 0;
}

body::before {
  right: -120px;
  bottom: -140px;
  background: #5ce1e6;
  filter: blur(0px);
  animation: float 18s ease-in-out infinite;
}

body::after {
  left: -160px;
  top: -120px;
  background: #0e4a82;
  animation: float 22s ease-in-out infinite reverse;
}

.page {
  position: relative;
  z-index: 1;
  max-width: 980px;
  margin: 0 auto;
  padding: 56px 20px 80px;
}

.header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
  animation: fadeUp 0.8s ease both;
}

.logo {
  width: 250px;
  height: 120px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 20px 40px rgba(14, 74, 130, 0.2);
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 6px 10px;
}

.logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand h1 {
  margin: 0 0 6px;
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 32px;
  letter-spacing: -0.02em;
}

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

.card {
  background: var(--card);
  border-radius: 28px;
  padding: 30px 28px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(15, 47, 45, 0.08);
  animation: fadeUp 0.8s ease 0.1s both;
}

.card + .card {
  margin-top: 22px;
}

.section-title {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 22px;
  margin: 0 0 16px;
}

.helper {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.field {
  margin-bottom: 24px;
}

.field label.main {
  display: block;
  font-weight: 600;
  margin-bottom: 10px;
}

input[type="text"],
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-size: 15px;
  font-family: inherit;
  background: #fdfbf6;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

input[type="text"]:focus,
select:focus,
textarea:focus {
  border-color: var(--brand-600);
  outline: none;
  box-shadow: 0 0 0 3px rgba(11, 107, 92, 0.15);
}

input.locked {
  background: #f1efe7;
  cursor: not-allowed;
}

.scale {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(38px, 1fr));
  gap: 8px;
}

.scale label {
  position: relative;
  display: grid;
  place-items: center;
  padding: 10px 0;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fbfaf6;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.scale label:hover {
  border-color: var(--brand-600);
  transform: translateY(-1px);
}

.scale input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.scale input:checked + span {
  color: #fff;
}

.scale input:checked + span::before {
  content: "";
  position: absolute;
  inset: 3px;
  background: var(--brand-600);
  border-radius: 10px;
  z-index: -1;
}

.scale span {
  position: relative;
  z-index: 1;
}

.scale.emojis label {
  padding: 8px 0;
}

.emoji-option > span {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.emoji-option .emoji {
  font-size: 20px;
  line-height: 1;
}

.emoji-option .num {
  font-size: 12px;
  color: var(--muted);
}

.scale input:checked + span .num {
  color: #fff;
}

.submit-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 8px;
}

button.primary {
  border: none;
  background: var(--brand-600);
  color: #fff;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
  box-shadow: 0 16px 30px rgba(14, 74, 130, 0.28);
}

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

button.primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #e6f0ff;
  color: var(--muted);
  font-size: 13px;
}

.area-display {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.status {
  font-size: 14px;
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 18px;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.kpi {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: #fbfaf6;
}

.kpi h3 {
  margin: 0 0 6px;
  font-size: 14px;
  color: var(--muted);
}

.kpi .value {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--brand-800);
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.table th {
  color: var(--muted);
  font-weight: 600;
}

.comments {
  display: grid;
  gap: 12px;
}

.comment {
  padding: 12px 14px;
  border-radius: 14px;
  background: #fbfaf6;
  border: 1px solid var(--border);
}

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

.gate-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(15, 30, 60, 0.55);
  backdrop-filter: blur(6px);
  z-index: 10;
  padding: 20px;
}

.gate-card {
  width: min(420px, 100%);
  background: #ffffff;
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(14, 74, 130, 0.12);
}

.gate-form {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.qr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.qr-card {
  display: grid;
  gap: 10px;
  justify-items: center;
  padding: 14px;
  border-radius: 16px;
  background: #fbfaf6;
  border: 1px solid var(--border);
}

.qr-title {
  font-weight: 600;
}

.qr-url {
  font-size: 11px;
  color: var(--muted);
  word-break: break-all;
  text-align: center;
}

.footer-note {
  margin-top: 18px;
  color: var(--muted);
  font-size: 13px;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(12px, -18px, 0);
  }
  100% {
    transform: translate3d(0, 0, 0);
  }
}

@media (max-width: 720px) {
  .header {
    flex-direction: column;
    align-items: flex-start;
  }

  .logo {
    width: 210px;
    height: 100px;
  }

  .brand h1 {
    font-size: 26px;
  }

  .card {
    padding: 24px 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
