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

:root {
    /* Elosool Cyberpunk / Modern Tech Identity */
    --bg-main: #060b13; /* Deep Midnight Navy */
    --bg-card: rgba(14, 21, 38, 0.6); /* Glassy Navy Card */
    --bg-card-hover: rgba(14, 21, 38, 0.9);
    --bg-sidebar: #060B13;
    
    --bg-tertiary: rgba(255, 255, 255, 0.03);
    --bg-hover: rgba(0, 229, 255, 0.1); /* Cyan Hover */
    
    /* Authentic Elosool Accent Colors */
    --accent-blue: #0088ff;
    --accent-cyan: #00e5ff; /* Vibrant Elosool Neon Cyan */
    --accent-green: #00e5ff; /* Use Cyan for positive actions too to unify brand */
    --accent-purple: #0088ff; /* Replaced Kingmaster Violet with Ocean Blue */
    --accent-violet: #0088ff;

    --text-main: #ffffff;
    --text-muted: #94a3b8;
    
    --glass-border: rgba(0, 229, 255, 0.15); /* Glowing Cyan Glass Border */
    --accent-glow: rgba(0, 229, 255, 0.4);
    
    --sidebar-width-left: 100px;
    --sidebar-width-right: 280px;
    --top-nav-height: 80px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Cairo', sans-serif; /* Elosool Font */
    background-color: var(--bg-main);
    color: var(--text-main);
    overflow: hidden;
    position: relative;
    /* Basic particles illusion with pure CSS */
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(0, 229, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(0, 136, 255, 0.05) 0%, transparent 50%);
    background-size: cover;
    background-attachment: fixed;
}

/* Floating Grid Animation for the Tech Vibe */
body::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: linear-gradient(rgba(0, 229, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
    z-index: -2;
    transform: perspective(500px) rotateX(60deg) translateY(-100px);
    animation: gridMove 20s linear infinite;
    opacity: 0.3;
}
@keyframes gridMove {
    0% { transform: perspective(500px) rotateX(60deg) translateY(0); }
    100% { transform: perspective(500px) rotateX(60deg) translateY(30px); }
}

a { text-decoration: none; color: inherit; }
button { font-family: inherit; }

/* 1. Layout Container */
.layout-wrapper {
    display: flex;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    position: relative;
    z-index: 10;
}

/* 2. Left Sidebar (Tool Switcher) */
.sidebar-left {
    width: var(--sidebar-width-left);
    background: var(--bg-sidebar);
    border-left: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    z-index: 50;
    box-shadow: -5px 0 25px rgba(0,0,0,0.5);
}

.brand-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; color: #fff;
    margin-bottom: 30px;
    box-shadow: 0 0 20px var(--accent-glow);
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0); }
    50% { transform: translateY(-5px); box-shadow: 0 5px 25px var(--accent-glow); }
    100% { transform: translateY(0); }
}

