/* ======================================== */
/*            Global Styles                 */
/* ======================================== */

/* Disable iOS auto-linked phone numbers */
a[x-apple-data-detectors] {
  all: unset !important;
  color: inherit !important;
  text-decoration: none !important;
  pointer-events: none !important;
  cursor: default !important;
}


@media print {
  /* Hide headers, toolbars, and footers */
  .header,
  .toolbar,
  .footer,
  .no-print {
    display: none !important;
  }
}

html {
  font-size: 75%;
}

body {
  min-width: 500px;
  margin: 0;
  overflow-x: auto;
  padding: 0px;
  background-color: #171717;
  color: #ddd;
  font-family: Roboto Arial, sans-serif;
  display: flex;
  flex-direction: column;
  /* justify-content: center; */
  justify-content: flex-start;
  align-items: center;
  font-size: 0.9rem;
}

html, body {
  height: 100%;
  overflow-x: hidden;              /* prevent sideways page scroll */
  overflow-y: auto;                /* allow vertical page scroll */
  -webkit-overflow-scrolling: touch; /* smooth on iOS/Safari */
}

main {
  flex: 1; /* Allows main content to expand */
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* Ensures content starts at the top */
  align-items: center;
  width: 100%;
  padding: 5px;
  text-align: center;
}

/* ======================================== */
/*            Header user Styling           */
/* ======================================== */

.header-user {
  float: right;
  font-size: .7em;
  color: #afafaf;
  margin-left: auto;
  padding-left: 20px;
}

/* ======================================== */
/*            Footer Styling                */
/* ======================================== */

/* footer {
  background-color: #03183f;
  color: #afafaf;
  text-align: center !important;
  padding: 2px 0;
  width: 100%;
  position: fixed;
  bottom: 0;
  font-size: 0.65rem;
} */


footer {
  background-color: #03183f;
  color: #afafaf;
  text-align: center !important;
  padding: 1px 0;        /* was 2px 0 */
  width: 100%;
  position: fixed;
  bottom: 0;
  font-size: 0.6rem;     /* slightly smaller text if you like */
  line-height: .5;      /* keeps it from growing vertically */
}

@media print {
  footer {
    display: none !important;
  }
}

/* ======================================== */
/*            Headings                      */
/* ======================================== */

h1,
h2,
h3,
h4 {
  font-size: 1.1rem; /* Slightly larger for better readability */
  margin: 5px 0 5px 0; /* Top margin 0, bottom margin for spacing */
  padding: 3px;
  text-align: center;
  font-weight: bold; /* Ensure strong headings */
}

h2 {
  font-size: 1.2rem;
  color: #ccc;
}

h3 {
  font-size: 1rem;
  color: #b8fec0;
}

h4 {
  font-size: 1.1rem;
  /* color: #ffffff; */
  /* color: #b8fec0; */
  color: #a0bdfc;
  margin-top: 25px;
}

h5 {
  font-size: 0.9rem;
  color: #4a5877;
  margin: 5px;
  padding: 1px;
}


/* ======================================== */
/*            Form Styling                  */
/* ======================================== */

.form-container {
  width: 100%;
  max-width: 660px;
  overflow: hidden;
  padding: 2px;
  box-sizing: border-box;
}

form label {
  font-size: 1rem;
  font-weight: 500;
  margin-top: 5px;
}

form {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: #252934;
  padding: 5px;
  border-radius: 10px;
  /* box-shadow: 0 0 10px rgba(0, 0, 0, 0.7); */
  /* width: 100%; */
  max-width: 600px;
}

/* Input Fields - Default Styling */
input[type='text'],
input[type='password'] {
  width: 180px; /* Fixed width */
  padding: 5px;
  margin: 2px 0;
  /* border: 1px solid #aeaeae; */
  border: 1px solid #171717;
  border-radius: 14px;
  background-color: #748198;
  color: #000000;
  font-size: 1.2rem;
  transition: background-color 0.3s ease-in-out; /* Smooth transition */
}

/* Input Focus - Ensure Background Changes */
input[type='text']:focus,
input[type='password']:focus {
  outline: none;
  border-color: #2196f3 !important;
  background-color: #cdcdcd !important;
  color: #000000 !important;
}

/* Apply styles to both <button> and <a class="button"> */
/* Shared button look */
button,
a.button,
a.button-cancel {
  background-color: #415c97;
  color: #ddd;
  font-size: 1rem;
  border: none;
  margin-top: 5px;
  margin-bottom: 10px;
  padding: 4px 8px;
  border-radius:999px;
  cursor: pointer;
  transition: background-color 0.1s;
  width: 100%;
  max-width: 120px;
  text-decoration: none;
  text-align: center;
  display: inline-block;
}

