/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg:        #0d1117;
  --bg2:       #161b22;
  --bg3:       #1c2128;
  --border:    #30363d;
  --text:      #e6edf3;
  --muted:     #8b949e;
  --accent:    #58a6ff;
  --green:     #3fb950;
  --red:       #f85149;
  --orange:    #d29922;
  --purple:    #a78bfa;
  --teal:      #39d353;
  --sidebar-w: 240px;
  --topbar-h:  56px;
}

body { font-family: 'Inter', 'Segoe UI', sans-serif; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.5; }

/* ── Screens ──────────────────────────────────────────────── */
.screen { display: none; }
.screen.active { display: flex; }

/* ── Login ────────────────────────────────────────────────── */
#login-screen { width: 100vw; height: 100vh; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.login-bg { position: absolute; inset: 0; }
.login-glow  { position: absolute; top: -200px; left: 50%; transform: translateX(-50%); width: 600px; height: 600px; background: radial-gradient(circle, rgba(88,166,255,.07) 0%, transparent 70%); }
.login-glow2 { position: absolute; bottom: -200px; right: -100px; width: 500px; height: 500px; background: radial-gradient(circle, rgba(167,139,250,.05) 0%, transparent 70%); }

.login-box { position: relative; z-index: 1; width: 380px; background: var(--bg2); border: 1px solid var(--border); border-radius: 16px; padding: 40px; }
.login-logo { text-align: center; margin-bottom: 32px; }
.logo-icon { font-size: 40px; line-height: 1; margin-bottom: 8px; }
.logo-text { font-size: 22px; font-weight: 700; letter-spacing: 4px; color: var(--text); }
.logo-sub { font-size: 12px; color: var(--muted); letter-spacing: 2px; margin-top: 4px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px; }
.field input, .field textarea, .field select { width: 100%; padding: 10px 14px; background: rgba(255,255,255,.04); border: 1px solid var(--border); border-radius: 8px; color: var(--text); font-size: 14px; font-family: inherit; outline: none; transition: border-color .2s, background .2s; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: rgba(88,166,255,.5); background: rgba(88,166,255,.04); }
.field input::placeholder, .field textarea::placeholder { color: rgba(255,255,255,.2); }
.field textarea { resize: vertical; min-height: 80px; }
.field select option { background: var(--bg2); }

.btn-login { width: 100%; padding: 12px; background: var(--accent); border: none; border-radius: 8px; color: #fff; font-size: 14px; font-weight: 600; cursor: pointer; transition: opacity .2s; display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 8px; }
.btn-login:hover { opacity: .85; }
.btn-spinner { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.3); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.login-error { color: var(--red); font-size: 13px; margin-top: 12px; text-align: center; min-height: 20px; }

/* ── Dashboard Layout ─────────────────────────────────────── */
#dashboard-screen { width: 100vw; height: 100vh; overflow: hidden; }

.sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: var(--sidebar-w); background: var(--bg2); border-right: 1px solid var(--border); display: flex; flex-direction: column; z-index: 100; transition: transform .3s; }
.sidebar.collapsed { transform: translateX(calc(-1 * var(--sidebar-w))); }

.sidebar-header { display: flex; align-items: center; gap: 12px; padding: 20px 16px; border-bottom: 1px solid var(--border); }
.sidebar-logo { font-size: 24px; }
.sidebar-brand { display: flex; flex-direction: column; }
.brand-name { font-size: 15px; font-weight: 700; letter-spacing: 2px; color: var(--text); }
.brand-ver { font-size: 11px; color: var(--muted); }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 12px 8px; }
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.nav-section-label { font-size: 10px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; padding: 12px 8px 4px; }

.nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--muted); text-decoration: none; cursor: pointer; transition: background .15s, color .15s; font-size: 13.5px; position: relative; }
.nav-item:hover { background: rgba(255,255,255,.05); color: var(--text); }
.nav-item.active { background: rgba(88,166,255,.1); color: var(--accent); }
.nav-icon { width: 16px; height: 16px; flex-shrink: 0; }
.nav-badge { margin-left: auto; background: var(--accent); color: #fff; font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 10px; min-width: 18px; text-align: center; }
.nav-badge.danger { background: var(--red); }
.nav-badge:empty { display: none; }

.sidebar-footer { padding: 12px 16px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.admin-avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--purple)); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex-shrink: 0; }
.admin-details { flex: 1; min-width: 0; }
.admin-name { display: block; font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-role { font-size: 11px; color: var(--muted); }
.logout-btn { background: none; border: none; color: var(--muted); cursor: pointer; padding: 4px; border-radius: 6px; transition: color .2s, background .2s; }
.logout-btn:hover { color: var(--red); background: rgba(248,81,73,.1); }

/* ── Main Content ─────────────────────────────────────────── */
.main-content { margin-left: var(--sidebar-w); height: 100vh; display: flex; flex-direction: column; transition: margin-left .3s; }
.main-content.expanded { margin-left: 0; }

.topbar { height: var(--topbar-h); background: var(--bg2); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 24px; flex-shrink: 0; }
.topbar-left { display: flex; align-items: center; gap: 16px; }
.sidebar-toggle { background: none; border: none; color: var(--muted); cursor: pointer; padding: 6px; border-radius: 6px; transition: color .2s, background .2s; }
.sidebar-toggle:hover { color: var(--text); background: rgba(255,255,255,.05); }
.page-title { font-size: 16px; font-weight: 600; color: var(--text); }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.api-status { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: pulse 2s infinite; }
.status-dot.offline { background: var(--red); animation: none; }
.topbar-time { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

.page-content { flex: 1; overflow-y: auto; padding: 24px; }
.page-content::-webkit-scrollbar { width: 6px; }
.page-content::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ── Pages ────────────────────────────────────────────────── */
.page { display: none; }
.page.active { display: block; }

/* ── Stats Grid ───────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; padding: 20px; display: flex; align-items: center; gap: 16px; transition: border-color .2s; }
.stat-card:hover { border-color: rgba(88,166,255,.3); }
.stat-icon { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.stat-icon.blue   { background: rgba(88,166,255,.12); color: var(--accent); }
.stat-icon.green  { background: rgba(63,185,80,.12);  color: var(--green); }
.stat-icon.red    { background: rgba(248,81,73,.12);  color: var(--red); }
.stat-icon.purple { background: rgba(167,139,250,.12);color: var(--purple); }
.stat-icon.orange { background: rgba(210,153,34,.12); color: var(--orange); }
.stat-icon.teal   { background: rgba(57,211,83,.12);  color: var(--teal); }
.stat-value { font-size: 26px; font-weight: 700; color: var(--text); line-height: 1; }
.stat-label { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ── Dashboard Grid ───────────────────────────────────────── */
.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 900px) { .dashboard-grid { grid-template-columns: 1fr; } }
.dash-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.dash-card-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.dash-card-header h3 { font-size: 14px; font-weight: 600; color: var(--text); }
.recent-list { padding: 8px 0; }
.recent-row { display: flex; align-items: center; gap: 12px; padding: 10px 20px; transition: background .15s; }
.recent-row:hover { background: rgba(255,255,255,.03); }
.recent-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--bg3); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; color: var(--accent); flex-shrink: 0; }
.recent-info { flex: 1; min-width: 0; }
.recent-name { font-size: 13px; font-weight: 500; color: var(--text); }
.recent-meta { font-size: 11px; color: var(--muted); }
.loading-row { padding: 20px; text-align: center; color: var(--muted); font-size: 13px; }

/* ── Page Header ──────────────────────────────────────────── */
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; gap: 12px; flex-wrap: wrap; }
.section-title { font-size: 18px; font-weight: 600; color: var(--text); }

/* ── Search ───────────────────────────────────────────────── */
.search-wrap { position: relative; flex: 1; max-width: 400px; }
.search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search-input { width: 100%; padding: 9px 14px 9px 36px; background: var(--bg3); border: 1px solid var(--border); border-radius: 8px; color: var(--text); font-size: 13px; outline: none; transition: border-color .2s; }
.search-input:focus { border-color: rgba(88,166,255,.4); }
.search-input::placeholder { color: var(--muted); }

