* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #121212;
  color: #e0e0e0;
}

#topbar {
  height: 54px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  background: #202124;
  border-bottom: 1px solid #333;
}

.brand {
  font-weight: 700;
  color: #fff;
  margin-right: 12px;
  white-space: nowrap;
}

#topbar input,
#topbar select,
#topbar button {
  height: 32px;
  border-radius: 5px;
  border: 1px solid #444;
  background: #2b2c30;
  color: #eee;
  padding: 0 8px;
}

#topbar button {
  cursor: pointer;
  background: #374151;
}

#topbar button:hover {
  background: #4b5563;
}

.logout {
  margin-left: auto;
  color: #ddd;
  text-decoration: none;
}

#layout {
  display: flex;
  height: calc(100vh - 54px);
}

#sidebar {
  width: 310px;
  background: #18191c;
  border-right: 1px solid #333;
  padding: 10px;
  overflow-y: auto;
}

#map {
  flex: 1;
}

.side-title {
  font-weight: 700;
  margin: 12px 0 8px;
  color: #fff;
}

.bulk {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}

.bulk button {
  background: #2b2c30;
  border: 1px solid #444;
  color: #eee;
  border-radius: 5px;
  padding: 5px 8px;
}

.device-row,
.legend-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 0;
}

.device-row input[type="color"] {
  width: 38px;
  height: 26px;
  border: 0;
  background: transparent;
}

.legend-color {
  width: 18px;
  height: 8px;
  border-radius: 2px;
  display: inline-block;
}

.login-body {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #111;
}

.login-box {
  width: 340px;
  padding: 28px;
  background: #1e1e1e;
  border-radius: 12px;
  box-shadow: 0 0 25px rgba(0,0,0,.45);
}

.logo {
  width: 58px;
  height: 58px;
  background: #2f6fed;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
  margin-bottom: 12px;
}

.login-box input,
.login-box button {
  width: 100%;
  padding: 11px;
  margin-top: 10px;
  border-radius: 6px;
  border: 1px solid #555;
}

.login-box input {
  background: #111;
  color: #eee;
}

.login-box button {
  background: #2f6fed;
  color: #fff;
  border: 0;
}

.error {
  margin-top: 10px;
  color: #ff7777;
}

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

.brand-logo {
  width: 36px;
  height: 28px;
  border-radius: 7px;
  background: #2f6fed;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  letter-spacing: .5px;
}

#topbar {
  height: 48px;
  padding: 6px 8px;
}

#layout {
  height: calc(100vh - 48px);
}

#sidebar {
  width: 295px;
}

#topbar input,
#topbar select,
#topbar button {
  height: 30px;
  font-size: 13px;
}

.side-title {
  color: #b8c7ff;
  border-bottom: 1px solid #333;
  padding-bottom: 5px;
}

.device-row {
  border-bottom: 1px solid rgba(255,255,255,.05);
}

.legend-row {
  font-size: 13px;
  color: #ddd;
}

.logout {
  padding: 6px 10px;
  border-radius: 6px;
  background: #2b2c30;
}

.logout:hover {
  background: #3a3b40;
}
