/* Sociogram — single shared stylesheet.
   Design tokens ported from the original Tailwind/shadcn theme. */

:root {
  --background: 210 20% 98%;
  --foreground: 222 47% 11%;
  --card: 0 0% 100%;
  --card-foreground: 222 47% 11%;
  --primary: 199 89% 38%;
  --primary-foreground: 0 0% 100%;
  --secondary: 210 20% 96%;
  --secondary-foreground: 222 47% 11%;
  --muted: 210 20% 96%;
  --muted-foreground: 215 16% 47%;
  --accent: 199 89% 92%;
  --accent-foreground: 199 89% 28%;
  --destructive: 0 84% 60%;
  --destructive-foreground: 0 0% 100%;
  --success: 142 71% 45%;
  --warning: 38 92% 50%;
  --border: 214 20% 90%;
  --input: 214 20% 90%;
  --ring: 199 89% 38%;
  --radius: 0.625rem;
  --sidebar: 222 47% 11%;
  --sidebar-foreground: 210 20% 96%;
  --sidebar-accent: 222 47% 18%;
  --sidebar-accent-foreground: 210 20% 96%;
}

.dark {
  --background: 222 47% 6%;
  --foreground: 210 20% 96%;
  --card: 222 47% 9%;
  --card-foreground: 210 20% 96%;
  --primary: 199 89% 48%;
  --primary-foreground: 222 47% 6%;
  --secondary: 222 47% 14%;
  --secondary-foreground: 210 20% 96%;
  --muted: 222 47% 14%;
  --muted-foreground: 215 16% 57%;
  --accent: 199 89% 18%;
  --accent-foreground: 199 89% 68%;
  --destructive: 0 62% 50%;
  --success: 142 71% 40%;
  --warning: 38 92% 45%;
  --border: 222 47% 18%;
  --input: 222 47% 18%;
  --ring: 199 89% 48%;
  --sidebar: 222 47% 6%;
  --sidebar-accent: 222 47% 14%;
}

/* ── base ── */
*, *::before, *::after { box-sizing: border-box; border-color: hsl(var(--border)); }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.icon { width: 1.1em; height: 1.1em; flex-shrink: 0; vertical-align: -0.18em; }

/* ── utilities ── */
.muted { color: hsl(var(--muted-foreground)); }
.small { font-size: 12px; }
.xs { font-size: 11px; }
.bold { font-weight: 700; }
.semibold { font-weight: 600; }
.center { text-align: center; }
.mono { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; }
.flex { display: flex; align-items: center; gap: 8px; }
.flex-wrap { flex-wrap: wrap; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; } .mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; }
.text-success { color: hsl(var(--success)); }
.text-destructive { color: hsl(var(--destructive)); }
.text-warning { color: hsl(38 92% 40%); }
.dark .text-warning { color: hsl(38 92% 60%); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 768px) { .grid-2 { grid-template-columns: 1fr; } }

@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.fade-in { animation: fadeIn 0.4s ease-out; }
@keyframes spin { to { transform: rotate(360deg); } }
.spinner {
  width: 28px; height: 28px; border-radius: 50%;
  border: 3px solid hsl(var(--muted));
  border-top-color: hsl(var(--primary));
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}
.spinner.sm { width: 16px; height: 16px; border-width: 2px; margin: 0; }

/* ── app shell ── */
.shell { display: flex; height: 100vh; overflow: hidden; }
.sidebar {
  width: 256px; flex-shrink: 0; display: flex; flex-direction: column;
  background: hsl(var(--sidebar)); color: hsl(var(--sidebar-foreground));
  transition: width 0.25s ease, transform 0.25s ease;
}
.shell.collapsed .sidebar { width: 76px; }
.shell.collapsed .sidebar .side-label { display: none; }
.shell.collapsed .side-item { justify-content: center; padding-left: 0; padding-right: 0; }
.side-brand { display: flex; align-items: center; gap: 10px; padding: 22px 16px; font-size: 17px; font-weight: 800; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 9px; flex-shrink: 0;
  background: hsl(var(--primary)); color: hsl(var(--primary-foreground));
  display: flex; align-items: center; justify-content: center;
}
.brand-mark .icon { width: 18px; height: 18px; }
.side-sep { border: 0; border-top: 1px solid hsl(var(--sidebar-accent)); margin: 0; }
.side-nav { flex: 1; padding: 14px 10px; display: flex; flex-direction: column; gap: 4px; }
.side-item {
  display: flex; align-items: center; gap: 12px; padding: 8px 12px;
  border-radius: 8px; font-size: 13.5px; font-weight: 500;
  color: hsl(var(--sidebar-foreground) / 0.7); transition: all 0.15s;
}
.side-item:hover, .side-item.active { background: hsl(var(--sidebar-accent)); color: hsl(var(--sidebar-accent-foreground)); }
.side-item .icon { width: 19px; height: 19px; }
/* Section label; its top border doubles as a group divider that persists when
   the sidebar is collapsed (the label text hides, the rule stays). */
