:root {
  --brand-plum: #8C5489;
  --brand-plum-dark: #6d3f6b;
  --brand-plum-light: #f7eff6;
  --brand-gold: #F6D36D;
  --brand-gold-soft: #fef8e7;
  --surface-bg: #F4F1EA;
  --surface-card: #FFFFFF;
  --surface-subtle: #EFECE7;
  --bg-surface: #FFFFFF;
  --bg-surface-alt: #EFECE7;
  --bg-hover: #EFECE7;
  --border-color: #E5E0D8;
  --text-secondary: #6E6670;
  --border: #E5E0D8;
  --border-subtle: #eee9e1;
  --text-primary: #231D24;
  --text-muted: #6E6670;
  --text-light: #9A929C;
  --ok: #16a34a;
  --ok-bg: #dcfce7;
  --warn: #d97706;
  --warn-bg: #fef3c7;
  --danger: #dc2626;
  --danger-bg: #fee2e2;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-pill: 9999px;
  --shadow-sm: 0 1px 3px rgba(35,29,36,.06);
  --shadow-md: 0 4px 16px rgba(35,29,36,.06);
  --shadow-lg: 0 12px 34px rgba(35,29,36,.08);
  --sidebar-w: 270px;
  --sidebar-collapsed-w: 74px;
  --topbar-h: 64px;
  --transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
  --brand-plum: #ab71a7;
  --brand-plum-dark: #583356;
  --brand-plum-light: #2c1f2b;
  --brand-gold: #fad980;
  --brand-gold-soft: #302613;
  --surface-bg: #110d13;
  --surface-card: #1b161e;
  --surface-subtle: #241e27;
  --bg-surface: #1b161e;
  --bg-surface-alt: #241e27;
  --bg-hover: #241e27;
  --border-color: #332b36;
  --text-secondary: #a69ea8;
  --border: #332b36;
  --border-subtle: #29222c;
  --text-primary: #f5f2f6;
  --text-muted: #a69ea8;
  --text-light: #736b75;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.35);
  --shadow-md: 0 4px 16px rgba(0,0,0,.45);
  --shadow-lg: 0 12px 34px rgba(0,0,0,.55);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--surface-bg);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* ==========================================================================
   AUTH SCREEN (Public Landing State)
   ========================================================================== */
.auth-header {
  background: var(--brand-plum);
  color: #fff;
  padding: 14px 0;
  box-shadow: 0 2px 10px rgba(35,29,36,.14);
}
.auth-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 20px;
}
.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-badge {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--brand-gold);
  color: #231D24;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 20px;
  flex-shrink: 0;
}
.auth-container {
  max-width: 1220px;
  margin: 0 auto;
  padding: 30px 20px 60px;
}
.auth-layout {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 24px;
}
@media (max-width: 860px) {
  .auth-layout { grid-template-columns: 1fr; }
}

/* ==========================================================================
   AUTHENTICATED APP SHELL (Sidebar + Main Workspace)
   ========================================================================== */
.app-shell {
  display: flex;
  min-height: 100vh;
  width: 100%;
  position: relative;
  background: var(--surface-bg);
}

/* SIDEBAR - Reference Image 4 & 1 Style */
.app-sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  height: 100vh;
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  background: var(--surface-card);
  border-right: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  z-index: 50;
  transition: width 0.24s cubic-bezier(0.16, 1, 0.3, 1), transform 0.24s ease;
  user-select: none;
}

