/* RESET */
* {
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    margin: 0;
    background: #f5f7fb;
    color: #1f2937;
}

/* LAYOUT */
.container {
    max-width: 1100px;
    margin: auto;
    padding: 0 20px;
}

.page {
    padding: 30px 0;
}

/* TOPBAR */
.topbar {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    font-weight: 700;
    font-size: 18px;
}

.nav a {
    margin-right: 20px;
    text-decoration: none;
    color: #374151;
    font-weight: 500;
}

.nav a.active {
    color: #2563eb;
}

.user {
    display: flex;
    align-items: center;
    gap: 15px;
}

.username {
    font-weight: 600;
}

.logout {
    color: #dc2626;
    text-decoration: none;
    font-weight: 500;
}

/* CARD */
.card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    margin-bottom: 25px;
}

/* TITLE */
.card h2, .card h3 {
    margin-top: 0;
}

/* TABLE */
table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    font-size: 13px;
    color: #6b7280;
    border-bottom: 1px solid #e5e7eb;
    padding: 10px;
}

td {
    padding: 12px 10px;
    border-bottom: 1px solid #f1f5f9;
}

/* STATUS */
.badge {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.badge.ok { background: #dcfce7; color: #166534; }
.badge.offline { background: #fee2e2; color: #991b1b; }

/* BUTTON */
.btn {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
}

.btn-primary { background: #2563eb; color: #fff; }
.btn-danger  { background: #dc2626; color: #fff; }
.btn-gray    { background: #6b7280; color: #fff; }

/* FORM */
.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
}

input, select {
    width: 100%;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
}
/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: #2563eb;
    color: #fff;
}

.btn-secondary {
    background: #6b7280;
    color: #fff;
}

.btn-danger {
    background: #dc2626;
    color: #fff;
}

/* Cards */
.card {
    background: #fff;
    border-radius: 14px;
    padding: 20px 24px;
    margin-bottom: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,.05);
}

/* System info grid */
.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 12px;
}

.info-grid p {
    margin: 8px 0;
}

/* Health badge */
.badge {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
}

.badge.ok {
    background: #dcfce7;
    color: #166534;
}

.badge.warn {
    background: #fee2e2;
    color: #991b1b;
}

/* Actions */
.actions {
    display: flex;
    gap: 12px;
}

/* Last seen */
.last-seen {
    margin-top: 16px;
    font-size: 13px;
    color: #6b7280;
}