.side-heading {
  padding: 10px 12px 4px; margin-top: 6px; border-top: 1px solid hsl(var(--sidebar-accent));
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: hsl(var(--sidebar-foreground) / 0.45);
}
.shell.collapsed .side-heading { padding: 8px 0 0; }
.side-foot { padding: 12px 10px; display: flex; flex-direction: column; gap: 6px; }
.side-user { display: flex; align-items: center; gap: 10px; padding: 6px 12px; font-size: 13px; font-weight: 500; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  background: hsl(var(--primary) / 0.25); color: hsl(var(--sidebar-foreground));
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
}

.main-wrap { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.topbar {
  height: 56px; flex-shrink: 0; display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid hsl(var(--border)); padding: 0 20px;
  background: hsl(var(--background));
}
.topbar h1 { font-size: 17px; font-weight: 600; }
.content { flex: 1; overflow-y: auto; }
.page { padding: 24px; max-width: 1200px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }

#mobile-overlay { position: fixed; inset: 0; background: rgb(0 0 0 / 0.5); z-index: 40; }
@media (max-width: 768px) {
  .sidebar { position: fixed; z-index: 50; height: 100vh; transform: translateX(-100%); }
  .shell.mobile-open .sidebar { transform: none; width: 256px; }
  #btn-collapse { display: none; }
  .page { padding: 16px; }
}
@media (min-width: 769px) { #btn-menu { display: none; } }

/* ── buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 8px 15px; border-radius: 8px; border: 1px solid transparent;
  font-size: 13.5px; font-weight: 500; cursor: pointer; white-space: nowrap;
  background: hsl(var(--primary)); color: hsl(var(--primary-foreground));
  transition: opacity 0.15s, background 0.15s;
}
.btn:hover { opacity: 0.9; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-outline { background: transparent; color: hsl(var(--foreground)); border-color: hsl(var(--input)); }
.btn-outline:hover { background: hsl(var(--muted)); opacity: 1; }
.btn-ghost { background: transparent; color: hsl(var(--foreground)); }
.btn-ghost:hover { background: hsl(var(--muted)); opacity: 1; }
.btn-destructive { background: hsl(var(--destructive)); color: hsl(var(--destructive-foreground)); }
.btn-sm { padding: 5px 11px; font-size: 12.5px; }
.btn-lg { padding: 11px 20px; font-size: 14.5px; }
.btn-icon { padding: 7px; }
.btn-icon .icon { width: 16px; height: 16px; }
.btn-block { width: 100%; }
.btn-side {
  background: transparent; color: hsl(var(--sidebar-foreground)); border: none; width: 100%;
  justify-content: flex-start;
}
.btn-side:hover { background: hsl(var(--sidebar-accent)); opacity: 1; }

/* ── forms ── */
.label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; }
.input, .select, .textarea {
  width: 100%; padding: 8px 12px; border-radius: 8px;
  border: 1px solid hsl(var(--input)); background: hsl(var(--card));
  color: hsl(var(--foreground)); outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: hsl(var(--ring)); box-shadow: 0 0 0 3px hsl(var(--ring) / 0.15);
}
.textarea { min-height: 80px; resize: vertical; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 34px; }
.field { margin-bottom: 14px; }
.field-error { color: hsl(var(--destructive)); font-size: 12px; margin-top: 4px; }
.checkbox { width: 16px; height: 16px; accent-color: hsl(var(--primary)); cursor: pointer; }
.input-search { padding-left: 34px; }
.search-wrap { position: relative; }
.search-wrap > .icon {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; color: hsl(var(--muted-foreground)); pointer-events: none;
}

/* ── card ── */
.card {
  background: hsl(var(--card)); color: hsl(var(--card-foreground));
  border: 1px solid hsl(var(--border)); border-radius: 12px;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.04);
}
.card-header { padding: 20px 20px 8px; }
.card-title { font-size: 15px; font-weight: 600; }
.card-desc { font-size: 12.5px; color: hsl(var(--muted-foreground)); margin-top: 3px; }
.card-content { padding: 16px 20px 20px; }
.card-dashed { border-style: dashed; box-shadow: none; }
.card:has(> .card-header:last-child) .card-header { padding-bottom: 20px; }
.metric-card { padding: 20px; transition: box-shadow 0.2s, border-color 0.2s; }
.metric-card:hover { box-shadow: 0 6px 16px rgb(0 0 0 / 0.07); border-color: hsl(var(--primary) / 0.25); }
.metric-icon { width: 36px; height: 36px; border-radius: 9px; display: flex; align-items: center; justify-content: center; }
.metric-icon .icon { width: 18px; height: 18px; }
.tint-primary { background: hsl(var(--primary) / 0.1); color: hsl(var(--primary)); }
.tint-green { background: hsl(142 71% 45% / 0.12); color: hsl(142 71% 35%); }
.tint-blue { background: hsl(217 91% 60% / 0.12); color: hsl(217 91% 50%); }
.tint-amber { background: hsl(38 92% 50% / 0.14); color: hsl(32 95% 40%); }

