* {
  box-sizing: border-box;
}

@media print {
  div {
    break-inside: avoid;
  }
  body{
        width: 21cm;
        height: 29.7cm;
        /*margin: 30mm 45mm 30mm 45mm;*/
        /* change the margins as you want them to be. */
   }
}

body {
  background-color: #D3D3D3;
  font-family: 'Inter', Arial, Helvetica, sans-serif;
}

.rotate {
  transform: rotate(90deg);
}

/* Create two equal columns that floats next to each other */
.column {
  float: left;
  width: 50%;
  padding: 10px;
  /*height: 300px; /* Should be removed. Only for demonstration */
}

/* Clear floats after the columns */
.row:after {
  content: "";
  display: table;
  clear: both;
}

.navmenu {
  transition-duration: 0.4s;
  background-color: white;
  color: black;
  border-radius: 8px;
  border: 2px solid black; /* Green */
  margin: 5px;
  padding: 5px;
  display: inline-block;
}

.navmenu:hover {
  background-color: #4CAF50; /* Green */
  color: white;
}

.welcome {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

.usermenu {
  display:inline-flex;
  margin: 3px;
}

.logintime {
  margin: 3px;
}

h1 {
  margin: 3px;
}

.today {
  margin: 3px;
}

.userhometbl {
  display: flex;
  flex-wrap: wrap;
}

.navmenuframe {
  clear: both;
  /*z-index: 1;*/
}

.mtl {
  color: red;
  background-color: blue;
}

#separator {
  clear: both;
}

.reporttbl {
  border: 1px solid black;
  border-collapse: collapse;
  padding: 3px;
  margin: 3px;
}

table.suppBatchFrm {
  border: none;
  border-collapse: collapse;
  empty-cells: hide;
}
table.suppBatchFrm tr:first-child>td { text-align: left; }
table.suppBatchFrm td { 
  border-left: 1px solid #000;  
  padding: 3px; 
  margin: 3px; 
  text-align: center; 
}
table.suppBatchFrm td:first-child { border-left: none; }

table.frmTbl td {
  padding: 5px;
}

table.frmTbl2 {
  padding: 5px;
  border-top: 2px solid black;
  border-bottom: 2px solid black;
  border-collapse: collapse;
}

table.frmTbl2 td {
  padding: 5px;
}

table.frmTbl3 {
  padding: 5px;
  /*border-top: 1px solid black;*/
  border-bottom: 2px solid black;
  border-collapse: collapse;
}

table.frmTbl3 td {
  padding: 5px;
}

.jstblpass {
  border: 1px solid black;
  border-collapse: collapse;
  padding: 3px;
  margin: 3px;
}

.jstbltoday {
  border: 1px solid black;
  border-collapse: collapse;
  padding: 3px;
  margin: 3px;
}

.jstbl {
  border: 1px solid black;
  border-collapse: collapse;
  padding: 3px;
  margin: 3px;
}

.tblwithphoto, th.tblwithphoto, td.tblwithphoto, tr.tblwithphoto {
  border: 1px solid black;
  border-collapse: collapse;
  padding: 5px;
  margin: 5px;
}

table.tag_details, td.tag_details, tr.tag_details {
  border: 1px solid black;
  border-collapse: collapse;
  padding: 10px;
}

/* Keep report table headers always visible */
th.reporttbl,
.sticky-header th {
  position: sticky;      /* stick relative to viewport scroll */
  top: 0;                /* lock to very top */
  z-index: 10;           /* sit above table body */
  background-color: #4CAF50; 
  color: white;
}

th.reporttbl {
  box-shadow: 0 2px 3px rgba(0,0,0,0.2);
}

table.reporttbl tr:hover {
  background-color: #ffa;
}

th.jstbl {
  position: -webkit-sticky; /* for Safari */
  position: sticky;
  top: 0;
  background-color: #4CAF50;
  color: white;
}

th.jstblpass {
  position: -webkit-sticky; /* for Safari */
  position: sticky;
  top: 0;
  background-color: yellow;
  color: black;
}

th.jstbltoday {
  position: -webkit-sticky; /* for Safari */
  position: sticky;
  top: 0;
  background-color: blue;
  color: white;
}

tr.reporttbl:nth-child(even) {
  background-color: #C7C7C7;
}

.reporttblprint {
  border: 1px solid black;
  border-collapse: collapse;
  padding: 3px;
}

tr.reporttblprint:nth-child(even) {
  background-color: #F3F3F3;
}

.entryformtbl {
  text-align: left;
}

