/* =========================================================
   Panel Admin â€” "INK & BRASS"
   Mengandalkan design token dari css/style.css
   Â· sidebar ink pekat dengan indikator emas
   Â· konten terang, panel kartu hairline
   Â· aksen emas + glow aqua (senada situs publik)
   ========================================================= */

.admin-body {
  min-height: 100vh;
  background: var(--bg-alt);
}
.admin-body .btn { border-radius: 999px; }

/* =========================================================
   1) LOGIN â€” layar terbagi ink + formulir
   ========================================================= */
.login {
  min-height: 100vh; display: grid; place-items: center; padding: 1.5rem;
  position: relative; overflow: hidden;
  background: var(--ink);
}
.login::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(45% 45% at 10% 5%, var(--glow-gold), transparent 65%),
    radial-gradient(45% 45% at 92% 95%, var(--glow-aqua), transparent 65%);
}
.login__split {
  position: relative;
  width: min(980px, 100%);
  display: grid; grid-template-columns: 1.05fr .95fr;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.login__aside {
  position: relative; overflow: hidden;
  padding: 2.75rem 2.4rem;
  display: flex; flex-direction: column; gap: 1.1rem;
  background: var(--ink); color: var(--ink-text);
}
.login__aside::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(50% 40% at 0% 0%, rgba(200, 162, 74, .32), transparent 62%),
    radial-gradient(55% 45% at 100% 100%, rgba(127, 227, 240, .28), transparent 62%);
}
.login__aside > * { position: relative; }
.login__aside-mark {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px;
  background: var(--grad-gold); color: #1a1204; font-weight: 800; font-size: .95rem;
  box-shadow: 0 10px 24px -10px rgba(200, 162, 74, .8);
}
.login__aside-title {
  font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 800;
  letter-spacing: -.04em; line-height: 1.12; color: #fff; margin-top: .5rem;
}
.login__aside-title em {
  font-style: normal;
  background: var(--grad-aurora);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.login__aside-sub { color: var(--ink-soft); font-size: .92rem; max-width: 38ch; }
.login__aside-list { display: grid; gap: .7rem; margin-top: auto; }
.login__aside-list li {
  display: flex; align-items: center; gap: .6rem;
  font-size: .84rem; font-weight: 600; color: var(--ink-text);
}
.login__aside-list .icon { width: 1rem; height: 1rem; color: var(--aqua); }

.login__card {
  width: 100%;
  padding: 2.6rem 2.4rem;
  display: grid; gap: .9rem; align-content: center; text-align: left;
  background: var(--surface);
}
.login__brand {
  width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center;
  background: var(--grad-gold); color: #1a1204;
  font-weight: 800; font-size: 1rem; margin-bottom: .25rem;
  box-shadow: 0 10px 24px -12px rgba(200, 162, 74, .9);
}
.login__title { font-size: 1.5rem; font-weight: 800; letter-spacing: -.035em; }
.login__sub { color: var(--text-soft); font-size: .91rem; margin-top: -.4rem; }
.login__error { color: #e5484d; font-size: .85rem; font-weight: 700; min-height: 1.1rem; margin-top: -.2rem; }
.login__btn { justify-content: center; margin-top: .2rem; }
.login__hint {
  font-size: .79rem; color: var(--text-soft); text-align: center;
  padding-top: .4rem; border-top: 1px solid var(--border);
}
.login__hint b { color: var(--text); font-family: var(--mono); }
.login__warn {
  font-size: .75rem; line-height: 1.55; color: #8a6100;
  background: color-mix(in srgb, var(--gold) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--gold) 38%, transparent);
  border-radius: var(--radius-sm); padding: .75rem .85rem;
}
[data-theme="dark"] .login__warn { color: #f0d79a; }
.login__back {
  font-size: .84rem; font-weight: 700; color: var(--brand); text-align: center;
  transition: opacity .2s var(--ease);
}
.login__back:hover { opacity: .75; }

/* =========================================================
   2) LAYOUT DASHBOARD
   ========================================================= */
.dash { display: grid; grid-template-columns: 272px 1fr; min-height: 100vh; }

/* --- Sidebar ink --- */
.dash__side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: var(--ink); color: var(--ink-text);
  border-right: 1px solid var(--ink-line);
  display: flex; flex-direction: column; padding: 1.35rem 1.1rem;
  scrollbar-width: thin;
}
.dash__side::-webkit-scrollbar { width: 8px; }
.dash__side::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-radius: 8px; }

