:root {
  --bg1:#0b1f3a;
  --bg2:#122949;
  --accent:#2f86ff;
  --accent-soft:rgba(47,134,255,0.14);
  --card-bg:#141f33;
  --card-border:rgba(255,255,255,0.06);
  --text:#e8f0ff;
  --muted:#9ba6c0;
}

* { box-sizing:border-box; }

body {
  margin:0;
  min-height:100vh;
  font-family:"Inter",system-ui,-apple-system,"Segoe UI",sans-serif;
  background:radial-gradient(circle at top,#1c3970 0%,#050912 55%,#02030a 100%);
  color:var(--text);
  display:flex;
  flex-direction:column;
}

/* Header */

header {
  padding:14px 22px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  backdrop-filter:blur(16px);
  background:linear-gradient(90deg,rgba(2,8,23,0.92),rgba(15,23,42,0.94));
  border-bottom:1px solid rgba(148,163,184,0.25);
  box-shadow:0 10px 30px rgba(15,23,42,0.7);
  position:sticky;
  top:0;
  z-index:10;
}

.brand {
  display:flex;
  align-items:center;
  gap:10px;
}

.brand-logo {
  width:42px;
  height:42px;
  border-radius:50%;
  background:radial-gradient(circle at 30% 30%,#22d3ee,#1d4ed8 60%,#020617 100%);
  display:flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  font-weight:800;
  font-size:20px;
  box-shadow:0 0 15px #1e3a8a;
}

.brand-title {
  font-weight:700;
  font-size:18px;
  letter-spacing:0.05em;
  text-transform:uppercase;
}

.brand-subtitle {
  font-size:12px;
  color:var(--muted);
}

.header-actions {
  display:flex;
  gap:10px;
  align-items:center;
}

.chip-user {
  font-size:12px;
  padding:4px 10px;
  border-radius:999px;
  border:1px solid rgba(148,163,184,0.5);
  background:rgba(15,23,42,0.9);
  color:#e5e7eb;
}

.btn-small {
  border-radius:999px;
  border:1px solid rgba(248,113,113,0.75);
  padding:5px 12px;
  font-size:12px;
  background:linear-gradient(135deg,rgba(248,113,113,0.16),rgba(127,29,29,0.4));
  color:#fecaca;
  cursor:pointer;
}

/* Main layout */

main {
  flex:1;
  padding:26px 22px 30px;
  max-width:1180px;
  width:100%;
  margin:0 auto;
}

.page-heading {
  display:flex;
  flex-wrap:wrap;
  justify-content:space-between;
  gap:12px;
  margin-bottom:22px;
  align-items:center;
}

.page-title {
  font-size:22px;
  font-weight:600;
}

.page-subtitle {
  font-size:13px;
  color:var(--muted);
}

.status-pill {
  font-size:11px;
  padding:4px 10px;
  border-radius:999px;
  background:rgba(34,197,94,0.16);
  color:#bbf7d0;
  border:1px solid rgba(34,197,94,0.6);
}

.status-online {
  background:rgba(34,197,94,0.16);
  color:#bbf7d0;
  border-color:rgba(34,197,94,0.6);
}

.status-offline {
  background:rgba(239,68,68,0.15);
  color:#fecaca;
  border-color:rgba(239,68,68,0.6);
}

.status-error {
  background:rgba(234,179,8,0.14);
  color:#fef9c3;
  border-color:rgba(234,179,8,0.6);
}

/* Grid & tiles */

.grid {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(230px,1fr));
  gap:18px;
}

.tile {
  background:radial-gradient(circle at top left,rgba(56,189,248,0.12),transparent 55%),
             radial-gradient(circle at bottom right,rgba(129,140,248,0.12),transparent 55%),
             var(--card-bg);
  border-radius:18px;
  padding:16px 16px 14px;
  border:1px solid var(--card-border);
  box-shadow:0 14px 30px rgba(15,23,42,0.85);
  display:flex;
  flex-direction:column;
  justify-content:space-between;
}

.tile-icon {
  font-size:22px;
  margin-bottom:6px;
}

.tile-title {
  font-size:15px;
  font-weight:600;
  margin-bottom:4px;
}

.tile-desc {
  font-size:12px;
  color:var(--muted);
  margin-bottom:12px;
}

.tile-link {
  text-decoration:none;
  font-size:12px;
  padding:7px 12px;
  border-radius:999px;
  background:var(--accent);
  color:white;
  display:inline-flex;
  gap:6px;
  align-items:center;
  box-shadow:0 9px 18px rgba(37,99,235,0.7);
  border:none;
  cursor:pointer;
  transition:background .2s ease, box-shadow .2s ease, transform .15s ease;
}

.tile-link:hover {
  background:#22c55e;
  box-shadow:0 9px 18px rgba(34,197,94,0.7);
  transform:translateY(-1px);
}

.center-wrap {
  flex:1;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
}

.login-card {
  width:100%;
  max-width:420px;
  background:var(--card-bg);
  border-radius:20px;
  padding:28px 22px 22px;
  border:1px solid var(--card-border);
  box-shadow:0 18px 40px rgba(15,23,42,0.9);
}

.login-title {
  font-size:20px;
  font-weight:600;
  margin-bottom:6px;
}

.login-sub {
  font-size:13px;
  color:var(--muted);
  margin-bottom:18px;
}

.form-group {
  margin-bottom:14px;
  text-align:left;
}

label {
  display:block;
  font-size:13px;
  margin-bottom:4px;
}

input[type="text"],
input[type="password"] {
  width:100%;
  padding:9px 10px;
  border-radius:10px;
  border:1px solid rgba(148,163,184,0.5);
  background:#020617;
  color:var(--text);
  font-size:14px;
}

.btn-primary {
  width:100%;
  margin-top:6px;
  padding:10px 14px;
  border-radius:999px;
  border:none;
  background:var(--accent);
  color:#fff;
  font-weight:600;
  cursor:pointer;
}

/* Error message */

.error {
  background:rgba(239,68,68,0.15);
  border:1px solid rgba(239,68,68,0.5);
  color:#fecaca;
  font-size:13px;
  padding:8px 10px;
  border-radius:10px;
  margin-bottom:10px;
}

/* Footer */

footer {
  text-align:center;
  padding:12px 10px 16px;
  font-size:11px;
  color:#64748b;
}

.status-group {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.status-pill-secondary {
  text-decoration: none;
  cursor: pointer;
}

