/* ============================================================
   BLISS NIRA — ADMIN STYLESHEET
   Sections:
     1.  Reset + tokens
     2.  Shell
     3.  Sidebar
     4.  Main + topbar
     5.  Stat cards
     6.  Sections
     7.  Quick actions
     8.  Activity lists
     9.  Pills + empty state
    10.  Bar chart
    11.  Filter bar
    12.  Table
    13.  Flash
    14.  Service list (admin services grid)
    15.  Mini buttons
    16.  Editor
    17.  Hero preview + file input + gallery
    18.  Settings page
    19.  Payment methods
    20.  Login / PIN / Locked screens
    21.  Messages — table view
    22.  View message (single) page
    23.  Change password page
    24.  Responsive
   ============================================================ */

/* ============ 1. RESET + TOKENS ============ */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --gold: #DEBD39;
  --greige: #B5AD9C;
  --dark: #24221D;
  --warm-white: #FAF9F5;
  --soft-bg: #EEECE5;
  --text: #2E2D29;
  --muted: #77736A;
  --line: rgba(36,34,29,.08);
  --green: #4C8C5A;
  --red: #C25B4A;
}

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--warm-white);
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
}

/* ============ 2. SHELL ============ */
.admin-shell {
  display: grid;
  grid-template-columns: 250px 1fr;
  min-height: 100vh;
}

