* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg: #0f1014;
    --surface: #1a1b22;
    --surface2: #23242d;
    --border: #2e3039;
    --text: #e8eaed;
    --muted: #8b919a;
    --accent: #57f287;
    --accent-dim: #3ba55d;
    --discord: #5865F2;
    --danger: #ed4245;
    --radius: 12px;
}

body {
    font-family: "gg sans", "Segoe UI", system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

.topnav {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 1rem 2rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
}

.brand {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: -0.02em;
}

.nav-tabs { display: flex; gap: 0.5rem; flex: 1; }

.tab {
    background: transparent;
    border: none;
    color: var(--muted);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
}

.tab:hover { color: var(--text); background: var(--surface2); }
.tab.active { color: var(--accent); background: rgba(87, 242, 135, 0.1); }

.user-pill {
    font-size: 0.85rem;
    color: var(--muted);
    background: var(--surface2);
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-shrink: 0;
}

.installer-download-btn {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--bg);
    background: var(--accent);
    padding: 0.45rem 0.95rem;
    border-radius: 999px;
    text-decoration: none;
    white-space: nowrap;
    transition: filter 0.15s ease;
}

.installer-download-btn:hover {
    filter: brightness(1.08);
}

.logout-btn {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--muted);
    background: transparent;
    border: 1px solid var(--border);
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.logout-btn:hover {
    color: var(--text);
    border-color: var(--muted);
    background: var(--surface2);
}

.tab-content { display: none; padding: 1.5rem 2rem 3rem; max-width: 1400px; margin: 0 auto; }
.tab-content.active { display: block; }

.layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 1rem;
    align-items: start;
}

.sidebar .card:last-child { margin-bottom: 0; }

.main-col {
    position: sticky;
    top: 72px;
}

.settings-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.settings-row .card {
    margin-bottom: 0;
    height: 100%;
}

@media (max-width: 900px) {
    .layout { grid-template-columns: 1fr; }
    .main-col { position: static; }
    .settings-row { grid-template-columns: 1fr; }
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.main-col .card:last-of-type,
.main-col .actions {
    margin-bottom: 0;
}

.card h2 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin-bottom: 1rem;
}

.preview-box {
    background: var(--bg);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
}

.avatar-preview { width: 120px; height: 120px; border-radius: 50%; margin: 0 auto 0.75rem; }
/* Discord banner upload size: 600×240 (2.5:1) */
.banner-preview {
    width: 100%;
    aspect-ratio: 600 / 240;
    height: auto;
}

.preview-box {
    position: relative;
}

.preview-box.avatar-preview img,
.preview-box.avatar-preview video,
.preview-box.tab-media-preview img,
.preview-box.tab-media-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.preview-box.banner-preview .banner-media-inner img,
.preview-box.banner-preview .banner-media-inner video,
.profile-banner .banner-media-inner img,
.profile-banner .banner-media-inner video {
    width: 100%;
    height: 100%;
}

.preview-box .media-inner {
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.compact-card { padding: 0.9rem; }
.compact-card h2 { margin-bottom: 0.6rem; }
.compact-card .preview-box { margin-bottom: 0.5rem; }
.compact-card .file-btn { padding: 0.4rem; font-size: 0.8rem; margin-bottom: 0.4rem; }

.compact-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem 0.6rem;
    margin-top: 0.4rem;
}

.compact-controls label {
    font-size: 0.7rem;
    color: var(--muted);
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.compact-controls label span {
    color: var(--accent);
    font-weight: 600;
}

.compact-controls input[type="range"] {
    width: 100%;
    height: 4px;
    accent-color: var(--accent);
}

.compact-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--muted);
    margin-bottom: 0.45rem;
}
.compact-field input,
.compact-field textarea {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    padding: 0.4rem 0.5rem;
    font-size: 0.8rem;
    font-family: inherit;
    resize: vertical;
}
.status-image-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.25rem;
}
.status-preview {
    width: 36px;
    height: 36px;
    min-height: 36px;
    border-radius: 8px;
    flex-shrink: 0;
}
.file-btn.small { padding: 0.35rem 0.5rem; font-size: 0.75rem; margin: 0; flex: 1; }
.btn.small { padding: 0.35rem 0.6rem; font-size: 0.75rem; }
.voice-color-row { margin-top: 0.35rem; }
.voice-color-row.hidden { display: none; }
.preview-status {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.25rem;
    font-size: 0.85rem;
    color: var(--muted);
}
.preview-status img,
.preview-status video {
    width: 18px;
    height: 18px;
    object-fit: contain;
    border-radius: 4px;
}
.preview-bio {
    margin: 0.5rem 0 0;
    font-size: 0.8rem;
    color: var(--muted);
    line-height: 1.4;
    white-space: pre-wrap;
}

