/* ════════════════════════════════════════════
   RJCC Admin — minimal, clean dashboard styles
   ════════════════════════════════════════════ */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: #f6f7fb;
  color: #0F172A;
  font-size: 14px;
  line-height: 1.5;
}
a { color: #6c63ff; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── LOGIN ── */
.admin-login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: linear-gradient(135deg, #f5f3ff 0%, #eef2ff 100%);
}
.login-card {
  background: #fff;
  width: 100%;
  max-width: 380px;
  padding: 2.4rem 2rem;
  border-radius: 16px;
  box-shadow: 0 25px 60px rgba(31, 27, 92, 0.10);
  border: 1px solid #ebebff;
}
.login-brand {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: #7c72ff;
  margin-bottom: 1rem;
}
.login-card h1 {
  margin: 0 0 0.4rem;
  font-size: 1.5rem;
  font-weight: 800;
  color: #0F172A;
}
.login-sub {
  margin: 0 0 1.6rem;
  color: #64748B;
  font-size: 0.85rem;
}
.login-card label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748B;
  margin: 0.9rem 0 0.4rem;
}
.login-card input {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #fff;
}
.login-card input:focus {
  border-color: #7c72ff;
  box-shadow: 0 0 0 3px rgba(124,114,255,0.12);
}
.login-card button {
  width: 100%;
  margin-top: 1.4rem;
  padding: 0.85rem;
  background: #6c63ff;
  color: #fff;
  border: 0;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}
.login-card button:hover { background: #5b53e6; }
.login-card button:active { transform: scale(0.98); }
.login-error {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  border-radius: 10px;
  padding: 0.7rem 0.9rem;
  font-size: 0.8rem;
  margin-bottom: 1rem;
}

/* ── HEADER ── */
.admin-header {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 10;
}
.admin-header-inner {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.admin-brand {
  font-weight: 800;
  font-size: 1rem;
  color: #0F172A;
  letter-spacing: -0.01em;
}
.admin-nav {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}
.admin-nav a {
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  color: #475569;
  font-size: 0.85rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.admin-nav a:hover { background: #f1f5f9; text-decoration: none; }
.admin-nav a.active { background: #eef2ff; color: #6c63ff; }
.admin-logout {
  color: #b91c1c !important;
}
.admin-logout:hover { background: #fee2e2 !important; }

/* ── MAIN ── */
.admin-main {
  max-width: 1300px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}
.page-title {
  margin: 0 0 0.3rem;
  font-size: 1.5rem;
  font-weight: 800;
  color: #0F172A;
}
.page-sub {
  margin: 0 0 1.8rem;
  color: #64748B;
  font-size: 0.85rem;
}

/* ── STATS ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.8rem;
}
.stat-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.1rem 1.2rem;
}
.stat-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #64748B;
  margin-bottom: 0.4rem;
}
.stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: #0F172A;
  letter-spacing: -0.02em;
}

/* ── TABLE ── */
.table-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
}
.table-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid #f1f5f9;
}
.table-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: #0F172A;
}
.btn-export {
  background: #6c63ff;
  color: #fff !important;
  padding: 0.5rem 0.95rem;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
}
.btn-export:hover { background: #5b53e6; text-decoration: none; }

.table-wrap {
  overflow-x: auto;
}
.leads-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.83rem;
}
.leads-table th {
  text-align: left;
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748B;
  padding: 0.7rem 1rem;
  background: #fafbff;
  border-bottom: 1px solid #f1f5f9;
  white-space: nowrap;
}
.leads-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: top;
}
.leads-table tr:last-child td { border-bottom: 0; }
.leads-table tr:hover td { background: #fafbff; }
.leads-table .num { color: #94a3b8; font-weight: 600; }
.leads-table .muted { color: #64748B; white-space: nowrap; }
.leads-table .msg {
  max-width: 280px;
  color: #334155;
}
.leads-table .empty {
  text-align: center;
  padding: 3rem 1rem;
  color: #64748B;
  font-style: italic;
}

/* ── ACTIONS / DELETE ── */
.th-actions, .td-actions {
  text-align: right;
  white-space: nowrap;
  width: 1%;
}
.delete-form { display: inline; margin: 0; }
.btn-delete {
  background: transparent;
  color: #b91c1c;
  border: 1px solid #fecaca;
  padding: 0.32rem 0.7rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn-delete:hover {
  background: #b91c1c;
  color: #fff;
  border-color: #b91c1c;
}
.btn-delete:active { transform: scale(0.96); }

/* ── FLASH MESSAGES ── */
.flash {
  padding: 0.8rem 1rem;
  border-radius: 10px;
  margin-bottom: 1.2rem;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid transparent;
}
.flash-success {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}
.flash-error {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}

/* ── BADGES ── */
.badge {
  display: inline-block;
  padding: 0.22rem 0.6rem;
  border-radius: 99px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.badge-purple { background: #eef2ff; color: #6c63ff; }
.badge-blue   { background: #e0f2fe; color: #0369a1; }
.badge-pink   { background: #fce7f3; color: #be185d; }
.badge-amber  { background: #fef3c7; color: #b45309; }
.badge-grey   { background: #f1f5f9; color: #475569; }
.badge-green  { background: #dcfce7; color: #15803d; }
.badge-red    { background: #fee2e2; color: #b91c1c; }

/* ── BOOKINGS: stat footnote ── */
.stat-foot {
  margin-top: 0.35rem;
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 500;
}

/* ── BOOKINGS: status filter pills ── */
.filter-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
}
.filter-pill {
  padding: 0.45rem 0.9rem;
  border-radius: 99px;
  background: #fff;
  border: 1px solid #e5e7eb;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 600;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.filter-pill:hover {
  background: #f1f5f9;
  text-decoration: none;
}
.filter-pill.active {
  background: #6c63ff;
  border-color: #6c63ff;
  color: #fff;
}
.filter-pill.active:hover {
  background: #5b53e6;
  text-decoration: none;
}

/* ── BOOKINGS: order id column ── */
.leads-table .mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
  white-space: nowrap;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .table-head { flex-direction: column; gap: 0.7rem; align-items: stretch; }
}
