:root {
  --merah: #e2001a;
  --kuning: #ffd400;
  --putih: #ffffff;
  --hitam: #141414;
  --abu: #6b6b6b;
  --radius: 10px;
  --shadow: 0 6px 24px rgba(0,0,0,.12);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--putih);
  color: var(--hitam);
  min-height: 100vh;
}

h1, h2, h3, .din {
  font-family: 'Oswald', 'Arial Narrow', sans-serif;
  text-transform: uppercase;
  letter-spacing: .02em;
  font-weight: 600;
}

a { color: inherit; }

/* ---------- Top bar ---------- */
.topbar {
  background: var(--hitam);
  color: var(--putih);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow);
}
.topbar .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Oswald', sans-serif;
  font-size: 1.25rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.topbar .brand .dot { color: var(--merah); }
.topbar .brand .dot2 { color: var(--kuning); }
.topbar nav a {
  text-decoration: none;
  color: var(--putih);
  font-size: .85rem;
  padding: 8px 14px;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.25);
  transition: .15s;
}
.topbar nav a:hover { background: var(--merah); border-color: var(--merah); }

/* ---------- Hero / banner ---------- */
.hero {
  background: linear-gradient(135deg, var(--merah) 0%, #b40014 100%);
  color: var(--putih);
  padding: 36px 20px 30px;
  text-align: center;
}
.hero h1 {
  margin: 0 0 6px;
  font-size: clamp(1.6rem, 5vw, 2.6rem);
  color: var(--putih);
}
.hero p {
  margin: 0;
  opacity: .92;
  font-size: clamp(.9rem, 2vw, 1.05rem);
}

.gdrive-banner {
  max-width: 920px;
  margin: 18px auto 0;
  background: var(--kuning);
  color: var(--hitam);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  box-shadow: var(--shadow);
}
.gdrive-banner .label {
  font-weight: 700;
  font-size: .95rem;
}
.gdrive-banner .label small {
  display: block;
  font-weight: 400;
  opacity: .75;
  font-size: .75rem;
  margin-top: 2px;
}
.btn {
  display: inline-block;
  background: var(--hitam);
  color: var(--putih);
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 999px;
  font-family: 'Oswald', sans-serif;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-size: .82rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: .15s;
  white-space: nowrap;
}
.btn:hover { background: var(--merah); }
.btn.btn-outline {
  background: transparent;
  color: var(--hitam);
  border: 2px solid var(--hitam);
}
.btn.btn-outline:hover { background: var(--hitam); color: var(--putih); }
.btn.btn-disabled { background: #d8d8d8; color: #888; cursor: not-allowed; }

.gdrive-empty {
  text-align: center;
  color: #6a5600;
  font-size: .85rem;
}

/* ---------- Gallery grid ---------- */
.container { max-width: 1280px; margin: 0 auto; padding: 24px 18px 60px; }

.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 8px;
}
.section-title h2 { margin: 0; font-size: 1.3rem; }
.section-title .count { color: var(--abu); font-size: .85rem; }

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

.photo-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: #eee;
  aspect-ratio: 1 / 1;
  box-shadow: 0 2px 10px rgba(0,0,0,.08);
  cursor: pointer;
}
.photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .2s;
}
.photo-card:hover img { transform: scale(1.05); }
.photo-card .badge {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(20,20,20,.65);
  color: var(--putih);
  font-size: .65rem;
  padding: 2px 6px;
  border-radius: 6px;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--abu);
}
.empty-state .icon { font-size: 3rem; margin-bottom: 10px; }

/* ---------- Pagination ---------- */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}
.pagination button {
  background: var(--putih);
  border: 2px solid var(--hitam);
  color: var(--hitam);
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
}
.pagination button:disabled { opacity: .35; cursor: not-allowed; }
.pagination button.active { background: var(--merah); border-color: var(--merah); color: var(--putih); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(10,10,10,.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 96vw; max-height: 90vh; border-radius: 6px; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.lightbox .close {
  position: absolute; top: 18px; right: 22px;
  color: var(--putih); font-size: 2rem; cursor: pointer; line-height: 1;
}

/* ---------- Footer ---------- */
footer {
  background: var(--hitam);
  color: #bdbdbd;
  text-align: center;
  padding: 18px;
  font-size: .78rem;
}
footer .accent { color: var(--kuning); }

/* ---------- Admin ---------- */
.admin-wrap {
  max-width: 920px;
  margin: 40px auto;
  padding: 0 16px;
}
.card {
  background: var(--putih);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 20px;
  border-top: 4px solid var(--merah);
}
.card h2 { margin-top: 0; font-size: 1.1rem; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: .8rem; color: var(--abu); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .04em; }
.field input, .field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  font-size: .95rem;
  font-family: inherit;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--merah); }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.stat-box { background: #fafafa; border-radius: 8px; padding: 14px; text-align: center; }
.stat-box .num { font-family: 'Oswald', sans-serif; font-size: 1.8rem; color: var(--merah); }
.stat-box .lbl { font-size: .75rem; color: var(--abu); text-transform: uppercase; }
.msg { padding: 10px 14px; border-radius: 8px; font-size: .85rem; margin-bottom: 14px; }
.msg.ok { background: #e7f6e9; color: #1a7a2e; }
.msg.err { background: #fde8e8; color: var(--merah); }
.login-box {
  max-width: 380px;
  margin: 80px auto;
  padding: 0 16px;
}
table.recent { width: 100%; border-collapse: collapse; font-size: .85rem; }
table.recent th, table.recent td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #eee; }
table.recent th { color: var(--abu); text-transform: uppercase; font-size: .7rem; }
.recent-thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; vertical-align: middle; margin-right: 8px; }
