:root{
 --bg:#f3f7f5;--card:#fff;--ink:#172b27;--muted:#687b75;--line:#dce8e2;
 --accent:#087f65;--accent2:#075c4b;--accent-soft:#e1f5ed;--gold:#e5ad42;--danger:#b42318;--warn:#b54708;--ok:#067647;
 --shadow:0 12px 32px rgba(20,66,53,.07);--radius:18px
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;background:radial-gradient(ellipse at 10% 0%,rgba(209,239,225,.55),transparent 35%),var(--bg);color:var(--ink);line-height:1.55}
a{color:var(--accent);text-decoration:none;transition:color .18s ease}
a:hover{color:var(--accent2)}
.topbar,.public-head{min-height:72px;background:rgba(255,255,255,.94);border-bottom:1px solid rgba(220,232,226,.9);display:flex;align-items:center;justify-content:space-between;padding:12px 28px;position:sticky;top:0;z-index:20;backdrop-filter:blur(14px)}
.brand{font-weight:850;font-size:21px;letter-spacing:-.6px;color:var(--accent2);display:inline-flex;align-items:center;gap:10px}
.brand:before{content:"M";display:inline-grid;place-items:center;width:36px;height:36px;border-radius:12px;color:#fff;font-size:17px;font-weight:900;background:linear-gradient(145deg,var(--accent),var(--accent2));box-shadow:0 5px 12px rgba(8,127,101,.22)}
.tagline{font-size:12px;color:var(--muted);letter-spacing:.15px;margin-top:1px}
.userbox{font-size:13px;color:var(--muted);display:flex;align-items:center;gap:10px}.userbox a{margin-left:5px;font-weight:750;background:#fff2e9;color:#a34b1c;padding:8px 12px;border-radius:10px}.userbox a:hover{background:#ffe3d0}
.app-shell{display:flex;min-height:calc(100vh - 72px)}
.sidebar{width:246px;flex-shrink:0;background:linear-gradient(180deg,#fff 0%,#f8fcfa 100%);border-right:1px solid var(--line);padding:20px 14px;position:sticky;top:72px;height:calc(100vh - 72px);overflow:auto}
.sidebar nav{display:flex;flex-direction:column;gap:5px}.sidebar a{display:flex;align-items:center;gap:10px;padding:11px 13px;border-radius:12px;color:#47635a;margin:0;font-size:13px;font-weight:650;transition:background .18s,color .18s,transform .18s}.sidebar a:hover{background:var(--accent-soft);color:var(--accent2);transform:translateX(2px)}.sidebar a.active{background:linear-gradient(110deg,#dff5eb,#effaf5);color:var(--accent2);box-shadow:inset 3px 0 var(--accent)}
.navgroup{font-size:10px;font-weight:850;letter-spacing:1.2px;text-transform:uppercase;color:#9aaba4;padding:20px 12px 6px}
.content{flex:1;padding:30px;min-width:0}.container{max-width:1180px;margin:0 auto;padding:30px 24px}
.page-title{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0 0 22px}.page-title h1{font-size:clamp(23px,2.5vw,30px);line-height:1.2;letter-spacing:-.8px;margin:0;color:#173e33}.page-title h1:after{content:"";display:block;width:42px;height:4px;border-radius:4px;background:linear-gradient(90deg,var(--accent),var(--gold));margin-top:10px}
.card{background:var(--card);border:1px solid rgba(220,232,226,.95);border-radius:var(--radius);padding:22px;margin-bottom:18px;box-shadow:var(--shadow)}.card h2,.card h3{margin-top:0;color:#174738;letter-spacing:-.3px}.card>strong{color:#174738}
.grid{display:grid;gap:18px}.grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.kpi{position:relative;overflow:hidden;padding:24px;background:linear-gradient(145deg,#fff 55%,#f0faf5);border-top:3px solid var(--accent)}.kpi:nth-child(2){border-top-color:#e3a634;background:linear-gradient(145deg,#fff 55%,#fff9e9)}.kpi:nth-child(3){border-top-color:#5b8def;background:linear-gradient(145deg,#fff 55%,#f0f5ff)}.kpi:after{content:"";position:absolute;width:105px;height:105px;border-radius:50%;right:-35px;top:-36px;background:rgba(8,127,101,.06)}.kpi strong{display:block;font-size:clamp(22px,2.4vw,30px);letter-spacing:-.8px;margin:9px 0 5px;color:#123f32;overflow-wrap:anywhere}.kpi small{font-size:11px;color:var(--muted)}.muted{color:var(--muted)}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;border:0;border-radius:10px;padding:10px 15px;background:linear-gradient(135deg,var(--accent),var(--accent2));color:#fff;cursor:pointer;font:inherit;font-size:13px;font-weight:750;box-shadow:0 4px 10px rgba(8,127,101,.13);transition:transform .16s,box-shadow .16s,filter .16s}.btn:hover{color:#fff;filter:brightness(1.06);transform:translateY(-1px);box-shadow:0 7px 16px rgba(8,127,101,.2)}.btn.secondary{background:#536b63}.btn.danger{background:linear-gradient(135deg,#d64545,#a61b1b)}.btn.ghost{background:#fff;color:var(--accent2);border:1px solid #cfe3d9;box-shadow:none}.btn.ghost:hover{background:var(--accent-soft)}.btn.small{padding:6px 10px;font-size:12px;border-radius:8px}.actions{display:flex;gap:7px;flex-wrap:wrap}
.form-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.field{margin-bottom:16px}.field label{display:block;font-size:13px;font-weight:750;margin-bottom:7px;color:#294a40}.field input,.field select,.field textarea{width:100%;padding:12px 13px;border:1px solid #ceded6;border-radius:11px;background:#fbfdfc;color:var(--ink);font:inherit;font-size:14px;outline:none;transition:border-color .15s,box-shadow .15s}.field input:focus,.field select:focus,.field textarea:focus{border-color:var(--accent);box-shadow:0 0 0 4px rgba(8,127,101,.11);background:#fff}.field textarea{min-height:100px}.hint{font-size:12px;color:var(--muted);margin-top:5px}
.table-wrap{overflow:auto;border:1px solid var(--line);border-radius:12px}.table{width:100%;border-collapse:separate;border-spacing:0;font-size:13px;background:#fff}.table th,.table td{padding:12px 13px;border-bottom:1px solid #e8efeb;text-align:left;vertical-align:top}.table th{font-size:10px;letter-spacing:.7px;text-transform:uppercase;color:#5d766c;background:#f1f8f4;white-space:nowrap}.table tr:last-child td{border-bottom:0}.table tbody tr:hover{background:#f8fcfa}
.badge{display:inline-block;padding:4px 9px;border-radius:999px;font-size:11px;font-weight:750;background:#edf2ef;color:#475e54}.badge.success{background:#dff7e9;color:#087443}.badge.warning{background:#fff1cb;color:#8c5100}.badge.danger{background:#ffe5e2;color:#a3271e}
.alert{padding:13px 15px;border-radius:12px;margin-bottom:14px;background:#eef4f1;border:1px solid #dbe8e1;font-size:13px}.alert.success{background:#e8f9ee;color:#05603a;border-color:#c3ebd0}.alert.danger{background:#fff0ee;color:#912018;border-color:#ffd3cd}.alert.warning{background:#fff8e4;color:#93370d;border-color:#f5e1a5}
.footer{text-align:center;padding:24px;color:#8b9c94;font-size:11px}.login-wrap{max-width:460px;margin:6vh auto 3vh;position:relative}.login-wrap:before{content:"";position:absolute;z-index:-1;width:260px;height:260px;border-radius:50%;background:rgba(229,173,66,.16);filter:blur(2px);top:-55px;left:-85px}.login-wrap:after{content:"";position:absolute;z-index:-1;width:220px;height:220px;border-radius:50%;background:rgba(8,127,101,.12);bottom:-55px;right:-70px;filter:blur(2px)}.login-brand{text-align:center;margin-bottom:24px}.login-brand .brand{font-size:34px;justify-content:center}.login-brand .brand:before{width:48px;height:48px;border-radius:16px;font-size:22px}.login-brand .tagline{font-size:13px;margin-top:8px}.login-wrap .card{padding:30px;border-radius:22px;box-shadow:0 22px 65px rgba(22,69,54,.12)}.login-wrap .card h2{font-size:23px;margin:0 0 5px}.login-wrap .card h2+form,.login-wrap .card form{margin-top:22px}.login-wrap .field input{padding:13px 14px}.login-wrap form .btn{min-height:44px}.login-wrap .btn.ghost{margin-left:5px}
.public-hero{background:linear-gradient(120deg,#075c4b 0%,#087f65 58%,#36a77d 100%);color:#fff;border:0;border-radius:22px;padding:34px;margin-bottom:22px;box-shadow:0 16px 35px rgba(8,95,72,.18);position:relative;overflow:hidden}.public-hero:after{content:"";position:absolute;width:240px;height:240px;right:-45px;top:-90px;border:35px solid rgba(255,255,255,.09);border-radius:50%}.public-hero h2{position:relative;z-index:1;margin:0 0 8px;font-size:clamp(26px,4vw,38px);letter-spacing:-1px;color:#fff}.public-hero p{position:relative;z-index:1;max-width:680px;color:#e5f6ee}.photos{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:12px}.photos img{width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:12px;border:1px solid var(--line);box-shadow:0 5px 15px rgba(20,66,53,.08)}.allocation-row{display:grid;grid-template-columns:1fr 1fr auto;gap:8px;align-items:end;margin-bottom:9px}.navtoggle{display:none}.nowrap{white-space:nowrap}.right{text-align:right}.code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;background:#edf5f0;padding:3px 6px;border-radius:5px;color:#275648}
@media(max-width:1000px){.sidebar{width:220px}.content{padding:22px}.grid-3{gap:13px}.kpi{padding:18px}}
@media(max-width:800px){.grid-3,.grid-2,.form-row{grid-template-columns:1fr}.topbar{padding:10px 14px;min-height:66px}.topbar .brand{font-size:18px}.topbar .brand:before{width:32px;height:32px}.sidebar{position:fixed;left:-260px;top:66px;z-index:30;transition:left .22s;height:calc(100vh - 66px);box-shadow:12px 0 28px rgba(20,66,53,.08)}.navopen .sidebar{left:0}.navtoggle{display:block;border:1px solid var(--line);background:#f3faf6;color:var(--accent2);border-radius:9px;font-size:20px;width:38px;height:38px;cursor:pointer}.content{padding:18px 13px}.userbox{font-size:11px;gap:4px}.userbox a{padding:7px 8px}.public-head{padding:10px 14px}.container{padding:20px 13px}.page-title{margin-bottom:17px}.page-title h1{font-size:24px}.card{padding:17px;border-radius:15px}.kpi strong{font-size:26px}.allocation-row{grid-template-columns:1fr 1fr}.allocation-row button{grid-column:1/-1}.table{font-size:12px}.table th,.table td{padding:10px}.login-wrap{margin:5vh auto 2vh}.login-wrap .card{padding:22px}.login-brand .brand{font-size:30px}}
@media(max-width:420px){.topbar .tagline{display:none}.userbox{max-width:145px;flex-wrap:wrap;justify-content:flex-end}.login-wrap .btn{width:100%;margin:0 0 8px!important}.public-hero{padding:25px 21px}}
@media print{.sidebar,.topbar,.footer,.no-print,.btn{display:none!important}.content,.container{padding:0}.card{border:0;box-shadow:none}.app-shell{display:block}body{background:#fff}}


/* =========================================
   MATAHATIKU — MODERN UI THEME
   Emerald Green • White • Warm Gold
   ========================================= */

:root {
  --mh-primary: #087f5b;
  --mh-primary-dark: #066548;
  --mh-primary-light: #e6f5ee;
  --mh-accent: #e8a23b;
  --mh-bg: #f4f7f6;
  --mh-surface: #ffffff;
  --mh-text: #20332c;
  --mh-muted: #74847c;
  --mh-border: #e2ebe6;
  --mh-danger: #c0392b;
  --mh-radius: 16px;
  --mh-shadow: 0 5px 20px rgba(22, 65, 47, .06);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--mh-bg);
  color: var(--mh-text);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.65;
}

a {
  color: var(--mh-primary);
  text-decoration: none;
  transition: color .2s ease;
}

a:hover {
  color: var(--mh-primary-dark);
}

h1, h2, h3, h4 {
  color: var(--mh-text);
  line-height: 1.3;
  letter-spacing: -.3px;
}

h1 { font-size: 27px; }
h2 { font-size: 23px; }
h3 { font-size: 18px; }

.container {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 28px 0;
}

.muted {
  color: var(--mh-muted);
}

/* BRAND */

.brand {
  color: var(--mh-primary);
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -.8px;
}

.tagline {
  color: var(--mh-muted);
  font-size: 12px;
  letter-spacing: .2px;
}

/* BUTTONS */

.btn,
button.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 18px;
  border: 1px solid var(--mh-primary);
  border-radius: 10px;
  background: var(--mh-primary);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s, box-shadow .2s, transform .2s;
}

.btn:hover,
button.btn:hover {
  background: var(--mh-primary-dark);
  color: #fff;
  box-shadow: 0 5px 12px rgba(8, 127, 91, .16);
  transform: translateY(-1px);
}

.btn.ghost {
  border-color: var(--mh-border);
  background: #fff;
  color: var(--mh-primary);
}

.btn.ghost:hover {
  background: var(--mh-primary-light);
}

/* CARDS */

.card {
  margin: 0 0 22px;
  padding: 24px;
  border: 1px solid var(--mh-border);
  border-radius: var(--mh-radius);
  background: var(--mh-surface);
  box-shadow: var(--mh-shadow);
}

.card h3:first-child {
  margin-top: 0;
}

.grid {
  display: grid;
  gap: 20px;
  margin: 22px 0;
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.kpi {
  position: relative;
  overflow: hidden;
  min-height: 142px;
  padding: 24px;
}

.kpi::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--mh-primary);
  content: "";
}

.kpi span,
.kpi .muted {
  display: block;
  margin-bottom: 10px;
  font-size: 13px;
}

.kpi strong {
  display: block;
  color: var(--mh-primary);
  font-size: clamp(21px, 2.3vw, 30px);
  font-weight: 800;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.kpi small {
  color: var(--mh-muted);
}

/* PUBLIC PORTAL */

.public-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px max(24px, calc((100% - 1180px) / 2));
  border-bottom: 1px solid var(--mh-border);
  background: #fff;
}

.public-head .brand {
  font-size: 24px;
}

.public-hero {
  position: relative;
  overflow: hidden;
  margin: 25px 0;
  padding: clamp(28px, 5vw, 52px);
  border-radius: 22px;
  background: linear-gradient(125deg, #066548 0%, #087f5b 60%, #17a673 100%);
  color: #fff;
  box-shadow: 0 12px 28px rgba(6, 101, 72, .17);
}

.public-hero::after {
  position: absolute;
  right: -45px;
  bottom: -110px;
  width: 250px;
  height: 250px;
  border: 35px solid rgba(255,255,255,.08);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.public-hero h2 {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 0 14px;
  color: #fff;
  font-size: clamp(25px, 4vw, 38px);
}

.public-hero p {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin-bottom: 0;
  color: rgba(255,255,255,.88);
  font-size: 15px;
}

/* LOGIN */

.login-wrap {
  width: min(460px, 100%);
  margin: 38px auto;
}

.login-brand {
  margin-bottom: 28px;
  text-align: center;
}

.login-brand .brand {
  font-size: 34px;
}

.login-wrap .card {
  padding: clamp(24px, 5vw, 38px);
}

.login-wrap .card h2 {
  margin-top: 0;
}

/* FORMS */

.field {
  margin: 20px 0;
}

.field label {
  display: block;
  margin-bottom: 7px;
  color: var(--mh-text);
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 43px;
  padding: 11px 13px;
  border: 1px solid #d8e3dc;
  border-radius: 9px;
  outline: none;
  background: #fff;
  color: var(--mh-text);
  font: inherit;
  transition: border .2s, box-shadow .2s;
}

textarea {
  min-height: 110px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--mh-primary);
  box-shadow: 0 0 0 3px rgba(8, 127, 91, .1);
}

input[type="checkbox"],
input[type="radio"] {
  width: auto;
  min-height: auto;
}

/* ADMIN HEADER AND SIDEBAR */

.topbar {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 72px;
  padding: 14px 28px;
  border-bottom: 1px solid var(--mh-border);
  background: rgba(255,255,255,.96);
  box-shadow: 0 2px 10px rgba(22,65,47,.03);
}

.topbar .brand {
  font-size: 22px;
}

.userbox {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--mh-muted);
  font-size: 13px;
}

.userbox a {
  padding: 7px 12px;
  border-radius: 8px;
  background: #fff0ed;
  color: var(--mh-danger);
  font-weight: 700;
}

.app-shell {
  display: grid;
  grid-template-columns: 245px minmax(0, 1fr);
  min-height: calc(100vh - 72px);
}

.sidebar {
  padding: 25px 16px;
  border-right: 1px solid var(--mh-border);
  background: #fff;
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.sidebar nav a {
  display: block;
  padding: 11px 14px;
  border-radius: 9px;
  color: #52665c;
  font-weight: 600;
  transition: background .2s, color .2s;
}

.sidebar nav a:hover {
  background: var(--mh-primary-light);
  color: var(--mh-primary);
}

.sidebar nav a.active {
  background: var(--mh-primary-light);
  color: var(--mh-primary-dark);
  font-weight: 800;
}

.navgroup {
  margin: 20px 12px 6px;
  color: var(--mh-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.content {
  min-width: 0;
  padding: 30px;
}

.page-title {
  margin-bottom: 24px;
}

.page-title h1 {
  margin: 0;
  font-size: 28px;
}

.navtoggle {
  display: none;
}

/* TABLES */

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--mh-border);
  border-radius: 10px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

.table th,
.table td {
  padding: 14px 16px;
  border-bottom: 1px solid #edf1ee;
  text-align: left;
  vertical-align: middle;
}

.table th {
  background: #f1f7f3;
  color: #4d6659;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.table td {
  color: #35483e;
}

.table tr:last-child td {
  border-bottom: 0;
}

.table tr:hover td {
  background: #fafcfb;
}

.right {
  text-align: right !important;
}

/* ALERTS AND BADGES */

.alert {
  margin: 16px 0;
  padding: 13px 16px;
  border: 1px solid #d8e9de;
  border-radius: 10px;
  background: #edf8f0;
  color: #24633e;
}

.alert.danger {
  border-color: #f2d0ca;
  background: #fff0ed;
  color: #a52d20;
}

.alert.warning {
  border-color: #f2dfb6;
  background: #fff8e8;
  color: #8c6219;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: #edf1ef;
  color: #53655b;
  font-size: 11px;
  font-weight: 800;
}

.badge.success {
  background: #e4f6e9;
  color: #207441;
}

.badge.warning {
  background: #fff1cf;
  color: #8c6219;
}

.badge.danger {
  background: #ffebe7;
  color: #a52d20;
}

/* PHOTOS AND FOOTER */

.photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.photos a {
  overflow: hidden;
  display: block;
  border-radius: 12px;
  background: #edf2ee;
}

.photos img {
  display: block;
  width: 100%;
  height: 155px;
  object-fit: cover;
  transition: transform .25s;
}

.photos a:hover img {
  transform: scale(1.04);
}

.footer {
  padding: 24px 16px;
  color: var(--mh-muted);
  font-size: 12px;
  text-align: center;
}

/* RESPONSIVE */

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 205px minmax(0, 1fr);
  }

  .content {
    padding: 22px;
  }

  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar {
    padding: 12px 18px;
  }
}

@media (max-width: 640px) {
  .container {
    width: calc(100% - 24px);
    padding: 16px 0;
  }

  .public-head {
    padding: 14px;
  }

  .public-head .brand {
    font-size: 20px;
  }

  .public-head .tagline {
    max-width: 210px;
    font-size: 10px;
  }

  .public-head .btn {
    min-height: 38px;
    padding: 8px 10px;
    font-size: 11px;
    white-space: nowrap;
  }

  .public-hero {
    margin: 15px 0;
    padding: 28px 22px;
    border-radius: 16px;
  }

  .grid {
    gap: 12px;
    margin: 16px 0;
  }

  .grid-3 {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 18px;
    margin-bottom: 16px;
    border-radius: 13px;
  }

  .kpi {
    min-height: 110px;
    padding: 19px;
  }

  .topbar {
    flex-wrap: wrap;
    gap: 10px;
    min-height: 62px;
  }

  .topbar .brand {
    font-size: 19px;
  }

  .navtoggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--mh-border);
    border-radius: 9px;
    background: #fff;
    color: var(--mh-primary);
    font-size: 21px;
    cursor: pointer;
  }

  .userbox {
    width: 100%;
    justify-content: space-between;
    font-size: 12px;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    display: none;
    padding: 12px;
    border-right: 0;
    border-bottom: 1px solid var(--mh-border);
  }

  body.navopen .sidebar {
    display: block;
  }

  .content {
    padding: 18px 12px;
  }

  .page-title h1 {
    font-size: 24px;
  }

  .login-wrap {
    margin: 20px auto;
  }

  .login-brand .brand {
    font-size: 30px;
  }

  .table th,
  .table td {
    padding: 11px 12px;
    font-size: 12px;
  }

  .photos {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


/* MATAHATIKU - Header Portal Publik */
.public-head {
    background: linear-gradient(135deg, #064e3b, #047857) !important;
    color: #ffffff !important;
    padding: 24px 5%;
    border-bottom: 4px solid #d4af37;
    box-shadow: 0 5px 18px rgba(6, 78, 59, 0.18);
}

.public-head .brand {
    color: #ffffff !important;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.public-head .tagline {
    color: #d1fae5 !important;
    margin-top: 5px;
}

.public-head .btn.ghost {
    background: #ffffff !important;
    color: #065f46 !important;
    border: 1px solid #d4af37;
    border-radius: 10px;
    font-weight: 700;
}

.public-head .btn.ghost:hover {
    background: #ecfdf5 !important;
}

@media (max-width: 600px) {
    .public-head {
        padding: 18px 5%;
        gap: 14px;
        flex-wrap: wrap;
    }

    .public-head .brand {
        font-size: 23px;
    }
}


/* ==========================================
   MATAHATIKU - DESAIN PORTAL PUBLIK
   ========================================== */

:root {
    --mata-green: #047857;
    --mata-dark: #064e3b;
    --mata-light: #ecfdf5;
    --mata-gold: #d4af37;
    --mata-text: #24352e;
    --mata-muted: #64756c;
}

/* Latar dan teks utama */
body {
    color: var(--mata-text);
    background: #f4f8f5;
    line-height: 1.65;
}

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

/* Bagian pembuka portal */
.public-hero {
    position: relative;
    overflow: hidden;
    margin: 28px 0;
    padding: 42px 36px;
    border-radius: 20px;
    background: linear-gradient(135deg, #064e3b, #047857);
    color: #ffffff;
    box-shadow: 0 12px 30px rgba(6, 78, 59, 0.13);
}

.public-hero h2 {
    margin: 0 0 12px;
    color: #ffffff;
    font-size: clamp(25px, 4vw, 38px);
    line-height: 1.25;
    letter-spacing: -0.5px;
}

.public-hero p {
    max-width: 760px;
    margin: 0;
    color: #d1fae5;
    font-size: 16px;
}

/* Kartu ringkasan */
.grid {
    gap: 22px;
}

.card {
    background: #ffffff;
    border: 1px solid #e4eee7;
    border-radius: 16px;
    box-shadow: 0 5px 18px rgba(23, 60, 42, 0.055);
    padding: 24px;
    margin-bottom: 22px;
}

.kpi {
    position: relative;
    overflow: hidden;
    border-top: 4px solid var(--mata-green);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.kpi:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 26px rgba(23, 60, 42, 0.10);
}

.kpi strong {
    display: block;
    margin: 8px 0 4px;
    color: var(--mata-dark);
    font-size: clamp(23px, 3vw, 32px);
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.kpi .muted,
.muted {
    color: var(--mata-muted);
}

.kpi small {
    color: var(--mata-green);
}

/* Judul bagian */
.container > h2 {
    margin: 34px 0 18px;
    color: var(--mata-dark);
    font-size: 25px;
}

.card h3 {
    margin-top: 0;
    margin-bottom: 16px;
    color: var(--mata-dark);
    font-size: 20px;
}

/* Tabel penyaluran */
.table-wrap {
    width: 100%;
    overflow-x: auto;
    border-radius: 10px;
}

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #ffffff;
}

.table th {
    padding: 15px 16px;
    background: var(--mata-dark);
    color: #ffffff;
    font-weight: 700;
    text-align: left;
    white-space: nowrap;
}

.table td {
    padding: 14px 16px;
    border-bottom: 1px solid #e8f0ea;
    vertical-align: middle;
}

.table tbody tr:nth-child(even),
.table tr:nth-child(even) {
    background: #f6fbf7;
}

.table tr:last-child td {
    border-bottom: none;
}

.table td.right,
.table th.right {
    text-align: right;
}

/* Kartu kegiatan terpublikasi */
article.card {
    border-left: 4px solid var(--mata-gold);
}

article.card h3 {
    margin-bottom: 10px;
}

article.card p {
    margin: 8px 0;
}

article.card p b {
    color: var(--mata-green);
}

/* Dokumentasi foto */
.photos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.photos a {
    display: block;
    overflow: hidden;
    border-radius: 12px;
    background: var(--mata-light);
}

.photos img {
    display: block;
    width: 100%;
    height: 190px;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.photos a:hover img {
    transform: scale(1.04);
}

/* Tombol dan tautan */
.btn {
    border-radius: 10px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

/* Laporan publik */
.card a.btn.ghost {
    display: inline-block;
    max-width: 100%;
    white-space: normal;
    line-height: 1.5;
    text-align: left;
    border-color: #d4e7d9;
    color: var(--mata-dark);
    background: #f7fbf8;
}

.card a.btn.ghost:hover {
    background: var(--mata-light);
}

/* Bagian bawah */
.footer {
    margin-top: 48px;
    padding: 24px 16px;
    border-top: 1px solid #dce9df;
    background: #ffffff;
    color: var(--mata-muted);
    text-align: center;
    font-size: 13px;
}

/* Tampilan ponsel */
@media (max-width: 700px) {
    .container {
        width: 94%;
    }

    .public-hero {
        margin: 20px 0;
        padding: 28px 22px;
        border-radius: 15px;
    }

    .public-hero p {
        font-size: 14px;
    }

    .grid {
        gap: 14px;
    }

    .card {
        padding: 18px;
        margin-bottom: 16px;
        border-radius: 13px;
    }

    .container > h2 {
        font-size: 22px;
    }

    .table th,
    .table td {
        padding: 12px;
        font-size: 13px;
    }

    .photos {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .photos img {
        height: 145px;
    }
}


.site-logo {
    display: block;
    width: auto;
    max-width: 240px;
    height: 64px;
    object-fit: contain;
}

@media (max-width: 600px) {
    .site-logo {
        max-width: 190px;
        height: 52px;
    }
}


/* Header portal MATAHATIKU - versi terang */
.public-head {
    background: #ffffff !important;
    color: #064e3b !important;
    padding: 20px 5%;
    border-bottom: 4px solid #d4af37;
    box-shadow: 0 5px 18px rgba(6, 78, 59, 0.10);
}

.public-head .brand {
    color: #064e3b !important;
}

.public-head .tagline {
    color: #047857 !important;
}

.public-head .site-logo {
    display: block;
    width: auto;
    max-width: 240px;
    height: 64px;
    object-fit: contain;
}

.public-head .btn.ghost {
    background: #064e3b !important;
    color: #ffffff !important;
    border: 1px solid #064e3b;
    border-radius: 10px;
}

.public-head .btn.ghost:hover {
    background: #047857 !important;
    color: #ffffff !important;
}

@media (max-width: 600px) {
    .public-head {
        padding: 16px 5%;
        gap: 14px;
        flex-wrap: wrap;
    }

    .public-head .site-logo {
        max-width: 190px;
        height: 52px;
    }
}

/* Posisi tagline tepat di bawah tulisan logo */
.public-head .brand-area {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.public-head .site-logo {
    display: block;
    width: auto;
    max-width: 240px;
    height: 64px;
    object-fit: contain;
}

.public-head .tagline {
    margin-top: 1px;
    margin-left: 60px; /* Geser ke kanan 35 piksel */
    color: #047857 !important;
    font-size: 13px;
}

@media (max-width: 600px) {
    .public-head .site-logo {
        max-width: 190px;
        height: 52px;
    }

    .public-head .tagline {
        margin-left: 25px;
        font-size: 11px;
    }
}


/* ===== HALAMAN LOGIN MATAHATIKU ===== */

.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #ecfdf5, #f5f8f6 55%, #fff9e8);
}

.login-page .container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 35px;
    padding-bottom: 35px;
}

.login-wrap {
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
}

.login-brand {
    text-align: center;
    margin-bottom: 25px;
}

.login-logo {
    display: block;
    width: auto;
    max-width: 100%;
    height: 200px;
    object-fit: contain;
    margin: 0 auto;
}

.login-brand .tagline {
    margin-top: 1px;
     margin-left: 60px; /* Geser ke kanan 35 piksel */
    color: #047857;
    font-size: 14px;
    font-weight: 600;
}

.login-card {
    padding: 32px;
    border: 1px solid #dcece1;
    border-top: 4px solid #047857;
    border-radius: 18px;
    box-shadow: 0 15px 40px rgba(6, 78, 59, 0.10);
}

.login-card h2 {
    color: #064e3b;
    margin-top: 0;
    margin-bottom: 8px;
}

.login-card form {
    margin-top: 24px;
}

.login-card .field {
    margin-bottom: 18px;
}

.login-card input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #d5e3d9;
    border-radius: 10px;
    padding: 12px 14px;
    background: #fbfdfb;
}

.login-card input:focus {
    outline: none;
    border-color: #047857;
    box-shadow: 0 0 0 3px rgba(4, 120, 87, 0.12);
}

.login-submit,
.login-portal {
    display: inline-block;
    box-sizing: border-box;
    text-align: center;
    margin-top: 8px;
}

.login-submit {
    width: 100%;
    background: #047857;
    color: #fff;
    border: 1px solid #047857;
    font-weight: 700;
}

.login-submit:hover {
    background: #065f46;
}

.login-portal {
    width: 100%;
    margin-top: 12px;
    background: #fff;
    color: #065f46;
    border: 1px solid #b9d9c4;
}

.login-footer {
    text-align: center;
    margin-top: 22px;
    color: #64756c;
    font-size: 12px;
}

@media (max-width: 500px) {
    .login-logo {
        height: 70px;
        max-width: 95%;
    }

    .login-card {
        padding: 23px 19px;
    }
}


/* =========================================
   DASHBOARD MATAHATIKU
   ========================================= */

.dashboard-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    overflow: hidden;
    margin: 10px 0 32px;
    padding: 38px 36px;
    border-radius: 20px;
    color: #fff;
    background: linear-gradient(120deg, #064e3b, #047857 70%, #0d946b);
    box-shadow: 0 12px 30px rgba(6, 78, 59, .15);
}

.dashboard-hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
}

.dashboard-eyebrow {
    display: inline-block;
    margin-bottom: 12px;
    color: #d6f5e3;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
}

.dashboard-hero h2 {
    margin: 0 0 12px;
    color: #fff;
    font-size: clamp(25px, 3vw, 35px);
    line-height: 1.3;
}

.dashboard-hero p {
    max-width: 600px;
    margin: 0;
    color: #e1f5e9;
    font-size: 15px;
    line-height: 1.8;
}

.dashboard-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 25px;
}

.dashboard-hero-actions .btn {
    display: inline-block;
    padding: 11px 17px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.dashboard-primary-btn {
    background: #d4af37;
    color: #173d2c !important;
    border: 1px solid #d4af37;
}

.dashboard-light-btn {
    background: rgba(255,255,255,.10);
    color: #fff !important;
    border: 1px solid rgba(255,255,255,.55);
}

.dashboard-hero-decoration {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 150px;
    height: 150px;
    margin-right: 10px;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 50%;
    background: rgba(255,255,255,.07);
    box-shadow: 0 0 0 18px rgba(255,255,255,.035),
                0 0 0 38px rgba(255,255,255,.025);
}

.dashboard-hero-decoration span {
    color: #f1d778;
    font-size: 43px;
    font-weight: 900;
    letter-spacing: -3px;
}

.dashboard-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin: 0 0 18px;
}

.dashboard-section-heading h2 {
    margin: 0;
    color: #064e3b;
    font-size: 23px;
}

.dashboard-section-heading p {
    margin: 4px 0 0;
    color: #64756c;
    font-size: 13px;
}

.dashboard-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 11px;
    border: 1px solid #d3eadb;
    border-radius: 30px;
    background: #effaf2;
    color: #166534;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.dashboard-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #16a34a;
}

.dashboard-kpi-grid {
    gap: 20px;
    margin-bottom: 30px;
}

.dashboard-kpi {
    min-width: 0;
    padding: 24px;
    border: 1px solid #e1ece4;
    border-top: 4px solid #047857;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 5px 18px rgba(23,60,42,.045);
}

.dashboard-kpi-income {
    border-top-color: #059669;
}

.dashboard-kpi-out {
    border-top-color: #d4af37;
}

.dashboard-kpi-balance {
    border-top-color: #0f766e;
}

.dashboard-kpi-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.dashboard-kpi-label {
    color: #64756c;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.6;
}

.dashboard-kpi-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 11px;
    background: #ecfdf5;
    color: #047857;
    font-size: 21px;
    font-weight: 800;
}

.dashboard-kpi-out .dashboard-kpi-icon {
    background: #fff8df;
    color: #997515;
}

.dashboard-kpi strong {
    display: block;
    margin: 17px 0;
    color: #064e3b;
    font-size: clamp(19px, 2vw, 27px);
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.dashboard-kpi-bottom {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #78877e;
    font-size: 11px;
    line-height: 1.5;
}

.dashboard-kpi-line {
    width: 20px;
    height: 3px;
    flex-shrink: 0;
    border-radius: 5px;
    background: #059669;
}

.dashboard-kpi-out .dashboard-kpi-line {
    background: #d4af37;
}

.dashboard-lower-grid {
    gap: 20px;
    align-items: stretch;
}

.dashboard-info-card {
    padding: 26px;
    border: 1px solid #e1ece4;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 5px 18px rgba(23,60,42,.045);
}

.dashboard-card-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.dashboard-card-overline {
    color: #0d946b;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.dashboard-card-heading h3 {
    margin: 5px 0 0;
    color: #064e3b;
    font-size: 19px;
}

.dashboard-program-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #ecfdf5;
    color: #047857;
    font-size: 23px;
}

.dashboard-program-count {
    margin-top: 24px;
    color: #047857;
    font-size: 42px;
    font-weight: 800;
    line-height: 1.2;
}

.dashboard-info-card > p {
    font-size: 13px;
}

.dashboard-text-link {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-top: 18px;
    color: #047857;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.dashboard-text-link:hover {
    color: #064e3b;
}

.dashboard-shortcuts {
    display: flex;
    flex-direction: column;
}

.dashboard-shortcut {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 15px 0;
    border-bottom: 1px solid #edf2ee;
    color: inherit;
    text-decoration: none;
}

.dashboard-shortcut:first-of-type {
    margin-top: 12px;
}

.dashboard-shortcut:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.dashboard-shortcut-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 39px;
    height: 39px;
    flex-shrink: 0;
    border-radius: 11px;
    background: #effaf3;
    color: #047857;
    font-size: 20px;
    font-weight: 700;
}

.dashboard-shortcut > span:nth-child(2) {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.dashboard-shortcut strong {
    color: #174d37;
    font-size: 13px;
}

.dashboard-shortcut small {
    color: #78877e;
    font-size: 11px;
    line-height: 1.5;
}

.dashboard-shortcut-arrow {
    color: #0d946b;
    font-size: 20px;
    transition: transform .2s ease;
}

.dashboard-shortcut:hover .dashboard-shortcut-arrow {
    transform: translateX(4px);
}

.dashboard-footer-note {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-top: 25px;
    padding: 18px 20px;
    border: 1px solid #e8e1c7;
    border-radius: 13px;
    background: #fffdf5;
}

.dashboard-footer-symbol {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #fff4c9;
    color: #997515;
    font-size: 18px;
}

.dashboard-footer-note > span:last-child {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.dashboard-footer-note strong {
    color: #174d37;
    font-size: 12px;
}

.dashboard-footer-note small {
    color: #78877e;
    font-size: 11px;
    line-height: 1.6;
}

@media (max-width: 850px) {
    .dashboard-hero {
        padding: 29px 25px;
    }

    .dashboard-hero-decoration {
        width: 100px;
        height: 100px;
        margin-right: 0;
    }

    .dashboard-hero-decoration span {
        font-size: 32px;
    }

    .dashboard-kpi {
        padding: 19px;
    }
}

@media (max-width: 650px) {
    .dashboard-hero {
        padding: 25px 20px;
        border-radius: 15px;
    }

    .dashboard-hero-decoration {
        display: none;
    }

    .dashboard-hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .dashboard-hero-actions .btn {
        text-align: center;
    }

    .dashboard-section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-section-heading h2 {
        font-size: 21px;
    }

    .dashboard-kpi-grid,
    .dashboard-lower-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-kpi strong {
        font-size: 24px;
    }

    .dashboard-info-card {
        padding: 21px;
    }
}


/* Logo utama dashboard pengurus */
.topbar {
    display: flex;
    align-items: center;
    gap: 20px;
}

.dashboard-brand {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none;
}

.dashboard-logo {
    display: block;
    width: auto;
    max-width: 220px;
    height: 52px;
    object-fit: contain;
}

@media (max-width: 600px) {
    .dashboard-logo {
        max-width: 155px;
        height: 42px;
    }

    .topbar {
        gap: 10px;
    }
}
