/* ============================================
   MOHINI CSC CENTRE — Common Styles
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  --primary: #1e3a8a;
  --primary-light: #eef2ff;
  --primary-dark: #16306b;
  --navy: #0f172a;
  --text: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --bg: #f6f7f9;
  --bg-white: #ffffff;
  --border: #e5e7eb;
  --border-light: #f1f3f5;
  --success: #16a34a;
  --success-bg: #f0fdf4;
  --warning: #d97706;
  --warning-bg: #fffbeb;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --info: #0ea5e9;
  --info-bg: #f0f9ff;
  --violet: #16306b;
  --violet-bg: #f5f3ff;
  --shadow-sm: 0 1px 2px rgba(15,23,42,.06);
  --shadow: 0 1px 2px rgba(15,23,42,.05), 0 1px 3px rgba(15,23,42,.06);
  --shadow-md: 0 4px 12px -2px rgba(15,23,42,.08), 0 2px 4px -2px rgba(15,23,42,.04);
  --shadow-lg: 0 12px 24px -6px rgba(15,23,42,.1), 0 4px 8px -4px rgba(15,23,42,.05);
  --radius: 12px;
  --radius-lg: 14px;
  --radius-sm: 8px;
  --sidebar-w: 260px;
  --topbar-h: 72px;
}

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

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

a { color: var(--primary); text-decoration: none; }

img { max-width: 100%; display: block; }

/* ---- Layout ---- */
.app-shell { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-white);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform .25s ease;
}

.sidebar .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 20px 28px;
}

.sidebar .brand img { width: 44px; height: 44px; object-fit: contain; }
.sidebar .brand strong { font-size: 13px; letter-spacing: .06em; color: var(--navy); display: block; }
.sidebar .brand span { font-size: 9px; letter-spacing: .14em; color: var(--text-muted); display: block; margin-top: 2px; }

.sidebar nav { flex: 1; padding: 0 12px; display: flex; flex-direction: column; gap: 4px; }

.sidebar .nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 13.5px;
  background: none;
  border: none;
  cursor: pointer;
  transition: all .15s;
  width: 100%;
  text-align: left;
}

.sidebar .nav-item i { width: 20px; text-align: center; font-style: normal; font-size: 16px; }
.sidebar .nav-item:hover { background: var(--primary-light); color: var(--primary); }
.sidebar .nav-item.active { background: var(--primary-light); color: var(--primary); }

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border-light);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg);
  border-radius: var(--radius-sm);
}

.sidebar-user .avatar-sm {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 12px;
  flex-shrink: 0;
}

.sidebar-user b { font-size: 12px; display: block; color: var(--navy); }
.sidebar-user small { font-size: 10px; color: var(--text-muted); }

