html, body {
  height: 100%;
  min-height: 100vh;  
  margin: 0;
  padding: 0;
  padding-top: 50px;
}

/* 2. Make wrapper take full height */
.page-wrapper {
  display: flex;
  flex-grow: 1; /* allows it to grow */
  flex-direction: column;
  width: 100%;
  min-height: 100vh;
}

/* 3. Main content grows to fill space */
.page-container {
  display: flex;
  flex-direction: column;        /* optional, if stacking children */
  max-width: 1200px;
  width: 100%;
  margin: 30px auto 0;           /* top margin + horizontal centering */
  padding: 10px;
  box-sizing: border-box;
}

/* 4. Footer stays at bottom */
.site-footer {
  background: #0e0d0dd0;
  color: #ccc;
  text-align: center;
  padding: 15px;
  height: 60px;
  flex-shrink: 0; /* prevents shrinking */
  margin-top: auto; /* pushes it to bottom */
}
body {
  /*
  background: url('../images/bg3.png') center center no-repeat;
  background-size: cover;
  background-attachment: fixed; optional: makes background stay in place while scrolling
  */
  background: linear-gradient(180deg, #1a1a1a, #2a2a2a);
  color: #f0f0f0;
  color: white;
  font-family: 'Orbitron', Arial, sans-serif;
}

/* .header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0; 
  width: 100%;
  background: #0e0d0dd0;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 30px;
  height: 120px;
  z-index: 1000;
  box-sizing: border-box; 
}

.logo {
  font-size: 20px;
  font-weight: bold;
}

.nav-links a {
  color: white;
  text-decoration: none;
  margin-left: 20px;
  font-weight: 500;
}

.nav-links a:hover {
  text-decoration: underline;
} */

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;

  display: flex;
  align-items: center;
  justify-content: space-between;

  background-color: #111;
  color: #fff;
  padding: 10px 50px; /* reduced from 50px to prevent overflow */
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  box-sizing: border-box;
}

.logo img {
  height: 100px;
}

.nav-links {
  display: flex;
  gap: 20px;
}

.nav-links a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
}

.menu-toggle {
  display: none;
  font-size: 28px;
  cursor: pointer;
  color: #fff;
}

/* Responsive for smaller screens */
@media screen and (max-width: 768px) {
  .nav-links {
    display: none;
    flex-direction: column;
    background-color: #111;
    position: absolute;
    top: 60px;
    right: 0;
    width: 100%;
    padding: 10px 0;
    z-index: 999;
  }

  .nav-links a {
    padding: 10px 20px;
    border-top: 1px solid #333;
  }

  .menu-toggle {
    display: block;
  }

  .nav-links.show {
    display: flex;
  }
}

body.home {
  background: url('../images/hg_back1.png') no-repeat center center fixed;
  background-size: cover;
}

body.home .page-container {
 
  padding: 20px;
  border-radius: 8px;
}
.homepage-container {
 background-image: url('../images/hg_back1.png');
}

/* Home page styles */

.home-box {
  background: rgba(22, 22, 22, 0.808);
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 20px;
  margin: 40px auto; /* Center and reduce margin */
  max-width: 500px;   /* Prevent it from stretching too wide */
  width: 90%;         /* Fill most of the screen on small devices */
  box-sizing: border-box;
}

.home-box input[type="submit"] {
  width: 100%;
  background: rgba(22, 22, 22, 0.808);
  border: 1px solid #ccc;
  color: #fff;
  border-radius: 8px;
  display: block;
  margin: 10px auto;
  padding: 10px;
  font-family: 'Orbitron', Arial, sans-serif; font-size: 1em; font-weight: bold; letter-spacing: 2px;
}
.home-box input[type="text"],
.home-box input[type="password"] {
  width: 50%;
  display: block;
  margin: 10px auto;
  padding: 10px;
  border-radius: 8px;
  font-family: 'Orbitron', Arial, sans-serif; font-size: 1em; font-weight: bold; letter-spacing: 2px;
}
.cp-form-box .datetime-row {
  display: flex;
  justify-content: center;
  align-items: center;
}


/* Style for Client panel panel page */
.cp-page-container {
  max-width: 1000px;
  width: 100%;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  margin: 20px auto 0; /* pushes content below the fixed header */
 
  position: relative;
  overflow: hidden;
  text-align: center;
}
@media (max-width: 600px) {
  .cp-page-container {
    text-align: center;
    align-items: center;
  }
}

