:root {
    --bg: #0f172a;
    --card: #1e293b;
    --text: #f8fafc;
    --primary: #3b82f6;
    --danger: #ef4444;
    --success: #22c55e;
    --warning: #f59e0b;
}

body {
    background-image: linear-gradient(rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.7)), url('background.webp?v=1');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text);
    font-family: 'Inter', system-ui, sans-serif;
    margin: 0;
    padding: 2rem;
    min-height: 100vh;
}

.container { max-width: 1200px; margin: 0 auto; }

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    background: rgba(0, 0, 0, 0.4);
    padding: 20px;
    border-radius: 15px;
    backdrop-filter: blur(5px);
}

.stats-container {
    display: flex;
    gap: 20px;
    flex-grow: 1;
    justify-content: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 120px;
}

.stat-item span {
    font-size: 0.8rem;
    margin-bottom: 5px;
    color: #ccc;
}

.progress-bar {
    width: 100px;
    height: 8px;
    background: #333;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 3px;
}

.progress-fill {
    height: 100%;
    background: #4CAF50;
    width: 0%;
    transition: width 0.5s ease;
}

#cpu-text, #ram-text, #disk-text {
    font-weight: bold;
    color: #fff;
}


h1 { font-size: 2rem; font-weight: 800; letter-spacing: -0.025em; }

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.card {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(8px);
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.2s, border-color 0.2s, background 0.2s;
    text-decoration: none;
    color: inherit;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    background: rgba(30, 41, 59, 0.9);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.service-name { font-size: 1.25rem; font-weight: 600; }

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #64748b;
}

.status-online { background: var(--success); box-shadow: 0 0 10px var(--success); }
.status-offline { background: var(--danger); }
.status-error { background: var(--warning); }

.card-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    opacity: 0.6;
}

.btn-delete {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-size: 0.75rem;
    padding: 0;
    opacity: 0;
    transition: opacity 0.2s;
}

.card:hover .btn-delete { opacity: 1; }

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: var(--card);
    padding: 2rem;
    border-radius: 1rem;
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

input {
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid #334155;
    background: #0f172a;
    color: white;
}

button {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    border: none;
    background: var(--primary);
    color: white;
    font-weight: 600;
    cursor: pointer;
}

.btn-cancel { background: #475569; }
.modal-buttons { display: flex; gap: 1rem; margin-top: 1rem; }