.dash__brand { display: flex; align-items: center; gap: .7rem; padding: .2rem .35rem 1.35rem; }
.dash__brand-mark {
  display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 auto;
  border-radius: 12px; background: var(--grad-gold); color: #1a1204;
  font-size: .82rem; font-weight: 800;
  box-shadow: 0 8px 20px -10px rgba(200, 162, 74, .9);
}
.dash__brand-text { font-weight: 800; font-size: .95rem; letter-spacing: -.02em; color: #fff; display: block; }
.dash__brand-sub {
  display: block; font-size: .68rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--gold-2); font-family: var(--mono); font-weight: 700; margin-top: .1rem;
}

.dash__nav { display: grid; gap: .15rem; }
.dash__nav button {
  display: flex; align-items: center; gap: .7rem;
  text-align: left; width: 100%;
  padding: .62rem .8rem; border-radius: 12px; cursor: pointer;
  border: 1px solid transparent; background: none;
  font-size: .885rem; font-weight: 600; color: var(--ink-soft);
  transition: background .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
  position: relative;
}
.dash__nav button .icon { width: 1.05rem; height: 1.05rem; opacity: .8; }
.dash__nav button:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.dash__nav button.is-active {
  background: linear-gradient(90deg, rgba(200, 162, 74, .20), rgba(200, 162, 74, .04));
  color: #fff; border-color: rgba(200, 162, 74, .32);
}
.dash__nav button.is-active .icon { color: var(--gold-2); opacity: 1; }
.dash__nav button.is-active::before {
  content: ""; position: absolute; left: -.35rem; top: 50%; transform: translateY(-50%);
  width: 3px; height: 20px; border-radius: 3px; background: var(--grad-gold);
}

