/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Syne', sans-serif;
  font-size: 14px;
  background: #f7f5fb;
  color: #2a2a2a;
  line-height: 1.5;
}

/* === Header === */
.header {
  background: #ffffff;
  height: 72px;
  border-bottom: 1px solid #ddd8eb;
  box-shadow: 0 1px 12px rgba(129,105,174,0.08);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header-inner.wide { max-width: 1100px; }
.pill {
  background: #ede9f7;
  border: 1px solid #b09fd1;
  color: #5c4a82;
  font-size: 11px;
  font-family: 'DM Mono', monospace;
  padding: 5px 12px;
  border-radius: 20px;
  font-weight: 500;
  letter-spacing: 0.03em;
}

/* === Progress Bar === */
.progress-track {
  height: 3px;
  background: #ede9f7;
  position: sticky;
  top: 72px;
  z-index: 99;
}
.progress-bar {
  height: 3px;
  background: linear-gradient(90deg, #8169AE, #2BA6DD);
  border-radius: 2px;
  transition: width 0.35s ease;
  width: 0%;
}

/* === Layout === */
.container { max-width: 720px; margin: 2rem auto; padding: 0 1.5rem; }
.container.wide { max-width: 1100px; }

/* === Cards === */
.card {
  background: #ffffff;
  border: 1px solid #ddd8eb;
  border-radius: 16px;
  padding: 1.75rem;
  margin-bottom: 1.25rem;
}
.highlight-card {
  background: linear-gradient(135deg, #ede9f7 0%, #e4f4fc 100%);
  border: 1.5px solid #b09fd1;
}
.card h1 { font-size: 22px; font-weight: 700; color: #8169AE; margin-bottom: 0.25rem; }
.card h2 { font-size: 16px; font-weight: 600; color: #2a2a2a; margin-bottom: 1rem; }

/* === Form Fields === */
.field { margin-bottom: 1rem; }
label {
  display: block;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  color: #7a7090;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
input, select, textarea {
  width: 100%;
  font-family: 'Syne', sans-serif;
  font-size: 14px;
  background: #f7f5fb;
  border: 1.5px solid #ddd8eb;
  border-radius: 10px;
  padding: 10px 14px;
  outline: none;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
input:focus, select:focus, textarea:focus {
  border-color: #8169AE;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(129,105,174,0.1);
}
input.input-error, select.input-error, textarea.input-error {
  border-color: #c0392b;
  background: #fff8f8;
}
textarea { resize: vertical; }
select { cursor: pointer; }
.country-code {
  text-align: center;
  background: #ede9f7;
  color: #5c4a82;
  font-weight: 600;
}
.req { color: #c0392b; }
.muted { color: #7a7090; font-size: 13px; }
.field-error {
  display: block;
  color: #c0392b;
  font-size: 12px;
  margin-top: 4px;
  min-height: 16px;
}
.row { display: flex; gap: 1rem; }
.half { flex: 1; }

/* === Buttons === */
.btn-primary {
  background: #8169AE;
  color: #fff;
  font-family: 'Syne', sans-serif;
  font-size: 14px;
  font-weight: 600;
  padding: 13px 24px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
.btn-primary:hover { background: #5c4a82; transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.btn-secondary {
  background: #2BA6DD;
  color: #fff;
  font-family: 'Syne', sans-serif;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-secondary:hover { background: #1a7fb0; }
.btn-small {
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 6px;
}

/* === Toast === */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: #c0392b;
  color: #fff;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  transition: transform 0.3s ease;
  z-index: 200;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* === Admin Stats === */
.stats-row { display: flex; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.stat-card {
  flex: 1;
  min-width: 140px;
  background: #fff;
  border: 1px solid #ddd8eb;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  text-align: center;
}
.stat-card .stat-value {
  font-size: 28px;
  font-weight: 700;
  color: #8169AE;
}
.stat-card .stat-label {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  color: #7a7090;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-top: 4px;
}

/* === Filter Tabs === */
.filter-tabs { display: flex; gap: 0.5rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.filter-tab {
  background: #ede9f7;
  border: 1px solid #b09fd1;
  color: #5c4a82;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 16px;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.filter-tab:hover { background: #ddd8eb; }
.filter-tab.active { background: #8169AE; color: #fff; border-color: #8169AE; }

/* === Table === */
.reg-table { width: 100%; border-collapse: collapse; }
.reg-table th {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  color: #7a7090;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid #ddd8eb;
}
.reg-table td {
  padding: 12px;
  border-bottom: 1px solid #f0ecf5;
  font-size: 13px;
  vertical-align: top;
}
.reg-table tr:hover td { background: #faf8fd; }

/* === Status Badges === */
.badge {
  display: inline-block;
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 500;
}
.badge-success { background: #e6f7f1; color: #0f6e56; }
.badge-error { background: #fcebeb; color: #a32d2d; }
.badge-pending { background: #ede9f7; color: #5c4a82; }

/* === Detail Panel === */
.detail-row { display: none; }
.detail-row.open { display: table-row; }
.detail-panel {
  background: linear-gradient(135deg, #ede9f7 0%, #e4f4fc 100%);
  border: 1.5px solid #b09fd1;
  border-radius: 12px;
  padding: 1.25rem;
  margin: 0.5rem 0;
}
.detail-panel .detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1.5rem;
}
.detail-panel .detail-item label {
  margin-bottom: 2px;
}
.detail-panel .detail-item .detail-value {
  font-size: 14px;
  color: #2a2a2a;
}
.detail-panel .error-log {
  background: #fff8f8;
  border: 1px solid #fcebeb;
  border-radius: 8px;
  padding: 10px;
  margin-top: 0.75rem;
  color: #a32d2d;
  font-size: 12px;
  font-family: 'DM Mono', monospace;
  white-space: pre-wrap;
}

/* === Empty State === */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: #7a7090;
}
.empty-state p { font-size: 15px; }

/* === Admin Header === */
.admin-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.admin-header-inner a {
  color: #8169AE;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}
.admin-header-inner a:hover { color: #5c4a82; }

/* === Responsive === */
@media (max-width: 600px) {
  .row { flex-direction: column; gap: 0; }
  .half { flex: none; }
  .stats-row { flex-direction: column; }
  .detail-panel .detail-grid { grid-template-columns: 1fr; }
}