.temp-logo {
  width: 200px;
  height: 100px;
  background-color: #444;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  border: 2px dashed #888;
  margin-top: 10px;
}
.form-box {
  display: flex;                                                        
  background: rgba(24, 23, 23, 0.411);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 20px;
  margin: 5px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cldash-form-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(24, 23, 23, 0.411);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 20px;
  margin: 5px 0;
  flex-wrap: wrap; /* Ensures it doesn't overflow on smaller screens */
}
.cldash-welcome-content {
  flex: 1;
  min-width: 250px;
  margin-right: 20px;
}
.cldash-client-logo {
  width: 150 px;
  max-height: 120px;
  object-fit: contain;
  display: block;
}


.form-box.full {
  display: block;
}
.form-box img {
  height: 40px;
  margin-right: 15px;
  vertical-align: middle;
}
.clp-form-box img {
  height: 150px;
  margin-right: 15px;
  vertical-align: middle;
}
@media (max-width: 600px) {
  .cldash-form-box {
    flex-direction: column;
    text-align: center;
  }

  .welcome-content {
    margin-right: 0;
  }

  .cldash-client-logo,
  .cldash-temp-logo {
    margin-top: 20px;
  }
}

.datetime-box {
  text-align: left;
  font-size: 1.1em;
  padding-left: 10px;
}
.welcome-content {
  flex: 1;
}
.client-logo {
  width: 100%;
  max-width: 400px;
  max-height: 200px;
  object-fit: contain;
}
.module-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-top: 20px;
}
.module-box {
   background: rgba(24, 23, 23, 0.411);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.2s;
}
.module-box:hover {
  background: rgba(255,255,255,0.15);
}
.module-box h3 {
  margin: 0 0 10px;
  font-size: 1.1em;
}
/* styles for admin panel */

.test-box {
  display: flex;
  width: 100%;
  background: rgba(12, 12, 12, 0.863);
  padding: 50px;
  margin-top: 60px;
  border-radius: 8px;
  color: white;
}

/* Dashboard styles */
.dashboard-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
  margin-top: 30px;
}

#loadingOverlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  justify-content: center; 
  align-items: center; 
  z-index: 9999;
  font-family: 'Orbitron', Arial, sans-serif;
} 


/* 🔽 Override for small screens (mobile) */
@media (max-width: 600px) {
  #loadingOverlay {
    justify-content: flex-start;
    padding-top: 10vh;
  }
}

