button { border: 0; }
.btn { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 9px; padding: 9px 13px; min-height: 38px; display: inline-flex; gap: 8px; align-items: center; justify-content: center; font-weight: 650; transition: transform .12s ease, border-color .12s ease, background .12s ease; }
.btn:hover { border-color: var(--subtle); transform: translateY(-1px); }
.btn-primary { background: var(--silver); color: var(--bg); border-color: var(--silver); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { background: transparent; }
.btn-danger { color: var(--red); }
.icon-button { border: 1px solid var(--border); background: var(--surface); border-radius: 9px; width: 40px; height: 40px; display: inline-grid; place-items: center; font-size: 1.1rem; }
.search-trigger { display: flex; align-items: center; gap: 9px; min-height: 40px; padding: 0 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 9px; color: var(--muted); }
.search-trigger kbd { font-size: .65rem; border: 1px solid var(--border); border-radius: 4px; padding: 2px 4px; }
.connection-pill { display: flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 999px; color: var(--yellow); font-size: .65rem; font-weight: 800; letter-spacing: .06em; white-space: nowrap; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-head h2, .card-head h3 { margin: 0; }
.card-head small { font-size: .73rem; }
.stat-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 17px; min-width: 0; }
.stat-label { color: var(--muted); font-size: .76rem; display: flex; justify-content: space-between; gap: 8px; }
.stat-value { font-size: clamp(1.2rem,2vw,1.65rem); letter-spacing: -.04em; font-weight: 750; margin: 12px 0 5px; overflow-wrap: anywhere; }
.stat-foot { font-size: .72rem; color: var(--muted); }
.grid-2 { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(280px,1fr); gap: 16px; margin-top: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 22px; }
.page-heading p { color: var(--muted); margin: 8px 0 0; max-width: 720px; }
.heading-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; }
th { text-align: left; color: var(--subtle); font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 750; padding: 11px 12px; border-bottom: 1px solid var(--border); }
td { padding: 13px 12px; border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent); font-size: .8rem; }
tbody tr:hover { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.asset-cell { display: flex; align-items: center; gap: 9px; }
.asset-badge { width: 31px; height: 31px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font-weight: 800; font-size: .72rem; border: 1px solid var(--border); }
.asset-cell strong { display: block; }
.asset-cell small { display: block; font-size: .7rem; }
.badge { display: inline-flex; align-items: center; gap: 5px; border-radius: 6px; padding: 4px 7px; font-size: .66rem; font-weight: 800; letter-spacing: .04em; background: var(--surface-2); color: var(--muted); }
.badge-demo { color: var(--yellow); }
.badge-live { color: var(--green); }

.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field label { font-size: .75rem; color: var(--muted); }
.field input, .field select, .field textarea, .search-input { width: 100%; min-height: 42px; background: var(--bg-2); border: 1px solid var(--border); color: var(--text); padding: 10px 11px; border-radius: 8px; }
.field textarea { resize: vertical; min-height: 90px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); outline: 2px solid color-mix(in srgb, var(--blue) 25%, transparent); }
.form-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.progress { height: 7px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--silver); border-radius: inherit; }
.list-clean { list-style: none; padding: 0; margin: 0; }
.list-clean li { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.list-clean li:last-child { border-bottom: 0; }
.notice { padding: 12px 14px; border-radius: 9px; border: 1px solid var(--border); color: var(--muted); background: var(--bg-2); font-size: .78rem; }
.notice.warning-box { border-color: color-mix(in srgb, var(--yellow) 45%, var(--border)); }

.chart-box { min-height: 245px; position: relative; }
.chart-box canvas { width: 100%; height: 245px; display: block; }
.chart-legend { display: flex; gap: 14px; color: var(--muted); font-size: .7rem; margin-top: 10px; }
.chart-legend span::before { content: ""; width: 7px; height: 7px; display: inline-block; border-radius: 2px; background: var(--blue); margin-right: 6px; }
.chart-legend span:nth-child(2)::before { background: var(--green); }
.toast-region { position: fixed; z-index: 100; bottom: 18px; right: 18px; display: grid; gap: 8px; width: min(340px,calc(100vw - 36px)); }
.toast { padding: 12px 14px; border: 1px solid var(--border); background: var(--surface); border-radius: 10px; box-shadow: var(--shadow); font-size: .8rem; animation: toast-in .18s ease-out; }
@keyframes toast-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
.modal-layer { position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.65); display: grid; place-items: center; padding: 18px; }
.modal-layer[hidden] { display: none; }
.modal { width: min(520px,100%); max-height: min(80vh,720px); overflow: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 20px; box-shadow: var(--shadow); }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.modal-header h2 { margin: 0; }

/* Status koneksi API LoneWolf */
.connection-pill.is-live {
  color: var(--green, #4ade80);
}
.connection-pill.is-live i {
  background: var(--green, #4ade80);
}
.connection-pill.is-offline {
  color: var(--red, #f87171);
}
.connection-pill.is-offline i {
  background: var(--red, #f87171);
}

/* Daftar hasil pencarian global */
.search-results { margin-top: 12px; }
