header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 120px;              /* fixed header height */
  background-color: #f3f2f2;
  padding: 0 20px;
  z-index: 1000;

  display: flex;
  justify-content: space-between; /* Logo 3 left, Logos 1+2 right */
  align-items: center;
  box-sizing: border-box;
}

/* Logo 3 (left) smaller */
.header-logo-left img {
  height: 90px;   
  width: auto;
  object-fit: contain;
}

/* Logos 1 + 2 (right) larger */
.header-logo-right {
  display: flex;
  gap: 20px;
  align-items: center;
}
.header-logo-left {
  display: flex;
  padding:10px;
}

.header-logo-right img {
  height: 175px;  /* bigger than Logo 3 */
  width: auto;
  object-fit: contain;
}

main {
  display: block;
  margin-top: 120px;               /* Ensures clear space under fixed header */
  padding: 10px;                   /* Adds inner spacing for content */
  background-color: #fff;          /* Keeps contrast from the header */
  font-family: Arial, Helvetica, sans-serif;
  font-size: 85%;
  border: 2px solid rgb(4, 67, 49);
  width: 100%;                      /* Responsive width on all screens */
  box-sizing: border-box;
  width: calc(100% - 50px);    /* 25px gap on each side */
  margin: 0 auto;
}

.container {
  display: grid;
  grid-template-columns: 1fr 2fr; /* Input narrow, output wider */
  gap: 20px;
  padding: 20px;
  padding-top:10px;
}

html, body {
  height: 100%;
  margin: 0;
  overflow-y: auto;
}

* {
  box-sizing: border-box;
}

body, html {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow-x: hidden;
}

header img {
  height: 120px;          /* Bigger and more balanced */
  width: auto;
}


@media screen and (max-width: 600px) {
  main {
    padding: 20px;
    font-size: 80%;
  }
}


  main {
    font-size: 80%;
  }

#login-wrapper {
  display:flex;
  justify-content: center;
  background-color: transparent;
  align-items:center;
  padding;20px;
}


#login-box {
  border: 2px solid #000;
  border-radius: 12px;
  width: 320px;
  padding: 20px;
  background-color: #b22222;
  box-sizing: border-box;
}


#login-section {
  padding: 0;
  margin: 0;
  flex-direction: column;
  gap: 10px;
}

#login-section input,
#login-section button {
  width: 100%;
  padding: 10px;
  font-size: 16px;
  border: 2px solid rgb(12, 0, 0);
  border-radius: 10px;
  box-sizing: border-box;
  margin-botton:1px;
}

#login-section button {
  background-color: #333;
  color: white;
  cursor: pointer;
  border: none;
  transition: background 0.2s;
}

#login-section button:hover {
  background-color: #d43f00; /* Slightly darker on hover */
}


#login-section form {
  margin: 0;
  padding: 0;
}

#login-link a {
  color: white;
  text-decoration: underline;
}

/* Header bar above the table */
#input-header {
  display: flex;
  justify-content: space-between;   /* logout left, password right */
  align-items: center;
  width: 100%;
  margin-bottom: 5px;
}



#change-password-inline button:hover,
#logout:hover {
  background-color: #d43f00;
}

/* Hide password UI until logged in */
#change-password-inline {
  display: none;
}

/* INLINE CHANGE PASSWORD */
#change-password-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}

#change-password-inline input {
  width: 160px;
  padding: 10px 12px;
  font-size: 16px;
  border-radius: 4px;
  height: 42px;
}

#change-password-inline button {
  background-color: #b22222;
  color: white;
  border: none;
  padding: 10px 30px;     /* match Logout */
  font-size: 16px;
  border-radius: 4px;
  cursor: pointer;
  position: static;       /* cancels global relative */
  bottom: auto;           /* cancels global bottom:10px */
}

.password-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 100;

  display: flex;
  align-items: center;
  gap: 8px;

  padding: 12px;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);

  white-space: nowrap;
}

.password-panel[hidden] {
  display: none !important;
} 

/* FIRST LOGIN PASSWORD RESET WRAPPER */
#first-login-password-wrapper {
  display: none;
  justify-content: center;
  align-items: flex-start;
  margin-top: 20px;
}

