/* Supermon – modernized UI */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');

:root {
  --sm-bg: #0f1419;
  --sm-bg-elevated: #1a2332;
  --sm-bg-card: #151d28;
  --sm-border: #2d3a4d;
  --sm-border-light: #3d4f66;
  --sm-text: #e8edf4;
  --sm-text-muted: #8b9cb3;
  --sm-accent: #3b82f6;
  --sm-accent-hover: #2563eb;
  --sm-success: #22c55e;
  --sm-warning: #eab308;
  --sm-danger: #ef4444;
  --sm-radius: 8px;
  --sm-radius-lg: 12px;
  --sm-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  --sm-font: 'DM Sans', system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background-color: var(--sm-bg);
  color: var(--sm-text);
  font-size: 15px;
  font-family: var(--sm-font);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--sm-bg);
  color: var(--sm-text);
  font-size: 15px;
  font-family: var(--sm-font);
}

/* ===== Header ===== */
#header {
  width: 100%;
  position: relative;
  margin: 0;
  padding: 16px 24px;
  border-top-left-radius: var(--sm-radius-lg);
  border-top-right-radius: var(--sm-radius-lg);
  background-color: var(--sm-bg-elevated);
  border-bottom: 1px solid var(--sm-border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  min-height: 80px;
}

#headerTitle {
  position: relative;
  top: auto;
  left: auto;
  margin: 0;
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--sm-text);
  font-family: var(--sm-font);
  letter-spacing: -0.02em;
}

#headerTitle a:link,
#headerTitle a:visited {
  text-decoration: none;
  color: var(--sm-accent);
}

#headerTitle a:hover {
  color: var(--sm-accent-hover);
  text-decoration: underline;
}

#headerTag {
  position: relative;
  top: auto;
  left: auto;
  margin: 0;
  color: var(--sm-text-muted);
  font-weight: 600;
  font-size: 0.9rem;
  font-family: var(--sm-font);
}

#header2Tag {
  position: relative;
  top: auto;
  left: auto;
  margin: 0;
  font-size: 1rem;
  color: var(--sm-text-muted);
  font-weight: 600;
  font-family: var(--sm-font);
}

#header3Tag,
#header4Tag {
  position: relative;
  top: auto;
  left: auto;
  margin: 0;
  font-size: 1.05rem;
  color: var(--sm-text);
  font-weight: 600;
  font-family: var(--sm-font);
}

#headerImg {
  position: absolute;
  top: 16px;
  right: 24px;
}

#headerImg2 {
  position: absolute;
  top: 16px;
  right: 212px;
}

#mytilepic {
  position: absolute;
  top: 16px;
  right: 128px;
}

#mytilepic2 {
  position: absolute;
  top: 16px;
  right: 228px;
}

#headerLogin {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: 280px;
  font-size: 14px;
  font-family: var(--sm-font);
  color: var(--sm-text-muted);
}

#headerLogin a:link,
#headerLogin a:visited {
  text-decoration: none;
  color: var(--sm-text-muted);
}

#headerLogin a:hover {
  color: var(--sm-accent);
  font-weight: 600;
}

/* ===== Menu ===== */
#menu {
  position: relative;
  width: 100%;
  padding: 0 20px;
  background-color: var(--sm-bg-card);
  border-bottom: 1px solid var(--sm-border);
  border-bottom-left-radius: var(--sm-radius-lg);
  border-bottom-right-radius: var(--sm-radius-lg);
  font-size: 14px;
  font-family: var(--sm-font);
}

#menu ul {
  list-style: none;
  margin: 0;
  padding: 10px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

#menu li {
  display: inline-flex;
}

#menu li a,
#menu .dropbtn {
  display: inline-block;
  padding: 8px 14px;
  text-decoration: none;
  color: var(--sm-text-muted);
  border-radius: var(--sm-radius);
  transition: background 0.15s, color 0.15s;
}

#menu li a:hover,
#menu .dropbtn:hover {
  background: var(--sm-bg-elevated);
  color: var(--sm-text);
  font-weight: 600;
}

#menu li a.active {
  background: var(--sm-accent);
  color: #fff;
  font-weight: 600;
}

#menu li.dropdown {
  display: inline-block;
  position: relative;
}

#menu .dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 4px;
  min-width: 180px;
  background: var(--sm-bg-elevated);
  border: 1px solid var(--sm-border);
  border-radius: var(--sm-radius);
  box-shadow: var(--sm-shadow);
  z-index: 100;
  overflow: hidden;
}

#menu .dropdown-content a {
  display: block;
  padding: 10px 14px;
  color: var(--sm-text);
  text-decoration: none;
  border: none;
  border-radius: 0;
}

#menu .dropdown-content a:hover {
  background: var(--sm-accent);
  color: #fff;
}

#menu .dropdown:hover .dropdown-content {
  display: block;
}

/* ===== Main content area ===== */
#test_area {
  padding: 20px 24px;
  max-width: 1400px;
  margin: 0 auto;
}

.clearer {
  clear: both;
}

/* ===== Tables ===== */
table.rtcm,
table.gridtable {
  width: 100%;
  max-width: 900px;
  margin: 20px auto;
  border-collapse: collapse;
  border: 1px solid var(--sm-border);
  border-radius: var(--sm-radius);
  overflow: hidden;
  font-family: var(--sm-font);
  font-size: 14px;
  background: var(--sm-bg-card);
  box-shadow: var(--sm-shadow);
}

