:root {
  --bg: #101216;
  --panel: #171b22;
  --panel-2: #1c212b;
  --border: #2a313e;
  --text: #e9edf5;
  --muted: #a9b1c0;
  --primary: #7aa8ff;
  --danger: #f25f70;
  --success: #38c98d;
  --warning: #f2b355;
  --radius: 10px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Sora", "Segoe UI", sans-serif;
  line-height: 1.45;
}

.container {
  width: min(980px, calc(100% - 2rem));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(16, 18, 22, 0.94);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.brand-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
}

.brand-text {
  color: var(--text);
  font-weight: 700;
}

.main-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}

.nav-link:hover {
  color: var(--text);
}

.page-shell {
  padding: 24px 0 48px;
}

[data-reveal] {
  animation: fade-in 180ms ease-out both;
  animation-delay: var(--delay, 0ms);
}

.hero {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}

.hero-minimal {
  max-width: 760px;
}

.simple-home {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.simple-home .hero-actions {
  justify-content: center;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 700;
}

.hero-title,
.page-title {
  margin: 0;
  font-size: clamp(1.5rem, 2.8vw, 2.2rem);
  line-height: 1.18;
}

.hero-copy {
  margin: 12px 0 0;
  color: var(--muted);
}

.invite-form {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.invite-ok {
  margin: 10px 0 0;
  color: var(--success);
  font-weight: 600;
}

.inline-error {
  margin: 10px 0 0;
  color: var(--danger);
  min-height: 1.2em;
}

.hero-actions {
  margin-top: 14px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.dashboard-head {
  margin-bottom: 12px;
}

.layout-two-col {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 12px;
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.stat-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
}

.stat-label {
  color: var(--muted);
  font-size: 0.75rem;
}

.stat-value {
  display: block;
  margin-top: 4px;
  font-size: 1.05rem;
}

.panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.glass-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
}

.glass-card h2 {
  margin: 0 0 10px;
}

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

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 600;
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

input[type="text"],
input[type="number"],
select,
textarea {
  width: 100%;
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.btn {
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.92rem;
}

.btn-primary {
  background: var(--primary);
  color: #0c1728;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.inline-form {
  display: inline;
}

.table-wrap {
  overflow: auto;
}

.collapse-card summary {
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}

.collapse-card summary::-webkit-details-marker {
  display: none;
}

.collapse-card summary::after {
  content: "▼";
  float: right;
  color: var(--muted);
  font-size: 0.8rem;
}

.collapse-card[open] summary::after {
  content: "▲";
}

.collapse-body {
  margin-top: 12px;
  display: grid;
  gap: 12px;
}

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

th,
td {
  text-align: left;
  padding: 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

.flash-wrap {
  margin-bottom: 12px;
  display: grid;
  gap: 8px;
}

.flash {
  border-radius: 8px;
  padding: 8px 10px;
  border: 1px solid transparent;
  font-weight: 600;
}

.flash-success {
  background: rgba(56, 201, 141, 0.13);
  border-color: rgba(56, 201, 141, 0.38);
}

.flash-danger {
  background: rgba(242, 95, 112, 0.13);
  border-color: rgba(242, 95, 112, 0.38);
}

.flash-warning {
  background: rgba(242, 179, 85, 0.13);
  border-color: rgba(242, 179, 85, 0.38);
}

.flash-info {
  background: rgba(122, 168, 255, 0.13);
  border-color: rgba(122, 168, 255, 0.38);
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .layout-two-col,
  .panel-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .header-inner {
    min-height: 58px;
  }

  .stats-strip {
    grid-template-columns: 1fr;
  }

  .invite-form {
    grid-template-columns: 1fr;
  }
}