/* BOX */
#first-login-password-box {
  background-color: #f9f9f9;
  border: 1px solid #ccc;
  padding: 20px 25px;
  border-radius: 6px;
  width: 280px;
  text-align: center;
}

/* SECTION */
#first-login-password-section h3 {
  margin-bottom: 15px;
  font-size: 18px;
  font-weight: 600;
}

/* FIRST LOGIN INPUT */
#first-login-new-password {
  background-color: #fff;
  margin: 0;
  display: inline-block;
  color: #1a1a1a;
  padding: 10px 12px;      /* match button */
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 16px;
  width: 100%;
  height: 42px;            /* match button height */
  line-height: 22px;
  box-sizing: border-box;
  appearance: none;
  text-align: left;
}

/* FIRST LOGIN BUTTON */
#first-login-change-btn {
  background-color: #b22222;
  color: white;
  border: none;
  padding: 10px 30px;      /* match Logout */
  font-size: 16px;
  border-radius: 4px;
  cursor: pointer;
  width: 100%;
}

#first-login-change-btn:hover,
#change-password-inline button:hover,
#logout:hover {
  background-color: #d43f00;
}


#input-section,
#output-section,
#logout,
#results {
  display: none; /* ✅ Hide all sections before JavaScript runs */
}

/* Default background for all inputs and selects */
input[type="number"],
input[type="text"],
select {
  color: black !important;
  background-color: #fff;
}

/* When filled/selected */
input.input-filled,
select.input-filled {
  background-color: #fcf1f1 !important; /* light red */
}

/* Ensure all form elements have the same padding and font size */
input[type="number"],
input[type="text"],
select {
  background-color: #fff;
  margin: 0;
  display: block;
  color: #1a1a1a;
  padding: 4px 8px;
  border: 1px solid #0a0000;
  border-radius: 4px;
  font-size: 14px;
  width: 100%;
  height: 36px;
  box-sizing: border-box;
  appearance:none;
}

.error-message {
  color: #4a0000;
  font-size: 0.8rem;
  margin-top: 2px;
}
.cell-error {
  background-color: #d43f00; /* light red */
  border: 2px solid #d9534f; /* strong red border */
}

.about-link {
  color: #b22222;         
  font-style: italic;
  font-size: 20px;
  margin-left: 20px;
  text-decoration: none;
}

.about-link:hover {
  text-decoration: underline;
  color: #004466;
}

.help-icon {
  position: relative;
  display: inline-block;
  cursor: pointer;
  margin-left: 6px;
  color: #007bff;
  vertical-align: middle;
}

.help-icon .material-icons {
  font-size: 18px;
  vertical-align: middle;
}

.help-text {
  display: none;
  position: absolute;
  top: 24px;
  left: 0;
  z-index: 10;
  width: 250px;
  background: #f9f9f9;
  color: #333;
  border: 1px solid #ccc;
  padding: 10px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}



table {
  border: 2px solid;
  border-collapse: collapse;
  background-color: rgb(243, 242, 242);
  table-layout: fixed;
  width: 90%; /* or a fixed max-width if preferred */
  table {
  margin-top: -2px;
  margin-bottom: 0px;
}

}

/* Set consistent vertical spacing and alignment */
th,
td {
  padding: 3px 10px; /* 4px top/bottom, 10px left/right */
  text-align: left;
  vertical-align: middle;
  box-sizing: border-box;
}

/* Specific column widths */
th:nth-child(1),
td:nth-child(1) {
  width: 200px;
}

th:nth-child(2),
td:nth-child(2) {
  width: 160px;
}

/* Center the table */
table.center {
  max-width: 800px; /* Optional: controls layout on large screens */
  margin: 10px auto;
  width: 100%;
}
input[type="radio"] {
  accent-color: red;
}

section {
  display: flex;
  justify-content: space-between;
  gap: 10px; /* Add space between the columns */
}

button {
  background-color: #b22222; /* onyx red */
  border: none;
  color: white;
  padding: 15px 50px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  border-radius: 4px;
  position:relative;
  bottom: 10px; /* Adjust space from bottom */
  /*  margin: 0px 275px;*/
  cursor: pointer;
}