/* Hover for normal buttons */
button:hover,
a.button:hover {
  background-color: #5a82da;
}

/* Cancel overrides (only differences) */
a.button-cancel {
  background-color: #666;
  color: #ddd;
}

a.button-cancel:hover {
  background-color: #777;
}


/* ======================================== */
/*            Header Navigation             */
/* ======================================== */

.header-bar {
  position: sticky;
  /* position: fixed; */
  top: 0;
  width: 100%;
  background-color: #03183f;
  padding: 6px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

@media print {
  .header-bar {
    display: none !important;
  }
}


/* Left Section - Qvis logo */
.header-left .logo {
  font-family: 'Roboto', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  color: #bbb;
  margin-right: 15px;
  display: inline-block;
  padding-left: 10px;
  transition: color 0.2s ease-in-out;
}

.header-left .logo:hover {
  color: #ffffff;
}

/* Center Section */
.header-center {
  flex-grow: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Right Section - Logout Button */
.header-right {
  flex: 0 1 auto;
  white-space: nowrap;
  padding-right: 10px; /* Pushes logout button away from the right edge */
}


.menu {
  display: flex;
  gap: 3px; /* Controls spacing between buttons */
}

/* Menu Buttons */
.menu-btn {
  font-family: 'Roboto', sans-serif;
  padding: 2px 6px;
  background-color: #49639c;
  color: #03183f;
  /* color: #d5d4d4; */
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 99px;
  cursor: pointer;
  font-size: .9rem;
  transition: background-color 0.2s;
  white-space: nowrap;
  line-height: 1.1;
}

.menu-btn:hover {
  /* background-color: #5b7cc3; */
  /* background-color: #82b4ff; */
  background-color: #91db9c;
  /* background-color: #80a8ec; */
  /* background-color: #cdcbcb; */
  color: #000000;
  border: 1px solid;
  /* font-weight: 500; */
  /* border: 2px solid #000000; */
  /* transform: scale(.85); */
}

/* Right-Aligned Logout */
.menu-right {
  flex: 0 0 auto;
  padding-right: 10px;
  margin-left: 20px;
}


@media print {
  .menu {
    display: none !important;
  }
}


/* Logout Button */
.logout-btn {
  background-color: #748198 !important;
  color: #03183f;
  padding: 3px 8px;
  border: 1px solid;
  border-radius: 99px;
  font-size: 0.9rem;
  margin-left: 15px; /* Ensures spacing from menu */
}

.logout-btn:hover {
  background-color: #ccc !important;
  /* color: #ffffff; */
}

/* ======================================== */
/*            Responsive Layout             */
/* ======================================== */

@media (max-width: 768px) {
  .header-bar {
    flex-direction: column;
    padding: 10px;
    gap: 10px;
  }

  .menu {
    flex-direction: column;
    width: 100%;
    align-items: center;
    gap: 10px;
  }

  .menu-btn {
    width: 100%;
    text-align: center;
  }

  .menu-right {
    padding-right: 0;
  }

  .header-left {
    padding-left: 0;
  }
}

/* Global Table Styling for Dark Background */
.table-container {
  margin: 10px;
  max-width: 99%;
  overflow-x: auto;
  display: block;
  border-radius: 10px;
  padding: 5px;
  /* background-color: #1f232a; */
  background-color: #171717;
}

table {
  /* width: min-content; */
  /* margin: auto;   */
  /* /* width: 100%; */
  min-width: 620px;
  /* margin-bottom: 1rem; */
  border-collapse: collapse;
  font-family: Arial, sans-serif;
  font-size: 1.1rem;
  /* background-color: #000000;  */
  color: #bbb; /* Light text for readability */
}

th,
td {
  padding: 5px;
  /* border: 1px solid #1a1a1a; */
  /* border: 1px solid #ffffff; */
  border-collapse: collapse;
  /* text-align: left; */
  white-space: nowrap;
}

th {
  background-color: #1f3255; /* Slightly lighter than table background */
  color: #ababab;
  font-size: 1rem;
  font-weight: lighter;
  /* text-transform: capitalize; */
}

tr:nth-child(odd) {
  /* background-color: #272b33;  */
  /* background-color: #20242d;  */
  background-color: #262c36;
}

tr:nth-child(even) {
  background-color: #20242d; /* Match table background */
}

tr:hover {
  background-color: #343844; /* Slightly lighter gray on hover */
  color: #b8fec0;
}

td:first-child {
  /* color: #a0bdfc; */
  /* color: #5777bd; */
  /* color: #758bb9; */
  color: #a0bdfc;
  /* color: #39df01; */
  /* font-weight: bold !important; */
  /* color: #668ada; */
}

tr:hover td {
  background-color: #373b47;
  color: #affcb8;
}

/*  Base Error Container Styles */
.error-container {
  background: #dce1e6;
  color: #333;
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  max-width: 400px;
  margin: 50px auto;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  animation: fadeIn 0.5s ease-in-out;
}

/*  Error Icons (Different per page) */
.error-icon {
  font-size: 50px;
  margin-bottom: 10px;
  animation: shake 0.5s ease-in-out infinite alternate;
}

/*  Fade-In Effect */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/*  Shake Effect for Icons */
@keyframes shake {
  from {
    transform: translateX(-5px);
  }
  to {
    transform: translateX(5px);
  }
}

/*  Custom Styles for Each Error Page */
.error-401 {
  border-left: 5px solid #dc3545; /* Red border for Unauthorized */
}

.error-403 {
  border-left: 5px solid #ff9800; /* Orange border for Forbidden */
}

.error-404 {
  border-left: 5px solid #007bff; /* Blue border for Not Found */
}

/*  Buttons with Different Colors */
.error-container .button {
  padding: 8px 18px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  display: inline-block;
  transition: background-color 0.2s ease-in-out;
}

/*  Unique Button Colors per Error Type */
.error-401 .button {
  background-color: #dc3545;
}

.error-403 .button {
  background-color: #ff9800;
}

.error-404 .button {
  background-color: #007bff;
}

/*  Hover Effects */
.error-401 .button:hover {
  background-color: #b02a37;
}

.error-403 .button:hover {
  background-color: #e68900;
}

.error-404 .button:hover {
  background-color: #0056b3;
}

/*  Base Flash Message Styles */
.flash-message {
  width: 100%;
  max-width: 300px;
  font-size: 0.9rem;
  padding: 3px 10px;
  margin: 3px;
  border-radius: 10px;
  font-weight: bold;
  text-align: center;
  border: 1px solid;
  transition: opacity 1.5s ease-out, transform 1.5s ease-out;
}

/*  Success Message */
.flash-message.success {
  background-color: #b1ffa0;
  color: #00410f;
  border-color: #00410f;
}

/*  Error Message */
.flash-message.error {
  /* background-color: #ffffff; */
  background-color: #fad4d8; /* Light red */
  color: #721c24; /* Dark red */
  border-color: #7d0000;
}

/*  Info Message */
.flash-message.info {
  background-color: #d1ecf1; /* Light blue */
  color: #0c5460; /* Dark blue */
  border-color: #bee5eb;
}

.success-msg {
  padding: 5px;
  background-color: #8fc88f;
  color: rgb(0, 79, 0);
  border-radius: 10px;
  margin-bottom: 1em;
  border: 1px solid rgb(0, 79, 0);
}

.error-msg {
  padding: 3px;
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  border-radius: 5px;
  margin-bottom: 1em;
}

.edit-icon,
.view-icon,
.tool-icon {
  /* color: #007bff; */
  color: #5777bd;
  /* font-size: 16px; */
  font-size: 1.35rem;
  text-decoration: none;
  transition: color 50ms;
  margin: 0 5px;
}

.edit-icon:hover,
.view-icon:hover,
.tool-icon:hover {
  color: #6cf926;
}

.view-icon {
  font-size: 1.1rem;
}

/* ======================================== */
/* Well Form Container */

.well-form {
  max-width: 650px;
  width: 100%;
  margin: 8px auto;
  padding: 6px;
  background-color: #373b47;
  border-radius: 18px;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Well Form Table */
.well-form table {
  table-layout: fixed;
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 12px;
  overflow: hidden;

}

/* Label Column */
.well-table td.label-cell {
  width: 30%;
  text-align: right;
  font-weight: normal;
  padding-right: 10px;
  /* white-space: nowrap; */
  /* color: #968260 !important; */
  /* background-color: #232933; */
}

/* Force label font size  */
.well-table td.label-cell label {
  font-size: 1.1rem !important;
  /* color: #a32e2e !important; */
}

/* Input Column */
.well-table td.input-cell {
  width: 70%;
  text-align: left;
  /* background-color: #232933; */
  border: none;
  border-radius: 0px;
}

/* Inputs, Selects, and Textareas */
.well-table input,
.well-table select,
.well-table textarea {
  width: 100%; /*  Makes inputs stretch */
  padding: 4px;
  font-size: 1.1rem !important;
  /* background: #1a1a1a; */
  /* background: #252525; */
  background: #13161b;
  color: #ccc;
  /* border: 1px solid #171717; */
  border: none;
  border-radius: 5px;
  box-sizing: border-box;
}

/*  Fixes checkboxes */
.well-table input[type='checkbox'] {
  width: auto;
  transform: scale(1.2);
}

/* .button-cancel {
  background-color: #757575;
  color: black;
  border: none;
  padding: 7px 15px;
  margin-left: 10px;
  cursor: pointer;
  transition: backg 0.3s ease;
}

.button-cancel:hover {
  background-color: #a1a0a0;
} */

.scrollable-container {
  overflow-x: auto; /* Enables horizontal scrolling */
  border-radius: 8px; /* Rounds the corners */
  padding: 10px; /* Adds padding inside the box */
  background-color: #f8f9fa; /* Light background (optional) */
  border: 1px solid #ccc; /* Light border for structure */
}

.scrollable-container table {
  border-collapse: collapse;
  width: 100%;
}

.scrollable-container th,
.scrollable-container td {
  padding: 8px; /* Padding for table cells */
  border: 1px solid #ddd; /* Light table borders */
}

.scrollable-container::-webkit-scrollbar {
  height: 8px; /* Makes scrollbar smaller */
}

.scrollable-container::-webkit-scrollbar-thumb {
  background: #888; /* Scrollbar color */
  border-radius: 8px; /* Rounds the scrollbar edges */
}

.scrollable-container::-webkit-scrollbar-thumb:hover {
  background: #555; /* Darker on hover */
}

#survey-form {
  width: 98%;
  display: flex;
  justify-content: center; /* Center the table */
}

#survey-form table {
  width: 100%; /* Ensures it doesn't overflow */
  table-layout: fixed; /* Prevents stretching */
  border-collapse: collapse;
  margin: 10px;
  font-size: 0.9rem;
}

#survey-form th,
#survey-form td {
  padding: 3px;
  text-align: right;
  white-space: normal; /* Allow text wrapping */
}

/* Reduce input size */
#survey-form input {
  width: 80px; /* Set a fixed width */
  max-width: 90%;
  text-align: center;
}

/* Ensure the button fits properly */
#survey-form button {
  width: auto;
  padding: 5px 8px;
  font-size: 0.9rem;
  white-space: nowrap; /* Prevents text from wrapping */
}

#bulk-input {
  width: 99%; /* Expands to form width */
  min-height: 200px; /* Taller for better visibility */
  font-family: monospace; /* Aligns columns properly */
  white-space: pre; /* Prevents text from wrapping */
  overflow-x: auto; /* Enables horizontal scrolling */
  resize: vertical; /* Allows user to expand textarea */
  padding: 5px;
  border: 1px solid #828282;
  background-color: #303030;
  color: rgb(232, 232, 232) !important;
}

.well-table td {
  padding: 2px 6px;
}

.well-table input,
.well-table textarea {
  padding: 5px 6px;
  font-size: 1.05rem;
}

.subheading {
  font-size: 1.0rem;
  font-weight: 400;
  margin-left: 0.5em;
  color: #aaa;
}

.subheading-2 {
  font-size: 0.85rem;
  font-weight: 300;
  margin-left: 0.5em;
  color: #777;
}


.table-scroll-container {
  max-width: 1050px;
  max-height: calc(100vh - 160px);
  /* max-height: 85vh; */
  overflow-y: auto;
  border-radius: 10px;
  border: 1px solid #373b47;
  background: #171717;
  padding-bottom: 8px;
  box-sizing: border-box;
  overflow-clip-margin: content-box;
  -webkit-overflow-scrolling: touch;
  pointer-events: auto;
  flex-shrink: 1;
  min-height: 0;
}