.menu-title {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tool-list {
    width: 100%;
    display: flex; flex-direction: column; align-items: center; gap: 15px;
}

.tool-item {
    width: 65px; height: 65px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    border-radius: 18px;
    color: var(--text-muted);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.tool-item i { font-size: 22px; margin-bottom: 2px; transition: transform 0.3s; }
.tool-item span { font-size: 11px; font-weight: 700; opacity: 0.8; transition: all 0.3s; }

.tool-item:hover {
    background: var(--bg-hover);
    color: var(--accent-cyan);
    box-shadow: inset 0 0 15px rgba(0, 229, 255, 0.1);
}

.tool-item:hover i { transform: translateY(-8px); }
.tool-item:hover span { opacity: 1; transform: translateY(0); }

.tool-item.active {
    background: linear-gradient(135deg, rgba(0, 136, 255, 0.2), rgba(0, 229, 255, 0.1));
    color: var(--accent-cyan);
    border: 1px solid var(--glass-border);
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.15);
}
.tool-item.active i { transform: translateY(-8px); filter: drop-shadow(0 0 5px var(--accent-cyan)); }
.tool-item.active span { opacity: 1; transform: translateY(0); }

/* Left glowing indicator line */
.tool-item.active::before {
    content: ''; position: absolute; right: -2px; top: 20%; height: 60%; width: 4px;
    background: var(--accent-cyan); border-radius: 4px;
    box-shadow: 0 0 10px var(--accent-cyan);
}

/* 3. Main Center Area */
.main-wrapper {
    flex: 1;
    display: flex; flex-direction: column;
    padding: 0 30px;
    overflow-y: auto;
    position: relative;
}

.main-wrapper::-webkit-scrollbar { width: 6px; }
.main-wrapper::-webkit-scrollbar-thumb { background: rgba(0,229,255,0.3); border-radius: 10px; }

/* Top Navbar */
.top-navbar {
    height: var(--top-nav-height);
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 20px; margin-bottom: 20px;
    background: rgba(6, 11, 19, 0.7);
    backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 0 25px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    position: sticky; top: 20px; z-index: 100;
}

.top-pills { display: flex; gap: 10px; }
.top-pill {
    padding: 10px 20px; border-radius: 12px;
    color: var(--text-muted); font-weight: 600; font-size: 14px;
    display: flex; align-items: center; gap: 8px;
    transition: all 0.3s;
}
.top-pill:hover { background: rgba(0, 229, 255, 0.05); color: #fff; }
.top-pill.active {
    background: rgba(0, 229, 255, 0.1); color: var(--accent-cyan);
    border: 1px solid rgba(0, 229, 255, 0.2);
    box-shadow: inset 0 0 15px rgba(0, 229, 255, 0.05);
}

.top-profile-area { display: flex; align-items: center; gap: 15px; }
.icon-btn {
    width: 40px; height: 40px; border-radius: 12px;
    background: rgba(255,255,255,0.03); color: var(--text-muted);
    display: flex; align-items: center; justify-content: center;
    transition: all 0.3s; position: relative; border: 1px solid transparent;
}
.icon-btn:hover { background: rgba(0, 229, 255, 0.1); color: var(--accent-cyan); border-color: rgba(0, 229, 255, 0.3); transform: translateY(-2px); }
.badge {
    position: absolute; top: -5px; right: -5px; background: #ff0055;
    color: #fff; font-size: 10px; font-weight: bold; width: 18px; height: 18px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 10px rgba(255,0,85,0.5);
}
.profile-pic { width: 45px; height: 45px; border-radius: 12px; object-fit: cover; border: 2px solid var(--glass-border); padding: 2px;}

/* 4. Right Sidebar (Administration) */
.sidebar-right {
    width: var(--sidebar-width-right);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--glass-border);
    padding: 30px 20px;
    z-index: 50;
    box-shadow: 5px 0 25px rgba(0,0,0,0.5);
}

.brand-text {
    font-size: 22px; font-weight: 800; color: #fff;
    margin-bottom: 40px; padding-right: 15px;
    border-right: 4px solid var(--accent-cyan);
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(0, 229, 255, 0.3);
}

.sidebar-right .tool-list { align-items: stretch; }
.sidebar-right .tool-item {
    width: 100%; height: 55px;
    flex-direction: row; justify-content: flex-start;
    padding: 0 20px; gap: 15px;
    border-radius: 14px; margin-bottom: 5px;
}
.sidebar-right .tool-item i { margin-bottom: 0; font-size: 18px; }
.sidebar-right .tool-item span { position: static; opacity: 1; transform: none; font-size: 15px; }

.sidebar-right .tool-item:hover i { transform: translateX(-5px); }
.sidebar-right .tool-item.active { background: rgba(0, 229, 255, 0.1); border-color: rgba(0, 229, 255, 0.3); box-shadow: none; }
.sidebar-right .tool-item.active::before { right: -20px; top: 10%; height: 80%; }

/* --- Forms & Common UI Elements --- */
.t-btn {
    background: rgba(0, 229, 255, 0.1); color: var(--accent-cyan);
    border: 1px solid rgba(0, 229, 255, 0.3); padding: 10px 20px; border-radius: 10px;
    font-weight: 700; cursor: pointer; transition: all 0.3s;
    display: inline-flex; align-items: center; gap: 8px; font-size: 14px;
}
.t-btn:hover {
    background: var(--accent-cyan); color: #000;
    box-shadow: 0 5px 15px var(--accent-glow); transform: translateY(-2px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
    color: #fff; border: none; padding: 12px 25px; border-radius: 12px;
    font-weight: 800; cursor: pointer; transition: all 0.3s;
    display: inline-flex; align-items: center; gap: 10px; font-size: 15px;
    box-shadow: 0 5px 20px var(--accent-glow);
}
.btn-primary:hover {
    transform: translateY(-3px) scale(1.02); box-shadow: 0 8px 30px var(--accent-glow);
}

.glass-box {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 16px; padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    backdrop-filter: blur(10px);
}

.t-card {
    background: var(--bg-card); border: 1px solid var(--glass-border);
    border-radius: 16px; padding: 25px; text-align: right;
    transition: all 0.3s; position: relative; overflow: hidden;
}
.t-card::before {
    content: ''; position: absolute; inset:0;
    background: radial-gradient(circle at top right, rgba(0, 229, 255, 0.1), transparent 70%);
    opacity: 0; transition: opacity 0.4s; z-index: 0;
}
.t-card:hover::before { opacity: 1; }
.t-card:hover { transform: translateY(-5px); border-color: rgba(0, 229, 255, 0.5); box-shadow: 0 15px 30px rgba(0,0,0,0.3); }

.t-card > * { position: relative; z-index: 1; }
.main-icon {
    font-size: 35px; color: var(--accent-cyan); margin-bottom: 20px;
    display: inline-block; padding: 15px; border-radius: 14px;
    background: rgba(0, 229, 255, 0.1); border: 1px solid rgba(0, 229, 255, 0.2);
}
.t-card h3 { color: #fff; font-size: 18px; margin-bottom: 10px; font-weight: 700; }
.t-card p { color: var(--text-muted); font-size: 13px; margin-bottom: 25px; line-height: 1.6; }
.t-card.active { border-color: var(--accent-cyan); box-shadow: 0 0 20px rgba(0, 229, 255, 0.1); }

/* --- Extractor Tool Specifics --- */
.fh-container {
    background: var(--bg-card); border: 1px solid var(--glass-border);
    border-radius: 20px; padding: 30px; margin-bottom: 40px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.3); backdrop-filter: blur(10px);
}

.fh-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 30px; padding-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,0.05);
}
.fh-header h2 { color: #fff; display: flex; align-items: center; gap: 10px; font-weight: 800; }
.fh-header h2 i { color: var(--accent-blue); }

.tool-category { border: 1px solid rgba(255,255,255,0.05); border-radius: 16px; margin-bottom: 20px; background: rgba(0,0,0,0.2); overflow: hidden; transition: all 0.3s; }
.tool-cat-header { display: flex; justify-content: space-between; align-items: center; padding: 20px 25px; cursor: pointer; transition: all 0.3s;}
.tool-cat-header:hover { background: rgba(0, 229, 255, 0.05); }
.tool-cat-title { color: #fff; font-weight: 700; font-size: 16px; display: flex; align-items: center; gap: 10px; }
.tool-cat-title i { color: var(--accent-cyan); }
.tool-cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; padding: 0 25px 25px 25px; }

/* Dashboard Specific Grid */
.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; margin-bottom: 30px; }