.spinner {
  width: 60px;
  height: 60px;
  border: 6px solid rgba(255, 255, 255, 0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

.loading-text {
  color: white;
  font-size: 1.4em;
  letter-spacing: 2px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

h1 { color: #fff; }
.status-box {
  background: rgba(24, 23, 23, 0.411);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  color: #fff;
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.18);
  padding: 18px 24px;
  margin: 5px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.top-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; }
.top-box, .top-box2 {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  background: rgba(24, 23, 23, 0.411);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff;
  padding: 15px;
  gap: 10px;
  margin: 5px 0;
  justify-content: flex-start;
}
.top-box2 { justify-content: center; }
.icon-left { width: 32px; height: 32px; flex-shrink: 0; padding-right: 0px; }
.icon-left2 { width: 32px; height: 32px; flex-shrink: 0; padding-right: 20px; }
@media (max-width: 600px) {
  .top-row { flex-direction: column !important; flex-wrap: nowrap !important; width: 100% !important; }
  .top-box, .top-box2 { width: 100% !important; min-width: 0 !important; flex: 1 1 100% !important; box-sizing: border-box; word-break: break-word; overflow-wrap: break-word; }
}
.signal-bars { display: inline-block; vertical-align: middle; height: 18px; margin-right: 4px; }
.signal-bar-rect { display: inline-block; width: 4px; margin-right: 2px; background: #bbb; border-radius: 1px 1px 0 0; transition: background 0.2s; }
.small-text { font-family: 'Orbitron', Arial, sans-serif; font-size: 0.8em; letter-spacing: 2px; }
.ip-text { font-family: 'Orbitron', Arial, sans-serif; font-size: 0.6em; letter-spacing: 2px; }
.large-text { font-family: 'Orbitron', Arial, sans-serif; font-size: 0.8em; font-weight: bold; letter-spacing: 2px; }
.large-text2 { font-family: 'Orbitron', Arial, sans-serif; font-size: 1.2em; font-weight: bold; letter-spacing: 2px; }
.boiler-box {
  background: rgba(24, 23, 23, 0.411);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff;
  padding: 15px;
  margin: 5px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  flex: 1 1 0;
  min-width: 250px;
  max-width: 100%;
}
.boiler-box h2 {
  width: 100%;
  color: #fff;
  text-align: center;
  margin: 0 0 12px 0;
}
.boiler-box .box-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 20px;
  width: fit-content;        /* shrink to fit content */
  margin: 0 auto;            /* center horizontally */
}
.boiler-box .box-grid-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.full-width-btn {
  width: 100%;
  box-sizing: border-box;
  display: block;
  margin-left: 0;
  margin-right: 0;
}

button {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 8px;
  backdrop-filter: blur(6px) saturate(180%);
  -webkit-backdrop-filter: blur(6px) saturate(180%);
  box-shadow: 0 2px 8px 0 rgba(31,38,135,0.10);
  padding: 10px 18px;
  margin: 4px 0;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
}
button:hover {
  background: rgba(255,255,255,0.25);
  box-shadow: 0 4px 16px 0 rgba(31,38,135,0.18);
}
.fault-code-section {
  background: rgba(24, 23, 23, 0.411);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 20px;
  margin-top: 5px;
  border-radius: 10px;
  color: #fff;
  font-family: 'Orbitron', sans-serif;
}

.fault-code-section h2 {
  margin-top: 0;
  color: #fff;
  font-size: 1.5em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding-bottom: 8px;
}

.fault-code-section p {
  font-size: 0.95em;
  margin-bottom: 15px;
  color: #ddd;
}

.fault-code-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.fault-code-list li {
  margin-bottom: 8px;
  font-size: 0.95em;
}

.led {
  font-weight: bold;
  margin-left: 6px;
}
.fault-code-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
}

.fault-code-columns .fault-code-list {
  flex: 1 1 45%;
  list-style: none;
  padding: 0;
  margin: 0;
}

.fault-code-list li {
  margin-bottom: 8px;
  font-size: 0.95em;
}
.half-box {
  flex: 1 1 48%;
  display: flex;
  flex-direction: column;

}

@media (max-width: 768px) {
  .half-box {
    flex: 1 1 100%;
  }
}
.button-link {
  display: inline-block;
  background: rgba(24, 23, 23, 0.411);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 8px;
  padding: 10px 20px;
  font-weight: bold;
  text-decoration: none;
}
.button-link:hover {
  background: rgba(255,255,255,0.25);
}
.led.green { color: #00e396; }  
.led.red { color: red; }
.led.orange { color: orange; }
.led.yellow { color: yellow; }
.led.blue { color: #0099ff; }
.led.cyan { color: cyan; }
.led.magenta { color: magenta; }
.led.violet { color: violet; }
.led.purple { color: #aa00ff; }
.led.white { color: white; }

.boiler-icon {
  display: inline-block;
  width: 16px;
  height: 16px;
  margin: 0 4px;
  border-radius: 50%;
  background-color: grey; /* Default OFF */
}

.boiler_num {
  margin: 0 6px;
}


.boiler-icon.active {
  background-color: green;
}

    
#Time { font-family: 'Orbitron', Arial, sans-serif; font-size: 2em; font-weight: bold; letter-spacing: 2px;}
#Date { font-family: 'Orbitron', Arial, sans-serif; font-size: 0.8em; font-weight: bold; letter-spacing: 2px; }


/* logs css */

.logs-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  box-sizing: border-box;
  color: white;
  margin: 60px;
}
.range {
  width: 20%;
  display: block;
  margin-top: 10px;
  margin-bottom: 10px;
  border-radius: 8px;
  font-family: 'Orbitron', Arial, sans-serif; font-size: 0.8em; font-weight: bold; letter-spacing: 2px;
}
.nav-link {
  display: block;
  margin-bottom: 20px;
  font-size: 1.1em;
  color: #fff;
  text-decoration: underline;
  text-align: center;
}

#charts {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.chart-box {
  background: rgba(24, 23, 23, 0.411);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 20px;
  margin: 0;
  grid-column: span 1;
  display: flex;
  flex-direction: column;
  min-height: 350px;
  box-sizing: border-box;
}
/* client admin */

.clad-container { max-width: 1200px; margin: 0 auto; width: 100%; box-sizing: border-box; margin: 60px; }

.clad-form-box {
    background: rgba(24, 23, 23, 0.411);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
  }
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
}
.setting-row label {
  flex: 1;
}
.setting-row input, .setting-row select {
  flex: 1;
  margin-left: 10px;
  padding: 8px;
  border-radius: 6px;
  border: none;
  font-family: 'Orbitron', Arial, sans-serif;
}
button {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 8px;
  padding: 10px 20px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  margin-top: 20px;
}
button:hover {
  background: rgba(255,255,255,0.25);
  box-shadow: 0 4px 16px 0 rgba(31,38,135,0.18);
}
.instruction-box {
  display: flex;
  align-items: center;
  background: rgba(24, 23, 23, 0.411);
  border: 1px solid rgba(255, 255, 255, 0.2);
  gap: 12px;
  margin: 20px 0;
  padding: 12px 16px;
  border-radius: 6px;
}

.instruction-icon {
  width: 32px;
  height: 32px;
}

.instruction-text {
  font-size: 0.95em;
  color: #fff;
}
.i2c-scan-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.i2c-scan-left {
  flex: 1;
}

.i2c-scan-right {
  flex: 2;
  background: rgba(24, 23, 23, 0.411);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  padding: 10px 15px;
  font-family: 'Orbitron', sans-serif;
  color: #fff;
}
.full-width-button {
  width: 100%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  padding: 10px 20px;
  font-weight: bold;
  font-size: 1em;
  font-family: 'Orbitron', Arial, sans-serif;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
}

.full-width-button:hover {
  background: rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 16px 0 rgba(31,38,135,0.18);
}
    .nav-link {
  display: block;
  text-align: center;
  margin-bottom: 20px;
  font-size: 1.1em;
  color: #fff;
  text-decoration: underline;
}
.row {
  display: flex;
  margin-bottom: 8px;
}
.label {
  flex: 0 0 250px;
  color: #fff;
}
.value {
  flex: 1;
  color: #ddd;
}
.icon-img {
  margin-bottom: 20px;
}
.client-info, .module-list {
  flex: 1;
  min-width: 250px;
  padding: 10px;
}
@media (max-width: 600px) {
  .parent-container {
    flex-direction: column;
  }

  .client-info,
  .module-list {
    width: 100%;
    min-width: 0;
  }
}
.client-info {
  margin-right: 20px;
}
.module-list i {
  color: #ccc;
}
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
}
.setting-row label {
  flex: 1;
}
.setting-row input, .setting-row select, .setting-row textarea {
  flex: 2;
  margin-left: 10px;
  padding: 8px;
  border-radius: 6px;
  border: none;
  font-family: 'Orbitron', Arial, sans-serif;
}

button, input[type="submit"] {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 8px;
  padding: 10px 20px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  margin-top: 20px;
  text-decoration: none;
  display: inline-block;
}

.cl-form-box {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0;
}

.contact-form {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 10px;
  margin-bottom: 10px;
}
.contact-form button {
  padding: 40px 20px;
  font-weight: bold;
  cursor: pointer;
}

.contact-success {
  background-color: #d4edda;
  color: #155724;
  padding: 12px;
  border-radius: 5px;
  margin-bottom: 20px;
  text-align: center;
}
.cf-spinner-circle {
  width: 14px;
  height: 14px;
  border: 2px solid #ccc;
  border-top-color: #fff;
  border-radius: 50%;
  display: inline-block;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.module-box.ok {
  background-color: rgba(86, 253, 117, 0.12);
  border: 2px solid green;
}

.module-box.fault {
  background-color: rgba(253, 86, 86, 0.16);
  border: 2px solid red;
}


/* === MODULE CARD BOX MATCH FORM BOX === */

.module-card {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 40px;

  /* Match .form-box style */
  background: rgba(24, 23, 23, 0.411);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 10px; /* spacing between modules */
}

.module-left {
  flex: 1 1 60%;
  padding-right: 20px; /* spacing between left/right */
}

.module-right {
  flex: 0 0 220px;
  text-align: center;
}

.module-right img {
  display: block;
  margin: 0 auto 8px;
  width: 100px;   /* Same as your QR API size */
  height: 100px;  /* Same as your QR API size */
}

.module-form input {
  display: block;
  margin: 6px 0;
  width: 100%;
  max-width: 300px;
}
.module-heading {
  font-weight: bold;
  font-size: 1.5em;
  margin-bottom: 12px;
}

