/* ============================================================
   Event Registration Portal — Glass UI Theme
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body { width: 100%; max-width: 100%; overflow-x: hidden; }

/* ── Variables ──────────────────────────────────────────────── */
:root {
  --primary:        #8a1538;
  --primary-dark:   #641128;
  --primary-light:  rgba(138,21,56,.12);
  --primary-glow:   rgba(138,21,56,.25);

  --success:        #10b981;
  --success-bg:     rgba(16,185,129,.12);
  --danger:         #ef4444;
  --danger-bg:      rgba(239,68,68,.12);
  --warning:        #f59e0b;
  --warning-bg:     rgba(245,158,11,.12);
  --info:           #38bdf8;
  --info-bg:        rgba(56,189,248,.12);

  --gray-50:        #f9fafb;
  --gray-100:       #f3f4f6;
  --gray-200:       #e5e7eb;
  --gray-400:       #9ca3af;
  --gray-500:       #6b7280;
  --gray-700:       #374151;
  --gray-900:       #111827;
  --white:          #ffffff;

  /* Glass tokens */
  --glass-bg:       rgba(255,255,255,0.72);
  --glass-border:   rgba(255,255,255,0.55);
  --glass-shadow:   0 8px 32px rgba(138,21,56,.10), 0 1.5px 4px rgba(0,0,0,.06);
  --glass-shadow-lg:0 20px 60px rgba(138,21,56,.18), 0 4px 16px rgba(0,0,0,.08);
  --glass-blur:     blur(14px);

  --page-bg-from:   #fff7ed;
  --page-bg-to:     #fce7f3;

  --radius:         10px;
  --radius-lg:      16px;
  --radius-xl:      22px;
}

/* ── Base ───────────────────────────────────────────────────── */
body {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--gray-700);
  background: linear-gradient(145deg, var(--page-bg-from) 0%, var(--page-bg-to) 100%);
  background-attachment: fixed;
  line-height: 1.6;
  font-size: 15px;
  min-height: 100vh;
}