/* ── badges ── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 600; white-space: nowrap;
  background: hsl(var(--primary)); color: hsl(var(--primary-foreground));
}
.badge-secondary { background: hsl(var(--secondary)); color: hsl(var(--secondary-foreground)); }
.badge-outline { background: transparent; color: hsl(var(--foreground)); border: 1px solid hsl(var(--border)); }
.badge-destructive { background: hsl(var(--destructive)); color: hsl(var(--destructive-foreground)); }
.badge-green { background: hsl(142 71% 45% / 0.15); color: hsl(142 71% 28%); }
.badge-blue { background: hsl(217 91% 60% / 0.15); color: hsl(217 91% 40%); }
.badge-gray { background: hsl(var(--muted)); color: hsl(var(--muted-foreground)); }
.badge-amber { background: hsl(38 92% 50% / 0.15); color: hsl(32 95% 35%); }
.dark .badge-green { color: hsl(142 71% 65%); }
.dark .badge-blue { color: hsl(217 91% 70%); }
.dark .badge-amber { color: hsl(38 92% 65%); }

/* ── tabs ── */
.tabs { display: inline-flex; gap: 2px; background: hsl(var(--muted)); border-radius: 9px; padding: 3px; }
.tab {
  padding: 6px 14px; border: none; border-radius: 7px; cursor: pointer;
  background: transparent; color: hsl(var(--muted-foreground));
  font-size: 13px; font-weight: 500;
}
.tab.active { background: hsl(var(--card)); color: hsl(var(--foreground)); box-shadow: 0 1px 2px rgb(0 0 0 / 0.08); }
.tabs-line { display: flex; gap: 2px; border-bottom: 1px solid hsl(var(--border)); }
.tab-line {
  padding: 9px 16px; border: none; border-bottom: 2px solid transparent; cursor: pointer;
  background: none; color: hsl(var(--muted-foreground)); font-size: 13.5px; font-weight: 500;
  margin-bottom: -1px;
}
.tab-line.active { color: hsl(var(--primary)); border-bottom-color: hsl(var(--primary)); }

