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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f0f2f5;
    min-height: 100vh;
}

/* Login */
.login-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 400px;
    animation: slideUp 0.5s ease;
}

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

.login-box .icon { text-align: center; font-size: 60px; margin-bottom: 20px; }
.login-box h1 { text-align: center; color: #667eea; margin-bottom: 30px; }
.login-box input {
    width: 100%;
    padding: 15px;
    margin: 10px 0;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
}
.login-box input:focus { outline: none; border-color: #667eea; }
.login-box button {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    cursor: pointer;
    margin-top: 20px;
}
.login-box button:hover { transform: scale(1.02); }
.error { background: #ffe0e0; color: #c00; padding: 10px; border-radius: 8px; margin-bottom: 15px; text-align: center; }

/* Navbar */
.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.navbar h1 { font-size: 22px; }
.nav-right { display: flex; align-items: center; gap: 20px; }
.btn-logout {
    padding: 8px 20px;
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}
.btn-logout:hover { background: rgba(255,255,255,0.3); }

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 60px;
    bottom: 0;
    width: 220px;
    background: white;
    box-shadow: 2px 0 10px rgba(0,0,0,0.05);
    padding: 20px 0;
    overflow-y: auto;
}
.nav-item {
    display: block;
    padding: 15px 25px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}
.nav-item:hover { background: #f5f5f5; }
.nav-item.active {
    background: linear-gradient(90deg, rgba(102,126,234,0.1) 0%, transparent 100%);
    border-left-color: #667eea;
    color: #667eea;
    font-weight: 600;
}

/* Main Content */
.main-content {
    margin-left: 220px;
    margin-top: 60px;
    padding: 30px;
    min-height: calc(100vh - 60px);
}

.page { display: none; }
.page.active { display: block; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

h2 { color: #333; margin-bottom: 25px; font-size: 24px; }
h3 { color: #555; margin-bottom: 15px; font-size: 18px; }

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}
.stat-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    text-align: center;
    transition: transform 0.3s;
    border-top: 4px solid #667eea;
}
.stat-card:hover { transform: translateY(-5px); }
.stat-card.blue { border-top-color: #667eea; }
.stat-card.green { border-top-color: #28a745; }
.stat-card.purple { border-top-color: #9b59b6; }
.stat-card.orange { border-top-color: #fd7e14; }
.stat-icon { font-size: 40px; margin-bottom: 10px; }
.stat-number { font-size: 32px; font-weight: bold; color: #333; }
.stat-label { color: #666; font-size: 14px; margin-top: 5px; }

/* Section */
.section {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

/* Tables */
.table-container { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 15px; text-align: left; border-bottom: 1px solid #eee; }
th { background: #f8f9fa; color: #555; font-weight: 600; }
tr:hover { background: #f8f9fa; }
.loading { text-align: center; color: #999; padding: 30px; }

.status-ok { color: #28a745; font-weight: 600; }
.status-error { color: #dc3545; font-weight: 600; }
.status-loading { color: #ffc107; }
.status-banned { color: #dc3545; }
.status-active { color: #28a745; }

/* Buttons */
.btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}
.btn:hover { transform: scale(1.02); opacity: 0.9; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-success { background: linear-gradient(135deg, #28a745 0%, #20c997 100%); }
.btn-danger { background: linear-gradient(135deg, #dc3545 0%, #c82333 100%); }
.btn-warning { background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%); color: #333; }

/* Toolbar */
.toolbar {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.toolbar input {
    flex: 1;
    min-width: 250px;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
}
.toolbar input:focus { outline: none; border-color: #667eea; }

/* Forms */
.form-inline {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}
.form-inline input {
    flex: 1;
    min-width: 150px;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
}
.form-inline input:focus { outline: none; border-color: #667eea; }

.form-group {
    margin: 15px 0;
}
.form-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
}
textarea:focus { outline: none; border-color: #667eea; }

/* Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 26px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}
input:checked + .slider { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
input:checked + .slider:before { transform: translateX(24px); }

.setting-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 0;
}

/* Progress */
.progress-bar {
    flex: 1;
    height: 10px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
}
.progress-bar.large { height: 25px; }
.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.5s ease;
    border-radius: 10px;
}
.progress-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}
.progress-item > span:first-child { width: 50px; font-weight: 600; }
.progress-item > span:last-child { width: 50px; text-align: right; }

.system-stats { padding: 10px 0; }

/* Broadcast */
.broadcast-stats {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}
.stat-mini {
    display: flex;
    align-items: center;
    gap: 10px;
}
.stat-mini strong { font-size: 20px; color: #667eea; }

.broadcast-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}
.broadcast-result {
    display: flex;
    gap: 30px;
    margin-top: 15px;
    font-size: 16px;
}

/* Cookie Cards */
.cookie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}
.cookie-card {
    background: #f8f9fa;
    padding: 15px 20px;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}
.cookie-card h4 { margin-bottom: 8px; color: #333; }

/* Actions Grid */
.actions-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}
.tab {
    padding: 10px 20px;
    background: #e0e0e0;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}
.tab:hover { background: #d0d0d0; }
.tab.active { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; }

/* Log Box */
.log-box {
    background: #1a1a2e;
    color: #00ff88;
    padding: 20px;
    border-radius: 10px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    max-height: 400px;
    overflow-y: auto;
    white-space: pre-wrap;
}

/* Platform Stats */
.platform-stats {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.platform-item {
    display: flex;
    align-items: center;
    gap: 15px;
}
.platform-item > span:first-child { width: 120px; }
.platform-item > span:last-child { width: 50px; text-align: right; font-weight: 600; }

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.modal.show { display: flex; }
.modal-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease;
}
.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: #999;
}
.modal-close:hover { color: #333; }

/* Toast */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 15px 25px;
    background: #333;
    color: white;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s;
    z-index: 2000;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.success { background: #28a745; }
.toast.error { background: #dc3545; }
.toast.warning { background: #ffc107; color: #333; }

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 20px;
}
.pagination button {
    padding: 8px 15px;
    border: none;
    background: #e0e0e0;
    border-radius: 5px;
    cursor: pointer;
}
.pagination button.active { background: #667eea; color: white; }
.pagination button:hover { background: #d0d0d0; }

/* Responsive */
@media (max-width: 768px) {
    .sidebar { display: none; }
    .main-content { margin-left: 0; }
    .navbar h1 { font-size: 18px; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 10px; }
::-webkit-scrollbar-thumb { background: #888; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #555; }