:root {
  --bg: #f3efe4;
  --bg-strong: #eadfca;
  --panel: rgba(255, 251, 242, 0.78);
  --text: #11211d;
  --muted: #54605b;
  --line: rgba(17, 33, 29, 0.12);
  --accent: #0f766e;
  --accent-strong: #0c5e59;
  --secondary: #d97706;
  --danger: #b91c1c;
  --shadow: 0 18px 60px rgba(17, 33, 29, 0.14);
  --radius: 28px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.18), transparent 28%),
    radial-gradient(circle at bottom right, rgba(217, 119, 6, 0.18), transparent 32%),
    linear-gradient(140deg, #f6f0e2 0%, #f1ebdc 42%, #f6f4ea 100%);
}

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

button {
  cursor: pointer;
  border: 0;
}

.shell {
  display: grid;
  grid-template-columns: 300px 1fr;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
  height: 100vh;
  padding: 28px;
  border-right: 1px solid var(--line);
  background: rgba(255, 252, 245, 0.72);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand h1 {
  margin: 0;
  font-size: 2rem;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--accent), #34d399);
  color: white;
  font-weight: 700;
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
}

.language-switcher,
.nav,
.session-card,
.glass,
.card {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.language-switcher {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 8px;
  border-radius: 20px;
}

.lang-btn,
.nav-link,
.ghost-btn {
  border-radius: 16px;
  transition: 0.2s ease;
}

.lang-btn {
  padding: 10px 12px;
  background: transparent;
  color: var(--muted);
}

.lang-btn.active,
.lang-btn:hover {
  background: rgba(15, 118, 110, 0.12);
  color: var(--text);
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border-radius: var(--radius);
}

.nav-link {
  padding: 14px 16px;
  text-align: left;
  background: transparent;
  color: var(--muted);
}

.nav-link.active,
.nav-link:hover {
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.14), rgba(15, 118, 110, 0.04));
  color: var(--text);
}

.session-card {
  margin-top: auto;
  padding: 18px;
  border-radius: var(--radius);
}

.content {
  padding: 28px;
}

.section {
  display: none;
  animation: rise 0.35s ease;
}

.section.active {
  display: block;
}

.hero {
  display: grid;
  grid-template-columns: 1.25fr 0.9fr;
  gap: 24px;
  align-items: stretch;
}

.hero-copy,
.hero-panel,
.card {
  padding: 28px;
  border-radius: var(--radius);
}

.hero-copy {
  min-height: 420px;
  background:
    linear-gradient(135deg, rgba(17, 33, 29, 0.92), rgba(15, 118, 110, 0.92)),
    linear-gradient(135deg, #0f172a, #0f766e);
  color: white;
  box-shadow: var(--shadow);
}

.hero-copy h2 {
  margin: 10px 0 18px;
  max-width: 11ch;
  font-family: "Instrument Serif", serif;
  font-size: clamp(2.8rem, 4vw, 4.8rem);
  line-height: 0.96;
  font-weight: 400;
}

.hero-text {
  max-width: 62ch;
  color: rgba(255, 255, 255, 0.82);
}

.hero-actions,
.detail-actions,
.card-heading,
.stats-grid,
.request-layout,
.installer-grid,
.supervisor-grid,
.wifi-grid {
  display: grid;
  gap: 18px;
}

.hero-actions {
  grid-template-columns: repeat(2, max-content);
  margin-top: 28px;
}

.primary-btn,
.ghost-btn {
  padding: 14px 18px;
  border-radius: 18px;
}

.primary-btn {
  background: linear-gradient(135deg, var(--secondary), #f59e0b);
  color: white;
  box-shadow: 0 14px 24px rgba(217, 119, 6, 0.24);
}

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

.ghost-btn {
  background: rgba(15, 118, 110, 0.08);
  color: var(--text);
}

.stack,
.form-card,
.detail-card,
.upload-box,
.stats-list,
.user-list,
.request-list {
  display: grid;
  gap: 14px;
}

.magic-link-result {
  margin-top: 18px;
  display: grid;
  gap: 10px;
}

.magic-link-box {
  padding: 16px;
  border-radius: 18px;
  background: rgba(15, 118, 110, 0.08);
  word-break: break-word;
}

.section-header {
  margin-bottom: 22px;
}

.section-header h2 {
  margin: 0;
  font-family: "Instrument Serif", serif;
  font-size: clamp(2rem, 3vw, 3.25rem);
  font-weight: 400;
}

.guide-grid,
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.request-layout,
.wifi-grid {
  grid-template-columns: minmax(280px, 380px) 1fr;
}

.installer-grid,
.supervisor-grid {
  grid-template-columns: 1.1fr 0.9fr;
}

.card {
  border-radius: var(--radius);
}

.card h3,
.hero-panel h3 {
  margin: 0 0 8px;
}

label {
  display: grid;
  gap: 8px;
}

input,
select,
textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--text);
}

textarea {
  resize: vertical;
}

.request-item,
.user-item,
.installer-stat {
  padding: 16px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.58);
}

button.request-item {
  width: 100%;
  text-align: left;
}

.request-item.active {
  border-color: rgba(15, 118, 110, 0.42);
  box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.18);
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.12), rgba(255, 255, 255, 0.72));
}

.request-item header,
.user-item header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.request-meta,
.helper-text {
  color: var(--muted);
  font-size: 0.92rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.1);
  color: var(--accent-strong);
  font-size: 0.9rem;
}

.pill.urgent {
  background: rgba(185, 28, 28, 0.12);
  color: var(--danger);
}

.pill.high {
  background: rgba(217, 119, 6, 0.12);
  color: var(--secondary);
}

.timer-box {
  display: inline-grid;
  gap: 6px;
  margin: 18px 0;
  padding: 18px;
  border-radius: 24px;
  background: rgba(15, 118, 110, 0.08);
}

.timer-box strong {
  font-size: clamp(1.8rem, 3vw, 3rem);
}

.stat-card strong {
  margin-top: 12px;
  display: block;
  font-size: clamp(2rem, 4vw, 3.6rem);
}

#connectionMap {
  min-height: 430px;
  border-radius: 24px;
  overflow: hidden;
}

.qr-preview {
  display: grid;
  place-items: center;
  min-height: 220px;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.08), rgba(217, 119, 6, 0.08));
}

.upload-box {
  padding: 18px;
  border: 1px dashed rgba(15, 118, 110, 0.38);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.56);
}

.upload-box input {
  padding: 0;
  border: 0;
  background: transparent;
}

.hidden {
  display: none !important;
}

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

@media (max-width: 1100px) {
  .shell,
  .hero,
  .request-layout,
  .installer-grid,
  .supervisor-grid,
  .wifi-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }
}

@media (max-width: 720px) {
  .content,
  .sidebar {
    padding: 18px;
  }

  .hero-copy,
  .hero-panel,
  .card {
    padding: 22px;
  }

  .hero-actions {
    grid-template-columns: 1fr;
  }
}
