/* Panel pengelola: memakai token warna dari app.css */
body.admin { background: var(--bg); }
.adm { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; }
.adm-side {
  background: var(--brand); color: var(--brand-ink);
  display: flex; flex-direction: column; gap: 6px;
  padding: 16px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
  border-right: 3px solid var(--gold-bright);
}
.adm-brand { display: flex; gap: 10px; align-items: center; padding: 4px 6px 14px; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.12); margin-bottom: 8px; }
.adm-brand img { width: 40px; height: 40px; object-fit: contain; }
.adm-brand b { font-family: var(--font-crest); font-size: 15px; letter-spacing: .04em; display: block; line-height: 1.2; }
.adm-brand small { color: var(--gold-bright); font-size: 12px; font-weight: 600; }
.adm-nav { display: grid; gap: 2px; }
.adm-nav .grp { font-size: 11.5px; opacity: .6; padding: 12px 10px 4px; font-weight: 600; }
.adm-nav a {
  display: flex; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 9px;
  text-decoration: none; font-size: 14px; font-weight: 600; color: rgba(255,255,255,.86);
}
.adm-nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.adm-nav a[aria-current="page"] { background: rgba(255,255,255,.12); color: #fff; box-shadow: inset 3px 0 0 var(--gold-bright); }
.adm-nav .ic { width: 18px; height: 18px; opacity: .9; }
.adm-user { margin-top: auto; padding: 12px 8px 4px; border-top: 1px solid rgba(255,255,255,.12); font-size: 13px; }
.adm-user b { display: block; font-size: 14px; }
.adm-user .role { color: var(--gold-bright); font-weight: 650; font-size: 12px; }
.adm-user form { margin-top: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.adm-user .btn { background: rgba(255,255,255,.06); color: #fff; border-color: rgba(255,255,255,.2); height: 34px; font-size: 13px; }
.adm-user .btn:hover { background: rgba(255,255,255,.14); }

.adm-main { min-width: 0; }
.adm-top {
  display: flex; align-items: center; gap: 10px; justify-content: space-between;
  padding: 14px 26px; border-bottom: 1px solid var(--line); background: var(--surface);
  position: sticky; top: 0; z-index: 20;
}
.adm-top h1 { font-size: 20px; margin: 0; letter-spacing: -.01em; }
.adm-top .crumb { font-size: 12.5px; color: var(--ink-3); }
.adm-top-tools { display: flex; gap: 8px; align-items: center; }
.adm-menu-btn { display: none; }
.adm-content { padding: 22px 26px 60px; max-width: 1280px; }

.flash { padding: 11px 14px; border-radius: 10px; margin-bottom: 12px; font-size: 14px; display: flex; gap: 10px; align-items: flex-start; border: 1px solid; }
.flash .ic { width: 18px; height: 18px; margin-top: 2px; }
.flash-ok { background: color-mix(in srgb, var(--ok) 10%, var(--surface)); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.flash-error { background: var(--red-soft); border-color: color-mix(in srgb, var(--red) 35%, transparent); }
.flash-warn { background: var(--gold-soft); border-color: color-mix(in srgb, var(--gold) 40%, transparent); }
.flash-info { background: var(--surface-2); border-color: var(--line); }
.flash ul { margin: 4px 0 0; padding-left: 18px; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat .v { font-size: 30px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.stat .l { font-size: 13px; color: var(--ink-3); font-weight: 600; }
.stat.accent { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.stat.accent .l { color: rgba(255,255,255,.7); }

.box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.box > h2 { font-size: 16px; margin: 0 0 12px; display: flex; gap: 8px; align-items: center; }
.box > h2 .ic { color: var(--gold); }
.box > p.lead { color: var(--ink-2); margin: -4px 0 14px; font-size: 14px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.fld label, .fld .field-label { display: block; font-size: 13px; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; }
.fld .hint { font-size: 12.5px; color: var(--ink-3); margin-top: 5px; }
.fld .req { color: var(--red); }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.toggles { display: flex; flex-wrap: wrap; gap: 10px; }
.toggle {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; cursor: pointer; background: var(--surface-2); font-size: 14px; font-weight: 600;
}
.toggle input { width: 18px; height: 18px; accent-color: var(--brand); }
.toggle small { display: block; font-weight: 500; color: var(--ink-3); font-size: 12px; }
.lang-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.lang-tag { display: inline-block; font-size: 11px; font-weight: 800; background: var(--surface-3); border-radius: 5px; padding: 1px 6px; margin-left: 6px; color: var(--ink-2); }

.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.toolbar .grow { flex: 1; }
.toolbar .select, .toolbar .input { width: auto; min-width: 140px; }
.dtable { width: 100%; border-collapse: collapse; background: var(--surface); font-size: 14px; }
.dtable-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; }
.dtable th, .dtable td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.dtable th { font-size: 12px; color: var(--ink-3); background: var(--surface-2); font-weight: 700; white-space: nowrap; }
.dtable tr:last-child td { border-bottom: 0; }
.dtable tr:hover td { background: color-mix(in srgb, var(--surface-2) 60%, var(--surface)); }
.dtable td.actions { white-space: nowrap; text-align: right; }
.dtable td.actions form { display: inline; }
.dtable .t-title { font-weight: 650; }
.dtable .t-sub { font-size: 12.5px; color: var(--ink-3); }
.dtable input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--brand); }
.dtable tr.unpub td { opacity: .62; }
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 99px; background: var(--surface-3); color: var(--ink-2); white-space: nowrap; }
.pill-ok { background: color-mix(in srgb, var(--ok) 14%, var(--surface)); color: var(--ok); }
.pill-draft { background: var(--gold-soft); color: var(--gold); }
.pill-arch { background: var(--surface-3); color: var(--ink-3); }
.pill-super { background: var(--brand); color: var(--brand-ink); }
:root[data-theme="dark"] .pill-super { background: var(--gold); color: #1B1606; }
.bulkbar { display: none; gap: 8px; align-items: center; flex-wrap: wrap; background: var(--brand); color: var(--brand-ink); padding: 8px 12px; border-radius: 12px; margin-bottom: 10px; position: sticky; top: 70px; z-index: 10; }
.bulkbar.on { display: flex; }
.bulkbar .select { width: auto; height: 34px; background: var(--surface); }
.bulkbar .btn { height: 34px; }

/* pemilih warna & simbol */
.palette { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 6px; }
.pal {
  position: relative; aspect-ratio: 1; border-radius: 9px; border: 2px solid transparent; cursor: pointer; background: var(--c);
}
.pal input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.pal:has(input:checked) { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ink); }
.pal.used { opacity: .28; cursor: not-allowed; }
.pal.used::after { content: ""; position: absolute; left: 50%; top: 8%; bottom: 8%; width: 2px; background: var(--surface); transform: rotate(45deg); }
.pal:has(input:focus-visible) { outline: 2.5px solid var(--focus); outline-offset: 2px; }
.icons-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 6px; }
.icp {
  position: relative; aspect-ratio: 1; border-radius: 10px; border: 1.5px solid var(--line); display: grid; place-items: center; cursor: pointer; background: var(--surface);
}
.icp .ic { width: 22px; height: 22px; }
.icp input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.icp:has(input:checked) { border-color: var(--ink); background: var(--surface-3); box-shadow: 0 0 0 1px var(--ink); }
.icp.used { opacity: .3; cursor: not-allowed; }
.icp:has(input:focus-visible) { outline: 2.5px solid var(--focus); outline-offset: 2px; }
.color-custom { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.color-custom input[type=color] { width: 46px; height: 40px; border: 1px solid var(--line-strong); border-radius: 10px; padding: 3px; background: var(--surface); }
.conflicts { display: none; }
.conflicts.on { display: flex; }
.preview-box { display: grid; gap: 10px; padding: 14px; border-radius: 12px; background: var(--surface-2); border: 1px dashed var(--line-strong); }
.preview-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.preview-row .chip { width: auto; }
.preview-row .md-cell { width: 38px; }

.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.cat-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: grid; gap: 10px; border-top: 5px solid var(--c); }
.cat-card .top { display: flex; gap: 10px; align-items: center; }
.cat-card .top .swatch { width: 40px; height: 40px; border-radius: 11px; }
.cat-card .top .swatch .ic { width: 22px; height: 22px; }
.cat-card .name { font-weight: 750; line-height: 1.25; }
.cat-card .meta { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12px; }
.cat-card.inactive { opacity: .55; }

.logo-prev { display: flex; gap: 16px; align-items: center; padding: 14px; background: var(--brand); border-radius: 12px; color: var(--brand-ink); }
.logo-prev img { width: 64px; height: 64px; object-fit: contain; }
.logo-prev b { font-family: var(--font-crest); font-size: 20px; letter-spacing: .05em; display: block; }
.logo-prev small { color: var(--gold-bright); font-weight: 600; }

.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; background:
  radial-gradient(1200px 500px at 50% -10%, color-mix(in srgb, var(--brand) 22%, transparent), transparent), var(--bg); }
.auth { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); }
.auth-head { background: var(--brand); color: var(--brand-ink); padding: 22px; text-align: center; border-bottom: 3px solid var(--gold-bright); }
.auth-head img { width: 60px; height: 60px; margin: 0 auto 8px; object-fit: contain; }
.auth-head b { font-family: var(--font-crest); font-size: 18px; letter-spacing: .05em; display: block; }
.auth-head small { color: var(--gold-bright); font-weight: 600; }
.auth-body { padding: 22px; display: grid; gap: 14px; }
.auth-body .btn { width: 100%; height: 44px; }
.auth-foot { text-align: center; font-size: 13px; padding: 0 22px 20px; }

.timeline-log { font-size: 13.5px; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--surface-3); padding: 2px 6px; border-radius: 5px; font-size: 13px; }

