* {
  box-sizing: border-box;
}

:root {
  --bg: #f5f7fb;
  --text: #1f2937;
  --muted: #64748b;
  --card: #ffffff;
  --line: #e5e7eb;
  --line-soft: #e2e8f0;
  --thead: #f8fafc;
  --primary: #2563eb;
  --success: #16a34a;
  --warning: #f59e0b;
  --danger: #dc2626;
  --purple: #7c3aed;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  background: #0f172a;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.topbar-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
}

.brand-title {
  font-size: 18px;
  font-weight: 700;
}

.brand-subtitle {
  font-size: 13px;
  color: #cbd5e1;
}

.nav {
  display: flex;
  gap: 16px;
}

.nav a {
  color: #e5e7eb;
  text-decoration: none;
  font-size: 14px;
}

.page {
  padding: 32px 0 48px;
}

.card {
  background: var(--card);
  border-radius: 20px;
  padding: 28px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(226, 232, 240, 0.7);
}

.auth-card {
  max-width: 480px;
  margin: 24px auto 0;
}

h1 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 28px;
  line-height: 1.2;
}

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

.form-grid {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

label {
  font-size: 14px;
  font-weight: 600;
}

input {
  height: 46px;
  border: 1px solid #dbe2ea;
  border-radius: 12px;
  padding: 0 14px;
  font-size: 15px;
}

.btn {
  height: 44px;
  border: 0;
  border-radius: 12px;
  padding: 0 16px;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-warning {
  background: var(--warning);
  color: white;
}

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

.btn-small {
  height: 34px;
  padding: 0 10px;
  font-size: 12px;
}

.auth-note {
  margin-top: 16px;
  font-size: 14px;
}

.auth-note a {
  color: var(--primary);
  text-decoration: none;
}

.flash-list {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.flash {
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
}

.flash-success { background: #dcfce7; color: #166534; }
.flash-danger  { background: #fee2e2; color: #991b1b; }
.flash-warning { background: #fef3c7; color: #92400e; }
.flash-info    { background: #dbeafe; color: #1d4ed8; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 24px 0;
}

.stat-box {
  background: #f8fafc;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  padding: 18px;
}

.stat-label {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 6px;
}

.stat-value {
  font-size: 20px;
  font-weight: 700;
}

.info-box {
  background: #f8fafc;
  border: 1px solid var(--line-soft);
  padding: 18px;
  border-radius: 16px;
}

/* -------- Admin page head -------- */
.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.page-head h1 {
  margin-bottom: 6px;
}

.summary-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 14px;
  white-space: nowrap;
}

.summary-chip strong {
  font-size: 15px;
}

/* -------- Table -------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: #fff;
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 0;
  min-width: 1100px;
}

.table th,
.table td {
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

.table th {
  background: var(--thead);
  font-weight: 700;
  color: #111827;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
}

.table tbody tr:hover {
  background: #fafcff;
}

.table tbody tr:last-child td {
  border-bottom: none;
}

.table a {
  color: #1d4ed8;
  text-decoration: none;
}

.table a:hover {
  text-decoration: underline;
}

.action-group {
  display: grid;
  gap: 8px;
  min-width: 150px;
}

/* -------- Badge -------- */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  border: 1px solid transparent;
  white-space: nowrap;
}

.badge-admin {
  background: #f3e8ff;
  color: #6d28d9;
  border-color: #ddd6fe;
}

.badge-member {
  background: #eef2ff;
  color: #4338ca;
  border-color: #c7d2fe;
}

.badge-active {
  background: #ecfdf3;
  color: #15803d;
  border-color: #bbf7d0;
}

.badge-pending {
  background: #fff7ed;
  color: #c2410c;
  border-color: #fed7aa;
}

.badge-suspended {
  background: #fffbeb;
  color: #b45309;
  border-color: #fde68a;
}

.badge-expired {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}

/* -------- Empty state -------- */
.empty-state {
  padding: 24px 16px;
  text-align: center;
  color: var(--muted);
  background: #f8fafc;
  border-radius: 12px;
}

/* -------- Responsive -------- */
@media (max-width: 768px) {
  .topbar-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
  }

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

  .card {
    padding: 20px;
  }

  .page-head {
    flex-direction: column;
  }

  .summary-chip {
    white-space: normal;
  }
}
.member-cta-box {
  margin-top: 20px;
}

.status-box {
  margin-top: 20px;
}

.status-pending {
  background: #fff7ed;
  border-color: #fed7aa;
}

.status-expired {
  background: #fef2f2;
  border-color: #fecaca;
}

.status-suspended {
  background: #fffbeb;
  border-color: #fde68a;
}

.section-title {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 700;
}

.cta-row {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.action-row{
  display:flex;
  flex-wrap:wrap;
  gap:14px;
  margin-top:24px;
}
.brand-link{
  text-decoration:none;
  color:inherit;
}

.brand-link:hover{
  opacity:.96;
}

.brand-link .brand-title,
.brand-link .brand-subtitle{
  color:inherit;
}
.badge-customer {
  background: #ecfeff;
  color: #0e7490;
  border-color: #a5f3fc;
}

.badge-broker {
  background: #f0fdf4;
  color: #15803d;
  border-color: #bbf7d0;
}

.badge-email {
  background: #f5f3ff;
  color: #6d28d9;
  border-color: #ddd6fe;
}
