:root{
  --primary:#117657;
  --primary-dark:#073f35;
  --primary-deep:#06372f;
  --primary-soft:#e7f3ef;
  --secondary:#17352e;
  --accent:#f3c52b;
  --bg:#f4f7f5;
  --card:#ffffff;
  --text:#1f302b;
  --muted:#73817d;
  --border:#dfe7e3;
  --danger:#b42318;
  --warning:#9a6700;
  --success:#13795b;
  --sidebar:255px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--bg);color:var(--text);font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;font-size:14px;line-height:1.5}
a{text-decoration:none;color:var(--primary)}
a:hover{color:var(--primary-dark)}
.app-shell{min-height:100vh}

/* Admin shell */
.sidebar{position:fixed;left:0;top:0;bottom:0;width:var(--sidebar);background:var(--primary-dark);color:#b8cbc5;z-index:1030;overflow-y:auto;transition:transform .25s ease;box-shadow:8px 0 28px rgba(5,43,36,.07)}
.sidebar-brand{display:flex;align-items:center;gap:11px;padding:17px 19px 16px;min-height:73px;border-bottom:1px solid rgba(255,255,255,.08)}
.sidebar-brand img{width:40px;height:40px;object-fit:contain;background:#fff;border-radius:10px;padding:4px;box-shadow:0 4px 12px rgba(0,0,0,.12)}
.sidebar-brand .brand-fallback{width:40px;height:40px;display:grid;place-items:center;background:#fff;color:var(--primary);border-radius:10px;font-size:18px}
.sidebar-brand strong{display:block;color:#fff;font-size:14px;line-height:1.2;font-weight:750}
.sidebar-brand small{display:block;color:#91aaa3;font-size:11px;margin-top:2px;max-width:160px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.nav-section{padding:17px 22px 5px;text-transform:uppercase;letter-spacing:.14em;font-size:9px;font-weight:700;color:#66877e}
.side-link{display:flex;align-items:center;gap:12px;margin:3px 11px;padding:10px 13px;border-radius:9px;color:#b7ccc5;font-size:12.5px;transition:.18s ease}
.side-link:hover,.side-link.active{background:rgba(255,255,255,.105);color:#fff}
.side-link.active{box-shadow:inset 3px 0 0 rgba(255,255,255,.7)}
.side-link i{width:18px;text-align:center;font-size:13px;color:#a4c5ba}
.side-link.active i,.side-link:hover i{color:#fff}
.sidebar-footer{padding:16px 18px;color:#6f9188;font-size:10px}
.main{margin-left:var(--sidebar);min-height:100vh}
.topbar{height:66px;background:#fff;border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;padding:0 27px;position:sticky;top:0;z-index:1020}
.topbar-title{font-size:14px;font-weight:750;color:#20312c}
.user-menu-button{display:flex;align-items:center;gap:9px;background:#fff!important;border:1px solid var(--border)!important;border-radius:11px!important;padding:6px 9px!important;color:var(--text)!important;box-shadow:0 1px 2px rgba(16,50,41,.03)}
.user-avatar{width:31px;height:31px;border-radius:50%;display:grid;place-items:center;background:var(--primary-soft);color:var(--primary);font-weight:750;font-size:11px}
.user-menu-copy{min-width:90px;text-align:left;line-height:1.15}
.user-menu-copy strong{display:block;font-size:11.5px;color:#283934}
.user-menu-copy small{display:block;font-size:9.5px;color:var(--muted);margin-top:3px}
.page-content{padding:27px}
.page-header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:22px}
.page-header h1{font-size:25px;line-height:1.2;margin:0;color:#24352f;font-weight:760;letter-spacing:-.02em}
.page-header p{margin:5px 0 0;color:var(--muted)}
.dashboard-welcome h1{font-size:28px}
.card{border:1px solid var(--border);box-shadow:0 2px 7px rgba(17,65,52,.035);border-radius:13px;background:#fff}
.card-header{background:#fff;border-bottom:1px solid var(--border);font-weight:700;padding:16px 18px;border-radius:13px 13px 0 0!important;color:#283a34}
.card-header a{font-size:11px;font-weight:600}
.stat-card{padding:16px;height:100%;display:flex;align-items:center;gap:13px;min-height:74px}
.stat-card .stat-icon{width:40px;height:40px;flex:0 0 40px;border-radius:11px;background:var(--primary-soft);color:var(--primary);display:grid;place-items:center;font-size:15px}
.stat-card .value{font-size:18px;font-weight:800;line-height:1.1;margin-top:3px;color:#1d2e29;white-space:nowrap}
.stat-card .label{color:var(--muted);font-size:11.5px}
.dashboard-grid{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(300px,.75fr);gap:18px}
.dashboard-table .table th{padding:11px 14px}
.dashboard-table .table td{padding:12px 14px}
.payment-reference{font-weight:750;color:#263832;line-height:1.15}
.payment-payer{font-size:10.5px;color:var(--muted);margin-top:3px}
.method-mpesa{color:#2ea44f;font-weight:750}
.upcoming-list{display:flex;flex-direction:column}
.upcoming-item{display:flex;align-items:center;gap:12px;padding:14px 17px;border-bottom:1px solid var(--border)}
.upcoming-item:last-child{border-bottom:0}
.upcoming-date{width:47px;min-width:47px;border-radius:10px;background:#edf5f2;text-align:center;padding:7px 4px;color:var(--primary)}
.upcoming-date strong{display:block;font-size:17px;line-height:1}
.upcoming-date span{display:block;font-size:8.5px;text-transform:uppercase;margin-top:4px;color:#82958f}
.upcoming-info{min-width:0;flex:1}
.upcoming-info strong{display:block;font-size:12px;color:#273832;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.upcoming-info small{display:block;color:var(--muted);font-size:10.5px;margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.table{margin-bottom:0;color:var(--text)}
.table th{font-size:9.5px;text-transform:uppercase;letter-spacing:.06em;color:#788681;background:#fafcfb;border-bottom-width:1px;white-space:nowrap;font-weight:750}
.table td{vertical-align:middle;border-color:#edf1ef}
.badge{font-weight:650;padding:.45em .75em}
.badge-soft-success{background:#dff4ec;color:#13795b}
.badge-soft-warning{background:#fff3cd;color:#7a5900}
.badge-soft-danger{background:#fde8e7;color:#a12b24}
.badge-soft-info{background:#e5f0ff;color:#24579b}
.badge-soft-neutral{background:#eef2f0;color:#52635d}
.form-label{font-weight:650;font-size:12px;color:#34443f}
.form-control,.form-select{border-color:#cfdad5;border-radius:9px;min-height:42px;font-size:13px}
.form-control:focus,.form-select:focus{border-color:var(--primary);box-shadow:0 0 0 .2rem rgba(17,118,87,.11)}
.btn{border-radius:9px;font-weight:650;font-size:12.5px;padding:.58rem .9rem}
.btn-lg{font-size:14px;padding:.78rem 1.2rem}
.btn-primary{background:var(--primary);border-color:var(--primary)}
.btn-primary:hover,.btn-primary:focus{background:var(--primary-dark);border-color:var(--primary-dark)}
.btn-outline-primary{color:var(--primary);border-color:var(--primary)}
.btn-outline-primary:hover{background:var(--primary);border-color:var(--primary)}
.btn-accent{background:var(--accent);border-color:var(--accent);color:#264032}
.btn-accent:hover{background:#e6b914;border-color:#e6b914;color:#20362b}
.alert{border-radius:10px}
.empty-state{text-align:center;padding:45px 20px;color:var(--muted)}
.empty-state i{font-size:35px;display:block;margin-bottom:11px}
.dropdown-menu{border:1px solid var(--border);border-radius:10px;box-shadow:0 14px 35px rgba(15,50,40,.12);font-size:12.5px}

/* Authentication */
.auth-page{min-height:100vh;display:grid;grid-template-columns:1.05fr .95fr;background:#fff}
.auth-side{background:linear-gradient(145deg,var(--primary-dark),#0b6c50);padding:60px;color:#fff;display:flex;flex-direction:column;justify-content:space-between}
.auth-side h1{font-size:42px;font-weight:800;max-width:560px}
.auth-side p{font-size:18px;color:#cbded8;max-width:540px}
.auth-form{display:grid;place-items:center;padding:35px}
.auth-card{width:100%;max-width:440px}
.auth-logo{max-height:65px;max-width:230px;margin-bottom:25px}

/* Public site */
.public-body{background:#fff;color:#263731}
.public-nav{background:#fff;border-bottom:1px solid #e8eeeb;min-height:58px}
.public-nav .navbar-brand{display:flex;align-items:center;gap:10px;min-width:210px;color:#173b31}
.public-nav .navbar-brand img{width:38px;height:38px;object-fit:contain;border-radius:8px}.public-nav .brand-fallback{width:38px;height:38px;display:grid;place-items:center;border-radius:8px;background:var(--primary-soft);color:var(--primary)}
.public-brand-copy{line-height:1.1}
.public-brand-copy strong{display:block;font-size:13px;color:#1d493c}
.public-brand-copy small{display:block;font-size:9.5px;color:#7d8b86;margin-top:3px;max-width:150px}
.public-nav .nav-link{font-size:11px;color:#52615c;padding-left:.85rem!important;padding-right:.85rem!important}
.public-nav .nav-link:hover{color:var(--primary)}
.public-login-btn{border:1px solid var(--primary);border-radius:9px;padding:.55rem .9rem!important;color:#34443f!important}
.public-hero{position:relative;overflow:hidden;background:linear-gradient(120deg,#073e34 0%,#075844 52%,#0e7452 100%);color:#fff;padding:48px 0 54px}
.public-hero:before{content:"";position:absolute;width:470px;height:470px;border-radius:50%;right:-210px;bottom:-330px;background:rgba(181,200,66,.18)}
.public-hero:after{content:"";position:absolute;width:310px;height:310px;border-radius:50%;right:90px;bottom:-280px;border:55px solid rgba(255,255,255,.035)}
.hero-content{position:relative;z-index:2}
.conference-pill{display:inline-flex;align-items:center;width:min(100%,565px);border:1px solid rgba(231,200,68,.48);border-radius:999px;padding:5px 10px;color:#f2df87;font-size:9px;font-weight:750;letter-spacing:.04em;text-transform:uppercase}
.public-hero h1{font-size:36px;line-height:1.22;font-weight:790;max-width:610px;margin:16px 0 14px;letter-spacing:-.025em}
.public-hero p{font-size:14px;line-height:1.7;color:#c9dbd5;max-width:610px;margin:0}
.hero-actions{display:flex;gap:9px;flex-wrap:wrap;margin-top:21px}
.hero-actions .btn{min-width:142px}
.payment-lookup-card{position:relative;z-index:2;background:#fff;color:var(--text);border-radius:14px;padding:18px;box-shadow:0 17px 45px rgba(3,38,30,.18);max-width:360px;margin-left:auto}
.payment-lookup-card h3{font-size:13px;font-weight:750;margin:0 0 3px}
.payment-lookup-card p{font-size:10px;color:var(--muted);margin:0 0 13px}
.payment-lookup-card label{font-size:9.5px;font-weight:700;margin-bottom:5px}
.lookup-row{display:grid;grid-template-columns:1fr 103px;gap:8px}
.lookup-row .form-control,.lookup-row .btn{min-height:43px}
.payment-features{display:grid;grid-template-columns:1fr 1fr;gap:15px;border-top:1px solid var(--border);padding-top:12px;margin-top:13px}
.payment-features span{display:block;color:var(--muted);font-size:9px}
.payment-features strong{display:block;font-size:10px;color:#374b44;margin-top:2px}
.payment-features .mpesa-copy{color:#2ba655}
.public-section{padding:39px 0 43px;background:#f7faf8}
.public-section.white{background:#fff}
.section-kicker{text-transform:uppercase;letter-spacing:.14em;font-weight:750;font-size:8px;color:var(--primary)}
.section-heading{font-size:24px;line-height:1.05;font-weight:780;margin:5px 0 0;color:#24372f;letter-spacing:-.02em}
.section-link{font-size:10px;color:var(--primary);font-weight:600}
.featured-event-card{height:100%;overflow:hidden;border-radius:12px;background:#fff;border:1px solid var(--border);box-shadow:0 2px 8px rgba(20,70,55,.035)}
.event-visual{height:137px;position:relative;overflow:hidden;background:linear-gradient(135deg,#0c6b52,#0a9368);color:#fff;padding:15px}
.event-visual.blue{background:linear-gradient(135deg,#1f548e,#2d84c6)}
.event-visual.gold{background:linear-gradient(135deg,#98700c,#d5aa12)}
.event-visual:before,.event-visual:after{content:"";position:absolute;border-radius:50%;border:28px solid rgba(255,255,255,.08)}
.event-visual:before{width:145px;height:145px;right:-28px;top:-30px}
.event-visual:after{width:105px;height:105px;right:18px;top:27px}
.event-visual img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.event-visual-overlay{position:absolute;inset:0;background:linear-gradient(to top,rgba(2,35,28,.7),rgba(2,35,28,.08));z-index:1}
.event-date-chip{position:relative;z-index:2;display:inline-block;border:1px solid rgba(255,255,255,.26);background:rgba(255,255,255,.12);border-radius:7px;padding:4px 9px;font-size:8px;font-weight:700}
.event-visual h3{position:absolute;z-index:2;left:15px;right:15px;bottom:14px;margin:0;color:#fff;font-size:18px;line-height:1.05;font-weight:750}
.event-card-body{padding:13px 15px 14px}
.event-card-meta{color:var(--primary);font-size:9px;margin-bottom:6px}
.event-card-theme{font-size:12px;font-weight:750;color:#2b3e37;margin-bottom:5px}
.event-card-description{font-size:10px;color:#77847f;line-height:1.55;min-height:31px;margin-bottom:11px}
.event-card-body .btn{font-size:9.5px;padding:.42rem .7rem}
.cause-card{display:flex;gap:13px;align-items:center;height:100%;border:1px solid var(--border);border-radius:12px;padding:13px;background:#fff}
.cause-icon{width:62px;height:62px;flex:0 0 62px;border-radius:12px;background:#e2f3ed;color:var(--primary);display:grid;place-items:center;font-size:25px;overflow:hidden}
.cause-icon img{width:100%;height:100%;object-fit:cover}
.cause-content{min-width:0;flex:1}
.cause-content h3{font-size:12px;font-weight:750;margin:0 0 3px;color:#2e403a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cause-content p{font-size:9.5px;color:var(--muted);margin:0 0 7px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cause-progress-copy{display:flex;justify-content:space-between;font-size:8px;color:#73817d;margin-bottom:3px}
.progress{background:#eaf0ed}
.public-footer{background:#fff;border-top:1px solid #e5ebe8;color:#7b8984;padding:15px 0;font-size:9px}
.public-footer a{color:#64766f}

/* Existing modules */
.event-card{height:100%;overflow:hidden}.event-card img{width:100%;height:190px;object-fit:cover}.event-card .placeholder{height:190px;background:linear-gradient(135deg,#dcfce7,#dbeafe);display:grid;place-items:center;font-size:54px;color:var(--primary)}.event-card h3{font-size:19px}
.invoice-page{max-width:900px;margin:25px auto;background:#fff;padding:40px;border-radius:12px;border:1px solid var(--border)}
.invoice-header{display:flex;justify-content:space-between;gap:20px;border-bottom:2px solid var(--secondary);padding-bottom:22px;margin-bottom:25px}
.invoice-logo{max-height:70px;max-width:220px}.signature-box{border:1px dashed #94a3b8;padding:20px;border-radius:8px}.quick-actions .btn{padding:15px}.chart-box{height:260px}.hide-mobile{display:block}.mobile-menu{display:none}.logo-preview{max-height:90px;max-width:260px;border:1px solid var(--border);border-radius:8px;padding:8px;background:#fff}.settings-tabs .nav-link{color:#475569}.settings-tabs .nav-link.active{color:var(--primary);font-weight:700}.filter-bar{display:flex;gap:10px;flex-wrap:wrap}.filter-bar .form-control,.filter-bar .form-select{min-width:150px}.hp-field{position:absolute!important;left:-9999px!important;width:1px!important;height:1px!important;overflow:hidden!important}.calendar-list .calendar-date{min-width:64px;text-align:center;border-radius:10px;background:#ecfdf5;color:var(--primary);padding:9px}.calendar-date strong{display:block;font-size:23px}.calendar-date span{font-size:11px;text-transform:uppercase}.sticky-actions{position:sticky;bottom:0;background:#fff;border-top:1px solid var(--border);padding:14px;margin:25px -24px -24px;z-index:5}.text-primary-custom{color:var(--primary)!important}.bg-primary-custom{background:var(--primary)!important}
.payment-page-card{max-width:720px;margin:34px auto}.reference-summary{background:#f6faf8;border:1px solid var(--border);border-radius:10px;padding:15px}

@media(max-width:1199px){.dashboard-grid{grid-template-columns:1fr}.payment-lookup-card{max-width:none}}
@media(max-width:991px){
  .sidebar{transform:translateX(-100%)}.sidebar.show{transform:translateX(0)}.main{margin-left:0}.mobile-menu{display:inline-flex}.page-content{padding:17px}.topbar{padding:0 16px}.auth-page{grid-template-columns:1fr}.auth-side{display:none}.page-header{align-items:flex-start;flex-direction:column}.hide-mobile{display:none}.filter-bar>*{width:100%!important}.invoice-page{margin:0;border:0;border-radius:0;padding:22px}.invoice-header{flex-direction:column}
  .sidebar-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.35);z-index:1025;display:none}.sidebar-backdrop.show{display:block}
  .public-hero{padding:39px 0}.payment-lookup-card{margin-top:24px}.public-nav .navbar-collapse{padding:10px 0 15px}.public-login-btn{display:inline-block;margin-top:5px}
}
@media(max-width:767px){
  .page-header h1,.dashboard-welcome h1{font-size:23px}.page-header .btn{width:100%}.page-header>div:last-child{width:100%;display:grid!important;grid-template-columns:1fr 1fr}.stat-card{min-height:72px}.dashboard-table .table th:nth-child(4),.dashboard-table .table td:nth-child(4),.dashboard-table .table th:nth-child(5),.dashboard-table .table td:nth-child(5){display:none}
  .public-hero h1{font-size:31px}.lookup-row{grid-template-columns:1fr}.section-heading{font-size:22px}.public-section{padding:32px 0}.cause-card{align-items:flex-start}.public-footer{text-align:center}.public-footer .text-end{text-align:center!important;margin-top:7px}
}
@media(max-width:575px){.user-menu-copy{display:none}.topbar{height:61px}.page-content{padding:14px}.page-header>div:last-child{grid-template-columns:1fr}.stat-card .value{font-size:17px}.public-brand-copy small{max-width:120px}.hero-actions .btn{width:100%}.payment-features{grid-template-columns:1fr}.conference-pill{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}}
@media print{.no-print,.sidebar,.topbar,.public-nav,.public-footer{display:none!important}.main{margin:0}.page-content{padding:0}.invoice-page{border:0;box-shadow:none;max-width:none;margin:0;padding:0}body{background:#fff}.card{box-shadow:none}}