/* Main */
.main {
  margin-left: var(--sidebar-w);
  width: calc(100% - var(--sidebar-w));
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Topbar */
.topbar {
  min-height: var(--topbar-h);
  height: auto;
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  padding: 10px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
  position: sticky;
  top: 0;
  z-index: 50;
  max-width: 100%;
}

.topbar-left { display: flex; align-items: center; gap: 16px; min-width: 0; flex: 1 1 auto; }
.mobile-menu { display: none; background: none; font-size: 22px; color: var(--text); padding: 6px; flex-shrink: 0; }

.breadcrumb { min-width: 0; overflow: hidden; }
.breadcrumb span { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .1em; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.breadcrumb b { font-size: 16px; color: var(--navy); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

.topbar-right { display: flex; align-items: center; gap: 14px; flex-shrink: 0; flex-wrap: wrap; }

.icon-btn {
  position: relative;
  background: var(--bg);
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 16px;
  transition: all .15s;
}
.icon-btn:hover { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }
.icon-btn .badge {
  position: absolute;
  top: -4px; right: -4px;
  width: 18px; height: 18px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.profile-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 6px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 40px;
  cursor: pointer;
  transition: all .15s;
}
.profile-pill:hover { border-color: var(--primary); }
.profile-pill .avatar-sm {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 11px;
}
.profile-pill b { font-size: 12px; display: block; color: var(--navy); }
.profile-pill small { font-size: 10px; color: var(--text-muted); }

/* Content */
.content { flex: 1; padding: 28px 32px 40px; }

/* ---- Common Components ---- */

/* Cards */
.card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

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

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

.stat-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: box-shadow .15s;
}
.stat-card:hover { box-shadow: var(--shadow-md); }

.stat-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  font-size: 18px;
  flex-shrink: 0;
}
.stat-icon.blue { background: var(--primary-light); color: var(--primary); }
.stat-icon.green { background: var(--success-bg); color: var(--success); }
.stat-icon.amber { background: var(--warning-bg); color: var(--warning); }
.stat-icon.red { background: var(--danger-bg); color: var(--danger); }
.stat-icon.violet { background: var(--violet-bg); color: var(--violet); }

.stat-info span { font-size: 12px; color: var(--text-muted); display: block; }
.stat-info strong { font-size: 22px; font-weight: 800; color: var(--navy); display: block; margin: 2px 0; }
.stat-info small { font-size: 11px; color: var(--text-secondary); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 25px;
  border-radius: 25px;
  font-weight: 600;
  font-size: 13px;
  border: none;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}

.btn-primary { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); color: #fff; box-shadow: 0 4px 15px rgba(30,58,138,.3); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(30,58,138,.4); }
.btn-primary:disabled { background: #c7d2fe; cursor: not-allowed; box-shadow: none; transform: none; }

.btn-secondary { background: var(--bg); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--border-light); }

.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #15803d; }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; }

.btn-warning { background: var(--warning); color: #fff; }

.btn-ghost { background: none; color: var(--primary); padding: 8px 12px; }
.btn-ghost:hover { background: var(--primary-light); }

.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-lg { padding: 14px 28px; font-size: 15px; }

/* Tables */
.table-wrap {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
}

.table-wrap table { width: 100%; border-collapse: collapse; }
.table-wrap th {
  text-align: left;
  padding: 14px 18px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.table-wrap td {
  padding: 14px 18px;
  font-size: 13px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text);
}
.table-wrap tr:last-child td { border-bottom: none; }
.table-wrap tr:hover td { background: var(--bg); }

/* Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

.badge-processing { background: var(--info-bg); color: var(--info); }
.badge-completed { background: var(--success-bg); color: var(--success); }
.badge-pending { background: var(--warning-bg); color: var(--warning); }
.badge-rejected { background: var(--danger-bg); color: var(--danger); }
.badge-draft { background: var(--bg); color: var(--text-muted); }
.badge-correction { background: #fef3c7; color: #92400e; }
.badge-submitted { background: #ede9fe; color: #6d28d9; }
.badge-cancelled { background: #fce7f3; color: #be185d; }

/* Forms */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--navy); margin-bottom: 6px; }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text);
  background: var(--bg-white);
  transition: border-color .15s;
  font-family: inherit;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30,58,138,.1);
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Overlay / Drawer */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.4);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  justify-content: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
.overlay.open { opacity: 1; pointer-events: auto; }

.drawer {
  width: 640px;
  max-width: 100%;
  height: 100vh;
  background: var(--bg-white);
  box-shadow: -10px 0 30px rgba(0,0,0,.1);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .3s ease;
}
.overlay.open .drawer { transform: translateX(0); }

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

.drawer-header h2 { font-size: 17px; font-weight: 700; }
.drawer-close {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 18px;
  color: var(--text-secondary);
}
.drawer-close:hover { background: var(--danger-bg); color: var(--danger); border-color: var(--danger); }

.drawer-body { flex: 1; overflow-y: auto; padding: 28px; }

/* Stepper */
.stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 20px 28px;
  border-bottom: 1px solid var(--border);
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.step-dot {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--border);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  transition: all .2s;
}

.step.active .step-dot { background: var(--primary); color: #fff; border-color: var(--primary); }
.step.done .step-dot { background: var(--success); color: #fff; border-color: var(--success); }

.step span { font-size: 11px; font-weight: 600; color: var(--text-muted); }
.step.active span { color: var(--primary); }
.step.done span { color: var(--success); }

.step-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  margin: 0 6px;
  margin-bottom: 20px;
}
.step-line.done { background: var(--success); }

/* Form Steps */
.form-step { display: none; }
.form-step.active { display: block; }

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-light);
}

/* Upload Box */
.upload-box {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all .15s;
  margin-bottom: 10px;
}
.upload-box:hover { border-color: var(--primary); background: var(--primary-light); }
.upload-box.has-file { border-color: var(--success); background: var(--success-bg); border-style: solid; }

.upload-box .upload-icon {
  width: 42px; height: 42px;
  border-radius: var(--radius-sm);
  background: var(--primary-light);
  color: var(--primary);
  display: grid;
  place-items: center;
  font-size: 18px;
  flex-shrink: 0;
}

.upload-box .upload-info b { font-size: 13px; display: block; color: var(--navy); }
.upload-box .upload-info small { font-size: 11px; color: var(--text-muted); }
.upload-box .upload-status { margin-left: auto; font-size: 12px; font-weight: 600; }
.upload-box .upload-status.ok { color: var(--success); }

/* Review */
.review-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}
.review-row:last-child { border-bottom: none; }
.review-row span { font-size: 13px; color: var(--text-muted); }
.review-row b { font-size: 13px; color: var(--navy); }