/* ============ 3. SIDEBAR ============ */
.admin-sidebar {
  background: var(--dark);
  color: #ddd;
  display: flex;
  flex-direction: column;
  padding: 28px 0 24px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.admin-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 24px 28px;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.admin-brand img { height: 30px; }
.admin-brand span {
  font-size: 11px;
  letter-spacing: .24em;
  color: var(--gold);
  text-transform: uppercase;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  padding: 22px 12px;
  gap: 2px;
  flex: 1;
}
.admin-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: 8px;
  color: #ddd;
  text-decoration: none;
  font-size: 14px;
  transition: background .2s, color .2s;
}
.admin-nav a:hover { background: rgba(255,255,255,.05); color: #fff; }
.admin-nav a.active {
  background: rgba(222,189,57,.14);
  color: var(--gold);
  font-weight: 500;
}
.badge {
  background: var(--gold);
  color: var(--dark);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  min-width: 22px;
  text-align: center;
}

.admin-sidebar-footer {
  padding: 20px 24px 0;
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.admin-user { color: #999; }
.admin-user strong { color: #fff; }
.admin-link-muted { color: #999; text-decoration: none; font-size: 13px; }
.admin-link-muted:hover { color: var(--gold); }
.admin-logout {
  display: inline-block;
  color: var(--gold);
  text-decoration: none;
  font-size: 13px;
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 12px;
  margin-top: 4px;
}
.admin-logout:hover { text-decoration: underline; }

/* ============ 4. MAIN + TOPBAR ============ */
.admin-main { padding: 40px 44px 80px; max-width: 1180px; }
.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 36px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.admin-page-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 38px;
  font-weight: 600;
  color: var(--dark);
  letter-spacing: .01em;
}
.admin-topbar-action {
  display: flex;
  align-items: center;
  gap: 10px;
}
.admin-topbar-action .btn-mini { padding: 9px 18px; font-size: 13px; }

/* ============ 5. STAT CARDS ============ */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-bottom: 46px;
}
.stat-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px 24px;
  position: relative;
  transition: transform .25s, box-shadow .25s;
}
.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(36,34,29,.06);
}
.stat-card.stat-highlight {
  background: linear-gradient(135deg, #FFFCF0 0%, #FDF6DA 100%);
  border-color: rgba(222,189,57,.4);
}
.stat-label {
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 10px;
}
.stat-value {
  font-family: 'Cormorant Garamond', serif;
  font-size: 40px;
  color: var(--dark);
  line-height: 1;
  margin-bottom: 6px;
  font-weight: 600;
}
.stat-sub { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.stat-link {
  font-size: 13px;
  color: var(--gold);
  text-decoration: none;
  font-weight: 500;
}
.stat-link:hover { text-decoration: underline; }

/* Clickable + special variants */
a.stat-card { text-decoration: none; color: inherit; display: block; }
.stat-card.stat-selected {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(222,189,57,.25);
}
.stat-card.stat-actionable {
  background: linear-gradient(135deg, #FFFFFF 0%, #FBF9F3 100%);
  border-style: dashed;
}

/* ============ 6. SECTIONS ============ */
.admin-section { margin-bottom: 46px; }
.admin-section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
  color: var(--dark);
  margin-bottom: 18px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-weight: 600;
}
.title-link {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: var(--gold);
  text-decoration: none;
  font-weight: 500;
}
.title-link:hover { text-decoration: underline; }

/* ============ 7. QUICK ACTIONS ============ */
.action-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.action-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  text-decoration: none;
  color: var(--dark);
  font-size: 14px;
  transition: .25s;
}
.action-card:hover { border-color: var(--gold); background: #FFFDF5; }
.action-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--soft-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-size: 16px;
  flex-shrink: 0;
}
.action-label { font-weight: 500; }

.admin-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-bottom: 46px;
}
.admin-col { min-width: 0; }

/* ============ 8. ACTIVITY LISTS ============ */
.activity-list { list-style: none; padding: 0; }
.activity-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 10px;
}
.activity-list li.unread {
  border-left: 3px solid var(--gold);
  background: #FFFDF5;
}
.activity-main { min-width: 0; flex: 1; }
.activity-name {
  font-weight: 500;
  color: var(--dark);
  font-size: 14px;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.activity-meta {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.activity-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}
.activity-time { font-size: 11px; color: var(--muted); }

/* ============ 9. PILLS + EMPTY STATE ============ */
.pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
}
.pill-pending   { background: #F5EBD2; color: #8A6B10; }
.pill-confirmed { background: #E3F0E6; color: var(--green); }
.pill-cancelled { background: #F6E1DD; color: var(--red); }
.pill-new {
  background: var(--gold);
  color: var(--dark);
  font-size: 10px;
  padding: 3px 9px;
  border-radius: 20px;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 700;
}

.empty {
  padding: 24px;
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: 10px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

/* ============ 10. BAR CHART ============ */
.bar-chart {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px 28px;
}
.bar-row {
  display: grid;
  grid-template-columns: 180px 1fr 50px;
  gap: 16px;
  align-items: center;
  padding: 10px 0;
}
.bar-label {
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bar-track {
  background: var(--soft-bg);
  border-radius: 20px;
  height: 10px;
  overflow: hidden;
}
.bar-fill {
  background: linear-gradient(90deg, var(--gold), #E9CE6A);
  height: 100%;
  border-radius: 20px;
  min-width: 4px;
  transition: width .6s ease;
}
.bar-value {
  font-size: 13px;
  color: var(--muted);
  text-align: right;
  font-weight: 500;
}

/* ============ 11. FILTER BAR ============ */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 22px;
}
.filter-search {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 220px;
  background: var(--warm-white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 14px;
  transition: border-color .2s;
}
.filter-search:focus-within { border-color: var(--gold); }
.filter-search input {
  border: 0;
  background: transparent;
  outline: none;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--text);
  width: 100%;
}
.filter-icon { color: var(--muted); font-size: 16px; }

.filter-bar select {
  padding: 10px 14px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
}
.filter-bar select:focus { outline: none; border-color: var(--gold); }

/* ============ 12. TABLE ============ */
.table-wrap {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.admin-table thead { background: var(--warm-white); }
.admin-table th {
  text-align: left;
  padding: 14px 18px;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  border-bottom: 1px solid var(--line);
}
.admin-table td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table tr.row-pending { background: #FFFDF5; }
.admin-table tr:hover td { background: rgba(238,236,229,.35); }

.td-name strong { color: var(--dark); font-weight: 500; }
.msg-toggle {
  display: inline-block;
  margin-top: 4px;
  background: none;
  border: 0;
  color: var(--gold);
  font-size: 12px;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}
.msg-toggle:hover { color: var(--dark); }

.td-contact a {
  display: block;
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
}
.td-contact a:hover { color: var(--gold); }
.td-contact .phone { color: var(--muted); font-size: 12px; margin-top: 2px; }

.td-service { color: var(--dark); }
.td-service .price {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.td-payment .method {
  font-size: 12px;
  font-weight: 600;
  color: var(--dark);
  letter-spacing: .04em;
}
.td-payment .ref {
  display: block;
  font-size: 12px;
  color: var(--muted);
  font-family: monospace;
  margin-top: 2px;
}
.td-payment .ref.missing { font-style: italic; color: var(--red); }

.td-actions { white-space: nowrap; }
.td-actions .inline-form { display: inline-block; margin-right: 6px; }
.td-actions .inline-form:last-child { margin-right: 0; }

/* Expandable message inside enrolment row (renamed to avoid clash) */
.enrol-msg-row td { padding: 0 !important; border-bottom: 1px solid var(--line); }
.enrol-msg-body {
  padding: 18px 22px;
  background: #FFFDF5;
  border-left: 3px solid var(--gold);
}
.enrol-msg-label {
  display: block;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 8px;
}
.enrol-msg-body p {
  color: var(--text);
  font-size: 14px;
  line-height: 1.65;
  margin: 0;
}

/* ============ 13. FLASH ============ */
.admin-flash {
  background: #F5F1DE;
  border-left: 4px solid var(--gold);
  padding: 14px 20px;
  border-radius: 8px;
  margin-bottom: 26px;
  color: var(--dark);
  font-size: 14px;
}
.admin-flash-error {
  background: #FAEDEA;
  border-left-color: var(--red);
  color: #7A3226;
}
.flash-list {
  margin: 8px 0 0;
  padding-left: 20px;
}
.flash-list li {
  margin-bottom: 4px;
  font-size: 13.5px;
}

/* ============ 14. SERVICE LIST (admin services grid) ============ */
.service-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.service-admin-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  transition: .25s;
}
.service-admin-card:hover {
  box-shadow: 0 14px 34px rgba(36,34,29,.06);
  transform: translateY(-2px);
}
.service-admin-thumb {
  aspect-ratio: 16 / 10;
  background-size: cover;
  background-position: center;
  background-color: var(--soft-bg);
  position: relative;
}
.svc-flag {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 600;
}
.service-admin-info { padding: 18px 20px 20px; }
.svc-order {
  font-size: 11px;
  letter-spacing: .18em;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 6px;
}
.service-admin-info h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  color: var(--dark);
  margin-bottom: 4px;
  font-weight: 600;
}
.svc-sub { font-size: 13px; color: var(--muted); margin-bottom: 12px; font-style: italic; }
.svc-meta { font-size: 12px; color: var(--muted); margin-bottom: 16px; }
.svc-actions { display: flex; gap: 8px; }

/* ============ 15. MINI BUTTONS ============ */
.btn-mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  font-family: 'Inter', sans-serif;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: .02em;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: .2s;
  white-space: nowrap;
}
.btn-mini-gold { background: var(--gold); color: var(--dark); }
.btn-mini-gold:hover { background: var(--dark); color: var(--gold); }
.btn-mini-outline { border-color: var(--dark); color: var(--dark); background: #fff; }
.btn-mini-outline:hover { background: var(--dark); color: #fff; }
.btn-mini-danger {
  background: #fff;
  color: var(--red);
  border-color: rgba(194,91,74,.35);
}
.btn-mini-danger:hover { background: var(--red); color: #fff; border-color: var(--red); }
.btn-mini-ghost { background: transparent; color: var(--muted); }
.btn-mini-ghost:hover { color: var(--dark); }
.btn-mini[disabled] { opacity: .4; cursor: not-allowed; pointer-events: none; }

/* ============ 16. EDITOR ============ */
.editor-section { margin-top: 20px; }
.service-editor {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 26px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 30px;
}
.editor-main, .editor-side { display: flex; flex-direction: column; gap: 22px; }

.editor-group {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 22px 22px 20px;
  background: #fff;
}
.editor-group legend {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  color: var(--dark);
  font-weight: 600;
  padding: 0 10px;
  margin-left: -4px;
}
.editor-group label {
  display: block;
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 16px;
}
.editor-group input[type="text"],
.editor-group input[type="number"],
.editor-group input[type="email"],
.editor-group input[type="tel"],
.editor-group input[type="url"],
.editor-group input[type="password"],
.editor-group select,
.editor-group textarea {
  display: block;
  width: 100%;
  margin-top: 7px;
  padding: 11px 14px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  letter-spacing: normal;
  text-transform: none;
  color: var(--text);
  background: var(--warm-white);
  border: 1px solid var(--line);
  border-radius: 7px;
  transition: border-color .2s, background .2s;
}
.editor-group input:focus,
.editor-group select:focus,
.editor-group textarea:focus {
  outline: none;
  border-color: var(--gold);
  background: #fff;
}
.editor-group textarea { resize: vertical; min-height: 90px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }

.check-row {
  display: flex !important;
  align-items: center;
  gap: 10px;
  text-transform: none;
  letter-spacing: normal;
  font-size: 14px !important;
  color: var(--text) !important;
  font-weight: 400 !important;
  margin-top: 8px;
}
.check-row input { margin: 0; }

.field-hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
  letter-spacing: normal;
  text-transform: none;
  font-weight: 400;
}

.editor-footer {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  margin-top: 4px;
}
.editor-footer .btn-mini { padding: 11px 26px; font-size: 13.5px; }

/* ============ 17. HERO PREVIEW + FILE INPUT + GALLERY ============ */
.hero-preview {
  aspect-ratio: 16 / 10;
  background: var(--soft-bg);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.preview-empty { color: var(--muted); font-size: 13px; font-style: italic; }
.preview-empty.small { padding: 20px; text-align: center; }

.file-input {
  display: inline-block !important;
  cursor: pointer;
  margin-bottom: 0 !important;
}
.file-input input[type="file"] {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}
.gallery-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  background: var(--soft-bg);
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gallery-remove { position: absolute; top: 4px; right: 4px; }
.gallery-remove button {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(36,34,29,.75);
  color: #fff;
  border: 0;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: .2s;
}
.gallery-remove button:hover { background: var(--red); }

/* ============ 18. SETTINGS PAGE ============ */
.settings-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: linear-gradient(135deg, #FFFCF0 0%, #FDF6DA 100%);
  border: 1px solid rgba(222,189,57,.4);
  border-radius: 12px;
  padding: 20px 24px;
  flex-wrap: wrap;
}
.settings-info-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--dark);
  margin: 0 0 4px;
}
.settings-info-text {
  font-size: 13.5px;
  color: var(--muted);
  margin: 0;
  max-width: 620px;
  line-height: 1.55;
}

.settings-form { margin: 0; }
.settings-layout {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 28px;
  align-items: start;
}
.settings-left { display: flex; flex-direction: column; gap: 22px; }
.settings-group { padding: 22px 24px 20px; }

.color-field { margin-bottom: 20px; }
.color-field label {
  display: block;
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 8px;
}
.color-input-wrap { display: flex; gap: 10px; align-items: center; }
.color-input-wrap input[type="color"] {
  width: 54px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  background: #fff;
}
.color-input-wrap input[type="color"]::-webkit-color-swatch-wrapper { padding: 4px; }
.color-input-wrap input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 5px; }
.hex-input {
  flex: 1;
  padding: 11px 14px;
  font-family: 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: 14px;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: var(--warm-white);
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
}
.hex-input:focus { outline: none; border-color: var(--gold); background: #fff; }

.hero-uploader {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px dashed var(--line);
}
.hero-uploader-label {
  display: block;
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 10px;
}
.hero-uploader-preview {
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
  background-color: var(--soft-bg);
  border: 1px solid var(--line);
  margin-bottom: 12px;
}

.settings-right {
  position: sticky;
  top: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.preview-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px 22px 24px;
}
.preview-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--dark);
  margin: 0 0 4px;
}
.preview-sub {
  font-size: 12.5px;
  color: var(--muted);
  margin: 0 0 18px;
  line-height: 1.5;
}
.preview-card {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  margin-bottom: 20px;
  transition: background .2s;
}
.preview-hero { padding: 26px 24px 28px; transition: background .2s; }
.preview-eyebrow {
  font-size: 10px;
  letter-spacing: .24em;
  margin: 0 0 12px;
  font-weight: 600;
  transition: color .2s;
}
.preview-heading {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
  line-height: 1.2;
  margin: 0 0 12px;
  transition: color .2s;
}
.preview-tagline {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 15px;
  margin: 0 0 18px;
  transition: color .2s;
}
.preview-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.preview-btn {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 40px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: .2s;
}
.preview-btn-gold { background: var(--gold); color: var(--dark); }
.preview-btn-outline { border-color: #fff; color: #fff; }

.preview-body { padding: 22px 24px 24px; transition: background .2s; }
.preview-body-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  margin: 0 0 8px;
  font-weight: 600;
  transition: color .2s;
}
.preview-body-text {
  font-size: 13.5px;
  line-height: 1.6;
  margin: 0;
  transition: color .2s;
}

.preview-swatches {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
  gap: 12px;
}
.swatch-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.swatch {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  border: 1px solid var(--line);
  transition: background .2s;
}
.swatch-label {
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.save-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px 22px;
  text-align: center;
}
.btn-save {
  width: 100%;
  padding: 13px 24px;
  font-size: 14px;
}
.save-hint {
  font-size: 12px;
  color: var(--muted);
  margin: 10px 0 0;
}

/* ============ 19. PAYMENT METHODS ============ */
.pm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}
.pm-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: box-shadow .25s, transform .25s;
}
.pm-card:hover {
  box-shadow: 0 14px 34px rgba(36,34,29,.06);
  transform: translateY(-2px);
}
.pm-card.pm-inactive { opacity: .65; }

.pm-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}
.pm-order {
  font-size: 11px;
  letter-spacing: .18em;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 4px;
}
.pm-head h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
  color: var(--dark);
  margin: 0 0 2px;
  font-weight: 600;
}
.pm-slug { font-family: monospace; font-size: 12px; color: var(--muted); }
.pm-status { flex-shrink: 0; }

