/* Spin — landing page, sign in / sign up, "My companies" and "not found". Builds on base.css. */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(70% 50% at 85% 0%, rgba(25, 178, 255, 0.1), transparent 70%),
    radial-gradient(60% 50% at 0% 30%, rgba(68, 228, 188, 0.12), transparent 70%),
    var(--surface-2);
}
main {
  flex: 1;
}
.wrap {
  width: min(1120px, 100% - 32px);
  margin-inline: auto;
}
a {
  color: var(--teal-600);
  font-weight: 700;
}

/* ---------- Top bar ---------- */
.site-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-bar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
}
.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}
.site-logo img {
  width: 38px;
  height: 38px;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}
.site-nav .who {
  font-size: 14px;
  color: var(--ink-2);
  margin-right: 4px;
}

/* ---------- Landing ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: 40px;
  padding: 56px 0 40px;
}
.eyebrow {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--teal-700);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hero h1 {
  margin-top: 14px;
  font-size: clamp(36px, 5.4vw, 60px);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: -0.03em;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--teal) 10%, var(--blue) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p.lead {
  margin-top: 16px;
  max-width: 46ch;
  font-size: 18px;
  color: var(--ink-2);
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}
.btn-lg {
  min-height: 52px;
  padding: 14px 26px;
  font-size: 17px;
}
.hero-note {
  margin-top: 12px;
  font-size: 14px;
  color: var(--ink-3);
}
.demo {
  display: grid;
  justify-items: center;
  gap: 14px;
}
.demo-wheel {
  width: min(100%, 420px);
  cursor: pointer;
}
.demo-result {
  min-height: 28px;
  font-weight: 800;
  color: var(--teal-700);
  text-align: center;
}

.section {
  padding: 36px 0;
}
.section h2 {
  font-size: clamp(26px, 3.4vw, 34px);
  font-weight: 900;
  letter-spacing: -0.02em;
  text-align: center;
}
.section > .wrap > p.sub {
  margin: 8px auto 0;
  max-width: 56ch;
  text-align: center;
  color: var(--ink-2);
}
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 14px;
  margin-top: 26px;
}
.feature {
  padding: 20px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
}
.feature .ico {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--surface-3);
  font-size: 22px;
}
.feature h3 {
  margin-top: 12px;
  font-size: 17px;
  font-weight: 800;
}
.feature p {
  margin-top: 4px;
  font-size: 15px;
  color: var(--ink-2);
}
.steps-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  gap: 14px;
  margin-top: 26px;
  counter-reset: step;
}
.step {
  position: relative;
  padding: 20px 20px 20px 66px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  counter-increment: step;
}
.step::before {
  content: counter(step);
  position: absolute;
  left: 18px;
  top: 18px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal-600), var(--blue));
  color: #fff;
  font-weight: 900;
}
.step h3 {
  font-size: 16px;
  font-weight: 800;
}
.step p {
  font-size: 14px;
  color: var(--ink-2);
}
.final-cta {
  display: grid;
  justify-items: center;
  gap: 12px;
  margin: 20px 0 40px;
  padding: 36px 20px;
  border-radius: 28px;
  background: linear-gradient(120deg, var(--teal-700), var(--teal) 50%, #0b7fc0);
  color: #fff;
  text-align: center;
}
.final-cta h2 {
  color: #fff;
}
.final-cta .btn {
  background: #fff;
  color: var(--teal-700);
}
.site-foot {
  padding: 20px 0 28px;
  font-size: 13px;
  color: var(--ink-3);
  text-align: center;
}

/* ---------- Auth card ---------- */
.auth {
  display: grid;
  place-items: center;
  padding: 40px 16px 56px;
}
.auth-card {
  width: min(100%, 440px);
  padding: 28px;
  display: grid;
  gap: 16px;
}
.auth-card h1 {
  font-size: 26px;
  font-weight: 900;
  text-align: center;
}
.auth-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  border-radius: 999px;
  background: var(--surface-3);
}
.auth-switch button {
  min-height: 40px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-weight: 800;
  color: var(--ink-2);
  cursor: pointer;
}
.auth-switch button[aria-selected='true'] {
  background: var(--surface);
  color: var(--teal-700);
  box-shadow: var(--shadow-sm);
}
.form {
  display: grid;
  gap: 14px;
}
.form .field-error:empty {
  display: none;
}
.btn-block {
  width: 100%;
}
.center {
  text-align: center;
}
.notice {
  padding: 12px 14px;
  border-radius: var(--radius);
  font-size: 14px;
  background: var(--surface-3);
  color: var(--ink);
  border: 1px solid var(--line);
}
.notice-error {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: #fecdca;
}

/* ---------- My companies ---------- */
.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 32px 0 18px;
}
.page-head h1 {
  font-size: clamp(26px, 3.6vw, 34px);
  font-weight: 900;
  letter-spacing: -0.02em;
}
.page-head p {
  color: var(--ink-2);
}
.companies {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: 14px;
}
.company {
  display: grid;
  gap: 14px;
  padding: 18px;
}
.company-top {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}
.company-top img {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  object-fit: contain;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
}
.company-name {
  font-size: 18px;
  font-weight: 900;
  overflow-wrap: anywhere;
}
.company-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 6px 6px 12px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 13px;
}
.company-link span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.company-stats {
  display: flex;
  gap: 16px;
  font-size: 14px;
  color: var(--ink-2);
}
.company-stats strong {
  color: var(--ink);
  font-size: 16px;
}
.company-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.company-actions .btn-primary {
  flex: 1;
}
.company-actions .btn-ghost {
  padding-inline: 10px;
}
.more {
  position: relative;
}
.empty-companies {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 36px 20px;
  text-align: center;
  border: 2px dashed var(--line-2);
  border-radius: var(--radius-lg);
  color: var(--ink-2);
}
.empty-companies img {
  width: 64px;
  height: 64px;
}

