/* ANDROMEDA MONITOR — Stylesheet */
:root {
  --bg:       #060b14;
  --surface:  #0d1626;
  --card:     #111d2e;
  --border:   #1a2d45;
  --accent:   #2563eb;
  --accent2:  #0ea5e9;
  --green:    #10b981;
  --yellow:   #f59e0b;
  --red:      #ef4444;
  --text:     #e2eaf5;
  --muted:    #5a7a9e;
  --dim:      #2a3f5c;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'DM Sans', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  min-height: 100vh;
}
a { color: var(--accent2); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== LOGIN ===== */
.login-wrap {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background:
    radial-gradient(ellipse 70% 50% at 30% 20%, rgba(37,99,235,.1) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(6,182,212,.07) 0%, transparent 50%),
    var(--bg);
}
.login-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
  width: 100%; max-width: 400px;
  box-shadow: 0 24px 64px rgba(0,0,0,.4);
}
.login-logo {
  width: 52px; height: 52px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 800; color: #fff;
  font-family: 'Syne', sans-serif;
  margin: 0 auto 18px;
}
.login-title {
  font-family: 'Syne', sans-serif;
  font-size: 22px; font-weight: 800;
  text-align: center; color: #fff;
  margin-bottom: 4px;
}
.login-sub {
  text-align: center; color: var(--muted);
  font-size: 13px; margin-bottom: 28px;
}

/* ===== FORM ===== */
.field { margin-bottom: 16px; }
.field label {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--muted); margin-bottom: 6px;
  text-transform: uppercase; letter-spacing: .05em;
}
.input, .select {
  width: 100%; padding: 11px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--text); font-size: 14px;
  font-family: 'DM Sans', sans-serif;
  transition: border-color .15s;
}
.input:focus, .select:focus {
  outline: none; border-color: var(--accent);
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 20px; border-radius: 9px;
  font-size: 14px; font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  border: 1px solid transparent; cursor: pointer;
  transition: all .15s; text-decoration: none;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #1d4ed8; text-decoration: none; }
.btn-outline { background: transparent; border-color: var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--dim); background: var(--card); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--red); text-decoration: none; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-block { width: 100%; }

/* ===== TOPBAR ===== */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(6,11,20,.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px; height: 58px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; color: #fff;
  font-family: 'Syne', sans-serif;
}
.brand-name {
  font-family: 'Syne', sans-serif;
  font-size: 15px; font-weight: 700;
  letter-spacing: .04em; color: #fff;
}
.brand-sub {
  font-size: 10px; color: var(--muted);
  letter-spacing: .06em; text-transform: uppercase;
}
.topbar-nav { display: flex; align-items: center; gap: 4px; }
.topbar-nav a {
  padding: 7px 14px; border-radius: 7px;
  font-size: 13px; font-weight: 500;
  color: var(--muted); transition: all .15s;
}
.topbar-nav a:hover, .topbar-nav a.active {
  color: #fff; background: var(--card); text-decoration: none;
}
.topbar-user {
  display: flex; align-items: center; gap: 12px;
  font-size: 13px; color: var(--muted);
}
.user-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 12px; background: var(--card);
  border: 1px solid var(--border); border-radius: 999px;
}
.user-av {
  width: 24px; height: 24px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #fff;
}

/* ===== LAYOUT ===== */
.wrapper { max-width: 1400px; margin: 0 auto; padding: 24px; }
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  flex-wrap: wrap; gap: 12px; margin-bottom: 24px;
}
.page-title {
  font-family: 'Syne', sans-serif;
  font-size: 24px; font-weight: 800;
  background: linear-gradient(135deg, #fff 40%, var(--accent2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.page-sub { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* ===== STAT CARDS ===== */
.stat-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 14px; margin-bottom: 24px;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px; padding: 18px;
  position: relative; overflow: hidden;
  transition: transform .2s, border-color .2s;
}
.stat-card:hover { transform: translateY(-2px); border-color: var(--dim); }
.stat-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--c, var(--accent));
}
.stat-icon {
  width: 36px; height: 36px; border-radius: 9px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; margin-bottom: 12px;
}
.stat-val {
  font-family: 'Syne', sans-serif;
  font-size: 28px; font-weight: 800;
  color: #fff; line-height: 1; margin-bottom: 4px;
}
.stat-lbl {
  font-size: 11px; color: var(--muted);
  text-transform: uppercase; letter-spacing: .07em;
}
.stat-sub { font-size: 11px; color: var(--muted); margin-top: 6px; }