/* ── tables ── */
.table-wrap { overflow-x: auto; border: 1px solid hsl(var(--border)); border-radius: 12px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th {
  text-align: left; padding: 10px 14px; font-weight: 600; font-size: 12px;
  color: hsl(var(--muted-foreground)); border-bottom: 1px solid hsl(var(--border));
  background: hsl(var(--muted) / 0.5);
}
.tbl td { padding: 9px 14px; border-bottom: 1px solid hsl(var(--border)); }
.tbl tr:last-child td { border-bottom: none; }
.tbl tbody tr:hover { background: hsl(var(--muted) / 0.3); }

/* matrix tables (reports) */
.matrix-wrap { overflow-x: auto; }
table.matrix { border-collapse: collapse; font-size: 11.5px; }
.matrix th, .matrix td { border: 1px solid hsl(var(--border)); padding: 5px 9px; text-align: center; white-space: nowrap; }
.matrix th { background: hsl(var(--muted)); font-weight: 600; font-size: 11px; }
.matrix .rowhead { position: sticky; left: 0; z-index: 5; background: hsl(var(--card)); text-align: left; font-weight: 500; }
.matrix th.rowhead { background: hsl(var(--muted)); z-index: 6; }
.matrix .diag { background: hsl(var(--muted) / 0.6); color: hsl(var(--muted-foreground) / 0.5); }
.matrix .cell-pos, .matrix .tot-pos { color: hsl(142 71% 30%); font-weight: 700; }
.matrix .cell-neg, .matrix .tot-neg { color: hsl(0 72% 45%); font-weight: 700; }
.matrix .cell-both { color: hsl(32 95% 40%); font-weight: 700; }
.matrix .tot-pos { background: hsl(142 71% 45% / 0.1); }
.matrix .tot-neg { background: hsl(0 84% 60% / 0.08); }
.dark .matrix .cell-pos, .dark .matrix .tot-pos { color: hsl(142 71% 60%); }
.dark .matrix .cell-neg, .dark .matrix .tot-neg { color: hsl(0 84% 65%); }
.dark .matrix .cell-both { color: hsl(38 92% 60%); }

/* ── dialogs ── */
dialog {
  border: 1px solid hsl(var(--border)); border-radius: 14px; padding: 0;
  background: hsl(var(--card)); color: hsl(var(--card-foreground));
  width: min(480px, calc(100vw - 32px)); max-height: 90vh;
  box-shadow: 0 20px 50px rgb(0 0 0 / 0.25);
}
dialog.dlg-wide { width: min(860px, calc(100vw - 32px)); }
dialog::backdrop { background: rgb(0 0 0 / 0.55); }
.dlg-body { padding: 22px; overflow-y: auto; max-height: calc(90vh - 4px); }
.dlg-title { font-size: 16px; font-weight: 600; }
.dlg-desc { font-size: 12.5px; color: hsl(var(--muted-foreground)); margin: 4px 0 16px; }
.dlg-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

/* ── toasts ── */
#toasts { position: fixed; bottom: 20px; right: 20px; z-index: 100; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: hsl(var(--card)); color: hsl(var(--card-foreground));
  border: 1px solid hsl(var(--border)); border-radius: 10px;
  padding: 11px 16px; font-size: 13px; font-weight: 500;
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.15);
  display: flex; align-items: center; gap: 8px; max-width: 340px;
  animation: fadeIn 0.25s ease-out;
}
.toast.err { border-color: hsl(var(--destructive) / 0.5); }
.toast .icon { width: 16px; height: 16px; }
.toast.ok .icon { color: hsl(var(--success)); }
.toast.err .icon { color: hsl(var(--destructive)); }
.toast.info .icon { color: hsl(var(--primary)); }

/* ── misc components ── */
.skeleton { background: hsl(var(--muted)); border-radius: 8px; animation: pulse 1.5s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.5; } }
.progress { background: hsl(var(--muted)); border-radius: 999px; height: 6px; overflow: hidden; flex: 1; }
.progress > div { background: hsl(var(--primary)); height: 100%; border-radius: 999px; transition: width 0.3s; }
.empty {
  text-align: center; padding: 56px 20px; color: hsl(var(--muted-foreground));
  border: 1px dashed hsl(var(--border)); border-radius: 12px;
}
.empty .icon { width: 44px; height: 44px; opacity: 0.4; margin-bottom: 12px; }
.empty .empty-title { font-size: 15px; font-weight: 600; color: hsl(var(--foreground)); }
.banner {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px;
  border-radius: 10px; border: 1px solid; font-size: 13px;
}
.banner-blue { border-color: hsl(217 91% 60% / 0.35); background: hsl(217 91% 60% / 0.08); }
.banner-green { border-color: hsl(142 71% 45% / 0.35); background: hsl(142 71% 45% / 0.08); }
.banner-amber { border-color: hsl(38 92% 50% / 0.4); background: hsl(38 92% 50% / 0.09); color: hsl(32 80% 30%); }
.dark .banner-amber { color: hsl(38 92% 70%); }
.banner-red { border-color: hsl(var(--destructive) / 0.4); background: hsl(var(--destructive) / 0.07); }
.access-code-box {
  background: hsl(var(--primary) / 0.05); border: 1px solid hsl(var(--primary) / 0.2);
  border-radius: 10px; padding: 12px;
}
.access-code { font-family: ui-monospace, monospace; font-size: 24px; font-weight: 800; letter-spacing: 0.3em; text-align: center; }
.status-pill { display: inline-block; font-size: 11px; padding: 2px 9px; border-radius: 999px; font-weight: 600; white-space: nowrap; }

