@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&display=swap');

:root {
    /* --- FRUITZ ACCENTS --- */
    --cherry: #FF445A;       
    --grape: #9D64FF;        
    --watermelon: #FF7E9D;   
    --peach: #FFA26B;        
    
    /* --- DARK BACKGROUNDS --- */
    --bg-app: #050505;       
    --bg-sidebar: #0a0a0c;   
    --bg-card: #0f0f12;      
    --bg-item: #16161a;      
    
    /* --- BORDERS & SHADOWS --- */
    --border: rgba(255, 255, 255, 0.1);
    --border-hover: rgba(255, 255, 255, 0.2);
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.5);
    
    /* --- TEXT COLORS --- */
    --primary: var(--cherry);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    
    --radius-l: 16px;
    --radius-m: 12px;
    --sidebar-width: 260px;
    --transition: all 0.2s ease-in-out;
}

* { box-sizing: border-box; outline: none; }

body {
    margin: 0; font-family: 'Nunito', sans-serif;
    background-color: var(--bg-app); color: var(--text-main);
    display: flex; height: 100vh; overflow: hidden; font-size: 14px;
}

a { text-decoration: none; color: inherit; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 10px; }

/* SIDEBAR */
.sidebar { width: var(--sidebar-width); background: var(--bg-sidebar); border-right: 1px solid var(--border); padding: 30px 20px; z-index: 100; }
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 40px; padding-left: 10px; }
.brand-logo { width: 36px; height: 36px; background: linear-gradient(135deg, var(--watermelon), var(--cherry)); border-radius: 10px; display: grid; place-items: center; color: #fff; font-weight: 900; font-size: 16px; }
.brand-text { font-size: 18px; font-weight: 900; color: #fff; }
.nav-menu { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.nav-item { padding: 12px 16px; border-radius: 10px; color: var(--text-muted); cursor: pointer; font-weight: 700; display: flex; align-items: center; gap: 14px; transition: var(--transition); border: 1px solid transparent; }
.nav-item:hover { background: rgba(255,255,255,0.03); color: #fff; }
.nav-item.active { background: rgba(255, 68, 90, 0.1); color: var(--cherry); border-color: rgba(255, 68, 90, 0.2); }

/* MAIN CONTENT */
.main-wrapper { flex: 1; overflow-y: auto; padding: 30px 40px; }
.top-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; }
h1 { font-size: 24px; font-weight: 900; margin: 0; color: #fff; }
.subtitle { color: var(--text-muted); font-size: 13px; margin-top: 4px; font-weight: 600; }

/* BOUTONS */
.btn { padding: 10px 20px; border-radius: 8px; font-weight: 800; font-size: 13px; cursor: pointer; border: none; display: inline-flex; align-items: center; gap: 8px; transition: var(--transition); }
.btn-primary { background: var(--cherry); color: #fff; }
.btn-primary:hover { background: #e03c50; transform: translateY(-1px); }
.btn-classic { background: var(--bg-item); border: 1px solid rgba(255,255,255,0.15); color: #fff; }
.btn-classic:hover { background: #222; border-color: var(--text-muted); }
.btn-ghost { background: transparent; border: 1px solid transparent; color: var(--text-muted); }
.btn-ghost:hover { background: rgba(255,255,255,0.05); color: #fff; }
.btn-danger { background: rgba(239, 68, 68, 0.1); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.3); }
.btn-danger:hover { background: #ef4444; color: #fff; }

/* STATS GRID */
.mini-stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 25px; }
.stat-box { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-m); padding: 20px; text-align: center; }
.stat-box .val { font-size: 2rem; font-weight: 900; margin-bottom: 6px; }
.stat-box .lab { font-weight: 800; text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.5px; }
.stat-box.alive { border-color: rgba(74, 222, 128, 0.3); color: #4ade80; }
.stat-box.shadow { border-color: rgba(245, 158, 11, 0.3); color: #f59e0b; }
.stat-box.banned { border-color: rgba(239, 68, 68, 0.3); color: #ef4444; }

/* BARRES DE RECHERCHE ET FILTRES */
.search-container { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-m); padding: 10px 16px; margin-bottom: 20px; display: flex; align-items: center; gap: 12px; }
.search-input { flex: 1; border: none; background: transparent; color: #fff; font-weight: 600; font-size: 0.95rem; outline: none; }
.action-bar { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-m); padding: 20px; display: flex; flex-wrap: wrap; gap: 15px; align-items: flex-end; margin-bottom: 20px; }
.automation-bar { justify-content: space-between; align-items: center; }
.actions-title { font-weight: 800; color: #fff; display: flex; align-items: center; gap: 10px; }

/* FIX DES DROPDOWNS */
.input-wrap { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 120px; }
.input-wrap label { font-size: 0.7rem; font-weight: 800; color: var(--text-muted); text-transform: uppercase; }
.input-wrap select { 
    -webkit-appearance: none; -moz-appearance: none; appearance: none; 
    background-color: var(--bg-item); border: 1px solid rgba(255,255,255,0.15); 
    color: #fff; font-weight: 600; height: 40px; border-radius: 8px; padding: 0 35px 0 15px; 
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e"); 
    background-repeat: no-repeat; background-position: right 10px center; background-size: 14px; 
}
.input-wrap select:focus { border-color: var(--primary); }
.input-wrap select option { background: #0f0f12; color: #fff; }
.custom-dropdown-btn { background: var(--bg-item); border: 1px solid rgba(255,255,255,0.15); color: #fff; height: 40px; border-radius: 8px; display: flex; align-items: center; justify-content: space-between; padding: 0 15px; cursor: pointer; font-weight: 600; }

/* GRILLE ET CARTES */
.accounts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; align-items: start; padding-bottom: 50px; }
.acc-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-m); display: flex; flex-direction: column; transition: var(--transition); overflow: hidden; }
.acc-card:hover { border-color: var(--border-hover); box-shadow: var(--shadow-soft); }
.acc-card.selected { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.card-header { height: 260px; position: relative; background: #111; overflow: hidden; }
.card-img { width: 100%; height: 100%; object-fit: cover; opacity: 0.9; }

.badge-status { position: absolute; top: 12px; left: 12px; background: rgba(0,0,0,0.8); padding: 4px 10px; border-radius: 6px; font-size: 0.7rem; font-weight: 800; text-transform: uppercase; border: 1px solid; z-index: 5; }
.badges-right-stack { position: absolute; top: 12px; right: 12px; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; z-index: 5; }
.badge-class, .badge-likes { background: rgba(0,0,0,0.8); padding: 4px 10px; border-radius: 6px; font-size: 0.75rem; font-weight: 800; color: #fff; border: 1px solid rgba(255,255,255,0.1); display: flex; align-items: center; gap: 6px; }

.card-main-info { position: absolute; bottom: 0; left: 0; right: 0; padding: 40px 15px 15px; background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, transparent 100%); z-index: 4; }
.name-age { font-size: 1.3rem; font-weight: 900; color: #fff; }
.loc-text { font-size: 0.85rem; color: #cbd5e1; font-weight: 600; margin-top: 4px; display: flex; align-items: center; gap: 6px; }

.details-content { padding: 15px; background: var(--bg-card); flex: 1; }
.section-title { font-size: 0.7rem; text-transform: uppercase; color: var(--text-muted); font-weight: 800; margin-bottom: 10px; border-bottom: 1px solid var(--border); padding-bottom: 4px; }
.detail-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 0.85rem; }
.detail-icon { width: 28px; height: 28px; border-radius: 6px; display: grid; place-items: center; background: rgba(255,255,255,0.03); color: var(--text-muted); }
.detail-val { color: #e2e8f0; font-weight: 600; }

.card-actions { padding: 12px 15px; background: rgba(0,0,0,0.2); border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.card-actions-right { display: flex; gap: 6px; }
.card-actions-right button { width: 32px; height: 32px; border-radius: 6px; display: grid; place-items: center; cursor: pointer; background: var(--bg-item); border: 1px solid rgba(255,255,255,0.1); color: var(--text-muted); transition: 0.2s; }
.card-actions-right button:hover { background: rgba(255,255,255,0.1); color: #fff; }

/* MODALS */
.modal-overlay { display: none; position: fixed; inset: 0; z-index: 9999; align-items: center; justify-content: center; background: rgba(0,0,0,0.8); backdrop-filter: blur(4px); }
.modal-box { width: 100%; max-height: 90vh; overflow-y: auto; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-m); }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 20px; border-bottom: 1px solid var(--border); }
.modal-header h3 { margin: 0; font-size: 1.1rem; color: #fff; font-weight: 800; }
.close-modal { background: none; border: none; color: var(--text-muted); font-size: 1.2rem; cursor: pointer; }
.close-modal:hover { color: #ef4444; }
.modal-body { padding: 20px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 15px 20px; border-top: 1px solid var(--border); background: rgba(0,0,0,0.2); }
textarea, input[type="text"], input[type="number"], input[type="email"] { background: var(--bg-item); border: 1px solid rgba(255,255,255,0.15); color: #fff; padding: 12px; border-radius: 8px; font-family: inherit; font-size: 0.9rem; }
textarea:focus, input:focus { border-color: var(--primary); }

.mass-action-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.mass-action-card { background: var(--bg-item); border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; padding: 20px 10px; text-align: center; cursor: pointer; transition: 0.2s; display: flex; flex-direction: column; align-items: center; }
.mass-action-card:hover { border-color: var(--primary); background: rgba(255,255,255,0.03); }

.sync-console {
    position: fixed; bottom: 0; right: 40px; width: 450px; background: #0a0a0c;
    border: 1px solid #333; border-bottom: none; border-radius: 12px 12px 0 0;
    z-index: 10000; transition: transform 0.3s ease; transform: translateY(100%);
}
.sync-console.open { transform: translateY(0); }
.sync-console.collapsed .console-body { display: none; }
.console-header { padding: 12px 20px; background: #16161a; cursor: pointer; display: flex; justify-content: space-between; align-items: center; border-radius: 12px 12px 0 0; }
.console-body { height: 300px; overflow-y: auto; padding: 15px; font-family: 'Space Mono', monospace; font-size: 11px; color: #aaa; background: #050505; }
.log-line { margin-bottom: 5px; display: flex; gap: 10px; }
.log-time { color: #555; }
.text-green { color: #4ade80; }
.text-red { color: #ef4444; }
.text-yellow { color: #f59e0b; }