/* Sidebar Collapsed Rail Mode (Reference Image 4 Slim Rail) */
.app-shell.sidebar-collapsed .app-sidebar {
  width: var(--sidebar-collapsed-w);
}
.app-shell.sidebar-collapsed .nav-text,
.app-shell.sidebar-collapsed .nav-badge,
.app-shell.sidebar-collapsed .nav-arrow,
.app-shell.sidebar-collapsed .nav-sub-menu,
.app-shell.sidebar-collapsed .sidebar-header-text,
.app-shell.sidebar-collapsed .sidebar-section-title,
.app-shell.sidebar-collapsed .user-profile-text,
.app-shell.sidebar-collapsed .sidebar-search,
.app-shell.sidebar-collapsed .role-select-box,
.app-shell.sidebar-collapsed .theme-switch-row span {
  display: none !important;
}
.app-shell.sidebar-collapsed .nav-item {
  justify-content: center;
  padding: 0;
  width: 44px;
  height: 44px;
  margin: 4px auto;
  border-radius: 12px;
}
.app-shell.sidebar-collapsed .nav-item.active {
  background: var(--brand-plum);
  color: #fff;
  border-radius: 12px;
}
.app-shell.sidebar-collapsed .sidebar-brand {
  position: relative;
  justify-content: center;
  padding: 16px 0;
}
.app-shell.sidebar-collapsed .sidebar-collapse-btn {
  position: absolute;
  right: -12px;
  top: 22px;
  background: var(--surface-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 60;
  transform: rotate(180deg);
}
.app-shell.sidebar-collapsed .theme-switch-row {
  justify-content: center;
  padding: 4px 0;
}
.app-shell.sidebar-collapsed .theme-switch-btn {
  padding: 6px;
  width: 36px;
  height: 36px;
  justify-content: center;
  border-radius: 50%;
}
.app-shell.sidebar-collapsed .user-profile-pill {
  justify-content: center;
  padding: 6px 0;
  background: transparent;
  border: 0;
}
.app-shell.sidebar-collapsed .sign-out-icon-btn {
  display: none;
}

/* Sidebar Header */
.sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 16px 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
}
.brand-link {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--text-primary);
  min-width: 0;
}
.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--brand-plum);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(140,84,137,0.3);
}
.sidebar-header-text {
  min-width: 0;
}
.sidebar-header-text strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-primary);
}
.sidebar-header-text small {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}
.sidebar-collapse-btn {
  background: transparent;
  border: 0;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.sidebar-collapse-btn:hover {
  background: var(--surface-subtle);
  color: var(--text-primary);
}

/* Sidebar Search & Role Selector */
.sidebar-control-box {
  padding: 12px 14px 6px;
}
.role-select-box {
  margin-bottom: 8px;
}
.role-select-box select {
  font-size: 12px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  color: var(--brand-plum);
  cursor: pointer;
}
.sidebar-search {
  position: relative;
  display: flex;
  align-items: center;
}
.sidebar-search svg {
  position: absolute;
  left: 10px;
  color: var(--text-light);
  pointer-events: none;
}
.sidebar-search input {
  padding-left: 32px;
  font-size: 12px;
  height: 32px;
  border-radius: 8px;
  background: var(--surface-subtle);
  border: 1px solid var(--border-subtle);
}
.sidebar-search input:focus {
  border-color: var(--brand-plum);
  background: var(--surface-card);
}

/* Sidebar Navigation Scrollable Body */
.sidebar-nav-container {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.sidebar-nav-container::-webkit-scrollbar {
  width: 4px;
}
.sidebar-nav-container::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

/* Nav Section Header */
.sidebar-section-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-light);
  padding: 12px 12px 4px;
}

/* Nav Item (Primary Item) */
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
  position: relative;
  border: 1px solid transparent;
}
.nav-item:hover {
  background: var(--surface-subtle);
}
.nav-item.active {
  background: var(--brand-plum);
  color: #fff;
  box-shadow: 0 2px 8px rgba(140,84,137,0.25);
}
.nav-item.active .nav-icon svg {
  stroke: #fff;
}
.nav-item.active .nav-badge {
  background: rgba(255,255,255,0.25);
  color: #fff;
}
.nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.nav-text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--surface-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.nav-arrow {
  margin-left: auto;
  display: flex;
  align-items: center;
  color: var(--text-light);
  transition: transform 0.2s ease;
}
.nav-group.expanded .nav-arrow {
  transform: rotate(90deg);
}

/* Tree-Structured Sub-Menu (Reference Image 4 / 1) */
.nav-sub-menu {
  display: none;
  flex-direction: column;
  gap: 2px;
  margin-left: 20px;
  padding-left: 12px;
  border-left: 1.5px solid var(--border);
  margin-top: 2px;
  margin-bottom: 4px;
}
.nav-group.expanded .nav-sub-menu {
  display: flex;
}
.nav-sub-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
}
.nav-sub-item:hover {
  background: var(--surface-subtle);
  color: var(--text-primary);
}
.nav-sub-item.active {
  background: var(--brand-plum-light);
  color: var(--brand-plum);
  font-weight: 700;
}
[data-theme="dark"] .nav-sub-item.active {
  background: rgba(171,113,167,0.18);
  color: var(--brand-gold);
}

