/* =====================================================================
   MAN IC Serpong - Event Portal
   Desain: bersih, profesional, modern. Palet hijau akademik + emas.
   ===================================================================== */

:root {
    --primary: #0f5132;
    --primary-600: #0b6b41;
    --primary-700: #0a3d27;
    --accent: #b8860b;
    --accent-soft: #f6efdc;
    --ink: #16221c;
    --muted: #5b6b62;
    --line: #e6ebe7;
    --bg: #f7f9f7;
    --card: #ffffff;
    --radius: 16px;
    --shadow-sm: 0 1px 2px rgba(16, 40, 28, .06);
    --shadow: 0 8px 30px rgba(16, 40, 28, .08);
    --shadow-lg: 0 20px 50px rgba(16, 40, 28, .12);
    --maxw: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

a { color: var(--primary-600); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; color: var(--ink); }
p { margin: 0 0 1em; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .7rem 1.25rem; border-radius: 999px; font-weight: 600;
    font-size: .95rem; border: 1px solid transparent; cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
    text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--primary-600); color: #fff; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: #a2760a; color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: #fff; }
.btn-light { background: #fff; color: var(--primary-700); }
.btn-block { width: 100%; justify-content: center; }
.btn-sm { padding: .45rem .8rem; font-size: .85rem; }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255, 255, 255, .85);
    backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: .7rem; }
.brand:hover { text-decoration: none; }
.brand-mark {
    display: grid; place-items: center; width: 40px; height: 40px;
    border-radius: 12px; background: var(--primary); color: #fff;
    font-weight: 800; letter-spacing: .5px; box-shadow: var(--shadow-sm);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-size: 1.02rem; color: var(--ink); }
.brand-text small { color: var(--muted); font-size: .74rem; }