.table-survey {
  table-layout: fixed;
  /* table-layout: auto; */
  width: 725px;
  border-collapse: collapse;
  font-size: 1.1rem;
  margin-top: 1em;
  text-align: right;
}

.table-survey th {
  position: sticky;
  top: 0;
  background: #171717;
  z-index: 2;
  text-align: right;
  font-weight: 600;
  padding: 6px 13px;
  padding-right: 20px;
}

.table-survey td {
  text-align: right;
  font-size: 1rem;
  font-weight: 300;
  padding: 3px 10px;
  padding-right: 20px;
}

.spaced-list {
  line-height: 1.6;
  margin-bottom: 1em;
  margin-top: 1em;
  color: #ccc;
}

.dls-warning {
  /* background-color: #ffe6f0;  */
  color: #d39c59;
}

.dls-danger {
  /* background-color: #ffc6c6;  */
  color: #dc3545;
}

td.wellview-label {
  width: 160px;
  padding: 6px 10px;
  vertical-align: top;
  white-space: nowrap;
  text-align: right;
  color: #a0bdfc;
}


.wellview-value,
.wellview-value-bold {
  padding: 6px 10px;
  text-align: left;
  font-size: 1.2rem;
  color: #bbb;
  white-space: normal;
  overflow-wrap: break-word;
}

