.card {
  padding: 18px 20px;
  background: linear-gradient(160deg, rgba(45, 41, 37, .72), rgba(25, 23, 21, .72));
  backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.card--glow-radiant { border-color: rgba(220, 181, 104, .4); box-shadow: var(--glow-radiant); }
.card__title { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.card__title small { color: var(--text-dim); font-weight: 400; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 8px 16px; border-radius: var(--r-sm);
  border: 1px solid var(--line-strong); background: rgba(255, 255, 255, .05);
  color: var(--text); font-weight: 600; transition: transform .1s, box-shadow .15s, background .15s;
}
.btn:hover:not(:disabled) { background: rgba(255, 255, 255, .1); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn--primary { background: linear-gradient(135deg, #b7882b, var(--radiant)); border-color: transparent; color: #100f0d; }
.btn--primary:hover:not(:disabled) { background: linear-gradient(135deg, #cf9b32, #e6cb94); box-shadow: var(--glow-radiant); }
.btn--danger { background: linear-gradient(135deg, #b81f3c, var(--dire)); border-color: transparent; color: #ffffff; }
.btn--danger:hover:not(:disabled) { box-shadow: var(--glow-dire); background: linear-gradient(135deg, #cf2748, #ff6179); }
.btn--ghost { background: transparent; }
.btn--sm { padding: 4px 10px; font-size: 12px; }

.field { display: flex; flex-direction: column; gap: 5px; }
.field > label { font-size: 12px; color: var(--text-dim); }
.input, .select {
  width: 100%; padding: 8px 12px; border-radius: var(--r-sm);
  background: rgba(10, 10, 9, .6); border: 1px solid var(--line-strong); color: var(--text);
}
.input:focus, .select:focus { border-color: var(--radiant); outline: none; box-shadow: var(--glow-radiant); }
.select option { background: var(--bg-2); }
.check { display: flex; align-items: center; gap: 8px; color: var(--text-dim); }
.check input { accent-color: var(--radiant); width: 16px; height: 16px; }

.seg { display: inline-flex; padding: 3px; border-radius: var(--r-sm); background: rgba(10, 10, 9, .6); border: 1px solid var(--line); }
.seg button { padding: 6px 14px; border: 0; background: transparent; color: var(--text-dim); border-radius: var(--r-xs); }
.seg button.is-on { background: rgba(220, 181, 104, .18); color: var(--text); }

.chip { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; font-size: 12px; border: 1px solid var(--line-strong); color: var(--text-dim); }
.chip--ok { color: var(--ok); border-color: rgba(77, 224, 160, .45); }
.chip--bad { color: var(--dire); border-color: rgba(255, 59, 92, .5); }
.chip--gold { color: var(--gold); border-color: rgba(255, 194, 75, .5); }
.chip--info { color: var(--radiant); border-color: rgba(220, 181, 104, .45); }

.bar { height: 8px; border-radius: 999px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #b7882b, var(--radiant)); transition: width .4s; }

.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-weight: 600; color: var(--text-dim); font-size: 12px; padding: 8px 12px; border-bottom: 1px solid var(--line-strong); }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }

.empty { padding: 28px; text-align: center; color: var(--text-dim); border: 1px dashed var(--line-strong); border-radius: var(--r-md); }
pre.code { padding: 14px; border-radius: var(--r-sm); background: rgba(7, 6, 6, .75); border: 1px solid var(--line); font: 12.5px/1.55 "Cascadia Mono", Consolas, monospace; overflow: auto; max-height: 280px; white-space: pre; }

.avatar { width: 64px; height: 64px; border-radius: 14px; object-fit: cover; background: var(--bg-3); border: 1px solid var(--line-strong); flex: none; }
.avatar--sm { width: 40px; height: 40px; border-radius: 10px; }
.hero-ico { width: 44px; height: 25px; border-radius: 3px; object-fit: cover; background: var(--bg-3); }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--r-xs); font-size: 12px; background: rgba(255, 194, 75, .1); border: 1px solid rgba(255, 194, 75, .4); color: var(--gold); }
.badge--locked { filter: grayscale(1); opacity: .4; }
.badge__glyph { font-size: 14px; }

.modal-back { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(7, 6, 5, .6); backdrop-filter: blur(6px); }
.modal { width: min(520px, 92vw); max-height: 86vh; overflow: auto; padding: 22px; border-radius: var(--r-lg); background: linear-gradient(160deg, #2d2925, #191715); border: 1px solid var(--line-strong); box-shadow: 0 30px 80px rgba(0, 0, 0, .6); animation: pop .16s ease-out; }
.modal--wide { width: min(820px, 94vw); }
.modal__head { display: flex; align-items: center; margin-bottom: 14px; }
@keyframes pop { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }

#toast-root { position: fixed; right: 20px; bottom: 20px; z-index: 80; display: flex; flex-direction: column; gap: 8px; }
.toast { min-width: 260px; max-width: 380px; padding: 12px 16px; border-radius: var(--r-sm); background: rgba(32, 30, 27, .95); border: 1px solid var(--line-strong); border-left: 4px solid var(--radiant); backdrop-filter: blur(10px); animation: toast-in .2s ease-out; }
.toast--ok { border-left-color: var(--ok); }
.toast--bad { border-left-color: var(--dire); }
.toast--gold { border-left-color: var(--gold); box-shadow: var(--glow-gold); }
.toast small { display: block; color: var(--text-dim); margin-top: 2px; }
@keyframes toast-in { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }
