/* ===== GLOBAL ===== */
body {
  margin: 0;
  padding: 0;
  background-color: #111112;
  font-family: "Poppins", sans-serif;
  color: #fff;
}

/* ===== HEADER ===== */
.top-bar {
  background-color: #161616;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 30px;
  border-bottom: 2px solid #b4ff00;
}

.header-title {
  font-weight: 700;
  font-size: 20px;
}

.home-btn {
  background-color: #b4ff00;
  color: #000;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  padding: 8px 20px;
  font-size: 16px;
  cursor: pointer;
  transition: 0.25s;
}

.home-btn:hover {
  opacity: 0.8;
}

/* ===== MAIN LAYOUT ===== */
.main-layout {
  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: 20px;
  padding: 20px;
  align-items: stretch;
}

/* ===== LEFT + MIDDLE ===== */
.left-middle {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* === TOP ROW === */
.top-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

/* UPS Diagram */
.diagram-box {
  background-color: #2a2a2d;
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 20px;
  color: #a3a3a3;
  box-shadow: inset 0 0 10px #0c0c0c;
}

/* TIMER BOX */
.timer-box {
  background-color: #1c1c1e;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
}

.timer-display {
  background-color: #c6ff6a;
  border-radius: 8px;
  width: 100%;
  text-align: center;
  padding: 20px 10px;
}

.timer-header {
  font-weight: 600;
  font-size: 18px;
  color: #000;
}

.timer-value {
  font-size: 40px;
  font-weight: 800;
  color: #000;
  margin-top: 5px;
}

/* BUTTONS */
.buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  margin-top: 16px;
}

.control-btn-boost,
.control-btn-float {
  width: 100%;
  padding: 12px 0;
  font-weight: bold;
  font-size: 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.25s;
}

.control-btn-boost {
  background-color: #1c1c1e;
  border: 2px solid #fff84b;
  color: #fff;
}

.control-btn-float {
  background-color: #fff84b;
  border: none;
  color: #000;
}

/* ===== STATUS SECTION ===== */
.status-section {
  background-color: #1c1c1e;
  border-radius: 12px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.status-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #151517;
  border: 1.8px solid #b4ff00;
  border-radius: 8px;
  padding: 10px 18px;
  font-weight: 700;
  font-size: 18px;
  color: #fff;
}

.title-right {
  color: #fffb75;
}

/* === STATUS PANEL === */
.status-panel {
  background-color: #151517;
  border-radius: 10px;
  padding: 25px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  box-shadow: inset 0 0 10px #0c0c0c;
}

.status-column {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 15px;
}

.status-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
}

.status-row span {
  color: #ccc;
}

.status-row strong {
  color: #fff;
  min-width: 70px;
  text-align: right;
}

.highlight {
  color: #fffb75;
}

/* ===== BATTERY ICON ===== */
.battery-status {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin-left: 15px;
}

.battery-icon {
  position: relative;
  width: 45px;
  height: 85px;
  border: 3px solid #fff;
  border-radius: 6px;
  background-color: #222;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  overflow: hidden;
}

.battery-body {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.battery-level {
  width: 80%;
  height: 50%;
  background-color: #8cff00;
  border-radius: 2px;
  transition: height 0.5s ease-in-out, background-color 0.3s ease;
}

.battery-cap {
  position: absolute;
  top: -8px;
  left: 30%;
  width: 40%;
  height: 6px;
  background-color: #fff;
  border-radius: 2px;
}

.battery-text {
  font-size: 16px;
  font-weight: bold;
  color: #fff;
  margin-top: 5px;
}

/* ===== LED PANEL ===== */
.led-panel {
  background-color: #1b1b1d;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 12px;
}

.led-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  font-size: 14px;
  padding: 5px 10px;
}

.led-status {
  color: #37e497;
}

.led-date,
.led-time {
  color: #fff;
  font-weight: 600;
  font-family: monospace;
  opacity: 0.8;
}

.led-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.led-row {
  background-color: #2a2a2d;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #3a3a3a;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  font-weight: 500;
}

.led-row div {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* LED colors */
.led {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #444;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.led.green {
  background-color: #37e497;
  box-shadow: 0 0 6px #37e497;
}

.led.red {
  background-color: #ff4b4b;
  box-shadow: 0 0 6px #ff4b4b;
}

.led.off {
  background-color: #444;
  box-shadow: none;
}

.diagram-box {
  position: relative; /* VERY important */
  width: 100%;
  height: 100%;
  background-color: #333;
  border-radius: 10px;
  overflow: hidden;
}

.indicator {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-color: red; /* OFF by default */
  position: absolute;
}

#ind1 {
  top: 100px;
  left: 60px;
}
#ind2 {
  top: 100px;
  left: 200px;
}
#ind3 {
  top: 100px;
  right: 80px;
}
#ind4 {
  bottom: 90px;
  left: 260px;
}

.diagram-wrapper {
  position: relative;
  width: 100%;
  height: auto;
}

.diagram-img {
  width: 100%;
  height: auto;
  display: block;
}

.dot {
  position: absolute;
  width: 16px;
  height: 16px;
  background: red;
  border-radius: 50%;
}

/* Left circle */
.dot1 {
  top: 30%;
  left: 9%;
}

/* Middle-left circle */
.dot2 {
  top: 30%;
  left: 28%;
}

/* Bottom vertical circle */
.dot3 {
  top: 68%;
  left: 36%;
}

/* Right-side circle */
.dot4 {
  top: 30%;
  right: 12%;
}