th.entryformtbl {
  font-size: 1.5em;
}

.formtbl th, .formtbl td, .formtbl tr {
  padding: 5px;
  /*border: 3px;*/
}

.userRight {
  border-collapse: collapse;
  border: 1px solid black;
}

.userRight th, .userRight td, .userRight tr {
  padding: 3px;
  border: 1px solid black;
  text-align: center;
}

.sticky-header {  
  position: sticky;
  top: 0;
  background-color: #4CAF50;
  color: white;
}

input[type=submit] {
  margin: 5px;
}

td input[type=submit] {
  align: center;
}

td input[type=checkbox] {
  align: center;
}

/* Excludes the input with id="username" */
input[type="text"]:not([name="username"]):not([name="ufname"]) {
  text-transform:uppercase;
}

input[type=checkbox]:checked {
  width: 20px;
  height: 20px;
}

input[type=radio]:checked {
  width: 20px;
  height: 20px;
}

.menu-btn {
   background-color: #7e32d4;
   color: white;
   padding: 16px;
   font-size: 20px;
   font-weight: bolder;
   font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
   border: none;
}
.dropdown-menu {
   position: relative;
   display: inline-block;
}

.menu-content {
   display: none;
   position: absolute;
   background-color: #017575;
   min-width: 160px;
   z-index: 9999;
}
.links {
   color: rgb(255, 255, 255);
   padding: 12px 16px;
   text-decoration: none;
   display: block;
   font-size: 18px;
   font-weight: bold;
   border-bottom: 1px solid black;
}
.links:hover {
   background-color: rgb(8, 107, 46);
}
.dropdown-menu:hover .menu-content {
   display: block;
}
.dropdown-menu:hover .menu-btn {
   background-color: #3e8e41;
}

.datatbl {
  overflow-x: auto;
  overflow-y: visible;
  table-layout: auto;
  width: 100%;
}

.dropbtn {
  background-color: #4CAF50;
  color: white;
  padding: 10px;
  font-size: 16px;
  border: none;
  margin: 2px;
  border-radius: 8px;
  cursor: pointer;
}

.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: #89c98b;
  color: white;
  min-width: 160px;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
  z-index: 9999;
  border-radius: 8px;      /* round the box itself */
  overflow: hidden;        /* clip child links to that radius */
}

.dropdown-content a {
  color: black;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  border-bottom: #D3D3D3 3px solid;
}

.dropdown-content a:last-child {
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
  border-bottom: none;
}

.dropdown-content a:hover {
  background-color: #ada8a899;
  text-shadow: 1px 1px 2px #555;
}

.dropdown:hover .dropdown-content {
  display: block;
}

.dropdown:hover .dropbtn {
  background-color: #3e8e41;
}

/* Styles for the submenu */
.dropdown-submenu {
  position: relative;
}

.dropdown-subcontent {
  display: none;
  position: absolute;
  left: 100%; /* Positioning to the right of the parent menu */
  top: 0;
  background-color: #f1f1f1;
  min-width: 200px;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
  z-index: 1;
}

.dropdown-submenu:hover .dropdown-subcontent {
  display: block;
}

.qrPageLayout {
  float: left;
  width: 50%;
  padding: 20px;
}

/* For qc image thumbnail */
/* Start */
.img-thumbnail {
  cursor: pointer;
}

.img-toggle {
  display: none;
}

.img-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 9999;
  text-align: center;
}

.img-modal img {
  max-width: 90%;
  max-height: 90%;
  margin-top: 5%;
}

.close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 30px;
  color: white;
  cursor: pointer;
}

.img-toggle:checked + .img-thumbnail + .img-modal {
  display: block;
}

.close:hover {
  color: red;
}

/*.dashboard-container {
  width: 95vw;
  height: 85vh;
  overflow: hidden;
}*/

table.production_display {
  font-size: 6.08vh;
  /*font-size: 3.734em; /* Change the value to your desired font size */
}

.production_display td {
  padding-top: 5px; /* Adjust the top padding */
  padding-bottom: 5px; /* Adjust the bottom padding */
  padding-left: 15px; /* Adjust the left padding */
  padding-right: 15px; /* Adjust the right padding */
}

/* Container for each preview item using CSS Grid */
.file-preview {
  display: grid;
  grid-template-columns: 100px 1fr 80px auto; /* Adjust sizes as needed */
  gap: 10px;
  align-items: center;
  border: 1px solid #ccc;
  padding: 10px;
  margin-bottom: 10px;
  box-sizing: border-box;
}