.pm-body { border-top: 1px solid var(--line); padding-top: 16px; }
.pm-facts { margin: 0 0 14px; display: grid; gap: 8px; }
.pm-facts > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
}
.pm-facts dt {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-weight: 600;
}
.pm-facts dd { color: var(--text); margin: 0; text-align: right; }

.pm-instructions {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
  background: var(--warm-white);
  border-radius: 8px;
  padding: 12px 14px;
  margin: 0;
  font-style: italic;
}
.pm-foot {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: auto;
}

/* ============ 20. LOGIN / PIN / LOCKED SCREENS ============ */
.login-body {
  background: var(--dark);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 20px;
}
.login-wrap {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}
.login-card {
  width: 100%;
  background: #fff;
  border-radius: 16px;
  padding: 40px 34px 34px;
  box-shadow: 0 30px 80px rgba(0,0,0,.35);
}
.login-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 26px;
}
.login-brand img { height: 28px; }
.login-brand span {
  font-size: 11px;
  letter-spacing: .24em;
  color: var(--gold);
  text-transform: uppercase;
  font-weight: 600;
}

.login-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 34px;
  color: var(--dark);
  font-weight: 600;
  margin-bottom: 6px;
  line-height: 1.15;
}
.login-sub {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 26px;
}

.login-form label {
  display: block;
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 18px;
}
.login-form input {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 13px 16px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  letter-spacing: normal;
  text-transform: none;
  color: var(--text);
  background: var(--warm-white);
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: border-color .2s, background .2s;
}
.login-form input:focus {
  outline: none;
  border-color: var(--gold);
  background: #fff;
}
.login-form input:disabled,
.login-form button:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.login-submit {
  width: 100%;
  padding: 13px 24px;
  font-size: 14px;
  margin-top: 6px;
}

