@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=DM+Sans:wght@300;400;500&display=swap');

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

:root {
  --green: #1D9E75; --green-light: #E1F5EE; --green-dark: #085041;
  --teal: #0F6E56; --amber: #BA7517; --text: #2C2C2A;
  --muted: #5F5E5A; --border: rgba(0,0,0,0.1); --bg: #f8f9f5; --red: #E24B4A;
}

html { scroll-behavior: smooth; font-family: 'DM Sans', sans-serif; color: var(--text); }
body { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }

/* ===================== NAV ===================== */
nav {
  position: sticky; top: 0; z-index: 200;
  background: rgba(255,255,255,0.97); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 4rem; height: 64px;
}
.logo {
  font-family: 'Playfair Display', serif; font-size: 1.3rem;
  font-weight: 700; color: var(--green-dark); white-space: nowrap; flex-shrink: 0;
}
.logo span { color: var(--amber); }
.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-links a { font-size: 0.88rem; color: var(--muted); transition: color 0.2s; white-space: nowrap; }
.nav-links a:hover { color: var(--green); }
.nav-cta {
  background: var(--green) !important; color: #fff !important;
  padding: 0.5rem 1.3rem; border-radius: 50px; font-weight: 500 !important;
  transition: background 0.2s !important; white-space: nowrap;
}
.nav-cta:hover { background: var(--teal) !important; color: #fff !important; }

/* Hamburger button */
.hamburger {
  display: none; flex-direction: column; justify-content: center;
  gap: 5px; cursor: pointer; padding: 8px; background: none; border: none;
  z-index: 201; flex-shrink: 0;
}
.hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--text); border-radius: 2px; transition: all 0.3s;
}
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav drawer */
.mobile-nav {
  display: none; position: fixed; top: 64px; left: 0; right: 0; bottom: 0;
  background: #fff; z-index: 199; flex-direction: column;
  padding: 1.5rem 1.5rem 3rem; gap: 0; overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  font-size: 1rem; color: var(--text); padding: 1rem 0;
  border-bottom: 1px solid var(--border); display: block;
}
.mobile-nav a:last-child { border-bottom: none; }
.mobile-nav .nav-cta {
  margin-top: 1rem; text-align: center; border-radius: 50px;
  padding: 0.9rem; border-bottom: none !important;
}