@media (max-width: 980px) {
  .adm { grid-template-columns: 1fr; }
  .adm-side { position: fixed; inset: 0 auto 0 0; width: 280px; z-index: 50; transform: translateX(-102%); transition: transform .2s ease; }
  body.nav-open .adm-side { transform: none; box-shadow: 0 0 0 100vmax rgba(7,17,31,.5); }
  .adm-menu-btn { display: inline-flex; }
  .adm-top { padding: 10px 14px; }
  .adm-content { padding: 16px 14px 50px; }
  .grid-2, .grid-3, .form-grid, .lang-tabs { grid-template-columns: 1fr; }
  .adm-top-tools .btn span { display: none; }
}
@media (min-width: 981px) { .adm { background: linear-gradient(90deg, var(--brand) 264px, var(--bg) 264px); } }
.pill-pmg { background: var(--brand); color: var(--gold-bright); }
:root[data-theme="dark"] .pill-pmg { background: var(--gold); color: #1B1606; }
.pill-ban { background: var(--red-soft); color: var(--red); }
.pm-acts { display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.pm-acts form { display: inline; }
.ban-dd { position: relative; display: inline-block; }
.ban-dd > summary { list-style: none; }
.ban-dd > summary::-webkit-details-marker { display: none; }
.ban-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; width: 260px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 12px; display: grid; gap: 8px; text-align: left; white-space: normal; }
.pamong-box { border: 1.5px dashed color-mix(in srgb, var(--gold) 60%, var(--line)); background: color-mix(in srgb, var(--gold-soft) 55%, var(--surface)); border-radius: 12px; padding: 14px; }
.pb-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.pb-head .ic { color: var(--gold); width: 18px; height: 18px; }
.pb-head .muted { font-size: 12.5px; }
