:root {
    --bg-dark: #121212;
    --sidebar-bg: #1e1e1e;
    --text-main: #e0e0e0;
    --text-muted: #888888;
    --accent: #f59e0b; /* Amber accent for admin */
    --accent-glow: rgba(245, 158, 11, 0.4);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --border: #333333;
    --success: #10b981;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 2rem 1.5rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 3rem;
    letter-spacing: -1px;
}

.logo span {
    color: var(--accent);
}

.nav-menu {
    list-style: none;
    flex: 1;
}

.nav-menu li {
    margin-bottom: 0.5rem;
}

.nav-menu a {
    display: block;
    padding: 0.8rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-menu a:hover, .nav-menu li.active a {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--accent);
}

.system-status {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--success);
    box-shadow: 0 0 8px var(--success);
}

/* Main Content */
.content-area {
    flex: 1;
    padding: 2rem 3rem;
    overflow-y: auto;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.topbar h2 {
    font-size: 1.6rem;
    font-weight: 600;
}

.admin-profile {
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 1.5rem;
}

.stat-card h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 0.8rem;
}

.stat-card .value {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.trend {
    font-size: 0.85rem;
}
.trend.positive { color: var(--success); }
.trend.neutral { color: var(--text-muted); }

/* Table Section */
.sites-table-card {
    grid-column: span 3;
    margin-top: 1rem;
    padding: 0;
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-primary-small {
    padding: 0.5rem 1rem;
    background: var(--accent);
    color: #000;
    border: none;
    border-radius: 6px;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary-small:hover {
    box-shadow: 0 4px 12px var(--accent-glow);
}

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

.sites-table th, .sites-table td {
    padding: 1rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

.sites-table th {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sites-table td {
    font-size: 0.95rem;
}

.sites-table tr:last-child td {
    border-bottom: none;
}

.badge.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    padding: 0.3rem 0.6rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.action-link {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.9rem;
}

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

.content-area { min-width: 0; }

@media (max-width: 900px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .sites-table-card {
        grid-column: span 1;
        overflow-x: auto;
    }
}

@media (max-width: 760px) {
    body { flex-direction: column; }
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 1rem;
    }
    .logo { margin-bottom: 1rem; }
    .nav-menu { display: flex; flex-wrap: wrap; gap: 0.25rem; }
    .nav-menu li { margin-bottom: 0; }
    .content-area { padding: 1rem; overflow-x: auto; }
    .topbar { flex-wrap: wrap; gap: 0.75rem; align-items: flex-start; }
}