/* Sidebar Footer & User Profile */
.sidebar-footer {
  padding: 12px 14px;
  border-top: 1px solid var(--border-subtle);
  background: var(--surface-card);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.theme-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
}
.theme-switch-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 3px 8px;
  font-size: 11px;
  cursor: pointer;
  color: var(--text-primary);
  transition: var(--transition);
}
.theme-switch-btn:hover {
  border-color: var(--brand-plum);
}
.user-profile-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
  border: 1px solid var(--border-subtle);
  min-width: 0;
}
.user-avatar-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand-plum);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}
.user-profile-text {
  min-width: 0;
  flex: 1;
}
.user-profile-text strong {
  display: block;
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-primary);
}
.user-profile-text small {
  display: block;
  font-size: 10.5px;
  color: var(--text-muted);
  text-transform: capitalize;
}
.sign-out-icon-btn {
  background: transparent;
  border: 0;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
}
.sign-out-icon-btn:hover {
  color: var(--danger);
}

/* ==========================================================================
   APP MAIN CONTENT AREA
   ========================================================================== */
.app-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Top Navigation Bar */
.app-topbar {
  height: var(--topbar-h);
  background: var(--surface-card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}
.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.mobile-drawer-toggle {
  display: none;
  background: transparent;
  border: 0;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-primary);
}
.breadcrumb-trail {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.breadcrumb-trail strong {
  color: var(--text-primary);
  font-weight: 700;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Page View Content Container */
.app-content-body {
  flex: 1;
  padding: 24px 28px 60px;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
}

/* ==========================================================================
   CARDS, TABLES, FORMS, & COMMON COMPONENTS
   ========================================================================== */
.card {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
  transition: var(--transition);
}
.card:hover {
  box-shadow: var(--shadow-md);
}

.eyebrow {
  display: inline-block;
  background: var(--brand-gold);
  color: #231D24;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  margin-bottom: 10px;
}

h1 { font-size: 26px; margin: 0 0 8px; color: var(--brand-plum); font-weight: 800; }
h2 { font-size: 19px; margin: 0 0 12px; color: var(--brand-plum); font-weight: 700; }
h3 { font-size: 16px; margin: 0 0 8px; color: var(--text-primary); font-weight: 700; }
.muted { color: var(--text-muted); font-size: 13.5px; }

/* Status Pill */
.status-pill {
  background: var(--surface-subtle);
  color: var(--text-primary);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
}
.status-pill.ok {
  background: var(--ok-bg);
  color: #166534;
  border-color: #bbf7d0;
}
.status-pill.err {
  background: var(--danger-bg);
  color: #991b1b;
  border-color: #fecaca;
}

/* KPIs */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin: 16px 0;
}
.kpi {
  background: var(--surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  border-bottom: 3px solid var(--brand-gold);
}
.kpi span {
  display: block;
  font-size: 24px;
  font-weight: 800;
  color: var(--brand-plum);
}
.kpi small {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

/* Inputs & Forms */
label {
  display: block;
  margin-bottom: 12px;
}
label span {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--text-primary);
}
input, select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  background: var(--surface-card);
  color: var(--text-primary);
  transition: var(--transition);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand-plum);
  box-shadow: 0 0 0 3px rgba(140,84,137,0.15);
}

/* Buttons */
.btn-primary {
  padding: 10px 18px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--brand-plum);
  color: #fff;
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}
.btn-primary:hover {
  background: var(--brand-plum-dark);
  box-shadow: 0 4px 12px rgba(140,84,137,0.25);
}
.btn-secondary {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-subtle);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}
.btn-secondary:hover {
  background: var(--border);
}
.btn-danger {
  padding: 8px 14px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--danger);
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}
.btn-success {
  padding: 8px 14px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--ok);
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}
.btn-link {
  background: none;
  border: 0;
  color: var(--brand-plum);
  font-weight: 600;
  cursor: pointer;
  padding: 6px 0;
  text-decoration: underline;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface-card);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
th, td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}
th {
  background: var(--surface-subtle);
  color: var(--text-primary);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .02em;
  text-transform: uppercase;
}
tr:last-child td {
  border-bottom: 0;
}
tr:hover td {
  background: var(--brand-plum-light);
}
[data-theme="dark"] tr:hover td {
  background: rgba(171,113,167,0.08);
}