.compact-select {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.8rem;
    margin: 0.35rem 0;
}

.compact-select select {
    flex: 1;
    padding: 0.3rem;
    font-size: 0.8rem;
}

.card select {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.45rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
}

.file-btn {
    display: block;
    text-align: center;
    padding: 0.55rem;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text);
}

.file-btn:hover { border-color: var(--accent); }

.hint { font-size: 0.75rem; color: var(--muted); margin-top: 0.5rem; line-height: 1.4; }
.preview-hint { margin: -0.5rem 0 0.75rem; }

.tab-media-preview {
    width: 100%;
    min-height: 120px;
    max-height: 200px;
}

.effect-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
    gap: 6px;
    max-height: 180px;
    overflow-y: auto;
    margin-bottom: 0.5rem;
    padding-right: 2px;
}

.effect-item {
    aspect-ratio: 1;
    border-radius: 8px;
    border: 2px solid transparent;
    background: var(--bg);
    cursor: pointer;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.15s;
}

.effect-item:hover { border-color: var(--accent); }
.effect-item.selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.effect-item img { width: 100%; height: 100%; object-fit: cover; }
.effect-item span {
    font-size: 0.55rem;
    color: var(--muted);
    text-align: center;
    padding: 2px;
    line-height: 1.1;
}

.effect-preview {
    width: 100%;
    height: 140px;
}

.decor-preview {
    width: 100%;
    height: 100px;
}

.nameplate-preview {
    width: 100%;
    min-height: 56px;
    max-height: 90px;
}

.nameplate-live-preview {
    margin-top: 1rem;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.nameplate-live-inner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.65rem;
    min-height: 52px;
    background: linear-gradient(90deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.15) 70%, transparent 100%);
}

.nameplate-live-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--surface2);
}