/* Stats Widgets */
.stat-widget {
    background: var(--bg-card); border: 1px solid var(--glass-border);
    border-radius: 16px; padding: 25px; display: flex; align-items: center; justify-content: space-between;
    transition: all 0.3s; position: relative; overflow: hidden;
}
.stat-widget:hover { transform: translateY(-5px); border-color: var(--accent-cyan); box-shadow: 0 10px 25px rgba(0, 229, 255, 0.1); }
.stat-widget::before {
    content: ''; position: absolute; left: 0; bottom: 0; width: 100%; height: 4px;
    background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
    opacity: 0; transition: opacity 0.3s;
}
.stat-widget:hover::before { opacity: 1; }

.stat-info h4 { color: var(--text-muted); font-size: 14px; font-weight: 600; margin-bottom: 5px; }
.stat-info .num { color: #fff; font-size: 32px; font-weight: 800; font-family: sans-serif; text-shadow: 0 0 15px rgba(255,255,255,0.2); }
.stat-info .trend { font-size: 13px; color: #10b981; font-weight: bold; margin-top: 5px; display: inline-block; background: rgba(16, 185, 129, 0.1); padding: 2px 8px; border-radius: 20px;}
.stat-icon {
    width: 65px; height: 65px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 26px; background: rgba(0, 229, 255, 0.1); color: var(--accent-cyan);
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.2);
}

/* Modals */
.modal-overlay {
    position: fixed; top:0; left:0; width:100%; height:100%; background:rgba(6, 11, 19, 0.9);
    backdrop-filter: blur(10px); z-index:2000; display:flex; justify-content:center; align-items:center;
    opacity: 0; pointer-events: none; transition: all 0.4s;
}
.modal-overlay.active { opacity: 1; pointer-events: auto; }
.modal-content {
    background: var(--bg-card); width: 500px; border-radius: 24px; border: 1px solid var(--glass-border);
    box-shadow: 0 25px 50px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(255,255,255,0.05); transform: translateY(30px) scale(0.95); transition: all 0.4s;
    overflow: hidden;
}
.modal-overlay.active .modal-content { transform: translateY(0) scale(1); }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 25px 30px; border-bottom: 1px solid rgba(255,255,255,0.05); background: rgba(0,0,0,0.2);}
.modal-header h3 { color: #fff; font-weight: 800; display:flex; align-items:center; gap:10px; }
.modal-header h3 i { color: var(--accent-cyan); }
.modal-close { background: none; border: none; color: var(--text-muted); font-size: 20px; cursor: pointer; transition: color 0.3s; }
.modal-close:hover { color: #ef4444; }
.modal-body { padding: 30px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; color: var(--text-muted); margin-bottom: 8px; font-weight: 600; font-size: 14px; }
.form-control { width: 100%; background: rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.1); color: #fff; padding: 14px 18px; border-radius: 12px; outline: none; font-family: inherit; transition: all 0.3s; }
.form-control:focus { border-color: var(--accent-cyan); box-shadow: 0 0 15px rgba(0, 229, 255, 0.2); }
.modal-footer { padding: 20px 30px; border-top: 1px solid rgba(255,255,255,0.05); text-align: left; background: rgba(0,0,0,0.2); }

/* Tables */
.campaign-container { display: none; animation: fadeIn 0.4s; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.camp-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; }
.filters-bar { display: flex; gap: 15px; margin-bottom: 25px; background: rgba(0,0,0,0.2); padding: 15px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.05); }
.filter-input { background: rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.1); color: #fff; padding: 10px 15px; border-radius: 8px; outline: none; font-family: inherit; }

.empty-state { text-align: center; padding: 50px 20px; color: var(--text-muted); }
.empty-state i { font-size: 60px; color: rgba(255,255,255,0.1); margin-bottom: 20px; }
.campaign-table-wrapper { display: none; overflow-x: auto; background: rgba(0,0,0,0.2); border-radius: 16px; border: 1px solid rgba(255,255,255,0.05); }
.styled-table { width: 100%; border-collapse: collapse; text-align: right; }
.styled-table th, .styled-table td { padding: 18px 20px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.styled-table th { background: rgba(0, 229, 255, 0.05); color: var(--accent-cyan); font-weight: 700; text-transform: uppercase; font-size: 13px; letter-spacing: 1px;}
.styled-table tr:hover { background: rgba(255,255,255,0.02); }
.action-btn { background: none; border: none; color: var(--accent-blue); font-size: 18px; cursor: pointer; transition: all 0.3s; margin-left: 10px; }
.action-btn:hover { transform: scale(1.2); color: var(--accent-cyan); filter: drop-shadow(0 0 5px var(--accent-cyan)); }

.text-blue { color: var(--accent-blue); }
.text-emerald { color: #10b981; }
.text-purple { color: #8b5cf6; }
.text-warning { color: #f59e0b; }

/* Dashboard Specific Styles */
.welcome-banner {
    position: relative; overflow: hidden; padding: 40px; display: flex; justify-content: space-between; align-items: center;
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.1), rgba(0, 136, 255, 0.05));
}
.banner-content { z-index: 2; position: relative; }
.banner-content h1 { font-size: 32px; font-weight: 800; margin-bottom: 15px; color: #fff; }
.banner-content h1 span { color: var(--accent-cyan); }
.banner-stats-pills { display: flex; gap: 10px; margin-bottom: 25px; }
.b-pill { background: rgba(0,0,0,0.4); padding: 8px 15px; border-radius: 20px; font-size: 13px; font-weight: 600; border: 1px solid rgba(255,255,255,0.05); }
.b-pill.gold { color: #f59e0b; border-color: rgba(245, 158, 11, 0.3); }
.b-pill i { margin-left: 5px; }
.banner-img { position: absolute; left: 20px; top: -30px; width: 280px; filter: drop-shadow(0 20px 20px rgba(0,0,0,0.5)); animation: float 6s ease-in-out infinite; z-index: 1; }

.chart-box { padding: 30px; }
.chart-box h3 { margin-bottom: 8px; font-size: 18px; color: #fff; }
.chart-box p { color: var(--text-muted); font-size: 13px; margin-bottom: 25px; }
.chart-placeholder { width: 100%; height: 150px; position: relative; }
.chart-line { fill: none; stroke: var(--accent-cyan); stroke-width: 3; filter: drop-shadow(0 5px 10px rgba(0, 229, 255, 0.4)); }
.chart-point { fill: #fff; stroke: var(--accent-cyan); stroke-width: 2; transition: all 0.3s; }
.chart-point:hover { r: 6; fill: var(--accent-cyan); }

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 40px; }
.stat-card {
    background: var(--bg-card); border: 1px solid var(--glass-border); border-radius: 16px; padding: 25px;
    transition: all 0.3s;
}
.stat-card:hover { transform: translateY(-5px); border-color: var(--accent-cyan); box-shadow: 0 10px 25px rgba(0, 229, 255, 0.1); }
.stat-icon { width: 50px; height: 50px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; margin-bottom: 20px; }
.stat-icon.purple { background: rgba(0, 229, 255, 0.1); color: var(--accent-cyan); }
.stat-icon.gold { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.stat-icon.green { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.stat-icon.blue { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.stat-card h2 { font-size: 30px; font-weight: 800; color: #fff; margin-bottom: 5px; }
.stat-card p { color: var(--text-muted); font-size: 13px; margin-bottom: 15px; }
.stat-change { font-size: 12px; font-weight: 600; color: var(--text-muted); display: flex; align-items: center; gap: 5px; }
.stat-change.up { color: #10b981; }