/* Badges */
.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.badge-approved, .badge-completed, .badge-verified, .badge-publish { background: var(--ok-bg); color: #166534; }
.badge-pending, .badge-in_progress, .badge-pending_verification, .badge-submitted { background: var(--warn-bg); color: #92400e; }
.badge-rejected { background: var(--danger-bg); color: #991b1b; }
.badge-locked, .badge-none { background: #e5e7eb; color: #374151; }

/* Progress & Timeline */
.progress-bar {
  height: 8px;
  background: var(--surface-subtle);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin: 8px 0;
}
.progress-fill {
  height: 100%;
  background: var(--brand-plum);
  border-radius: var(--radius-pill);
  transition: width .3s ease;
}
.timeline { display: flex; flex-direction: column; gap: 12px; }
.step-card {
  border: 1px solid var(--border);
  border-left: 4px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  background: var(--surface-card);
}
.step-card.approved { border-left-color: var(--ok); }
.step-card.submitted, .step-card.pending { border-left-color: var(--brand-gold); }
.step-card.rejected { border-left-color: var(--danger); }

/* Proof Grid */
.proof-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  margin-top: 10px;
}
.proof-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
  aspect-ratio: 1;
}
.proof-item img, .proof-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.proof-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0,0,0,.65);
  color: #fff;
  font-size: 10px;
  padding: 3px 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Layout Grids */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.row-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* Modal & Toast */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(18,14,20,.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.modal-box {
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: var(--radius-lg);
  padding: 24px;
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--text-primary);
  color: var(--surface-card);
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  z-index: 2000;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

/* Mobile Responsiveness (Phone & Compact Tablet Drawer) */
@media (max-width: 768px) {
  .mobile-drawer-toggle { display: block; }
  .app-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    box-shadow: 0 0 30px rgba(0,0,0,.35);
  }
  .app-shell.sidebar-open .app-sidebar {
    transform: translateX(0);
  }
  .sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 45;
  }
  .app-shell.sidebar-open .sidebar-backdrop {
    display: block;
  }
  .app-content-body {
    padding: 18px 16px 60px;
  }
}

/* ==========================================================================
   FLOATING POPOVER FOR COLLAPSED RAIL (Reference Image 4)
   ========================================================================== */
.rail-flyout {
  position: fixed;
  z-index: 1000;
  width: 240px;
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 32px rgba(35,29,36,0.18), 0 2px 6px rgba(0,0,0,0.06);
  padding: 8px;
  backdrop-filter: blur(20px);
  animation: flyoutFadeIn 0.15s ease-out;
}
[data-theme="dark"] .rail-flyout {
  background: rgba(27, 22, 30, 0.96);
  box-shadow: 0 14px 36px rgba(0,0,0,0.65), 0 0 0 1px var(--border);
}
@keyframes flyoutFadeIn {
  from { opacity: 0; transform: translateX(-6px); }
  to { opacity: 1; transform: translateX(0); }
}
.rail-flyout-header {
  padding: 8px 10px 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-light);
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.rail-flyout-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
}
.rail-flyout-item:hover {
  background: var(--surface-subtle);
  color: var(--brand-plum);
}
.rail-flyout-item.active {
  background: var(--brand-plum);
  color: #fff;
}

/* ==========================================================================
   ELEVATED DASHBOARD DESIGN SYSTEM (Reference Images 2, 3, 4, 6, 7)
   ========================================================================== */

/* Hero Welcome Card */
.dashboard-hero {
  background: linear-gradient(135deg, rgba(140,84,137,0.08) 0%, rgba(246,211,109,0.14) 100%), var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
[data-theme="dark"] .dashboard-hero {
  background: linear-gradient(135deg, rgba(171,113,167,0.12) 0%, rgba(250,217,128,0.08) 100%), var(--surface-card);
}
.dashboard-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
  background: linear-gradient(180deg, var(--brand-plum), var(--brand-gold));
}
.dashboard-hero h2 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
  color: var(--text-primary);
}
.dashboard-hero p {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-muted);
}
.hero-badges {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.hero-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: var(--surface-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(22,163,74,0.25);
  animation: pulseAnim 2s infinite;
}
@keyframes pulseAnim {
  0%, 100% { box-shadow: 0 0 0 3px rgba(22,163,74,0.25); }
  50% { box-shadow: 0 0 0 7px rgba(22,163,74,0.05); }
}

/* Modern Metric Cards Grid (Duotone KPI) */
.kpi-grid-modern {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.metric-card-modern {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
  display: flex;
  flex-direction: column;
}
.metric-card-modern:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand-plum);
}
.metric-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.icon-squircle {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s;
}
.metric-card-modern:hover .icon-squircle {
  transform: scale(1.05);
}
.icon-squircle.plum {
  background: rgba(140,84,137,0.12);
  color: var(--brand-plum);
}
.icon-squircle.gold {
  background: rgba(246,211,109,0.22);
  color: #b45309;
}
.icon-squircle.emerald {
  background: rgba(16,185,129,0.12);
  color: #059669;
}
.icon-squircle.cyan {
  background: rgba(14,165,233,0.12);
  color: #0284c7;
}
.trend-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
}
.trend-tag.ok {
  background: rgba(22,163,74,0.1);
  color: #16a34a;
}
.trend-tag.warn {
  background: rgba(217,119,6,0.12);
  color: #d97706;
}
.trend-tag.info {
  background: rgba(59,130,246,0.1);
  color: #2563eb;
}
.metric-value-modern {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1.15;
  margin: 0 0 4px;
}
.metric-label-modern {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.metric-footer-detail {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Quick Actions Dock (Reference Images 6 & 7) */
.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 28px 0 14px;
}
.section-title-row h3 {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--text-primary);
}
.quick-actions-dock {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}
.action-tile {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.action-tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand-plum);
  background: var(--surface-subtle);
}
.action-tile .tile-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--surface-subtle);
  color: var(--brand-plum);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  transition: transform 0.2s ease, background-color 0.2s ease;
}
.action-tile:hover .tile-icon {
  background: var(--brand-plum);
  color: #fff;
  transform: scale(1.08);
}
.action-tile strong {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 3px;
}
.action-tile small {
  display: block;
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.35;
}

