:root{
  --green: #2E7D32;
  --green-dark: #1B5E20;
  --charcoal: #2b2b2b;
  --muted: #666;
  --shadow: 0 18px 50px rgba(0,0,0,.12);
  --radius: 22px;
  --card-shadow: 0 10px 30px rgba(0,0,0,.08);
}

*{ box-sizing:border-box; }

body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background:#ffffff; /* outside stays white */
  color: var(--charcoal);
}

/* ---------------------------------
   Topbar
---------------------------------- */
.topbar{
  display:flex;
  justify-content: space-between;
  align-items:center;
  padding: 10px 28px;
  border-bottom: 1px solid rgba(0,0,0,.08);
  background:#ffffff;
}

.topbar-accent{
  height: 6px;
  background: linear-gradient(90deg, rgba(46,125,50,1), rgba(46,125,50,.35));
}

/* Top navigation (standard on all pages) */
.top-nav{
  display:flex;
  align-items:center;
  gap: 12px;
  flex-wrap: wrap;
}

.top-nav__link{
  text-decoration:none;
  font-weight: 900;
  color: var(--charcoal);
  padding: 8px 10px;
  border-radius: 12px;
}

.top-nav__link:hover{
  background: rgba(0,0,0,.04);
}

.top-nav__sep{
  width: 1px;
  height: 28px;
  background: rgba(0,0,0,.12);
  margin: 0 6px;
}

.top-nav__btn{
  padding: 9px 14px;
  border-radius: 12px;
}

/* Brand button */
.brand{
  display:flex;
  align-items:center;
  gap:10px;
  padding: 6px 10px;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
}

.brand:visited,
.brand:hover,
.brand:active,
.brand:focus{
  text-decoration:none;
  color: inherit;
}

.brand:hover{
  background: rgba(0,0,0,.04);
}

.brand img{
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 12px;
}

.brand .name{
  font-weight: 900;
  letter-spacing: .3px;
}

/* Top actions */
.top-actions{
  display:flex;
  align-items:center;
  gap: 14px;
}

.user{
  color: var(--muted);
  font-weight: 700;
}

/* Button-like submit in header + danger variants can override inline */
.btn-link{
  appearance: none;
  -webkit-appearance: none;
  background: var(--green-dark);
  border:none;
  color:#fff;
  padding: 9px 14px;
  border-radius: 12px;
  cursor:pointer;
  font-weight: 900;
  line-height: 1;
}

.btn-link:hover{ filter: brightness(.95); }

/* ---------------------------------
   Layout container + page wrapper
---------------------------------- */
.container{
  width: min(1300px, 100%);
  margin: 18px auto 40px;
  padding: 0 28px;
}

/* Grey rounded “page” wrapper under header
   NOTE: ensure base.html wraps content in <div class="page"> ... </div> */
.page{
  background:#eef1f3;
  border-radius: 28px;
  padding: 22px;
  box-shadow: 0 18px 50px rgba(0,0,0,.06);
}

/* ---------------------------------
   Links (global)
---------------------------------- */
a{
  color: inherit;
  text-decoration: none;
}

a:hover{
  text-decoration: underline;
}

.link,
.panel-header a{
  text-decoration: none;
  font-weight: 900;
  color: var(--green-dark);
}

.link:hover,
.panel-header a:hover{
  text-decoration: underline;
}

/* When links are in white cards/items, keep them readable */
.item a{
  text-decoration:none;
  font-weight: 900;
  color: var(--charcoal);
}

.item a:hover{
  text-decoration: underline;
}

/* ---------------------------------
   Messages
---------------------------------- */
.messages{
  margin: 0 0 18px;
  display:flex;
  flex-direction: column;
  gap:10px;
}

.message{
  background: rgba(46,125,50,.10);
  border: 1px solid rgba(46,125,50,.25);
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 700;
}

/* Optional message variants if you ever add tags/classes in templates */
.message.error{
  background: rgba(122,28,28,.10);
  border-color: rgba(122,28,28,.28);
}

.message.warning{
  background: rgba(245, 158, 11, .12);
  border-color: rgba(245, 158, 11, .30);
}

/* ---------------------------------
   Panels & cards
---------------------------------- */
.panel{
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow:hidden;
  background:#fff;
}

.panel-header{
  padding: 16px 18px;
  border-bottom: 1px solid rgba(0,0,0,.08);
  display:flex;
  justify-content: space-between;
  align-items:center;
  gap: 12px;
}

.panel-header h1,
.panel-header h2{
  margin:0;
  font-size: 18px;
}

.panel-body{
  padding: 16px 18px;
}

.grid{
  display:grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
  margin-top: 18px;
}

.card{
  background:#fff;
  border-radius: 18px;
  box-shadow: var(--card-shadow);
  padding: 16px;
}

.list{
  display:flex;
  flex-direction: column;
  gap: 10px;
}

.item{
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.08);
  background:#fff;
}

.item--accent{
  border-left: 6px solid rgba(46,125,50,.55);
}

.badges{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
}

