/* Website publik Masjidku. Ditulis tangan agar tidak perlu langkah build di server. */
:root {
    --green-900: #0b3d2a;
    --green-800: #0f5132;
    --green-700: #166b43;
    --green-600: #1e8a55;
    --green-100: #e3f3ea;
    --green-50: #f2faf5;
    --gold: #c99a2e;
    --gold-100: #fbf3df;
    --ink: #1c2421;
    --muted: #5b6863;
    --line: #dfe7e3;
    --bg: #fbfcfb;
    --white: #ffffff;
    --red: #b42318;
    --red-100: #fdecea;
    --radius: 14px;
    --shadow: 0 1px 2px rgba(16, 40, 30, .06), 0 8px 24px rgba(16, 40, 30, .06);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--bg);
}
img, svg { max-width: 100%; }
a { color: var(--green-700); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); }
h2 { font-size: clamp(1.45rem, 3vw, 2rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.section { padding: 56px 0; }
.section-alt { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 680px; margin-bottom: 32px; }
.section-head p { color: var(--muted); }
.eyebrow {
    display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
    color: var(--green-700); margin-bottom: 8px;
}
.muted { color: var(--muted); }
.small { font-size: .875rem; }

/* Tombol */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 20px; border-radius: 999px; border: 1px solid transparent;
    font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; white-space: nowrap;
    transition: background .15s, border-color .15s, color .15s;
}
.btn-primary { background: var(--green-700); color: var(--white); }
.btn-primary:hover { background: var(--green-800); }
.btn-gold { background: var(--gold); color: var(--white); }
.btn-gold:hover { background: #b0861f; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--green-600); color: var(--green-700); }
.btn-light { background: var(--white); color: var(--green-800); }
.btn-light:hover { background: var(--green-100); }
.btn-sm { padding: 8px 14px; font-size: .9rem; }
.btn-block { width: 100%; }

/* Kepala halaman */
.site-header {
    position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; color: var(--green-800); text-decoration: none; }
.brand-mark {
    width: 34px; height: 34px; border-radius: 10px; background: var(--green-700); color: var(--white);
    display: grid; place-items: center;
}
.nav { display: flex; align-items: center; gap: 4px; }
.nav a:not(.btn) { padding: 8px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; }
.nav a:not(.btn):hover, .nav a[aria-current="page"] { background: var(--green-50); color: var(--green-700); }
.nav .btn { margin-left: 8px; }
.menu-toggle { display: none; }
.menu-toggle summary { list-style: none; cursor: pointer; padding: 8px; border-radius: 8px; border: 1px solid var(--line); line-height: 0; }
.menu-toggle summary::-webkit-details-marker { display: none; }

@media (max-width: 820px) {
    .nav { display: none; }
    .menu-toggle { display: block; }
    .menu-toggle[open] .mobile-nav { display: grid; }
    .mobile-nav {
        display: none; position: absolute; left: 0; right: 0; top: 64px; padding: 12px 16px 20px; gap: 4px;
        background: var(--white); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    }
    .mobile-nav a:not(.btn) { padding: 12px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 600; }
    .mobile-nav a[aria-current="page"] { background: var(--green-50); color: var(--green-700); }
    .mobile-nav .btn { margin-top: 8px; }
}

/* Beranda */
.hero {
    position: relative; overflow: hidden; color: var(--white);
    background: radial-gradient(1200px 500px at 85% -10%, rgba(201, 154, 46, .28), transparent 60%),
        linear-gradient(160deg, var(--green-800), var(--green-900));
}
.hero::after {
    content: ""; position: absolute; inset: 0; opacity: .08; pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Cg fill='none' stroke='%23fff' stroke-width='1.2'%3E%3Crect x='18' y='18' width='28' height='28'/%3E%3Crect x='18' y='18' width='28' height='28' transform='rotate(45 32 32)'/%3E%3Ccircle cx='32' cy='32' r='6'/%3E%3Cpath d='M0 32h12M52 32h12M32 0v12M32 52v12'/%3E%3C/g%3E%3C/svg%3E");
}
.hero .container { position: relative; z-index: 1; display: grid; gap: 40px; padding-top: 64px; padding-bottom: 72px; align-items: center; }
.hero p.lead { font-size: 1.15rem; color: rgba(255, 255, 255, .86); max-width: 560px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.hero .badge { display: inline-flex; gap: 8px; align-items: center; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .12); font-size: .85rem; font-weight: 600; margin-bottom: 18px; }
@media (min-width: 900px) { .hero .container { grid-template-columns: 1.15fr .85fr; } }

.preview-card {
    background: var(--white); color: var(--ink); border-radius: 20px; padding: 20px; box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
    max-width: 380px; width: 100%; justify-self: center; transform: rotate(1.5deg);
}
.preview-card .bar { height: 10px; border-radius: 6px; background: var(--green-100); }
.preview-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.preview-head strong { color: var(--green-800); }
.preview-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: .92rem; }
.preview-row:last-child { border-bottom: 0; }
.preview-total { margin-top: 10px; padding: 12px; border-radius: 12px; background: var(--green-50); display: flex; justify-content: space-between; font-weight: 800; color: var(--green-800); }

.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: -36px; position: relative; z-index: 2; }
.stat { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.stat strong { display: block; font-size: 1.6rem; color: var(--green-800); line-height: 1.2; }
.stat span { color: var(--muted); font-size: .9rem; }
@media (min-width: 760px) { .stats { grid-template-columns: repeat(4, 1fr); } }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }

.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card h3 { margin-bottom: 6px; }
.card p { color: var(--muted); margin: 0; font-size: .95rem; }
.icon {
    width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 14px;
    background: var(--green-50); color: var(--green-700);
}
.icon svg { width: 24px; height: 24px; }

.steps { counter-reset: step; }
.step { position: relative; padding-left: 60px; }
.step::before {
    counter-increment: step; content: counter(step); position: absolute; left: 0; top: 0;
    width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
    background: var(--gold-100); color: #8a6516; font-weight: 800;
}

.cta {
    border-radius: 22px; padding: 32px; color: var(--white);
    background: linear-gradient(135deg, var(--green-700), var(--green-900));
    display: grid; gap: 20px; align-items: center;
}
.cta p { color: rgba(255, 255, 255, .85); margin: 0; }
@media (min-width: 820px) { .cta { grid-template-columns: 1fr auto; padding: 40px; } }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 8px 14px; border-radius: 999px; background: var(--white); border: 1px solid var(--line); font-size: .9rem; }
.chip small { color: var(--muted); }

/* Formulir */
.page-head { padding: 40px 0 8px; }
.page-head p { color: var(--muted); max-width: 640px; }
.form-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.form-card + .form-card { margin-top: 16px; }
.form-card h2 { font-size: 1.15rem; margin-bottom: 4px; }
.form-card > p { color: var(--muted); font-size: .92rem; }
.fields { display: grid; gap: 16px; grid-template-columns: 1fr; margin-top: 16px; }
@media (min-width: 640px) { .fields { grid-template-columns: 1fr 1fr; } .field-wide { grid-column: 1 / -1; } }
label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; }
label .req { color: var(--red); }
input[type=text], input[type=email], input[type=tel], input[type=password], textarea, select {
    width: 100%; font: inherit; padding: 11px 14px; border: 1px solid #cbd6d1; border-radius: 10px; background: var(--white); color: var(--ink);
}
input:focus, textarea:focus, select:focus { outline: 3px solid rgba(30, 138, 85, .2); border-color: var(--green-600); }
.hint { font-size: .82rem; color: var(--muted); margin-top: 4px; }
.error { font-size: .85rem; color: var(--red); margin-top: 4px; }
.has-error input, .has-error textarea { border-color: var(--red); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.check input { margin-top: 5px; width: 18px; height: 18px; accent-color: var(--green-700); }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.alert { padding: 14px 16px; border-radius: 12px; margin-bottom: 16px; }
.alert-error { background: var(--red-100); color: var(--red); }
.alert-info { background: var(--green-50); color: var(--green-800); border: 1px solid var(--green-100); }
.alert-gold { background: var(--gold-100); color: #6f5212; }

.layout-aside { display: grid; gap: 24px; }
@media (min-width: 960px) { .layout-aside { grid-template-columns: 1fr 320px; align-items: start; } .aside-sticky { position: sticky; top: 88px; } }

/* Laporan */
.summary { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .summary { grid-template-columns: repeat(3, 1fr); } }
.summary .stat strong { font-size: 1.35rem; }
.in { color: var(--green-700); }
.out { color: var(--red); }
.month-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 28px 0 16px; flex-wrap: wrap; }
.month-nav h2 { margin: 0; }
.month-nav .links { display: flex; gap: 8px; }
.btn[aria-disabled="true"] { opacity: .4; pointer-events: none; }

.bars { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 70px 1fr; gap: 12px; align-items: center; font-size: .88rem; }
.bar-pair { display: grid; gap: 4px; }
.bar { height: 10px; border-radius: 6px; min-width: 2px; }
.bar.in-bar { background: var(--green-600); }
.bar.out-bar { background: #e07a5f; }
.legend { display: flex; gap: 16px; font-size: .85rem; color: var(--muted); margin-top: 12px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

table.list { width: 100%; border-collapse: collapse; font-size: .93rem; }
table.list th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 10px 8px; border-bottom: 1px solid var(--line); }
table.list td { padding: 12px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list td.num, table.list th.num { text-align: right; white-space: nowrap; }
@media (max-width: 640px) {
    table.stack thead { display: none; }
    table.stack tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
    table.stack td { border: 0; padding: 0; }
    table.stack td.date { grid-column: 1 / -1; font-size: .8rem; color: var(--muted); }
    table.stack td.amount-empty { display: none; }
}

.account { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.account:last-child { border-bottom: 0; }
.account-number { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.05rem; font-weight: 700; letter-spacing: .03em; }
.empty { text-align: center; padding: 48px 16px; color: var(--muted); }

/* Kontak */
.contact-card { display: flex; gap: 16px; align-items: flex-start; text-decoration: none; color: inherit; }
.contact-card:hover { border-color: var(--green-600); }
.contact-card .icon { margin: 0; flex: none; }
.contact-card strong { display: block; }
.contact-card span { color: var(--muted); word-break: break-word; }

/* Kaki halaman */
.site-footer { background: var(--green-900); color: rgba(255, 255, 255, .78); padding: 44px 0 28px; margin-top: 24px; }
.site-footer a { color: var(--white); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-grid { display: grid; gap: 28px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer h3 { color: var(--white); font-size: 1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 32px; padding-top: 20px; font-size: .85rem; }

/* Kartu profil pengelola di halaman Kontak */
.profile-card { display: flex; gap: 24px; align-items: center; margin-bottom: 24px; }
.profile-card h2 { margin: 4px 0 14px; }
.profile-photo { width: 132px; height: 132px; border-radius: 50%; object-fit: cover; object-position: center 25%; flex: none; box-shadow: 0 0 0 4px #fff, 0 0 0 6px var(--gold, #c99a2e); }
@media (max-width: 560px) {
    .profile-card { flex-direction: column; text-align: center; }
}

/* Nuansa islami: basmalah, kutipan ayat/hadis, ornamen */
.bismillah { text-align: left; font-family: "Amiri", serif; font-size: clamp(1.5rem, 3.5vw, 2rem); color: #f3d98b; margin: 0 0 14px; line-height: 1.6; }
.dalil-section { padding-top: 48px; padding-bottom: 8px; }
.dalil {
    position: relative; margin: 0 auto; max-width: 860px; text-align: center;
    padding: 40px 28px 28px; border-radius: 22px; background: var(--white);
    border: 1px solid #ecdcae; box-shadow: var(--shadow);
}
.dalil::before, .dalil::after {
    content: ""; position: absolute; left: 50%; width: 140px; height: 2px; transform: translateX(-50%);
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.dalil::before { top: 14px; }
.dalil::after { bottom: 12px; }
.dalil-ornament {
    position: absolute; top: -20px; left: 50%; transform: translateX(-50%);
    width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
    background: var(--green-800); color: #f3d98b; font-size: 1.3rem; line-height: 1;
    box-shadow: 0 0 0 4px var(--bg), 0 0 0 5px var(--gold);
}
.dalil .arabic {
    font-family: "Amiri", serif; font-size: clamp(1.45rem, 3.2vw, 2rem); line-height: 2.1;
    color: var(--green-900); margin: 0 0 14px;
}
.dalil blockquote { margin: 0 auto 10px; max-width: 680px; color: var(--muted); font-style: italic; }
.dalil figcaption { font-size: .85rem; font-weight: 700; letter-spacing: .04em; color: #8a6516; }

.dalil-compact {
    text-align: right; max-width: 640px; margin: 18px 0 8px; padding: 18px 20px 14px;
    border-radius: 16px; box-shadow: none; border-left: 4px solid var(--gold); background: var(--gold-100);
}
.dalil-compact::before, .dalil-compact::after, .dalil-compact .dalil-ornament { display: none; }
.dalil-compact .arabic { font-size: clamp(1.25rem, 2.6vw, 1.55rem); line-height: 1.9; margin-bottom: 6px; }
.dalil-compact blockquote, .dalil-compact figcaption { text-align: left; margin-left: 0; }
.dalil-compact blockquote { font-size: .95rem; margin-bottom: 4px; }

.dalil-inline { margin: 14px 0 0; padding-top: 12px; border-top: 1px dashed var(--line); font-size: .88rem; color: var(--muted); }
.dalil-inline span { display: block; font-family: "Amiri", serif; font-size: 1.2rem; color: var(--green-900); text-align: right; }
.dalil-inline small { color: #8a6516; font-weight: 600; }
.site-footer {
    border-top: 4px solid var(--gold);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Cg fill='none' stroke='%23fff' stroke-opacity='.05' stroke-width='1.2'%3E%3Crect x='18' y='18' width='28' height='28'/%3E%3Crect x='18' y='18' width='28' height='28' transform='rotate(45 32 32)'/%3E%3C/g%3E%3C/svg%3E");
}
