body.admin { background: #f4f4f2; color: #222; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 24px; background: #fff; border-bottom: 3px solid #c92322; }
.topbar .brand { font-family: 'Raleway', sans-serif; font-weight: 700; font-size: 18px; text-decoration: none; }
.topbar nav { display: flex; align-items: center; gap: 18px; }
.topbar nav a, .topbar .link { color: #444; text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer; font-size: 15px; }
.topbar nav a:hover, .topbar .link:hover { color: #c92322; }
.topbar form { margin: 0; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 24px 20px 60px; }
.wrap.login { max-width: 380px; padding-top: 80px; }
.login form { display: grid; gap: 14px; margin-top: 16px; }
h1 { font-size: 26px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }

.flash { padding: 12px 16px; border-radius: 10px; margin-bottom: 18px; background: #e6f4ea; color: #1e4620; }
.flash.warn { background: #fff4e0; color: #6b4a00; }
.flash.error { background: #fde8e7; color: #7a1a18; }
.flash ul { margin: 0; padding-left: 18px; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 16px; border-radius: 10px; border: 1.5px solid #c92322; color: #c92322; background: #fff; font-weight: 600; text-decoration: none; cursor: pointer; font-size: 15px; }
.btn.primary { background: #c92322; color: #fff; }
.btn.ghost { border-color: #d6d6d3; color: #333; }
.btn.danger { border-color: #c92322; color: #c92322; background: #fff; }
.btn.danger:hover { background: #c92322; color: #fff; }

table.cards { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; }
table.cards th, table.cards td { text-align: left; padding: 12px 14px; border-bottom: 1px solid #ececea; vertical-align: top; }
table.cards th { font-size: 13px; color: #666; font-weight: 600; }
table.cards tr.disabled td { color: #999; }
table.cards td.actions { white-space: nowrap; text-align: right; }
table.cards small { color: #777; }
.pill { display: inline-block; font-size: 12px; padding: 2px 9px; border-radius: 999px; background: #eee; color: #444; margin-right: 4px; }
.pill.public { background: #e6f4ea; color: #1e4620; }
.pill.unlisted { background: #fff4e0; color: #6b4a00; }
.pill.disabled { background: #eee; color: #777; }
.pill.wallet { background: #222; color: #fff; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13.5px; overflow-wrap: anywhere; }
.empty { background: #fff; padding: 28px; border-radius: 12px; }

.card-form .cols { display: grid; grid-template-columns: 1fr; gap: 0 24px; }
@media (min-width: 900px) { .card-form .cols { grid-template-columns: 3fr 2fr; } }
fieldset { border: 0; background: #fff; border-radius: 12px; padding: 18px 20px 20px; margin: 0 0 18px; }
legend { font-family: 'Raleway', sans-serif; font-weight: 700; font-size: 16px; padding: 0; margin-bottom: 4px; float: left; width: 100%; }
legend + * { clear: both; }
label { display: block; font-size: 14px; color: #444; margin-top: 12px; }
label input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=color]), label textarea {
  display: block; width: 100%; margin-top: 4px; padding: 9px 11px; font: inherit; font-size: 15px; color: #222;
  border: 1px solid #d6d6d3; border-radius: 8px; background: #fff;
}
label input:focus, label textarea:focus { border-color: #c92322; outline: none; box-shadow: 0 0 0 3px rgba(201,35,34,.15); }
label small, fieldset > small { display: block; color: #777; font-size: 12.5px; margin-top: 5px; }
label.inline, .checks label, .radios label { display: flex; align-items: flex-start; gap: 8px; font-size: 14.5px; color: #222; cursor: pointer; }
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; margin-top: 14px; }
.radios { display: grid; gap: 8px; margin-top: 14px; }
.radios input, .checks input { margin-top: 3px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 14px; }
.span-3 { grid-column: 1 / -1; }
@media (max-width: 560px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } .span-3 { grid-column: auto; } }
.colors label span { display: block; margin-top: 4px; }
.colors input[type=color] { width: 100%; height: 40px; border: 1px solid #d6d6d3; border-radius: 8px; padding: 2px; background: #fff; }
.upload .preview { display: block; max-width: 160px; max-height: 120px; margin-top: 10px; border-radius: 8px; border: 1px solid #ececea; }
.upload .preview.round { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; }
.upload label.inline { margin-top: 8px; }
.links dt { font-size: 12.5px; color: #777; margin-top: 12px; }
.links dd { margin: 2px 0 0; }
.links dd small { display: block; color: #777; }
.form-actions { display: flex; gap: 10px; align-items: center; margin-top: 4px; }
details.danger { margin-top: 28px; }
details.danger summary { cursor: pointer; color: #666; font-size: 14px; }
.danger-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.danger-actions form { margin: 0; }
label select { display: block; width: 100%; margin-top: 4px; padding: 9px 11px; font: inherit; font-size: 15px; border: 1px solid #d6d6d3; border-radius: 8px; background: #fff; }
.swatch { display: inline-block; width: 22px; height: 22px; border-radius: 6px; border: 1px solid #ddd; margin-right: 4px; vertical-align: middle; }
.hint { color: #555; max-width: 70ch; margin: 0 0 18px; }
fieldset[hidden] { display: none; }