/* PIN screen */
.pin-input {
  text-align: center;
  font-size: 26px !important;
  letter-spacing: .5em;
  padding: 16px 20px !important;
  font-family: 'SFMono-Regular', Menlo, Consolas, monospace !important;
}
.pin-label > span { display: block; }

.login-foot {
  margin-top: 22px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}
.login-link {
  display: block;
  color: var(--gold);
  text-decoration: none;
  font-weight: 500;
  margin-top: 8px;
}
.login-link:hover { text-decoration: underline; }

.login-copy {
  color: #777;
  font-size: 12px;
  text-align: center;
}

/* Lockout banner on login form */
.lockout-banner {
  background: #FAEDEA;
  border-left: 4px solid var(--red);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 20px;
}
.lockout-title {
  font-weight: 600;
  color: #7A3226;
  font-size: 14px;
  margin: 0 0 4px;
}
.lockout-text {
  color: #7A3226;
  font-size: 13.5px;
  margin: 0;
}
.lockout-text strong {
  font-family: 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: 15px;
}

/* Locked page */
.locked-card { text-align: center; }
.lock-icon {
  font-size: 54px;
  margin: 8px 0 14px;
  line-height: 1;
}
.locked-card .login-title { margin-bottom: 8px; }
.locked-card .login-sub {
  max-width: 320px;
  margin: 0 auto 26px;
  line-height: 1.55;
}
.lock-countdown {
  background: linear-gradient(135deg, #FFFCF0 0%, #FDF6DA 100%);
  border: 1px solid rgba(222,189,57,.4);
  border-radius: 14px;
  padding: 24px 18px 22px;
  margin-bottom: 22px;
}
.lock-countdown-label {
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #8A6B10;
  font-weight: 600;
  margin-bottom: 8px;
}
.lock-countdown-value {
  font-family: 'Cormorant Garamond', serif;
  font-size: 54px;
  line-height: 1;
  color: #24221D;
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: .01em;
}
.lock-countdown-unit {
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #8A6B10;
  font-weight: 600;
  margin: 0;
}
.lock-note {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 22px;
}
.lock-note strong { color: var(--dark); }

/* ============ 21. MESSAGES — TABLE VIEW ============ */
.msg-table { table-layout: fixed; }
.msg-table th { white-space: nowrap; }
.msg-table td { vertical-align: middle; }

.msg-row { cursor: pointer; transition: background .15s; }
.msg-row:hover td { background: rgba(238,236,229,.5); }
.msg-row-unread td { background: #FFFDF5; }
.msg-row-unread:hover td { background: #FFF9E4; }

.td-dot {
  text-align: center;
  padding-left: 8px !important;
  padding-right: 8px !important;
}
.unread-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(222,189,57,.18);
}

.td-sender strong {
  display: block;
  color: var(--dark);
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sender-email,
.sender-phone {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sender-phone { font-family: 'SFMono-Regular', Menlo, Consolas, monospace; }

.td-body {
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.55;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.msg-row-unread .td-body { color: var(--dark); }

.td-interest { text-align: left; }
.td-interest .muted { color: var(--muted); }

.interest-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 10.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 600;
  background: var(--soft-bg);
  color: var(--text);
  white-space: nowrap;
}

/* Date column (used in messages + enrolments tables) */
.td-date {
  color: var(--muted);
  font-size: 12.5px;
  white-space: nowrap;
}
.td-date .time {
  display: block;
  font-size: 11px;
  color: var(--muted);
}

/* Actions column in message rows */
.msg-table .td-actions {
  white-space: nowrap;
  text-align: right;
}
.msg-table .td-actions .inline-form { display: inline-block; margin-left: 4px; }
.msg-table .td-actions .btn-mini { padding: 6px 12px; font-size: 11.5px; }
.msg-table .td-actions .btn-mini-danger {
  padding: 6px 10px;
  font-size: 14px;
  line-height: 1;
}

/* ============ 22. VIEW MESSAGE — SINGLE PAGE ============ */
.view-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.view-eyebrow {
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin: 0 0 8px;
}
.view-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 38px;
  font-weight: 600;
  color: var(--dark);
  margin: 0 0 6px;
  line-height: 1.1;
}
.view-sub {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}
.view-nav {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.view-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 30px;
  align-items: start;
}

.view-message-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 34px 36px 40px;
}
.view-message-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.view-status {
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
}
.view-status.is-read   { background: var(--soft-bg); color: var(--muted); }
.view-status.is-unread { background: var(--gold); color: var(--dark); }

.view-message-body {
  font-size: 16px;
  line-height: 1.85;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

.view-side {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 24px;
}
.view-fact-card,
.view-actions-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px 24px 24px;
}
.view-fact-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  color: var(--dark);
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
}
.view-fact {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed rgba(36,34,29,.08);
  font-size: 13.5px;
}
.view-fact:last-child { border-bottom: 0; }
.view-fact-label {
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  flex-shrink: 0;
}
.view-fact-value {
  color: var(--dark);
  text-align: right;
  word-break: break-word;
  max-width: 62%;
}
.view-fact-value.link {
  text-decoration: none;
  color: var(--dark);
}
.view-fact-value.link:hover { color: var(--gold); text-decoration: underline; }

.view-actions-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.view-action-btn {
  width: 100%;
  justify-content: center;
  padding: 12px 20px;
  font-size: 13.5px;
}
.view-action-form { margin: 0; }

/* ============ 23. CHANGE PASSWORD PAGE ============ */
/* (uses .service-editor + .editor-group from section 16,
   plus the flash styles in section 13 — nothing else needed) */
.empty code {
  font-family: 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: 12.5px;
  color: var(--dark);
  word-break: break-all;
}

/* ============================================================
   24. RESPONSIVE
   ============================================================ */

@media (max-width: 1100px) {
  .service-editor { grid-template-columns: 1fr; }
  .editor-footer { justify-content: stretch; }
  .editor-footer .btn-mini { flex: 1; }
}

@media (max-width: 1000px) {
  .settings-layout { grid-template-columns: 1fr; }
  .settings-right { position: static; }
  .table-wrap { overflow-x: auto; }
  .admin-table { min-width: 900px; }

  /* View message stacks on tablet */
  .view-grid { grid-template-columns: 1fr; }
  .view-side { position: static; }
  .view-title { font-size: 30px; }
  .view-message-card { padding: 26px 24px 30px; }
  .view-header { align-items: flex-start; }

  /* Messages table — hide preview + interest */
  .msg-table th:nth-child(3),
  .msg-table td:nth-child(3),
  .msg-table th:nth-child(4),
  .msg-table td:nth-child(4) {
    display: none;
  }
}

@media (max-width: 900px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar {
    position: relative;
    height: auto;
    padding: 20px 0;
  }
  .admin-brand { padding-bottom: 20px; }
  .admin-nav { flex-direction: row; overflow-x: auto; padding: 12px; }
  .admin-nav a { white-space: nowrap; }
  .admin-sidebar-footer { display: none; }
  .admin-main { padding: 26px 20px 60px; }
  .admin-page-title { font-size: 30px; }
  .admin-cols { grid-template-columns: 1fr; }
  .bar-row { grid-template-columns: 110px 1fr 40px; gap: 10px; }
  .stat-value { font-size: 34px; }
}

@media (max-width: 700px) {
  .filter-bar { flex-direction: column; align-items: stretch; }
  .filter-bar .btn-mini { width: 100%; justify-content: center; }

  /* Messages table — hide date, compact actions */
  .msg-table th:nth-child(5),
  .msg-table td:nth-child(5) { display: none; }
  .msg-table .td-actions .btn-mini { padding: 5px 9px; font-size: 11px; }
}
/* ============================================================
   PAYMENT METHOD ICONS + EXTENDED FIELDS
   ============================================================ */
.pm-head-left {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
  flex: 1;
}

.pm-icon {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--soft-bg);
  color: var(--dark);
  transition: background .25s, color .25s;
}

/* Brand-tinted backgrounds per icon key */
.pm-icon-mpesa    { background: #E8F5E9; color: #2E7D32; }
.pm-icon-bank     { background: #E3F2FD; color: #1565C0; }
.pm-icon-cash     { background: #FFF8E1; color: #8A6B10; }
.pm-icon-card     { background: #F3E5F5; color: #6A1B9A; }
.pm-icon-paypal   { background: #E3F2FD; color: #003087; }
.pm-icon-airtel   { background: #FFEBEE; color: #C62828; }
.pm-icon-whatsapp { background: #E8F5E9; color: #1B5E20; }
.pm-icon-other    { background: var(--soft-bg); color: var(--muted); }

.pm-card:hover .pm-icon { transform: scale(1.04); }

/* Code block inside pm-facts */
.pm-facts code {
  font-family: 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: 12.5px;
  background: var(--warm-white);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--dark);
  border: 1px solid var(--line);
}

/* Slightly larger grid-2 for the payment details section */
.editor-group .grid-2 {
  row-gap: 4px;
}