table.rtcm th,
table.gridtable th {
  padding: 12px 14px;
  text-align: left;
  background: var(--sm-bg-elevated);
  border-bottom: 1px solid var(--sm-border);
  font-weight: 600;
  color: var(--sm-text-muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

table.rtcm td,
table.gridtable td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--sm-border);
  color: var(--sm-text);
}

table.rtcm tr:last-child td,
table.gridtable tr:last-child td {
  border-bottom: none;
}

table.rtcm tr:hover td,
table.gridtable tbody tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

table.rtcm {
  font-size: 15px;
}

table.rtcm td {
  white-space: nowrap;
}

table.gridtable tr.rColor td {
  background: rgba(34, 197, 94, 0.12);
  color: var(--sm-success);
  font-weight: 600;
}

table.gridtable tr.cColor td {
  background: rgba(234, 179, 8, 0.12);
  color: var(--sm-warning);
  font-weight: 600;
}

table.gridtable tr.bColor td,
table.gridtable tr.gColor td {
  background: rgba(59, 130, 246, 0.1);
  color: var(--sm-accent);
  font-weight: 600;
}

table.gridtable tr.tColor td {
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
  font-weight: 600;
}

table.gridtable tr.lColor td {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
  font-weight: 600;
}

/* Node number clickable cells */
.nodeNum {
  margin: 0;
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}

.nodeNum:hover {
  font-weight: 600;
  color: var(--sm-accent);
  background: rgba(59, 130, 246, 0.1);
}

/* ===== Bubble chart / misc ===== */
#bubblechart,
#lsnodeschart,
#website {
  font-size: 13px;
  font-family: var(--sm-font);
}

/* ===== Disconnect / text blocks ===== */
.disconnect {
  font-size: 14px;
  text-align: left;
  color: var(--sm-text-muted);
}

.text {
  position: relative;
  margin: 0 0 0 12px;
  max-width: 360px;
  font-size: 14px;
  color: var(--sm-text);
}

/* Progress bars */
.barbox_a {
  position: absolute;
  top: 2px;
  left: 10px;
  margin: 0;
  width: 302px;
  height: 22px;
  background: var(--sm-bg-elevated);
  border-radius: 6px;
  overflow: hidden;
}

.bar {
  position: relative;
  top: 1px;
  left: 1px;
  margin: 0;
  height: 20px;
  background: var(--sm-accent);
  border-radius: 4px;
  text-align: center;
  color: #fff;
  font-size: 12px;
  line-height: 20px;
}

.per {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  height: 20px;
  font-size: 11px;
  line-height: 20px;
  color: #fff;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
}

.blank {
  background: var(--sm-border);
  width: 300px;
  border-radius: 6px;
}

/* ===== Login ===== */
#login {
  display: none;
}

#login-header {
  margin: 0 auto;
  position: absolute;
  right: 250px;
}

#login-link {
  position: absolute;
  top: 0;
  right: 0;
  display: block;
  background: var(--sm-bg-elevated);
  padding: 8px 16px;
  color: var(--sm-text);
  border-radius: var(--sm-radius);
  border: 1px solid var(--sm-border);
  font-weight: 500;
}

#login-panel {
  position: absolute;
  top: 36px;
  right: 0;
  width: 220px;
  padding: 16px;
  background: var(--sm-bg-elevated);
  border: 1px solid var(--sm-border);
  border-radius: var(--sm-radius);
  font-size: 13px;
  font-weight: 500;
  color: var(--sm-text);
  display: none;
  box-shadow: var(--sm-shadow);
}

label {
  line-height: 1.8;
  color: var(--sm-text);
}

/* ===== Footer ===== */
#footer {
  font-size: 14px;
  text-align: center;
  width: 100%;
  max-width: 900px;
  margin: 32px auto 24px;
  padding: 16px 24px;
  color: var(--sm-text-muted);
  border-top: 1px solid var(--sm-border);
}

#footer b {
  font-weight: 600;
  color: var(--sm-text);
}

/* ===== Buttons ===== */
.submit {
  background: var(--sm-accent);
  color: #fff;
  padding: 8px 16px;
  border: none;
  border-radius: var(--sm-radius);
  font-family: var(--sm-font);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s;
}

.submit:hover {
  background: var(--sm-accent-hover);
}

.submit2 {
  background: var(--sm-bg-elevated);
  color: var(--sm-text);
  padding: 8px 16px;
  border: 1px solid var(--sm-border);
  border-radius: var(--sm-radius);
  font-family: var(--sm-font);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.submit2:hover {
  background: var(--sm-border);
  border-color: var(--sm-border-light);
  color: var(--sm-text);
}

#cpMain {
  display: none;
}

/* Inputs (when used in forms) */
input[type="text"],
input[type="password"],
input[type="number"] {
  background: var(--sm-bg-elevated);
  border: 1px solid var(--sm-border);
  border-radius: var(--sm-radius);
  color: var(--sm-text);
  padding: 8px 12px;
  font-family: var(--sm-font);
  font-size: 14px;
}

input:focus {
  outline: none;
  border-color: var(--sm-accent);
}
