/* Base styles */
* { box-sizing: border-box; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* Header */
.sc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1.5rem;
    background: #1e293b;
    border-bottom: 1px solid rgba(51, 65, 85, 0.5);
    position: sticky;
    top: 0;
    z-index: 40;
    backdrop-filter: blur(8px);
}

/* Sidebar */
#sidebar {
    width: 240px;
    min-height: 100vh;
    background: #162032;
    border-right: 1px solid rgba(51, 65, 85, 0.5);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.sc-sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 1.25rem;
    border-bottom: 1px solid rgba(51, 65, 85, 0.5);
}

.sc-sidebar-nav {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sc-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.875rem;
    border-radius: 0.625rem;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.15s ease;
}

.sc-nav-item:hover {
    background: rgba(148, 163, 184, 0.08);
    color: #e2e8f0;
}

.sc-nav-item.active {
    background: rgba(14, 165, 233, 0.15);
    color: #38bdf8;
}

@media (max-width: 1024px) {
    #sidebar {
        position: fixed;
        top: 0;
        left: 0;
        z-index: 50;
        transform: translateX(-100%);
    }
    #sidebar.open {
        transform: translateX(0);
    }
}

/* Footer */
.sc-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.625rem 1.5rem;
    font-size: 0.75rem;
    color: #64748b;
    border-top: 1px solid rgba(51, 65, 85, 0.3);
    background: #0f172a;
}

/* Dashboard / Common Components */
.sc-card {
    background: #1e293b;
    border: 1px solid rgba(51, 65, 85, 0.5);
    border-radius: 1rem;
    padding: 1.25rem;
}

.sc-stat-card {
    background: #1e293b;
    border: 1px solid rgba(51, 65, 85, 0.5);
    border-radius: 1rem;
    padding: 1.25rem;
    transition: border-color 0.2s;
}

.sc-stat-card:hover {
    border-color: rgba(14, 165, 233, 0.3);
}

.sc-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.sc-badge.online {
    background: rgba(74, 222, 128, 0.15);
    color: #4ade80;
}

.sc-badge.offline {
    background: rgba(248, 113, 113, 0.15);
    color: #f87171;
}

.sc-badge.admin {
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
}

.sc-badge.user {
    background: rgba(14, 165, 233, 0.15);
    color: #38bdf8;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-dot.online {
    background: #4ade80;
    box-shadow: 0 0 6px #4ade80;
    animation: pulse-green 2s infinite;
}

.status-dot.offline {
    background: #f87171;
}

@keyframes pulse-green {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Terminal styles */
#terminal-container {
    background: #000;
    padding: 0;
}

.xterm-viewport::-webkit-scrollbar {
    width: 6px;
}
.xterm-viewport::-webkit-scrollbar-track {
    background: transparent;
}
.xterm-viewport::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 3px;
}