.site-nav { display: flex; align-items: center; gap: 1rem; }
.site-nav > a { color: var(--ink); font-weight: 500; font-size: .92rem; white-space: nowrap; }
.site-nav > a:hover { color: var(--primary); text-decoration: none; }
.nav-user { color: var(--muted); font-size: .82rem; max-width: 180px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-toggle, .nav-burger { display: none; }

/* ---------- App launcher (pemindah modul) ---------- */
.app-launcher { position: relative; display: inline-flex; margin-right: auto; margin-left: .8rem; }
.app-toggle { display: none; }
.app-btn {
    cursor: pointer; user-select: none; display: inline-flex; align-items: center; gap: .45rem;
    height: 40px; padding: 0 .8rem; border-radius: 999px;
    border: 1px solid var(--line); background: #fff; color: var(--ink);
    font-size: .9rem; font-weight: 600; box-shadow: var(--shadow-sm);
    transition: border-color .15s ease, background .15s ease;
}
.app-btn:hover { background: #f7f9f7; border-color: var(--primary); }
.app-btn-ico { font-size: 1.1rem; line-height: 1; color: var(--primary); }
.app-btn-caret { font-size: .7rem; color: var(--muted); transition: transform .15s ease; }
.app-toggle:checked ~ .app-btn { border-color: var(--primary); background: #f0fdf4; }
.app-toggle:checked ~ .app-btn .app-btn-caret { transform: rotate(180deg); }
.app-panel {
    position: absolute; top: calc(100% + 10px); left: 0; z-index: 60; width: 300px;
    background: #fff; border: 1px solid var(--line); border-radius: 14px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .12); padding: 14px;
    opacity: 0; visibility: hidden; transform: translateY(-6px);
    transition: opacity .15s ease, transform .15s ease, visibility .15s;
}
.app-panel-head {
    font-size: .72rem; font-weight: 700; color: var(--muted);
    text-transform: uppercase; letter-spacing: .05em; margin-bottom: 10px;
}
.app-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.app-card { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; border-radius: 10px; text-align: center; }
.app-card:hover { background: #f7f9f7; text-decoration: none; }
.app-card.active { background: #f0fdf4; }
.app-ico { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font-size: 1.25rem; }
.app-name { font-size: .78rem; font-weight: 600; color: var(--ink); }
.app-scrim { display: none; position: fixed; inset: 0; z-index: 55; }
.app-toggle:checked ~ .app-panel { opacity: 1; visibility: visible; transform: translateY(0); }
.app-toggle:checked ~ .app-scrim { display: block; }

/* ---------- Hero ---------- */
.hero {
    position: relative; overflow: hidden; color: #fff;
    background:
        radial-gradient(1200px 400px at 80% -10%, rgba(184, 134, 11, .35), transparent 60%),
        linear-gradient(135deg, var(--primary-700), var(--primary) 55%, var(--primary-600));
}
.hero-inner { padding: 84px 20px 96px; }
.eyebrow {
    display: inline-flex; align-items: center; gap: .5rem;
    background: rgba(255, 255, 255, .14); color: #fff;
    padding: .35rem .8rem; border-radius: 999px; font-size: .8rem; font-weight: 600;
    margin-bottom: 1.1rem;
}
.hero h1 { color: #fff; font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 800; letter-spacing: -.02em; }
.hero p { color: rgba(255, 255, 255, .9); font-size: 1.12rem; max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }
.hero-wave { display: block; width: 100%; height: 40px; margin-top: -1px; }

/* ---------- Sections ---------- */
section { padding: 64px 0; }
.section-head { max-width: 640px; margin-bottom: 2rem; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head .kicker { color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; }
.section-head h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-top: .3rem; }
.section-head p { color: var(--muted); font-size: 1.05rem; }
.section-alt { background: #fff; border-block: 1px solid var(--line); }

/* ---------- Legend ---------- */
.legend { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; }
.legend span { display: inline-flex; align-items: center; gap: .5rem; font-size: .92rem; color: var(--muted); }
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }

/* ---------- Category grid ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.cat-card {
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1.25rem; display: flex; align-items: center; gap: .9rem;
    box-shadow: var(--shadow-sm); transition: transform .12s ease, box-shadow .12s ease;
}
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); text-decoration: none; }
.cat-ico { font-size: 1.6rem; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 12px; background: var(--accent-soft); }
.cat-card strong { display: block; color: var(--ink); font-size: .98rem; }
.cat-card small { color: var(--muted); }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; counter-reset: step; }
.step {
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1.4rem; box-shadow: var(--shadow-sm); position: relative;
}
.step .num {
    display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px;
    background: var(--primary); color: #fff; font-weight: 700; margin-bottom: .8rem;
}
.step h4 { margin-bottom: .3rem; }
.step p { color: var(--muted); margin: 0; font-size: .95rem; }

/* ---------- Audience cards ---------- */
.aud-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.aud {
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1.6rem; box-shadow: var(--shadow-sm);
}
.aud .aud-ico { font-size: 1.8rem; }
.aud h3 { margin: .6rem 0 .6rem; }
.aud ul { margin: 0; padding-left: 1.1rem; color: var(--muted); }
.aud ul li { margin-bottom: .4rem; }

/* ---------- Callout ---------- */
.callout {
    background: var(--accent-soft); border: 1px solid #ecdfba; border-left: 4px solid var(--accent);
    border-radius: 12px; padding: 1rem 1.2rem; color: #6b551a;
}

/* ---------- FAQ ---------- */
.faq { max-width: 760px; margin: 0 auto; }
.faq details {
    background: var(--card); border: 1px solid var(--line); border-radius: 12px;
    padding: .2rem 1.1rem; margin-bottom: .7rem; box-shadow: var(--shadow-sm);
}
.faq summary { cursor: pointer; font-weight: 600; padding: .9rem 0; list-style: none; display: flex; justify-content: space-between; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-weight: 700; }
.faq details[open] summary::after { content: "\2013"; }
.faq details p { color: var(--muted); margin: 0 0 1rem; }

/* ---------- CTA band ---------- */
.cta-band {
    background: linear-gradient(135deg, var(--primary-700), var(--primary-600));
    color: #fff; border-radius: 20px; padding: 3rem 2rem; text-align: center;
    box-shadow: var(--shadow-lg);
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255, 255, 255, .88); }

/* ---------- Event cards ---------- */
.event-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.event-card {
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow-sm); overflow: hidden; display: flex; flex-direction: column;
    transition: transform .12s ease, box-shadow .12s ease;
}
.event-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.event-card .card-top { height: 6px; }
.event-card .card-body { padding: 1.3rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.event-cat { display: inline-flex; align-items: center; gap: .4rem; font-size: .8rem; color: var(--muted); font-weight: 600; }
.event-card h3 { font-size: 1.1rem; margin: 0; }
.event-meta { color: var(--muted); font-size: .88rem; display: flex; flex-wrap: wrap; gap: .3rem 1rem; }
.event-card .card-foot { margin-top: auto; padding-top: .8rem; display: flex; align-items: center; justify-content: space-between; }

.badge { display: inline-block; padding: .28rem .7rem; border-radius: 999px; font-size: .76rem; font-weight: 700; }

/* ---------- Filter bar ---------- */
.filterbar { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.6rem; }
.chip {
    padding: .45rem .9rem; border-radius: 999px; border: 1px solid var(--line);
    background: #fff; color: var(--ink); font-size: .88rem; font-weight: 600;
}
.chip:hover { border-color: var(--primary); text-decoration: none; }
.chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---------- Auth / forms ---------- */
.auth-wrap { min-height: 70vh; display: grid; place-items: center; padding: 3rem 1rem; }
.auth-card { width: 100%; max-width: 420px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 2rem; }
.auth-card h1 { font-size: 1.5rem; }
.auth-card .sub { color: var(--muted); margin-bottom: 1.4rem; }
.field { margin-bottom: 1rem; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .35rem; }
.field input, .field select, .field textarea {
    width: 100%; padding: .7rem .85rem; border: 1px solid var(--line); border-radius: 10px;
    font: inherit; background: #fff; color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid rgba(15, 81, 50, .25); border-color: var(--primary); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.alert { padding: .8rem 1rem; border-radius: 10px; margin-bottom: 1rem; font-size: .92rem; }
.alert-error { background: #fee2e2; color: #b91c1c; }
.alert-success { background: #dcfce7; color: #15803d; }
.alert-info { background: #dbeafe; color: #1e40af; }

/* ---------- Page header (inner pages) ---------- */
.page-head { background: #fff; border-bottom: 1px solid var(--line); padding: 2.4rem 0; }
.page-head h1 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 0; }
.page-head p { color: var(--muted); margin: .4rem 0 0; }
.breadcrumb { color: var(--muted); font-size: .85rem; margin-bottom: .5rem; }

/* ---------- Table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
table.data { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.data th, table.data td { padding: .8rem 1rem; text-align: left; border-bottom: 1px solid var(--line); }
table.data th { background: #f4f7f5; font-weight: 700; color: var(--muted); font-size: .82rem; text-transform: uppercase; letter-spacing: .03em; }
table.data tr:last-child td { border-bottom: none; }

/* ---------- Stat cards ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem; box-shadow: var(--shadow-sm); }
.stat .n { font-size: 1.8rem; font-weight: 800; color: var(--primary); }
.stat .l { color: var(--muted); font-size: .88rem; }

/* ---------- Footer ---------- */
.site-footer { background: #0c1a13; color: #cdd8d1; margin-top: 4rem; padding-top: 3rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; padding-bottom: 2rem; }
.footer-grid h4 { color: #fff; font-size: .95rem; margin-bottom: .8rem; }
.footer-grid a { display: block; color: #a9b8af; margin-bottom: .4rem; }
.footer-grid a:hover { color: #fff; }
.brand-footer .brand-text strong { color: #fff; }
.brand-footer .brand-text small { color: #90a096; }
.footer-tag { color: var(--accent); font-weight: 700; letter-spacing: .04em; margin-top: 1rem; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .08); padding: 1.2rem 0; font-size: .82rem; color: #7f9188; }

.muted { color: var(--muted); }
.mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; }
.text-center { text-align: center; }
.empty { text-align: center; color: var(--muted); padding: 3rem 1rem; }

.notif-list { display: flex; flex-direction: column; gap: .8rem; }
.notif-card { display: flex; gap: 1rem; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--radius); padding: 1.1rem 1.2rem; box-shadow: var(--shadow-sm); }
.notif-ico { font-size: 1.4rem; line-height: 1; }
.notif-card p { margin: .3rem 0; }

/* ---------- Calendar ---------- */
.calendar { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.cal-head { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.2rem; border-bottom: 1px solid var(--line); }
.cal-head strong { font-size: 1.05rem; }
.cal-scroll { overflow-x: auto; }
.cal-inner { min-width: 680px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-dow > div { padding: .6rem; text-align: center; font-size: .76rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; background: #f4f7f5; border-left: 1px solid var(--line); }
.cal-dow > div:first-child { border-left: none; }
.cal-cell { min-height: 104px; min-width: 0; overflow: hidden; border-top: 1px solid var(--line); border-left: 1px solid var(--line); padding: .4rem; display: flex; flex-direction: column; gap: .25rem; }
.cal-cell:nth-child(7n+1) { border-left: none; }
.cal-cell.blank { background: #fafbfa; }
.cal-date { font-size: .78rem; color: var(--muted); font-weight: 700; align-self: flex-start; }
.cal-cell.today .cal-date { background: var(--primary); color: #fff; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; }
.cal-ev { display: flex; align-items: center; gap: .35rem; min-width: 0; max-width: 100%; font-size: .72rem; background: #f7f9f7; border: 1px solid var(--line); border-left-width: 3px; border-radius: 6px; padding: .18rem .4rem; color: var(--ink); overflow: hidden; }
.cal-ev .dot { flex: 0 0 auto; }
.cal-ev span { min-width: 0; flex: 1 1 auto; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cal-ev:hover { background: #eef3ef; text-decoration: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .cat-grid { grid-template-columns: repeat(2, 1fr); }
    .steps, .aud-grid, .event-grid { grid-template-columns: 1fr 1fr; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 1100px) {
    .nav-burger { display: block; font-size: 1.5rem; cursor: pointer; color: var(--ink); }
    .site-nav {
        display: none; position: absolute; top: 68px; left: 0; right: 0;
        flex-direction: column; align-items: flex-start; gap: .8rem;
        background: #fff; border-bottom: 1px solid var(--line); padding: 1rem 20px;
    }
    .nav-toggle:checked ~ .site-nav { display: flex; }
    .nav-user { max-width: none; }
}
@media (max-width: 680px) {
    .steps, .aud-grid, .event-grid, .cat-grid, .form-grid, .stat-grid { grid-template-columns: 1fr; }
    .hero-inner { padding: 60px 20px 72px; }

    /* Kalender ringkas: 7 kolom pas layar, tampilkan titik saja */
    .cal-head { flex-wrap: nowrap; gap: .4rem; padding: .7rem .6rem; }
    .cal-head strong { font-size: .92rem; text-align: center; line-height: 1.2; }
    .cal-head .btn { padding: .45rem .7rem; white-space: nowrap; }
    .cal-navtext { display: none; }
    .cal-scroll { overflow-x: hidden; }
    .cal-inner { min-width: 0; }
    .cal-dow > div { padding: .35rem 0; font-size: .58rem; }
    .cal-cell { display: block; min-height: 54px; padding: .2rem; }
    .cal-date { display: block; font-size: .68rem; margin-bottom: .15rem; }
    .cal-cell.today .cal-date { width: 18px; height: 18px; font-size: .62rem; }
    .cal-ev { display: inline-flex; padding: 1px; margin: 1px; background: transparent; border: none; }
    .cal-ev span { display: none; }
    .cal-ev .dot { width: 9px; height: 9px; }
}
