:root {
    --primary-color: #3f51b5;
    --secondary-color: #303f9f;
    --bg-color: #f4f7f6;
    --sidebar-color: #2c3e50;
    --text-color: #333;
    --white: #ffffff;
    --success: #4caf50;
    --error: #f44336;
    --warning: #ff9800;
    --border-radius: 8px;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: var(--sidebar-color);
    color: var(--white);
    padding: 20px 0;
    display: flex;
    flex-direction: column;
}

.logo {
    padding: 0 25px 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: bold;
}

.logo i {
    color: #4db8ff;
}

nav a {
    padding: 15px 25px;
    color: #bdc3c7;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: 0.3s;
}

nav a:hover, nav a.active {
    background-color: rgba(255,255,255,0.1);
    color: var(--white);
    border-left: 4px solid #4db8ff;
}

/* Main Content */
.content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

header h1 {
    font-size: 1.8rem;
}

.bot-status {
    padding: 8px 15px;
    background: var(--white);
    border-radius: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow);
}

.dot {
    height: 10px;
    width: 10px;
    background-color: var(--success);
    border-radius: 50%;
    display: inline-block;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--white);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(63, 81, 181, 0.1);
    color: var(--primary-color);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
}

.stat-icon.success {
    background-color: rgba(76, 175, 80, 0.1);
    color: var(--success);
}

.stat-icon.groups {
    background-color: rgba(255, 152, 0, 0.1);
    color: var(--warning);
}

.stat-info h3 {
    font-size: 0.9rem;
    color: #7f8c8d;
    font-weight: normal;
}

.stat-info p {
    font-size: 1.5rem;
    font-weight: bold;
}

/* Tables */
.recent-activity, .table-section {
    background: var(--white);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.recent-activity h2, .table-section h2 {
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 12px;
    border-bottom: 2px solid #eee;
    color: #7f8c8d;
    font-weight: 600;
}

td {
    padding: 15px 12px;
    border-bottom: 1px solid #eee;
}

.badge {
    background: #e0e0e0;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.status-pill {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: capitalize;
}

.status-pill.success { background: #dff0d8; color: #3c763d; }
.status-pill.error { background: #f2dede; color: #a94442; }
.status-pill.pending { background: #fcf8e3; color: #8a6d3b; }

.url-cell {
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: monospace;
    font-size: 0.85rem;
    color: #666;
}

.btn-link {
    display: inline-block;
    margin-top: 20px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.btn-link:hover {
    text-decoration: underline;
}

/* Forms & Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary { background: var(--primary-color); color: white; }
.btn-primary:hover { background: var(--secondary-color); }

.btn-danger { background: var(--error); color: white; }
.btn-danger:hover { opacity: 0.8; }

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

input[type="text"], input[type="password"], input[type="number"], select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

/* Alert Boxes */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.alert-success { background: #dff0d8; color: #3c763d; border: 1px solid #d6e9c6; }
.alert-error { background: #f2dede; color: #a94442; border: 1px solid #ebccd1; }