/* Style the preview image or its placeholder */
.preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.preview-img.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eee;
  color: #666;
  font-size: 0.9em;
}

/* Style the textarea for the description */
.photo-desc {
  width: 100%;
  height: 60px;
  resize: vertical;
}

/* Style the step input */
.step-input {
  width: 70px;
}

/* Style the remove button */
.remove-file {
  padding: 5px 10px;
  cursor: pointer;
}

.form-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.form-grid {
  display: grid;
  row-gap: 1rem;
}

.form-row {
  display: grid;
  grid-template-columns: 150px 200px;
  align-items: center;
  column-gap: 0.5rem;
}

.form-actions {
  display: flex;         /* switch from grid → flex */
  flex-wrap: wrap;       /* allow wrapping when space is tight */
  align-items: center;   /* vertical align if they wrap */
  gap: 0.5rem;           /* space between buttons */
  grid-column: 1 / -1;   /* still span full width of the form */
}

/* Adjust the main Select2 input box (the visible dropdown when not opened) */
.select2-container--default .select2-selection--single {
    height: 21px !important;            /* Sets the overall height of the Select2 input box */
    min-height: 21px !important;        /* Ensures the box doesn't shrink below this height */
    font-size: 13px !important;         /* Font size for the input box (can be adjusted as needed) */
    padding: 0 0px !important;          /* Resets top/bottom/left/right padding */
    display: flex;                      /* Use flex to vertically center content */
    align-items: center;                /* Vertically center the selected value */
    box-sizing: border-box;             /* Ensure padding/border are included in the height */
    padding-right: 20px !important;     /* Make space on the right for the dropdown arrow */
    padding-left: 5px !important;       /* Space between the left edge and text */
}

/* Adjust the selected value's text inside the Select2 box */
.select2-container--default .select2-selection--single .select2-selection__rendered {
    font-size: 14px !important;         /* Font size for selected value text (match or adjust as above) */
    line-height: 21px !important;       /* Vertically centers text within 21px box */
    height: 21px !important;            /* Ensures selected value box matches the input box height */
    display: flex;                      /* Vertically align text */
    align-items: center;                /* Vertically center */
    padding-left: 0 !important;         /* No extra space on the left (already handled by parent) */
    padding-right: 0 !important;        /* No extra space on the right */
    color: #222 !important;           /* Text color for selected value */
}

/* Adjust font size and padding for each dropdown option in the results list */
.select2-container .select2-dropdown .select2-results__option {
    font-size: 14px !important;         /* Font size for dropdown option text */
    padding-top: 3px !important;        /* Top padding for each option for spacing */
    padding-bottom: 3px !important;     /* Bottom padding for each option */
    min-height: 16px !important;        /* Minimum height per option row */
    color: #222 !important;           /* Text color for selected value */
}

/* (Optional) Make sure all parts of Select2 use the same font as the rest of your site */
.select2-container, .select2-dropdown, .select2-results__option, .select2-selection__rendered {
    font-family: inherit !important;    /* Inherit font from parent for consistency */
}

.form-grid-table {
    display: grid;
    grid-template-columns: auto auto;
    grid-gap: 0.3rem;
    /* No border, radius, or background for pure table look */
    padding: 0;
}
.form-grid-row {
    display: contents;
}
.form-grid-cell {
    white-space: normal !important;
    padding: 0.5em 0.4em;
    /* Optional: uncomment next line if you want faint lines between rows */
    /* border-bottom: 1px solid #f2f2f2; */
    /* align-items: center; */
    /* display: flex; */
    /* gap: 0.7em; */
}

/* Viewport-sticky clone for printTable1 only */
.vp-sticky-wrap {
  position: fixed;
  top: 0;                 /* stick to very top of viewport */
  left: 0;
  z-index: 9999;          /* above table body while scrolling */
  pointer-events: none;   /* clicks pass through */
}

.vp-sticky-wrap table {
  border-collapse: collapse;
  width: auto;            /* width set by JS */
  table-layout: fixed;    /* lock column widths */
}

.vp-sticky-wrap th,
.vp-sticky-wrap td {
  border: 1px solid black;  /* match your .reporttbl */
  padding: 3px;
  margin: 0;
  background: #4CAF50;      /* same as your header color */
  color: #fff;
  white-space: nowrap;      /* avoid wrapping header text */
  box-shadow: 0 2px 3px rgba(0,0,0,0.2);
}

/* Hide the cloned header in print */
@media print {
  .vp-sticky-wrap { display: none !important; }
}
/* End */