/* Allocation & Progress Stepper */
.allocation-card {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}
.segmented-bar {
  display: flex;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  margin: 14px 0 12px;
  background: var(--surface-subtle);
}
.segmented-segment {
  height: 100%;
  transition: width 0.3s ease;
}
.segmented-segment.water { background: #0284c7; }
.segmented-segment.food { background: #d97706; }
.segmented-segment.orphan { background: var(--brand-plum); }
.segmented-segment.general { background: #16a34a; }
.allocation-legend {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
}
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.legend-dot.water { background: #0284c7; }
.legend-dot.food { background: #d97706; }
.legend-dot.orphan { background: var(--brand-plum); }

/* Visual Stepper for Projects */
.stepper-modern {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 16px 0 12px;
  position: relative;
}
.stepper-modern::before {
  content: '';
  position: absolute;
  top: 14px;
  left: 20px;
  right: 20px;
  height: 2px;
  background: var(--border);
  z-index: 1;
}
.step-node {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.step-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface-card);
  border: 2px solid var(--border);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
  transition: var(--transition);
}
.step-node.completed .step-circle {
  background: var(--ok);
  border-color: var(--ok);
  color: #fff;
}
.step-node.current .step-circle {
  background: var(--brand-plum);
  border-color: var(--brand-plum);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(140,84,137,0.2);
}
.step-label {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}
.step-node.completed .step-label {
  color: var(--text-primary);
}
.step-node.current .step-label {
  color: var(--brand-plum);
  font-weight: 700;
}

/* ==========================================================================
   PHASE 2 & 3: ELEVATED PROJECT REGISTRY & VERIFICATION STYLES
   ========================================================================== */

/* Filter Pill Bar */
.filter-pill-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin: 12px 0 16px;
}
.filter-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 9999px;
  background: var(--bg-surface-alt, #f3f4f6);
  color: var(--text-secondary, #4b5563);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
}
.filter-pill-btn:hover {
  background: var(--bg-hover, #e5e7eb);
  color: var(--text-primary, #111827);
}
.filter-pill-btn.active {
  background: var(--brand-plum, #8c5489);
  color: #ffffff;
  border-color: var(--brand-plum, #8c5489);
  box-shadow: 0 2px 6px rgba(140, 84, 137, 0.25);
}
.filter-pill-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.08);
}
.filter-pill-btn.active .filter-pill-count {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

/* Search & Filter Toolbar */
.toolbar-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}
.search-input-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-width: 260px;
}
.search-input-wrap svg {
  position: absolute;
  left: 12px;
  color: var(--text-muted, #9ca3af);
  pointer-events: none;
}
.search-input-wrap input {
  width: 100%;
  padding: 8px 12px 8px 36px;
  border-radius: 20px;
  border: 1px solid var(--border-color, #e5e7eb);
  background: var(--bg-surface, #ffffff);
  font-size: 13px;
  color: var(--text-primary, #111827);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.search-input-wrap input:focus {
  outline: none;
  border-color: var(--brand-plum, #8c5489);
  box-shadow: 0 0 0 3px rgba(140, 84, 137, 0.12);
}

/* Mini KPI Strip */
.proj-kpi-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.proj-kpi-item {
  background: var(--bg-surface, #ffffff);
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 14px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(0,0,0,0.05));
}
.proj-kpi-num {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary, #111827);
  line-height: 1.2;
}
.proj-kpi-label {
  font-size: 11px;
  color: var(--text-muted, #6b7280);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Lightbox Modal */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 8, 12, 0.88);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.lightbox-container {
  max-width: 900px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-surface, #ffffff);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}
.lightbox-media-wrap {
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: 60vh;
  overflow: hidden;
}
.lightbox-media-wrap img, .lightbox-media-wrap video {
  max-width: 100%;
  max-height: 60vh;
  object-fit: contain;
}
.lightbox-footer {
  padding: 16px 20px;
  background: var(--bg-surface, #ffffff);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.lightbox-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}
.lightbox-close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Proof Items with Lightbox Trigger */
.proof-item {
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.proof-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.proof-item::after {
  content: "🔍";
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 11px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border-radius: 4px;
  padding: 2px 4px;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.proof-item:hover::after {
  opacity: 1;
}

/* Metallic Brass Nameplate */
.metal-plaque-card {
  position: relative;
  background: linear-gradient(135deg, #d4af37 0%, #f6d36d 50%, #aa771c 100%);
  border: 4px solid #7c5810;
  border-radius: 12px;
  padding: 20px 24px;
  box-shadow: 0 10px 25px rgba(124, 88, 16, 0.35), inset 0 2px 4px rgba(255,255,255,0.4), inset 0 -2px 4px rgba(0,0,0,0.3);
  color: #2a1b05;
  text-align: center;
  margin: 16px 0;
}
.metal-plaque-inner {
  border: 1px solid rgba(124, 88, 16, 0.5);
  padding: 16px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
}
.metal-plaque-title {
  font-family: serif;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #4a320a;
  margin-bottom: 8px;
}
.metal-plaque-dedication {
  font-family: serif;
  font-size: 18px;
  font-weight: 700;
  color: #231503;
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}
.metal-plaque-meta {
  font-size: 11px;
  color: #5d4013;
  letter-spacing: 0.05em;
}

/* ==========================================================================
   ELEVATED VISUAL UI/UX DESIGN SYSTEM — BIG CARDS, ANIMATED GAUGES & HANDY FLOWS
   (Inspired by Reference Images: Grainish, Crextio, Fenco, DealDeck, StreamEx)
   ========================================================================== */

/* 1. Big Visually Appealing Card System */
.big-card {
  position: relative;
  border-radius: 26px;
  padding: 28px 32px;
  background: var(--bg-surface, #ffffff);
  color: var(--text-primary);
  border: 1px solid var(--border-color, rgba(0, 0, 0, 0.08));
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.06), 0 2px 6px -2px rgba(0, 0, 0, 0.03);
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  overflow: hidden;
}

.big-card-interactive:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -12px rgba(140, 84, 137, 0.15), 0 4px 12px -2px rgba(0, 0, 0, 0.05);
}

/* Gradient Hero & Metric Cards */
.card-gradient-hero {
  background: linear-gradient(135deg, #3d143c 0%, #682665 45%, #8c5489 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 16px 36px -10px rgba(104, 38, 101, 0.45);
}

.card-gradient-hero h1, .card-gradient-hero h2, .card-gradient-hero h3, .card-gradient-hero strong {
  color: #ffffff;
}

.card-gradient-emerald {
  background: linear-gradient(135deg, #064e3b 0%, #059669 50%, #10b981 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 14px 32px -10px rgba(5, 150, 105, 0.4);
}

.card-gradient-emerald h1, .card-gradient-emerald h2, .card-gradient-emerald h3, .card-gradient-emerald strong, .card-gradient-emerald p {
  color: #ffffff;
}

.card-gradient-cyan {
  background: linear-gradient(135deg, #0c4a6e 0%, #0284c7 50%, #06b6d4 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 14px 32px -10px rgba(2, 132, 199, 0.4);
}

.card-gradient-cyan h1, .card-gradient-cyan h2, .card-gradient-cyan h3, .card-gradient-cyan strong, .card-gradient-cyan p {
  color: #ffffff;
}

.card-gradient-gold {
  background: linear-gradient(135deg, #78350f 0%, #d97706 50%, #f59e0b 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 14px 32px -10px rgba(217, 119, 6, 0.4);
}

.card-gradient-gold h2, .card-gradient-gold h3, .card-gradient-gold strong {
  color: #ffffff;
}

/* 2. Circular Animated Progress Gauge */
.circle-gauge-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.circle-ring-anim {
  transition: stroke-dashoffset 1.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  animation: circleFadeIn 0.8s ease forwards;
}

@keyframes circleFadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* 3. Wave Graphs & Sparklines */
.wave-graph-container {
  position: relative;
  width: 100%;
  height: 90px;
  margin-top: 10px;
  overflow: hidden;
}

.wave-graph-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.pulse-dot {
  animation: pulseRipple 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
}

@keyframes pulseRipple {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

/* 4. Handy, Simple Touch Flow Controls (Ideal for Field Workers, Donors & Beneficiaries) */
.handy-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.handy-step-card {
  position: relative;
  background: var(--bg-surface, #ffffff);
  color: var(--text-primary);
  border: 2px solid var(--border-color, #e5e7eb);
  border-radius: 22px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 6px 18px -4px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
}

.handy-step-card:hover {
  border-color: var(--brand-plum, #8c5489);
  box-shadow: 0 12px 28px -6px rgba(140, 84, 137, 0.15);
}

.handy-step-num {
  font-size: 28px;
  font-weight: 900;
  color: var(--brand-plum, #8c5489);
  opacity: 0.25;
  line-height: 1;
}

.handy-step-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.handy-step-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.handy-step-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary, #111827);
  margin: 0 0 4px;
}

.handy-step-desc {
  font-size: 13px;
  color: var(--text-muted, #6b7280);
  line-height: 1.45;
  margin: 0 0 16px;
}

.urdu-subtext {
  display: block;
  font-size: 13px;
  color: var(--text-muted, #6b7280);
  direction: rtl;
  font-family: system-ui, -apple-system, sans-serif;
  margin-top: 3px;
  opacity: 0.85;
}

/* Big Handy Touch Button (Accessible for non-tech users) */
.big-touch-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 54px;
  padding: 12px 20px;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 6px 16px -2px rgba(0, 0, 0, 0.1);
}

.big-touch-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -4px rgba(0, 0, 0, 0.18);
}

.big-touch-btn:active {
  transform: translateY(1px);
}

.big-touch-btn.btn-plum {
  background: linear-gradient(135deg, #743a71 0%, #8c5489 100%);
  color: #ffffff;
}

.big-touch-btn.btn-emerald {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  color: #ffffff;
}

.big-touch-btn.btn-gold {
  background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
  color: #231503;
}

.big-touch-btn.btn-cyan {
  background: linear-gradient(135deg, #0284c7 0%, #06b6d4 100%);
  color: #ffffff;
}

/* 5. Big Showcase Project Card for Donors */
.showcase-project-card {
  position: relative;
  background: var(--bg-surface, #ffffff);
  border-radius: 28px;
  border: 1px solid var(--border-color, #e5e7eb);
  box-shadow: 0 12px 36px -8px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  margin-bottom: 24px;
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 0;
}

@media (max-width: 900px) {
  .showcase-project-card {
    grid-template-columns: 1fr;
  }
}

.showcase-img-wrap {
  position: relative;
  min-height: 280px;
  background: #1a141b;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.showcase-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.showcase-project-card:hover .showcase-img-wrap img {
  transform: scale(1.04);
}

.showcase-gps-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  z-index: 2;
}

.showcase-body {
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.showcase-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.showcase-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary, #111827);
  margin: 0 0 6px;
}

.showcase-location {
  font-size: 13.5px;
  color: var(--text-muted, #6b7280);
  display: flex;
  align-items: center;
  gap: 6px;
}

.showcase-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.showcase-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 14px;
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid var(--border-color, #e5e7eb);
  background: var(--bg-surface-alt, #f9fafb);
  color: var(--text-primary, #111827);
}

.showcase-action-btn:hover {
  background: var(--brand-plum, #8c5489);
  color: #ffffff;
  border-color: var(--brand-plum, #8c5489);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px -2px rgba(140, 84, 137, 0.3);
}

.showcase-action-btn.primary {
  background: var(--brand-plum, #8c5489);
  color: #ffffff;
  border-color: var(--brand-plum, #8c5489);
}

.showcase-action-btn.primary:hover {
  background: #743a71;
}

/* 6. Metric Cards with Big Numerals & Visual Graphs */
.metric-card-visual {
  border-radius: 24px;
  padding: 24px 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.metric-big-num {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 8px 0 4px;
}

.metric-sub-label {
  font-size: 13px;
  font-weight: 600;
  opacity: 0.85;
}

/* Solid Executive Metric Cards (Grainish & Fenco Style) */
.metric-card-obsidian {
  background: #1C1721;
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  padding: 24px 26px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 185px;
  position: relative;
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.metric-card-obsidian:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
}

.metric-card-solid-white {
  background: var(--surface-card, #FFFFFF);
  color: var(--text-primary, #1F1922);
  border: 1.5px solid var(--border, #E2DDD3);
  border-radius: 24px;
  padding: 24px 26px;
  box-shadow: 0 8px 24px rgba(35, 29, 36, 0.04);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 185px;
  position: relative;
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.metric-card-solid-white:hover {
  transform: translateY(-4px);
  border-color: var(--brand-plum, #8C5489);
  box-shadow: 0 14px 32px rgba(140, 84, 137, 0.12);
}

.stat-icon-tile {
  width: 46px;
  height: 46px;
  min-width: 46px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.mini-card-action-btn {
  background: var(--brand-plum, #8C5489);
  color: #FFFFFF;
  border: none;
  border-radius: 10px;
  padding: 6px 14px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s ease, transform 0.2s ease;
  margin-top: 10px;
  align-self: flex-start;
}

.mini-card-action-btn:hover {
  background: var(--brand-plum-dark, #6D3F6B);
  transform: translateX(2px);
}

/* Solid Interactive Shortcut Cards */
.shortcut-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
  margin-top: 14px;
}

.shortcut-card-solid {
  background: var(--surface-card, #FFFFFF);
  border: 1.5px solid var(--border, #E2DDD3);
  border-radius: 20px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 16px rgba(35, 29, 36, 0.04);
  text-align: left;
}

.shortcut-card-solid:hover {
  transform: translateY(-4px);
  border-color: var(--brand-plum, #8C5489);
  box-shadow: 0 14px 30px -6px rgba(140, 84, 137, 0.18);
}

.shortcut-icon-tile {
  width: 52px;
  height: 52px;
  min-width: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.shortcut-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow: hidden;
}

.shortcut-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary, #1F1922);
  display: flex;
  align-items: center;
  gap: 6px;
}

.shortcut-desc {
  font-size: 12px;
  color: var(--text-muted, #6B626E);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Minimalist Loading Skeleton */
.portal-skeleton {
  padding: 12px 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.skeleton-shimmer {
  background: linear-gradient(90deg, var(--surface-card, #ffffff) 25%, var(--surface-subtle, #f0ece3) 50%, var(--surface-card, #ffffff) 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.5s infinite;
  border-radius: 20px;
  border: 1px solid var(--border, #e5e1d8);
}

@keyframes skeletonShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Minimalist Cause Cards with Photos */
.cause-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 16px;
}

.cause-card {
  background: var(--surface-card, #ffffff);
  border: 1px solid var(--border, #e5e1d8);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  box-shadow: 0 4px 16px rgba(35, 29, 36, 0.04);
}

.cause-card:hover {
  transform: translateY(-4px);
  border-color: var(--brand-plum, #8c5489);
  box-shadow: 0 14px 30px rgba(140, 84, 137, 0.12);
}

.cause-card-img-wrap {
  width: 100%;
  height: 160px;
  position: relative;
  overflow: hidden;
  background: #2a242c;
}

.cause-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.cause-card:hover .cause-card-img {
  transform: scale(1.05);
}

.cause-card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(26, 22, 29, 0.85);
  backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.cause-card-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
}

.cause-card-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 6px;
}

.cause-card-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 14px;
  line-height: 1.45;
}

.cause-progress-wrap {
  margin-bottom: 14px;
}

.cause-progress-bar {
  height: 8px;
  background: var(--surface-subtle, #ede9e1);
  border-radius: 4px;
  overflow: hidden;
}

.cause-progress-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--brand-plum) 0%, #a855f7 100%);
}

.cause-btn {
  width: 100%;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 700;
  border: none;
  background: var(--brand-plum, #8c5489);
  color: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.cause-btn:hover {
  background: var(--brand-plum-dark, #6d3f6b);
  transform: translateY(-1px);
}

/* Wow-feel Minimalist Pill Switcher */
.wow-tabs {
  display: inline-flex;
  background: var(--surface-card, #ffffff);
  border: 1px solid var(--border, #e5e1d8);
  border-radius: 9999px;
  padding: 4px;
  gap: 4px;
  box-shadow: 0 2px 8px rgba(35, 29, 36, 0.04);
}

.wow-tab-btn {
  padding: 7px 18px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  border: none;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.wow-tab-btn.active {
  background: var(--brand-plum, #8c5489);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(140, 84, 137, 0.25);
}

.wow-tab-btn:hover:not(.active) {
  color: var(--text-primary);
  background: var(--surface-subtle);
}