/* ===== PANEL ===== */
.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden;
  margin-bottom: 16px;
}
.panel-hd {
  padding: 16px 20px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.panel-title {
  font-family: 'Syne', sans-serif;
  font-size: 13px; font-weight: 700;
  letter-spacing: .04em; color: #fff;
  text-transform: uppercase;
}
.panel-body { padding: 20px; }

/* ===== GRID ===== */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.grid-detail { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; }

/* ===== TABLE ===== */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th {
  font-size: 10px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted); padding: 10px 14px; text-align: left;
  border-bottom: 1px solid var(--border); font-weight: 600;
  background: rgba(255,255,255,.01);
}
.table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(26,45,69,.5);
  font-size: 13px; vertical-align: middle;
}
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: rgba(37,99,235,.04); }
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-muted { color: var(--muted); }
.text-sm { font-size: 12px; }
.fw-bold { font-weight: 700; color: #fff; }

/* ===== BADGE / PILL ===== */
.pill {
  display: inline-block; padding: 3px 10px;
  border-radius: 999px; font-size: 11px; font-weight: 700;
  letter-spacing: .03em;
}
.pill-green  { background: rgba(16,185,129,.12); color: var(--green); }
.pill-yellow { background: rgba(245,158,11,.12); color: var(--yellow); }
.pill-red    { background: rgba(239,68,68,.12);  color: var(--red); }
.pill-blue   { background: rgba(37,99,235,.14);  color: var(--accent2); }
.pill-muted  { background: rgba(90,122,158,.12); color: var(--muted); }

.status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  display: inline-block; margin-right: 6px;
}
.dot-on  { background: var(--green); box-shadow: 0 0 6px rgba(16,185,129,.5); }
.dot-off { background: var(--muted); }
.dot-warn{ background: var(--yellow); }

/* ===== BAR CHART ===== */
.bar-chart { display: flex; flex-direction: column; gap: 11px; }
.bar-item { display: flex; align-items: center; gap: 10px; }
.bar-label {
  font-size: 12px; color: var(--muted); width: 130px;
  flex-shrink: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bar-track { flex: 1; height: 8px; background: var(--border); border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; transition: width 1s cubic-bezier(.4,0,.2,1); }
.bar-val { font-size: 12px; font-weight: 700; color: #fff; width: 40px; text-align: right; }

.mini-bar { height: 5px; background: var(--border); border-radius: 999px; overflow: hidden; width: 90px; }
.mini-fill { height: 100%; border-radius: 999px; }

/* ===== ALERT ===== */
.alert {
  padding: 12px 16px; border-radius: 9px;
  font-size: 13px; margin-bottom: 16px;
}
.alert-success { background: rgba(16,185,129,.1); color: var(--green); border: 1px solid rgba(16,185,129,.2); }
.alert-error   { background: rgba(239,68,68,.1);  color: var(--red);   border: 1px solid rgba(239,68,68,.2); }
.alert-info    { background: rgba(37,99,235,.1);  color: var(--accent2); border: 1px solid rgba(37,99,235,.2); }

/* ===== FEED ===== */
.feed { display: flex; flex-direction: column; }
.feed-item {
  display: flex; gap: 12px; padding: 11px 0;
  border-bottom: 1px solid rgba(26,45,69,.5);
}
.feed-item:last-child { border-bottom: none; }
.feed-icon {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0;
  border: 1px solid rgba(255,255,255,.06);
  background: rgba(37,99,235,.1);
}
.feed-txt { font-size: 12px; color: var(--text); line-height: 1.4; }
.feed-txt b { color: #fff; }
.feed-time { font-size: 10px; color: var(--muted); margin-top: 2px; }

/* ===== EMPTY ===== */
.empty {
  text-align: center; padding: 40px 20px; color: var(--muted);
}
.empty-ic { font-size: 36px; margin-bottom: 10px; opacity: .5; }

/* ===== UTIL ===== */
.flex { display: flex; }
.items-center { align-items: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.ml-auto { margin-left: auto; }
.help { font-size: 11px; color: var(--muted); margin-top: 5px; }
code {
  background: var(--surface); padding: 2px 7px;
  border-radius: 5px; font-size: 12px; color: var(--accent2);
  font-family: monospace;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1000px) {
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .grid-2, .grid-3, .grid-detail { grid-template-columns: 1fr; }
  .topbar-nav a { padding: 7px 9px; font-size: 12px; }
}
@media (max-width: 600px) {
  .stat-grid { grid-template-columns: 1fr; }
  .wrapper { padding: 16px; }
  .brand-sub { display: none; }
}

@keyframes fadeUp { from {opacity:0;transform:translateY(14px);} to {opacity:1;transform:translateY(0);} }
.stat-card, .panel { animation: fadeUp .4s ease both; }