/* ── Buttons ──────────────────────────────────────────────── */
.btn-primary   { padding: 9px 18px; background: var(--accent); border: none; border-radius: 8px; color: #fff; font-size: 13px; font-weight: 600; cursor: pointer; transition: opacity .2s; display: inline-flex; align-items: center; gap: 6px; }
.btn-secondary { padding: 9px 16px; background: rgba(255,255,255,.06); border: 1px solid var(--border); border-radius: 8px; color: var(--text); font-size: 13px; cursor: pointer; transition: background .2s; display: inline-flex; align-items: center; gap: 6px; }
.btn-danger    { padding: 7px 14px; background: rgba(248,81,73,.12); border: 1px solid rgba(248,81,73,.3); border-radius: 6px; color: var(--red); font-size: 12px; cursor: pointer; transition: background .2s; }
.btn-warning   { padding: 7px 14px; background: rgba(210,153,34,.12); border: 1px solid rgba(210,153,34,.3); border-radius: 6px; color: var(--orange); font-size: 12px; cursor: pointer; transition: background .2s; }
.btn-success   { padding: 7px 14px; background: rgba(63,185,80,.12); border: 1px solid rgba(63,185,80,.3); border-radius: 6px; color: var(--green); font-size: 12px; cursor: pointer; transition: background .2s; }
.btn-sm        { padding: 5px 12px; background: rgba(255,255,255,.05); border: 1px solid var(--border); border-radius: 6px; color: var(--muted); font-size: 12px; cursor: pointer; transition: color .2s; }
.btn-sm:hover  { color: var(--text); }
.btn-primary:hover   { opacity: .85; }
.btn-secondary:hover { background: rgba(255,255,255,.1); }
.btn-danger:hover    { background: rgba(248,81,73,.2); }
.btn-warning:hover   { background: rgba(210,153,34,.2); }
.btn-success:hover   { background: rgba(63,185,80,.2); }

/* ── Table ────────────────────────────────────────────────── */
.table-wrap { background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table thead tr { background: var(--bg3); }
.data-table th { padding: 12px 16px; text-align: left; font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.data-table td { padding: 12px 16px; border-bottom: 1px solid rgba(48,54,61,.5); font-size: 13px; vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: rgba(255,255,255,.02); }
.table-empty { text-align: center; color: var(--muted); padding: 40px !important; }

/* ── Badges ───────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 20px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.badge-blue   { background: rgba(88,166,255,.15);  color: var(--accent); }
.badge-green  { background: rgba(63,185,80,.15);   color: var(--green); }
.badge-red    { background: rgba(248,81,73,.15);   color: var(--red); }
.badge-yellow { background: rgba(210,153,34,.15);  color: var(--orange); }
.badge-purple { background: rgba(167,139,250,.15); color: var(--purple); }
.badge-gray   { background: rgba(139,148,158,.15); color: var(--muted); }

/* ── User Avatar ──────────────────────────────────────────── */
.user-cell { display: flex; align-items: center; gap: 10px; }
.user-avatar { width: 32px; height: 32px; border-radius: 8px; background: var(--bg3); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: var(--accent); flex-shrink: 0; overflow: hidden; }
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-name { font-weight: 500; color: var(--text); }
.user-email { font-size: 11px; color: var(--muted); }

/* ── Discord Cell ─────────────────────────────────────────── */
.discord-cell { display: flex; align-items: center; gap: 8px; }
.discord-avatar { width: 24px; height: 24px; border-radius: 50%; background: #5865f2; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; color: #fff; flex-shrink: 0; overflow: hidden; }
.discord-avatar img { width: 100%; height: 100%; object-fit: cover; }
.discord-name { font-size: 12px; color: var(--muted); }
.discord-none { font-size: 12px; color: rgba(139,148,158,.4); }

/* ── Card List ────────────────────────────────────────────── */
.card-list { display: flex; flex-direction: column; gap: 10px; }
.card-item { background: var(--bg2); border: 1px solid var(--border); border-radius: 10px; padding: 16px 20px; display: flex; align-items: center; gap: 16px; transition: border-color .2s; }
.card-item:hover { border-color: rgba(88,166,255,.2); }
.card-item-info { flex: 1; min-width: 0; }
.card-item-info h4 { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 4px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card-item-info p { font-size: 12px; color: var(--muted); }
.card-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* ── Pagination ───────────────────────────────────────────── */
.pagination { display: flex; align-items: center; gap: 6px; margin-top: 16px; justify-content: center; }
.page-btn { padding: 6px 12px; background: var(--bg2); border: 1px solid var(--border); border-radius: 6px; color: var(--muted); font-size: 13px; cursor: pointer; transition: all .2s; }
.page-btn:hover { border-color: var(--accent); color: var(--accent); }
.page-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ── Economy ──────────────────────────────────────────────── */
.economy-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 700px) { .economy-grid { grid-template-columns: 1fr; } }
.eco-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; padding: 24px; }
.eco-card h3 { font-size: 15px; font-weight: 600; margin-bottom: 20px; color: var(--text); }
.eco-result { margin-top: 12px; font-size: 13px; min-height: 20px; }
.hint-text { font-size: 11px; color: var(--muted); font-weight: 400; }

/* ── Settings ─────────────────────────────────────────────── */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.settings-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; padding: 24px; }
.settings-card h3 { font-size: 15px; font-weight: 600; margin-bottom: 16px; color: var(--text); }
.settings-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid rgba(48,54,61,.5); font-size: 13px; }
.settings-row:last-child { border-bottom: none; }
.settings-row span:first-child { color: var(--muted); }
.settings-row code { background: var(--bg3); padding: 2px 8px; border-radius: 4px; font-size: 12px; color: var(--accent); font-family: monospace; }

/* ── Modal ────────────────────────────────────────────────── */
.modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 1000; align-items: center; justify-content: center; backdrop-filter: blur(4px); }
.modal.open { display: flex; }
.modal-box { background: var(--bg2); border: 1px solid var(--border); border-radius: 16px; padding: 32px; width: 480px; max-width: 95vw; max-height: 90vh; overflow-y: auto; position: relative; }
.modal-wide { width: 680px; }
.modal-close { position: absolute; top: 16px; right: 16px; background: none; border: none; color: var(--muted); cursor: pointer; padding: 4px; border-radius: 6px; transition: color .2s, background .2s; }
.modal-close:hover { color: var(--text); background: rgba(255,255,255,.08); }
.modal-box h2 { font-size: 18px; font-weight: 600; margin-bottom: 24px; color: var(--text); }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 24px; }

