:root{
  /* Brand (from your logo) */
  --green:#137a4b;
  --gold:#f2b705;
  --red:#c23a2b;
  --navy:#0e2a47;
  --ivory:#f7f5ef;

  /* Dark theme (default) */
  --bg:#091827;
  --card:#0c2238;
  --text:#eef5ff;
  --muted:#a9b7cc;
  --line:rgba(255,255,255,.10);
  --shadow:0 18px 50px rgba(0,0,0,.35);

  --radius:16px;
  --radius2:22px;
  --max:1120px;

  --headerH:68px;
  --bottomNavH:72px;
}

html[data-theme="light"]{
  --bg:var(--ivory);
  --card:#ffffff;
  --text:#0b1624;
  --muted:#46546d;
  --line:rgba(11,22,36,.14);
  --shadow:0 18px 50px rgba(17,24,39,.14);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji","Segoe UI Emoji";
  background:
    radial-gradient(900px 600px at 10% -10%, rgba(19,122,75,.20), transparent 55%),
    radial-gradient(900px 600px at 90% 0%, rgba(242,183,5,.18), transparent 55%),
    radial-gradient(900px 600px at 70% 120%, rgba(194,58,43,.14), transparent 55%),
    var(--bg);
  color:var(--text);
  line-height:1.55;
  -webkit-font-smoothing:antialiased;
}

a{color:inherit; text-decoration:none}
img{max-width:100%; height:auto; display:block}
button{font:inherit}

.container{max-width:var(--max); margin:0 auto; padding:0 18px}

/* Topbar */
.topbar{
  position:sticky; top:0; z-index:60;
  height:var(--headerH);
  display:flex;
  background: rgba(9,24,39,.72);
  backdrop-filter: blur(12px);
  border-bottom:1px solid var(--line);
}
html[data-theme="light"] .topbar{background: rgba(247,245,239,.75)}
.topbar .inner{
  width:100%;
  display:flex; align-items:center; justify-content:space-between;
  gap:12px;
}

/* Brand */
.brand{
  display:flex; align-items:center; gap:10px;
  min-width: 220px;
}
.brand .logo{
  width:40px; height:40px;
  border-radius:14px;
  border:1px solid var(--line);
  background: linear-gradient(135deg, rgba(19,122,75,.25), rgba(242,183,5,.18));
  display:flex; align-items:center; justify-content:center;
  overflow:hidden;
}
.brand .logo img{width:100%; height:100%; object-fit:cover}
.brand .text{display:flex; flex-direction:column; line-height:1.05}
.brand .text strong{font-size:14px; letter-spacing:.2px}
.brand .text span{font-size:12px; color:var(--muted)}

/* Desktop nav */
.nav{display:flex; align-items:center; gap:6px}
.nav a{
  padding:10px 12px;
  border-radius:12px;
  color:var(--muted);
  border:1px solid transparent;
}
.nav a:hover{color:var(--text); border-color:var(--line)}
.nav a.active{
  color:var(--text);
  background: rgba(19,122,75,.12);
  border-color: rgba(19,122,75,.25);
}

/* Buttons */
.actions{display:flex; align-items:center; gap:10px}
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:10px 14px;
  border-radius:14px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.04);
  color:var(--text);
  cursor:pointer;
}
.btn:hover{transform: translateY(-1px)}
.btn.primary{
  border-color: rgba(242,183,5,.45);
  background: linear-gradient(135deg, rgba(242,183,5,.22), rgba(19,122,75,.18));
}
.btn.danger{
  border-color: rgba(194,58,43,.40);
  background: linear-gradient(135deg, rgba(194,58,43,.18), rgba(242,183,5,.12));
}
.btn.small{padding:9px 12px; border-radius:12px; font-size:14px}
.iconbtn{
  width:42px; height:42px; border-radius:14px;
  display:inline-flex; align-items:center; justify-content:center;
  border:1px solid var(--line);
  background: rgba(255,255,255,.04);
  cursor:pointer;
}
.iconbtn:active{transform: scale(.98)}
.hamburger{display:none}

