/* ════════════════════════════════════════════════════════
   Titanium Wealth Management — Conference Registration
   Shared Stylesheet
   ════════════════════════════════════════════════════════ */

:root {
  --navy:       #111111;
  --navy-light: #2a2a2a;
  --gold:       #ffffff;
  --gold-light: #e8e8e8;
  --white:      #ffffff;
  --bg:         #f2f2f2;
  --surface:    #ffffff;
  --border:     #e0e0e0;
  --text:       #1a1a1a;
  --text-muted: #6b6b6b;
  --danger:     #d63b3b;
  --success:    #1e8a55;
  --radius:     10px;
  --shadow:     0 2px 16px rgba(0, 0, 0, 0.10);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

/* ── Shared header ─────────────────────────────────────── */
.site-header {
  background: var(--navy);
  padding: 18px 24px;
  text-align: center;
}

.site-header .company {
  display: block;
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 3px;
}

.site-header .subtitle {
  display: block;
  color: rgba(255,255,255,0.55);
  font-size: 11px;
  letter-spacing: 0.06em;
}

/* ════════════════════════════════════════════════════════
   REGISTRATION FORM PAGE
   ════════════════════════════════════════════════════════ */
.page-register {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-register .wrap {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.form-card {
  background: var(--surface);
  margin: 20px 16px 0;
  border-radius: var(--radius);
  padding: 30px 24px;
  box-shadow: var(--shadow);
}

.form-card h1 {
  font-size: 19px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
}

.form-card .lead {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 26px;
}

.form-group { margin-bottom: 18px; }

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.req { color: var(--danger); }

.form-group input,
.form-group select {
  display: block;
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  color: var(--text);
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.18s, box-shadow 0.18s;
  appearance: none;
  -webkit-appearance: none;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.12);
}

.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%236b7794' d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 11px;
  padding-right: 38px;
  cursor: pointer;
}

.field-hint {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

.field-error {
  display: block;
  font-size: 12px;
  color: var(--danger);
  margin-top: 5px;
  min-height: 14px;
}

/* ── Custom checkboxes ─────────────────────────────────── */
.checkbox-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 6px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s;
  user-select: none;
}

.checkbox-item:hover {
  border-color: var(--navy);
  background: rgba(0, 0, 0, 0.04);
}

.checkbox-item input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.check-box {
  width: 20px;
  height: 20px;
  min-width: 20px;
  border: 2px solid var(--border);
  border-radius: 5px;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.18s, background 0.18s;
}

.check-box::after {
  content: '';
  display: block;
  width: 5px;
  height: 9px;
  border: 2px solid white;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translateY(-1px);
  opacity: 0;
  transition: opacity 0.15s;
}

.checkbox-item input[type="checkbox"]:checked ~ .check-box {
  background: var(--navy);
  border-color: var(--navy);
}

.checkbox-item input[type="checkbox"]:checked ~ .check-box::after {
  opacity: 1;
}

.checkbox-item input[type="checkbox"]:checked ~ .check-label {
  color: var(--navy);
  font-weight: 600;
}

/* Highlight the whole tile when checked */
.checkbox-item:has(input:checked) {
  border-color: var(--navy);
  background: rgba(0, 0, 0, 0.04);
}

.check-label {
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
}

.alert-error {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-left: 4px solid var(--danger);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 13px;
  color: #991b1b;
  margin-bottom: 18px;
}

.btn {
  display: block;
  width: 100%;
  padding: 14px;
  font-size: 15px;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.18s, opacity 0.18s;
  letter-spacing: 0.02em;
  text-align: center;
}

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

.btn-navy:hover:not(:disabled) { background: var(--navy-light); }
.btn-navy:disabled { opacity: 0.55; cursor: not-allowed; }

.page-footer {
  padding: 18px;
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: auto;
}

/* ════════════════════════════════════════════════════════
   SUCCESS PAGE
   ════════════════════════════════════════════════════════ */
.success-card {
  text-align: center;
  padding: 52px 24px;
}

.success-icon {
  width: 76px;
  height: 76px;
  background: #d1fae5;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 22px;
  font-size: 38px;
  color: var(--success);
  font-weight: 900;
}

.success-card h1 {
  font-size: 22px;
  color: var(--navy);
  margin-bottom: 10px;
}

.success-card p {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 300px;
  margin: 0 auto 6px;
}

/* ════════════════════════════════════════════════════════
   ADMIN LAYOUT
   ════════════════════════════════════════════════════════ */
.admin-header {
  background: var(--navy);
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 2px 10px rgba(0,0,0,0.25);
}

.admin-header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.admin-header .brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-header .company-name {
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.badge {
  background: var(--gold);
  color: var(--navy);
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-link {
  color: var(--gold-light);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 6px;
  transition: background 0.15s;
}

.nav-link:hover { background: rgba(255,255,255,0.08); }

.btn-gold {
  background: var(--gold);
  color: var(--navy);
  border: none;
  padding: 8px 18px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.18s;
}

.btn-gold:hover { opacity: 0.88; }

.admin-body {
  max-width: 1280px;
  margin: 0 auto;
  padding: 26px 20px 40px;
}

/* ── Stats row ─────────────────────────────────────────── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--navy);
}

.stat-val {
  display: block;
  font-size: 34px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-lbl {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 600;
}

/* ── Attendees table ───────────────────────────────────── */
.panel {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
}

.panel-header h2 {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
}

.btn-ghost {
  background: none;
  border: 1.5px solid var(--border);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.18s;
}

.btn-ghost:hover {
  border-color: var(--navy);
  color: var(--navy);
}

.state-msg {
  text-align: center;
  padding: 56px 24px;
  font-size: 14px;
  color: var(--text-muted);
}

.table-scroll { overflow-x: auto; }

.attendees-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.attendees-table thead {
  background: var(--navy);
}

.attendees-table th {
  padding: 11px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--gold-light);
  white-space: nowrap;
}

.attendees-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  white-space: nowrap;
}

.attendees-table tbody tr:hover { background: #f5f5f5; }
.attendees-table tbody tr:last-child td { border-bottom: none; }

.row-num {
  color: var(--text-muted);
  font-size: 12px;
}

.channel-tag {
  display: inline-block;
  background: #f0f0f0;
  color: var(--navy);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  white-space: nowrap;
  margin: 1px 2px 1px 0;
}

/* ════════════════════════════════════════════════════════
   QR GENERATOR PAGE
   ════════════════════════════════════════════════════════ */
.qr-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.qr-panel {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
}

.qr-panel h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
}

.qr-panel p {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.url-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 6px;
}

.url-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 13px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  color: var(--navy);
  word-break: break-all;
  margin-bottom: 20px;
}

