/* NETPOA Nodes */
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 15px;
  color: #1c2430;
  background: #f4f6f9;
}
a { color: #1657b8; text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: #74808f; font-weight: 400; }

/* Top bar */
.topbar { background: #101d2e; color: #fff; }
.topbar-inner {
  max-width: 1180px; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; gap: 28px; height: 54px;
}
.brand { color: #fff; font-weight: 700; font-size: 16px; letter-spacing: .3px; }
.brand:hover { text-decoration: none; }
.topbar nav { display: flex; gap: 4px; flex: 1; }
.topbar nav a {
  color: #b9c5d4; padding: 6px 12px; border-radius: 6px; font-size: 14px;
}
.topbar nav a:hover { color: #fff; text-decoration: none; background: rgba(255,255,255,.08); }
.topbar nav a.active { color: #fff; background: rgba(255,255,255,.14); }
.userbox { font-size: 13px; color: #b9c5d4; display: flex; gap: 12px; align-items: center; }
.userbox a { color: #8fb6f3; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 24px 20px 60px; }
.footer { text-align: center; color: #97a2b0; font-size: 12px; padding: 20px; }

.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; flex-wrap: wrap; gap: 10px; }
.page-head h1 { font-size: 22px; margin: 0; }
.refresh-meta { display: flex; align-items: center; gap: 10px; font-size: 13px; }

/* Buttons & forms */
.btn {
  display: inline-block; border: 1px solid #c6cfdb; background: #fff; color: #1c2430;
  padding: 8px 14px; border-radius: 7px; font-size: 14px; cursor: pointer;
}
.btn:hover { background: #eef2f7; text-decoration: none; }
.btn-primary { background: #1657b8; border-color: #1657b8; color: #fff; }
.btn-primary:hover { background: #124a9e; }
.btn-danger { color: #b42323; border-color: #e4b6b6; }
.btn-danger:hover { background: #fbeeee; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn-block { width: 100%; }
label { display: block; font-size: 13px; color: #45505e; margin-bottom: 12px; font-weight: 600; }
input[type=text], input[type=password], input[type=number], input[type=url], input[type=email], select, textarea {
  width: 100%; padding: 8px 10px; margin-top: 4px;
  border: 1px solid #c6cfdb; border-radius: 7px; font-size: 14px; font-family: inherit;
  background: #fff; color: #1c2430;
}
textarea { min-height: 70px; }
input:focus, select:focus, textarea:focus { outline: 2px solid #9cbdf0; border-color: #1657b8; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 18px; }
.form-actions { display: flex; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.check-label { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.help { font-size: 12px; color: #74808f; font-weight: 400; margin-top: 3px; }

/* Flash */
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; }
.flash-success { background: #e2f3e7; color: #1d6b35; border: 1px solid #b7e0c4; }
.flash-error { background: #fbe9e9; color: #9c2020; border: 1px solid #efc4c4; }

/* Summary metrics */
.summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.metric { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; padding: 14px 16px; }
.metric-label { display: block; font-size: 12px; color: #74808f; margin-bottom: 4px; }
.metric-value { font-size: 24px; font-weight: 700; }
.val-bad { color: #b42323; }
.val-warn { color: #9a6a10; }
.val-good { color: #1d6b35; }

/* Server cards */
.cards { display: flex; flex-direction: column; gap: 14px; }
.card { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 16px 18px; }
.card-loading { color: #74808f; text-align: center; padding: 30px; }
.card-offline { border-color: #efc4c4; }
.offline-msg { color: #9c2020; font-size: 14px; margin-top: 6px; }
.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.card-title { flex: 1; display: flex; flex-direction: column; }
.card-title a { font-weight: 700; font-size: 16px; color: #1c2430; }
.card-sub { font-size: 12.5px; color: #74808f; }
.dot { width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; }
.dot-ok { background: #2e9e4f; }
.dot-warn { background: #e09c1a; }
.dot-down { background: #d23c3c; }
.loadbox { font-size: 13px; color: #45505e; white-space: nowrap; }
.loadbox strong { font-size: 15px; }
.load-bad strong { color: #b42323; }

/* Service chips */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.chip { font-size: 12px; padding: 3px 10px; border-radius: 20px; background: #e6f3e9; color: #1d6b35; }
.chip-down { background: #fbe9e9; color: #9c2020; }
.chip-off { background: #eef1f5; color: #74808f; }
.chip-restart { color: #9c2020; text-decoration: underline; font-weight: 600; margin-left: 4px; }

/* Usage bars */
.usage-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px 22px; }
.usage-head { display: flex; justify-content: space-between; font-size: 13px; color: #45505e; margin-bottom: 4px; }
.bar { height: 7px; background: #edf1f6; border-radius: 4px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 4px; }
.bar-ok { background: #2e9e4f; }
.bar-warn { background: #e09c1a; }
.bar-crit { background: #d23c3c; }

/* Tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 10px; }
.table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; overflow: hidden; }
.table th, .table td { padding: 10px 12px; text-align: left; font-size: 14px; border-bottom: 1px solid #eef1f5; }
.table th { background: #f8fafc; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: #74808f; }
.table tr:last-child td { border-bottom: none; }

/* Panels */
.panel { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 18px 20px; margin-bottom: 18px; }
.panel h2 { margin: 0 0 14px; font-size: 16px; }

/* Charts */
.chart-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.chart-tabs button.active { background: #1657b8; color: #fff; border-color: #1657b8; }
.chart-box { position: relative; height: 260px; }

/* Empty state */
.empty-state { text-align: center; padding: 60px 20px; color: #74808f; }

/* Login */
.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: #101d2e; }
.login-card { background: #fff; border-radius: 14px; padding: 34px 32px; width: 360px; max-width: 92vw; }
.login-card h1 { margin: 0 0 2px; font-size: 20px; }
.login-card .muted { margin: 0 0 18px; font-size: 13px; }

/* ---- Mobile ---- */
@media (max-width: 720px) {
  .wrap { padding: 16px 12px 50px; }
  .topbar-inner { gap: 10px; overflow-x: auto; padding: 0 12px; }
  .topbar nav a { padding: 6px 9px; font-size: 13px; white-space: nowrap; }
  .userbox span { display: none; }
  .page-head h1 { font-size: 19px; }
  .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .metric { padding: 11px 13px; }
  .metric-value { font-size: 20px; }
  .card { padding: 13px 14px; }
  .card-head { flex-wrap: wrap; }
  .card-title { flex-basis: calc(100% - 80px); }
  .loadbox { margin-left: 23px; }
  .usage-grid { grid-template-columns: 1fr; gap: 10px; }
  .table th, .table td { padding: 8px 9px; font-size: 13px; white-space: nowrap; }
  .table td:last-child { white-space: normal; }
  .panel { padding: 14px; }
  .chart-box { height: 220px; }
  .form-actions .btn { width: 100%; text-align: center; }
}