.wellview-value-bold {
  font-weight: 900;
  font-size: 1.4rem;
  color: #ddd;
}



.wellview-value-comment {
  font-size: 0.85em;
  line-height: 1.2em;
  min-height: 3.6em; /* 3 lines x 1.2em */
  white-space: normal;
  overflow-wrap: break-word;
}

.active-icon {
  color: goldenrod;
  font-size: 1.1em;
}

#no-data-msg {
  font-size: 1.1em;
  text-align: center;
  color: #6a6a6a;
  padding: 0.3em 1em;
  background: #b4acac;
  border: 1px solid #000000;
  border-radius: 20px;
  width: 320px;
  margin: 4em auto;
  z-index: 9999;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* #no-data-msg {
    display: none;
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 1em 2em;
    border: 1px solid #ccc;
    border-radius: 8px;
    z-index: 1000;
    font-weight: bold;
    font-size: 1.2em;
    color: #b30000;
    text-align: center;
} */

.xplot-container {
  width: 95vw;
  aspect-ratio: 2.5 / 1;
  max-width: 3200px;
  max-height: 1280px;
  min-width: 800px;
  margin: 10px auto 10px auto;
  border: 1px solid #000000;
  border-radius: 12px;
  box-shadow: 4px 4px 10px rgba(2, 2, 86, 0.5);
  overflow: hidden;
  background: #eee;
  padding-top: 0em;
}

.plot3d-container {
  width: 95vw;
  aspect-ratio: 1.2 / 1;
  max-width: 1400px;
  max-height: 850px;
  min-width: 800px;
  margin: auto;
  border: 1px solid #000000;
  border-radius: 12px;
  box-shadow: 4px 4px 10px rgba(2, 2, 86, 0.5);
  overflow: hidden;
  background: #e4e7ec;
  padding-top: 2em;
}

.plot3d-wrapper {
  position: relative;
}

@media (max-width: 600px) {
  .echart-container {
    width: 100vw;
    aspect-ratio: 2 / 1;
  }
}

#chart-wrapper {
  padding-top: 0em;
}

.plot3d-header
a {
  text-align: left;
  font-size: 1.3rem;
}

.d3plot-header
a {
  text-align: left;
  font-size: 1.3rem;
}

input[type='date'] {
  background-color: #1e1e1e; /* dark input */
  color: #ffffff; /* white text */
  padding-right: 2.5rem; /* leave room for the icon */
  position: relative;
}

input[type='date']::-webkit-calendar-picker-indicator {
  filter: invert(1); /* inverts icon color */
  opacity: 0.7;
  cursor: pointer;
}

.back-link {
  float: left;
  margin-right: 30px;
}

.nav-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px; /* space between previous and next buttons */
  margin: 5px 5px;
}

/*
  IMPORTANT:
  - Keep the little prev/next icon links styled here.
  - Do NOT override your global `.button` styles when the edit link uses `class="button"`.
*/
.nav-buttons a:not(.button):not(.button-cancel),
.nav-buttons span {
  color: #ddd;
  text-decoration: none;
  font-size: 1rem;
  display: flex;
  align-items: center;
  padding: 2px 10px;
  border: 1px solid transparent;
  border-radius: 5px;
  transition: background-color 0.2s ease;
}

.nav-buttons a:not(.button):not(.button-cancel):hover {
  background-color: rgba(75, 82, 98, 0.803);
}

/* Make the edit link look like your normal button inside the nav strip */
.nav-buttons a.button,
.nav-buttons a.button-cancel {
  width: auto;
  max-width: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  line-height: 1;
}

.nav-buttons i {
  margin: 2 3px;
  font-size: 1.2rem;
}



input[type='file'] {
  min-width: 100%;
}

.spaced-form label,
.spaced-form select,
.spaced-form input,
.spaced-form button {
  /* margin-bottom: 0.5em;  */
  align-content: left;
  margin-left: 75px;
}

.spaced-form {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.2em;
  width: 100%;
}

.very-small-note {
  font-size: 0.75em;
  color: #666;
  line-height: 1;
}

.very-small-note {
  font-size: 0.75em;
  color: #666;
  line-height: 1;
}



.unit {
  font-size: 0.75em;
  color: #ccc;
  margin-left: 2px;
}

.table-scroll-container::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.table-scroll-container::-webkit-scrollbar-track {
  background: transparent;
}

