/* ImagineX admin. Brand tokens mirror the website's stylesheet. */
:root {
  --primary-blue: #0066FF;
  --primary-blue-dark: #0047AB;
  --secondary-pink: #FF1493;
  --accent-yellow: #FFD700;
  --comic-red: #FF3131;
  --ok-green: #1B7A4A;
  --text-black: #000000;
  --text-gray: #333333;
  --muted: #5A6781;
  --bg-white: #FFFFFF;
  --bg-cream: #FFFEF2;
  --line: #E4E1D3;
  --shadow: 4px 4px 0px rgba(0, 0, 0, 1);
  --shadow-hover: 6px 6px 0px rgba(0, 0, 0, 1);
  --border-radius: 8px;
  --border-width: 4px;
  --font-display: 'Bangers', 'Bebas Neue', Impact, sans-serif;
  --font-heading: 'Bebas Neue', 'Oswald', Impact, sans-serif;
  --font-body: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: var(--font-body); font-size: 16px; line-height: 1.5; color: var(--text-black); background: var(--bg-cream); }
a { color: var(--primary-blue-dark); }
code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .9em; background: #F1EFE3; padding: .1em .35em; border-radius: 4px; }

.topbar { display: flex; align-items: center; gap: 24px; padding: 12px 24px; background: var(--bg-white); border-bottom: var(--border-width) solid var(--text-black); position: sticky; top: 0; z-index: 10; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text-black); }
.brand img { height: 34px; width: auto; }
.brand-word { font-family: var(--font-heading); font-size: 26px; letter-spacing: 2px; }
.nav { display: flex; gap: 6px; }
.nav a { font-family: var(--font-heading); font-size: 20px; letter-spacing: 1.5px; text-decoration: none; color: var(--text-black); padding: 6px 14px; border: 3px solid transparent; border-radius: 999px; }
.nav a.active { background: var(--accent-yellow); border-color: var(--text-black); box-shadow: 3px 3px 0 var(--text-black); }
.who { margin-left: auto; display: flex; align-items: center; gap: 12px; font-weight: 700; color: var(--muted); }

