/* ==============================
   ADMIN.CSS — HARDCORE SYSTEM (FIXED)
   ============================== */

:root {
    --bg-dark: #000000;
    --bg-surface: #050505;
    --glass-border: rgba(255, 255, 255, 0.2);
    --accent-red: #ff0000;
    --accent-white: #ffffff;
    --text-main: #e2e2e2;
    --text-dim: #666666;
}

/* Scanline Effect */
body::before {
    content: " ";
    display: block;
    position: fixed;
    top: 0; left: 0; bottom: 0; right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.03));
    z-index: 9999;
    background-size: 100% 4px, 3px 100%;
    pointer-events: none;
    opacity: 0.15;
}

body {
    overflow: hidden;
    background-color: var(--bg-dark);
    color: var(--text-main);
    margin: 0;
    font-family: 'Courier New', Courier, monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.grid-overlay {
    position: fixed; inset: 0; z-index: 0;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}

/* AI Assets Filter & Sizing */
.asb-logo { width: 44px !important; height: 44px !important; object-fit: contain; margin-bottom: 10px; }
.td-avatar, .uj-avatar { width: 30px !important; height: 30px !important; border-radius: 0; border: 1px solid white; object-fit: cover; }
.chip-avatar { width: 24px !important; height: 24px !important; object-fit: cover; }

.asb-logo, .as-icon img, .aqb img, .bac-icon img, .td-avatar img, .uj-avatar img, .chip-avatar, .asb-item img {
    filter: grayscale(1) invert(1) brightness(2) !important;
}

img:not(.emoji) { max-width: 100%; display: block; }

/* ===== LAYOUT ===== */
.admin-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    height: 100vh;
    width: 100%;
    padding: 20px;
    gap: 20px;
    box-sizing: border-box;
    position: relative;
    z-index: 10;
}

/* SIDEBAR */
.admin-sidebar {
    border: 1px solid var(--accent-white);
    background: black;
    padding: 30px 15px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.asb-brand {
    border-bottom: 2px solid var(--accent-white);
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.asb-sub { color: var(--accent-red); font-weight: 900; animation: blink 1s infinite; font-size: 12px; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.asb-nav { display: flex; flex-direction: column; gap: 5px; flex: 1; }

.asb-item {
    padding: 15px;
    color: var(--text-dim);
    border: 1px solid transparent;
    transition: 0.1s;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    font-size: 14px;
}

.asb-item:hover, .asb-item.active {
    color: black;
    background: white;
    border-color: white;
}

/* MAIN AREA */
.admin-main { display: flex; flex-direction: column; overflow: hidden; }

.admin-topbar { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 30px; }
.admin-topbar-title {
    font-size: 38px;
    font-weight: 900;
    color: white;
    margin: 0;
    line-height: 1;
}

/* Functional Grids (THE FIX) */
.as-stat-row { 
    display: grid; 
    grid-template-columns: repeat(5, 1fr); 
    gap: 15px; 
    margin-bottom: 20px; 
}

.as-card { 
    padding: 20px; 
    border: 1px solid var(--accent-white); 
    border-left: 6px solid white; 
    background: black;
}
.as-label { font-size: 10px; color: var(--text-dim); margin-bottom: 8px; }
.as-value { font-size: 32px; font-weight: 900; color: white; display: block; }

.overview-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 20px; 
}

.glass-card {
    background: black;
    border: 1px solid var(--accent-white);
    padding: 20px;
}

/* Table */
.fancy-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.fancy-table th { background: white; color: black; padding: 12px; font-size: 11px; text-align: left; }
.fancy-table td { border-bottom: 1px solid #222; padding: 15px; font-size: 13px; }
.fancy-table tr:hover td { background: #111; }

.td-user { font-weight: 900; }

/* Role Tags */
.role-tag { font-size: 10px; padding: 2px 6px; font-weight: 900; }
.role-tag.founder { background: white; color: black; }
.role-tag.admin { border: 1px solid white; }
.role-tag.member { color: var(--text-dim); }

/* Buttons */
.ta-btn, .save-btn, .aqb, .lr-btn {
    background: black;
    color: white;
    border: 1px solid white;
    padding: 10px 15px;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    font-family: inherit;
    font-size: 11px;
}

.ta-btn:hover, .save-btn:hover, .aqb:hover {
    background: white;
    color: black;
}

.ta-btn.ban { color: var(--accent-red); border-color: var(--accent-red); }
.ta-btn.ban:hover { background: var(--accent-red); color: white; }

/* Sections */
.admin-section { display: none; overflow-y: auto; flex: 1; padding-right: 5px; }
.admin-section.active { display: block; }

/* Custom Badge Modal */
.badge-modal {
    position: fixed; inset: 0; background: rgba(0,0,0,0.95); z-index: 10000;
    display: none; align-items: center; justify-content: center;
}
.badge-modal-content {
    background: black; border: 1px solid white; padding: 40px; width: 450px;
    box-shadow: 0 0 50px rgba(255,255,255,0.1);
}
.badge-opt {
    display: flex; align-items: center; gap: 15px; padding: 12px;
    border: 1px solid #222; margin-bottom: 10px; cursor: pointer;
    transition: 0.2s;
}
.badge-opt:hover { background: #111; }
.badge-opt.selected { border-color: white; background: #222; color: white; }
.badge-opt span { font-size: 20px; filter: none !important; }

/* Restricted Overlay */
.restricted-overlay {
    position: fixed; inset: 0; background: #000; z-index: 99999;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    text-align: center; color: #fff; border: 10px solid var(--accent-red);
}
.restricted-title { color: var(--accent-red); font-size: 80px; font-weight: 900; margin: 0; letter-spacing: -5px; }
.restricted-btn { 
    background: transparent; color: white; border: 2px solid white; 
    padding: 15px 40px; font-weight: 900; text-decoration: none; margin-top: 30px;
}

/* Quick Actions Container */
.quick-actions { display: grid; grid-template-columns: 1fr; gap: 10px; }

/* Scrollbar */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: black; }
::-webkit-scrollbar-thumb { background: white; }