.dash__side-foot {
  margin-top: auto; padding-top: 1.1rem; display: grid; gap: .55rem;
  border-top: 1px solid var(--ink-line);
}
.dash__side-foot a {
  font-size: .84rem; font-weight: 700; color: var(--gold-2);
  display: inline-flex; align-items: center; gap: .4rem;
}
.dash__side-foot a:hover { text-decoration: underline; text-underline-offset: 3px; }
.dash__logout {
  text-align: left; font-size: .84rem; font-weight: 600; color: var(--ink-soft);
  background: none; border: none; cursor: pointer; padding: .35rem 0;
  transition: color .18s var(--ease);
}
.dash__logout:hover { color: #ff9aa0; }

/* --- Area utama --- */
.dash__main { min-width: 0; display: flex; flex-direction: column; }
.dash__topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 1rem;
  padding: .95rem 1.85rem;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.dash__title { font-size: 1.18rem; font-weight: 800; letter-spacing: -.03em; }
.dash__crumb {
  display: block; font-family: var(--mono); font-size: .66rem; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase; color: var(--brand);
}
.dash__topactions { margin-left: auto; display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; }
.dash__status { font-size: .81rem; font-weight: 700; color: #12a150; }
.dash__status.is-error { color: #e5484d; }
.dash__content { padding: 1.85rem; max-width: 1000px; width: 100%; }

/* =========================================================
   3) PANEL
   ========================================================= */
.panel {
  position: relative;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.6rem;
  margin-bottom: 1.4rem; box-shadow: var(--shadow-sm);
}
.panel::before {
  content: ""; position: absolute; left: 1.6rem; top: 0; width: 46px; height: 2px;
  border-radius: 0 0 3px 3px; background: var(--grad-gold);
}
.panel__title { font-size: 1rem; font-weight: 800; letter-spacing: -.025em; }
.panel__desc { font-size: .855rem; color: var(--text-soft); margin: .3rem 0 1.35rem; max-width: 70ch; }
.panel--ok { border-left: 3px solid #12a150; }
.panel--warn { border-left: 3px solid var(--gold); }
.panel--ok::before, .panel--warn::before { display: none; }
.panel--ok .panel__desc, .panel--warn .panel__desc { margin-bottom: 0; }

/* =========================================================
   4) KOLOM FORM
   ========================================================= */
.afield { display: grid; gap: .35rem; margin-bottom: 1rem; }
.afield > label { font-size: .79rem; font-weight: 700; }
.afield small { font-size: .74rem; color: var(--text-soft); }
.afield input, .afield select, .afield textarea {
  width: 100%; font: inherit; font-size: .9rem; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .62rem .8rem;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease);
}
.afield textarea { resize: vertical; min-height: 88px; line-height: 1.55; }
.afield input:focus, .afield select:focus, .afield textarea:focus {
  outline: none; border-color: var(--brand); background: var(--surface);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 14%, transparent);
}
.afield input[type="color"] { padding: .22rem; height: 42px; cursor: pointer; }

.agrid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.agrid--3 { grid-template-columns: repeat(3, 1fr); }

/* =========================================================
   5) REPEATER (item berulang)
   ========================================================= */
.repeater__item {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 1.05rem 1.1rem .3rem; margin-bottom: .9rem;
  background: var(--surface-2); position: relative;
}
.repeater__item::before {
  content: ""; position: absolute; left: 0; top: 1.05rem; bottom: 1.05rem; width: 2px;
  border-radius: 0 3px 3px 0; background: var(--grad-aurora); opacity: .7;
}
.repeater__head {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  margin-bottom: .9rem;
}
.repeater__head span {
  font-family: var(--mono);
  font-size: .72rem; font-weight: 700; color: var(--text-soft);
  letter-spacing: .1em; text-transform: uppercase;
}
.repeater__remove {
  border: 1px solid transparent; background: none; cursor: pointer; color: #e5484d;
  font-size: .78rem; font-weight: 700; padding: .22rem .6rem; border-radius: 999px;
  transition: background .18s var(--ease), border-color .18s var(--ease);
}
.repeater__remove:hover { background: color-mix(in srgb, #e5484d 12%, transparent); border-color: color-mix(in srgb, #e5484d 35%, transparent); }
.repeater__add {
  border: 1px dashed var(--border-2); background: none; cursor: pointer;
  color: var(--brand); font-weight: 700; font-size: .86rem;
  padding: .7rem 1rem; border-radius: var(--radius-sm); width: 100%;
  transition: background .18s var(--ease), border-color .18s var(--ease);
}
.repeater__add:hover { background: var(--brand-soft); border-color: var(--brand); }

/* =========================================================
   6) RINGKASAN
   ========================================================= */
.ov-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; margin-bottom: 1.4rem; }
.ov-card {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.3rem 1.35rem;
  box-shadow: var(--shadow-sm);
  transition: transform .28s var(--ease-out), box-shadow .28s var(--ease-out), border-color .28s var(--ease);
}
.ov-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--grad-gold);
}
.ov-card::after {
  content: ""; position: absolute; right: -30%; bottom: -60%; width: 60%;
  aspect-ratio: 1; border-radius: 50%; filter: blur(38px);
  background: var(--glow-aqua); opacity: .8; pointer-events: none;
}
.ov-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--gold) 50%, var(--border)); }
.ov-card b {
  display: block; position: relative;
  font-size: 2.1rem; font-weight: 800; letter-spacing: -.045em; line-height: 1;
  background: var(--grad-aurora);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.ov-card span {
  position: relative; display: block; margin-top: .4rem;
  font-family: var(--mono); font-size: .68rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--text-soft);
}
.tips { display: grid; gap: .55rem; }
.tips li { position: relative; padding-left: 1.35rem; font-size: .88rem; color: var(--text-soft); }
.tips li::before {
  content: ""; position: absolute; left: 0; top: .58em; width: 7px; height: 7px;
  border-radius: 2px; background: var(--grad-aurora);
}
.tips b { color: var(--text); }