/* ── landing / auth ── */
.land-nav {
  position: sticky; top: 0; z-index: 40;
  background: hsl(var(--background) / 0.85); backdrop-filter: blur(10px);
  border-bottom: 1px solid hsl(var(--border));
}
.land-nav-inner {
  max-width: 1120px; margin: 0 auto; padding: 12px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.land-nav-links { display: flex; gap: 22px; }
.land-nav-links a { color: hsl(var(--muted-foreground)); font-weight: 500; }
.land-nav-links a:hover { color: hsl(var(--foreground)); }
@media (max-width: 720px) { .land-nav-links { display: none; } }
.land-hero {
  max-width: 1120px; margin: 0 auto; padding: 64px 24px 32px;
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center;
}
.land-hero-copy h1 { font-size: clamp(30px, 4.5vw, 44px); font-weight: 800; letter-spacing: -0.8px; line-height: 1.12; margin: 14px 0 14px; }
.land-hero-visual { overflow: hidden; }
.land-hero-visual img { display: block; width: 100%; height: auto; padding: 10px 10px 0; background: #fff; border-radius: 12px; }
.dark .land-hero-visual img, .dark .showcase-grid img { background: #fff; }
@media (max-width: 880px) { .land-hero { grid-template-columns: 1fr; padding-top: 40px; } }
.land-section { max-width: 1120px; margin: 0 auto; padding: 48px 24px; text-align: center; }
.land-h2 { font-size: 26px; font-weight: 800; letter-spacing: -0.3px; margin-bottom: 6px; }
.land-sub { max-width: 560px; margin: 0 auto; }
.showcase-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 32px;
}
.showcase-grid img { display: block; width: 100%; height: auto; border: 1px solid hsl(var(--border)); border-radius: 10px; background: #fff; padding: 6px; }
@media (max-width: 880px) { .showcase-grid { grid-template-columns: 1fr; } }
.steps-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 32px; }
@media (max-width: 880px) { .steps-grid { grid-template-columns: 1fr; } }
.step-num {
  display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center;
  border-radius: 10px; background: hsl(var(--primary) / 0.12); color: hsl(var(--primary));
  font-weight: 800; font-size: 16px;
}
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin: 48px 0 40px; text-align: left; }
.feature-grid .card-content { padding: 22px; }
.feature-grid .icon { width: 28px; height: 28px; color: hsl(var(--primary)); margin-bottom: 10px; }
.auth-card {
  width: 100%; max-width: 420px; margin: 0 auto 64px;
  background: hsl(222 47% 13%); color: white;
  border: 1px solid hsl(222 47% 22%); border-radius: 14px;
  box-shadow: 0 24px 60px rgb(0 0 0 / 0.3);
}
.auth-head { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 30px 24px 22px; border-bottom: 1px solid hsl(222 47% 22%); }
.auth-head .brand-mark { width: 46px; height: 46px; background: linear-gradient(135deg, hsl(210 90% 55%), hsl(190 90% 45%)); }
.auth-head .brand-mark .icon { width: 24px; height: 24px; }
.auth-body { padding: 24px; }
.auth-body .tabs { display: flex; width: 100%; background: hsl(222 47% 20%); margin-bottom: 20px; }
.auth-body .tab { flex: 1; color: hsl(215 20% 70%); }
.auth-body .tab.active { background: hsl(222 47% 28%); color: white; box-shadow: none; }
.auth-body .label { color: hsl(215 20% 80%); }
.auth-body .input { background: hsl(222 47% 18%); border-color: hsl(222 47% 28%); color: white; }
.auth-body .input::placeholder { color: hsl(215 16% 50%); }
.auth-body .btn-primary-grad { background: linear-gradient(90deg, hsl(210 90% 55%), hsl(190 90% 45%)); color: white; width: 100%; }

/* ── public pages (join / survey) ── */
.public-bg {
  min-height: 100vh; display: flex; flex-direction: column;
  background: linear-gradient(135deg, hsl(204 94% 96%), hsl(0 0% 100%), hsl(168 60% 95%));
}
.dark .public-bg { background: linear-gradient(135deg, hsl(222 47% 5%), hsl(222 47% 8%), hsl(222 47% 5%)); }
.public-center { flex: 1; display: flex; align-items: center; justify-content: center; padding: 16px; }
.code-boxes { display: flex; gap: 8px; justify-content: center; }
.code-box {
  width: 40px; height: 48px; text-align: center;
  font-family: ui-monospace, monospace; font-size: 18px; font-weight: 700;
  border: 2px solid hsl(var(--border)); border-radius: 10px;
  background: hsl(var(--card)); color: hsl(var(--foreground)); outline: none;
  text-transform: uppercase; transition: border-color 0.15s;
}
.code-box.filled { border-color: hsl(var(--primary)); background: hsl(var(--primary) / 0.05); }
.code-box:focus { border-color: hsl(var(--primary)); box-shadow: 0 0 0 3px hsl(var(--ring) / 0.18); }
.code-box.error { border-color: hsl(var(--destructive)); }

.pick-item {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border: 1px solid hsl(var(--border)); border-radius: 12px; cursor: pointer;
  background: hsl(var(--card)); text-align: left; transition: all 0.15s; font-size: 13.5px; font-weight: 500;
}
.pick-item:hover { border-color: hsl(var(--primary) / 0.55); background: hsl(var(--primary) / 0.05); }
.pick-item.picked { border-color: hsl(var(--primary)); background: hsl(var(--primary) / 0.1); }
.pick-item:disabled { opacity: 0.4; cursor: not-allowed; }
.pick-item .avatar { background: hsl(var(--primary) / 0.12); color: hsl(var(--primary)); }
.chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px;
  border-radius: 999px; border: none; cursor: pointer;
  background: hsl(var(--primary) / 0.1); color: hsl(var(--primary));
  font-size: 12px; font-weight: 600;
}
.chip:hover { background: hsl(var(--destructive) / 0.12); color: hsl(var(--destructive)); }

