/* HDF Water Tracker Brand Styles */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
  --hdf-primary: #0d577f;
  --hdf-primary-dark: #0d3e58;
  --hdf-primary-light: #174862;
  --hdf-gold: #eecd25;
  --hdf-gold-hover: #d4b71f;
  --hdf-water: #0891b2;
  --hdf-water-light: #e0f7fa;
  --hdf-text: #393939;
  --hdf-text-light: #666666;
  --hdf-bg-light: #f7f7f7;
  --hdf-white: #ffffff;
  --hdf-border: #e0e0e0;
  --hdf-success: #28a745;
  --hdf-warning: #ffc107;
  --hdf-danger: #dc3545;
  --hdf-info: #17a2b8;
  --hdf-font: 'Outfit', Arial, sans-serif;
}

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

body {
  font-family: var(--hdf-font);
  color: var(--hdf-text);
  line-height: 1.6;
  background-color: var(--hdf-bg-light);
}

h1, h2, h3, h4, h5, h6 { font-weight: 600; color: var(--hdf-primary-dark); }
a { color: var(--hdf-primary); text-decoration: none; }
a:hover { color: var(--hdf-primary-dark); text-decoration: underline; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.25rem;
  font-family: var(--hdf-font);
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary  { background: var(--hdf-primary); color: var(--hdf-white); }
.btn-primary:hover { background: var(--hdf-primary-dark); color: var(--hdf-white); text-decoration: none; }
.btn-gold     { background: var(--hdf-gold); color: var(--hdf-primary-dark); }
.btn-gold:hover { background: var(--hdf-gold-hover); color: var(--hdf-primary-dark); text-decoration: none; }
.btn-outline  { background: transparent; border: 2px solid var(--hdf-primary); color: var(--hdf-primary); }
.btn-outline:hover { background: var(--hdf-primary); color: var(--hdf-white); text-decoration: none; }
.btn-danger   { background: var(--hdf-danger); color: var(--hdf-white); }
.btn-danger:hover { background: #c82333; color: var(--hdf-white); text-decoration: none; }
.btn-success  { background: var(--hdf-success); color: var(--hdf-white); }
.btn-secondary { background: #e9ecef; color: var(--hdf-text); }
.btn-secondary:hover { background: #dee2e6; color: var(--hdf-text); text-decoration: none; }
.btn-sm { padding: 0.4rem 0.85rem; font-size: 0.8rem; }

/* ── Forms ── */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; margin-bottom: 0.4rem; font-weight: 500; color: var(--hdf-text); font-size: 0.9rem; }
.form-control, .form-select {
  width: 100%;
  padding: 0.65rem 0.85rem;
  font-family: var(--hdf-font);
  font-size: 0.9rem;
  border: 1.5px solid var(--hdf-border);
  border-radius: 6px;
  background: var(--hdf-white);
  color: var(--hdf-text);
  transition: border-color 0.2s;
}
.form-control:focus, .form-select:focus { outline: none; border-color: var(--hdf-primary); }

/* ── Cards ── */
.card { background: var(--hdf-white); border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); border: 1px solid var(--hdf-border); overflow: hidden; }
.card-header { background: var(--hdf-primary); color: var(--hdf-white); padding: 1rem 1.5rem; font-weight: 600; }
.card-body { padding: 1.5rem; }

/* ── Alerts ── */
.alert { padding: 0.85rem 1.1rem; border-radius: 6px; margin-bottom: 1rem; font-size: 0.9rem; }
.alert-danger  { background: #fee2e2; border: 1px solid #fca5a5; color: #991b1b; }
.alert-success { background: #d1fae5; border: 1px solid #6ee7b7; color: #065f46; }
.alert-warning { background: #fef3c7; border: 1px solid #fcd34d; color: #92400e; }
.alert-info    { background: #dbeafe; border: 1px solid #93c5fd; color: #1e40af; }

/* ── Badges ── */
.badge { display: inline-block; padding: 0.2rem 0.55rem; font-size: 0.72rem; font-weight: 600; border-radius: 4px; text-transform: capitalize; white-space: nowrap; }
.badge-primary  { background: var(--hdf-primary); color: var(--hdf-white); }
.badge-gold     { background: var(--hdf-gold); color: var(--hdf-primary-dark); }
.badge-success  { background: #d1fae5; color: #065f46; }
.badge-warning  { background: #fef3c7; color: #92400e; }
.badge-danger   { background: #fee2e2; color: #991b1b; }
.badge-info     { background: #dbeafe; color: #1e40af; }
.badge-purple   { background: #ede9fe; color: #5b21b6; }
.badge-gray     { background: #f1f5f9; color: #475569; }

/* Status badge map — new workflow */
.status-order_received { background: #e0e7ff; color: #3730a3; }
.status-ongoing        { background: #fef3c7; color: #92400e; }
.status-completion     { background: #d1fae5; color: #065f46; }
.status-review         { background: #ede9fe; color: #5b21b6; }
.status-proposal_submitted { background: #fef3c7; color: #92400e; }
.status-verified       { background: #d1fae5; color: #065f46; }
.status-cancelled      { background: #fee2e2; color: #991b1b; }
/* Legacy status badges (pre-migration) */
.status-assigned    { background: #e0e7ff; color: #3730a3; }
.status-in_progress { background: #fef3c7; color: #92400e; }
.status-completed   { background: #d1fae5; color: #065f46; }
.status-verified    { background: #dbeafe; color: #1e40af; }
.status-pending     { background: #f1f5f9; color: #475569; }

/* Priority badges */
.badge-high   { background: #fecaca; color: #991b1b; }
.badge-low    { background: #e5e7eb; color: #6b7280; }
/* Legacy priority badges */
.badge-urgent { background: #fee2e2; color: #991b1b; animation: pulse-urgent 2s infinite; }
.badge-pcr    { background: #d1fae5; color: #065f46; }
@keyframes pulse-urgent { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } }

/* Well details grid */
.well-details-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.75rem; margin-bottom: 1rem; }

/* ── Tables ── */
.table-wrapper { background: var(--hdf-white); border-radius: 12px; border: 1px solid var(--hdf-border); overflow-x: auto; -webkit-overflow-scrolling: touch; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.table { width: 100%; border-collapse: collapse; }
.table th { background: var(--hdf-primary); color: var(--hdf-white); padding: 0.85rem 1rem; text-align: left; font-weight: 600; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; }
.table td { padding: 0.8rem 1rem; border-bottom: 1px solid var(--hdf-border); font-size: 0.88rem; color: var(--hdf-text); }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--hdf-bg-light); }
.table-pagination { display: flex; align-items: center; justify-content: space-between; padding: 0.85rem 1rem; border-top: 1px solid var(--hdf-border); font-size: 0.85rem; color: var(--hdf-text-light); }

/* ── Pagination ── */
.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  border-top: 1px solid var(--hdf-border);
  font-size: 0.84rem;
  color: var(--hdf-text-light);
}
.pagination-pages {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}
.pagination-pages .page-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--hdf-text);
  transition: background 0.15s;
}
.pagination-pages .page-num:hover { background: var(--hdf-bg-light); text-decoration: none; }
.pagination-pages .page-num.current {
  background: var(--hdf-primary);
  color: white;
  font-weight: 600;
}

/* ── Sidebar Navigation ── */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 220px;
  background: var(--hdf-primary-dark);
  display: flex;
  flex-direction: column;
  z-index: 200;
  overflow-y: auto;
  overflow-x: hidden;
  transition: width 0.25s ease, transform 0.3s ease;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 2px; }
.sidebar.collapsed { width: 0; overflow: hidden; }
.sidebar.collapsed * { visibility: hidden; }
.sidebar-collapse-btn { position: fixed; top: 12px; left: 220px; width: 28px; height: 28px; background: var(--hdf-primary-dark); border: 2px solid rgba(255,255,255,0.15); border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 201; color: rgba(255,255,255,0.7); font-size: 0.7rem; transition: all 0.25s; }
.sidebar-collapse-btn:hover { background: var(--hdf-primary); color: white; }
body.sidebar-collapsed .sidebar-collapse-btn { left: 8px; }
.sidebar-brand {
  padding: 0.85rem 1rem 0.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-brand a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--hdf-white);
}
.sidebar-brand a:hover { color: var(--hdf-gold); text-decoration: none; }
.sidebar-logo { height: 36px; }
.sidebar-title {
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.01em;
}
.sidebar-nav {
  flex: 1;
  padding: 0.4rem 0 0.5rem;
}
.sidebar-section-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.35);
  padding: 0.6rem 1rem 0.25rem;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.4rem 1rem;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: all 0.15s;
}
.sidebar-link:hover {
  color: var(--hdf-white);
  background: rgba(255,255,255,0.06);
  text-decoration: none;
}
.sidebar-link.active {
  color: var(--hdf-gold);
  background: rgba(255,255,255,0.08);
  border-left-color: var(--hdf-gold);
}
.sidebar-link svg {
  flex-shrink: 0;
  opacity: 0.7;
}
.sidebar-link.active svg,
.sidebar-link:hover svg {
  opacity: 1;
}
.sidebar-link-sm {
  font-size: 0.8rem;
  padding: 0.35rem 1rem;
}
.sidebar-logout {
  color: rgba(220,53,69,0.8) !important;
}
.sidebar-logout:hover {
  color: #dc3545 !important;
  background: rgba(220,53,69,0.08) !important;
}

/* User section at bottom */
.sidebar-user {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 0.4rem 0 0.5rem;
  margin-top: auto;
}
.sidebar-user-info {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 1rem 0.4rem;
}
.sidebar-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--hdf-gold);
  color: var(--hdf-primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.82rem;
  flex-shrink: 0;
}
.sidebar-user-name {
  font-weight: 600;
  color: var(--hdf-white);
  font-size: 0.82rem;
}
.sidebar-user-role {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.5);
}

/* Mobile toggle button */
.sidebar-toggle {
  display: none;
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 300;
  background: var(--hdf-primary);
  border: none;
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.sidebar-toggle span {
  display: block;
  width: 20px;
  height: 2.5px;
  background: var(--hdf-white);
  border-radius: 2px;
}
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 150;
}

/* Main content offset for sidebar */
body {
  margin-left: 220px;
  transition: margin-left 0.25s ease;
}
body.sidebar-collapsed {
  margin-left: 0;
}

/* ── Auth Pages ── */
body.auth-page { margin-left: 0; }
body.auth-page .sidebar,
body.auth-page .sidebar-toggle,
body.auth-page .sidebar-overlay { display: none; }

.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--hdf-primary) 0%, var(--hdf-primary-dark) 100%);
  padding: 2rem;
}
.auth-box { background: var(--hdf-white); padding: 2.5rem; border-radius: 16px; box-shadow: 0 16px 48px rgba(0,0,0,0.2); width: 100%; max-width: 420px; }
.auth-logo { display: block; margin: 0 auto 1.25rem; max-height: 56px; }
.auth-title { text-align: center; color: var(--hdf-primary-dark); margin-bottom: 0.4rem; font-size: 1.45rem; }
.auth-subtitle { text-align: center; color: var(--hdf-text-light); margin-bottom: 1.75rem; font-size: 0.9rem; }

/* ── Page Layout ── */
.page-content { max-width: 1400px; margin: 0 auto; padding: 2rem; }
.page-hero {
  background: linear-gradient(135deg, var(--hdf-primary) 0%, var(--hdf-primary-dark) 100%);
  padding: 2.25rem 2rem;
  color: white;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -5%;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(8,145,178,0.15) 0%, transparent 70%);
  border-radius: 50%;
}
.page-hero-inner { max-width: 1400px; margin: 0 auto; position: relative; z-index: 1; }
.page-hero h1 { font-size: 1.85rem; font-weight: 700; color: white; margin: 0 0 0.35rem; }
.page-hero p  { color: rgba(255,255,255,0.8); margin: 0; font-size: 1rem; }
.page-hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1rem; }

/* ── Stats Grid ── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1.25rem; margin-bottom: 2rem; }
.stat-card {
  background: var(--hdf-white);
  border-radius: 14px;
  padding: 1.4rem 1.5rem;
  border: 1px solid var(--hdf-border);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,0.1); }
.stat-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; }
.stat-card.primary::before  { background: linear-gradient(90deg, var(--hdf-primary), var(--hdf-water)); }
.stat-card.gold::before     { background: linear-gradient(90deg, var(--hdf-gold), #f59e0b); }
.stat-card.success::before  { background: linear-gradient(90deg, #10b981, #059669); }
.stat-card.info::before     { background: linear-gradient(90deg, var(--hdf-water), #0e7490); }
.stat-card.purple::before   { background: linear-gradient(90deg, #8b5cf6, #6d28d9); }
.stat-value { font-size: 2rem; font-weight: 700; color: var(--hdf-primary-dark); margin-bottom: 0.2rem; }
.stat-label { font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--hdf-text-light); }
.stat-sub   { font-size: 0.78rem; color: var(--hdf-text-light); margin-top: 0.2rem; }

/* ── Section Headers ── */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.1rem; }
.section-title  { font-size: 1.15rem; font-weight: 600; color: var(--hdf-primary-dark); }

/* ── Filters ── */
.filters-bar {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 1.25rem;
  padding: 1rem 1.25rem;
  background: var(--hdf-white);
  border-radius: 10px;
  border: 1px solid var(--hdf-border);
}
.filter-group { display: flex; flex-direction: column; gap: 0.2rem; }
.filter-group label { font-size: 0.72rem; font-weight: 600; color: var(--hdf-text-light); text-transform: uppercase; letter-spacing: 0.04em; }
.filter-group select, .filter-group input {
  padding: 0.45rem 0.75rem;
  border: 1.5px solid var(--hdf-border);
  border-radius: 6px;
  font-family: var(--hdf-font);
  font-size: 0.88rem;
  color: var(--hdf-text);
  background: var(--hdf-white);
  min-width: 130px;
}
.filter-group select:focus, .filter-group input:focus { outline: none; border-color: var(--hdf-primary); }

/* ── Modal ── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(13,62,88,0.4);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
.modal {
  background: var(--hdf-white);
  border-radius: 16px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem 1.75rem 1rem;
  border-bottom: 1px solid var(--hdf-border);
}
.modal-header h3 { font-size: 1.1rem; font-weight: 700; margin: 0; }
.modal-close { background: var(--hdf-bg-light); border: none; border-radius: 6px; width: 30px; height: 30px; cursor: pointer; font-size: 1rem; color: var(--hdf-text-light); display: flex; align-items: center; justify-content: center; }
.modal-close:hover { background: var(--hdf-border); }
.modal-body { padding: 1.5rem 1.75rem; }
.modal-footer { padding: 1rem 1.75rem 1.5rem; display: flex; justify-content: flex-end; gap: 0.75rem; }

/* ── Partner Card ── */
.partner-card { background: var(--hdf-white); border-radius: 14px; border: 1px solid var(--hdf-border); padding: 1.5rem; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.partner-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; margin: 1.1rem 0; }
.partner-stat-box { text-align: center; padding: 0.85rem 0.5rem; background: var(--hdf-bg-light); border-radius: 8px; }
.partner-stat-val { font-size: 1.5rem; font-weight: 700; }
.partner-stat-lbl { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--hdf-text-light); margin-top: 0.1rem; }

/* ── Progress Bar ── */
.progress { width: 100%; height: 6px; background: var(--hdf-bg-light); border-radius: 6px; overflow: hidden; }
.progress-bar { height: 100%; border-radius: 6px; transition: width 0.5s ease; background: var(--hdf-primary); }
.progress-bar.success { background: var(--hdf-success); }
.progress-bar.water   { background: var(--hdf-water); }
.progress-bar.gold    { background: var(--hdf-gold); }

/* ── Fund Card ── */
.fund-card { background: var(--hdf-white); border-radius: 14px; border: 1px solid var(--hdf-border); padding: 1.25rem 1.4rem; box-shadow: 0 2px 8px rgba(0,0,0,0.05); cursor: pointer; transition: all 0.2s; }
.fund-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.1); border-color: var(--hdf-primary); }
.fund-code { display: inline-block; font-family: monospace; font-size: 0.72rem; background: var(--hdf-bg-light); color: var(--hdf-text-light); padding: 0.15rem 0.5rem; border-radius: 4px; }

/* ── Toast ── */
.toast {
  position: fixed; top: 80px; right: 24px; z-index: 9999;
  padding: 0.85rem 1.25rem;
  border-radius: 10px;
  background: var(--hdf-primary-dark);
  color: var(--hdf-white);
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  animation: slideIn 0.25s ease;
}
@keyframes slideIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }

/* ── Admin ── */
.admin-table td .role-badge { font-size: 0.75rem; }

/* ── Utilities ── */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-muted  { color: var(--hdf-text-light); }
.text-success { color: var(--hdf-success); }
.text-danger  { color: var(--hdf-danger); }
.font-mono   { font-family: monospace; }
.fw-600      { font-weight: 600; }
.fw-700      { font-weight: 700; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.gap-1 { gap: 0.5rem; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }

/* ── Country Grid ── */
.country-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1rem; }
.country-card { background: var(--hdf-white); border-radius: 12px; border: 1px solid var(--hdf-border); padding: 1.1rem 1.25rem; cursor: pointer; transition: all 0.2s; }
.country-card:hover { border-color: var(--hdf-primary); box-shadow: 0 4px 12px rgba(0,0,0,0.1); transform: translateY(-2px); }
.country-name { font-weight: 700; font-size: 0.95rem; margin-bottom: 0.3rem; }
.country-amount { font-size: 1.3rem; font-weight: 700; color: var(--hdf-primary); }

/* ── Responsive ── */

/* Mobile */
@media (max-width: 900px) {
  /* Sidebar: slide in/out */
  body { margin-left: 0; }
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-toggle {
    display: flex;
  }

  /* Page layout */
  .page-content { padding: 1rem; padding-top: 3.5rem; }
  .page-hero { padding: 1.5rem 1rem; padding-top: 3.5rem; }
  .page-hero h1 { font-size: 1.35rem; }
  .page-hero p { font-size: 0.88rem; }
  .page-hero-actions { margin-top: 0.75rem; }

  /* Stats */
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
  .stat-card { padding: 1rem 1.1rem; }
  .stat-value { font-size: 1.5rem; }

  /* Tables: horizontal scroll */
  .table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .table th, .table td { white-space: nowrap; padding: 0.6rem 0.75rem; font-size: 0.82rem; }
  .table-pagination { flex-direction: column; gap: 0.5rem; text-align: center; }
  .pagination-bar { flex-direction: column; gap: 0.5rem; text-align: center; }
  .pagination-pages { flex-wrap: wrap; justify-content: center; }

  /* Cards */
  .card-header { padding: 0.85rem 1rem; font-size: 0.9rem; }
  .card-body { padding: 1rem; }

  /* Filters */
  .filters-bar { flex-direction: column; align-items: stretch; padding: 0.85rem; gap: 0.6rem; }
  .filter-group select, .filter-group input { min-width: auto; width: 100%; }

  /* Forms */
  .form-control, .form-select { font-size: 16px; }

  /* Modal */
  .modal { max-width: 95vw; border-radius: 12px; }
  .modal-header { padding: 1rem 1.25rem 0.75rem; }
  .modal-body { padding: 1rem 1.25rem; }

  /* Partner cards */
  .partner-stats { grid-template-columns: repeat(2, 1fr); }
  .partner-stat-val { font-size: 1.2rem; }

  /* Country grid */
  .country-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }

  /* Fund cards */
  .fund-card { padding: 1rem; }

  /* Auth pages */
  .auth-box { padding: 1.75rem; margin: 1rem; }
  .auth-container { padding: 1rem; }

  /* Toast */
  .toast { right: 12px; left: 12px; top: 70px; text-align: center; }

  /* Hide on mobile utility */
  .hide-mobile { display: none !important; }
}

/* Small mobile */
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .country-grid { grid-template-columns: 1fr; }
  .partner-stats { grid-template-columns: 1fr; }
  .page-hero h1 { font-size: 1.2rem; }
  .btn { padding: 0.5rem 1rem; font-size: 0.85rem; }
  .btn-sm { padding: 0.35rem 0.7rem; font-size: 0.78rem; }
}

/* Desktop: hide mobile-only elements */
@media (min-width: 901px) {
  .nav-mobile-user { display: none; }
}