.create-card,
.settings-card {
  padding: 22px;
}
.create-card h2,
.settings-card h2 {
  font-size: 20px;
  font-weight: 900;
}
.slug-row {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface);
}
.slug-row:focus-within {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(25, 178, 255, 0.35);
}
.slug-prefix {
  display: flex;
  align-items: center;
  padding: 0 4px 0 12px;
  background: var(--surface-2);
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 14px;
  white-space: nowrap;
}
.slug-row .input {
  border: 0;
  border-radius: 0;
  box-shadow: none !important;
  font-family: var(--mono);
}
.slug-status {
  font-size: 13px;
  font-weight: 700;
}
.slug-status.ok {
  color: var(--success);
}
.slug-status.bad {
  color: var(--danger);
}
.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 14px;
  align-items: start;
}
.section-title {
  margin: 34px 0 14px;
  font-size: 22px;
  font-weight: 900;
}

dialog.site-dialog {
  width: min(92vw, 440px);
  padding: 24px;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 30px 80px rgba(5, 30, 34, 0.35);
}
dialog.site-dialog::backdrop {
  background: rgba(5, 30, 34, 0.55);
}
dialog.site-dialog form {
  display: grid;
  gap: 14px;
}
dialog.site-dialog h2 {
  font-size: 20px;
  font-weight: 900;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ---------- Not found ---------- */
.lost {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 80px 20px;
  text-align: center;
}
.lost img {
  width: 96px;
  height: 96px;
}
.lost h1 {
  font-size: 30px;
  font-weight: 900;
}

@media (max-width: 820px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 32px;
    text-align: center;
  }
  .hero p.lead {
    margin-inline: auto;
  }
  .cta-row {
    justify-content: center;
  }
  .demo-wheel {
    width: min(100%, 280px);
  }
}
@media (max-width: 520px) {
  .site-nav .who {
    display: none;
  }
  .site-logo {
    font-size: 19px;
  }
  .companies {
    grid-template-columns: 1fr;
  }
  .slug-host {
    display: none;
  }
}

/* ---------- Super Admin Console ---------- */
.account-tabs {
  display: flex;
  gap: 8px;
  margin: 20px 0 28px;
  border-bottom: 2px solid var(--line);
}
.tab-btn {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-2);
  padding: 10px 18px;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.15s ease;
}
.tab-btn:hover {
  color: var(--ink);
  background: var(--surface-3);
}
.tab-btn.active {
  color: var(--teal-700);
  background: var(--surface);
  border-bottom-color: var(--teal);
  font-weight: 800;
}
.tab-tag {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--teal-700);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.tab-btn.active .tab-tag {
  background: var(--teal-600);
  color: #fff;
}

.pill-super {
  background: linear-gradient(135deg, #fef3c7, #fef08a);
  color: #854d0e;
  border: 1px solid #fde047;
  font-weight: 800;
}
.pill-admin {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
  font-weight: 700;
}
.pill-staff {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
  font-weight: 700;
}
.pill-user {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
  font-weight: 700;
}

.super-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.super-stat-card {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stat-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.stat-value {
  font-size: 32px;
  font-weight: 900;
  color: var(--ink);
  line-height: 1.1;
}
.stat-sub {
  font-size: 12px;
  color: var(--ink-2);
}

.role-guide-card {
  padding: 20px 24px;
  margin-bottom: 32px;
}
.role-guide-card h2 {
  font-size: 18px;
  font-weight: 900;
}
.role-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 14px;
}
.role-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.45;
}

.super-section {
  margin-top: 36px;
}
.section-header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}
.section-desc {
  font-size: 14px;
  color: var(--ink-2);
  margin-top: 4px;
}
.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}
.input-sm {
  padding: 6px 12px;
  font-size: 14px;
  height: 38px;
  border-radius: var(--radius-sm);
}

.table-card {
  overflow: hidden;
}
.table-scroll {
  overflow-x: auto;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  text-align: left;
}
.data-table th {
  background: var(--surface-2);
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-3);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.data-table tr:last-child td {
  border-bottom: none;
}
.data-table tr:hover td {
  background: color-mix(in srgb, var(--surface-3) 40%, transparent);
}
.data-table th.actions-col,
.data-table td.actions-col {
  text-align: right;
  white-space: nowrap;
}
.actions-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}
.user-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.user-cell strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}
.user-cell span {
  color: var(--ink-3);
  font-size: 13px;
  font-family: var(--mono);
}
.company-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}
.company-cell img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  flex: none;
}
.company-cell-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.company-cell-name {
  font-weight: 700;
  color: var(--ink);
}
.company-cell-slug {
  font-size: 12px;
  color: var(--ink-3);
  font-family: var(--mono);
}

.role-radio-group {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}
.role-radio-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s ease;
}
.role-radio-card:hover {
  border-color: var(--teal);
  background: var(--surface-2);
}
.role-radio-card.selected {
  border-color: var(--teal);
  background: var(--surface-3);
  box-shadow: 0 0 0 2px var(--teal);
}
.role-radio-card input {
  margin-top: 3px;
  accent-color: var(--teal);
}
.role-card-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: var(--ink-2);
}
.role-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
}
