* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: #f8fafc;
  color: #0f172a;
  font-family: Arial, Helvetica, sans-serif;
}

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

.hidden {
  display: none !important;
}

.app-shell {
  max-width: 1440px;
  min-height: 100vh;
  margin: 0 auto;
  display: flex;
  gap: 24px;
  padding: 24px;
}

.sidebar {
  width: 280px;
  flex-shrink: 0;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.brand-kicker {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: #64748b;
  font-weight: 700;
}

.brand-title {
  margin: 8px 0 0;
  font-size: 34px;
  line-height: 1.1;
}

.brand-copy {
  color: #475569;
  line-height: 1.6;
  font-size: 14px;
  margin: 12px 0 0;
}

.sidebar-nav {
  margin-top: 28px;
  display: grid;
  gap: 8px;
}

.nav-item {
  padding: 14px 16px;
  border-radius: 16px;
  color: #334155;
}

.nav-item-active {
  background: #0f172a;
  color: #fff;
}

.content {
  flex: 1;
  min-width: 0;
}

.card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.auth-card {
  max-width: 760px;
  margin: 48px auto 0;
}

.auth-header,
.dashboard-header,
.section-head,
.section-head.compact,
.profile-head,
.actions {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.section-head.compact {
  align-items: center;
}

.form-grid {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.form-grid input,
.form-grid select,
.form-grid textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  padding: 14px 16px;
  background: #fff;
}

.btn {
  border: 0;
  border-radius: 16px;
  padding: 12px 16px;
  cursor: pointer;
}

.btn-primary {
  background: #0f172a;
  color: #fff;
}

.btn-secondary {
  background: #fff;
  color: #334155;
  border: 1px solid #cbd5e1;
}

.eyebrow {
  color: #64748b;
  font-size: 14px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
  gap: 24px;
  margin-top: 24px;
}

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

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

.profile-card {
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  padding: 16px;
}

.avatar {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: #f1f5f9;
  color: #334155;
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 700;
  flex-shrink: 0;
}

.profile-head h4 {
  margin: 0 0 4px;
}

.profile-head p,
.section-head p {
  margin: 0;
  color: #64748b;
  font-size: 14px;
}

.profile-body {
  margin-top: 16px;
  display: grid;
  gap: 8px;
  color: #475569;
  font-size: 14px;
  line-height: 1.6;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 12px;
}

.badge.dark {
  background: #0f172a;
  color: #fff;
}

.chips {
  margin-top: 16px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  background: #f1f5f9;
  color: #334155;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
}

.actions {
  margin-top: 16px;
}

.actions .btn {
  width: 100%;
}

.alert {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  font-size: 14px;
}

.alert-error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.alert-success {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.match-card,
.empty-state {
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 14px;
  color: #475569;
  font-size: 14px;
  background: #fff;
}

.match-name {
  font-weight: 700;
  color: #0f172a;
}

.match-note {
  margin-top: 4px;
}

@media (max-width: 1100px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    display: none;
  }

  .dashboard-grid,
  .profiles-grid {
    grid-template-columns: 1fr;
  }
}