/* =========================================================
   7) PENGATURAN
   ========================================================= */
.btn-row { display: flex; flex-wrap: wrap; gap: .6rem; }
.danger {
  border-color: color-mix(in srgb, #e5484d 45%, var(--border)); color: #e5484d;
  background: transparent;
}
.danger:hover { background: color-mix(in srgb, #e5484d 10%, transparent); border-color: #e5484d; color: #e5484d; }
.import-area {
  width: 100%; min-height: 170px; font-family: var(--mono);
  font-size: .78rem; line-height: 1.55;
}

/* =========================================================
   8) UNGGAH GAMBAR
   ========================================================= */
.photo { display: flex; gap: 1.35rem; align-items: center; margin-bottom: 1.25rem; flex-wrap: wrap; }
.photo__preview {
  width: 112px; height: 112px; flex: 0 0 auto; border-radius: 50%; padding: 4px;
  background: var(--grad-gold);
  box-shadow: 0 14px 30px -18px rgba(200, 162, 74, .9);
}
.photo__preview img {
  width: 100%; height: 100%; display: block; border-radius: 50%;
  object-fit: cover; background: var(--bg-alt);
}
.photo__ctrl { display: grid; gap: .5rem; align-content: center; }
.photo__ctrl small { font-size: .74rem; color: var(--text-soft); }
.photo__ctrl .btn { width: max-content; }

.aimg { display: grid; gap: .55rem; margin-bottom: 1.1rem; }
.aimg > label { font-size: .79rem; font-weight: 700; }
.aimg > label small { font-size: .74rem; color: var(--text-soft); font-weight: 400; }
.aimg__row { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.aimg__preview {
  width: 140px; height: 92px; flex: 0 0 auto; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface-2);
  display: grid; place-items: center; overflow: hidden;
}
.aimg__preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.aimg__preview span { font-size: .72rem; color: var(--text-soft); text-align: center; padding: 0 .5rem; }
.aimg__ctrl { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.aimg__ctrl small { flex-basis: 100%; font-size: .74rem; color: var(--text-soft); }
.aimg__url {
  width: 100%; font: inherit; font-size: .88rem; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: .62rem .8rem;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.aimg__url:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 14%, transparent);
}

/* =========================================================
   9) RESPONSIF
   ========================================================= */
@media (max-width: 980px) {
  .login__split { grid-template-columns: 1fr; }
  .login__aside { padding: 2rem 1.75rem; }
  .login__aside-list { margin-top: 1.25rem; }
}

@media (max-width: 880px) {
  .dash { grid-template-columns: 1fr; }
  .dash__side {
    position: static; height: auto;
    border-right: none; border-bottom: 1px solid var(--ink-line);
    padding: 1rem .9rem 1.1rem;
  }
  .dash__brand { padding-bottom: .9rem; }
  .dash__nav {
    grid-auto-flow: column; grid-auto-columns: max-content;
    overflow-x: auto; gap: .35rem; padding-bottom: .35rem;
    scrollbar-width: thin;
    scroll-snap-type: x proximity;
    -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 28px), transparent 100%);
    mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 28px), transparent 100%);
  }
  .dash__nav button { padding: .5rem .8rem; scroll-snap-align: start; }
  .dash__nav button.is-active::before { display: none; }
  .dash__side-foot {
    grid-auto-flow: column; justify-content: space-between; align-items: center;
  }
  .dash__topbar { padding: .85rem 1.25rem; flex-wrap: wrap; }
  .dash__content { padding: 1.25rem; }
  .agrid, .agrid--3 { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .login__card { padding: 1.9rem 1.4rem; }
  .panel { padding: 1.25rem; }
  .panel::before { left: 1.25rem; }
  .dash__topactions { width: 100%; }
}
