/* Pemantau Jaringan SMKN 5 Yogyakarta — tema gelap sederhana (tanpa CDN). */

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
    background: #0e131a;
    color: #dbe4ee;
    line-height: 1.45;
}

a { color: #5eb1ff; text-decoration: none; }
a:hover { text-decoration: underline; }

code { background: #1b2635; padding: 1px 5px; border-radius: 4px; font-size: 0.9em; }
.mono { font-family: Consolas, "Courier New", monospace; font-size: 0.88em; color: #9fb2c8; }

/* ---------- topbar ---------- */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 20px;
    background: #16202d;
    border-bottom: 1px solid #24344a;
}
.brand { font-weight: 700; font-size: 1.05rem; }
.brand span { color: #8fa5bd; font-weight: 400; font-size: 0.85rem; margin-left: 6px; }
.topbar nav { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.topbar nav a { color: #cfe0f2; font-size: 0.95rem; }
.topbar .user { color: #8fa5bd; font-size: 0.9rem; }

.container { max-width: 1150px; margin: 0 auto; padding: 20px; }
.footer { text-align: center; color: #64798f; font-size: 0.82rem; padding: 18px 10px 26px; }

h1 { font-size: 1.4rem; margin: 6px 0 16px; }
h2 { font-size: 1.12rem; margin: 26px 0 10px; }
.subtitle { color: #8fa5bd; margin-top: -8px; }
.empty { color: #8fa5bd; }

/* ---------- kartu ringkasan ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 18px; }
.card {
    background: #16202d;
    border: 1px solid #24344a;
    border-radius: 10px;
    padding: 16px;
}
.card-value { font-size: 2rem; font-weight: 700; }
.card-label { color: #8fa5bd; font-size: 0.9rem; }
.card-online .card-value { color: #3ddc84; }
.card-offline .card-value { color: #ff6b6b; }

/* ---------- tabel ---------- */
.table { width: 100%; border-collapse: collapse; background: #131c28; border: 1px solid #24344a; border-radius: 10px; overflow: hidden; }
.table th, .table td { padding: 9px 12px; text-align: left; border-bottom: 1px solid #1e2c40; vertical-align: top; }
.table th { background: #1a2635; color: #aebfd4; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.03em; }
.table tr:last-child td { border-bottom: none; }
.table td.aksi { white-space: nowrap; }
.table td.aksi form { display: inline; }

/* ---------- badge ---------- */
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 0.8rem; font-weight: 600; background: #2a3a4f; color: #cfe0f2; }
.badge-online { background: #14532d; color: #7bf1a8; }
.badge-offline { background: #5f1d1d; color: #ff9c9c; }
.badge-unknown { background: #3a4356; color: #c3cedd; }
.badge-event-down, .badge-event-controller_down { background: #5f1d1d; color: #ff9c9c; }
.badge-event-up, .badge-event-controller_up { background: #14532d; color: #7bf1a8; }
.badge-event-new { background: #1d3a5f; color: #9cc8ff; }

/* ---------- tombol & form ---------- */
.btn {
    display: inline-block;
    padding: 7px 14px;
    border-radius: 8px;
    border: 1px solid #2e4258;
    background: #1b2838;
    color: #dbe4ee;
    font-size: 0.92rem;
    cursor: pointer;
}
.btn:hover { background: #24344a; text-decoration: none; }
.btn-primary { background: #1663b8; border-color: #1663b8; color: #fff; }
.btn-primary:hover { background: #1a74d4; }
.btn-danger { background: #7a2424; border-color: #7a2424; color: #ffd7d7; }
.btn-danger:hover { background: #93302f; }
.btn-small { padding: 4px 10px; font-size: 0.85rem; }
.btn-block { width: 100%; margin-top: 14px; padding: 10px; font-size: 1rem; }

.filter-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 4px 0 14px; color: #8fa5bd; }
.filter-bar .auto-note { margin-left: auto; font-size: 0.85rem; }

.form { max-width: 560px; background: #131c28; border: 1px solid #24344a; border-radius: 10px; padding: 20px; }
.form label { display: block; margin: 12px 0 5px; font-size: 0.92rem; color: #aebfd4; }
.form label:first-of-type { margin-top: 0; }
.form input[type="text"], .form input[type="number"], .form select,
.login-card input[type="text"], .login-card input[type="password"] {
    width: 100%;
    padding: 9px 11px;
    border-radius: 8px;
    border: 1px solid #2e4258;
    background: #0e1620;
    color: #e6eef7;
    font-size: 0.95rem;
}
.form-actions { margin-top: 18px; display: flex; gap: 10px; }

/* ---------- alert ---------- */
.alert { padding: 11px 14px; border-radius: 8px; margin-bottom: 14px; font-size: 0.95rem; }
.alert-success { background: #14532d; color: #b9f6cd; border: 1px solid #1e7a42; }
.alert-error { background: #5f1d1d; color: #ffc9c9; border: 1px solid #93302f; }

/* ---------- login ---------- */
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 16px; }
.login-card { width: 100%; max-width: 380px; background: #16202d; border: 1px solid #24344a; border-radius: 12px; padding: 28px; }
.login-card h1 { text-align: center; margin-bottom: 4px; }
.login-card .subtitle { text-align: center; margin: 0 0 18px; }
.login-card label { display: block; margin: 12px 0 5px; font-size: 0.92rem; color: #aebfd4; }