.table-scroll-container::-webkit-scrollbar-thumb {
  background-color: rgba(85, 85, 85, 0.4); /* always faintly visible */
  border-radius: 3px;
}

.table-scroll-container:hover::-webkit-scrollbar-thumb {
  background-color: rgba(85, 85, 85, 0.7); /* darker on hover */
}

.table-tops-container {
  margin: 0px auto;
  max-width: 1100px;
  padding: 5px;
  border-radius: 10px;
  /* box-shadow: 0 0 8px rgba(0, 0, 0, 0.1); */
}

.table-tops {
  margin: 0 auto; /* Center the table */
  table-layout: fixed;
  width: auto;
  min-width: 700px;
  border-collapse: collapse;
  font-size: 1.1rem;
}

.table-tops-edit {
  margin: 0 auto; /* Center the table */
  table-layout: fixed;
  width: 90%;
  min-width: 700px;
  border-collapse: collapse;
  font-size: 1.1rem;
}

.prog-column {
  width: 75px;
}

.actual-column {
  width: 75px;
}

.notes-column {
  width: 75px;
}

.table-tops td.fm-notes {
  text-align: left;
  font-weight: normal;
  font-size: 0.7em;
  font-style: italic;
}

td.prog-value {
  color: #666;
  font-weight: 400;
  font-style: italic;
  opacity: 0.85;
  font-size: .9em;
}

.table-tops th,
.table-tops td {
  padding: 4px 3px;
  text-align: right;
}

.table-tops-edit th,
.table-tops-edit td {
  padding: 1px 2px;
  text-align: right;
  padding-right: 5px;
}

.table-tops-edit th {
  padding: 5px 2px;
}


.table-tops-edit input[name^="prog_"] {
  background-color: #888;
  color: #222;
  font-style: italic;
  opacity: 0.9;
  font-weight: normal;
  border: none;
  font-size: 1em;
}

.table-tops-edit input[name^="notes_"] {
  font-size: 0.85rem;
  font-weight: normal;
  font-style: italic;
  text-align: left;
  padding: 5.5px;
  padding-right: 0px;
}

.table-tops-edit td.column-formation {
  font-weight: bold;
  text-align: right;
  min-width: 175px;
  max-width: 250px;
  white-space: normal;
  word-wrap: break-word;
}

.table-tops-edit td.fm-notes {
  text-align: left;
  font-weight: normal;
  font-size: 0.85em;
  font-style: italic;
}

.table-tops-edit input {
  background: #8c96a4;
}

.table-tops input {
  background: #8c96a4;
  /* background: transparent; */
}

.table-tops th {
  font-size: 0.85em;
  position: sticky;
  top: 0;
  background: #171717;
  z-index: 2;
  text-align: center;
  font-weight: 100;
  padding: 6px 2px;
}


.table-tops td.column-formation,
th.column-formation {
  text-align: right;
  min-width: 200px;
  max-width: 255px;
  white-space: normal;
  word-wrap: break-word;
  /* font-weight: bold; */
  /* font-size: .9rem; */
}

.table-tops input[name^="prog_"] {
  background-color: #888;
  color: #222;
  font-style: italic;
  opacity: 0.9;
  font-weight: normal;
  /* border: 1px solid #555; */
  border: none;
}

.table-tops input[name^="notes_"] {
  font-size: 0.95rem;
  font-weight: normal;
  font-style: italic;
  text-align: left;
}


.actual-value {
  color: #ccc;
}

.iso-value {
  color: #89a;
  font-size: 1rem;
  /* font-style: italic; */
}

td.column-formation {
  color: #a0bdfc;
  font-weight: 550 !important;
}


.variance-positive {
  color: rgb(207, 105, 93);
}

.variance-negative {
  color: rgb(37, 132, 180);
}

.variance-large {
  /* text-decoration: underline; */
  background-color: rgba(255, 0, 0, 0.152); /* light red tint */
  font-weight: 700;
}

.form-success {
  font-size: 0.9em;
  color: #67a35c;
  padding: 5px;
}

/* Make input fields look like part of the table */
.input-cell {
  width: 100%;
  text-align: center;
  padding: 2px px;
  font-size: 1.1em;
  font-weight: 700;
  font-family: inherit;
  /* border: 1px solid rgba(23, 30, 39, 0.933);  */
  border: none;
  border-radius: 4px;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
  transition: background-color 0.2s ease;

}

.fminput-cell {
  width: 100%;
  min-width: 55px;
  text-align: right;
  padding: 3px 3px;
  font-size: 1.1em;
  font-weight: 700;
  font-family: inherit;
  border: none;
  border-radius: 0px;
  background-color: #2b2f38;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
  transition: background-color 0.2s ease;
}

