/* Variables Globales V2 (Admin Premium) */
:root {
    --bg-color: #0d0f17;
    --text-color: #d1d5db;
    --primary-gradient: linear-gradient(135deg, #FF4B72, #FF8A00);
    --secondary-gradient: linear-gradient(135deg, #00C6FF, #0072FF);
    --danger-gradient: linear-gradient(135deg, #ff2a2a, #d40000);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --card-hover: rgba(255, 255, 255, 0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }

body {
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(255, 75, 114, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(0, 198, 255, 0.08) 0%, transparent 50%);
    color: var(--text-color);
    height: 100vh;
    overflow: hidden;
    position: relative;
}

/* Glass Panel Base */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* Screens */
.screen {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    display: flex;
    justify-content: center; align-items: center;
    visibility: hidden; opacity: 0;
    transition: all 0.4s ease;
    z-index: 10;
}
.screen.active {
    visibility: visible; opacity: 1; z-index: 20;
}
#dashboard-screen {
    flex-direction: column; align-items: stretch; justify-content: flex-start;
}

/* --- LOGIN SCREEN --- */
.login-box {
    padding: 3rem; text-align: center; width: 90%; max-width: 420px;
    display: flex; flex-direction: column; gap: 15px;
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.login-box .admin-icon {
    font-size: 4rem; filter: drop-shadow(0 0 10px rgba(255,255,255,0.4));
    margin-bottom: -10px;
}

.login-box h1 {
    font-size: 2rem; font-weight: 800; letter-spacing: -1px;
    background: var(--primary-gradient); -webkit-background-clip: text; color: transparent;
}

.login-box input {
    width: 100%; padding: 16px 20px;
    background: rgba(0,0,0,0.3); color: #fff;
    border: 1px solid var(--glass-border); border-radius: 12px;
    font-size: 1.1rem; text-align: center; letter-spacing: 2px;
    transition: 0.3s;
}
.login-box input:focus {
    border-color: #FF4B72; outline: none; box-shadow: 0 0 15px rgba(255, 75, 114, 0.3);
}

.error-text { color: #ff2a2a; font-size: 0.9rem; min-height: 20px; }

.glow-btn {
    padding: 16px; border: none; border-radius: 12px;
    background: var(--primary-gradient); color: white;
    font-size: 1.1rem; font-weight: 600; cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 75, 114, 0.4);
    transition: 0.3s;
}
.glow-btn:hover {
    transform: translateY(-2px); box-shadow: 0 6px 20px rgba(255, 75, 114, 0.6);
}

/* --- DASHBOARD HEADER --- */
.admin-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1.5rem 2.5rem; border-bottom: 1px solid var(--glass-border);
    background: rgba(13, 15, 23, 0.8); backdrop-filter: blur(10px);
}
.logo { font-size: 1.4rem; font-weight: 800; color: #fff; display: flex; align-items: center; gap: 8px;}
.shield { filter: drop-shadow(0 0 5px rgba(255,255,255,0.3)); }
.danger-btn {
    padding: 10px 18px; border: none; border-radius: 8px;
    background: var(--danger-gradient); color: white; font-weight: 600;
    cursor: pointer; transition: 0.3s;
}
.danger-btn:hover { background: #d40000; box-shadow: 0 0 10px rgba(255, 42, 42, 0.6); }

/* --- DASHBOARD LAYOUT --- */
.dashboard-layout {
    display: flex; flex: 1; overflow: hidden; gap: 20px; padding: 20px;
}

/* SIDEBAR */
.sidebar { width: 280px; padding: 20px; border-radius: 20px; display: flex; flex-direction: column;}
.nav-links { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.nav-links li {
    padding: 16px 20px; border-radius: 12px; cursor: pointer;
    font-weight: 500; font-size: 1.05rem; color: #a1a1aa;
    transition: 0.3s; display: flex; align-items: center; gap: 12px;
}
.nav-links li:hover { background: rgba(255, 255, 255, 0.05); color: #fff; transform: translateX(5px); }
.nav-links li.active {
    background: var(--secondary-gradient); color: #fff; font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 198, 255, 0.4);
}

/* MAIN CONTENT */
.main-content {
    flex: 1; padding: 40px; border-radius: 20px; overflow-y: auto; overflow-x: hidden;
}
.main-content::-webkit-scrollbar { width: 8px; }
.main-content::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

.app-view {
    animation: fadeIn 0.4s ease;
}

h2 { font-size: 2.2rem; font-weight: 800; color: #fff; margin-bottom: 5px; }
.subtitle { color: #8b8f98; font-size: 1.1rem; margin-bottom: 30px; border-bottom: 1px solid var(--glass-border); padding-bottom: 20px;}

/* SALDOS GRID */
.balances-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.user-card {
    background: rgba(0,0,0,0.4); border: 1px solid var(--glass-border);
    border-radius: 20px; padding: 30px; text-align: center;
    transition: 0.3s;
}
.user-card:hover { transform: translateY(-5px); border-color: rgba(255, 255, 255, 0.2); background: rgba(0,0,0,0.6);}
.user-card h3 { font-size: 1.6rem; margin-bottom: 15px; color: #fff; }
.balance-display { display: flex; justify-content: center; align-items: start; margin-bottom: 25px; }
.balance-display .currency { font-size: 2rem; color: #FF4B72; margin-top: 5px; font-weight: bold;}
.balance-display .amount { font-size: 4.5rem; font-weight: 900; background: var(--primary-gradient); -webkit-background-clip: text; color: transparent; line-height: 1;}

.balance-controls { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 20px; }
.balance-controls button {
    padding: 12px 0; border: none; border-radius: 8px; font-weight: bold; font-size: 1.1rem;
    cursor: pointer; transition: 0.2s;
}
.btn-sub { background: rgba(255, 42, 42, 0.1); color: #ff2a2a; border: 1px solid rgba(255, 42, 42, 0.3); }
.btn-sub:hover { background: rgba(255, 42, 42, 0.2); transform: scale(1.05); }
.btn-add { background: rgba(0, 198, 255, 0.1); color: #00c6ff; border: 1px solid rgba(0, 198, 255, 0.3); }
.btn-add:hover { background: rgba(0, 198, 255, 0.2); transform: scale(1.05); }

.custom-balance { display: flex; gap: 10px; }
.custom-balance input { flex: 1; padding: 12px; border-radius: 8px; border: 1px solid var(--glass-border); background: rgba(255,255,255,0.05); color: white; text-align: center; }
.btn-set { padding: 0 20px; background: #fff; color: #000; border: none; font-weight: bold; border-radius: 8px; cursor: pointer; transition: 0.2s;}
.btn-set:hover { background: #e0e0e0; }

/* MURO / MODERACIÓN */
.admin-feed { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.admin-post { background: rgba(0,0,0,0.5); padding: 15px; border-radius: 12px; border: 1px solid var(--glass-border); display: flex; flex-direction: column; gap: 10px; }
.admin-post img, .admin-post video { width: 100%; border-radius: 8px; max-height: 200px; object-fit: cover; background: #000; }
.post-meta { display: flex; justify-content: space-between; font-size: 0.85rem; color: #888; }
.post-author-name { font-weight: bold; color: #ccc; }
.delete-post-btn { background: var(--danger-gradient); color: white; border: none; padding: 10px; border-radius: 6px; cursor: pointer; font-weight: bold; display: flex; justify-content: center; gap: 8px; transition: 0.2s;}
.delete-post-btn:hover { background: #cc0000; }

/* MENSAJE DEL SISTEMA */
.form-group label { display: block; margin-bottom: 8px; color: #ccc; font-weight: bold; }
#sys-message { width: 100%; padding: 15px; border-radius: 12px; border: 1px solid var(--glass-border); background: rgba(0,0,0,0.3); color: white; font-size: 1.1rem; resize: vertical; margin-bottom: 20px;}
#send-sys-msg-btn { width: auto; padding: 16px 40px; }

/* NOTA ESPÍA */
.spy-container { position: relative; }
#spy-note { width: 100%; padding: 20px; border-radius: 12px; border: 1px solid var(--primary-gradient); background: rgba(0,0,0,0.4); color: #ffb8c6; font-size: 1.3rem; font-family: 'Inter', cursive; line-height: 1.6; resize: vertical; }
#spy-status { position: absolute; bottom: 20px; right: 20px; font-size: 0.8rem; color: #888; pointer-events: none;}


/* TOAST NOTIFICATION */
.toast { position: fixed; bottom: -60px; left: 50%; transform: translateX(-50%); background: rgba(0, 198, 255, 0.9); color: white; padding: 12px 24px; border-radius: 30px; font-weight: bold; box-shadow: 0 4px 20px rgba(0, 198, 255, 0.5); transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); z-index: 100; pointer-events: none; }
.toast.show { bottom: 30px; }

/* TOGGLE SWITCH */
.switch { position: relative; display: inline-block; width: 60px; height: 34px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(255,255,255,0.1); transition: .4s; border: 1px solid var(--glass-border); }
.slider:before { position: absolute; content: ""; height: 26px; width: 26px; left: 4px; bottom: 3px; background-color: white; transition: .4s; box-shadow: 0 2px 5px rgba(0,0,0,0.5); }
input:checked + .slider { background: var(--primary-gradient); border-color: transparent; }
input:checked + .slider:before { transform: translateX(26px); }
.slider.round { border-radius: 34px; }
.slider.round:before { border-radius: 50%; }

/* Utilities */
.full-width { width: 100%; }

@keyframes slideUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsividad Simple */
@media (max-width: 800px) {
    .dashboard-layout { flex-direction: column; padding: 10px; gap:10px; }
    .sidebar { width: 100%; border-radius: 12px; padding: 10px;}
    .nav-links { flex-direction: row; flex-wrap: wrap; gap: 5px; }
    .nav-links li { flex: 1 1 auto; text-align: center; justify-content: center; padding: 12px;}
    .main-content { padding: 20px; border-radius: 12px; }
}