.nameplate-live-name {
    font-weight: 700;
    font-size: 0.95rem;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.link-btn {
    background: none;
    border: none;
    color: var(--accent);
    cursor: pointer;
    padding: 0;
    font: inherit;
    text-decoration: underline;
}

.decorations-layout { padding: 1.25rem; }
.decorations-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}
.decorations-header h2 {
    font-size: 1rem;
    text-transform: none;
    letter-spacing: normal;
    color: var(--text);
    margin-bottom: 0.25rem;
}
.decor-search {
    min-width: 220px;
    flex: 1;
    max-width: 320px;
    padding: 0.55rem 0.75rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
}
.decorations-body {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 1.25rem;
}
.decorations-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
}
@media (max-width: 900px) {
    .decorations-body { grid-template-columns: 1fr; }
}
.collectibles-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.collectibles-pill {
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--muted);
    border-radius: 999px;
    padding: 0.45rem 0.9rem;
    font-size: 0.82rem;
    cursor: pointer;
    transition: 0.15s;
}
.collectibles-pill:hover { border-color: var(--accent); color: var(--text); }
.collectibles-pill.active {
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent) 18%, var(--bg));
    color: var(--text);
}
.decorations-browse-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    grid-auto-rows: 88px;
    gap: 8px;
    max-height: min(70vh, 720px);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 4px 4px 4px 0;
    align-items: stretch;
    justify-items: stretch;
}
.decorations-browse-grid.nameplates-mode {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    grid-auto-rows: auto;
}
.decorations-browse-grid.effects-mode {
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    grid-auto-rows: 88px;
}
.collectibles-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 0.65rem;
    font-size: 0.8rem;
    color: var(--muted);
}
.collectibles-pagination[hidden] { display: none !important; }
.decor-browse-item {
    border: 2px solid transparent;
    border-radius: 10px;
    background: var(--bg);
    cursor: pointer;
    overflow: hidden;
    transition: 0.15s;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    contain: layout paint;
}
.decor-browse-item:hover { border-color: var(--accent); }
.decor-browse-item.selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.decor-browse-thumb {
    position: relative;
    width: 100%;
    flex: 1 1 auto;
    min-height: 0;
    height: 64px;
    background: #1a1b1e center / 72% no-repeat;
    overflow: hidden;
}
.decor-browse-img {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 72%;
    height: 72%;
    transform: translate(-50%, -50%);
    object-fit: contain;
    display: block;
    pointer-events: none;
}
.nameplate-browse-item .nameplate-browse-thumb {
    width: 100%;
    aspect-ratio: 16 / 5;
    background: #111;
    object-fit: cover;
    display: block;
}
.decor-browse-item span,
.nameplate-browse-item span,
.effect-browse-item span {
    font-size: 0.58rem;
    color: var(--muted);
    padding: 0.2rem 0.3rem 0.35rem;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0;
}
.effect-browse-item {
    border: 2px solid transparent;
    border-radius: 10px;
    background: var(--bg);
    cursor: pointer;
    overflow: hidden;
    transition: 0.15s;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    min-height: 0;
    contain: layout paint;
}
.effect-browse-item:hover { border-color: var(--accent); }
.effect-browse-item.selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.effect-browse-thumb {
    flex: 1 1 auto;
    min-height: 0;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #111;
    overflow: hidden;
    padding: 4px;
}
.effect-browse-thumb img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}
.nameplate-browse-item {
    border: 2px solid transparent;
    border-radius: 12px;
    background: var(--bg);
    cursor: pointer;
    overflow: hidden;
    transition: 0.15s;
    display: flex;
    flex-direction: column;
}
.nameplate-browse-item:hover { border-color: var(--accent); }
.nameplate-browse-item.selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.collectibles-status {
    margin-top: 0.65rem;
    min-height: 1.2em;
    text-align: center;
}
.collectibles-status.error { color: #ed4245; }
.collectibles-stage { margin-bottom: 0.75rem; }
.nameplate-stage-preview {
    position: relative;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    height: 56px;
}
.nameplate-stage-bar {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.85;
}
.nameplate-stage-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    height: 100%;
}
.nameplate-stage-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--surface2);
    overflow: hidden;
    flex-shrink: 0;
}
.nameplate-stage-avatar .media-inner { width: 100%; height: 100%; }
.nameplate-stage-inner span {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
}
.effect-stage-preview {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    aspect-ratio: 1;
    max-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.effect-stage-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.decorations-side h3 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin-bottom: 0.75rem;
}
.decor-large-preview {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
}
.decor-avatar-stage {
    position: relative;
    width: 160px;
    height: 160px;
    margin: 0 auto 0.75rem;
}
.decor-avatar-circle {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--surface2);
    border: 4px solid var(--surface);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}
.decor-stage-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
    z-index: 2;
}
.decor-stage-name {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text);
}

.color-row, label { display: flex; align-items: center; justify-content: space-between; margin: 0.5rem 0; font-size: 0.9rem; }

select, input[type="color"] {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    padding: 0.4rem;
}

select { width: 100%; margin-top: 0.25rem; }

.profile-preview {
    position: relative;
    background: var(--bg);
    border-radius: var(--radius);
    overflow: hidden;
    width: 100%;
    max-width: 300px; /* Discord profile popout width */
    margin: 0 auto;
    border: 1px solid var(--border);
}

.profile-banner {
    width: 100%;
    aspect-ratio: 600 / 240;
    height: auto;
    background: linear-gradient(135deg, var(--discord), #3c45a5);
    background-position: center;
}

.profile-avatar-wrap { padding: 0 1rem; margin-top: -40px; position: relative; z-index: 2; }
.profile-avatar-stage {
    position: relative;
    width: 80px;
    height: 80px;
}
.profile-avatar-wrap .profile-decor-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
    z-index: 3;
}
.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--surface2);
    border: 4px solid var(--bg);
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}
.nameplate-tab-upload {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}
.small-file-btn {
    display: block;
    text-align: center;
    font-size: 0.82rem;
    padding: 0.45rem 0.65rem;
}

.profile-avatar .media-inner {
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-banner .media-inner,
.profile-banner .banner-media-inner {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.profile-banner { position: relative; overflow: hidden; }

.profile-info { padding: 0.75rem 1.25rem 1.25rem; }
.profile-info span { font-size: 1.25rem; font-weight: 700; }
.preview-badges { display: flex; gap: 6px; margin-top: 0.5rem; flex-wrap: wrap; }
.preview-badges img { width: 22px; height: 22px; }

.badge-categories-compact {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    max-height: 240px;
    overflow-y: auto;
    padding-right: 4px;
}

.badges-card { padding: 1rem; }

.badge-category h3 {
    font-size: 0.6rem;
    color: var(--muted);
    margin: 0 0 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    font-weight: 600;
}

.badge-grid { display: flex; flex-wrap: wrap; gap: 5px; }

.badge-item {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--surface2);
    border: 2px solid transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.15s;
}

.badge-item:hover { border-color: var(--accent); transform: translateY(-1px); }
.badge-item.selected { border-color: var(--accent); background: rgba(87, 242, 135, 0.08); box-shadow: 0 0 0 1px var(--accent); }
.badge-item img { width: 16px; height: 16px; }

.preview-spotify {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.6rem;
    padding: 0.5rem 0.65rem;
    background: rgba(30, 215, 96, 0.08);
    border: 1px solid rgba(30, 215, 96, 0.25);
    border-radius: 8px;
    font-size: 0.8rem;
}
.preview-spotify img { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; }
.preview-spotify .track { font-weight: 600; }
.preview-spotify .artist { color: var(--muted); font-size: 0.75rem; }
.preview-pronouns { font-size: 0.8rem; color: var(--muted); margin-top: 0.2rem; }
.preview-heading { font-size: 0.85rem; color: var(--accent); margin-top: 0.15rem; }
.preview-link { font-size: 0.8rem; margin-top: 0.35rem; }
.preview-link a { color: var(--accent); text-decoration: none; }
.preview-link a:hover { text-decoration: underline; }

.active-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 1rem; }

.active-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 0.8rem;
    cursor: grab;
}

.active-badge.dragging { opacity: 0.5; border-color: var(--accent); }
.badge-order { color: var(--muted); font-size: 0.7rem; min-width: 1rem; }
.badge-move { display: flex; gap: 2px; }
.badge-move button {
    background: var(--surface2);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 4px;
    cursor: pointer;
    padding: 0 6px;
    font-size: 0.75rem;
}
.badge-move button:disabled { opacity: 0.3; cursor: default; }

.active-badge img { width: 18px; height: 18px; }
.active-badge button { background: none; border: none; color: var(--danger); cursor: pointer; font-size: 1.1rem; padding: 0 4px; }

.actions { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 0.5rem; }

.btn {
    padding: 0.7rem 1.4rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn-primary { background: var(--accent); color: #0f1014; }
.btn-primary:hover { background: var(--accent-dim); color: white; }
.btn-secondary { background: var(--surface2); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--muted); }

#status { font-size: 0.85rem; color: var(--accent); }
#status.error { color: var(--danger); }

.users-table-wrap { overflow-x: auto; margin-top: 1rem; }
.users-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.users-table th, .users-table td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--border); }
.users-table th { color: var(--muted); font-weight: 600; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }
.users-table tr:hover td { background: var(--surface2); }

