/* ================= Gudang (panel pemilik) ================= */
.gd { width: min(1100px, calc(100vw - 32px)); max-height: calc(100vh - 40px); display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.gd-head, .gd-tabs { flex: none; }
.gd-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px 8px; }
.gd-head h2 { margin: 0; font-size: 21px; font-weight: 800; }
.gd-ico { width: 46px; height: 46px; display: grid; place-items: center; font-size: 26px; background: #3d434f; border: 3px solid var(--ink); border-radius: 10px; box-shadow: inset 0 -3px 0 #2b2f38; }
.gd-msg { margin: 2px 0 0; font-size: 14px; color: var(--muted); }
.gd-msg.ok { color: #2f7a2a; font-weight: 700; }
.gd-msg.bad { color: #b8392f; font-weight: 700; }
.gd-head .close-x { margin-left: auto; }
.gd-tabs { display: flex; gap: 6px; padding: 0 16px 10px; border-bottom: 3px solid var(--paper-2); overflow-x: auto; }
.gd-tabs button { flex: none; font: 700 15px var(--font); padding: 7px 12px; border: 2px solid var(--wood-lo); border-radius: 8px; background: var(--paper-2); color: var(--text); cursor: pointer; }
.gd-tabs button.on { background: var(--wood); color: var(--paper); border-color: var(--ink); }
.gd-body { flex: 1; min-height: 0; overflow: auto; padding: 14px 16px 18px; }
.gd-body h3 { margin: 18px 0 8px; font-size: 15px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--wood); }
.gd-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.gd-card { display: grid; gap: 2px; padding: 10px 12px; background: #fff; border: 2px solid var(--paper-2); border-radius: 10px; }
.gd-card small { font-size: 12.5px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; }
.gd-card b { font-size: 22px; font-weight: 800; color: var(--ink); }
.gd-card span { font-size: 13px; color: var(--muted); }
.gd-online { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.gd-online li { padding: 5px 10px; background: #fff; border: 2px solid var(--paper-2); border-radius: 8px; font-size: 14px; }
.gd-online li small { color: var(--muted); margin-left: 4px; }
.gd-online code { font-size: 13.5px; }
.gd-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.gd-count { color: var(--muted); font-size: 14px; }
.gd-search { flex: 1; min-width: 160px; max-width: 320px; padding: 8px 10px; font: inherit; border: 2px solid var(--wood-lo); border-radius: 8px; background: #fff; }
.gd-note { margin: 12px 0 0; font-size: 13.5px; color: var(--muted); }
.gd-table-wrap { overflow-x: auto; border: 2px solid var(--paper-2); border-radius: 10px; background: #fff; }
.gd-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.gd-table th { text-align: left; padding: 8px 10px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.4px; color: var(--muted); background: var(--paper); border-bottom: 2px solid var(--paper-2); white-space: nowrap; }
.gd-table td { padding: 8px 10px; border-bottom: 1px solid #f0e6d4; vertical-align: middle; }
.gd-table tr:last-child td { border-bottom: 0; }
.gd-table td small { display: block; font-size: 12px; color: var(--muted); }
.gd-table td.num { white-space: nowrap; font-variant-numeric: tabular-nums; }
.gd-table td.none { color: var(--muted); text-align: center; padding: 16px; }
.gd-acts { white-space: nowrap; text-align: right; }
.gd-acts .btn { margin: 2px 0 2px 4px; }
.btn.sm { padding: 4px 9px; font-size: 13.5px; }
.btn.warn { background: #ffe9b8; }
.btn.bad { background: #c4553f; color: #fff; }
.btn.arm { background: #b8392f !important; color: #fff !important; }
a.btn { display: inline-block; text-decoration: none; }
.st { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 12.5px; font-weight: 700; background: var(--paper-2); color: var(--muted); white-space: nowrap; }
.st.ok { background: #d6f5c9; color: #2f7a2a; }
.st.bad { background: #ffd9d3; color: #a5352b; }
.st.own { background: #fff1b8; color: #8a5a10; }
.gd-edit { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.gd-edit label { display: grid; gap: 2px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.gd-edit input { font: inherit; font-size: 15px; padding: 6px 8px; border: 2px solid var(--wood-lo); border-radius: 7px; width: 150px; background: #fff; color: var(--text); }
.gd-fname { font-size: 16px; }
.gd-editor {
  width: 100%; height: min(58vh, 560px); resize: vertical; padding: 10px 12px; border: 2px solid var(--ink); border-radius: 10px;
  background: #1b1f24; color: #d9e6d2; font: 13px/1.5 ui-monospace, 'SF Mono', Menlo, Consolas, monospace; tab-size: 2; white-space: pre; overflow: auto;
}
.gd-editor[readonly] { color: #b9c4bf; }
#blocker .blocker-panel { max-width: 420px; padding: 20px 22px; text-align: center; }
#blocker h2 { margin: 0 0 8px; }
@media (max-width: 640px) {
  .gd { width: 100%; max-height: 100%; }
  .gd-head h2 { font-size: 18px; }
  .gd-cards { grid-template-columns: 1fr 1fr; }
  .gd-card b { font-size: 18px; }
}

/* ================= Pengaturan ================= */
#btn-sound.muted { position: relative; opacity: 0.75; }
#btn-sound.muted::after { content: '🔇'; position: absolute; right: -6px; bottom: -6px; font-size: 13px; }
.settings { width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 40px); overflow: auto; padding: 14px 18px 16px; }
.st-head { display: flex; align-items: center; gap: 12px; }
.st-head h2 { margin: 0; font-size: 21px; font-weight: 800; }
.st-sub { margin: 0; font-size: 13.5px; color: var(--muted); }
.st-head .close-x { margin-left: auto; }
.st-ico { width: 44px; height: 44px; display: grid; place-items: center; font-size: 26px; color: var(--paper); background: var(--wood); border: 3px solid var(--ink); border-radius: 10px; box-shadow: inset 0 -3px 0 var(--wood-lo); }
.settings h3 { margin: 16px 0 8px; font-size: 14px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--wood); }
.st-list { display: grid; gap: 8px; }
.st-row { display: grid; grid-template-columns: 32px 1fr auto; grid-template-areas: 'i t s' 'i v v'; align-items: center; column-gap: 10px; row-gap: 4px; padding: 10px 12px; background: #fff; border: 2px solid var(--paper-2); border-radius: 10px; transition: opacity 0.15s; }
.st-i { grid-area: i; font-size: 22px; align-self: start; }
.st-t { grid-area: t; display: grid; line-height: 1.25; }
.st-t b { font-weight: 800; }
.st-t small { font-size: 13px; color: var(--muted); }
.st-row > .sw, .st-row > span:nth-child(3) { grid-area: s; }
.st-vol { grid-area: v; width: 100%; accent-color: var(--accent); }
.st-vol:disabled { opacity: 0.4; }
.st-row.off .st-t { opacity: 0.55; }
.sw { position: relative; display: inline-block; width: 50px; height: 28px; cursor: pointer; }
.sw input { position: absolute; opacity: 0; width: 0; height: 0; }
.sw span { position: absolute; inset: 0; border-radius: 14px; background: #cfc3ad; border: 2px solid var(--wood-lo); transition: background 0.15s; }
.sw span::after { content: ''; position: absolute; left: 2px; top: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35); transition: transform 0.15s; }
.sw input:checked + span { background: var(--accent); }
.sw input:checked + span::after { transform: translateX(22px); }
.sw input:focus-visible + span { outline: 3px solid #ffd34d; outline-offset: 2px; }
.st-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
#btn-sound { font-size: 24px; line-height: 1; }
#btn-sound.muted::after { font-size: 15px; right: -7px; bottom: -7px; }
.gd-table tr.fail td { background: #fbe3dc; }