/* Drawer */
.drawer{
  position:fixed; inset:0;
  background: rgba(0,0,0,.45);
  z-index:90;
  opacity:0; pointer-events:none;
  transition: opacity .18s ease;
}
.drawer.open{opacity:1; pointer-events:auto}
.drawer .panel{
  position:absolute; top:0; right:0;
  height:100%; width:min(380px, 88vw);
  background: var(--card);
  border-left:1px solid var(--line);
  box-shadow: var(--shadow);
  transform: translateX(100%);
  transition: transform .22s ease;
  padding:16px;
  display:flex; flex-direction:column; gap:10px;
}
.drawer.open .panel{transform: translateX(0)}
.drawer .row{display:flex; gap:10px}
.drawer a{
  padding:12px 12px;
  border-radius:14px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.03);
}
.drawer a strong{display:block; font-size:14px}
.drawer a span{display:block; font-size:12px; color:var(--muted); margin-top:2px}

/* Main */
main{padding:20px 0 24px}
.hero{
  border:1px solid var(--line);
  background: linear-gradient(135deg, rgba(19,122,75,.16), rgba(242,183,5,.14));
  border-radius: var(--radius2);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.hero .wrap{
  padding:22px;
  display:grid;
  grid-template-columns: 1.35fr .65fr;
  gap:18px;
  align-items:center;
}
.kicker{
  display:inline-flex; align-items:center; gap:8px;
  padding:8px 10px;
  border-radius:999px;
  border:1px solid rgba(242,183,5,.30);
  background: rgba(242,183,5,.12);
  font-size:13px;
}
h1{
  margin:10px 0 10px;
  font-size: clamp(26px, 3.6vw, 46px);
  line-height:1.08;
}
.lead{
  margin:0 0 14px;
  color:var(--muted);
  font-size: 15.5px;
  max-width: 65ch;
}
.hero .cta{display:flex; gap:10px; flex-wrap:wrap}

.hero .side{
  border-left:1px solid var(--line);
  padding-left:18px;
  display:flex; flex-direction:column; gap:10px;
}
.stat{
  border:1px solid var(--line);
  background: rgba(255,255,255,.03);
  border-radius: var(--radius);
  padding:12px;
}
.stat strong{display:block; font-size:14px}
.stat span{color:var(--muted); font-size:12px}

/* Sections */
.section{
  margin-top:18px;
  display:grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap:14px;
}
.card{
  border:1px solid var(--line);
  background: rgba(255,255,255,.03);
  border-radius: var(--radius);
  padding:14px;
  box-shadow: 0 10px 26px rgba(0,0,0,.14);
}
.card h3{margin:6px 0 8px; font-size:16px}
.card p{margin:0; color:var(--muted); font-size:14px}
.badge{
  display:inline-flex; align-items:center; gap:8px;
  padding:7px 10px;
  border-radius:999px;
  border:1px solid var(--line);
  color:var(--muted);
  font-size:12px;
}
hr.sep{
  border:0; height:1px; background:var(--line);
  margin:18px 0;
}

/* Lists */
.ul{margin:10px 0 0; padding-left:18px; color:var(--muted); font-size:14px}
.ul li{margin:8px 0}

/* Forms */
.field{display:flex; flex-direction:column; gap:6px; margin:12px 0}
label{font-size:13px; color:var(--muted)}
input, textarea, select{
  padding:12px 12px;
  border-radius:14px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.03);
  color:var(--text);
  outline:none;
}
textarea{min-height:120px; resize:vertical}
html[data-theme="light"] input,
html[data-theme="light"] textarea,
html[data-theme="light"] select{background:#fff}

/* Footer */
footer{
  margin-top:22px;
  padding:18px 0;
  border-top:1px solid var(--line);
  color:var(--muted);
  font-size:13px;
}
.footer-links{display:flex; gap:12px; flex-wrap:wrap; margin-top:10px}
.footer-links a{color:var(--muted)}
.footer-links a:hover{color:var(--text)}

/* Bottom nav */
.bottomnav{
  position:fixed; left:0; right:0; bottom:0;
  height:var(--bottomNavH);
  display:none;
  background: rgba(9,24,39,.72);
  backdrop-filter: blur(12px);
  border-top:1px solid var(--line);
  z-index:70;
}
html[data-theme="light"] .bottomnav{background: rgba(247,245,239,.78)}
.bottomnav .inner{
  height:100%;
  display:grid;
  grid-template-columns: repeat(5, 1fr);
  gap:6px;
  align-items:center;
}
.bnav{
  display:flex; flex-direction:column;
  align-items:center; justify-content:center;
  gap:3px;
  padding:10px 8px;
  border-radius:14px;
  color:var(--muted);
}
.bnav strong{font-size:11px; font-weight:700}
.bnav .dot{width:6px; height:6px; border-radius:50%; background:transparent}
.bnav.active{
  color:var(--text);
  background: rgba(19,122,75,.12);
  border:1px solid rgba(19,122,75,.20);
}
.bnav.active .dot{background: linear-gradient(135deg, var(--gold), var(--green))}

/* Responsive */
@media (max-width: 980px){
  .hero .wrap{grid-template-columns:1fr;}
  .hero .side{border-left:0; padding-left:0; border-top:1px solid var(--line); padding-top:14px}
  .section{grid-template-columns:1fr;}
}
@media (max-width: 860px){
  .nav{display:none}
  .hamburger{display:inline-flex}
  main{padding-bottom: calc(24px + var(--bottomNavH));}
  .bottomnav{display:block}
}
/* =========================
   MOBILE HEADER FIX
   ========================= */

.topbar {
  height: 64px;
}

.topbar .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* Brand */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 65%;
}

.brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  object-fit: contain;
  background: #0E2A47;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-text strong {
  font-size: 14px;
  font-weight: 600;
}

.brand-text span {
  font-size: 11px;
  color: var(--muted);
}

/* Header actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* CTA button smaller on mobile */
.header-actions .btn {
  padding: 7px 12px;
  font-size: 13px;
  border-radius: 12px;
}

/* Hide desktop nav on mobile */
@media (max-width: 860px) {
  .nav {
    display: none !important;
  }
}

/* Prevent header overlapping content */
main {
  padding-top: 12px;
}

/* =========================
   MOBILE DRAWER MENU
   ========================= */

.drawer {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  display: none;
  z-index: 999;
}

.drawer.open {
  display: block;
}

.drawer-panel {
  position: absolute;
  right: 0;
  top: 0;
  width: 82%;
  max-width: 320px;
  height: 100%;
  background: var(--bg);
  padding: 18px;
  box-shadow: -10px 0 30px rgba(0,0,0,.4);
  animation: slideIn .25s ease;
}

@keyframes slideIn {
  from { transform: translateX(100%); }
  to   { transform: translateX(0); }
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.drawer-nav a {
  display: block;
  padding: 14px 12px;
  border-radius: 12px;
  color: var(--text);
  margin-bottom: 8px;
  background: rgba(255,255,255,.05);
}

.drawer-nav a:hover {
  background: rgba(255,255,255,.1);
}
/* =========================
   FINAL MOBILE HEADER TUNE
   ========================= */

.topbar {
  height: 64px;
  overflow: hidden;
}

.topbar .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* BRAND */
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 60%;
}

.brand-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
  border-radius: 10px;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  white-space: nowrap;
  overflow: hidden;
}

.brand-text strong {
  font-size: 14px;
  font-weight: 600;
  text-overflow: ellipsis;
  overflow: hidden;
}

.brand-text span {
  font-size: 11px;
  color: var(--muted);
}

/* ACTIONS */
.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* Icon buttons fixed size */
.iconbtn {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  flex-shrink: 0;
}

/* CTA rules */
.header-cta {
  padding: 7px 10px;
  font-size: 13px;
  border-radius: 12px;
  white-space: nowrap;
}

/* EXTRA SMALL SCREENS */
@media (max-width: 380px) {
  .header-cta {
    display: none; /* hide text CTA */
  }
}

/* Prevent hero overlap */
main {
  padding-top: 12px;
}
