/* Global styles */
html, body {
  margin: 0;
  height: 100vh;
  display: flex;
  font-family: "Segoe UI", Arial, sans-serif;
  background: #fafafa;
  color: #333;
}

/* Right panel - fits exactly within viewport */
.right-panel {
  width: 350px;
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh; /* Full viewport height */
  background: #ffffff;
  padding: 12px;
  box-shadow: -3px 0 8px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* Stack naturally from top */
  gap: 12px; /* Small gap between all elements */
  overflow: hidden; /* No scroll unless needed */
  box-sizing: border-box;
}

.right-panel img.top-photo {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 8px; /* Small gap below top photo */
}

/* Left panel - main content area */
.left-panel {
  flex: 1;
  margin-right: 350px; /* Leave room for right-panel */
  padding: 20px;
  display: flex;
  flex-direction: column; /* Stack chart container vertically */
  box-sizing: border-box;
  height: 100vh; /* Full viewport height */
}

/* Container for all charts */
.chart-box {
  display: flex;
  flex-direction: column; /* Stack charts vertically */
  gap: 20px;              /* Space between charts */
  flex: 1;                /* Fill all available height */
}

/* Individual chart wrapper */
.chart-wrapper {
  flex: 1 1 0;            /* Grow/shrink equally, start from 0 */
  width: 100%;            /* Stretch almost to the right panel */
  background: white;
  padding: 12px;
  border-radius: 12px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Make canvas fill its wrapper */
.chart-wrapper canvas {
  width: 100% !important;
  height: 100% !important;
}

.battery {
  display: block; /* Prevent inline collapse */
  height: 50px;
  min-height: 50px; /* Ensure it doesn't collapse */
  width: 100%;
  border: 3px solid #444;
  border-radius: 8px;
  background: linear-gradient(to bottom, #f5f5f5, #e9e9e9);
  position: relative;
  overflow: hidden;
  margin: 0;
}

.battery-level {
  height: 100%;
  width: 0%;
  background: linear-gradient(to right, #4caf50, #81c784);
  transition: width 0.4s ease, background-color 0.3s ease;
}

.control-group {
  margin: 0;
}

.info-box {
  background: #ffffff;
  border-radius: 14px;
  padding: 4px 16px;
  font-size: 0.92em;
  line-height: 1.5;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
  border: 0px solid #eee;
  transition: box-shadow 0.2s ease;
  margin-bottom: 8px; /* Small gap below text box */
}

.info-box:hover {
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.08);
}

label {
  display: block;
  margin-bottom: 0;
  font-weight: 600;
  color: #555;
}

.carnegie-logo {
  margin-top: auto; /* Push logo to bottom only if extra space exists */
  display: block;
  width: 100%;
  height: auto;
}
