:root {
    --bg-color: #0d1117;
    --card-bg: #161b22;
    --input-bg: #0d1117;
    --text-color: #c9d1d9;
    --text-muted: #8b949e;
    --accent: #58a6ff;
    --border: #30363d;
    --success: #238636;
    --warning: #d29922;
    --danger: #da3633;
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-family);
    margin: 0;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

h1, h2, h3 {
    font-weight: 300;
    margin-top: 0;
}

a {
    color: var(--accent);
    text-decoration: none;
    font-weight: bold;
    cursor: pointer;
}
a:hover { text-decoration: underline; }

.header {
    width: 100%;
    max-width: 1200px;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.container {
    width: 100%;
    max-width: 1200px;
}
.container-narrow {
    max-width: 800px;
}

.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Forms */
.form-group { margin-bottom: 1rem; }
label { display: block; margin-bottom: 0.5rem; font-weight: bold; }
input[type="text"], input[type="password"] {
    width: 100%;
    padding: 0.5rem;
    background-color: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-color);
    font-size: 1rem;
    box-sizing: border-box;
}
input:focus { outline: none; border-color: var(--accent); }

button {
    background-color: var(--success);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}
button:hover { background-color: #2ea043; }
button:disabled { background-color: #23863680; cursor: not-allowed; }

/* Messages */
.info { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.2rem; }
#message {
    margin-top: 1rem;
    padding: 1rem;
    display: none;
    border-radius: 4px;
}
.msg-success { background-color: rgba(35, 134, 54, 0.2); border: 1px solid var(--success); }
.msg-error { background-color: rgba(218, 54, 51, 0.2); border: 1px solid var(--danger); }

/* Table */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.75rem; border-bottom: 1px solid var(--border); }
th { color: var(--text-muted); }

/* Badges */
.badge { padding: 2px 6px; border-radius: 4px; font-size: 0.8rem; font-weight: bold; }
.badge-event { background-color: var(--accent); color: #000; }
.badge-routine { background-color: var(--warning); color: #000; }
.status-idle { color: var(--text-muted); }
.status-running { color: var(--success); }

/* Graph */
#mynetwork {
    width: 100%;
    height: 600px;
    border: 1px solid var(--border);
    background-color: #0d1117;
}

/* Utilities */
.text-accent { color: var(--accent); }
.text-muted { color: var(--text-muted); }