.main { max-width: 1180px; margin: 0 auto; padding-block: 28px 80px; padding-inline: 24px; }
h1 { font-family: var(--font-display); font-weight: 400; font-size: 44px; letter-spacing: 2px; text-transform: uppercase; margin: 0 0 6px; text-shadow: 3px 3px 0 var(--accent-yellow); }
h2 { font-family: var(--font-heading); font-weight: 400; font-size: 28px; letter-spacing: 1.5px; text-transform: uppercase; margin: 0 0 12px; }
h3 { font-size: 17px; font-weight: 800; margin: 0 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.error { color: var(--comic-red); font-weight: 800; min-height: 1.3em; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.crumbs { font-weight: 700; color: var(--muted); margin: 0 0 6px; }

.card { background: var(--bg-white); border: var(--border-width) solid var(--text-black); box-shadow: var(--shadow); border-radius: var(--border-radius); padding: 20px 22px; }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.stack { display: grid; gap: 20px; }

.btn { font-family: var(--font-heading); font-size: 18px; letter-spacing: 1.5px; text-transform: uppercase; background: var(--primary-blue); color: var(--bg-white); border: 3px solid var(--text-black); box-shadow: 3px 3px 0 var(--text-black); border-radius: var(--border-radius); padding: 8px 16px; cursor: pointer; transition: transform .12s ease, box-shadow .12s ease; }
.btn:hover { transform: translate(-1px, -1px); box-shadow: var(--shadow); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--text-black); }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.btn-secondary { background: var(--accent-yellow); color: var(--text-black); }
.btn-danger { background: var(--comic-red); }
.btn-ghost { background: var(--bg-white); color: var(--text-black); }
.btn-small { font-size: 14px; padding: 4px 10px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

label { display: block; font-weight: 800; font-size: 14px; margin: 10px 0 4px; }
input, select { font-family: var(--font-body); font-size: 16px; padding: 8px 10px; border: 3px solid var(--text-black); border-radius: 6px; background: var(--bg-white); width: 100%; }
input:focus, select:focus { outline: 3px solid var(--accent-yellow); outline-offset: 1px; }
.check { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; font-weight: 700; }
.check input { width: 20px; height: 20px; }
form .row { margin-top: 14px; }
.field-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 16px; }

table { width: 100%; border-collapse: collapse; font-size: 15px; }
th { text-align: left; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 8px 10px 8px 0; border-bottom: 3px solid var(--text-black); }
td { padding: 10px 10px 10px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: #FFF9D6; }
.tbl { overflow-x: auto; }

.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 2px 10px; border: 2px solid var(--text-black); border-radius: 999px; background: var(--bg-white); white-space: nowrap; }
.badge .dot { width: 9px; height: 9px; border-radius: 50%; background: #BBB; border: 1px solid var(--text-black); }
.badge.online .dot { background: var(--ok-green); }
.badge.offline { color: var(--muted); }
.badge.role-screen { background: #E4EEFC; }
.badge.role-tablet { background: #FBE3EF; }
.badge.world { background: var(--accent-yellow); }

.creatures { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.creature { border: 3px solid var(--text-black); border-radius: 8px; background: linear-gradient(to bottom, #0a2342, #05182e); padding: 8px; text-align: center; color: var(--bg-white); }
.creature img { width: 100%; height: 80px; object-fit: contain; }
.creature .name { font-weight: 800; font-size: 13px; margin: 6px 0 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.creature .meta { font-size: 11px; opacity: .8; }
.empty { padding: 24px; text-align: center; color: var(--muted); font-weight: 700; border: 3px dashed var(--line); border-radius: 8px; }

.signin { display: flex; justify-content: center; padding-top: 40px; }
.signin-card { width: min(100%, 520px); }

.brand-preview { border: 3px solid var(--text-black); border-radius: 10px; overflow: hidden; }
.brand-preview .bp-stage { padding: 22px 18px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.brand-preview .bp-logo { height: 54px; max-width: 70%; object-fit: contain; filter: drop-shadow(3px 3px 0 #000); }
.brand-preview .bp-title { font-size: 34px; letter-spacing: 2px; text-transform: uppercase; line-height: 1; margin: 0; text-shadow: 3px 3px 0 #000; }
.brand-preview .bp-copy { font-size: 15px; font-weight: 700; margin: 0; max-width: 32ch; }
.brand-preview .bp-btn { font-size: 18px; letter-spacing: 1.5px; text-transform: uppercase; padding: 8px 18px; border: 3px solid #000; box-shadow: 3px 3px 0 #000; border-radius: 8px; }
.brand-preview .bp-strip { display: flex; }
.brand-preview .bp-strip span { flex: 1; height: 14px; }
.brand-current-logo { height: 44px; max-width: 200px; object-fit: contain; background: #F1EFE3; border: 2px solid var(--line); border-radius: 6px; padding: 4px; }
.colour-field { display: flex; align-items: center; gap: 8px; }
.colour-field input[type=color] { width: 44px; height: 38px; padding: 2px; }
.colour-field input[type=text] { font-family: ui-monospace, Menlo, monospace; text-transform: uppercase; }
.lock { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border: 3px dashed var(--line-strong); border-radius: 8px; font-weight: 700; color: var(--muted); }
.toast-stack { position: fixed; right: 20px; bottom: 20px; display: grid; gap: 10px; z-index: 50; }
.toast { background: var(--accent-yellow); border: 3px solid var(--text-black); box-shadow: var(--shadow); border-radius: 8px; padding: 10px 16px; font-weight: 800; max-width: 340px; }
.toast.error { background: var(--comic-red); color: var(--bg-white); }
.toast.success { background: #DFF3E7; }
[hidden] { display: none !important; }
@media (max-width: 720px) { .topbar { flex-wrap: wrap; gap: 10px; } .who { margin-left: 0; } h1 { font-size: 34px; } }

/* ---- portal additions: venue picker, tiles, modal, overview cards ---- */
.venue-picker { font-family: var(--font-body); font-weight: 800; font-size: 14px; padding: 6px 10px; border: 3px solid var(--text-black); border-radius: 8px; background: var(--bg-white); width: auto; max-width: 260px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.tile { background: var(--bg-white); border: var(--border-width) solid var(--text-black); box-shadow: var(--shadow); border-radius: var(--border-radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; min-height: 160px; }
.tile.owned { background: #FFF9D6; }
.tile.locked { background: #F7F5EC; }
.tile .tile-name { font-family: var(--font-heading); font-size: 26px; letter-spacing: 1.5px; text-transform: uppercase; margin: 0; }
.tile .tile-meta { font-size: 13px; color: var(--muted); font-weight: 700; margin: 0; }
.tile .tile-body { font-size: 14px; margin: 0; flex: 1; }
.tile .row { margin-top: auto; }
.price { font-family: var(--font-heading); font-size: 20px; letter-spacing: 1px; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(17, 27, 45, .55); display: flex; align-items: center; justify-content: center; z-index: 40; padding: 20px; }
.modal-backdrop[hidden] { display: none; }
.modal { width: min(100%, 540px); }
.modal textarea { width: 100%; min-height: 90px; font-family: var(--font-body); font-size: 15px; padding: 8px 10px; border: 3px solid var(--text-black); border-radius: 6px; }
.overview { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.overview .card h3 { font-family: var(--font-heading); font-size: 24px; letter-spacing: 1.5px; text-transform: uppercase; margin: 0 0 6px; font-weight: 400; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; font-size: 14px; margin: 8px 0 12px; }
.kv dt { color: var(--muted); font-weight: 800; }
.kv dd { margin: 0; }
.notice { border-left: 6px solid var(--secondary-pink); background: #FBE3EF; padding: 12px 16px; border-radius: 0 8px 8px 0; font-weight: 700; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 26px 0 10px; }
.section-head h2 { margin: 0; }
.req-list li { margin-bottom: 8px; }
