:root {
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-blue: #3b82f6;
    --accent-green: #10b981; /* Aura color */
    --accent-purple: #8b5cf6; /* Bridges color */
    --accent-red: #ef4444;
    --font-mono: 'Share Tech Mono', monospace;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    overflow: hidden; /* App feel */
    height: 100vh;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

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

/* Sidebar */
.sidebar {
    width: 250px;
    background-color: var(--bg-card);
    display: flex;
    flex-direction: column;
    padding: 20px;
    border-right: 1px solid #334155;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 40px;
    color: var(--accent-blue);
}

.logo h2 { font-family: var(--font-mono); letter-spacing: 1px; font-size: 1.5rem; }
.logo .version { font-size: 0.7em; color: var(--text-secondary); align-self: flex-end; margin-bottom: 3px; }
.logo i { font-size: 1.8rem; }

.nav-menu ul li { margin-bottom: 10px; }
.nav-menu a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
    color: var(--text-secondary);
    font-weight: 500;
}

.nav-menu a:hover, .nav-menu a.active {
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--accent-blue);
}

.user-status {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 15px;
    padding-top: 20px;
    border-top: 1px solid #334155;
}

.avatar {
    width: 40px; height: 40px;
    background-color: var(--accent-blue);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2em;
}

.user-status .info .name { font-weight: bold; }
.user-status .info .role { font-size: 0.8em; color: var(--text-secondary); }

/* Main Content */
.main-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    background-color: var(--bg-dark);
}

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

.page-title h1 { 
    font-family: var(--font-mono); 
    font-size: 2em; 
    color: var(--text-primary); 
    text-transform: uppercase;
    letter-spacing: 2px;
}
.page-title h1 i { margin-right: 15px; color: var(--accent-blue); }

.system-status {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    color: var(--accent-green);
    background: rgba(16, 185, 129, 0.1);
    padding: 8px 20px;
    border-radius: 20px;
    border: 1px solid rgba(16, 185, 129, 0.3);
    font-size: 0.9em;
}

.status-indicator {
    width: 10px; height: 10px;
    background-color: var(--accent-green);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-green);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
    100% { opacity: 1; transform: scale(1); }
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
}

.card {
    background-color: var(--bg-card);
    border-radius: 12px;
    padding: 25px;
    border: 1px solid #334155;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.card h3 {
    margin-bottom: 20px;
    font-size: 1.1em;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #334155;
    padding-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}
.card h3 i { color: var(--accent-blue); }

/* Specific Cards */
.team-stats { display: flex; flex-direction: column; gap: 20px; }
.team-stat h4 { margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; font-weight: 500; }
.team-stat .count { font-size: 0.85em; color: var(--text-secondary); background: #0f172a; padding: 2px 8px; border-radius: 10px; }
.team-stat .progress-bar {
    height: 8px;
    background-color: #334155;
    border-radius: 4px;
    overflow: hidden;
}
.team-stat .fill { height: 100%; border-radius: 4px; }
.team-stat.aura .fill { background-color: var(--accent-green); }
.team-stat.bridges .fill { background-color: var(--accent-purple); }

.task-list { display: flex; flex-direction: column; gap: 15px; }
.task-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.task-info { display: flex; flex-direction: column; gap: 4px; }
.task-name { font-weight: 500; color: var(--text-primary); }
.task-team { font-size: 0.75em; text-transform: uppercase; letter-spacing: 0.5px; }
.task-item:has(.task-team:contains('Aura')) .task-team { color: var(--accent-green); } /* Note: :has support varies, handled in HTML classes better */
.task-status { 
    font-size: 0.75em; 
    padding: 4px 10px; 
    border-radius: 12px; 
    background: #334155; 
    color: var(--text-secondary);
    font-weight: 600;
}

/* Helpers for colors */
.color-aura { color: var(--accent-green); }
.color-bridges { color: var(--accent-purple); }

.log-list { display: flex; flex-direction: column; gap: 12px; }
.log-list li {
    padding: 0 0 0 15px;
    border-left: 2px solid #334155;
    position: relative;
    font-size: 0.9em;
    line-height: 1.5;
    color: var(--text-secondary);
}
.log-list li::before {
    content: '';
    position: absolute;
    left: -5px; top: 6px;
    width: 8px; height: 8px;
    border-radius: 50%;
    background-color: #334155;
}
.log-list li:first-child { border-left-color: var(--accent-blue); }
.log-list li:first-child::before { background-color: var(--accent-blue); box-shadow: 0 0 8px var(--accent-blue); }
.log-list .time { color: #64748b; font-size: 0.85em; margin-right: 8px; font-family: var(--font-mono); }
.log-list .agent { font-weight: 600; color: var(--text-primary); }
.log-list .system { font-weight: 600; color: var(--accent-red); }

/* Forms & Inputs (for future pages) */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; color: var(--text-secondary); font-size: 0.9em; }
.form-control {
    width: 100%;
    padding: 12px 15px;
    background-color: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    color: var(--text-primary);
    font-family: inherit;
    transition: border-color 0.2s;
}
.form-control:focus { outline: none; border-color: var(--accent-blue); }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}
.btn-primary { background-color: var(--accent-blue); color: white; }
.btn-primary:hover { background-color: #2563eb; }

/* Modal Styles */
.modal {
    display: none; 
    position: fixed; 
    z-index: 1000; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.7); 
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--bg-card);
    margin: 10% auto; 
    padding: 30px;
    border: 1px solid #334155;
    width: 90%;
    max-width: 500px;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close {
    color: var(--text-secondary);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: var(--text-primary);
    text-decoration: none;
    cursor: pointer;
}