/* Notice */
.notice {
  background: var(--info-bg);
  border: 1px solid #bae6fd;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 20px;
}
.notice b { font-size: 13px; display: block; color: var(--navy); }
.notice span { font-size: 12px; color: var(--text-secondary); }

/* Checkbox */
.check-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  cursor: pointer;
  margin: 16px 0;
}
.check-label input[type=checkbox] { margin-top: 2px; accent-color: var(--primary); }
.check-label span { font-size: 12.5px; color: var(--text-secondary); line-height: 1.5; }

/* Toast */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--navy);
  color: #fff;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: all .3s;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state h3 { font-size: 16px; color: var(--text-secondary); margin-bottom: 6px; }
.empty-state p { font-size: 13px; }

/* Tabs */
.tabs { display: flex; gap: 0; border-bottom: 2px solid var(--border); margin-bottom: 24px; }
.tab-btn {
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: all .15s;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.5);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }

.modal {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 520px;
  max-width: 92vw;
  max-height: 85vh;
  overflow-y: auto;
  transform: scale(.95);
  transition: transform .2s;
}
.modal-overlay.open .modal { transform: scale(1); }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 16px; font-weight: 700; }
.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 20px;
}

.page-btn {
  width: 34px; height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-white);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all .15s;
}
.page-btn:hover { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }
.page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Filters */
.filters {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.filters input, .filters select {
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: inherit;
  background: var(--bg-white);
}
.filters input { flex: 1; min-width: 200px; }
.filters input:focus, .filters select:focus { outline: none; border-color: var(--primary); }

/* Page Intro */
.page-intro { margin-bottom: 28px; }
.page-intro .eyebrow {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--primary);
  display: block;
  margin-bottom: 6px;
}
.page-intro h1, .page-intro h2 { font-size: 24px; font-weight: 800; color: var(--navy); margin-bottom: 4px; }
.page-intro p { font-size: 14px; color: var(--text-secondary); }

/* Service Cards */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.service-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 7px;
  cursor: pointer;
  transition: all .2s;
  text-align: left;
  width: 100%;
  min-width: 0; /* grid item: never wider than its track — stops page horizontal scroll */
  height: 100%; /* equal-height cards inside the grid row */
}
.service-card > div { min-width: 0; }
.service-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.service-card .sc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.service-card .sc-top > span { flex-shrink: 0; }

.service-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 800;
  flex-shrink: 0;
}

