/* ============================================================
   Opportunity Linkage — Global Stylesheet
   ============================================================ */
:root {
  --primary: #0f3a5f;
  --primary-2: #155e9b;
  --primary-3: #1f7ac4;
  --accent: #f59e0b;
  --accent-2: #fb7c3c;
  --ink: #1c2733;
  --muted: #5b6b7b;
  --bg: #f6f8fb;
  --card: #ffffff;
  --line: #e4e9f0;
  --green: #0e9f6e;
  --red: #d64545;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 6px 24px rgba(15, 58, 95, 0.08);
  --shadow-lg: 0 18px 48px rgba(15, 58, 95, 0.16);
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
}

img { max-width: 100%; display: block; }
a { color: var(--primary-2); text-decoration: none; }
a:hover { color: var(--primary); }
ul { list-style: none; }

.container { width: min(1180px, 92%); margin: 0 auto; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 999px;
  border: 2px solid transparent;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.18s ease;
  font-family: inherit;
  text-align: center;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 7px 16px; font-size: 13.5px; }
.btn-lg { padding: 14px 30px; font-size: 16px; }

.btn-accent { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; border-color: transparent; box-shadow: 0 6px 18px rgba(245, 158, 11, 0.35); }
.btn-accent:hover { filter: brightness(1.06); color: #fff; transform: translateY(-1px); }

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-2); color: #fff; }

.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }

.btn-premium {
  background: linear-gradient(135deg, #ffd76a, var(--accent), var(--accent-2));
  color: #4a3000;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4);
}
.btn-premium:hover { filter: brightness(1.05); color: #4a3000; transform: translateY(-1px); }

.btn-ghost { background: transparent; color: var(--muted); border-color: var(--line); }
.btn-ghost:hover { color: var(--primary); border-color: var(--primary); }

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

.btn-block { width: 100%; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

/* ---------------- Header ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.2s ease;
}
.site-header.scrolled { box-shadow: 0 4px 18px rgba(15, 58, 95, 0.1); }

.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; height: 68px; }

.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 38px; height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--primary), var(--primary-3));
  color: #fff;
  display: grid; place-items: center;
  font-weight: 800; font-size: 15px;
  letter-spacing: 0.5px;
}
.brand-text { font-size: 17px; font-weight: 400; color: var(--ink); }
.brand-text b { font-weight: 800; color: var(--primary); }

.main-nav { display: flex; align-items: center; gap: 22px; }
.nav-link {
  color: var(--ink);
  font-weight: 500;
  font-size: 15px;
  padding: 8px 2px;
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  position: relative;
}
.nav-link:hover { color: var(--primary-2); }
.nav-link::after {
  content: "";
  position: absolute; left: 0; bottom: 2px;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width 0.2s ease;
}
.nav-link:hover::after { width: 100%; }

.dropdown { position: relative; }
.dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  min-width: 210px;
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.18s ease;
  z-index: 95;
}
.dropdown.open .dropdown-menu { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.dropdown-menu a {
  display: block;
  padding: 9px 14px;
  border-radius: 8px;
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 500;
}
.dropdown-menu a:hover { background: var(--bg); color: var(--primary-2); }

.nav-actions { display: flex; align-items: center; gap: 10px; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 9px;
  width: 42px; height: 42px;
  font-size: 20px;
  cursor: pointer;
  color: var(--primary);
}

/* user menu (logged-in state) */
.user-menu { position: relative; }
.avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-3));
  color: #fff;
  font-weight: 700;
  display: grid; place-items: center;
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--line);
  font-size: 15px;
}
.user-menu-pop {
  position: absolute;
  right: 0; top: calc(100% + 10px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  padding: 8px;
  opacity: 0; visibility: hidden;
  transform: translateY(6px);
  transition: all 0.18s ease;
  z-index: 95;
}
.user-menu.open .user-menu-pop { opacity: 1; visibility: visible; transform: translateY(0); }
.user-menu-pop a, .user-menu-pop button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 9px 14px;
  border-radius: 8px;
  color: var(--ink);
  font-size: 14.5px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.user-menu-pop a:hover, .user-menu-pop button:hover { background: var(--bg); color: var(--primary-2); }
.user-menu-pop .menu-head {
  font-size: 12.5px;
  color: var(--muted);
  padding: 6px 14px 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 6px;
}
.premium-chip {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  background: linear-gradient(135deg, #ffd76a, var(--accent));
  color: #4a3000;
  border-radius: 999px;
  padding: 2px 9px;
  margin-left: 6px;
  vertical-align: middle;
}

/* ---------------- Hero slider ---------------- */
.hero { position: relative; overflow: hidden; }
.hero-slides { position: relative; height: min(560px, 72vh); }
.hero-slide {
  position: absolute; inset: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s ease, visibility 0.7s;
  color: #fff;
  background: var(--hero-bg, linear-gradient(135deg, #0b2f52, #155e9b));
}
.hero-slide::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 85% 20%, rgba(255, 255, 255, 0.14) 0, rgba(255, 255, 255, 0.14) 2px, transparent 2.5px),
    radial-gradient(circle at 70% 75%, rgba(255, 255, 255, 0.1) 0, rgba(255, 255, 255, 0.1) 3px, transparent 3.5px);
  background-size: 90px 90px, 130px 130px;
  pointer-events: none;
}
.hero-slide::after {
  content: "";
  position: absolute;
  right: -120px; bottom: -140px;
  width: 480px; height: 480px;
  border-radius: 50%;
  border: 42px solid rgba(255, 255, 255, 0.07);
}
.hero-slide.active { opacity: 1; visibility: visible; }
.hero-inner { position: relative; z-index: 2; }
.hero-copy { max-width: 640px; }
.hero-kicker {
  display: inline-block;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.4px;
  margin-bottom: 18px;
  text-transform: uppercase;
}
.hero-copy h1 { font-size: clamp(30px, 4.6vw, 52px); line-height: 1.15; font-weight: 800; margin-bottom: 16px; }
.hero-copy p { font-size: clamp(15px, 1.6vw, 18px); opacity: 0.92; max-width: 540px; margin-bottom: 28px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-arrow {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  z-index: 5;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  transition: background 0.2s;
  backdrop-filter: blur(4px);
}
.hero-arrow:hover { background: rgba(255, 255, 255, 0.28); }
.hero-arrow.prev { left: 22px; }
.hero-arrow.next { right: 22px; }

.hero-dots {
  position: absolute;
  bottom: 22px; left: 50%;
  transform: translateX(-50%);
  display: flex; gap: 9px;
  z-index: 5;
}
.hero-dots button {
  width: 10px; height: 10px;
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: all 0.25s ease;
}
.hero-dots button.active { width: 26px; background: #fff; }

/* ---------------- Sections ---------------- */
.section { padding: 72px 0; }
.section.alt { background: #fff; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 44px; }
.section-kicker {
  display: inline-block;
  color: var(--accent-2);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  font-size: 12.5px;
  margin-bottom: 10px;
}
.section-head h2 { font-size: clamp(26px, 3.4vw, 38px); color: var(--primary); line-height: 1.2; margin-bottom: 12px; }
.section-head p { color: var(--muted); font-size: 16.5px; }

/* ---------------- Badges & chips ---------------- */
.badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: 999px;
  letter-spacing: 0.2px;
}
.badge-grant { background: #e6f4ea; color: #1e7e44; }
.badge-scholarship { background: #e8effb; color: #2f5fb3; }
.badge-open-call { background: #fdeee3; color: #c05e12; }
.badge-workshop { background: #f3ecfb; color: #7a3cc0; }
.badge-training { background: #e3f4f7; color: #178aa0; }
.badge-closing { background: #fdeaea; color: var(--red); }
.badge-archived { background: #eef1f5; color: var(--muted); }
.badge-premium { background: linear-gradient(135deg, #ffd76a, var(--accent)); color: #4a3000; }

.chip {
  display: inline-block;
  font-size: 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 3px 10px;
  border-radius: 999px;
}

/* ---------------- Opportunity cards ---------------- */
.opp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.opp-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.opp-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.opp-media { position: relative; height: 168px; background: linear-gradient(135deg, var(--primary), var(--primary-3)); overflow: hidden; }
.opp-media img { width: 100%; height: 100%; object-fit: cover; }
.opp-media-fallback {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  color: rgba(255, 255, 255, 0.85);
  font-size: 44px; font-weight: 800;
  letter-spacing: 2px;
}
.opp-media .badge { position: absolute; top: 12px; left: 12px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18); }
.opp-media .badge-closing, .opp-media .badge-archived { position: absolute; top: 12px; right: 12px; left: auto; }
.opp-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; gap: 10px; }
.opp-org { font-size: 12.5px; font-weight: 700; color: var(--primary-2); text-transform: uppercase; letter-spacing: 0.6px; }
.opp-body h3 { font-size: 17.5px; line-height: 1.35; color: var(--ink); }
.opp-body .desc {
  color: var(--muted);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.opp-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.opp-foot {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.countdown { font-size: 13px; line-height: 1.3; }
.countdown .cd-label { display: block; color: var(--muted); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; }
.countdown .cd-value { font-weight: 800; color: var(--green); font-size: 14.5px; }
.countdown.off .cd-value { color: var(--muted); }
.countdown.urgent .cd-value { color: var(--red); }
.opp-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 17px;
  cursor: pointer;
  color: var(--muted);
  display: grid; place-items: center;
  transition: all 0.18s ease;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.icon-btn.saved { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------------- Premium banner ---------------- */
.premium-banner {
  background: linear-gradient(120deg, #2a1a4e 0%, #0f3a5f 55%, #155e9b 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.premium-banner::before {
  content: "★";
  position: absolute;
  right: -30px; top: -60px;
  font-size: 320px;
  color: rgba(255, 255, 255, 0.06);
  line-height: 1;
}
.premium-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 54px 0;
  flex-wrap: wrap;
  position: relative; z-index: 2;
}
.premium-inner h2 { font-size: clamp(24px, 3vw, 34px); margin-bottom: 10px; }
.premium-inner p { opacity: 0.92; max-width: 560px; font-size: 16px; }
.premium-inner p b { color: #ffd76a; }

/* ---------------- Footer ---------------- */
.site-footer { background: #0b2337; color: #b7c6d6; padding: 60px 0 28px; font-size: 14.5px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 36px; margin-bottom: 40px; }
.footer-brand .brand-text { color: #fff; }
.footer-brand p { margin-top: 14px; max-width: 320px; opacity: 0.85; }
.footer-col h4 { color: #fff; font-size: 15px; margin-bottom: 16px; }
.footer-col a { display: block; color: #b7c6d6; padding: 5px 0; }
.footer-col a:hover { color: #ffd76a; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 13px;
  opacity: 0.8;
}

/* ---------------- Page headers ---------------- */
.page-head { padding: 52px 0 10px; }
.page-head h1 { font-size: clamp(28px, 4vw, 42px); color: var(--primary); line-height: 1.2; }
.page-sub { color: var(--muted); margin-top: 8px; font-size: 16.5px; max-width: 640px; }

/* ---------------- Opportunity directory layout ---------------- */
.opp-layout { display: grid; grid-template-columns: 280px 1fr; gap: 30px; padding: 30px 0 80px; align-items: start; }
.filter-sidebar {
  position: sticky;
  top: 88px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.filter-search input {
  width: 100%;
  padding: 12px 14px 12px 40px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  font-size: 14.5px;
  font-family: inherit;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%235b6b7b' stroke-width='2'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='M11 11l3.5 3.5'/%3E%3C/svg%3E") no-repeat 15px center;
}
.filter-search input:focus { outline: none; border-color: var(--primary-3); }
.filter-group { border-top: 1px solid var(--line); padding-top: 16px; }
.filter-group h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.8px; color: var(--primary); margin-bottom: 10px; }
.filter-group label {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 0;
  font-size: 14.5px;
  color: var(--ink);
  cursor: pointer;
  font-weight: 500;
}
.filter-group input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}
.filter-group label:hover { color: var(--primary-2); }

.results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 14.5px;
  flex-wrap: wrap;
}
.results-bar select {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-family: inherit;
  font-size: 14px;
  background: #fff;
  color: var(--ink);
}
.empty-state {
  text-align: center;
  padding: 70px 20px;
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
}
.empty-state .big { font-size: 44px; margin-bottom: 10px; }
.empty-state h3 { color: var(--ink); margin-bottom: 6px; }

/* ---------------- Forms ---------------- */
.form-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px;
  box-shadow: var(--shadow);
}
.auth-wrap { max-width: 460px; margin: 50px auto 80px; }
.auth-wrap h1 { color: var(--primary); font-size: 28px; margin-bottom: 6px; }
.auth-wrap .auth-sub { color: var(--muted); margin-bottom: 26px; font-size: 15px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 7px; color: var(--ink); }
.form-group .hint { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.form-control {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
  transition: border-color 0.15s;
}
.form-control:focus { outline: none; border-color: var(--primary-3); box-shadow: 0 0 0 3px rgba(31, 122, 196, 0.12); }
textarea.form-control { resize: vertical; min-height: 90px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.checkbox-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; }
.checkbox-grid label {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 500;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px 12px;
  cursor: pointer;
  transition: all 0.15s;
}
.checkbox-grid label:hover { border-color: var(--primary-3); }
.checkbox-grid input { accent-color: var(--accent); width: 15px; height: 15px; }
.form-error {
  display: none;
  background: #fdeaea;
  color: var(--red);
  border: 1px solid #f5c2c2;
  border-radius: 9px;
  padding: 11px 14px;
  font-size: 14px;
  margin-bottom: 16px;
}
.form-error.show { display: block; }
.form-foot { text-align: center; margin-top: 18px; color: var(--muted); font-size: 14px; }

/* ---------------- Rich text editor ---------------- */
.rte-wrap { border: 1.5px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.rte-wrap:focus-within { border-color: var(--primary-3); box-shadow: 0 0 0 3px rgba(31, 122, 196, 0.12); }
.rte-toolbar {
  display: flex; gap: 6px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  background: #fafbfd;
}
.rte-toolbar button {
  min-width: 34px; height: 32px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  padding: 0 10px;
}
.rte-toolbar button:hover { border-color: var(--primary-3); color: var(--primary-2); }
.rte-toolbar button.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.rte-area {
  min-height: 200px;
  padding: 14px 16px;
  outline: none;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.7;
}
.rte-area:empty::before { content: attr(data-placeholder); color: #9aa8b6; }
.rte-area ul { list-style: disc; padding-left: 22px; }
.rte-area ol { list-style: decimal; padding-left: 22px; }
.rte-area h1, .rte-area h2, .rte-area h3 { margin: 10px 0 6px; }

/* ---------------- Image upload ---------------- */
.upload-box {
  border: 2px dashed var(--line);
  border-radius: 10px;
  padding: 22px;
  text-align: center;
  cursor: pointer;
  color: var(--muted);
  transition: all 0.15s;
  background: #fafbfd;
  position: relative;
  overflow: hidden;
}
.upload-box:hover { border-color: var(--primary-3); color: var(--primary-2); }
.upload-box img { max-height: 150px; margin: 0 auto 8px; border-radius: 8px; }
.upload-box .up-icon { font-size: 26px; }
.upload-box input[type="file"] { display: none; }

/* ---------------- Dashboard layout ---------------- */
.dash-wrap { display: grid; grid-template-columns: 250px 1fr; gap: 28px; padding: 34px 0 80px; align-items: start; }
.dash-nav {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  position: sticky; top: 88px;
  display: flex; flex-direction: column; gap: 4px;
}
.dash-nav button {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px;
  border: none;
  border-radius: 9px;
  background: none;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}
.dash-nav button:hover { background: var(--bg); color: var(--primary-2); }
.dash-nav button.active { background: var(--primary); color: #fff; }
.dash-main { min-width: 0; }
.dash-panel { display: none; }
.dash-panel.active { display: block; animation: fadeIn 0.25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 26px; }
.stat-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.stat-card .num { font-size: 30px; font-weight: 800; color: var(--primary); }
.stat-card .lbl { font-size: 13.5px; color: var(--muted); margin-top: 2px; }

.panel-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 20px; }
.panel-card h3 { color: var(--primary); margin-bottom: 14px; font-size: 18px; }

.profile-line { display: flex; gap: 12px; margin-bottom: 10px; font-size: 14.5px; }
.profile-line .k { color: var(--muted); min-width: 90px; font-weight: 600; }

/* notifications */
.notif-item {
  display: flex; gap: 14px;
  padding: 15px 4px;
  border-bottom: 1px solid var(--line);
  align-items: flex-start;
}
.notif-item:last-child { border-bottom: none; }
.notif-item .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); margin-top: 8px; flex: none; }
.notif-item.read .dot { background: var(--line); }
.notif-item .txt { flex: 1; font-size: 14.5px; }
.notif-item .meta { font-size: 12px; color: var(--muted); margin-top: 4px; display: flex; gap: 8px; flex-wrap: wrap; }
.chan-badge { font-size: 10.5px; font-weight: 800; padding: 2px 8px; border-radius: 999px; text-transform: uppercase; }
.chan-sms { background: #e6f4ea; color: #1e7e44; }
.chan-email { background: #e8effb; color: #2f5fb3; }

/* templates */
.tpl-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.tpl-row:last-child { border-bottom: none; }
.tpl-row .tpl-name { font-weight: 700; font-size: 15.5px; }
.tpl-row .tpl-desc { color: var(--muted); font-size: 13.5px; }

/* mini posts list */
.mini-post {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.mini-post:last-child { border-bottom: none; }
.mini-post .mini-title { font-weight: 600; font-size: 15px; }
.mini-post .mini-meta { font-size: 12.5px; color: var(--muted); }

/* ---------------- Modal ---------------- */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(11, 35, 55, 0.55);
  backdrop-filter: blur(3px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: #fff;
  border-radius: 16px;
  max-width: 760px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.22s ease;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.modal-head {
  position: sticky; top: 0;
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 18px 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  z-index: 2;
}
.modal-head h3 { color: var(--primary); font-size: 19px; }
.modal-close {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 17px;
  cursor: pointer;
  color: var(--muted);
}
.modal-close:hover { color: var(--red); border-color: var(--red); }
.modal-body { padding: 24px 26px 30px; }
.modal-detail-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 18px; }
.modal-detail .rich { font-size: 15.5px; line-height: 1.75; }
.modal-detail .rich ul { list-style: disc; padding-left: 22px; margin: 8px 0; }
.modal-detail .rich ol { list-style: decimal; padding-left: 22px; margin: 8px 0; }
.modal-detail .rich h1, .modal-detail .rich h2, .modal-detail .rich h3 { margin: 14px 0 6px; color: var(--primary); }
.modal-cta { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; align-items: center; }
.modal-deadline { font-weight: 800; color: var(--green); }
.modal-deadline.off { color: var(--muted); }

/* ---------------- Toast ---------------- */
.toast-wrap {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  width: min(460px, 92%);
}
.toast {
  background: var(--ink);
  color: #fff;
  padding: 13px 20px;
  border-radius: 12px;
  font-size: 14.5px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  animation: toastIn 0.25s ease;
}
.toast.success { background: var(--green); }
.toast.error { background: var(--red); }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------------- How it works / feature tiles ---------------- */
.tile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; }
.tile {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.tile:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.tile-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: grid; place-items: center;
  font-size: 24px;
  margin-bottom: 16px;
  background: #e8effb;
}
.tile h3 { font-size: 17px; color: var(--primary); margin-bottom: 8px; }
.tile p { color: var(--muted); font-size: 14.5px; }

.step-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; counter-reset: step; }
.step {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  position: relative;
}
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: -14px; left: 22px;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  display: grid; place-items: center;
  font-size: 14px;
}
.step h3 { color: var(--primary); font-size: 16px; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: 14px; }

/* about page extras */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.about-grid p { color: var(--muted); margin-bottom: 14px; }
.value-list li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.value-list li:last-child { border-bottom: none; }
.value-list .v-icon { color: var(--accent-2); font-weight: 800; }
.contact-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.contact-card p { margin-bottom: 10px; color: var(--muted); }

/* ---------------- Responsive ---------------- */
@media (max-width: 960px) {
  .nav-toggle { display: grid; place-items: center; }
  .main-nav {
    position: fixed;
    top: 68px; left: 0; right: 0;
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 16px 5%;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    transform: translateY(-130%);
    transition: transform 0.25s ease;
    z-index: 85;
  }
  .main-nav.open { transform: translateY(0); }
  .nav-link { padding: 12px 4px; border-bottom: 1px solid var(--line); }
  .dropdown-menu { position: static; transform: none; opacity: 1; visibility: visible; box-shadow: none; border: none; padding: 0 0 0 16px; min-width: 0; display: none; }
  .dropdown.open .dropdown-menu { display: block; transform: none; }
  .nav-actions { flex-wrap: wrap; gap: 8px; padding-top: 10px; }
  .opp-layout { grid-template-columns: 1fr; }
  .filter-sidebar { position: static; }
  .dash-wrap { grid-template-columns: 1fr; }
  .dash-nav { position: static; flex-direction: row; overflow-x: auto; }
  .dash-nav button { white-space: nowrap; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .about-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-slides { height: min(520px, 80vh); }
  .hero-arrow { display: none; }
}
