/* ========== DASAR ========== */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --p: #6b3410; --pd: #3b1c08; --pl: #f5ece3;
  --dark: #141110; --cream: #faf6f1;
  --muted: #6f655d; --line: #e8ddd2; --bg: #f7f2ec;
  --grad-brown: linear-gradient(135deg, #8a4a1f 0%, #5e2a0b 45%, #141110 100%);
  --grad-light: linear-gradient(180deg, #f3e6d8 0%, #faf6f1 55%, #fff 100%);
  --grad-dark: linear-gradient(180deg, #1c1512 0%, #2b1a10 55%, #4a250d 100%);
}
body { font-family: "Segoe UI", Arial, sans-serif; color: #1f1a17; background: #fff; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.btn { display: inline-block; padding: 11px 22px; border-radius: 8px; font-weight: 600; font-size: 15px; border: 0; cursor: pointer; font-family: inherit; }
.btn-p { background: var(--grad-brown); color: #fff; }
.btn-p:hover { background: var(--pd); }
.btn-o { border: 1.5px solid var(--p); color: var(--p); background: #fff; }
.btn-w { background: #fff; color: var(--p); }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-danger { background: #dc2626; color: #fff; }
.logo { font-weight: 800; font-size: 20px; color: var(--p); display: flex; align-items: center; gap: 10px; }
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 18px; font-size: 14px; }
.alert-success { background: #dcfce7; color: #15803d; }
.alert-error { background: #fee2e2; color: #b91c1c; }

/* ========== LANDING: NAVBAR & FOOTER ========== */
.navbar { border-bottom: 3px solid transparent; border-image: var(--grad-brown) 1; background: #fff; position: sticky; top: 0; z-index: 10; }
.navbar .container { display: flex; justify-content: space-between; align-items: center; height: 72px; }
.navbar ul { display: flex; gap: 30px; list-style: none; font-size: 15px; color: #3a302a; }
.navbar ul a.active, .navbar ul a:hover { color: var(--p); font-weight: 600; }
.footer { background: var(--grad-dark); padding: 24px 0; color: #d9c7b5; font-size: 14px; margin-top: 40px; }
.footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* ========== LANDING: HERO & SECTION ========== */
.hero { background: var(--grad-light); padding: 70px 0; }
.hero .container { display: flex; align-items: center; gap: 50px; }
.hero .txt { flex: 1; }
.hero .img { flex: 1; }
.hero .img img { border-radius: 16px; box-shadow: 0 20px 50px rgba(59, 28, 8, .28); }
.tag { display: inline-block; background: var(--pl); color: var(--p); padding: 6px 14px; border-radius: 20px; font-size: 13px; font-weight: 600; margin-bottom: 18px; }
.hero h1 { font-size: 44px; line-height: 1.2; margin-bottom: 18px; }
.hero h1 b { color: var(--p); }
.hero p { color: var(--muted); font-size: 17px; line-height: 1.7; margin-bottom: 28px; }
.hero .btns { display: flex; gap: 14px; flex-wrap: wrap; }

/* ===== Logo harimau interaktif (beranda) ===== */
.harimau { --rx: 0deg; --ry: 0deg; position: relative; width: 230px; margin: 0 auto 24px; perspective: 700px; cursor: pointer; outline: none;
  animation: harimauMasuk .9s cubic-bezier(.34, 1.56, .64, 1) both; }
.hero .img .harimau-logo { display: block; width: 100%; height: auto; border-radius: 0; box-shadow: none;
  transform: rotateX(var(--rx)) rotateY(var(--ry)); transition: transform .25s ease-out, filter .3s ease;
  filter: drop-shadow(0 14px 24px rgba(59, 28, 8, .35)); animation: harimauNapas 3.2s ease-in-out .9s infinite; user-select: none; }
.harimau:hover .harimau-logo, .harimau:focus-visible .harimau-logo { filter: drop-shadow(0 18px 30px rgba(59, 28, 8, .45)) brightness(1.08); }
.harimau-cincin { position: absolute; inset: 12%; border-radius: 50%; border: 3px solid var(--p); opacity: 0; pointer-events: none; }
.harimau-aum { position: absolute; top: -8px; right: -24px; padding: 6px 14px; border-radius: 999px; background: var(--p); color: #fff;
  font-weight: 800; letter-spacing: 1px; opacity: 0; transform: scale(.4) rotate(-12deg); pointer-events: none; }
.harimau.mengaum { animation: harimauGetar .6s ease; }
.harimau.mengaum .harimau-cincin { animation: harimauCincin .7s ease-out; }
.harimau.mengaum .harimau-aum { animation: harimauAum 1s ease; }
@keyframes harimauMasuk { 0% { opacity: 0; transform: translateY(40px) scale(.5); } 100% { opacity: 1; transform: none; } }
@keyframes harimauNapas { 0%, 100% { scale: 1; translate: 0 0; } 50% { scale: 1.03; translate: 0 -8px; } }
@keyframes harimauGetar { 0%, 100% { transform: none; } 15% { transform: scale(1.15) rotate(-4deg); } 30% { transform: scale(1.15) rotate(4deg); }
  45% { transform: scale(1.12) rotate(-3deg); } 60% { transform: scale(1.1) rotate(3deg); } 80% { transform: scale(1.04) rotate(-1deg); } }
@keyframes harimauCincin { 0% { opacity: .8; transform: scale(.8); } 100% { opacity: 0; transform: scale(1.8); } }
@keyframes harimauAum { 0% { opacity: 0; transform: scale(.4) rotate(-12deg); } 25% { opacity: 1; transform: scale(1.15) rotate(-6deg); }
  75% { opacity: 1; transform: scale(1) rotate(-6deg); } 100% { opacity: 0; transform: translateY(-14px) scale(.9) rotate(-6deg); } }
@media (prefers-reduced-motion: reduce) { .harimau, .hero .img .harimau-logo, .harimau.mengaum { animation: none; } .harimau-logo { transform: none; } }
.page-head { background: var(--grad-light); padding: 50px 0 30px; text-align: center; }
.page-head h1 { font-size: 36px; margin-bottom: 8px; }
.logo-gudep { width: 140px; height: auto; margin: 10px auto 14px; filter: drop-shadow(0 8px 18px rgba(59, 28, 8, .25));
  animation: logoMasuk 1s cubic-bezier(.34, 1.56, .64, 1) both, logoMelayang 3.5s ease-in-out 1s infinite;
  transition: scale .4s ease, rotate .4s ease, filter .4s ease; cursor: pointer; }
.logo-gudep:hover { scale: 1.1; rotate: -6deg; filter: drop-shadow(0 12px 26px rgba(59, 28, 8, .4)); }
@keyframes logoMasuk { 0% { opacity: 0; transform: scale(.3) rotate(-180deg); } 100% { opacity: 1; transform: scale(1) rotate(0); } }
@keyframes logoMelayang { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@media (prefers-reduced-motion: reduce) { .logo-gudep { animation: none; } }
.page-head p { color: var(--muted); }
.sec { padding: 60px 0; }
.sec-title { text-align: center; margin-bottom: 36px; }
.sec-title h2 { font-size: 30px; margin-bottom: 8px; }
.sec-title p { color: var(--muted); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.card img { width: 100%; height: 210px; object-fit: cover; }
.card .body { padding: 18px; }
.card h3 { font-size: 17px; margin-bottom: 6px; }
.card p { color: var(--muted); font-size: 14px; line-height: 1.6; }
.badge { display: inline-block; padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; background: var(--pl); color: var(--p); margin-bottom: 8px; }
.badge-g { background: #dcfce7; color: #15803d; }
.badge-y { background: #fef3c7; color: #b45309; }
.badge-r { background: #fee2e2; color: #b91c1c; }
.empty { text-align: center; color: var(--muted); padding: 40px; border: 1px dashed var(--line); border-radius: 12px; }
.cta { background: var(--grad-brown); color: #fff; border-radius: 16px; padding: 40px; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.cta h2 { font-size: 26px; }
.cta p { opacity: .9; margin-top: 6px; }

/* Profil */
.profil-box { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.box { border: 1px solid var(--line); border-radius: 12px; padding: 26px; background: #fff; }
.box h3 { color: var(--p); margin-bottom: 12px; }
.box p, .box li { color: #3a302a; line-height: 1.8; }
.box ol { padding-left: 20px; }

/* Jadwal */
.jadwal-wrap { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; align-items: start; }
.jadwal-item { padding: 12px 0; border-bottom: 1px solid var(--line); }
.jadwal-item:last-child { border: 0; }
.jadwal-item b { display: block; }
.jadwal-item small { color: var(--muted); }
#detail-kegiatan { display: none; margin-top: 18px; background: var(--pl); border-radius: 12px; padding: 18px; }
#detail-kegiatan h4 { margin-bottom: 6px; }
#detail-kegiatan p { font-size: 14px; line-height: 1.7; }

/* Dokumentasi */
.tahun { font-size: 24px; margin: 30px 0 16px; padding-left: 12px; border-left: 4px solid var(--p); }

/* ========== LOGIN ========== */
.login-page { display: flex; min-height: 100vh; }
.login-left { flex: 1; background: var(--grad-brown); color: #fff; padding: 60px; display: flex; flex-direction: column; justify-content: space-between; }
.login-left .logo { color: #fff; }
.login-left h2 { font-size: 36px; line-height: 1.3; margin-bottom: 14px; }
.login-left p { opacity: .85; line-height: 1.7; max-width: 420px; }
.login-right { flex: 1; display: grid; place-items: center; padding: 24px; }
.login-right form { width: 100%; max-width: 400px; }
.login-right h1 { font-size: 30px; margin-bottom: 6px; }
.login-right .sub { color: var(--muted); margin-bottom: 30px; }

/* ========== FORM ========== */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 7px; }
.form-control { width: 100%; border: 1.5px solid var(--line); border-radius: 8px; padding: 11px 14px; font-size: 15px; font-family: inherit; }
.form-control:focus { outline: none; border-color: var(--p); box-shadow: 0 0 0 3px var(--pl); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.error { color: #dc2626; font-size: 13px; margin-top: 5px; display: block; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); margin-bottom: 22px; }

/* ========== ADMIN ========== */
.admin { display: flex; min-height: 100vh; background: var(--bg); }
.sidebar { width: 250px; background: var(--grad-dark); color: #f3e6d8; padding: 24px 16px; flex-shrink: 0; }
.sidebar .logo { padding: 0 10px; margin-bottom: 30px; font-size: 17px; white-space: nowrap; color: #fff; }
.menu-title { font-size: 11px; color: #a8927e; font-weight: 700; letter-spacing: .08em; padding: 0 12px; margin: 18px 0 8px; }
.menu { display: block; padding: 11px 12px; border-radius: 8px; font-size: 15px; color: #e6d6c6; margin-bottom: 2px; }
.menu:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.menu.active { background: linear-gradient(90deg, #8a4a1f, #5e2a0b); color: #fff; font-weight: 600; }
.menu-logout { width: 100%; text-align: left; background: none; border: 0; color: #f87171; cursor: pointer; font-family: inherit; }
.main { flex: 1; padding: 26px 32px; min-width: 0; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.topbar h1 { font-size: 24px; }
.topbar p { color: var(--muted); font-size: 14px; margin-top: 2px; }
.user { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--pl); color: var(--p); display: grid; place-items: center; font-weight: 700; }
.stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; margin-bottom: 22px; }
.stat { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--p); border-radius: 12px; padding: 18px; }
.stat small { color: var(--muted); font-size: 13px; }
.stat h3 { font-size: 28px; margin-top: 6px; color: var(--pd); }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 20px; margin-bottom: 22px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.panel-head h4 { font-size: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--muted); font-weight: 600; font-size: 13px; padding: 10px; background: var(--cream); }
td { padding: 12px 10px; border-top: 1px solid #f1e9e1; vertical-align: middle; }
td img { width: 70px; height: 50px; object-fit: cover; border-radius: 6px; }
.aksi { display: flex; gap: 10px; align-items: center; }
.aksi a { color: var(--p); font-weight: 600; }
.aksi button { background: none; border: 0; color: #dc2626; font-weight: 600; cursor: pointer; font-size: 14px; font-family: inherit; }
.color-dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; vertical-align: -2px; }

/* ========== POPUP VIDEO ========== */
.popup { display: none; position: fixed; inset: 0; z-index: 100; background: rgba(20, 17, 16, .8); padding: 16px; place-items: center; }
.popup.show { display: grid; }
.popup-box { position: relative; width: 100%; max-width: 760px; background: var(--grad-brown); padding: 8px; border-radius: 14px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.popup-box video { width: 100%; max-height: 80vh; border-radius: 10px; background: #000; display: block; }

/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
  .hero .container, .jadwal-wrap, .profil-box, .grid-2 { display: block; }
  .hero .img { margin-top: 30px; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .navbar ul { gap: 14px; font-size: 14px; }
  .login-left { display: none; }
  .admin { display: block; }
  .sidebar { width: 100%; }
}
@media (max-width: 600px) {
  .grid-3, .form-row { grid-template-columns: 1fr; }
  .navbar .container { flex-wrap: wrap; height: auto; padding: 14px 24px; gap: 10px; }
  .hero h1 { font-size: 32px; }
}

/* ========== PENYEMPURNAAN TAMPILAN ========== */
:root { --shadow-sm: 0 1px 2px rgba(59, 28, 8, .06), 0 2px 8px rgba(59, 28, 8, .05);
  --shadow-md: 0 10px 30px rgba(59, 28, 8, .12); --radius: 14px; }
html { scroll-behavior: smooth; }
body { font-family: "Plus Jakarta Sans", "Segoe UI", Arial, sans-serif; line-height: 1.5; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { letter-spacing: -.02em; color: #1f1a17; }

/* Logo */
.logo { letter-spacing: -.01em; }
.logo-img { width: 36px; height: 36px; object-fit: contain; }
.sidebar .logo-img, .login-left .logo-img { filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .35)); }

/* Tombol */
.btn { border-radius: 10px; transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease; text-align: center; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: none; }
.btn-p { box-shadow: 0 6px 16px rgba(107, 52, 16, .28); }
.btn-p:hover { box-shadow: 0 10px 22px rgba(107, 52, 16, .35); }
.btn-o:hover { background: var(--p); color: #fff; }
.btn-w:hover { box-shadow: 0 8px 20px rgba(0, 0, 0, .2); }
.btn:focus-visible, .menu:focus-visible { outline: 3px solid #d9a77c; outline-offset: 2px; }

/* Navbar */
.navbar { background: rgba(255, 255, 255, .88); backdrop-filter: saturate(160%) blur(10px); -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line); border-image: none; box-shadow: 0 1px 0 rgba(59, 28, 8, .03); }
.navbar ul a { position: relative; padding: 6px 0; font-weight: 500; transition: color .2s; }
.navbar ul a.active, .navbar ul a:hover { font-weight: 500; }
.navbar ul a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; border-radius: 2px;
  background: var(--p); transform: scaleX(0); transition: transform .25s ease; }
.navbar ul a.active::after, .navbar ul a:hover::after { transform: scaleX(1); }

/* Hero & judul */
.hero { padding: 80px 0; }
.hero h1 { font-size: 48px; line-height: 1.15; font-weight: 800; }
.tag { letter-spacing: .02em; border: 1px solid #ead7c4; }
.page-head { padding: 60px 0 36px; }
.page-head h1 { font-weight: 800; }
.sec { padding: 72px 0; }
.sec-title h2 { font-size: 32px; font-weight: 800; }
.sec-title h2::after { content: ""; display: block; width: 48px; height: 4px; border-radius: 4px; background: var(--grad-brown); margin: 12px auto 0; }

/* Kartu & kotak */
.card, .box, .panel, .stat { border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card { transition: transform .25s ease, box-shadow .25s ease; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card img { transition: transform .4s ease; }
.card:hover img { transform: scale(1.04); }
.card > a, .card { overflow: hidden; }
.card > a { display: block; }
.card .body { padding: 20px; }
.box h3 { font-size: 18px; }
.hero .box { margin-top: 8px; }
.jadwal-item b { font-weight: 600; margin-bottom: 2px; }
.empty { background: var(--cream); }
.cta { padding: 44px 48px; box-shadow: var(--shadow-md); position: relative; overflow: hidden; }
.cta::before { content: ""; position: absolute; width: 260px; height: 260px; right: -60px; top: -120px; border-radius: 50%; background: rgba(255, 255, 255, .07); }
.cta > * { position: relative; }
.footer { margin-top: 72px; padding: 28px 0; }

/* Login */
.login-left { position: relative; overflow: hidden; }
.login-left::after { content: ""; position: absolute; width: 420px; height: 420px; right: -140px; bottom: -140px; border-radius: 50%; background: rgba(255, 255, 255, .06); }
.login-left h2 { color: #fff; font-weight: 800; }
.login-right { background: var(--cream); }
.login-right form { background: #fff; padding: 36px; border-radius: 18px; box-shadow: var(--shadow-md); border: 1px solid var(--line); }
.login-right h1 { font-weight: 800; }

/* Form */
.form-control { border-radius: 10px; background: #fff; transition: border-color .2s, box-shadow .2s; }
.form-control:hover { border-color: #d8c6b4; }

/* Admin */
.sidebar { box-shadow: 4px 0 24px rgba(0, 0, 0, .12); position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.menu { transition: background .2s, color .2s, padding-left .2s; font-size: 14.5px; }
.menu:hover { padding-left: 16px; }
.menu.active { box-shadow: 0 6px 14px rgba(0, 0, 0, .25); }
.menu-logout:hover { background: rgba(248, 113, 113, .12); color: #fca5a5; }
.main { padding: 30px 36px; }
.topbar { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 22px; box-shadow: var(--shadow-sm); }
.topbar h1 { font-weight: 800; }
.avatar { background: var(--grad-brown); color: #fff; }
.stat { border-top: 0; position: relative; overflow: hidden; transition: transform .2s, box-shadow .2s; }
.stat::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--grad-brown); }
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat small { font-weight: 600; text-transform: uppercase; letter-spacing: .06em; font-size: 11.5px; }
.stat h3 { font-size: 30px; font-weight: 800; }
.panel { padding: 22px 24px; }
.panel-head h4 { font-weight: 700; }
th { text-transform: uppercase; letter-spacing: .05em; font-size: 11.5px; }
th:first-child { border-top-left-radius: 8px; } th:last-child { border-top-right-radius: 8px; }
tr { transition: background .15s; }
tr:hover td { background: #fcf8f4; }
.aksi a, .aksi button { padding: 5px 10px; border-radius: 6px; font-size: 13px; transition: background .15s; }
.aksi a { background: var(--pl); }
.aksi a:hover { background: #ecdccb; }
.aksi button { background: #fef2f2; }
.aksi button:hover { background: #fee2e2; }
.alert { border-radius: 10px; border-left: 4px solid currentColor; }

/* FullCalendar selaras tema */
.fc .fc-button-primary { background: var(--p); border-color: var(--p); text-transform: capitalize; }
.fc .fc-button-primary:hover, .fc .fc-button-primary:not(:disabled).fc-button-active { background: var(--pd); border-color: var(--pd); }
.fc .fc-toolbar-title { font-size: 20px; font-weight: 700; }
.fc .fc-day-today { background: var(--pl) !important; }

@media (max-width: 900px) {
  .sidebar { position: static; height: auto; }
  .hero h1 { font-size: 38px; }
}
@media (max-width: 600px) {
  .topbar { flex-direction: column; align-items: flex-start; gap: 12px; }
  .cta { padding: 32px 24px; }
  .login-right form { padding: 26px 20px; }
}

/* ========== SUSUNAN PENGURUS (BAGAN) ========== */
.foto-bulat { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; display: inline-grid; place-items: center; }
td img.foto-bulat { width: 44px; height: 44px; border-radius: 50%; }
.foto-inisial { background: var(--grad-brown); color: #fff; font-weight: 700; font-size: 15px; letter-spacing: .02em; }
.sec-bagan { background: var(--grad-light); }
.bagan { --garis: #c9a689; --jarak: 26px; overflow-x: auto; padding-bottom: 8px; }
.bagan-baris { display: flex; justify-content: center; position: relative; padding-top: calc(var(--jarak) * 2); }
.bagan-baris:first-child { padding-top: 0; }
/* garis vertikal dari baris atas ke garis horizontal */
.bagan-baris:not(:first-child)::before { content: ""; position: absolute; top: 0; left: 50%; height: var(--jarak); border-left: 2px solid var(--garis); }
.bagan-item { position: relative; padding: 0 12px; flex: 0 0 auto; }
/* tiang kecil di atas setiap kartu + garis horizontal penghubung */
.bagan-baris:not(:first-child) .bagan-item::before { content: ""; position: absolute; top: calc(var(--jarak) * -1); left: 50%; height: var(--jarak); border-left: 2px solid var(--garis); }
.bagan-baris:not(:first-child) .bagan-item::after { content: ""; position: absolute; top: calc(var(--jarak) * -1); left: 0; right: 0; border-top: 2px solid var(--garis); }
.bagan-baris .bagan-item:first-child::after { left: 50%; }
.bagan-baris .bagan-item:last-child::after { right: 50%; }
.bagan-baris .bagan-item:only-child::after { display: none; }
.bagan-kartu { width: 190px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 22px 16px 18px; text-align: center;
  box-shadow: var(--shadow-sm); transition: transform .25s ease, box-shadow .25s ease; position: relative; }
.bagan-kartu:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.bagan-foto { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; margin: 0 auto 12px; display: grid; place-items: center;
  border: 4px solid #fff; box-shadow: 0 0 0 2px var(--p), 0 8px 18px rgba(59, 28, 8, .2); font-size: 28px; }
.bagan-jabatan { display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--p);
  background: var(--pl); padding: 4px 10px; border-radius: 999px; margin-bottom: 8px; }
.bagan-kartu h4 { font-size: 15.5px; line-height: 1.3; }
.bagan-kartu small { display: block; color: var(--muted); font-size: 13px; margin-top: 4px; }
/* pembina & ketua sedikit lebih menonjol */
.bagan-pembina .bagan-kartu { width: 210px; background: var(--grad-brown); border: 0; }
.bagan-pembina .bagan-kartu h4 { color: #fff; }
.bagan-pembina .bagan-kartu small { color: #e9d6c4; }
.bagan-pembina .bagan-jabatan { background: rgba(255, 255, 255, .15); color: #fff; }
.bagan-pembina .bagan-foto { width: 108px; height: 108px; box-shadow: 0 0 0 2px #e6c4a5, 0 8px 18px rgba(0, 0, 0, .3); }
.bagan-ketua .bagan-kartu { border-top: 4px solid var(--p); }

@media (max-width: 700px) {
  /* di layar kecil kartu turun ke bawah, garis disembunyikan agar tetap rapi */
  .bagan-baris { flex-wrap: wrap; gap: 16px; padding-top: 24px; }
  .bagan-baris::before, .bagan-item::before, .bagan-item::after { display: none !important; }
  .bagan-item { padding: 0; }
  .bagan-kartu, .bagan-pembina .bagan-kartu { width: 160px; }
}

/* =====================================================================
   RESPONSIF SEMUA DEVICE
   Desktop > 1200px · Laptop ≤ 1200px · Tablet ≤ 900px · HP ≤ 600px · HP kecil ≤ 400px
   ===================================================================== */
html, body { overflow-x: clip; }           /* cegah geser ke samping di HP */
img, video { max-width: 100%; }

/* Navbar desktop: menu & tombol login di kanan */
.nav-menu { display: flex; align-items: center; gap: 32px; margin-left: auto; }

/* Tombol hamburger (3 garis, tanpa ikon gambar) */
.nav-toggle { display: none; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 10px; background: #fff;
  cursor: pointer; flex-direction: column; justify-content: center; align-items: center; gap: 5px; flex-shrink: 0; }
.nav-toggle span { display: block; width: 20px; height: 2px; border-radius: 2px; background: var(--pd); transition: transform .25s ease, opacity .2s ease; }
.navbar.open .nav-toggle span:nth-child(1), .sidebar-open .sidebar-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar.open .nav-toggle span:nth-child(2), .sidebar-open .sidebar-toggle span:nth-child(2) { opacity: 0; }
.navbar.open .nav-toggle span:nth-child(3), .sidebar-open .sidebar-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.topbar { gap: 16px; }
.topbar-judul { flex: 1; min-width: 0; }
.sidebar-overlay { display: none; }
.panel-head { gap: 12px; flex-wrap: wrap; }

/* ---------- Laptop ---------- */
@media (max-width: 1200px) {
  .stats { grid-template-columns: repeat(3, 1fr); }
  .hero h1 { font-size: 42px; }
}

/* ---------- Tablet ---------- */
@media (max-width: 900px) {
  .container { padding: 0 20px; }

  /* Navbar jadi menu hamburger */
  .navbar .container { height: 64px; flex-wrap: nowrap; padding: 0 20px; }
  .nav-toggle { display: flex; }
  .nav-menu { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 16px 30px rgba(59, 28, 8, .12);
    padding: 8px 20px 18px; visibility: hidden; opacity: 0; transform: translateY(-8px); transition: opacity .2s ease, transform .2s ease, visibility .2s; }
  .navbar.open .nav-menu { visibility: visible; opacity: 1; transform: none; }
  .navbar ul { flex-direction: column; gap: 0; font-size: 15px; }
  .navbar ul a { display: block; padding: 13px 4px; border-bottom: 1px solid #f3ebe3; }
  .navbar ul a::after { display: none; }
  .navbar ul a.active { color: var(--p); font-weight: 700; }
  .nav-menu .btn { margin-top: 14px; width: 100%; padding: 12px; }

  /* Hero */
  .hero { padding: 48px 0 56px; }
  .hero .txt { text-align: center; }
  .hero .btns { justify-content: center; }
  .hero h1 { font-size: 36px; }
  .hero .img { margin-top: 36px; max-width: 520px; margin-left: auto; margin-right: auto; }
  .sec { padding: 56px 0; }
  .grid-3 { gap: 18px; }

  /* Admin: sidebar geser dari kiri */
  .admin { display: block; }
  .sidebar { position: fixed; top: 0; left: 0; bottom: 0; width: 270px; height: 100vh; z-index: 60;
    transform: translateX(-100%); transition: transform .3s ease; }
  .sidebar-open .sidebar { transform: none; }
  .sidebar-overlay { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(20, 17, 16, .5);
    opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility .3s; }
  .sidebar-open .sidebar-overlay { opacity: 1; visibility: visible; }
  .sidebar-toggle { display: flex; }
  .main { padding: 20px; }
  .topbar { position: sticky; top: 10px; z-index: 20; }

  /* Kalender */
  .fc .fc-toolbar { flex-wrap: wrap; gap: 10px; justify-content: center; }
  .fc .fc-toolbar-title { font-size: 18px; }
}

/* ---------- HP ---------- */
@media (max-width: 600px) {
  .container { padding: 0 16px; }
  .navbar .container { padding: 0 16px; gap: 10px; height: 60px; }
  .logo { font-size: 17px; }
  .logo-img { width: 32px; height: 32px; }

  .hero { padding: 36px 0 44px; }
  .hero h1 { font-size: 30px; }
  .hero p { font-size: 15.5px; }
  .hero .btns { flex-direction: column; }
  .hero .btns .btn { width: 100%; }
  .harimau { width: 180px; }
  .harimau-aum { right: -6px; }
  .tag { font-size: 12px; }

  .page-head { padding: 40px 0 24px; }
  .page-head h1 { font-size: 26px; padding: 0 16px; }
  .page-head p { padding: 0 16px; font-size: 14.5px; }
  .logo-gudep { width: 110px; }
  .sec { padding: 44px 0; }
  .sec-title { margin-bottom: 26px; }
  .sec-title h2 { font-size: 25px; }
  .sec-title p { font-size: 14.5px; }
  .box { padding: 20px; }
  .card img { height: 190px; }
  .tahun { font-size: 20px; }
  .cta { flex-direction: column; align-items: stretch; text-align: center; padding: 30px 22px; }
  .cta h2 { font-size: 22px; }
  .cta .btn { width: 100%; }
  .footer { margin-top: 48px; }
  .footer .container { flex-direction: column; text-align: center; }

  /* Login */
  .login-right { padding: 20px 16px; align-items: start; padding-top: 40px; }
  .login-right form { padding: 26px 20px; }
  .login-right h1 { font-size: 26px; }

  /* Admin */
  .main { padding: 12px; }
  .topbar { flex-direction: row; align-items: center; flex-wrap: nowrap; padding: 12px 14px; gap: 12px; top: 8px; margin-bottom: 16px; }
  .topbar h1 { font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar p { display: none; }
  .user > div:last-child { display: none; }   /* sisakan avatar saja */
  .avatar { width: 34px; height: 34px; }
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 14px; }
  .stat h3 { font-size: 24px; }
  .panel { padding: 16px; margin-bottom: 16px; }
  .panel-head .btn { flex: 1 1 auto; }
  table { font-size: 13px; }
  th { padding: 8px; }
  td { padding: 10px 8px; }
  .table-wrap table { min-width: 560px; }      /* tabel bisa digeser ke samping */
  .grid-2 .table-wrap table { min-width: 0; }
  .aksi { gap: 6px; }
  .panel form > div[style*="display:flex"] { flex-wrap: wrap; }
  .panel form .btn { flex: 1 1 auto; }

  /* Kalender */
  .fc .fc-toolbar { flex-direction: column; }
  .fc .fc-toolbar-title { font-size: 16px; }
  .fc .fc-button { padding: 5px 9px; font-size: 13px; }
  .fc .fc-daygrid-event { font-size: 11px; }

  .popup { padding: 10px; }
}

/* ---------- HP kecil ---------- */
@media (max-width: 400px) {
  .hero h1 { font-size: 26px; }
  .logo { font-size: 15px; gap: 8px; }
  .bagan-kartu, .bagan-pembina .bagan-kartu { width: 100%; max-width: 260px; }
  .bagan-item { flex: 1 1 100%; display: flex; justify-content: center; }
  .stat small { font-size: 10.5px; }
}

/* Jarak antar kotak saat kolom ditumpuk (tablet & HP) */
@media (max-width: 900px) {
  .profil-box > * + *, .jadwal-wrap > * + *, .grid-2 > * + *, .hero .img > * + * { margin-top: 18px; }
}

/* Bagan: baris selebar isinya agar tidak terpotong; bila terlalu panjang bisa digeser */
.bagan-baris { width: max-content; min-width: 100%; }
@media (max-width: 1100px) {
  .bagan-item { padding: 0 7px; }
  .bagan-kartu { width: 158px; padding: 18px 12px 16px; }
  .bagan-pembina .bagan-kartu { width: 175px; }
  .bagan-foto { width: 80px; height: 80px; font-size: 24px; }
  .bagan-pembina .bagan-foto { width: 90px; height: 90px; }
  .bagan-jabatan { font-size: 10.5px; padding: 4px 8px; }
}
@media (max-width: 700px) {
  .bagan-baris { width: auto; min-width: 0; }
}

/* Bagan di HP: 2 kartu per baris, ringkas */
@media (max-width: 700px) {
  .bagan-baris { gap: 12px; padding-top: 12px; }
  .bagan-baris:first-child { padding-top: 0; }
  .bagan-item, .bagan-baris .bagan-item { flex: 0 0 calc(50% - 6px); max-width: 220px; padding: 0; display: block; }
  .bagan-kartu, .bagan-pembina .bagan-kartu { width: 100%; max-width: none; height: 100%; padding: 16px 10px 14px; }
  .bagan-foto, .bagan-pembina .bagan-foto { width: 72px; height: 72px; font-size: 22px; margin-bottom: 10px; }
  .bagan-jabatan { font-size: 10px; letter-spacing: .04em; }
  .bagan-kartu h4 { font-size: 14px; }
  .bagan-kartu small { font-size: 12px; }
}
@media (max-width: 340px) {
  .bagan-item, .bagan-baris .bagan-item { flex-basis: 100%; }
}

/* ===== Login: keamanan anti-bot ===== */
.hp-field { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.pass-wrap { position: relative; }
.pass-wrap .form-control { padding-right: 46px; }
.pass-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0; background: none; border-radius: 6px; cursor: pointer; display: grid; place-items: center; color: var(--muted); }
.pass-toggle:hover { background: var(--pl); color: var(--p); }
.pass-toggle[aria-pressed="true"] { color: var(--p); }
.pass-toggle svg, .captcha-refresh svg, .secure-note svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.caps-warn { display: block; color: #b45309; font-size: 13px; margin-top: 5px; }
.caps-warn[hidden] { display: none; }
.captcha-group { background: var(--cream); border: 1px dashed var(--line); border-radius: 10px; padding: 14px; }
.captcha-help { font-size: 13px; color: var(--muted); margin: -2px 0 10px; }
.captcha-box { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.captcha-box img { flex: 1 1 auto; min-width: 0; width: 100%; max-width: 240px; height: auto; border: 1.5px solid var(--line); border-radius: 8px; background: #faf6f1; }
.captcha-refresh { flex: none; width: 42px; height: 42px; border: 1.5px solid var(--line); border-radius: 8px; background: #fff; color: var(--p); cursor: pointer; display: grid; place-items: center; }
.captcha-refresh:hover { border-color: var(--p); background: var(--pl); }
.lock-alert b { font-variant-numeric: tabular-nums; }
#loginBtn:disabled { opacity: .6; cursor: not-allowed; }
.secure-note { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 16px; font-size: 12px; color: var(--muted); }
.secure-note svg { width: 14px; height: 14px; }