.fminput-cell:focus {
  background-color: #bfc5c8;
  outline: none;
  border-color: #7eade3;
}

/* On focus, soften the highlight */
.input-cell:focus {
  background-color: #bfc5c8;
  outline: none;
  border-color: #7eade3;
}

/* Match table spacing */
.table-tops td input {
  margin: 0;
  box-sizing: border-box;
}

/* Optional: style read-only values like SS to match */
.readonly {
  display: inline-block;
  padding: 3px 3px;
  font-size: 0.95em;
  color: #a3a1a1;
}

.success-message {
  background-color: #3a3;
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  margin-bottom: 12px;
  font-weight: bold;
}

/* button.toolbar, a.toolbar {
  background-color: #063e88;
  color: #ccc;
  border:none;
  padding: 4px 8px;
  margin: 2px;
  width: auto;
  border-radius: 4px;
  line-height: 1;
  font-size: 11px;
  font-family: 'Segoe UI', sans-serif;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  gap: 4px;
  box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
}

button.toolbar:hover {
  background-color: #91db9c;
  color: #000;
} */


button.toolbar,
a.toolbar {
  background-color: #063e88;
  color: #ccc;
  border: none;
  padding: 3px 7px;
  margin: 2px;
  width: auto;
  border-radius: 4px;
  line-height: 1;
  font-size: 11px;
  font-family: 'Segoe UI', sans-serif;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  gap: 4px;
  box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
  text-decoration: none;
}

button.toolbar:hover,
a.toolbar:hover {
  background-color: #91db9c;
  color: #000;
  text-decoration: none;
}

.chart-toolbar {
  text-align: center;
  margin: 0px;
  color: #ccc;
  font-size: 11px;
  display: flex;
  flex-wrap: wrap;
  justify-content: right;
  gap: 12px;
  align-items: center;
}

.d3chart-toolbar {
  text-align: center;
  margin: 0px;
  color: #444;
  font-size: 11px;
  display: flex;
  flex-wrap: wrap;
  justify-content: right;
  gap: 12px;
  align-items: center;
  vertical-align: middle;
}

#bulk-paste {
  width: 85%;
  min-height: 200px;
  font-family: monospace;
  font-size: 12px;
  white-space: pre;
  overflow-x: auto;
  resize: vertical;
  padding: 25px;
  border: 1px solid #303030;
  background-color: #202020;
  color: rgb(30, 188, 106);
  border-radius: 7px;    /* try 4–12px to taste */
}

.fm-form {
  width: 100%;
  max-width: 1100px;
  padding: 0;
  margin: 0 auto;
  display: block;
  background: none;
}

.readonly-field {
  background-color: #1e1e1e;
  color: #000000;
  border: none;
  pointer-events: none;
  font-weight: normal;
  padding: 3px 3px;
  font-size: 1.1em;
  font-family: inherit;
  height: 100%;
  border-radius: 0px;
  box-sizing: border-box;
  font-style: italic;
  text-align: right;
}
/*  */

/* Contact Picker Modal Box and Table styling */
#contactPicker {
  display: none;
  position: absolute;
  background: white;
  padding: 5px;
  border: 1px solid #999;
  border-radius: 6px;
  font-size: 10px;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
  z-index: 2000;
  color: #111;
  text-align: right;
  line-height: 1.4;
}

#contactPicker .close-x {
  text-align: right;
  font-size: 12px;
  color: rgb(173, 0, 0);
  cursor: pointer;
  margin-bottom: 2px;
  line-height: 1;
}

#contactPicker .close-x:hover {
  color: #e00;
}

#contactPicker strong {
  font-weight: bold;
  color: #000;
}

#contactPicker span {
  font-weight: 500;
  color: #003366;
}

#contactPicker button {
  font-size: 9px;
  padding: 2px;
  border-radius: 3px;
  margin-bottom: 0;
}

#contactPanel {
  position: fixed;
  top: 75px;
  right:25%;
  cursor: default;
  /* transform: translateX(-50%); */
  background: #fff;
  padding: 5px;
  border: 1px solid #999;
  border-radius: 6px;
  width: 225px;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  overflow-y: auto;
  /* max-height:200px; */
  max-height:fit-content;
  color: #222;
  resize: vertical;
  overflow: auto;
}


#contactPanel .contact-table {
  all: unset;
  display: table;
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  border-spacing: 0;
  background: #fff;
  font-size: 11px;
  color: #111;
  margin: 0 auto;
}

