/* AXICOMS DARK MODE THEME - site-darkmode.css */

/* --- Reset and Base --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background-color: #1E1E1E;
  color: #E0E0E0;
}

/* --- Topbar --- */
.topbar {
  background-color: #2C2C2C;
  color: #F0F0F0;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 75px;
  z-index: 1000;
}

.topbar .logo-group {
  display: flex;
  align-items: center;
  gap: 15px;
}

.topbar .logo-group img {
  width: 300px;
  height: 75px;
  object-fit: contain;
}

.topbar .logo-group h2,
.topbar-user {
  color: #F0F0F0;
}

/* --- Menubar --- */
.menubar {
  background-color: #343A40;
  color: #E0E0E0;
  display: flex;
  gap: 15px;
  padding: 10px 20px;
  position: fixed;
  top: 75px;
  left: 0;
  right: 0;
  z-index: 999;
}

.menubar a {
  color: #E0E0E0;
  text-decoration: none;
  font-size: 14px;
}

.menubar a.active {
  color: #4DA6FF;
  font-weight: bold;
}

/* --- Layout --- */
.layout {
  display: flex;
  margin-top: 115px;
}

.sidebar {
  width: 250px;
  background-color: #2A2A2A;
  padding: 20px;
  min-height: calc(100vh - 115px);
}

.sidebar ul {
  list-style: none;
  padding: 0;
}

.sidebar a {
  text-decoration: none;
  color: #CCC;
  display: block;
  padding: 6px 0;
}

.sidebar a:hover,
.sidebar a.active {
  color: #4DA6FF;
  font-weight: bold;
}

.main {
  flex: 1;
  padding: 20px;
  background-color: #1E1E1E;
}

/* --- Section Cards --- */
.section {
  background-color: #2D2D2D;
  padding: 20px;
  margin-bottom: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.6);
}

/* --- Tables --- */
.message-counts-table {
  width: 100%;
  border-collapse: collapse;
  background-color: #1E1E1E;
  color: #EEE;
}

.message-counts-table th {
  background-color: #444;
  color: #FFF;
  padding: 8px;
}

.message-counts-table td {
  border: 1px solid #333;
  padding: 8px;
}

.message-counts-table tr:nth-child(even) {
  background-color: #2A2A2A;
}

/* --- Cards and Components --- */
.card {
  background: #2D2D2D;
  padding: 20px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.5);
  border-radius: 8px;
  margin-bottom: 20px;
}

.device-grid {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.device {
  flex: 1;
  min-width: 220px;
  background: #333;
  color: #EEE;
  padding: 15px;
  border-left: 5px solid #3498db;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

/* --- Buttons --- */
.btn-dashboard,
#toggleUpdateBtn,
#resetZoomBtn {
  background-color: #444;
  color: #FFF;
  padding: 8px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  margin-right: 10px;
}

.btn-dashboard:hover,
#toggleUpdateBtn:hover,
#resetZoomBtn:hover {
  background-color: #666;
}

.button-box {
  flex: 1;
  min-width: 150px;
  height: 80px;
  text-align: center;
  line-height: 80px;
  font-weight: bold;
  color: white;
  border-radius: 10px;
  font-size: 16px;
  transition: background-color 0.4s ease;
}

.btn-blue { background-color: #007BFF; }
.btn-green { background-color: #28a745; }
.btn-red { background-color: darkred; }

/* --- Gallery Viewer --- */
.viewer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.viewer-grid .thumb {
  width: 180px;
  height: auto;
  cursor: pointer;
  border-radius: 6px;
  transition: transform 0.2s;
}

.viewer-grid .thumb:hover {
  transform: scale(1.05);
}

.lightbox {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 2000;
}

.lightbox img {
  max-width: 90%;
  max-height: 80%;
  border-radius: 6px;
}

.lightbox a, .lightbox span {
  position: absolute;
  color: white;
  font-size: 36px;
  cursor: pointer;
  user-select: none;
}

#prevBtn { left: 30px; }
#nextBtn { right: 30px; }
#closeBtn {
  top: 20px;
  right: 30px;
  font-size: 40px;
}

/* --- Mobile Section Padding --- */
@media (max-width: 600px) {
  .section {
    padding: 15px;
    margin-bottom: 16px;
  }
}

.hidden {
  display: none;
}