.admin-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1rem;
}
.admin-layout-v2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 1rem;
}
.admin-shell {
    padding: 1rem 1.25rem 1.25rem;
    max-width: 1100px;
}
.admin-shell-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}
.admin-shell-head h2 { margin: 0; font-size: 1.1rem; }
.admin-subtabs {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}
.admin-subtab {
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--muted);
    border-radius: 999px;
    padding: 0.35rem 0.85rem;
    font-size: 0.8rem;
    cursor: pointer;
    transition: 0.15s;
}
.admin-subtab:hover { border-color: var(--accent); color: var(--text); }
.admin-subtab.active {
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent) 18%, var(--bg));
    color: var(--text);
}
.admin-panel-hint { margin: 0 0 0.75rem; }
.admin-users-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 1rem;
    align-items: start;
}
@media (max-width: 800px) {
    .admin-users-layout { grid-template-columns: 1fr; }
}
.admin-users-preview .admin-profile-preview.compact { max-width: 100%; }
.admin-users-preview .nameplate-live-preview.compact { max-width: 100%; margin-top: 0.5rem; }
.admin-badge-mgmt-compact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-top: 0.75rem;
}
@media (max-width: 700px) {
    .admin-badge-mgmt-compact { grid-template-columns: 1fr; }
}
.admin-badge-col h3 {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    margin: 0 0 0.35rem;
}
.admin-catalog-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
@media (max-width: 800px) {
    .admin-catalog-grid { grid-template-columns: 1fr; }
}
.admin-catalog-list.compact {
    max-height: 320px;
    overflow-y: auto;
}
.admin-create-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
@media (max-width: 900px) {
    .admin-create-grid { grid-template-columns: 1fr; }
}
.admin-create-block h3 {
    font-size: 0.85rem;
    margin: 0 0 0.65rem;
}
.admin-create-split.compact {
    grid-template-columns: 1fr 140px;
    gap: 0.75rem;
}
.admin-form-grid {
    display: grid;
    gap: 0.45rem;
}
.admin-form-grid label {
    display: grid;
    gap: 0.2rem;
    font-size: 0.78rem;
    color: var(--muted);
}
.admin-np-create-preview.compact { height: 56px; margin-top: 0; }
.admin-user-section { grid-column: 1 / -1; }
.admin-create-badge-section,
.admin-create-np-section { grid-column: 1 / -1; }
.admin-create-split {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 1.25rem;
    align-items: start;
}
@media (max-width: 800px) {
    .admin-create-split { grid-template-columns: 1fr; }
}
.admin-create-preview-col h3 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin-bottom: 0.5rem;
}
.admin-icon-preview {
    width: 120px;
    height: 120px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.admin-icon-preview img { width: 100%; height: 100%; object-fit: contain; }
.admin-np-create-preview { margin-top: 0; }
.admin-user-preview-wrap { margin-top: 1rem; }
.admin-profile-preview { max-width: 360px; margin-bottom: 0.75rem; }
.admin-selected-meta { margin: 0.35rem 0 0.75rem; min-height: 1.2em; }
.admin-badge-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.admin-badge-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.55rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg);
    font-size: 0.78rem;
}
.admin-badge-chip img { width: 18px; height: 18px; }
.admin-badge-chip button {
    border: none;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 0 0.15rem;
}
.admin-badge-chip button:hover { color: #ed4245; }
.admin-badge-chip.awardable { cursor: pointer; }
.admin-badge-chip.awardable:hover { border-color: var(--accent); }
.admin-catalog-list { display: flex; flex-direction: column; gap: 0.65rem; margin-bottom: 1rem; }
.admin-catalog-item {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.65rem 0.75rem;
    background: var(--bg);
}
.admin-catalog-item-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}
.admin-catalog-item-head img { width: 24px; height: 24px; }
.admin-catalog-item-actions { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.admin-catalog-edit { display: none; margin-top: 0.5rem; }
.admin-catalog-item.editing .admin-catalog-edit { display: block; }
.admin-section h3 {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    margin: 1rem 0 0.5rem;
}
.admin-section h3:first-of-type { margin-top: 0.5rem; }
.admin-section label {
    display: block;
    margin: 0.5rem 0;
    font-size: 0.85rem;
}
.admin-input {
    width: 100%;
    margin-top: 0.25rem;
    padding: 0.5rem 0.65rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
}
.admin-actions-row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 0.5rem 0;
}
.admin-check {
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
}
.admin-users-list {
    margin-top: 1rem;
    max-height: 280px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
}
.admin-user-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.82rem;
}
.admin-user-row:last-child { border-bottom: none; }
.admin-user-row .admin-tag {
    font-size: 0.68rem;
    background: var(--accent);
    color: #111;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-weight: 700;
}
.admin-status { margin-top: 0.75rem; min-height: 1.2em; }
.admin-status.error { color: #ed4245; }

.hero {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--bg);
}
.hero-content { text-align: center; max-width: 520px; padding: 2rem; }
.hero h1 { font-size: 3rem; color: var(--accent); margin-bottom: 0.75rem; }
.hero-content > p { color: var(--muted); margin-bottom: 2rem; }
.btn-discord { background: var(--discord); color: white; text-decoration: none; display: inline-block; padding: 0.8rem 1.6rem; border-radius: 8px; font-weight: 600; }
