:root {
  color-scheme: light;
  --bg: #f5f2ec;
  --panel: rgba(255, 255, 255, 0.86);
  --panel-solid: #ffffff;
  --ink: #1c1a17;
  --muted: #5d5852;
  --accent: #f97316;
  --accent-2: #0ea5e9;
  --accent-3: #14b8a6;
  --shadow: 0 24px 60px rgba(28, 26, 23, 0.12);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", "Hiragino Kaku Gothic ProN", "Hiragino Sans", system-ui, sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at top left, #fdf6e3, #f4efe6 45%, #efe8dc 100%);
  overflow-x: hidden;
}

.bg-orb {
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(0px);
  opacity: 0.32;
  z-index: 0;
}

.orb-a {
  background: radial-gradient(circle, #f97316, transparent 70%);
  top: -160px;
  left: -140px;
}

.orb-b {
  background: radial-gradient(circle, #0ea5e9, transparent 70%);
  right: -180px;
  top: 80px;
}

.orb-c {
  background: radial-gradient(circle, #14b8a6, transparent 70%);
  bottom: -180px;
  left: 40%;
}

.app {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 32px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 12px;
}

h1 {
  margin: 0;
  font-size: 38px;
  letter-spacing: -0.02em;
}

.subtitle {
  margin: 8px 0 0;
  color: var(--muted);
}

.user-panel {
  display: none;
  align-items: center;
  gap: 16px;
  background: var(--panel);
  padding: 16px 20px;
  border-radius: 999px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.user-panel.active {
  display: flex;
}

.label {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.value {
  margin: 4px 0 0;
  font-weight: 600;
}

.card {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  animation: fadeUp 0.5s ease forwards;
}

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

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

.grid.three {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  align-items: end;
}

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

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

h2 {
  margin: 0 0 8px;
  font-size: 24px;
}

h3 {
  margin: 0 0 12px;
}

label span {
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
  color: var(--muted);
}

input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: var(--panel-solid);
  font-family: inherit;
  font-size: 14px;
}

button {
  font-family: inherit;
}

.btn {
  padding: 11px 18px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(130deg, var(--accent), #fb923c);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 12px 24px rgba(249, 115, 22, 0.25);
}

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

.btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.15);
  color: #075985;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hint {
  font-size: 12px;
  color: var(--muted);
  min-height: 16px;
  margin: 8px 0 0;
}

.table-wrap {
  overflow-x: auto;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 16px;
  padding: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th,
td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

code {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

#recordSection,
#adminSection {
  display: none;
}

#recordSection.active,
#adminSection.active {
  display: block;
}

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

@media (max-width: 900px) {
  .app-header {
    flex-direction: column;
  }

  .user-panel {
    width: 100%;
    justify-content: space-between;
  }
}