#contactPanel .contact-table th,
#contactPanel .contact-table td {
  all: unset;
  display: table-cell;
  font-size: 10px;
  padding: 0px 2px;
  max-width: 55px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-bottom: 0.5px solid #ddd;
  background: #fff;
  color: #111;
  text-align: center;
  height: 16px;
  line-height: 1.1;
  vertical-align: middle;
}

.picks-table-container {
  max-height: 800px;     /* Adjust as needed */
  overflow-y: auto;
  border-top: 1px solid #ccc;
  position: relative;
}

.contact-table thead th {
  position: sticky;
  top: 0;
  background-color: #f9f9f9; /* Same as your page background */
  z-index: 5;
  text-align: center;
  font-weight: bold;
  border-bottom: 1px solid #ccc;

}

#contactPanel .contact-table tr:nth-child(even) td {
  background-color: #ffffff !important;
}

#contactPanel .contact-table tr:nth-child(odd) td {
  background-color:  #f9f9f9 !important;
}

#contactPanel .contact-table tr:hover td {
  background-color: #ecf1fd !important;
  color: #111;
}

#contactPanel .submit-all button {
  font-size: 10px;
  padding: 3px 2px;
  background-color: #67a35c;
  color: white;
  border: none;
  border-radius: 3px;
}

#contactPanel td button {
  font-size: 10px;
  padding: 0px 2px;
  background-color: rgb(217, 39, 39);
  color: #fff;
  border: none;
  border-radius: 3px;
  max-width: 30px;
  vertical-align: middle !important;
}

/* Custom hover styles for contactPanel buttons */
#contactPanel .submit-all button:hover {
  background-color: #7cc46f; /* lighter green on hover */
}

#contactPanel td button:hover {
  background-color: rgb(255, 69, 69); /* lighter red on hover */
}

#contactPanel .contact-table tr {
  height: 14px !important;
}

#contactPanel.loading .picks-table-container {
  opacity: 0;
  pointer-events: none;
}

#contactPanel .picks-table-container {
  transition: opacity 0.3s ease;
  opacity: 1;
}

#contactPanel input {
  border: none;
  background-color: transparent;
  box-shadow: none;
  outline: none;
  text-align: right;
  font-size: 10.5px;
}

#contactPanel input:focus {
  background-color: #ffffd4;  /* soft yellow highlight */
  border: 1px solid #ccc;
  /* box-shadow: 0 0 3px #999; */
  outline: none;  /* ensures default blue outline doesn't conflict */
}

.small-input {
  width: 45px;
  font-size: 11px;
  font-weight: 550;
  padding: 2px;
  text-align:center;
  vertical-align: bottom;
  border: none;
  background-color: #fff;
  color: #338;
  outline: none;
}

.download-button {
  background: none;
  border: none;
  padding: 2px 2px;
  font-size: 14px;
  cursor: pointer;
  color: #888;
  width: 35px;
  border-radius: 5px;
}

.download-button:hover {
  color: #0065ca;
  background: rgb(214, 217, 234);
}

/* Copy to clipboard success message */
.copy-success {
  background-color: #4CAF50 !important; /* Green */
  color: white !important;
  transition: background-color 0.8s ease;
}

#contactPanel .contact-table tr.unsaved td {
  background-color: #fdfbbb !important;
  color: #0044aa !important;
  font-style: italic !important;
  font-weight: bold !important;
  font-size: 11px;
}

.switch {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 5px;
}

.switch input {
  display: none;
}

.slider {
  position: relative;
  width: 30px;
  height: 15px;
  background-color: #ccc;
  border-radius: 18px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.slider::before {
  content: "";
  position: absolute;
  width: 11px;
  height: 11px;
  left: 2px;
  top: 2px;
  background-color: rgb(255, 255, 255);
  border-radius: 50%;
  transition: transform 0.2s;
}

input:checked + .slider {
  background-color: #5777bd;
}

input:checked + .slider::before {
  transform: translateX(18px);
}

.label-text {
  font-size: 10.5px;
  color: #333;
}

.not-baytex {
  background-color: #fffae6; /* light yellow or any highlight */
  color: #7b5d5d !important;            /* darker text for contrast */
}


.success-msg .success-sub {
  margin-top: 4px;
  font-size: 0.92rem;
  opacity: 0.9;
}


/* make bullets align neatly at the left edge */
ul.note-box {
  list-style: disc;
  list-style-position: outside; /* bullets outside, classic look */
  margin: 8px 0 0 0;            /* no weird left margin */
  padding-left: 1.25rem;        /* standard bullet indent */
  text-align: left;             /* just in case a parent centered it */
}

ul.note-box li {
  margin: 4px 0;
  padding: 0;
  text-indent: 0;
}

