/* =========================================================
   AYALA VOLUNTEERS — Design System
   ========================================================= */

:root {
  /* Brand palette */
  --green-50:#e9fbf3;
  --green-100:#c7f3df;
  --green-300:#5fd6a6;
  --green-500:#0f9b6e;
  --green-600:#0a8460;
  --green-700:#076b4d;
  --blue-300:#6fb6ff;
  --blue-500:#2f80ed;
  --blue-600:#1f6dd6;

  /* Light theme */
  --bg:#f4f7f6;
  --bg-elev:#ffffff;
  --bg-soft:#f0f3f2;
  --surface:#ffffff;
  --surface-2:#fafbfc;
  --border:rgba(15,30,45,0.08);
  --border-strong:rgba(15,30,45,0.14);
  --text:#0d1f2c;
  --text-soft:#5b6a78;
  --text-mute:#8b97a4;
  --shadow-sm: 0 2px 8px rgba(15,30,45,0.06);
  --shadow-md: 0 8px 24px rgba(15,30,45,0.08);
  --shadow-lg: 0 24px 60px rgba(15,30,45,0.14);
  --grad-1:linear-gradient(135deg,#0f9b6e 0%, #2f80ed 100%);
  --grad-2:linear-gradient(135deg,#5fd6a6 0%, #6fb6ff 100%);
  --grad-soft:linear-gradient(135deg,#e9fbf3 0%, #e8f1ff 100%);
  --like:#16c784;
  --skip:#ff5d6c;

  --radius-sm:10px;
  --radius:16px;
  --radius-lg:22px;
  --radius-xl:28px;

  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);

  --t-fast: 160ms;
  --t: 260ms;
  --t-slow: 480ms;
  --ease: cubic-bezier(.2,.8,.2,1);
}

[data-theme="dark"] {
  --bg:#0a1118;
  --bg-elev:#0f1820;
  --bg-soft:#0c141c;
  --surface:#121c25;
  --surface-2:#162029;
  --border:rgba(255,255,255,0.06);
  --border-strong:rgba(255,255,255,0.14);
  --text:#eaf2f6;
  --text-soft:#a9b6c1;
  --text-mute:#6f7d89;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.4);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.5);
  --shadow-lg: 0 24px 60px rgba(0,0,0,0.6);
  --grad-soft:linear-gradient(135deg, rgba(15,155,110,0.16), rgba(47,128,237,0.16));
}

/* Reset */
*,*::before,*::after{ box-sizing:border-box; }
html,body{ margin:0; padding:0; height:100%; }
body{
  font-family:'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background:var(--bg);
  color:var(--text);
  -webkit-font-smoothing:antialiased;
  -webkit-tap-highlight-color:transparent;
  overscroll-behavior-y:none;
  transition: background var(--t) var(--ease), color var(--t) var(--ease);
}
h1,h2,h3,h4{ font-family:'Plus Jakarta Sans', 'Inter', sans-serif; margin:0; letter-spacing:-0.01em; }
button{ font-family:inherit; cursor:pointer; border:none; background:none; color:inherit; }
input, select, textarea{ font-family:inherit; }
.hidden{ display:none !important; }

/* =================== SPLASH =================== */
.splash{
  position:fixed; inset:0;
  background:var(--bg);
  display:flex; align-items:center; justify-content:center;
  z-index:200;
  transition: opacity var(--t-slow) var(--ease);
}
.splash.fade-out{ opacity:0; pointer-events:none; }
.splash-inner{ text-align:center; animation: rise .8s var(--ease); }
.splash-logo-circle{
  width:90px; height:90px; border-radius:50%;
  background:var(--grad-1);
  display:flex; align-items:center; justify-content:center;
  color:#fff; margin:0 auto 24px;
  box-shadow: 0 20px 50px rgba(15,155,110,.35);
  animation: pulse 2s var(--ease) infinite;
}
.splash-logo-circle svg{ width:46px; height:46px; }
.splash-title{ font-size:28px; font-weight:800; }
.splash-sub{ color:var(--text-soft); margin-top:6px; font-size:14px; }
.splash-loader{
  margin:28px auto 0; width:80px; height:3px; border-radius:3px;
  background:var(--border); overflow:hidden;
}
.splash-loader > div{
  height:100%; width:40%; background:var(--grad-1);
  border-radius:3px;
  animation: load 1.2s var(--ease) infinite;
}
@keyframes pulse{ 0%,100%{ transform:scale(1); } 50%{ transform:scale(1.06); } }
@keyframes load{ 0%{ transform:translateX(-100%);} 100%{ transform:translateX(250%);} }
@keyframes rise{ from{ transform:translateY(20px); opacity:0; } to{ transform:none; opacity:1; } }

/* =================== AUTH =================== */
.auth-view{
  min-height:100vh; display:flex; flex-direction:column;
  background:var(--bg);
}
.auth-hero{
  position:relative; overflow:hidden;
  padding: calc(40px + var(--safe-top)) 24px 56px;
  color:#fff;
  background: var(--grad-1);
}
.auth-hero-circle{
  position:absolute; border-radius:50%;
  background:rgba(255,255,255,0.12);
  filter: blur(1px);
}
.auth-hero-circle.c1{ width:200px; height:200px; right:-60px; top:-60px; }
.auth-hero-circle.c2{ width:140px; height:140px; left:-50px; bottom:-50px; background:rgba(255,255,255,.08); }
.auth-hero-circle.c3{ width:80px; height:80px; right:20%; bottom:10%; background:rgba(255,255,255,.1); }
.auth-brand{ display:flex; align-items:center; gap:12px; position:relative; }
.auth-brand-mark{
  width:46px; height:46px; border-radius:14px;
  background:rgba(255,255,255,.18);
  backdrop-filter: blur(6px);
  display:flex; align-items:center; justify-content:center;
}
.auth-brand-mark svg{ width:24px; height:24px; }
.auth-brand-name{ font-weight:800; font-size:16px; }
.auth-brand-tag{ font-size:12px; opacity:.85; }
.auth-hero-title{ font-size:26px; font-weight:800; line-height:1.2; margin-top:30px; position:relative; max-width:360px; }
.auth-hero-sub{ margin-top:8px; opacity:.9; font-size:14px; max-width:340px; position:relative; }
.auth-card{
  background:var(--surface);
  margin: -28px 16px 24px;
  border-radius: var(--radius-xl);
  padding: 22px;
  box-shadow: var(--shadow-lg);
  position:relative;
  border:1px solid var(--border);
}
.auth-tabs{
  display:flex; position:relative;
  background:var(--bg-soft);
  border-radius:14px; padding:4px; margin-bottom:18px;
}
.auth-tab{
  flex:1; padding:10px 12px; border-radius:10px;
  font-weight:600; font-size:14px; color:var(--text-soft);
  position:relative; z-index:1;
  transition: color var(--t) var(--ease);
}
.auth-tab.active{ color:var(--text); }
.auth-tab-indicator{
  position:absolute; top:4px; bottom:4px; width:calc(50% - 4px);
  background:var(--surface); border-radius:10px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--t) var(--ease);
  left:4px;
}
.auth-tabs[data-active="register"] .auth-tab-indicator{ transform: translateX(100%); }

.auth-form{ display:none; flex-direction:column; gap:14px; animation: fadeUp .4s var(--ease); }
.auth-form.active{ display:flex; }
.field{ display:flex; flex-direction:column; gap:6px; }
.field label{ font-size:12px; font-weight:600; color:var(--text-soft); }
.field input{
  border:1px solid var(--border);
  background:var(--surface-2);
  color:var(--text);
  padding:12px 14px; border-radius:12px;
  font-size:14.5px;
  transition: border var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.field input:focus{ outline:none; border-color:var(--green-500); box-shadow: 0 0 0 4px rgba(15,155,110,.12); }
.row{ display:grid; grid-template-columns:1fr 1fr; gap:12px; }

.role-toggle{ display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.role-opt{
  display:flex; flex-direction:column; align-items:center; gap:6px;
  padding:14px 10px; border-radius:14px;
  border:1.5px solid var(--border);
  background:var(--surface-2);
  color:var(--text-soft);
  font-size:13px; font-weight:600;
  transition: all var(--t) var(--ease);
}
.role-opt svg{ width:22px; height:22px; }
.role-opt.active{
  border-color:var(--green-500);
  background:var(--grad-soft);
  color:var(--text);
}

.btn{
  border-radius:14px; padding:13px 18px;
  font-weight:700; font-size:14.5px;
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t) var(--ease), background var(--t) var(--ease);
}
.btn:active{ transform: scale(0.97); }
.btn-primary{
  background: var(--grad-1); color:#fff;
  box-shadow: 0 12px 30px rgba(15,155,110,.32);
}
.btn-primary:hover{ box-shadow: 0 16px 40px rgba(15,155,110,.42); }
.btn-secondary{
  background: var(--surface-2); color: var(--text);
  border:1px solid var(--border);
}
.btn-ghost{ background:transparent; color:var(--text-soft); }
.btn-danger{ background: #fff0f1; color: #d22d3e; border:1px solid #ffd9dd; }
[data-theme="dark"] .btn-danger{ background:#3a1a1d; color:#ff8c98; border-color:#5a262d; }
.btn-block{ width:100%; }
.btn-sm{ padding:9px 14px; font-size:13px; border-radius:10px; }
.link-btn{ color:var(--green-500); font-weight:600; font-size:13px; }
.auth-foot{
  text-align:center; font-size:12.5px; color:var(--text-soft); margin-top:6px;
}

/* =================== APP SHELL =================== */
.app{
  min-height:100vh;
  display:flex; flex-direction:column;
  padding-top: calc(64px + var(--safe-top));
  padding-bottom: calc(82px + var(--safe-bottom));
}

.topbar{
  position:fixed; top:0; left:0; right:0; z-index:50;
  padding-top: var(--safe-top);
  background: color-mix(in srgb, var(--bg-elev) 86%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom:1px solid var(--border);
}
.topbar-inner{
  height:64px; display:flex; align-items:center; justify-content:space-between;
  padding: 0 16px;
  max-width: 720px; margin:0 auto;
}
.topbar-left{ display:flex; align-items:center; gap:12px; }
.brand-mark{
  width:38px; height:38px; border-radius:12px;
  background:var(--grad-1); color:#fff;
  display:flex; align-items:center; justify-content:center;
  box-shadow: 0 8px 24px rgba(15,155,110,.3);
}
.brand-mark svg{ width:20px; height:20px; }
.brand-title{ font-weight:800; font-size:15px; line-height:1.1; font-family:'Plus Jakarta Sans'; }
.brand-sub{ font-size:11.5px; color:var(--text-soft); }
.topbar-right{ display:flex; align-items:center; gap:6px; }
.icon-btn{
  width:40px; height:40px; border-radius:12px;
  background:var(--surface-2);
  color:var(--text-soft);
  display:flex; align-items:center; justify-content:center;
  position:relative;
  transition: background var(--t) var(--ease), color var(--t) var(--ease), transform var(--t-fast) var(--ease);
}
.icon-btn:hover{ background:var(--border); color:var(--text); }
.icon-btn:active{ transform: scale(0.94); }
.icon-btn svg{ width:18px; height:18px; }
.notif-dot{
  position:absolute; top:9px; right:9px;
  width:8px; height:8px; border-radius:50%;
  background:#ff5d6c; border:2px solid var(--bg-elev);
}

.notif-panel{
  position:fixed; top: calc(60px + var(--safe-top)); right: 12px;
  width: min(340px, calc(100vw - 24px));
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:18px;
  box-shadow: var(--shadow-lg);
  z-index:80; overflow:hidden;
  animation: dropIn .25s var(--ease);
}
@keyframes dropIn{ from{ opacity:0; transform:translateY(-8px) scale(.98);} to{ opacity:1; transform:none;} }
.notif-head{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 16px; border-bottom:1px solid var(--border);
  font-weight:700; font-size:14px;
}
.notif-list{ max-height: 340px; overflow:auto; }
.notif-item{
  padding:12px 16px; border-bottom:1px solid var(--border);
  display:flex; gap:12px; font-size:13px;
}
.notif-item:last-child{ border-bottom:none; }
.notif-icon{
  width:34px; height:34px; border-radius:10px; flex-shrink:0;
  background:var(--grad-soft); color:var(--green-500);
  display:flex; align-items:center; justify-content:center;
}
.notif-icon svg{ width:16px; height:16px; }
.notif-title{ font-weight:600; color:var(--text); }
.notif-time{ font-size:11.5px; color:var(--text-mute); margin-top:2px; }
.notif-empty{ padding:24px; text-align:center; color:var(--text-mute); font-size:13px; }

/* =================== PAGES =================== */
.pages{ flex:1; max-width:720px; width:100%; margin: 0 auto; }
.page{
  display:none;
  padding: 18px 16px 24px;
  animation: pageIn .4s var(--ease);
}
.page.active{ display:block; }
@keyframes pageIn{
  from{ opacity:0; transform: translateY(10px); }
  to{ opacity:1; transform:none; }
}

/* Section heads */
.section-head{
  display:flex; align-items:center; justify-content:space-between;
  margin-bottom:14px;
}
.section-head h2{ font-size:18px; font-weight:800; }
.section-head .link-btn{ font-size:12.5px; }

.greeting{ margin-bottom:18px; }
.greeting h1{ font-size:22px; font-weight:800; }
.greeting p{ color:var(--text-soft); font-size:13.5px; margin-top:4px; }

/* KPI cards */
.kpi-grid{
  display:grid; grid-template-columns: 1fr 1fr; gap:12px;
  margin-bottom: 20px;
}
.kpi{
  position:relative;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius: var(--radius-lg);
  padding:16px;
  overflow:hidden;
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
  animation: fadeUp .5s var(--ease) both;
}
.kpi:hover{ transform: translateY(-2px); box-shadow: var(--shadow-md); }
.kpi-icon{
  width:38px; height:38px; border-radius:12px;
  display:flex; align-items:center; justify-content:center;
  background:var(--grad-soft); color:var(--green-500);
}
.kpi-icon svg{ width:18px; height:18px; }
.kpi.accent .kpi-icon{ background:var(--grad-1); color:#fff; }
.kpi-value{ font-family:'Plus Jakarta Sans'; font-size:26px; font-weight:800; margin-top:12px; }
.kpi-label{ font-size:12.5px; color:var(--text-soft); margin-top:2px; font-weight:500; }
.kpi-delta{ font-size:11.5px; color:var(--green-500); font-weight:600; margin-top:6px; display:flex; align-items:center; gap:4px; }
.kpi-delta.down{ color: #d22d3e; }

.kpi.full{ grid-column: 1/-1; background: var(--grad-1); color:#fff; border:none; }
.kpi.full .kpi-icon{ background:rgba(255,255,255,.18); color:#fff; }
.kpi.full .kpi-label{ color: rgba(255,255,255,.85); }

@keyframes fadeUp{
  from{ opacity:0; transform: translateY(12px); }
  to{ opacity:1; transform:none; }
}
.kpi:nth-child(1){ animation-delay:.05s; }
.kpi:nth-child(2){ animation-delay:.1s; }
.kpi:nth-child(3){ animation-delay:.15s; }
.kpi:nth-child(4){ animation-delay:.2s; }

/* Cards (generic) */
.card{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

/* Activity feed */
.feed{ display:flex; flex-direction:column; gap:10px; }
.feed-item{
  display:flex; gap:12px; align-items:flex-start;
  padding:12px;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius: var(--radius);
  animation: fadeUp .4s var(--ease) both;
}
.feed-dot{
  width:34px; height:34px; border-radius:10px; flex-shrink:0;
  background:var(--grad-soft); color:var(--green-500);
  display:flex; align-items:center; justify-content:center;
}
.feed-dot svg{ width:16px; height:16px; }
.feed-item .feed-title{ font-weight:600; font-size:13.5px; }
.feed-item .feed-sub{ font-size:12px; color:var(--text-soft); margin-top:2px; }
.feed-time{ font-size:11px; color:var(--text-mute); margin-top:4px; }

/* ============ TINDER SWIPE DECK ============ */
.swipe-wrap{
  position:relative;
  display:flex; flex-direction:column; align-items:center;
  padding-top: 6px;
}
.swipe-deck{
  position:relative;
  width: 100%;
  max-width: 380px;
  aspect-ratio: 3 / 4.6;
  user-select:none;
}
.swipe-card{
  position:absolute; inset:0;
  border-radius: var(--radius-xl);
  background:var(--surface);
  box-shadow: var(--shadow-lg);
  overflow:hidden;
  will-change: transform;
  transform-origin: center bottom;
  border:1px solid var(--border);
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.swipe-card.dragging{ transition:none; }
.swipe-card.gone{ transition: transform .55s var(--ease), opacity .55s var(--ease); opacity:0; }
.swipe-card-img{
  width:100%; height:55%;
  background-size:cover; background-position:center;
  position:relative;
}
.swipe-card-img::after{
  content:"";
  position:absolute; inset:0;
  background: linear-gradient(to top, rgba(0,0,0,.7) 0%, rgba(0,0,0,0) 60%);
}
.swipe-card-loc{
  position:absolute; top:14px; left:14px;
  background: rgba(0,0,0,.45); color:#fff;
  padding: 6px 12px; border-radius: 999px;
  font-size:12px; font-weight:600;
  backdrop-filter: blur(6px);
  display:flex; align-items:center; gap:5px;
}
.swipe-card-loc svg{ width:13px; height:13px; }
.swipe-card-pop{
  position:absolute; top:14px; right:14px;
  background:var(--grad-1); color:#fff;
  padding: 6px 10px; border-radius: 999px;
  font-size:11px; font-weight:700;
  display:flex; align-items:center; gap:4px;
}
.swipe-card-pop svg{ width:12px; height:12px; }
.swipe-card-body{
  padding: 18px;
  height: 45%;
  display:flex; flex-direction:column;
}
.swipe-card-title{
  font-family:'Plus Jakarta Sans';
  font-size: 22px; font-weight:800;
  line-height:1.15;
}
.swipe-card-dates{
  font-size:12px; color:var(--text-soft); margin-top:6px;
  display:flex; align-items:center; gap:6px;
}
.swipe-card-dates svg{ width:13px; height:13px; }
.swipe-card-desc{
  margin-top:12px;
  font-size:13.5px; line-height:1.5; color:var(--text-soft);
  flex:1;
  display:-webkit-box;
  -webkit-line-clamp:4;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
.swipe-stamp{
  position:absolute; top: 28px;
  font-family:'Plus Jakarta Sans';
  font-size:42px; font-weight:900;
  padding: 6px 18px;
  border:4px solid currentColor;
  border-radius: 14px;
  opacity:0;
  letter-spacing:.04em;
  pointer-events:none;
  transform: rotate(-14deg);
  transition: opacity .15s linear;
}
.swipe-stamp.like{ left:22px; color:var(--like); }
.swipe-stamp.skip{ right:22px; color:var(--skip); transform: rotate(14deg); }

/* Swipe action buttons */
.swipe-actions{
  margin-top: 26px;
  display:flex; align-items:center; justify-content:center; gap:24px;
}
.swipe-btn{
  width:64px; height:64px; border-radius:50%;
  background:var(--surface);
  border:1px solid var(--border);
  box-shadow: var(--shadow-md);
  display:flex; align-items:center; justify-content:center;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t) var(--ease);
}
.swipe-btn:hover{ transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.swipe-btn:active{ transform: scale(.92); }
.swipe-btn svg{ width:26px; height:26px; }
.swipe-btn.skip{ color: var(--skip); }
.swipe-btn.like{ color: var(--like); }
.swipe-btn.info{ width:48px; height:48px; color: var(--blue-500); }
.swipe-btn.info svg{ width:20px; height:20px; }

/* Empty deck */
.empty-deck{
  text-align:center;
  padding: 40px 20px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border:1px solid var(--border);
  margin-top: 6px;
}
.empty-icon{
  width:74px; height:74px; border-radius:50%;
  background: var(--grad-soft);
  color: var(--green-500);
  display:flex; align-items:center; justify-content:center;
  margin: 0 auto 16px;
}
.empty-icon svg{ width:32px; height:32px; }
.empty-deck h3{ font-size:18px; font-weight:800; }
.empty-deck p{ color:var(--text-soft); font-size:13.5px; margin-top:6px; }

/* ============ CAMPAIGNS — MANAGER LIST ============ */
.search-bar{
  display:flex; align-items:center; gap:8px;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius: 14px;
  padding: 11px 14px;
  margin-bottom: 14px;
}
.search-bar svg{ width:16px; height:16px; color:var(--text-mute); }
.search-bar input{
  flex:1; background:transparent; border:none; outline:none;
  font-size:14px; color:var(--text);
}
.filter-chips{
  display:flex; gap:8px; overflow-x:auto;
  margin-bottom: 14px;
  scrollbar-width: none;
}
.filter-chips::-webkit-scrollbar{ display:none; }
.chip{
  padding:7px 14px; border-radius:999px;
  background:var(--surface);
  border:1px solid var(--border);
  font-size:12.5px; font-weight:600; color:var(--text-soft);
  white-space:nowrap;
  transition: all var(--t) var(--ease);
}
.chip.active{ background: var(--grad-1); color:#fff; border-color: transparent; }

.campaign-list{ display:flex; flex-direction:column; gap:12px; }
.camp-card{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow:hidden;
  box-shadow: var(--shadow-sm);
  animation: fadeUp .4s var(--ease) both;
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.camp-card:hover{ transform: translateY(-2px); box-shadow: var(--shadow-md); }
.camp-card-img{
  width:100%; height: 140px;
  background-size:cover; background-position:center;
  position:relative;
}
.camp-card-status{
  position:absolute; top:12px; left:12px;
  padding:5px 11px; border-radius:999px;
  font-size:11px; font-weight:700;
  background: rgba(255,255,255,.95);
  color:var(--green-600);
  display:flex; align-items:center; gap:5px;
  text-transform:uppercase; letter-spacing: .03em;
}
.camp-card-status::before{
  content:""; width:7px; height:7px; border-radius:50%; background: currentColor;
}
.camp-card-status.completed{ color:#7a8b97; }
.camp-card-status.draft{ color:#c97c1d; }
.camp-card-body{ padding:14px 16px 16px; }
.camp-card-title{ font-family:'Plus Jakarta Sans'; font-size:16px; font-weight:800; }
.camp-card-meta{
  margin-top:6px;
  font-size:12px; color:var(--text-soft);
  display:flex; align-items:center; gap:10px; flex-wrap:wrap;
}
.camp-card-meta span{ display:inline-flex; align-items:center; gap:4px; }
.camp-card-meta svg{ width:13px; height:13px; }
.camp-card-foot{
  margin-top:12px; padding-top:12px; border-top:1px solid var(--border);
  display:flex; align-items:center; justify-content:space-between; gap:10px;
}
.camp-card-volunteers{ font-size:12px; color:var(--text-soft); display:flex; align-items:center; gap:6px; }
.camp-card-volunteers svg{ width:14px; height:14px; }

/* ============ MODAL ============ */
.modal-backdrop{
  position:fixed; inset:0; z-index:120;
  background: rgba(7,15,22,.55);
  backdrop-filter: blur(4px);
  display:flex; align-items:flex-end; justify-content:center;
  animation: backdrop .25s var(--ease);
}
@media(min-width: 640px){
  .modal-backdrop{ align-items:center; }
}
@keyframes backdrop{ from{ opacity:0; } to{ opacity:1; } }
.modal{
  background:var(--surface);
  width:100%; max-width:520px;
  max-height: 92vh; overflow:auto;
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  padding: 18px 18px calc(20px + var(--safe-bottom));
  animation: sheetIn .35s var(--ease);
  position:relative;
}
@media(min-width: 640px){
  .modal{ border-radius: 22px; }
}
@keyframes sheetIn{ from{ transform: translateY(40px); opacity:.6; } to{ transform:none; opacity:1; } }
.modal-handle{
  width:42px; height:4px; border-radius:4px;
  background:var(--border-strong);
  margin: 0 auto 14px;
}
.modal-head{
  display:flex; align-items:center; justify-content:space-between;
  margin-bottom: 16px;
}
.modal-title{ font-family:'Plus Jakarta Sans'; font-size:18px; font-weight:800; }
.modal-close{
  width:34px; height:34px; border-radius:10px;
  background: var(--surface-2);
  display:flex; align-items:center; justify-content:center;
  color:var(--text-soft);
}
.modal-close svg{ width:16px; height:16px; }
.modal-body{ display:flex; flex-direction:column; gap:14px; }
.modal-foot{
  display:flex; gap:10px; margin-top: 18px;
}
.modal-foot .btn{ flex:1; }

.photo-upload{
  position:relative;
  border:2px dashed var(--border-strong);
  border-radius:16px;
  height: 160px;
  display:flex; align-items:center; justify-content:center;
  color:var(--text-soft);
  text-align:center; font-size:13px;
  background:var(--surface-2);
  overflow:hidden; cursor:pointer;
}
.photo-upload img{
  position:absolute; inset:0; width:100%; height:100%; object-fit:cover;
}
.photo-upload svg{ width:22px; height:22px; margin-bottom:6px; }

/* ============ CAMPAIGN DETAIL ============ */
.detail-img{
  width:100%; height:200px;
  border-radius: var(--radius-lg);
  background-size:cover; background-position:center;
  position:relative;
}
.detail-img::after{
  content:""; position:absolute; inset:0;
  background: linear-gradient(to top, rgba(0,0,0,.5), transparent 60%);
  border-radius: var(--radius-lg);
}
.detail-img .camp-card-status{ z-index:1; }
.detail-block{
  display:flex; flex-direction:column; gap:6px;
}
.detail-label{ font-size:11px; font-weight:700; color:var(--text-mute); text-transform:uppercase; letter-spacing:.05em; }
.detail-value{ font-size:14px; color:var(--text); }
.detail-grid{
  display:grid; grid-template-columns: 1fr 1fr; gap:14px;
  background:var(--surface-2);
  border-radius:14px;
  padding:14px;
}
.detail-actions{
  display:grid; grid-template-columns:1fr 1fr; gap:10px;
}
.vol-list{ display:flex; flex-direction:column; gap:8px; }
.vol-item{
  display:flex; align-items:center; gap:12px;
  padding:12px; border-radius:14px;
  background:var(--surface-2);
  border:1px solid var(--border);
}
.vol-avatar{
  width:40px; height:40px; border-radius:50%;
  background:var(--grad-1); color:#fff;
  display:flex; align-items:center; justify-content:center;
  font-weight:700; font-size:13px;
  flex-shrink:0;
}
.vol-info{ flex:1; min-width:0; }
.vol-name{ font-weight:600; font-size:13.5px; }
.vol-meta{ font-size:11.5px; color:var(--text-soft); margin-top:1px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.vol-anon{ display:inline-flex; align-items:center; gap:4px; font-size:10.5px; color:var(--green-500); font-weight:700; padding:3px 7px; border-radius:6px; background: var(--green-50); }
[data-theme="dark"] .vol-anon{ background: rgba(15,155,110,.15); }

/* ============ PROFILE ============ */
.profile-head{
  text-align:center; padding: 14px 0 6px;
}
.profile-avatar{
  width:90px; height:90px; border-radius:50%;
  background: var(--grad-1); color:#fff;
  display:flex; align-items:center; justify-content:center;
  font-family:'Plus Jakarta Sans'; font-size:32px; font-weight:800;
  margin: 0 auto 12px;
  box-shadow: 0 20px 40px rgba(15,155,110,.32);
  position:relative;
}
.profile-badge-ring{
  position:absolute; inset:-6px;
  border-radius:50%;
  border: 2px solid var(--green-500);
  opacity:.4;
  animation: ring 2.5s var(--ease) infinite;
}
@keyframes ring{ 0%,100%{ transform: scale(1); opacity:.4;} 50%{ transform: scale(1.06); opacity:.15;} }
.profile-name{ font-family:'Plus Jakarta Sans'; font-size:20px; font-weight:800; }
.profile-role{
  display:inline-flex; align-items:center; gap:5px;
  margin-top:6px; padding:5px 11px; border-radius:999px;
  font-size:11.5px; font-weight:700;
  background: var(--grad-soft); color: var(--green-600);
  text-transform: uppercase; letter-spacing:.04em;
}
[data-theme="dark"] .profile-role{ color: var(--green-300); }
.profile-section{ margin-top: 22px; }
.profile-stats{
  display:grid; grid-template-columns: repeat(3, 1fr); gap:10px;
  margin-top: 14px;
}
.pstat{
  background:var(--surface); border:1px solid var(--border);
  border-radius:14px; padding:12px; text-align:center;
}
.pstat-val{ font-family:'Plus Jakarta Sans'; font-size:20px; font-weight:800; }
.pstat-lbl{ font-size:11px; color:var(--text-soft); margin-top:2px; }

.badges-grid{
  display:grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap:10px; margin-top: 12px;
}
.badge{
  background:var(--surface); border:1px solid var(--border);
  border-radius:14px; padding:14px 8px; text-align:center;
  transition: all var(--t) var(--ease);
  position:relative;
}
.badge.locked{ opacity:.45; filter: grayscale(.6); }
.badge-icon{
  width:42px; height:42px; border-radius:50%;
  background: var(--grad-1); color:#fff;
  display:flex; align-items:center; justify-content:center;
  margin: 0 auto 8px;
}
.badge-icon svg{ width:20px; height:20px; }
.badge-name{ font-size:11.5px; font-weight:700; }
.badge-desc{ font-size:10.5px; color:var(--text-soft); margin-top:2px; }

.info-list{ display:flex; flex-direction:column; gap:1px; background: var(--border); border-radius:14px; overflow:hidden; border:1px solid var(--border); }
.info-row{
  display:flex; justify-content:space-between; align-items:center; gap:10px;
  background: var(--surface); padding: 12px 14px;
}
.info-row-label{ font-size:12.5px; color:var(--text-soft); }
.info-row-value{ font-size:13px; color:var(--text); font-weight:600; text-align:right; max-width: 60%; overflow:hidden; text-overflow:ellipsis; }

.logout-btn{
  width:100%; margin-top: 16px;
}

/* ============ FAB ============ */
.fab{
  position:fixed; right: 18px; bottom: calc(100px + var(--safe-bottom)); z-index:40;
  width:58px; height:58px; border-radius:50%;
  background: var(--grad-1); color:#fff;
  box-shadow: 0 16px 40px rgba(15,155,110,.4);
  display:flex; align-items:center; justify-content:center;
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.fab:hover{ transform: scale(1.05) translateY(-2px); }
.fab:active{ transform: scale(.95); }
.fab svg{ width:24px; height:24px; }

/* ============ BOTTOM NAV ============ */
.bottomnav{
  position:fixed; left:0; right:0; bottom:0; z-index:50;
  padding-bottom: var(--safe-bottom);
  background: color-mix(in srgb, var(--bg-elev) 86%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-top: 1px solid var(--border);
  display:flex; align-items:center; justify-content:space-around;
  max-width: 720px; margin:0 auto;
}
.navbtn{
  flex:1; padding: 10px 8px;
  display:flex; flex-direction:column; align-items:center; gap:4px;
  color: var(--text-mute);
  font-size:11px; font-weight:600;
  position:relative;
  transition: color var(--t) var(--ease);
}
.navbtn svg{ width:22px; height:22px; transition: transform var(--t) var(--ease); }
.navbtn.active{ color: var(--green-500); }
.navbtn.active svg{ transform: translateY(-2px); }
.navbtn::after{
  content:""; position:absolute; bottom:4px; left:50%;
  width:4px; height:4px; border-radius:50%;
  background: var(--green-500);
  transform: translateX(-50%) scale(0);
  transition: transform var(--t) var(--ease);
}
.navbtn.active::after{ transform: translateX(-50%) scale(1); }

/* ============ SKELETON ============ */
.skel{
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--bg-soft) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
  border-radius: 8px;
}
@keyframes shimmer{ from{ background-position: 200% 0; } to{ background-position: -200% 0; } }
.skel-block{ height:14px; border-radius:6px; }
.skel-card{ height:200px; border-radius: var(--radius-lg); margin-bottom:12px; }

/* ============ TOAST ============ */
.toast-root{
  position:fixed; top: calc(80px + var(--safe-top)); left:0; right:0;
  display:flex; flex-direction:column; align-items:center; gap:8px;
  z-index: 200; pointer-events:none;
}
.toast{
  background: var(--text);
  color: var(--bg);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px; font-weight:600;
  box-shadow: var(--shadow-lg);
  animation: toastIn .4s var(--ease), toastOut .4s var(--ease) 2.6s forwards;
  display:flex; align-items:center; gap:8px;
}
.toast svg{ width:16px; height:16px; }
.toast.success{ background: var(--green-500); color:#fff; }
.toast.error{ background: #d22d3e; color:#fff; }
@keyframes toastIn{ from{ opacity:0; transform: translateY(-10px) scale(.96);} to{ opacity:1; transform:none; } }
@keyframes toastOut{ to{ opacity:0; transform: translateY(-10px) scale(.96);} }

/* ============ MISC ============ */
.scroll-fade > * { animation: fadeUp .5s var(--ease) both; }
.scroll-fade > *:nth-child(1){ animation-delay:.02s; }
.scroll-fade > *:nth-child(2){ animation-delay:.08s; }
.scroll-fade > *:nth-child(3){ animation-delay:.14s; }
.scroll-fade > *:nth-child(4){ animation-delay:.2s; }
.scroll-fade > *:nth-child(5){ animation-delay:.26s; }
.scroll-fade > *:nth-child(6){ animation-delay:.32s; }
.scroll-fade > *:nth-child(7){ animation-delay:.38s; }

textarea{
  width:100%;
  border:1px solid var(--border);
  background:var(--surface-2);
  color:var(--text);
  padding:12px 14px; border-radius:12px;
  font-size:14.5px;
  resize:vertical; min-height:90px;
}
textarea:focus{ outline:none; border-color:var(--green-500); box-shadow: 0 0 0 4px rgba(15,155,110,.12); }
select{
  border:1px solid var(--border);
  background:var(--surface-2);
  color:var(--text);
  padding:12px 14px; border-radius:12px;
  font-size:14.5px;
  appearance:none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b97a4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position: right 14px center;
  padding-right:36px;
}

/* Popularity bar */
.pop-bar{
  height:6px; border-radius:3px;
  background: var(--bg-soft);
  overflow:hidden; margin-top:8px;
}
.pop-bar > div{
  height:100%; background: var(--grad-1);
  transition: width var(--t-slow) var(--ease);
}

/* Tablet+ */
@media (min-width: 720px) {
  .kpi-grid{ grid-template-columns: repeat(4, 1fr); }
  .kpi.full{ grid-column: 1/-1; }
  .campaign-list{ display:grid; grid-template-columns: 1fr 1fr; gap:14px; }
}