/* ── sociogram canvas ── */
.socio-canvas {
  border: 1px solid hsl(var(--border)); border-radius: 14px; overflow: hidden;
  background: white; position: relative; height: 560px; touch-action: none;
}
.dark .socio-canvas { background: hsl(222 47% 7%); }
.socio-canvas > svg { display: block; width: 100%; height: 100%; cursor: grab; }
.socio-canvas > svg.panning { cursor: grabbing; }
.socio-node { cursor: pointer; }
.socio-controls {
  position: absolute; bottom: 12px; left: 12px; display: flex; flex-direction: column; gap: 4px;
  background: hsl(var(--card)); border: 1px solid hsl(var(--border));
  border-radius: 8px; padding: 3px; box-shadow: 0 2px 8px rgb(0 0 0 / 0.1);
}
.socio-controls button {
  border: none; background: none; cursor: pointer; padding: 6px;
  border-radius: 5px; display: flex; color: hsl(var(--foreground));
}
.socio-controls button:hover { background: hsl(var(--muted)); }

/* ── clustering (force-directed) view ── */
.cluster-node { cursor: pointer; }

/* ── print report ── */
.print-only { display: none; }
.no-print { }            /* visible on screen; hidden in @media print below */
@media print {
  @page { margin: 12mm; }
  body { background: white; }
  /* isolate the report: hide everything, then reveal just the report subtree */
  body * { visibility: hidden; }
  .print-report, .print-report * { visibility: visible; }
  .print-report { position: absolute; left: 0; top: 0; width: 100%; }
  .print-report .no-print { display: none !important; }
  .print-report .print-only { display: block; }
  .print-card { border: none !important; box-shadow: none !important; }
  .socio-controls { display: none !important; }
}

/* ── dashboard chart ── */
.chart-box { position: relative; height: 280px; }
.chart-box svg { width: 100%; height: 100%; display: block; }
.chart-tip {
  position: absolute; pointer-events: none; z-index: 10;
  background: hsl(var(--card)); border: 1px solid hsl(var(--border));
  border-radius: 8px; padding: 7px 11px; font-size: 12px;
  box-shadow: 0 4px 14px rgb(0 0 0 / 0.12); white-space: nowrap;
}