#download_pdf {
  background-color: #b22222;
  color: white;
  border: none;
  padding: 15px 30px;
  font-size: 16px;
  border-radius: 4px;
  cursor: pointer;
  float: right;
  top:5px; /* Aligns it to top-right inside the container */
}

#login {
  top:2px;
  padding: 15px 50px;
}

#logout {
  display: none; /* ✅ Ensure it starts hidden */
  font-size: 16px;
  background-color: #b22222; /* 🔥 Orange-red color */
  padding: 10px 30px;  
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s ease-in-out;
  top:5px;
}

#logout:hover {
  background-color: #d43f00; /* ✅ Darker color on hover */
}

#results {
   display: flex; /* This will now be in effect */
   flex-direction: column; /* Add this if you want vertical stacking */
   font-family: Arial, Helvetica, sans-serif;
   width: 100%;
}


#results-container {
  text-align: left;
  font-family: Arial, sans-serif;
  font-size: 20px;
  font-weight: bold;
  min-height: 2rem; /* Or however tall you want the space to remain */
}
.results-header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 0.5rem;
}

.results-row1,
.results-row2,
.results-row3,
.results-row4 {
  display: grid;
  grid-template-columns: 1.5fr 1fr; /* Two equal columns */
  gap: 1rem;
  padding-top: 10px;
}

.results-row1,
.results-row2,
.results-row3,
.results-row4 {
  align-items: stretch;
}

.results-row1 >div,
.results-row2 > div,
.results-row3 > div,
.results-row4 > div {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 12px;
  min-height: 100px;
  overflow: visible;
}

.results-row2 > .chart-box {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 12px;
  padding: 1rem;
  min-height: 400px;
  height:100%;
}

.results-row2 > .chart-box:first-child {
  width: 100%;
  max-width: none; /* allow full grid column width */
  flex-grow: 1;
}

#text-results {
  margin-top: 1rem;
  margin-bottom: 2rem;
  text-align: left;
}

#traffic_light {
  display: block; /* ✅ Ensure it's visible */
  text-align: center; /* ✅ Center the icon */
  font-size: 25px; /* ✅ Adjust size */
  display: block;
  padding:10px;
}


canvas {
  background-color: #fff !important;
}

/* Clear floats after the columns */
section::after {
  content: "";
  display: table;
  clear: both;
}
#charts {
  margin-top: 0px;
  width: 100%;
  text-align: center;
  margin:0 auto;
}

#myDoughnutChart {
  display: block;
  margin: 0 auto;
  background-color: #fff !important;
  width: 100% !important;
  height: auto !important;
  max-width: 100%;
}

#myBarChart {
  display: block;
  margin: 0 auto;
  background-color: #fff !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100%;
}

.bar-chart-wrapper {
  width: 100%;
  height: 300px;
  max-width: 600px;
  margin: auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

.doughnut-chart-wrapper {
  width: 100%;
  max-width: 260px;
  aspect-ratio: 1 / 1;
  margin: auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

.chart-wrapper canvas {
  display: block;
  margin: 0 auto;
}
canvas {
  margin: 0 auto; /* centers both horizontally & vertically */
  display: block;
  box-sizing: border-box;
}
.chart-box {
  width:100%;
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  position: relative;
}

/* Make selects look consistent across browsers */
select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg fill='black' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  padding-right: 30px; /* space for the arrow */
}

table#input_table select,
table#input_table_equipment select,
table#input_table_travel select {
  width: 100%;
  height: 26px; /* Set height of select to match input fields */
  padding: 5px; /* Match the padding of inputs */
  font-size: 14px; /* Same font size as inputs */
  border-radius: 4px; /* Rounded borders */
  border: 1px solid #000000; /* Same green border as inputs */
  box-sizing: border-box; /* Include padding in element’s width */
}


/* Ensure number inputs have similar height as text and select elements */
input[type="number"] {
  height: 24px; /* Match height to make them consistent */
  line-height: 18px; /* Match line height for consistency */
}