/* ── User Detail Modal ────────────────────────────────────── */
.user-detail-header { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.user-detail-avatar { width: 56px; height: 56px; border-radius: 12px; background: var(--bg3); display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; color: var(--accent); }
.user-detail-info h2 { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.user-detail-info p { font-size: 13px; color: var(--muted); }
.user-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.detail-row { background: var(--bg3); border-radius: 8px; padding: 12px 14px; }
.detail-label { font-size: 10px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 4px; }
.detail-value { font-size: 13px; color: var(--text); word-break: break-all; }
.discord-section { background: rgba(88,101,242,.08); border: 1px solid rgba(88,101,242,.2); border-radius: 10px; padding: 16px; margin-bottom: 20px; }
.discord-section-header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.discord-logo { width: 24px; height: 24px; background: #5865f2; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #fff; }
.discord-section-header h4 { font-size: 14px; font-weight: 600; color: var(--text); }
.discord-linked { display: flex; align-items: center; gap: 12px; }
.discord-linked-avatar { width: 40px; height: 40px; border-radius: 50%; background: #5865f2; overflow: hidden; }
.discord-linked-avatar img { width: 100%; height: 100%; object-fit: cover; }
.discord-linked-name { font-size: 14px; font-weight: 600; color: var(--text); }
.discord-linked-id { font-size: 11px; color: var(--muted); }
.cosmetics-section { margin-bottom: 20px; }
.cosmetics-section h4 { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 10px; text-transform: uppercase; letter-spacing: .5px; }
.cosmetics-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.cosmetic-tag { padding: 4px 10px; background: rgba(167,139,250,.1); border: 1px solid rgba(167,139,250,.2); border-radius: 20px; font-size: 12px; color: var(--purple); }
.cosmetic-tag.empty { color: var(--muted); background: var(--bg3); border-color: var(--border); }

/* ── Toast ────────────────────────────────────────────────── */
#toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast { padding: 12px 18px; border-radius: 10px; font-size: 13px; font-weight: 500; display: flex; align-items: center; gap: 10px; animation: slideIn .3s ease; box-shadow: 0 4px 20px rgba(0,0,0,.4); min-width: 240px; }
.toast.success { background: rgba(63,185,80,.15); border: 1px solid rgba(63,185,80,.3); color: var(--green); }
.toast.error   { background: rgba(248,81,73,.15); border: 1px solid rgba(248,81,73,.3); color: var(--red); }
.toast.info    { background: rgba(88,166,255,.15); border: 1px solid rgba(88,166,255,.3); color: var(--accent); }

/* ── Animations ───────────────────────────────────────────── */
@keyframes spin     { to { transform: rotate(360deg); } }
@keyframes pulse    { 0%,100% { opacity: 1; } 50% { opacity: .4; } }
@keyframes slideIn  { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes fadeIn   { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* ── Upgraded Logos & Quick Actions ───────────────────────── */
.login-logo-img { width: 72px; height: 72px; object-fit: contain; margin-bottom: 12px; filter: drop-shadow(0 0 20px rgba(99,102,241,0.4)); }
.sidebar-logo-img { width: 34px; height: 34px; object-fit: contain; border-radius: 8px; filter: drop-shadow(0 0 10px rgba(99,102,241,0.3)); }

.quick-actions-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, rgba(99,102,241,0.08), rgba(168,85,247,0.08));
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: 12px;
  padding: 14px 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.quick-actions-title { font-weight: 700; font-size: 13px; color: #818cf8; letter-spacing: 0.5px; }
.quick-actions-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-quick {
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all .2s;
}
.btn-quick:hover {
  background: rgba(99,102,241,0.15);
  border-color: rgba(99,102,241,0.4);
  transform: translateY(-1px);
}
.q-icon { font-size: 14px; }

/* ── Capes Management Grid ────────────────────────────────── */
.capes-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 20px; }
.cape-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
}
.cape-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; color: var(--text); }
.cape-preview-box {
  background: repeating-conic-gradient(#1c2128 0% 25%, #161b22 0% 50%) 50% / 16px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 140px;
}
.cape-preview-box img {
  max-height: 120px;
  image-rendering: pixelated;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.5));
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar { transform: translateX(calc(-1 * var(--sidebar-w))); }
  .sidebar.mobile-open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .data-table th:nth-child(n+4), .data-table td:nth-child(n+4) { display: none; }
}