/* ===================== PAGE BANNER ===================== */
.page-banner {
  background: linear-gradient(135deg, #04342C 0%, #0F6E56 55%, #1D9E75 100%);
  color: #fff; padding: 4rem 2rem 3.5rem; text-align: center;
}
.page-banner .tag {
  display: inline-block; background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25); color: #E1F5EE;
  font-size: 0.7rem; padding: 0.3rem 1rem; border-radius: 50px;
  letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 1rem;
}
.page-banner h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.7rem, 5vw, 3rem); font-weight: 700;
  margin-bottom: 0.8rem; line-height: 1.15;
}
.page-banner h1 em { font-style: normal; color: #9FE1CB; }
.page-banner p {
  font-size: clamp(0.88rem, 2vw, 1rem);
  color: rgba(255,255,255,0.78); max-width: 540px;
  margin: 0 auto; line-height: 1.7;
}

/* ===================== FOOTER ===================== */
footer {
  background: var(--green-dark); color: rgba(255,255,255,0.7);
  padding: 2.5rem 2rem; margin-top: auto;
}
.footer-inner {
  display: flex; justify-content: space-between; align-items: center;
  gap: 2rem; max-width: 1200px; margin: 0 auto; flex-wrap: wrap;
  text-align: center;
}
.footer-brand { flex: 1; min-width: 140px; }
.footer-brand .logo { color: #fff; margin-bottom: 0.4rem; display: inline-block; }
.footer-brand p { font-size: 0.76rem; color: rgba(255,255,255,0.45); line-height: 1.6; }
.footer-links {
  display: flex; gap: 1.5rem; align-items: center;
  justify-content: center; flex-wrap: wrap;
}
.footer-links a { font-size: 0.82rem; color: rgba(255,255,255,0.55); transition: color 0.2s; }
.footer-links a:hover { color: #fff; }
.footer-copy {
  flex: 1; min-width: 140px; text-align: center;
  font-size: 0.74rem; color: rgba(255,255,255,0.35); line-height: 1.6;
}

/* ===================== ALERTS ===================== */
.alert { padding: 0.9rem 1.2rem; border-radius: 10px; margin-bottom: 1.5rem; font-size: 0.85rem; }
.alert-error   { background: #FCEBEB; color: #A32D2D; border: 1px solid #F09595; }
.alert-success { background: var(--green-light); color: var(--green-dark); border: 1px solid rgba(29,158,117,0.3); }

/* ===================== POPUP ===================== */
.popup-overlay {
  display: none; position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.6); align-items: center; justify-content: center; padding: 1rem;
}
.popup-overlay.active { display: flex; }
.popup-box {
  background: #fff; border-radius: 20px; padding: 2.5rem 2rem;
  max-width: 440px; width: 100%; text-align: center; animation: popIn 0.3s ease;
}
@keyframes popIn { from { transform: scale(0.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.popup-icon { width: 64px; height: 64px; background: var(--green-light); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 1.2rem; font-size: 1.8rem; }
.popup-box h2 { font-family: 'Playfair Display', serif; font-size: 1.5rem; color: var(--green-dark); margin-bottom: 0.8rem; }
.popup-box p { font-size: 0.88rem; color: var(--muted); line-height: 1.7; margin-bottom: 1.5rem; }
.popup-btn { background: var(--green); color: #fff; border: none; padding: 0.8rem 2.5rem; border-radius: 50px; font-size: 0.9rem; font-family: 'DM Sans', sans-serif; cursor: pointer; }

/* ===================== SECTION COMMON ===================== */
.section-tag { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 2px; color: var(--green); font-weight: 500; margin-bottom: 0.5rem; }
.section-title { font-family: 'Playfair Display', serif; font-size: clamp(1.5rem, 4vw, 2.4rem); font-weight: 700; color: var(--text); line-height: 1.2; }

/* ===================== APPLY PAGE ===================== */
.apply-layout {
  max-width: 1100px; margin: 0 auto;
  padding: 3rem 2rem 5rem;
  display: grid; grid-template-columns: 280px 1fr; gap: 2rem; align-items: start;
}
.plan-sidebar { position: sticky; top: 80px; }
.plan-summary-card {
  background: linear-gradient(145deg,#04342C,#0F6E56);
  color: #fff; border-radius: 20px; padding: 1.8rem 1.5rem;
}
.ps-tag { font-size: 0.65rem; letter-spacing: 2px; text-transform: uppercase; color: #9FE1CB; margin-bottom: 0.6rem; }
.ps-name { font-family: 'Playfair Display', serif; font-size: 1.5rem; font-weight: 700; margin-bottom: 0.3rem; line-height: 1.2; }
.ps-type { font-size: 0.76rem; color: rgba(255,255,255,0.55); margin-bottom: 1.2rem; }
.ps-row { display: flex; justify-content: space-between; align-items: baseline; padding: 0.6rem 0; border-bottom: 1px solid rgba(255,255,255,0.1); gap: 0.5rem; }
.ps-row:last-of-type { border-bottom: none; }
.ps-label { font-size: 0.75rem; color: rgba(255,255,255,0.6); flex-shrink: 0; }
.ps-val { font-size: 0.9rem; font-weight: 500; text-align: right; }
.ps-val.big { font-family: 'Playfair Display', serif; font-size: 1.3rem; color: #9FE1CB; }
.ps-note { margin-top: 1.2rem; font-size: 0.72rem; color: rgba(255,255,255,0.4); line-height: 1.6; }
.back-link { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.82rem; color: var(--muted); margin-bottom: 1.2rem; transition: color 0.2s; }
.back-link:hover { color: var(--green); }

/* Form card */
.form-card { background: #fff; border: 1px solid var(--border); border-radius: 20px; padding: 2.5rem; box-shadow: 0 4px 24px rgba(0,0,0,0.04); }
.form-card h2 { font-family: 'Playfair Display', serif; font-size: 1.6rem; margin-bottom: 0.3rem; }
.form-card .sub { font-size: 0.82rem; color: var(--muted); margin-bottom: 1.8rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.5rem; }
.fg { display: flex; flex-direction: column; gap: 0.3rem; }
.fg.full { grid-column: 1 / -1; }
.fg label { font-size: 0.78rem; font-weight: 500; color: var(--text); }
.fg label .req { color: var(--red); margin-left: 2px; }
.fg input, .fg select {
  width: 100%; padding: 0.65rem 0.9rem; font-size: 0.87rem;
  font-family: 'DM Sans', sans-serif; border: 1.5px solid #e0e0e0;
  border-radius: 10px; outline: none; background: #fff; color: var(--text);
  transition: border 0.2s, box-shadow 0.2s;
}
.fg input:focus, .fg select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(29,158,117,0.1); }
.fg input.err, .fg select.err { border-color: var(--red); }
.fg .err-msg { font-size: 0.72rem; color: var(--red); }
.sec-hdr { grid-column: 1 / -1; padding: 0.4rem 0 0.2rem; border-bottom: 2px solid var(--green-light); margin-bottom: 0.2rem; }
.sec-hdr span { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 2px; color: var(--green); font-weight: 600; }

/* ID upload */
.upload-area {
  border: 2px dashed #ddd; border-radius: 12px; padding: 1.5rem 1rem;
  text-align: center; cursor: pointer; position: relative;
  transition: border-color 0.2s, background 0.2s;
}
.upload-area:hover { border-color: var(--green); background: var(--green-light); }
.upload-area input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.upload-area .ua-icon { font-size: 1.8rem; margin-bottom: 0.4rem; display: block; }
.upload-area .ua-title { font-size: 0.88rem; font-weight: 500; color: var(--text); }
.upload-area .ua-sub { font-size: 0.72rem; color: var(--muted); margin-top: 0.2rem; }
.upload-area.err { border-color: var(--red); }
.upload-preview { display: none; align-items: center; gap: 0.7rem; background: var(--green-light); border-radius: 8px; padding: 0.65rem 1rem; margin-top: 0.7rem; }
.upload-preview span { font-size: 0.8rem; color: var(--green-dark); word-break: break-all; }
.submit-wrap { margin-top: 2rem; text-align: center; }
.submit-btn {
  background: var(--green); color: #fff; border: none;
  padding: 1rem 3rem; border-radius: 50px; font-size: 0.95rem;
  font-weight: 500; font-family: 'DM Sans', sans-serif;
  cursor: pointer; transition: background 0.2s, transform 0.1s;
  width: 100%; max-width: 340px;
}
.submit-btn:hover { background: var(--teal); }
.submit-btn:active { transform: scale(0.98); }
.submit-note { font-size: 0.74rem; color: var(--muted); margin-top: 0.7rem; }

/* ===================== GRANT TYPES PAGE ===================== */
.gt-section { padding: 3rem 4rem 5rem; }
.search-wrap { max-width: 480px; margin: 0 auto 2.5rem; position: relative; }
.search-wrap input {
  width: 100%; padding: 0.8rem 1.2rem 0.8rem 2.8rem;
  border: 1.5px solid #ddd; border-radius: 50px; font-size: 0.9rem;
  font-family: 'DM Sans', sans-serif; outline: none;
  transition: border 0.2s, box-shadow 0.2s;
}
.search-wrap input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(29,158,117,0.1); }
.search-icon { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.gt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1.2rem; }
.gt-card {
  background: #fff; border: 1.5px solid var(--border); border-radius: 16px;
  padding: 1.5rem 1.3rem; cursor: pointer; position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 0.6rem;
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
}
.gt-card:hover { transform: translateY(-4px); box-shadow: 0 10px 28px rgba(29,158,117,0.12); border-color: var(--green); }
.gt-card-icon { font-size: 1.9rem; line-height: 1; }
.gt-card-num { position: absolute; top: 0.9rem; right: 1rem; font-size: 0.65rem; color: #ccc; font-weight: 600; letter-spacing: 1px; }
.gt-card h3 { font-size: 0.92rem; font-weight: 500; color: var(--text); line-height: 1.35; }
.gt-card p { font-size: 0.76rem; color: var(--muted); line-height: 1.55; }
.gt-card .gt-btn { margin-top: auto; display: inline-block; background: var(--green-light); color: var(--green-dark); font-size: 0.75rem; font-weight: 500; padding: 0.3rem 0.85rem; border-radius: 50px; width: fit-content; transition: background 0.2s, color 0.2s; }
.gt-card:hover .gt-btn { background: var(--green); color: #fff; }
.gt-card.hidden { display: none; }

/* Pricing Modal */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 9000; align-items: center; justify-content: center; padding: 1rem; overflow-y: auto; }
.modal-overlay.active { display: flex; }
.modal-box { background: #fff; border-radius: 20px; max-width: 980px; width: 100%; max-height: 90vh; overflow-y: auto; padding: 2rem 1.8rem; animation: slideUp 0.3s ease; margin: auto; }
@keyframes slideUp { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.4rem; gap: 1rem; }
.modal-header h2 { font-family: 'Playfair Display', serif; font-size: 1.6rem; color: var(--text); }
.modal-header .selected-type { font-size: 0.8rem; color: var(--green); margin-top: 0.3rem; }
.modal-close { background: #f0f0f0; border: none; width: 34px; height: 34px; border-radius: 50%; font-size: 1rem; cursor: pointer; flex-shrink: 0; }
.modal-close:hover { background: #ddd; }
.modal-sub { font-size: 0.83rem; color: var(--muted); margin-bottom: 1.8rem; }
.plans-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.plan-card { background: #fff; border: 1.5px solid var(--border); border-radius: 16px; padding: 1.4rem 1.2rem; display: flex; flex-direction: column; gap: 0.7rem; transition: transform 0.2s, box-shadow 0.2s; position: relative; overflow: hidden; }
.plan-card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(29,158,117,0.1); border-color: var(--green); }
.plan-card.featured { border: 2px solid var(--green); background: linear-gradient(160deg,#f0fbf6,#fff); }
.plan-card.featured::before { content: 'POPULAR'; position: absolute; top: 14px; right: -22px; background: var(--green); color: #fff; font-size: 0.58rem; font-weight: 700; padding: 0.25rem 2rem; transform: rotate(35deg); letter-spacing: 1px; }
.plan-name { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 2px; color: var(--green); font-weight: 600; }
.plan-pay-label { font-size: 0.7rem; color: var(--muted); }
.plan-pay-val { font-family: 'Playfair Display', serif; font-size: 2rem; font-weight: 700; line-height: 1; color: var(--text); }
.plan-sep { border: none; border-top: 1px dashed var(--border); }
.plan-get-label { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.plan-get-val { font-family: 'Playfair Display', serif; font-size: 1.3rem; font-weight: 700; color: var(--green-dark); }
.plan-ratio { background: var(--green-light); color: var(--green-dark); font-size: 0.68rem; font-weight: 500; padding: 0.18rem 0.6rem; border-radius: 50px; width: fit-content; }
.plan-apply-btn { margin-top: auto; display: block; text-align: center; background: var(--green-dark); color: #fff; padding: 0.65rem 1rem; border-radius: 50px; font-size: 0.83rem; font-weight: 500; transition: background 0.2s; }
.plan-apply-btn:hover { background: var(--teal); color: #fff; }
.plan-card.featured .plan-apply-btn { background: var(--green); }

/* ===================== ADMIN ===================== */
.admin-wrap { max-width: 1350px; margin: 0 auto; padding: 2rem 2rem 4rem; }
.login-card { max-width: 400px; margin: 5rem auto; background: #fff; border-radius: 20px; border: 1px solid var(--border); padding: 2.5rem 2rem; text-align: center; box-shadow: 0 4px 24px rgba(0,0,0,0.06); }
.login-card h2 { font-family: 'Playfair Display', serif; font-size: 1.6rem; margin-bottom: 0.4rem; color: var(--green-dark); }
.login-card p { font-size: 0.84rem; color: var(--muted); margin-bottom: 2rem; }
.login-card input { width: 100%; padding: 0.75rem 1rem; border: 1.5px solid #ddd; border-radius: 10px; font-size: 0.9rem; font-family: 'DM Sans', sans-serif; outline: none; margin-bottom: 1rem; }
.login-card input:focus { border-color: var(--green); }
.login-btn { width: 100%; background: var(--green); color: #fff; border: none; padding: 0.85rem; border-radius: 10px; font-size: 0.95rem; font-family: 'DM Sans', sans-serif; cursor: pointer; }
.admin-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; flex-wrap: wrap; gap: 1rem; }
.admin-top h1 { font-family: 'Playfair Display', serif; font-size: 1.7rem; }
.tab-bar { display: flex; gap: 0.3rem; flex-wrap: wrap; margin-bottom: 2rem; border-bottom: 2px solid var(--border); }
.tab-btn { padding: 0.65rem 1.2rem; font-size: 0.84rem; font-family: 'DM Sans', sans-serif; border: none; background: transparent; cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all 0.2s; }
.tab-btn.active { color: var(--green); border-bottom-color: var(--green); font-weight: 500; }
.tab-content { display: none; }
.tab-content.active { display: block; }
.stats-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 1rem; margin-bottom: 2rem; }
.stat-card { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 1.2rem 1.5rem; }
.stat-card .s-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted); margin-bottom: 0.4rem; }
.stat-card .s-val { font-family: 'Playfair Display', serif; font-size: 1.9rem; font-weight: 700; color: var(--text); }
.stat-card.c-green .s-val { color: var(--green); }
.stat-card.c-amber .s-val { color: var(--amber); }
.stat-card.c-red   .s-val { color: var(--red); }
.table-wrap { background: #fff; border: 1px solid var(--border); border-radius: 16px; overflow: auto; }
.app-table { width: 100%; border-collapse: collapse; font-size: 0.81rem; }
.app-table th { background: var(--bg); padding: 0.8rem 1rem; text-align: left; font-size: 0.67rem; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); border-bottom: 1px solid var(--border); white-space: nowrap; }
.app-table td { padding: 0.8rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.app-table tr:last-child td { border-bottom: none; }
.app-table tr:hover td { background: #fafafa; }
.badge { display: inline-block; padding: 0.2rem 0.7rem; border-radius: 50px; font-size: 0.68rem; font-weight: 600; }
.badge-pending  { background: #FAEEDA; color: #633806; }
.badge-approved { background: var(--green-light); color: var(--green-dark); }
.badge-rejected { background: #FCEBEB; color: #A32D2D; }
.badge-review   { background: #E6F1FB; color: #0C447C; }
.status-form { display: flex; gap: 4px; align-items: center; }
.status-form select { font-size: 0.75rem; padding: 0.22rem 0.4rem; border: 1px solid #ddd; border-radius: 6px; }
.status-form button { background: var(--green); color: #fff; border: none; padding: 0.22rem 0.6rem; border-radius: 6px; font-size: 0.74rem; cursor: pointer; }
.del-link { color: var(--red) !important; font-size: 0.73rem; text-decoration: underline; cursor: pointer; display: block; margin-top: 4px; }
.filter-bar { display: flex; gap: 0.8rem; margin-bottom: 1.5rem; flex-wrap: wrap; align-items: center; }
.filter-bar input, .filter-bar select { padding: 0.5rem 0.8rem; border: 1px solid #ddd; border-radius: 8px; font-size: 0.82rem; font-family: 'DM Sans', sans-serif; outline: none; }
.filter-bar input { flex: 1; min-width: 160px; }
.id-link { color: var(--green); font-size: 0.73rem; text-decoration: underline; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.settings-card { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 2rem; }
.settings-card h3 { font-size: 1rem; font-weight: 500; margin-bottom: 1.5rem; padding-bottom: 0.7rem; border-bottom: 1px solid var(--border); }
.sg { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1.2rem; }
.sg label { font-size: 0.78rem; font-weight: 500; }
.sg input { width: 100%; padding: 0.65rem 0.9rem; border: 1.5px solid #e0e0e0; border-radius: 10px; font-size: 0.88rem; font-family: 'DM Sans', sans-serif; outline: none; transition: border 0.2s; }
.sg input:focus { border-color: var(--green); }
.upload-area-sm { border: 2px dashed #ddd; border-radius: 10px; padding: 1rem; text-align: center; position: relative; cursor: pointer; transition: border-color 0.2s; }
.upload-area-sm:hover { border-color: var(--green); }
.upload-area-sm input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.upload-area-sm .ua-sm-txt { font-size: 0.78rem; color: var(--muted); }
.save-btn { background: var(--green); color: #fff; border: none; padding: 0.75rem 2rem; border-radius: 50px; font-size: 0.9rem; font-family: 'DM Sans', sans-serif; cursor: pointer; }
.save-btn:hover { background: var(--teal); }
.pricing-table { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
.pricing-table th { background: var(--bg); padding: 0.8rem 1rem; text-align: left; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); border-bottom: 1px solid var(--border); }
.pricing-table td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.pricing-table td input[type=text] { width: 100%; padding: 0.45rem 0.7rem; border: 1px solid #ddd; border-radius: 8px; font-size: 0.84rem; font-family: 'DM Sans', sans-serif; outline: none; }
.pricing-table td input[type=text]:focus { border-color: var(--green); }
.new-plan-row td { background: var(--green-light); }
.del-plan-btn { background: none; border: none; color: var(--red); cursor: pointer; font-size: 0.78rem; text-decoration: underline; }
.logout-btn { background: transparent; border: 1.5px solid #ddd; color: var(--muted); padding: 0.45rem 1rem; border-radius: 50px; font-size: 0.8rem; font-family: 'DM Sans', sans-serif; cursor: pointer; }
.logout-btn:hover { border-color: var(--red); color: var(--red); }
.preview-img { max-height: 50px; border-radius: 6px; border: 1px solid var(--border); margin-top: 0.5rem; }

/* ===================== INDEX PAGE ===================== */
.hero {
  background: linear-gradient(135deg, #04342C 0%, #0F6E56 60%, #1D9E75 100%);
  color: #fff; padding: 6rem 4rem 5rem; position: relative; overflow: hidden;
}
.hero-tag { display: inline-block; background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.25); color: #E1F5EE; font-size: 0.72rem; padding: 0.3rem 1rem; border-radius: 50px; letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 1.5rem; }
.hero h1 { font-family: 'Playfair Display', serif; font-size: clamp(2rem, 5vw, 3.8rem); font-weight: 700; line-height: 1.1; max-width: 700px; margin-bottom: 1.2rem; }
.hero h1 em { font-style: normal; color: #9FE1CB; }
.hero p { font-size: clamp(0.9rem, 2vw, 1.05rem); max-width: 520px; color: rgba(255,255,255,0.78); line-height: 1.7; margin-bottom: 2rem; }
.hero-btns { display: flex; gap: 1rem; flex-wrap: wrap; }
.btn-primary { background: #fff; color: var(--green-dark); padding: 0.85rem 2rem; border-radius: 50px; font-weight: 500; font-size: 0.92rem; transition: all 0.2s; display: inline-block; }
.btn-primary:hover { background: #E1F5EE; }
.btn-ghost { border: 1.5px solid rgba(255,255,255,0.4); color: #fff; padding: 0.85rem 2rem; border-radius: 50px; font-size: 0.92rem; transition: all 0.2s; display: inline-block; }
.btn-ghost:hover { background: rgba(255,255,255,0.1); }
.hero-stats { display: flex; gap: 2.5rem; margin-top: 3.5rem; padding-top: 2.5rem; border-top: 1px solid rgba(255,255,255,0.15); flex-wrap: wrap; }
.stat-item .num { font-family: 'Playfair Display', serif; font-size: 1.9rem; font-weight: 700; color: #9FE1CB; }
.stat-item .lbl { font-size: 0.78rem; color: rgba(255,255,255,0.6); margin-top: 0.2rem; }
.features { padding: 4rem 4rem; background: #fff; }
.features-header { text-align: center; margin-bottom: 2.5rem; }
.cards-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem; }
.feat-card { background: var(--bg); border: 1px solid var(--border); border-radius: 16px; padding: 2rem; transition: box-shadow 0.2s, transform 0.2s; }
.feat-card:hover { box-shadow: 0 8px 24px rgba(29,158,117,0.1); transform: translateY(-3px); }
.feat-card-icon { width: 48px; height: 48px; background: var(--green-light); border-radius: 12px; display: flex; align-items: center; justify-content: center; margin-bottom: 1.2rem; }
.feat-card h3 { font-size: 1rem; font-weight: 500; margin-bottom: 0.4rem; }
.feat-card p { font-size: 0.83rem; color: var(--muted); line-height: 1.65; }
.cta-band { background: linear-gradient(90deg,#04342C,#0F6E56); padding: 4rem; text-align: center; color: #fff; }
.cta-band h2 { font-family: 'Playfair Display', serif; font-size: clamp(1.4rem, 4vw, 2.2rem); margin-bottom: 0.8rem; }
.cta-band p { color: rgba(255,255,255,0.75); margin-bottom: 2rem; font-size: 0.92rem; }
.cta-btn { background: #fff; color: var(--green-dark); padding: 0.9rem 2.5rem; border-radius: 50px; font-weight: 500; font-size: 0.92rem; display: inline-block; transition: all 0.2s; }
.cta-btn:hover { background: #9FE1CB; }

/* ===================== RESPONSIVE BREAKPOINTS ===================== */

/* Tablet: 1024px */
@media (max-width: 1024px) {
  nav { padding: 0 2rem; }
  .hero { padding: 5rem 2rem 4rem; }
  .features { padding: 3.5rem 2rem; }
  .cta-band { padding: 3rem 2rem; }
  .gt-section { padding: 2.5rem 2rem 4rem; }
}

/* Mobile: 768px */
@media (max-width: 768px) {
  /* Nav */
  nav { padding: 0 1.2rem; }
  .nav-links { display: none !important; }
  .hamburger { display: flex !important; }

  /* Page Banner */
  .page-banner { padding: 2.5rem 1.2rem 2rem; }

  /* Footer */
  footer { padding: 2rem 1.2rem; }
  .footer-inner { flex-direction: column; align-items: center; gap: 1.2rem; }
  .footer-brand { text-align: center; }
  .footer-copy { text-align: center; }

  /* Apply layout: stack sidebar on top of form */
  .apply-layout { grid-template-columns: 1fr; gap: 1.5rem; padding: 1.5rem 1rem 3rem; }
  .plan-sidebar { position: static; }
  .plan-summary-card { padding: 1.4rem 1.2rem; }
  .ps-name { font-size: 1.3rem; }

  /* Form */
  .form-grid { grid-template-columns: 1fr; gap: 0.9rem; }
  .fg.full, .sec-hdr { grid-column: 1; }
  .form-card { padding: 1.5rem 1rem; border-radius: 16px; }

  /* Grant types */
  .gt-section { padding: 2rem 1rem 3rem; }
  .gt-grid { grid-template-columns: repeat(2, 1fr); gap: 0.8rem; }
  .gt-card { padding: 1.1rem 0.9rem; }
  .gt-card p { display: none; }
  .gt-card-icon { font-size: 1.6rem; }
  .gt-card h3 { font-size: 0.83rem; }

  /* Modal */
  .modal-box { padding: 1.4rem 1rem; max-height: 95vh; }
  .modal-header h2 { font-size: 1.3rem; }
  .plans-grid { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
  .plan-pay-val { font-size: 1.6rem; }
  .plan-get-val { font-size: 1.1rem; }

  /* Index */
  .hero { padding: 4rem 1.2rem 3rem; }
  .cards-grid { grid-template-columns: 1fr; }
  .features { padding: 3rem 1.2rem; }
  .cta-band { padding: 2.5rem 1.2rem; }
  .hero-stats { gap: 1.5rem; }

  /* Admin */
  .stats-row { grid-template-columns: 1fr 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .admin-wrap { padding: 1.5rem 1rem 3rem; }
  .tab-btn { padding: 0.55rem 0.85rem; font-size: 0.8rem; }
}

/* Small mobile: 480px */
@media (max-width: 480px) {
  nav { padding: 0 0.9rem; }
  .logo { font-size: 1.1rem; }
  .gt-grid { grid-template-columns: 1fr 1fr; }
  .plans-grid { grid-template-columns: 1fr; }
  .hero-btns { flex-direction: column; }
  .btn-primary, .btn-ghost { text-align: center; }
  .stats-row { grid-template-columns: 1fr 1fr; gap: 0.6rem; }
  .stat-card { padding: 1rem; }
  .stat-card .s-val { font-size: 1.5rem; }
  .apply-layout { padding: 1rem 0.8rem 3rem; }
  .form-card { padding: 1.2rem 0.9rem; }
}