.badge{
  background: rgba(0,0,0,.06);
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.muted{
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

/* ---------------------------------
   Buttons
---------------------------------- */
.btn{
  display:inline-block;
  background: var(--green);
  color:#fff;
  text-decoration:none;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 900;
  border: none;
  cursor: pointer;
  line-height: 1;
}

.btn:hover{ filter: brightness(.95); }

/* Ghost button (used on hero overlays) */
.btn.ghost{
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.26);
  color:#fff;
}

.btn.ghost:hover{
  filter: brightness(.98);
}



/* Ghost button for white backgrounds (optional, handy on pages) */
.btn.ghost-dark{
  background: rgba(0,0,0,.06);
  border: 1px solid rgba(0,0,0,.12);
  color: var(--charcoal);
}

.btn.ghost-dark:hover{
  filter: brightness(.98);
}

/* ---------------------------------
   Global form controls
---------------------------------- */
input, select, textarea{
  width:100%;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.18);
  background:#fff;
  color: var(--charcoal);
  outline: none;
}

input:focus, select:focus, textarea:focus{
  border-color: rgba(27,94,32,.75);
  box-shadow: 0 0 0 4px rgba(27,94,32,.18);
}

/* Make readonly inputs look intentional */
input[readonly]{
  background: rgba(0,0,0,.03);
}

/* ---------------------------------
   Home hero
---------------------------------- */
.home-hero{
  border-radius: var(--radius);
  overflow:hidden;
  box-shadow: var(--shadow);
  min-height: 260px;
  background:
    linear-gradient(90deg, rgba(0,0,0,.60), rgba(0,0,0,.15)),
    url("../img/home-hero.jpg");
  background-size: cover;
  background-position: center;
}

.home-hero__overlay{
  min-height: 260px;
  padding: 28px;
  display:flex;
  align-items:flex-end;
}

.home-hero__copy{
  max-width: 720px;
  color:#fff;
}

.home-hero__copy h1{
  margin:0;
  font-size: 46px;
  font-weight: 900;
  line-height: 1.05;
}

.home-hero__copy p{
  margin:10px 0 0;
  color: rgba(255,255,255,.92);
  font-size: 15px;
  line-height: 1.4;
}

.home-hero__actions{
  margin-top: 16px;
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ---------------------------------
   Stokvel profile hero
---------------------------------- */
.stokvel-hero{
  border-radius: var(--radius);
  overflow:hidden;
  box-shadow: var(--shadow);
  min-height: 220px;
  background:
    linear-gradient(90deg, rgba(27,94,32,.85), rgba(0,0,0,.25)),
    url("../img/create_stokvel-hero.jpg");
  background-size: cover;
  background-position: center;
}

.stokvel-hero__overlay{
  min-height: 220px;
  padding: 22px;
  display:flex;
  align-items:flex-end;
}

.stokvel-hero__copy{
  color:#fff;
  max-width: 820px;
}

.stokvel-hero__copy h2{
  margin:0;
  font-size: 34px;
  font-weight: 900;
  line-height: 1.1;
}

.stokvel-hero__copy p{
  margin:10px 0 0;
  color: rgba(255,255,255,.92);
  font-size: 14px;
  line-height: 1.4;
}

.stokvel-hero__stats{
  margin-top: 14px;
  display:flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---------------------------------
   About page hero
---------------------------------- */
.about-hero{
  border-radius: var(--radius);
  overflow:hidden;
  box-shadow: var(--shadow);
  min-height: 260px;
  background:
    linear-gradient(90deg, rgba(0,0,0,.55), rgba(0,0,0,.18)),
    url("../img/aboutus-hero.jpg");
  background-size: cover;
  background-position: center;
}

.about-hero__overlay{
  min-height: 260px;
  padding: 28px;
  display:flex;
  align-items:flex-end;
}

.about-hero__copy{
  max-width: 820px;
  color:#fff;
}

.about-hero__copy h1{
  margin:0;
  font-size: 46px;
  font-weight: 900;
  line-height: 1.05;
}

.about-hero__copy p{
  margin:10px 0 0;
  color: rgba(255,255,255,.92);
  font-size: 15px;
  line-height: 1.4;
}

/* ---------------------------------
   Stats blocks
---------------------------------- */
.stat{
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 14px;
  padding: 10px 12px;
  min-width: 190px;
}

.stat-title{
  font-size: 12px;
  opacity: .92;
  font-weight: 800;
}

.stat-value{
  margin-top: 4px;
  font-size: 14px;
  font-weight: 900;
}

/* ---------------------------------
   Checkbox row helpers (create stokvel page)
---------------------------------- */
.checkbox-row{
  display:flex;
  align-items:center;
  gap:10px;
  cursor:pointer;
  user-select:none;
}

.checkbox-row input[type="checkbox"]{
  width:18px;
  height:18px;
  margin:0;
  accent-color: var(--green);
}

.bank-fields{
  margin-top: 6px;
}

/* ---------------------------------
   Responsive
---------------------------------- */
@media (max-width: 980px){
  .container{ padding: 0 16px; }
  .topbar{ padding: 10px 16px; }
  .page{ padding: 16px; border-radius: 22px; }
  .grid{ grid-template-columns: 1fr; }
  .home-hero__copy h1{ font-size: 34px; }
}

/* Force single-column layouts on phones (prevents right-side cut off) */
@media (max-width: 600px){
  .grid{
    grid-template-columns: 1fr !important;
  }
  .grid > *{
    min-width: 0; /* allows cards to shrink instead of overflowing */
  }
}