/* Admin panel — memakai token warna yang sama dengan website */
.adm-wrap { display: block; padding: clamp(28px, 4vw, 48px) var(--gx) 80px; max-width: 1280px; margin: 0 auto; }
.adm-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.adm-head .h1-detail { margin: 0; }
.adm-head small { font-family: 'Jost', sans-serif; font-size: 16px; color: var(--walnut); font-weight: 300; }
.btn:disabled { opacity: .5; cursor: wait; }
button.btn { border: 0; font-family: inherit; }
button.btn-outline { background: transparent; border: 1px solid var(--espresso); }

.login { max-width: 400px; margin: 6vh auto; background: var(--ivory); padding: 40px; border-top: 2px solid var(--gold); display: grid; gap: 16px; }
.login .h1-detail { margin: 0 0 8px; }
.small-link { font-size: 13px; text-align: center; }

label { display: grid; gap: 6px; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--walnut); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], select, textarea {
  font: 15px/1.4 'Jost', sans-serif; color: var(--ink); background: #fff; border: 1px solid #d9cdbb; padding: 10px 12px;
  letter-spacing: 0; text-transform: none; width: 100%; box-sizing: border-box; border-radius: 0;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold); outline-offset: -1px; border-color: var(--gold); }
textarea { resize: vertical; }
label.chk { display: flex; align-items: center; gap: 8px; cursor: pointer; }
label.chk input { width: 16px; height: 16px; accent-color: var(--espresso); }

.filters { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; align-items: center; }
.filters select, .filters input[type=search] { width: auto; min-width: 200px; flex: 1 1 200px; max-width: 320px; }

.table-wrap { overflow-x: auto; background: var(--ivory); border-top: 1px solid var(--gold); }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--walnut); font-weight: 400; padding: 12px; border-bottom: 1px solid #e4d9c8; white-space: nowrap; }
.tbl td { padding: 8px 12px; border-bottom: 1px solid #ece4d6; vertical-align: middle; }
.tbl tr.dim td { opacity: .5; }
.tb-thumb { width: 48px; height: 60px; object-fit: cover; background: #eee5d7; }
.tbl code { font-size: 13px; background: #efe7da; padding: 2px 6px; }
.actions { white-space: nowrap; text-align: right; }
.badge { background: var(--gold); color: #fff; font-size: 11px; padding: 2px 8px; letter-spacing: .08em; }
.lnk { background: none; border: 0; color: var(--walnut); cursor: pointer; font: 13px 'Jost', sans-serif; padding: 4px 8px; }
.lnk:hover { color: var(--espresso); text-decoration: underline; }
.lnk.danger { color: #9a3b22; }
.toggle { border: 1px solid #d9cdbb; background: #fff; color: var(--walnut); font: 12px 'Jost', sans-serif; padding: 4px 10px; cursor: pointer; min-width: 56px; }
.toggle.on { background: var(--espresso); color: var(--linen); border-color: var(--espresso); }
.pad-sm { padding: 16px 12px; }

.gal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 20px; }
.gal-item { background: var(--ivory); padding: 10px; display: grid; gap: 8px; }
.gal-item.dim img { opacity: .4; }
.gal-item img { width: 100%; height: 200px; object-fit: cover; }
.gal-row { display: flex; align-items: end; gap: 8px; justify-content: space-between; }
.gal-row label { flex: 0 0 72px; }
.gal-row input { padding: 6px 8px; }

.modal { position: fixed; inset: 0; background: rgba(43, 30, 22, .6); display: flex; align-items: flex-start; justify-content: center; padding: 5vh 16px; overflow-y: auto; z-index: 50; }
.modal-box { background: var(--linen); width: 100%; max-width: 860px; padding: clamp(20px, 4vw, 36px); border-top: 2px solid var(--gold); }
.modal-box.narrow { max-width: 460px; }
.modal-t { font-family: 'Cormorant Garamond', serif; font-weight: 400; font-size: 32px; margin: 0 0 24px; }
.form-grid { display: grid; grid-template-columns: 240px 1fr; gap: 28px; }
.fields { display: grid; gap: 16px; }
.row-3 { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: end; }
.img-pick { display: grid; gap: 12px; align-content: start; }
.img-pick img, .img-empty { width: 100%; aspect-ratio: 4/5; object-fit: cover; background: #eee5d7; }
.img-empty { display: grid; place-items: center; color: var(--walnut); font-size: 13px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 28px; }

.toast { position: fixed; right: 20px; bottom: 20px; z-index: 60; padding: 12px 18px; font-size: 14px; max-width: min(420px, calc(100vw - 40px)); box-shadow: 0 6px 20px rgba(0,0,0,.15); }
.toast.ok { background: var(--espresso); color: var(--linen); }
.toast.err { background: #9a3b22; color: #fff; }

@media (max-width: 680px) {
  .form-grid { grid-template-columns: 1fr; }
  .img-pick { max-width: 240px; }
  .row-3 { grid-template-columns: 1fr 1fr; }
  .filters select, .filters input[type=search] { min-width: 0; max-width: none; flex-basis: 100%; }
}