.qr-preview-box {
  background: var(--bg);
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  border: 1px solid var(--border);
}

.qr-preview-box img {
  max-width: 220px;
  max-height: 220px;
  border-radius: 4px;
  display: none;
}

.qr-spinner { color: var(--text-muted); font-size: 13px; }

.qr-actions { display: flex; gap: 10px; }
.qr-actions .btn { flex: 1; }

.copies-row { margin-bottom: 18px; }
.copies-row label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.copies-input {
  display: block;
  width: 100%;
  padding: 10px 14px;
  font-size: 15px;
  color: var(--text);
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.18s, box-shadow 0.18s;
}

.copies-input:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.12);
}

/* Print preview mockup */
.print-mockup {
  background: var(--bg);
  border-radius: 8px;
  border: 1px solid var(--border);
  padding: 20px;
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.mock-card {
  background: white;
  border: 1px solid #cdd5e0;
  border-radius: 4px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.12);
  padding: 16px 14px;
  width: 190px;
  text-align: center;
  font-size: 8px;
}

.mock-header {
  background: var(--navy);
  color: var(--gold);
  font-size: 6.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 5px;
  margin: -16px -14px 10px;
  border-radius: 3px 3px 0 0;
}

.mock-title {
  font-size: 9px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 5px;
}

.mock-text { color: #888; margin: 4px 0; }

.mock-qr {
  width: 70px;
  height: 70px;
  background: var(--bg);
  border: 1px dashed #ccc;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 8px auto;
  font-size: 7px;
  color: #aaa;
}

.mock-thank {
  font-size: 8.5px;
  font-weight: 700;
  color: var(--navy);
  margin-top: 6px;
}

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 800px) {
  .qr-grid { grid-template-columns: 1fr; }
  .badge { display: none; }
}

@media (max-width: 600px) {
  .admin-header-inner { flex-wrap: wrap; height: auto; padding: 10px 16px; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .admin-body { padding: 16px 12px 40px; }
  .btn-ghost span { display: none; }
}