/* ── Typography ─────────────────────────────────────────────── */
h1 { font-size: 2rem;   font-weight: 700; color: var(--gray-900); }
h2 { font-size: 1.5rem; font-weight: 600; color: var(--gray-900); }
h3 { font-size: 1.1rem; font-weight: 600; color: var(--gray-900); }
a  { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Layout ─────────────────────────────────────────────────── */
.container    { max-width: 960px;  margin: 0 auto; padding: 0 24px; }
.container-lg { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ── Glass Card ─────────────────────────────────────────────── */
.card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--glass-shadow);
  padding: 28px 32px;
  transition: box-shadow .2s, transform .2s;
}
.card:hover {
  box-shadow: var(--glass-shadow-lg);
}
.card-sm { padding: 18px 22px; }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .18s;
  white-space: nowrap;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #d4a017 100%);
  color: #fff;
  border-color: rgba(255,255,255,.2);
  box-shadow: 0 4px 14px var(--primary-glow);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--primary-glow);
  filter: brightness(1.08);
  text-decoration: none;
}
.btn-success {
  background: linear-gradient(135deg, var(--success) 0%, #34d399 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(16,185,129,.25);
}
.btn-success:hover { transform: translateY(-1px); filter: brightness(1.08); text-decoration: none; }
.btn-danger {
  background: linear-gradient(135deg, var(--danger) 0%, #f87171 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(239,68,68,.22);
}
.btn-danger:hover  { transform: translateY(-1px); filter: brightness(1.08); text-decoration: none; }
.btn-outline {
  background: var(--glass-bg);
  border-color: var(--glass-border);
  color: var(--gray-700);
  box-shadow: var(--glass-shadow);
}
.btn-outline:hover { background: rgba(255,255,255,.9); transform: translateY(-1px); text-decoration: none; }
.btn-sm   { padding: 5px 12px; font-size: 13px; }
.btn-icon { padding: 7px; border-radius: var(--radius); }

/* ── Forms ──────────────────────────────────────────────────── */
.form-group  { margin-bottom: 20px; }
.form-row    { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3  { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
label        { display: block; font-size: 13px; font-weight: 500; color: var(--gray-700); margin-bottom: 6px; }
label .req   { color: var(--danger); margin-left: 2px; }

input[type=text], input[type=email], input[type=tel], input[type=number],
input[type=date], input[type=password], select, textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,.55);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--gray-900);
  background: rgba(255,255,255,.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border .15s, box-shadow .15s, background .15s;
  outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  background: rgba(255,255,255,.9);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
input.error, select.error, textarea.error { border-color: var(--danger); }
.field-error { font-size: 12px; color: var(--danger); margin-top: 4px; }
textarea { resize: vertical; min-height: 90px; }
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.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 10px center;
}

/* ── Flash messages ─────────────────────────────────────────── */
.flash {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-size: 14px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.flash span { font-weight: 700; font-size: 16px; }
.flash-success { background: var(--success-bg); color: var(--success); border: 1px solid rgba(16,185,129,.3); }
.flash-error   { background: var(--danger-bg);  color: var(--danger);  border: 1px solid rgba(239,68,68,.3); }
.flash-info    { background: var(--info-bg);    color: var(--info);    border: 1px solid rgba(56,189,248,.3); }

/* ── Badges ─────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; }
.badge-pending    { background: var(--warning-bg);      color: #92400e; }
.badge-pending::before { background: var(--warning); }
.badge-approved   { background: var(--success-bg);      color: #065f46; }
.badge-approved::before { background: var(--success); }
.badge-rejected   { background: var(--danger-bg);       color: #991b1b; }
.badge-rejected::before { background: var(--danger); }
.badge-waitlisted { background: var(--info-bg);         color: #0c4a6e; }
.badge-waitlisted::before { background: var(--info); }
.badge-paid       { background: var(--success-bg);      color: #065f46; }
.badge-paid::before { background: var(--success); }
.badge-failed     { background: var(--danger-bg);       color: #991b1b; }
.badge-failed::before { background: var(--danger); }
.badge-active     { background: var(--primary-light);   color: var(--primary-dark); }
.badge-active::before { background: var(--primary); }

/* ── Tables ─────────────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}
table { width: 100%; border-collapse: collapse; font-size: 14px; }
thead th {
  background: rgba(255,255,255,.4);
  padding: 11px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: .06em;
  border-bottom: 1px solid var(--glass-border);
  white-space: nowrap;
}
tbody tr { border-bottom: 1px solid rgba(255,255,255,.3); transition: background .12s; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: rgba(255,255,255,.45); }
tbody td { padding: 12px 14px; color: var(--gray-700); vertical-align: middle; }

/* ── Pagination ─────────────────────────────────────────────── */
.pagination { display: flex; gap: 4px; margin-top: 20px; }
.page-btn {
  padding: 6px 12px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--gray-700);
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  cursor: pointer;
  transition: all .15s;
}
.page-btn:hover, .page-btn.active {
  background: linear-gradient(135deg, var(--primary) 0%, #d4a017 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px var(--primary-glow);
  text-decoration: none;
}

/* ── Section headings ───────────────────────────────────────── */
.section-title {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1.5px solid rgba(138,21,56,.18);
}
.section-title h3 { color: var(--primary); }

/* ── Step progress ──────────────────────────────────────────── */
.steps { display: flex; gap: 0; margin-bottom: 36px; }
.step  { flex: 1; display: flex; flex-direction: column; align-items: center; position: relative; }
.step:not(:last-child)::after {
  content: ''; position: absolute; top: 18px; left: 50%;
  width: 100%; height: 2px;
  background: rgba(138,21,56,.15); z-index: 0;
}
.step.done::after, .step.active::after { background: var(--primary); }
.step-circle {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.6);
  backdrop-filter: blur(6px);
  color: var(--gray-500);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 14px;
  position: relative; z-index: 1;
  border: 1.5px solid var(--glass-border);
  transition: all .2s;
}
.step.done   .step-circle { background: var(--success); color: #fff; border-color: var(--success); box-shadow: 0 4px 12px rgba(16,185,129,.3); }
.step.active .step-circle { background: linear-gradient(135deg, var(--primary), #d4a017); color: #fff; border-color: transparent; box-shadow: 0 4px 14px var(--primary-glow); }
.step-label  { font-size: 12px; color: var(--gray-400); margin-top: 6px; font-weight: 500; text-align: center; }
.step.active .step-label { color: var(--primary); font-weight: 600; }

/* ── Stat cards ─────────────────────────────────────────────── */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; }
.stat-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 20px;
  text-align: center;
  box-shadow: var(--glass-shadow);
  transition: transform .2s, box-shadow .2s;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--glass-shadow-lg); }
.stat-card .stat-num   { font-size: 2rem; font-weight: 700; background: linear-gradient(135deg, var(--primary), #d4a017); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.stat-card .stat-label { font-size: 13px; color: var(--gray-500); margin-top: 4px; }

/* ── Navbar (frontend) ──────────────────────────────────────── */
.navbar {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--glass-border);
  padding: 0 24px;
  position: sticky; top: 0; z-index: 100;
  box-shadow: var(--glass-shadow);
}
.navbar-inner { max-width: 960px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; height: 60px; }
.navbar-brand {
  font-size: 1.1rem; font-weight: 700;
  background: linear-gradient(135deg, var(--primary), #d4a017);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  display: flex; align-items: center; gap: 8px;
}

/* ── Admin Sidebar Layout ───────────────────────────────────── */
.admin-wrap { display: flex; min-height: 100vh; }

.sidebar {
  width: 240px;
  flex-shrink: 0;
  background: rgba(15, 14, 35, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid rgba(255,255,255,.07);
  color: #e5e7eb;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  box-shadow: 4px 0 24px rgba(0,0,0,.15);
}

.sidebar-brand {
  padding: 22px 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.sidebar-brand span { font-size: 1rem; font-weight: 700; color: #fff; }
.sidebar-brand small { display: block; font-size: 11px; color: rgba(255,255,255,.35); margin-top: 2px; }

.sidebar-nav { padding: 12px 10px; flex: 1; overflow-y: auto; }

.nav-section {
  padding: 14px 10px 6px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: rgba(255,255,255,.25);
  font-weight: 600;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  font-size: 13.5px;
  color: rgba(255,255,255,.6);
  cursor: pointer;
  border-radius: var(--radius);
  margin-bottom: 2px;
  transition: all .15s;
  text-decoration: none;
  border: 1px solid transparent;
}
.nav-item:hover {
  background: rgba(255,255,255,.07);
  color: #fff;
  text-decoration: none;
}
.nav-item.active {
  background: rgba(138,21,56,.22);
  color: #fff;
  border-color: rgba(138,21,56,.35);
  box-shadow: 0 2px 10px rgba(138,21,56,.15);
}
.nav-item svg { width: 17px; height: 17px; flex-shrink: 0; }

/* ── Admin Main ─────────────────────────────────────────────── */
.admin-main   { flex: 1; overflow-y: auto; background: transparent; }

.admin-header {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--glass-border);
  padding: 0 28px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 2px 12px rgba(138,21,56,.07);
}
.admin-header h2 { font-size: 1.05rem; font-weight: 600; }

.admin-content { padding: 28px; }

/* ── KPI Cards (dashboard) ──────────────────────────────────── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.kpi-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 22px 18px;
  text-align: center;
  box-shadow: var(--glass-shadow);
  position: relative;
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.kpi-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), #d4a017);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}
.kpi-card:hover { transform: translateY(-3px); box-shadow: var(--glass-shadow-lg); }
.kpi-card h2 {
  font-size: 1.9rem;
  font-weight: 700;
  margin: 0 0 6px;
  background: linear-gradient(135deg, var(--primary) 0%, #d4a017 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.kpi-card p {
  margin: 0;
  font-size: .72rem;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* ── Chart Row ──────────────────────────────────────────────── */
.chart-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.chart-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 22px 22px 18px;
  box-shadow: var(--glass-shadow);
}
.chart-card h3 {
  font-size: .72rem;
  font-weight: 600;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin: 0 0 16px;
}

/* ── Filters bar ─────────────────────────────────────────────── */
.filters {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 20px;
}
.filters input, .filters select { width: auto; flex: 1; min-width: 160px; }

/* ── Modal ──────────────────────────────────────────────────── */
.modal-backdrop {
  display: none; position: fixed; inset: 0;
  background: rgba(15,14,35,.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1000;
  align-items: center; justify-content: center;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 28px 32px;
  width: 100%; max-width: 540px;
  max-height: 85vh; overflow-y: auto;
  box-shadow: var(--glass-shadow-lg);
  animation: modalIn .2s ease-out;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(16px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 20px; padding-bottom: 14px;
  border-bottom: 1px solid rgba(255,255,255,.5);
}
.modal-close { background: none; border: none; font-size: 22px; color: var(--gray-400); cursor: pointer; padding: 0 4px; }
.modal-close:hover { color: var(--danger); }

/* ── Detail view ────────────────────────────────────────────── */
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.detail-item label { font-size: 11px; color: var(--gray-400); text-transform: uppercase; letter-spacing: .05em; }
.detail-item p     { font-size: 14px; color: var(--gray-900); font-weight: 500; margin-top: 2px; }

/* ── Toggle switch ──────────────────────────────────────────── */
.toggle { position: relative; display: inline-block; width: 40px; height: 22px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; cursor: pointer; inset: 0; background: rgba(0,0,0,.15); border-radius: 22px; transition: .2s; }
.toggle-slider:before { position: absolute; content: ''; height: 16px; width: 16px; left: 3px; bottom: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.toggle input:checked + .toggle-slider { background: linear-gradient(135deg, var(--primary), #d4a017); }
.toggle input:checked + .toggle-slider:before { transform: translateX(18px); }

/* ── Auth Pages ─────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh; width: 100%;
  display: flex; align-items: center; justify-content: center;
  padding: 20px 15px;
  background: linear-gradient(145deg, #fff7ed 0%, #fee2e2 50%, #fce7f3 100%);
  overflow-x: hidden;
  font-family: 'Inter', system-ui, sans-serif;
}

.auth-container {
  width: 100%; max-width: 440px;
  animation: fadeIn .5s ease-out;
}

.auth-card {
  background: rgba(255,255,255,.78);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 26px;
  padding: 24px 32px;
  box-shadow: 0 30px 60px rgba(138,21,56,.18), 0 2px 8px rgba(0,0,0,.06);
  width: 100%;
  box-sizing: border-box;
}

.auth-logo { text-align: center; margin-bottom: 14px; }
.auth-logo img { max-width: 140px; width: 100%; height: auto; margin: 0 auto 10px; display: block; }
.auth-logo h1 {
  font-size: clamp(18px, 3.4vw, 24px); font-weight: 700; letter-spacing: -.5px; line-height: 1.2;
  background: linear-gradient(135deg, var(--primary), #d4a017);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.auth-logo p { color: var(--gray-500); margin-top: 4px; font-size: 13px; }

.auth-card h2 { color: var(--gray-900); text-align: center; margin-bottom: 14px; font-size: 18px; font-weight: 600; }

.auth-form-grid { display: grid; grid-template-columns: 1fr; gap: 0 20px; }

@media (min-width: 641px) {
  .auth-container.auth-container-wide { max-width: 620px; }
  .auth-form-grid { grid-template-columns: 1fr 1fr; }
}

.auth-card label { display: block; color: var(--gray-700); font-weight: 500; font-size: 13px; margin-bottom: 6px; }
.auth-card .form-group { margin-bottom: 14px; }

.auth-card input {
  width: 100%; padding: 10px 14px;
  border-radius: 10px; font-size: 14px;
  background: rgba(255,255,255,.65);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.6);
  color: var(--gray-900); outline: none;
  transition: all .2s;
  box-sizing: border-box;
}
.auth-card input::placeholder { color: var(--gray-400); }
.auth-card input:focus {
  border-color: var(--primary);
  background: rgba(255,255,255,.9);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.auth-btn {
  width: 100%; padding: 11px; border: none;
  border-radius: 10px; cursor: pointer; color: #fff;
  font-weight: 600; font-size: 15px;
  background: linear-gradient(135deg, var(--primary), #d4a017);
  box-shadow: 0 4px 16px var(--primary-glow);
  transition: all .2s; margin-top: 4px;
}
.auth-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 24px var(--primary-glow); filter: brightness(1.08); }

.auth-footer { text-align: center; margin-top: 12px; color: var(--gray-500); font-size: 13px; }
.auth-footer a { color: var(--primary); font-weight: 500; }
.auth-footer a:hover { color: var(--primary-dark); }

.auth-error {
  background: rgba(239,68,68,.1);
  border: 1px solid rgba(239,68,68,.2);
  color: var(--danger);
  padding: 10px 14px; border-radius: 10px;
  margin-bottom: 14px; font-size: 13px;
}

/* ── Category Page ──────────────────────────────────────────── */
.category-page {
  height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: linear-gradient(145deg, #fff7ed 0%, #fee2e2 50%, #fce7f3 100%);
  overflow: hidden;
}
.category-container { width: 100%; max-width: 820px; }
.category-card {
  background: rgba(255,255,255,.78);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,.65);
  border-radius: 24px;
  padding: 28px 28px 22px;
  box-shadow: 0 24px 56px rgba(138,21,56,.16);
}
.category-title { text-align: center; margin-bottom: 22px; }
.category-title h1 { font-size: 30px; color: var(--gray-900); }
.category-title p  { margin-top: 6px; color: var(--gray-500); font-size: 14px; }

.category-row {
  background: rgba(255,255,255,.6);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 12px;
  padding: 13px 18px;
  margin-bottom: 8px;
  transition: all .22s;
}
.category-row:hover {
  border-color: rgba(138,21,56,.4);
  background: rgba(255,255,255,.82);
  box-shadow: 0 6px 20px rgba(138,21,56,.12);
}
.category-row label { display: flex; align-items: center; gap: 14px; width: 100%; cursor: pointer; }
.category-row input[type="radio"] { width: 18px; height: 18px; accent-color: var(--primary); }
.category-name   { font-size: 16px; font-weight: 600; color: var(--gray-900); }
.category-amount { font-size: 16px; font-weight: 700; color: var(--primary); }

.continue-btn {
  width: 100%; margin-top: 14px; border: none;
  padding: 13px; border-radius: 12px; color: #fff;
  font-size: 15px; font-weight: 600; cursor: pointer;
  background: linear-gradient(135deg, var(--primary), #d4a017);
  box-shadow: 0 4px 16px var(--primary-glow);
  transition: all .2s;
}
.continue-btn:hover { transform: translateY(-1px); filter: brightness(1.08); }

/* ── Hero (frontend) ────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, #d4a017 100%);
  color: #fff; padding: 70px 24px; text-align: center;
  position: relative; overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Ccircle cx='30' cy='30' r='20'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero h1 { color: #fff; font-size: 2.2rem; margin-bottom: 12px; position: relative; }
.hero p   { color: rgba(255,255,255,.82); font-size: 1.05rem; max-width: 540px; margin: 0 auto 28px; position: relative; }

/* ── Dashboard grid ─────────────────────────────────────────── */
.dashboard-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-top: 16px; }

/* ── Misc helpers ───────────────────────────────────────────── */
.flex         { display: flex; }
.flex-center  { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.w-full       { width: 100%; }
.text-center  { text-align: center; }
.text-muted   { color: var(--gray-500); }
.text-sm      { font-size: 13px; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.gap-2 { gap: 8px; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--gray-400); }
.empty-state svg { width: 48px; height: 48px; margin-bottom: 12px; opacity: .5; }

canvas { width: 100% !important; }

/* ── Animations ─────────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1200px) {
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .form-row, .form-row-3, .detail-grid, .dashboard-grid, .chart-row { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .admin-header h2 { font-size: .95rem; }
  .stat-grid, .kpi-grid { grid-template-columns: 1fr 1fr; }
  h1 { font-size: 1.5rem; }
  .hero h1 { font-size: 1.6rem; }
  .admin-content { padding: 16px; }
}
@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .auth-card { padding: 22px 20px; }
}

/* ===================================
   MOBILE FIX
=================================== */

@media (max-width:768px){

    .container,
    .container-lg{
        padding:0 12px;
    }

    .card{
        padding:20px !important;
        border-radius:20px !important;
    }

    h1:not(.auth-logo h1),
    .heading h1,
    .category-title h1{
        font-size:42px !important;
        line-height:1.2;
        word-break:break-word;
    }

    h2{
        font-size:28px !important;
    }

    .actions{
        flex-direction:column !important;
        gap:12px !important;
    }

    .actions a,
    .actions button{
        width:100% !important;
    }

    .row{
        grid-template-columns:1fr !important;
    }

    .form-row,
    .form-row-3{
        grid-template-columns:1fr !important;
    }

    table{
        display:block;
        overflow-x:auto;
        white-space:nowrap;
    }

    .category-row label{
        flex-direction:column;
        align-items:flex-start !important;
        gap:10px;
    }

    .category-name{
        font-size:18px !important;
    }

    .category-amount{
        font-size:18px !important;
    }

    .summary-row{
        flex-direction:column;
        gap:10px;
    }

}


/* ============================================================
   Laravel view class compatibility
   Keeps the same Glass UI look for existing Blade class names.
   ============================================================ */

.public-shell,
.admin-auth-shell {
  min-height: 100vh;
}

.public-topbar,
.topbar {
  max-width: 1200px;
  margin: 16px auto 0;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--glass-shadow);
}

.public-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 24px 56px;
}

.brand,
.sidebar-brand,
.admin-login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--gray-900);
}

.brand small,
.sidebar-brand small,
.admin-login-brand small {
  display: block;
  color: var(--gray-500);
  font-size: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), #d4a017);
  box-shadow: 0 4px 16px var(--primary-glow);
}

.top-actions,
.inline-meta,
.toolbar,
.form-actions,
.actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-card,
.section-card,
.auth-card,
.success-card,
.info-card,
.empty-card,
.registration-intro,
.registration-summary,
.content-band,
.admin-login-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--glass-shadow);
  padding: 28px 32px;
}

.hero-card {
  display: grid;
  grid-template-columns: 1.4fr .9fr;
  gap: 24px;
  margin-bottom: 24px;
}

.hero-card.compact {
  grid-template-columns: 1fr;
}

.hero-card h1,
.panel-hero h1,
.success-card h1,
.auth-card h1,
.registration-intro h1,
.portal-page-head h1 {
  margin: 8px 0 14px;
}

.hero-card p,
.panel-hero p,
.registration-intro p,
.portal-page-head p,
.success-card p {
  color: var(--gray-500);
  max-width: 760px;
}

.eyebrow {
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.inline-meta span {
  display: inline-flex;
  padding: 5px 12px;
  border-radius: 20px;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 600;
}

.primary-button,
.ghost-button,
.ghost-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 9px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .18s;
  white-space: nowrap;
}

.primary-button {
  color: #fff;
  border: 1px solid rgba(255,255,255,.2);
  background: linear-gradient(135deg, var(--primary) 0%, #d4a017 100%);
  box-shadow: 0 4px 14px var(--primary-glow);
}

.primary-button:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--primary-glow);
  filter: brightness(1.08);
  text-decoration: none;
}

.ghost-button,
.ghost-link {
  border: 1px solid var(--glass-border);
  color: var(--gray-700);
  background: var(--glass-bg);
  box-shadow: var(--glass-shadow);
}

.ghost-button:hover,
.ghost-link:hover {
  background: rgba(255,255,255,.9);
  transform: translateY(-1px);
  text-decoration: none;
}

.full-width {
  width: 100%;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field {
  display: grid;
  gap: 6px;
}

.field.full {
  grid-column: 1 / -1;
}

.stack-form {
  display: grid;
  gap: 18px;
}

.section-head,
.panel-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.stat-grid,
.hero-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.stat-card,
.hero-stat-grid article {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 20px;
  text-align: center;
  box-shadow: var(--glass-shadow);
}

.stat-card strong,
.hero-stat-grid strong,
.confirmation-pill {
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), #d4a017);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-card span {
  display: block;
  margin-top: 4px;
  color: var(--gray-500);
  font-size: 13px;
}

.category-grid,
.payment-panel,
.builder-list {
  display: grid;
  gap: 12px;
}

.category-option {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 13px 18px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.55);
  background: rgba(255,255,255,.6);
  transition: all .22s;
  cursor: pointer;
}

.category-option:hover,
.category-option:has(input:checked) {
  border-color: rgba(138,21,56,.4);
  background: rgba(255,255,255,.82);
  box-shadow: 0 6px 20px rgba(138,21,56,.12);
}

.category-option small {
  display: block;
  margin-top: 4px;
}

.category-option b,
.payment-amount strong {
  color: var(--primary);
}

.portal-page-head {
  display: grid;
  gap: 8px;
  max-width: 820px;
  margin: 10px 0 22px;
}

.portal-panel,
.content-band {
  margin-bottom: 22px;
}

.compact-head {
  margin: 10px 0 0;
  padding-top: 18px;
  border-top: 1px solid rgba(138,21,56,.14);
}

.payment-amount {
  padding: 22px;
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,.6);
  border: 1px solid var(--glass-border);
}

.summary-table th {
  width: 40%;
}

.summary-table .total-row th,
.summary-table .total-row td {
  border-top: 2px solid var(--primary);
  font-size: 1.1rem;
}

.admin-shell {
  display: flex;
}

.admin-shell .sidebar {
  position: sticky;
  top: 0;
  width: 240px;
  min-height: 100vh;
}

.admin-shell .admin-main {
  flex: 1;
  padding: 28px;
}

.sidebar-nav {
  display: grid;
  gap: 4px;
}

.sidebar-nav a {
  display: flex;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: rgba(255,255,255,.6);
  font-size: 13.5px;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  background: rgba(138,21,56,.22);
  border-color: rgba(138,21,56,.35);
  color: #fff;
  text-decoration: none;
}

.sidebar-footer {
  padding: 18px 20px;
  border-top: 1px solid rgba(255,255,255,.06);
}

.admin-auth-main {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.admin-login-card {
  width: min(100%, 460px);
  display: grid;
  gap: 22px;
}

.admin-login-brand {
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(138,21,56,.14);
}

.flash.success {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid rgba(16,185,129,.3);
}

.flash.danger {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid rgba(239,68,68,.3);
}

.flash-list {
  margin: 8px 0 0;
  padding-left: 18px;
}

@media (max-width: 768px) {
  .public-topbar,
  .topbar,
  .panel-hero,
  .section-head {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-card,
  .grid.two {
    grid-template-columns: 1fr;
  }

  .hero-card,
  .section-card,
  .auth-card,
  .success-card,
  .admin-login-card {
    padding: 20px !important;
    border-radius: 20px !important;
  }

  .admin-shell {
    display: block;
  }

  .admin-shell .sidebar {
    display: block;
    position: static;
    width: 100%;
    min-height: auto;
    height: auto;
  }

  .admin-shell .admin-main {
    padding: 16px;
  }
}
.error-popup {
    position: fixed;
    top: 22px;
    right: 22px;
    z-index: 9999;
    background: #dc2626;
    color: #ffffff;
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 12px 30px rgba(220, 38, 38, 0.35);
    animation: popupIn .25s ease-out;
    max-width: calc(100% - 44px);
}

@keyframes popupIn {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 600px) {
    .error-popup {
        left: 14px;
        right: 14px;
        top: 14px;
        text-align: center;
    }
}

.section-heading{
    border-bottom:1px solid #c7d2fe;
    padding-bottom:6px;
    margin-top:10px;
}
.section-heading h3{
    margin:0;
    color:#3730a3;
    font-size:18px;
}
.section-desc{
    margin:4px 0 0;
    color:#64748b;
    font-size:13px;
}