/* ============================================================
   Panel Admin — Asep Nurjaman
   Dark glassmorphism, senada dengan website publik
   ============================================================ */
:root {
  --bg: #07070f;
  --ink: #edeaf9;
  --ink-2: #a9a4cc;
  --muted: #6f6a94;
  --indigo: #4f46e5;
  --violet: #8b5cf6;
  --pink: #ec4899;
  --grad: linear-gradient(120deg, #6366f1 0%, #8b5cf6 50%, #c084fc 100%);
  --grad-btn: linear-gradient(120deg, var(--indigo), var(--violet));
  --glass: rgba(255, 255, 255, 0.045);
  --glass-border: rgba(255, 255, 255, 0.09);
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
.container { width: min(1080px, 100% - 40px); margin-inline: auto; }

.bg-blobs { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(110px); opacity: 0.5; }
.blob-1 { width: 520px; height: 520px; top: -180px; left: -140px; background: radial-gradient(circle, #4f46e5 0%, transparent 70%); }
.blob-2 { width: 560px; height: 560px; top: 15%; right: -240px; background: radial-gradient(circle, #8b5cf6 0%, transparent 70%); }
.blob-3 { width: 460px; height: 460px; bottom: -160px; left: 30%; background: radial-gradient(circle, #ec4899 0%, transparent 70%); opacity: 0.3; }
.grid-overlay {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 30%, transparent 75%);
}

.glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-size: 0.9rem; font-weight: 700;
  padding: 11px 20px; border-radius: 999px;
  border: 1px solid transparent; cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn-sm { padding: 7px 14px; font-size: 0.8rem; }
.btn-primary { background: var(--grad-btn); color: #fff; box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4); }
.btn-primary:hover { transform: translateY(-1px); }
.btn-ghost { background: var(--glass); border-color: rgba(255, 255, 255, 0.16); color: var(--ink); }
.btn-ghost:hover { border-color: rgba(139, 92, 246, 0.6); background: rgba(139, 92, 246, 0.1); }
.btn-danger { background: rgba(244, 63, 94, 0.14); border-color: rgba(244, 63, 94, 0.4); color: #fda4af; }
.btn-danger:hover { background: rgba(244, 63, 94, 0.25); }
.btn-block { width: 100%; }

/* ---------- Halaman login ---------- */
.login-body { display: grid; place-items: center; padding: 40px 16px; }
.login-wrap { width: 100%; max-width: 420px; }
.login-card { border-radius: var(--radius); padding: 38px 34px; box-shadow: var(--shadow); }
.login-brand { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; }
.login-brand h1 { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.02em; }
.login-brand p { color: var(--muted); font-size: 0.85rem; }
.login-error { background: rgba(244, 63, 94, 0.14); border: 1px solid rgba(244, 63, 94, 0.4); color: #fda4af; border-radius: var(--radius-sm); padding: 12px 16px; font-size: 0.9rem; margin-bottom: 18px; }
.login-back { display: block; text-align: center; margin-top: 22px; color: var(--muted); font-size: 0.85rem; }
.login-back:hover { color: var(--ink); }

/* ---------- Header admin ---------- */
.admin-top {
  position: sticky; top: 0; z-index: 50;
  background: rgba(8, 8, 18, 0.7);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--glass-border);
}
.admin-top-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.admin-brand { display: flex; align-items: center; gap: 12px; font-weight: 800; }
.admin-logo { height: 38px; width: auto; border-radius: 10px; display: block; }
.brand-mark {
  width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 11px; background: var(--grad); color: #fff;
  font-weight: 900; font-size: 0.88rem;
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.45);
}
.admin-top-actions { display: flex; gap: 10px; }

/* ---------- Layout utama ---------- */
.admin-main { padding: 30px 0 70px; }
.admin-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.admin-tab {
  font-size: 0.88rem; font-weight: 700;
  color: var(--ink-2);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  padding: 9px 18px;
  transition: 0.2s ease;
}
.admin-tab:hover { color: var(--ink); border-color: rgba(139, 92, 246, 0.5); }
.admin-tab.active { background: var(--grad-btn); color: #fff; border-color: transparent; box-shadow: 0 6px 18px rgba(99, 102, 241, 0.35); }

.flash {
  border-radius: var(--radius-sm);
  padding: 13px 18px;
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 20px;
}
.flash-ok { background: rgba(52, 211, 153, 0.12); border: 1px solid rgba(52, 211, 153, 0.4); color: #6ee7b7; }
.flash-err { background: rgba(244, 63, 94, 0.12); border: 1px solid rgba(244, 63, 94, 0.4); color: #fda4af; }

.admin-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px 30px;
  margin-bottom: 26px;
}
.admin-card-title { font-size: 1.2rem; font-weight: 800; letter-spacing: -0.01em; margin-bottom: 20px; }
.admin-sub-title { font-size: 0.95rem; font-weight: 800; color: #c4b5fd; text-transform: uppercase; letter-spacing: 0.08em; margin: 26px 0 14px; }
.muted { color: var(--ink-2); font-size: 0.85rem; }
.admin-note { font-size: 0.9rem; color: var(--ink-2); }
.admin-note code { background: rgba(139, 92, 246, 0.2); border: 1px solid rgba(139, 92, 246, 0.4); border-radius: 6px; padding: 2px 8px; color: #e0d7ff; }
.admin-help {
  font-size: 0.82rem; color: var(--ink-2); line-height: 1.6;
  background: rgba(139, 92, 246, 0.08);
  border: 1px dashed rgba(139, 92, 246, 0.35);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin: 4px 0 20px;
}

/* ---------- Forms ---------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 0.84rem; font-weight: 700; color: var(--ink); margin-bottom: 7px; }
.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="number"],
.field input[type="file"],
.field select,
.field textarea {
  width: 100%;
  font-family: inherit;
  font-size: 0.93rem;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: rgba(139, 92, 246, 0.7);
  background: rgba(139, 92, 246, 0.08);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15);
}
.field select option { background: #161630; color: var(--ink); }

/* ---------- Daftar item ---------- */
.row-item {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 10px;
}
.row-item:last-child { margin-bottom: 0; }
.row-info { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row-info strong { font-size: 0.95rem; }
.row-thumb { width: 46px; height: 32px; object-fit: cover; border-radius: 6px; border: 1px solid var(--glass-border); flex-shrink: 0; }
.img-current { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.img-current img { width: 110px; height: 70px; object-fit: cover; border-radius: 8px; border: 1px solid var(--glass-border); }
.checkbox { display: inline-flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--ink-2); cursor: pointer; margin: 0; }
.checkbox input { width: auto; }
.row-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.row-actions form { display: inline; }

.hue-dot { width: 34px; height: 22px; border-radius: 7px; display: inline-block; flex-shrink: 0; }
.hue-a { background: linear-gradient(135deg, #4f46e5, #8b5cf6); }
.hue-b { background: linear-gradient(135deg, #0ea5e9, #6366f1); }
.hue-c { background: linear-gradient(135deg, #06b6d4, #38bdf8); }
.hue-d { background: linear-gradient(135deg, #8b5cf6, #d946ef); }
.hue-e { background: linear-gradient(135deg, #7c3aed, #4f46e5); }
.hue-f { background: linear-gradient(135deg, #ec4899, #8b5cf6); }

.hue-select { display: flex; gap: 10px; padding-top: 6px; }
.hue-opt input { display: none; }
.hue-opt .hue-dot { width: 40px; height: 30px; cursor: pointer; border: 2px solid transparent; transition: 0.15s ease; }
.hue-opt input:checked + .hue-dot { border-color: #fff; box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.6); }

/* ---------- Galeri admin ---------- */
.gallery-admin { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.g-admin-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.g-admin-item img { width: 100%; height: 140px; object-fit: cover; display: block; }
.g-admin-info { padding: 12px 14px 4px; }
.g-admin-info strong { display: block; font-size: 0.9rem; }
.g-admin-info .muted { display: block; font-size: 0.78rem; }
.g-admin-item .row-actions { padding: 10px 14px 14px; flex-wrap: wrap; }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .row-item { flex-direction: column; align-items: flex-start; }
  .row-actions { width: 100%; justify-content: flex-end; }
  .admin-card { padding: 22px 18px; }
  .admin-tabs { gap: 6px; }
}