/* to overide autofil issues */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active {
  -webkit-text-fill-color: black !important;
 box-shadow: 0 0 0px 1000px #fcf1f1 inset !important;
  transition: background-color 5000s ease-in-out 0s; /* prevent autofill bg */
}

/* new stuff from foundation*/



#output-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.output-banner {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 1rem;
  background-color: #f5f5f5;
  height: 60px;
  grid-column: 2 / 3;
  grid-row: 1 / 2;
}
.section-banner {
  width: 100%;
  padding: 0.75rem 1rem;
  box-sizing: border-box;
  font-size: 1.4rem;
  font-weight: bold;
  background-color: #f5f5f5;
  border-left: 6px solid #b22222;
  color: #333;
  height: 60px;
}
.table-box {
  display: flex;
  flex-direction: column;
  align-items: center; /* ✅ This centers the table horizontally */
  padding: 1rem;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 12px;
  min-height: 140px;
  overflow: hidden;
}

.box-title {
  padding:5px;
  text-align:center;
  font-size:16px;
  font-weight:bold;
}
.footnote {
  padding:5px;
  text-align:center;
  font-size:10px;
}

.footnote {
  padding:5px;
  text-align:center;
  font-size:10px;
}

.result-text-box,
.table-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 10px;
}


.results-header {
  display: flex;
  align-items: center;
}

.result-table {
  width: 60%;
  max-width: 600px;
  border-collapse: separate; /* allow rounded corners */
  border-spacing: 0;         /* remove gaps between cells */
  background-color: #fcf1f1;
  border: 2px solid;
  margin-bottom: 5px;
  margin-top: 20px;
  border-radius: 12px;
  overflow: hidden;          /* clip background to rounded corners */
}

/* First column styling */
.result-table th:nth-child(1),
.result-table td:nth-child(1) {
  text-align: left;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* Extra table specific styling */
#extraTable {
  border-radius: 12px;
  background-color: #fcf1f1;
}


  th:nth-child(2),
  td:nth-child(2) {
    /*width: 40px; /* Second column width */
    padding: 2px;
    text-align: center;
  }
}


// carbon total styling - red box

.carbon-total {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.carbon-label {
  font-weight: bold;
  font-size:16px;
  text-align:center;
  padding:10px;
}

.carbon-box {
  display: flex;
  justify-content: center;
  align-items: center;
}

.carbon-value {
  background-color: #b22222;
  color: white;
  padding: 8px 10px;
  border-radius: 4px;
  font-size: 1.5em;
}

.subscript {
  vertical-align: sub;
  font-size: 0.7em;
}

.jpeg_box {
  display: flex;
  align-items: center;
  background-color: #f5f5f5; /* optional background */
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  overflow: hidden;
}

.jpeg_box img {
  max-width: 100%;
  max-height: auto;
  object-fit: contain; /* or 'cover' if you want it to fill the box */
  border-radius: 4px;
  padding-top;5px;
}

.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.55);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.popup-box {
  background: white;
  padding: 25px;
  border-radius: 10px;
  width: 350px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.popup-box h2 {
  margin-top: 0;
}

#popup-close {
  margin-top: 15px;
  padding: 10px 20px;
  background: #0078D4;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

#input-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

#change-password-inline #change-password-link {
  display: inline !important;
  background: none !important;
  color: #b22222 !important;
  padding: 0 !important;
  margin: 0 !important;
  font-size: 14px !important;
  border-radius: 0 !important;
  text-decoration: underline !important;
  width: auto !important;
  position: static !important;
  white-space: nowrap;
}
#change-password-inline #change-password-link:hover {
  color: #d43f00 !important;
}

#input-header #logout {
  background-color: #b22222 !important;
  color: #fff !important;
  border: none !important;
  border-radius: 4px !important;
  padding: 10px 30px !important;
  font-size: 16px !important;
  cursor: pointer;
}
#input-header #logout:hover {
  background-color: #d43f00 !important;
}

#input-header #logout {
  position: static !important;
  top: auto !important;
  bottom: auto !important;
  margin: 0 !important;
  opacity: 1;
  visibility: visible;
}























































































