.service-icon.aadhaar { background: #fef3c7; color: #92400e; }
.service-icon.pan { background: #ede9fe; color: #6d28d9; }
.service-icon.ration { background: #dcfce7; color: #166534; }
.service-icon.bill { background: #ffe4e6; color: #9f1239; }
.service-icon.other { background: var(--primary-light); color: var(--primary); }

/* Title: fixed 2-line slot → all cards align; long names clamp instead of pushing layout */
.service-card b {
  font-size: 13.5px;
  font-weight: 800;
  line-height: 1.35;
  color: var(--navy);
  min-height: 37px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}
/* Description: markdown cleaned in JS + 3-line clamp → uniform card heights */
.service-card small {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* Price row pinned to the card bottom with a subtle divider */
.service-card .price {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.service-card .price .price-main { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.service-card .arrow { margin-left: auto; color: var(--text-muted); font-size: 16px; transition: transform .15s; }
.service-card:hover .arrow { transform: translateX(4px); color: var(--primary); }

/* Lock state */
.locked-state {
  text-align: center;
  padding: 20px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-top: 16px;
}
.locked-state span { font-size: 14px; color: var(--text-muted); }
.locked-state small { font-size: 12px; color: var(--text-muted); display: block; margin-top: 4px; }

/* Payment methods */
.payment-methods {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 20px 0;
}

.payment-method {
  padding: 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-white);
  cursor: pointer;
  text-align: center;
  transition: all .15s;
}
.payment-method:hover { border-color: var(--primary); background: var(--primary-light); }
.payment-method.selected { border-color: var(--primary); background: var(--primary-light); }
.payment-method b { font-size: 14px; display: block; color: var(--navy); }
.payment-method small { font-size: 11px; color: var(--text-muted); }

/* Wallet */
.wallet-balance {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.wallet-balance .wb-info small { font-size: 13px; opacity: .8; display: block; }
.wallet-balance .wb-info strong { font-size: 32px; font-weight: 800; display: block; margin: 4px 0; }
.wallet-balance .wb-info span { font-size: 12px; opacity: .7; }

/* Notification dropdown */
.notif-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(320px, calc(100vw - 32px));
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 100;
  display: none;
}
.notif-dropdown.show { display: block; }

.notif-item {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: background .1s;
}
.notif-item:hover { background: var(--bg); }
.notif-item:last-child { border-bottom: none; }

.notif-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--primary);
  margin-top: 6px;
  flex-shrink: 0;
}

.notif-item p { font-size: 12.5px; color: var(--text); line-height: 1.4; }
.notif-item small { font-size: 11px; color: var(--text-muted); }

/* Responsive */
@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
  .main { margin-left: 0; width: 100%; }
  .mobile-menu { display: block; }
  .content { padding: 20px 16px; }
  .topbar { padding: 10px 16px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr; }
  .payment-methods { grid-template-columns: 1fr; }
  .wallet-balance { flex-direction: column; gap: 16px; text-align: center; }
}

@media (max-width: 640px) {
  .stats-grid { grid-template-columns: 1fr; }
  .service-grid { grid-template-columns: 1fr; }
  .drawer { width: 100%; }
  .stepper { padding: 16px; }
  .step span { display: none; }
  .profile-pill b, .profile-pill small { display: none; }
}

/* ========== Global Smooth Transitions ========== */
* {
  scroll-behavior: smooth;
}

.sidebar {
  transition: transform 0.3s ease;
}

.sidebar .nav-item {
  transition: all 0.2s ease;
  position: relative;
}

.sidebar .nav-item:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.sidebar .nav-item.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

.sidebar .nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 24px;
  background: var(--primary);
  border-radius: 0 4px 4px 0;
  animation: activeBar 0.3s ease;
}

@keyframes activeBar {
  from { height: 0; opacity: 0; }
  to { height: 24px; opacity: 1; }
}

/* ========== Modal Animation ========== */
.modal-overlay {
  transition: opacity 0.2s ease;
}

.modal {
  transition: transform 0.3s ease, opacity 0.2s ease;
}

.modal-overlay.open .modal {
  animation: modalPop 0.3s ease;
}

@keyframes modalPop {
  from { transform: scale(0.95) translateY(10px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

/* ========== Loading Shimmer ========== */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.loading-shimmer {
  background: linear-gradient(90deg, var(--bg) 25%, var(--border-light) 50%, var(--bg) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* ===== MISSING CSS FOR DYNAMIC ELEMENTS ===== */
.svc-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.svc-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 6px; font-size: 11px; font-weight: 600; }
.chip-green { background: rgba(34,197,94,.1); color: #16a34a; border: 1px solid rgba(34,197,94,.2); }
.chip-red { background: rgba(239,68,68,.1); color: #dc2626; border: 1px solid rgba(239,68,68,.2); }
.chip-yellow { background: rgba(234,179,8,.1); color: #a16207; border: 1px solid rgba(234,179,8,.2); }
.chip-gray { background: rgba(100,116,139,.1); color: #475569; border: 1px solid rgba(100,116,139,.2); }
.chip-blue { background: rgba(30,58,138,.1); color: #1e3a8a; border: 1px solid rgba(30,58,138,.2); }
.chip-orange { background: rgba(249,115,22,.1); color: #ea580c; border: 1px solid rgba(249,115,22,.2); }
.svc-docs { margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(0,0,0,.06); }
.admin-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.admin-detail-grid .field.full { grid-column: 1 / -1; }
.admin-detail-grid .field label { display: block; font-size: 11px; color: var(--text-muted); margin-bottom: 4px; text-transform: uppercase; letter-spacing: .5px; }
.admin-detail-grid .field span { font-size: 13px; color: var(--text); }
.doc-review-list { display: flex; flex-direction: column; gap: 8px; }
.doc-review-item { display: flex; align-items: center; gap: 12px; padding: 10px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.doc-icon { font-size: 24px; }
.doc-info { flex: 1; }
.doc-info b { display: block; font-size: 13px; }
.doc-info small { font-size: 11px; color: var(--text-muted); }
.doc-actions { display: flex; gap: 6px; align-items: center; }

/* ===== PAGE LOADER ===== */
.page-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 60%, #1e3a8a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
.page-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.loader-content {
  text-align: center;
}
.loader-spinner {
  position: relative;
  width: 70px;
  height: 70px;
  margin: 0 auto 24px;
}
.spinner-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid transparent;
}
.spinner-ring:nth-child(1) {
  border-top-color: #1e3a8a;
  animation: spin 1.2s linear infinite;
}
.spinner-ring:nth-child(2) {
  inset: 8px;
  border-right-color: #60a5fa;
  animation: spin 1.6s linear infinite reverse;
}
.spinner-ring:nth-child(3) {
  inset: 16px;
  border-bottom-color: #93c5fd;
  animation: spin 2s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.loader-text b {
  display: block;
  font-size: 18px;
  color: #fff;
  letter-spacing: 2px;
  margin-bottom: 6px;
}
.loader-text span {
  font-size: 13px;
  color: rgba(255,255,255,.5);
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
