/*
 * GSE Intranet stylesheet
 *
 * Contains all base, intranet-specific and corporate override rules
 * required by the intranet.
 */

/* ================================================================
 * Base rules
 * ================================================================ */

#header {
  position: relative;
  width: 100%;
  height: 100px;
  background-color: #333333;
  margin: 0 auto 0 auto;
  padding: 0;
}

head,
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0px auto;
  color: #505050;
  overflow-y: auto;
}

footer {
  position: absolute;
  left: 0;
  bottom: 0;
  text-align: center;
  padding: 0px;
  background-color: #00487d;
}

h2 {
  margin: 20px;
  color: #00487d;
  font-weight: inherit;
  background-color: white;
}

a {
  text-decoration: none;
  color: #00487d;
}

button {
  background-color: #00487d;
  color: white;
  padding: 14px 20px;
  margin: 8px 0;
  border: none;
  cursor: pointer;
}

button:hover {
  opacity: 0.8;
}

table {
  font-size: 12px;
  color: #00487d;
  background-color: inherit;
}

input {
  color: #00487d;
  background-color: white;
  width: 350px;
  height: 20px;
  font-size: 12px;
}

textarea {
  margin-left: 35px;
  margin-right: 35px;
  margin-bottom: 35px;
  width: 350px;
  resize: vertical;
  color: #00487d;
  background-color: white;
}


/* Add a black background color to the top navigation */

.subtitle {
  font-size: 110%;
}

.topnav {
  background-color: #00487d;
  overflow: hidden;
  width: 100%;
}


/* Style the links inside the navigation bar */

.topnav a {
  float: left;
  display: block;
  color: #f2f2f2;
  text-align: center;
  padding: 14px 16px;
  text-decoration: none;
  font-size: 17px;
  height: 20px;
}


/* Hide the link that should open and close the topnav on small screens */

.topnav .icon {
  display: none;
}


/* Dropdown container - needed to position the dropdown content */

.dropdown {
  float: left;
  overflow: hidden;
}


/* Style the dropdown button to fit inside the topnav */

.dropdown .dropbtn {
  font-size: 19px;
  border: none;
  outline: none;
  color: white;
  padding: 14px 16px;
  background-color: inherit;
  font-family: inherit;
  margin: 0;
  min-width: 180px;
  height: 50px;
  text-align: center;
}


/* Style the dropdown content (hidden by default) */

.dropdown-content {
  display: none;
  position: absolute;
  color: #eee;
  background-color: #0066b3;
  min-width: 180px;
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
  z-index: 1;
}


/* Style the links inside the dropdown */

.dropdown-content a {
  float: none;
  color: white;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  text-align: center;
}


/* Add a dark background on topnav links and the dropdown button on hover */

.topnav a:hover,
.dropdown:hover .dropbtn {
  background-color: #00487d;
  color: white;
}


/* Add a grey background to dropdown links on hover */

.dropdown-content a:hover {
  background-color: #80c9ff;
  color: white;
}


/* Show the dropdown menu when the user moves the mouse over the dropdown button */

.dropdown:hover .dropdown-content {
  display: block;
}


/* Bottom navigation */

.navbar {
  overflow: hidden;
  position: fixed;
  bottom: 0;
  width: 100%;
  min-height: 40px;
}

.navbar a {
  float: left;
  display: block;
  color: #fff;
  text-align: center;
  padding: 14px 16px;
  text-decoration: none;
  font-size: 15px;
}

.navbar a:hover {
  background: #0066b3;
  color: white;
}

.navbar a.active {
  background-color: #0066b3;
  color: white;
}

.navbar .icon {
  display: none;
}

.left,
.right {
  height: 0%;
}

.middle {
  width: 100%;
}

.div-text {
  padding: 20px 15px 10px 15px;
  background-color: #ffffff;
  color: #a3a3a3;
  font-size: 85%;
  width: 90%;
  text-align: justify;
}

.text-input {
  background-color: rgb(248, 248, 248);
  height: 50px;
  width: 45%;
  padding: 5px;
  margin: 5px;
  border: 0px;
}

.mk-textarea {
  width: 93%;
}

.captcha-form {
  width: 45%;
  height: 50px;
}

.captcha-image {
  background-color: rgb(248, 248, 248);
  width: 170px;
  margin-top: 0px;
}

.captcha-image-pos {
  float: right;
  margin-top: 5px;
  margin-right: 5%;
}

.captcha-change-image {
  clear: both;
  color: rgb(120, 120, 120);
  font-size: 70%;
  float: right;
  margin-right: 5%;
}

.captcha-change-image:hover {
  color: red;
}

.btn {
  height: 50px;
  width: 115px;
  color: snow;
  float: right;
  border: 0px;
  background-color: rgb(80, 80, 80);
  margin-right: 5%;
}

.btn:hover {
  cursor: pointer;
}

.msgLarge {
  font-size: 1.2em;
}

.msgSmall {
  font-size: 90%;
  line-height: 18px;
}

.marginLeft {
  padding-left: 20px;
}

.marginRight {
  padding-right: 20px;
}

.title {
  color: #0066b3;
  font-weight: bold;
}

.subtitle {
  font-weight: bold;
}

.smallheader {
  margin-left: 40px;
  font-weight: bold;
  font-size: 12px;
  color: white;
  height: 6px;
}

.fixedsmall {
  overflow: auto;
  max-height: 420px;
}

.innertable {
  background-color: white;
  max-height: 300px;
  overflow: auto;
  padding-top: 0px;
  margin-bottom: 0px;
}

.centered {
  text-align: center;
  background-color: #c5d2ad;
}

.label {
  text-align: right;
  width: 40%;
  height: 50px;
  font-weight: bold;
}

.formarea {
  color: white;
  margin-left: 40px;
  margin-top: 10px;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: bold;
  max-height: 30px;
}

.lblform {
  width: 20%;
}

.formtable {
  border: 1px solid #ccc;
  width: 100%;
  align-content: left;
  padding: 15px 1px 2px 1px;
  margin-bottom: 1px;
}

.formbg {
  background-color: #e5eff4;
}

.formtext {
  border: 1px solid #cacaca;
  height: 50px;
  margin: 0px;
}

.btnbase {
  background-color: white;
  color: #0066b3;
  padding-top: 4px;
  padding-bottom: 20px;
  padding-left: 30px;
  padding-right: 30px;
  font-size: 12px;
  font-weight: normal;
  font-variant: small-caps;
}

.btnover:hover {
  background-color: #c5d2ad;
  color: white;
}

.combobox {
  padding: 0px 0px 0px 10px;
}

.legende {
  text-align: left;
  background-color: #006495;
  color: white;
  padding-left: 35px;
}

.headerlogo {
  height: 100px;
  text-align: center;
  float: left;
}

.headertext {
  color: rgb(245, 107, 35);
  text-transform: uppercase;
  padding-top: 30px;
  padding-left: 40%;
  margin-top: 0px;
  font-family: Verdana, Geneva, Tahoma, sans-serif;
}

.imgsrc {
  width: 100%;
  height: 150px;
}

.tdprop {
  width: 45%;
  vertical-align: top;
}

.altrowcolor {
  background-color: #e8f7cc;
}


/**************************************************************/

hr {
  clear: both;
}

img.fullwidth {
  display: block;
  width: 100%;
}

img.showleft {
  margin: 0px 20px 20px 20px;
  float: left;
  width: 20%;
}

img.showright {
  margin: 0px 20px 20px 20px;
  float: right;
  width: 20%;
}

img.showcenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
  width: 30%;
}

.slogan {
  text-align: justify;
  margin-right: 20px;
  margin-left: 20px;
  line-height: 1.6;
}

.paragraph {
  text-align: justify;
  margin-right: 20px;
  margin-left: 20px;
  line-height: 1.6;
}


/*************/

.link {
  text-decoration: none;
  color: #4870ad;
}

.mainDiv {
  max-width: 100%;
  padding-right: 15px;
  padding-left: 15px;
  width: 90%;
  margin: 0px auto;
  background-color: white;
  text-align: justify;
}

.center {
  margin: 0px auto;
  width: 950px;
}

.halfbreak {
  margin: 0.6em 0 0.6em 0;
}

.copyright {
  position: fixed;
  bottom: 10px;
  left: 10px;
  color: #aaaaaa;
  font-size: 13px;
  z-index: 3;
}

.attachment-row {
  margin-bottom: 20px;
  width: 95%;
  float: left;
}

.icon-add-more-attachemnt {
  float: right;
  margin-top: 10px;
  cursor: pointer;
}

.attachment-row .input-field {
  border: rgb(248, 248, 248) 1px solid;
}

.input-field {
  padding: 10px;
  width: 95%;
}


/**************************************************************/


/* When the screen is less than 600 pixels wide, hide all links, except for the first one ("Freimaurerei"). Show the link that contains should open and close the topnav (.icon) */

@media screen and (max-width: 890px) {
  .topnav a:not(:first-child),
  .dropdown .dropbtn {
    display: none;
  }
  .topnav a.icon {
    float: right;
    display: block;
    height: 20px;
  }
  .topnav.responsive {
    position: relative;
  }
  .topnav.responsive a.icon {
    position: absolute;
    right: 0;
    top: 0;
  }
  .topnav.responsive a {
    float: none;
    display: block;
    text-align: left;
  }
  .topnav.responsive .dropdown {
    float: none;
  }
  .topnav.responsive .dropdown-content {
    position: relative;
  }
  .topnav.responsive .dropdown .dropbtn {
    display: block;
    text-align: left;
  }
}


/* Add responsiveness - on screens less than 500px, make the navigation links appear on top of each other, instead of next to each other */

@media screen and (max-width: 890px) {
  .navbar a:not(:first-child) {
    display: none;
  }
  .navbar a.icon {
    float: right;
    display: block;
  }
  .navbar.responsive .icon {
    position: absolute;
    right: 0;
    bottom: 0;
  }
  .navbar.responsive a {
    float: none;
    display: block;
    text-align: left;
  }
}


/* When resolution <= 1180px, hide short text and show full text */

@media only screen and (max-width: 890px) {
  img.displayed_logo {
    display: block;
    margin-left: 20px;
    padding: 5px 10px 5px 0px;
    max-width: 20%;
  }
  .div-text {
    width: 90%;
  }
  .text-input {
    width: 90%;
    margin-left: 15px;
    margin-right: 15px;
  }
  .mk-textarea {
    width: 90%;
  }
  .captcha-change-image,
  .btn {
    margin-bottom: 15px;
    margin-right: 6%;
  }
  .btn {
    clear: right;
    margin-right: 6%;
  }
  .captcha-image-pos {
    margin-right: 6%;
  }
  .headertext {
    padding-left: 25%;
  }
}

/* ================================================================
 * Intranet-specific rules and corporate overrides
 * ================================================================ */

.main-title {
  text-align: center;
}

.credentials {
  width: 100%;
  position: inherit;
}

/* --------------------------------------------------
 * Alternating table rows
 * -------------------------------------------------- */

.procurement-table tr.data-row:nth-of-type(odd) td {
  background-color: #f7f7f7;
}

.procurement-table tr.data-row:nth-of-type(even) td {
  background-color: #ffffff;
}

.procurement-table tr.data-row:hover td {
  background-color: #eaf2f8;
}

.btnbase {
  background-color: #f0f0f0;
  color: #006495;
  padding-top: 8px;
  padding-bottom: 16px;
  padding-left: 30px;
  padding-right: 30px;
  font-size: 12px;
  font-weight: normal;
  font-variant: small-caps;
  height: 36px;
}

.btnover:hover {
  background-color: #505050;
  color: white;
}

.btnlogin {
  max-width: 60%;
}

.btnmain {
  max-width: 200px;
}

.btnsmall {
  width: auto;
  min-width: 100px;
  padding: 3px 8px;
  font-size: 10px;
}

.logout-area {
  position: absolute;
  top: 18px;
  right: 25px;
  z-index: 1000;
}

.logout-area form {
  margin: 0;
}

.logout-button {
  width: auto;
  padding: 6px 25px;
  border: none;
  background: transparent;
  color: orange;
  font-size: 12px;
  cursor: pointer;
}

.logout-button:hover {
  text-decoration: none;
}

.inventory-warning-area {
  position: absolute;
  top: 18px;
  right: 105px;
  z-index: 1100;
  display: none;
}

.inventory-warning-button {
  border: none;
  background: transparent;
  color: white;
  cursor: pointer;
  font-size: 18px;
  padding: 3px 6px;
}

.inventory-warning-count {
  display: inline-block;
  min-width: 16px;
  margin-left: 3px;
  padding: 1px 4px;
  border-radius: 8px;
  background: #c9302c;
  color: white;
  font-size: 10px;
  text-align: center;
  vertical-align: top;
}

.inventory-warning-panel {
  position: absolute;
  top: 32px;
  right: 0;
  width: 330px;
  max-height: 400px;
  overflow-y: auto;
  background: white;
  color: #333;
  border: 1px solid #ccc;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  text-align: left;
}

.inventory-warning-title {
  padding: 10px 12px;
  font-weight: bold;
  border-bottom: 1px solid #ddd;
}

.inventory-warning-item {
  padding: 10px 12px;
  border-bottom: 1px solid #eee;
}

.inventory-warning-item:last-child {
  border-bottom: none;
}

.inventory-warning-item-name {
  font-weight: bold;
  margin-bottom: 4px;
}

.inventory-warning-item-info {
  font-size: 12px;
  line-height: 1.5;
}

.back-area {
  position: absolute;
  top: 18px;
  right: 110px;
}


/* --------------------------------------------------
 * Procurement layout
 * -------------------------------------------------- */

.procurement-content {
  width: 100%;
  box-sizing: border-box;
}

.procurement-section {
  width: 100%;
  margin: 0 0 18px 0;
  box-sizing: border-box;
}

.procurement-table {
  width: 100% !important;
  table-layout: fixed;
  border-collapse: collapse;
  box-sizing: border-box;
}

.procurement-table td {
  box-sizing: border-box;
  vertical-align: middle;
  overflow-wrap: anywhere;
}

.procurement-table input[type="text"],
.procurement-table input[type="email"],
.procurement-table input[type="url"],
.procurement-table input[type="number"],
.procurement-table select {
  width: 100%;
  box-sizing: border-box;
}

.procurement-table .btnsmall {
  width: auto;
  min-width: 55px;
  padding: 3px 8px;
  font-size: 10px;
}

.procurement-inline {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
}

.procurement-inline select {
  flex: 1 1 auto;
  min-width: 0;
}

.procurement-actions {
  white-space: nowrap;
  text-align: center;
}

.procurement-action-form {
  margin: 0;
}

.procurement-status-message {
  text-align: center;
}

.procurement-checkbox {
  text-align: center !important;
  vertical-align: middle !important;
  position: static !important;
}

.procurement-checkbox input[type="checkbox"] {
  position: static !important;
  float: none !important;
  display: inline-block !important;
  width: 16px !important;
  height: 16px !important;
  margin: 0 auto !important;
  padding: 0 !important;
  transform: none !important;
  vertical-align: middle !important;
}


/* --------------------------------------------------
 * Compact Active switch
 * -------------------------------------------------- */

.procurement-switch-cell {
  text-align: center;
  vertical-align: middle;
}

.procurement-switch {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 18px;
  flex: 0 0 34px;
  vertical-align: middle;
}

.procurement-switch input[type="checkbox"] {
  position: absolute !important;
  opacity: 0 !important;
  width: 1px !important;
  height: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
  pointer-events: none;
}

.procurement-switch-slider {
  position: absolute;
  inset: 0;
  cursor: pointer;
  background-color: #b8b8b8;
  border-radius: 18px;
  transition: background-color 0.15s ease;
}

.procurement-switch-slider::before {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  left: 2px;
  top: 2px;
  background-color: #ffffff;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease;
}

.procurement-switch input[type="checkbox"]:checked + .procurement-switch-slider {
  background-color: #4f81bd;
}

.procurement-switch input[type="checkbox"]:checked + .procurement-switch-slider::before {
  transform: translateX(16px);
}

.procurement-switch input[type="checkbox"]:focus-visible + .procurement-switch-slider {
  outline: 2px solid #006495;
  outline-offset: 2px;
}


/* --------------------------------------------------
 * Procurement tabs
 * -------------------------------------------------- */

.procurement-tabs {
  width: 100%;
  display: flex;
  margin: 0 0 15px 0;
  border-bottom: 1px solid #aaa;
  box-sizing: border-box;
}

.procurement-tab {
  flex: 1;
  display: block;
  padding: 10px 12px;
  text-align: center;
  text-decoration: none;
  border: 1px solid #aaa;
  border-bottom: none;
  background: #eee;
  color: #333;
  font-size: 12px;
  box-sizing: border-box;
}

.procurement-tabs a + a {
  margin-left: 4px;
}

.procurement-tab:hover {
  background: #ddd;
}

.procurement-tab.active {
  background: #4f81bd;
  color: white;
  font-weight: bold;
}


/* --------------------------------------------------
 * Procurement table column widths
 * -------------------------------------------------- */

.procurement-table col.col-w4 {
  width: 4%;
}

.procurement-table col.col-w5 {
  width: 5%;
}

.procurement-table col.col-w7 {
  width: 7%;
}

.procurement-table col.col-w9 {
  width: 9%;
}

.procurement-table col.col-w10 {
  width: 10%;
}

.procurement-table col.col-w11 {
  width: 11%;
}

.procurement-table col.col-w14 {
  width: 14%;
}

.procurement-table col.col-w16 {
  width: 16%;
}

.procurement-table col.col-w18 {
  width: 18%;
}

.procurement-table col.col-w20 {
  width: 20%;
}

.procurement-table col.col-w22 {
  width: 22%;
}


/* --------------------------------------------------
 * Supplier items
 * -------------------------------------------------- */

.supplier-item-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.supplier-item-list {
  table-layout: fixed;
}

.supplier-item-list td {
  overflow-wrap: anywhere;
}

.supplier-item-col-item {
  width: 13%;
}

.supplier-item-col-supplier {
  width: 13%;
}

.supplier-item-col-product {
  width: 10%;
}

.supplier-item-col-description {
  width: 18%;
}

.supplier-item-col-pack {
  width: 8%;
}

.supplier-item-col-price {
  width: 9%;
}

.supplier-item-col-lead {
  width: 11%;
}

.supplier-item-col-preferred {
  width: 7%;
}

.supplier-item-col-active {
  width: 5%;
}

.supplier-item-col-action {
  width: 6%;
}

.supplier-item-editor {
  table-layout: auto;
}

.supplier-item-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px 10px;
  width: 100%;
  box-sizing: border-box;
}

.supplier-item-field {
  display: block;
  min-width: 0;
}

.supplier-item-field span {
  display: block;
  margin-bottom: 3px;
  font-size: 10px;
  font-weight: bold;
}

.supplier-item-field .formtext {
  width: 100%;
  box-sizing: border-box;
}

.supplier-item-span-2 {
  grid-column: span 2;
}

.supplier-item-options {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 10px;
}

.supplier-item-check {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  font-size: 11px;
}

.supplier-item-check input[type="checkbox"] {
  position: static !important;
  float: none !important;
  display: inline-block !important;
  width: 16px !important;
  height: 16px !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
}

.supplier-item-editor-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}


/* --------------------------------------------------
 * Delivery addresses
 * -------------------------------------------------- */

.delivery-address-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.procurement-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto !important;
  height: 36px;
  min-width: 70px;
  padding: 0 10px;
  box-sizing: border-box;
  text-align: center;
  text-decoration: none;
  line-height: 1;
}

.delivery-address-list {
  table-layout: fixed;
}

.delivery-address-list td {
  overflow-wrap: anywhere;
}

.delivery-address-col-name {
  width: 22%;
}

.delivery-address-col-company {
  width: 22%;
}

.delivery-address-col-city {
  width: 14%;
}

.delivery-address-col-country {
  width: 16%;
}

.delivery-address-col-flag {
  width: 8%;
}

.delivery-address-col-action {
  width: 10%;
}

.delivery-address-editor {
  table-layout: auto;
}

.delivery-address-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px 10px;
  width: 100%;
  box-sizing: border-box;
}

.delivery-address-field {
  display: block;
  min-width: 0;
}

.delivery-address-field span {
  display: block;
  margin-bottom: 3px;
  font-size: 10px;
  font-weight: bold;
}

.delivery-address-field .formtext {
  width: 100%;
  box-sizing: border-box;
}

.delivery-address-span-2 {
  grid-column: span 2;
}

.delivery-address-options {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 10px;
}

.delivery-address-check {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  font-size: 11px;
}

.delivery-address-check input[type="checkbox"] {
  position: static !important;
  float: none !important;
  display: inline-block !important;
  width: 16px !important;
  height: 16px !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
}

.delivery-address-editor-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

/* --------------------------------------------------
 * Responsive procurement forms
 * -------------------------------------------------- */

@media (max-width: 900px) {
  .supplier-item-grid,
  .delivery-address-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .supplier-item-grid,
  .delivery-address-grid {
    grid-template-columns: 1fr;
  }

  .supplier-item-span-2,
  .delivery-address-span-2 {
    grid-column: span 1;
  }

  .supplier-item-options,
  .delivery-address-options {
    flex-wrap: wrap;
  }

  .supplier-item-editor-actions,
  .delivery-address-editor-actions {
    width: 100%;
    margin-left: 0;
  }
}

/* --------------------------------------------------
 * Compact Purchase Order view - v2 overrides
 * Append AFTER the previous Purchase Order CSS block.
 * No PHP changes are required.
 * -------------------------------------------------- */

/* Order item action buttons: equal size, side by side */
.purchase-order-item-actions {
  white-space: nowrap;
  text-align: center;
}

.purchase-order-item-actions>.procurement-link-button,
.purchase-order-item-actions>.procurement-action-form {
  display: inline-block;
  vertical-align: middle;
  margin: 0 2px !important;
}

.purchase-order-item-actions>.procurement-link-button,
.purchase-order-item-actions>.procurement-action-form .btnsmall {
  width: 58px !important;
  min-width: 58px !important;
  height: 26px;
  box-sizing: border-box;
  padding: 4px 5px;
  text-align: center;
  line-height: 16px;
}

.purchase-order-item-actions>.procurement-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.purchase-order-item-actions>.procurement-action-form .btnsmall {
  margin: 0 !important;
}

/* Make the add/edit forms noticeably denser */
.purchase-order-compact-form td {
  padding-top: 2px;
  padding-bottom: 2px;
}

.purchase-order-compact-cell {
  padding: 4px 5px !important;
}

.purchase-order-field>span {
  margin-bottom: 1px;
  font-size: 9px;
}

.purchase-order-compact-form .formtext {
  min-height: 26px;
  height: 26px;
  padding: 2px 4px;
  box-sizing: border-box;
}

.purchase-order-action-field .btnsmall {
  min-height: 26px;
  white-space: nowrap;
}

/* Keep Add Supplier Item on ONE row on normal/small desktop screens */
.purchase-order-add-supplier-grid {
  grid-template-columns: minmax(0, 1fr) 64px 88px;
  gap: 4px 6px;
  align-items: end;
}

/* Keep Add Custom Item on ONE row as long as there is reasonable room */
.purchase-order-custom-grid,
.purchase-order-edit-grid-custom {
  grid-template-columns:
    minmax(70px, 0.9fr) minmax(120px, 2fr) minmax(65px, 0.7fr) 55px 75px 52px 105px;
  gap: 4px 6px;
  align-items: end;
}

.purchase-order-edit-grid {
  grid-template-columns:
    minmax(120px, 1.7fr) minmax(65px, 0.8fr) 55px 75px 52px 105px;
  gap: 4px 6px;
  align-items: end;
}

/*
 * The previous block changed all grids to two columns below 900px.
 * That is too early, especially on Retina displays where a 1320px
 * screenshot can represent a much narrower CSS viewport.
 * Override it and keep the compact horizontal layout until 560px.
 */
@media (max-width: 900px) {
  .purchase-order-add-supplier-grid {
    grid-template-columns: minmax(0, 1fr) 64px 88px;
  }

  .purchase-order-custom-grid,
  .purchase-order-edit-grid-custom {
    grid-template-columns:
      minmax(70px, 0.9fr) minmax(120px, 2fr) minmax(65px, 0.7fr) 55px 75px 52px 105px;
  }

  .purchase-order-edit-grid {
    grid-template-columns:
      minmax(120px, 1.7fr) minmax(65px, 0.8fr) 55px 75px 52px 105px;
  }

  .purchase-order-action-field {
    grid-column: auto;
  }
}

/* Only on genuinely narrow screens do we allow two compact rows. */
@media (max-width: 560px) {
  .purchase-order-add-supplier-grid {
    grid-template-columns: minmax(0, 1fr) 60px 84px;
  }

  .purchase-order-custom-grid,
  .purchase-order-edit-grid-custom {
    grid-template-columns: 1fr 1.6fr 70px 55px;
  }

  .purchase-order-custom-grid .purchase-order-field:nth-child(5),
  .purchase-order-edit-grid-custom .purchase-order-field:nth-child(5) {
    grid-column: 1;
  }

  .purchase-order-custom-grid .purchase-order-action-field,
  .purchase-order-edit-grid-custom .purchase-order-action-field {
    grid-column: auto;
  }

  .purchase-order-edit-grid {
    grid-template-columns: 1.5fr 70px 55px 75px;
  }
}

/* --------------------------------------------------
 * Compact Purchase Order view - v3
 * Append AFTER the previous Purchase Order CSS rules.
 * -------------------------------------------------- */

/* Header actions live directly in the Purchase Order title bar. */
.purchase-order-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.purchase-order-heading-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
}

.purchase-order-heading-actions .procurement-action-form {
  display: inline-flex;
  margin: 0;
}

.purchase-order-heading-actions .btnsmall,
.purchase-order-heading-actions .procurement-link-button {
  margin: 0 !important;
  white-space: nowrap;
}

/*
 * The two Add Item forms now use real table cells rather than a
 * responsive grid. This keeps the fields side-by-side reliably.
 */
.purchase-order-entry-table {
  width: 100%;
  table-layout: fixed;
}

.purchase-order-entry-table .purchase-order-entry-row>td {
  padding: 3px 4px !important;
  vertical-align: bottom;
}

.purchase-order-entry-table .purchase-order-field {
  display: block;
  width: 100%;
  min-width: 0;
}

.purchase-order-entry-table .purchase-order-field>span {
  display: block;
  margin: 0 0 2px 0;
  font-size: 9px;
  font-weight: bold;
  white-space: nowrap;
}

.purchase-order-entry-table .formtext,
.purchase-order-entry-table select {
  display: block;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100%;
  height: 26px;
  min-height: 26px;
  box-sizing: border-box;
  padding: 2px 4px;
}

.purchase-order-entry-action-cell {
  white-space: nowrap;
  text-align: left;
}

.purchase-order-entry-action-cell .btnsmall {
  min-height: 26px;
  margin: 0 !important;
  white-space: nowrap;
}

/* Supplier Item row: large selector, small quantity and action. */
.purchase-order-supplier-entry-table .po-entry-supplier-item {
  width: 82%;
}

.purchase-order-supplier-entry-table .po-entry-packs {
  width: 7%;
}

.purchase-order-supplier-entry-table .po-entry-action {
  width: 11%;
}

/* Custom Item row: description gets most of the available space. */
.purchase-order-custom-entry-table .po-entry-product-number {
  width: 14%;
}

.purchase-order-custom-entry-table .po-entry-description {
  width: 38%;
}

.purchase-order-custom-entry-table .po-entry-pack-size {
  width: 11%;
}

.purchase-order-custom-entry-table .po-entry-packs {
  width: 7%;
}

.purchase-order-custom-entry-table .po-entry-unit-price {
  width: 11%;
}

.purchase-order-custom-entry-table .po-entry-currency {
  width: 7%;
}

.purchase-order-custom-entry-table .po-entry-action {
  width: 12%;
}

/* Keep Edit/Delete exactly equal and next to one another. */
.purchase-order-item-actions {
  white-space: nowrap;
  text-align: center;
}

.purchase-order-item-actions>.procurement-link-button,
.purchase-order-item-actions>.procurement-action-form {
  display: inline-flex;
  vertical-align: middle;
  margin: 0 2px !important;
}

.purchase-order-item-actions>.procurement-link-button,
.purchase-order-item-actions>.procurement-action-form .btnsmall {
  width: 58px !important;
  min-width: 58px !important;
  height: 26px;
  box-sizing: border-box;
  padding: 4px 5px;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 16px;
}

.purchase-order-item-actions>.procurement-action-form .btnsmall {
  margin: 0 !important;
}

/* Order Items can use the available width naturally. */
.purchase-order-items-table {
  table-layout: auto;
}

/* On a genuinely narrower viewport, hide only redundant columns. */
@media (max-width: 760px) {
  .purchase-order-items-table .po-responsive-secondary {
    display: none;
  }

  .purchase-order-summary-row td {
    padding-left: 3px;
    padding-right: 3px;
  }

  .purchase-order-heading-actions {
    gap: 3px;
  }

  .purchase-order-heading-actions .btnsmall,
  .purchase-order-heading-actions .procurement-link-button {
    padding-left: 5px;
    padding-right: 5px;
  }

  .purchase-order-entry-table .purchase-order-entry-row>td {
    padding-left: 2px !important;
    padding-right: 2px !important;
  }

  .purchase-order-entry-table .purchase-order-field>span {
    font-size: 8px;
  }
}
/* --------------------------------------------------
 * GSE corporate colour theme
 * Keeps the Intranet visually aligned with the public homepage.
 * Legacy base rules are consolidated into this file.
 * -------------------------------------------------- */

:root {
  --gse-blue: #00487d;
  --gse-blue-hover: #0066b3;
  --gse-blue-soft: #eaf3f8;
  --gse-blue-pale: #f5f8fa;
  --gse-orange: #f56b23;
  --gse-text: #505050;
  --gse-border: #ccd9e1;
  --gse-white: #ffffff;
}

/* Main Intranet header: same corporate blue as the homepage. */
#header {
  background-color: var(--gse-blue);
}

/* Keep the company accent colour in the header. */
.headertext,
.logout-button {
  color: var(--gse-orange);
}

/* Core accents */
h2,
a,
table,
input,
textarea,
.title {
  color: var(--gse-blue);
}

/* Standard action buttons */
button:not(.logout-button):not(.inventory-warning-button),
.btnbase {
  border: 1px solid var(--gse-border);
  background-color: var(--gse-blue-pale);
  color: var(--gse-blue);
}

button:not(.logout-button):not(.inventory-warning-button):hover,
.btnover:hover {
  border-color: var(--gse-blue-hover);
  background-color: var(--gse-blue-hover);
  color: var(--gse-white);
  opacity: 1;
}

button:disabled,
.btnbase:disabled,
input.btnbase:disabled {
  border-color: #d7dde1;
  background-color: #eceff1;
  color: #9aa4aa;
  cursor: default;
  opacity: 1;
}

/* Header utility controls stay transparent. */
.logout-button,
.logout-button:hover,
.inventory-warning-button,
.inventory-warning-button:hover {
  border: none;
  background: transparent;
}

.logout-button:hover {
  color: #ff9a55;
}

/* Forms and table headers */
.formbg {
  background-color: var(--gse-blue-pale);
}

.legende {
  background-color: var(--gse-blue);
  color: var(--gse-white);
}

.centered,
.altrowcolor {
  background-color: var(--gse-blue-soft);
}

.formtable,
.formtext,
.procurement-table input[type="text"],
.procurement-table input[type="email"],
.procurement-table input[type="url"],
.procurement-table input[type="number"],
.procurement-table select {
  border-color: var(--gse-border);
}

.formtext:focus,
.procurement-table input:focus,
.procurement-table select:focus,
textarea:focus {
  border-color: var(--gse-blue-hover);
  outline: 1px solid var(--gse-blue-hover);
  outline-offset: 0;
}

/* Procurement tables */
.procurement-table tr.data-row:nth-of-type(odd) td {
  background-color: #f8fafb;
}

.procurement-table tr.data-row:nth-of-type(even) td {
  background-color: var(--gse-white);
}

.procurement-table tr.data-row:hover td {
  background-color: var(--gse-blue-soft);
}

/* Procurement tabs use exactly the same blue family. */
.procurement-tabs {
  border-bottom-color: var(--gse-border);
}

.procurement-tab {
  border-color: var(--gse-border);
  background-color: var(--gse-blue-pale);
  color: var(--gse-blue);
}

.procurement-tab:hover {
  background-color: var(--gse-blue-soft);
  color: var(--gse-blue);
}

.procurement-tab.active {
  border-color: var(--gse-blue);
  background-color: var(--gse-blue);
  color: var(--gse-white);
}

/* Link-style action buttons follow the same treatment. */
.procurement-link-button {
  color: var(--gse-blue);
}

.procurement-link-button:hover {
  color: var(--gse-white);
  text-decoration: none;
}

/* Semantic colours intentionally remain semantic. */
.inventory-warning-count {
  background: #c9302c;
  color: var(--gse-white);
}


/* --------------------------------------------------
 * Unified GSE brand header
 * Same brand block as the public homepage.
 * -------------------------------------------------- */

#header {
  height: auto;
  background-color: transparent;
}

.intranet-topbar {
  width: 100%;
  min-height: 74px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--gse-blue);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.10);
}

.intranet-header-inner {
  width: min(calc(100% - 40px), 1180px);
  min-height: 74px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.intranet-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  color: var(--gse-white);
  text-decoration: none;
}

.intranet-brand:hover {
  color: var(--gse-white);
  text-decoration: none;
}

.intranet-brand .headerlogo {
  width: 48px;
  height: auto;
  float: none;
  flex: 0 0 auto;
  text-align: initial;
}

.intranet-brand-text {
  display: flex;
  min-width: 0;
  flex-direction: column;
  line-height: 1.1;
}

.intranet-brand-text strong {
  color: var(--gse-white);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 0.92rem;
  font-weight: 720;
  white-space: nowrap;
}

.intranet-brand-text > span {
  margin-top: 4px;
  color: var(--gse-orange);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.11em;
  line-height: 1.1;
  text-transform: uppercase;
}

.intranet-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-left: auto;
}

.intranet-header-actions .logout-area,
.intranet-header-actions .back-area {
  position: static;
  top: auto;
  right: auto;
  z-index: auto;
}

.intranet-header-actions .logout-area form,
.intranet-header-actions .back-area form {
  margin: 0;
}

.intranet-header-actions .logout-button {
  margin: 0;
  padding: 8px 10px;
  border: 0;
  border-radius: 7px;
  color: var(--gse-orange);
  background: transparent;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.intranet-header-actions .logout-button:hover {
  color: var(--gse-white);
  background: var(--gse-blue-hover);
}

.headertext {
  display: none;
}

@media (max-width: 700px) {
  .intranet-header-inner {
    width: min(calc(100% - 28px), 1180px);
    min-height: 68px;
    flex-wrap: wrap;
    gap: 8px 14px;
    padding: 8px 0;
  }

  .intranet-brand {
    flex: 1 1 210px;
  }

  .intranet-brand .headerlogo {
    width: 44px;
  }

  .intranet-brand-text strong {
    font-size: 0.84rem;
    white-space: normal;
  }

  .intranet-brand-text > span {
    font-size: 0.66rem;
  }

  .intranet-header-actions {
    flex: 0 1 auto;
  }

  .intranet-header-actions .logout-button {
    padding: 7px 8px;
    font-size: 10px;
  }
}


/* ================================================================
 * Supplier Offers
 * ================================================================ */

.procurement-help-text,
.procurement-muted {
  color: #5f6f7b;
  font-size: 11px;
  line-height: 1.35;
}

.procurement-inline form {
  display: inline-flex;
  margin: 0;
}

.supplier-offer-editor {
  table-layout: auto;
}

.supplier-offer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 12px;
  width: 100%;
  box-sizing: border-box;
}

.supplier-offer-field {
  display: block;
  min-width: 0;
}

.supplier-offer-field span {
  display: block;
  margin-bottom: 3px;
  font-size: 11px;
  font-weight: bold;
}

.supplier-offer-field .formtext {
  width: 100%;
  box-sizing: border-box;
}

.supplier-offer-span-2 {
  grid-column: span 2;
}

.supplier-offer-editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.supplier-offer-list,
.supplier-offer-history-list {
  table-layout: auto;
}

.supplier-offer-list td,
.supplier-offer-history-list td {
  vertical-align: top;
}

.supplier-offer-actions {
  min-width: 155px;
}

.supplier-offer-actions form {
  display: inline-flex;
  margin: 3px 0 0 0;
}

@media (max-width: 1000px) {
  .supplier-offer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 650px) {
  .supplier-offer-grid {
    grid-template-columns: 1fr;
  }

  .supplier-offer-span-2 {
    grid-column: span 1;
  }

  .supplier-offer-editor-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
  }
}


/* ================================================================
 * Inventory warning resilience
 * ================================================================ */

.inventory-warning-area.has-check-errors .inventory-warning-button {
  box-shadow: 0 0 0 2px rgba(245, 107, 35, 0.28);
}

.inventory-warning-item-note {
  margin-top: 4px;
  color: #6b7b85;
  font-size: 9px;
  line-height: 1.35;
}

.inventory-warning-item-note.is-error {
  color: #9b3e24;
}

.inventory-warning-check-note {
  margin: 8px 10px 10px;
  padding: 8px 9px;
  border-left: 3px solid #f56b23;
  background: #fff8f3;
  color: #6c4b39;
  font-size: 9px;
  line-height: 1.4;
}

/* ================================================================
 * Experiment Protocol Import – compact corporate card
 * ================================================================ */

.protocol-import-panel {
  margin-top: 14px;
  padding: 14px 16px 16px;
  border: 1px solid #d7e3ea;
  border-radius: 8px;
  background: #f7fafc;
  box-shadow: 0 1px 2px rgba(21, 55, 76, 0.04);
}

.protocol-import-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.protocol-import-heading strong {
  display: block;
  color: #00487d;
  font-size: 12px;
  line-height: 1.3;
}

.protocol-import-heading span {
  display: block;
  margin-top: 3px;
  color: #637580;
  font-size: 10px;
  line-height: 1.4;
}

.protocol-drop-zone {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 11px 13px;
  border: 1px dashed #8fb3c9;
  border-radius: 7px;
  background: #ffffff;
  color: #00487d;
  cursor: pointer;
  transition:
    border-color 120ms ease,
    background-color 120ms ease,
    box-shadow 120ms ease;
}

.protocol-drop-zone:hover,
.protocol-drop-zone:focus,
.protocol-drop-zone.is-dragover {
  outline: none;
  border-color: #0066b3;
  background: #f0f7fb;
  box-shadow: inset 0 0 0 1px rgba(0, 102, 179, 0.08);
}

.protocol-file-input {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.protocol-drop-icon {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #eaf3f8;
  color: #0066b3;
  font-size: 19px;
  font-weight: 700;
  line-height: 1;
}

.protocol-drop-copy {
  min-width: 0;
}

.protocol-drop-title {
  display: block;
  color: #263746;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.3;
}

.protocol-drop-subtitle {
  display: block;
  margin-top: 2px;
  color: #778791;
  font-size: 9px;
  line-height: 1.35;
}

.protocol-drop-action {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  padding: 0 11px;
  border: 1px solid #adc7d7;
  border-radius: 5px;
  background: #ffffff;
  color: #00487d;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.protocol-drop-zone:hover .protocol-drop-action,
.protocol-drop-zone:focus .protocol-drop-action,
.protocol-drop-zone.is-dragover .protocol-drop-action {
  border-color: #0066b3;
  background: #ffffff;
}

.protocol-import-status {
  min-height: 17px;
  margin-top: 7px;
  color: #5f707b;
  font-size: 10px;
}

.protocol-import-status.is-working { color: #00487d; }
.protocol-import-status.is-success { color: #287440; }
.protocol-import-status.is-error { color: #a12828; }

.protocol-import-panel.is-busy .protocol-drop-zone {
  opacity: 0.58;
  cursor: wait;
}

.protocol-import-review {
  margin-top: 8px;
}

.protocol-review-header,
.protocol-summary-box {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 12px;
  border: 1px solid #d3e0e8;
  border-radius: 6px;
  background: #ffffff;
}

.protocol-review-header strong,
.protocol-summary-box strong {
  display: block;
  color: #263746;
  font-size: 12px;
}

.protocol-summary-meta {
  display: block;
  margin-top: 3px;
  color: #73818a;
  font-size: 9px;
}

.protocol-date-field {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #4f5f69;
  font-size: 10px;
  white-space: nowrap;
}

.protocol-date-field input {
  width: 145px;
  height: 28px;
  padding: 2px 6px;
  border: 1px solid #c8d5dd;
  border-radius: 4px;
  font-size: 10px;
}

.protocol-review-table {
  width: 100%;
  margin-top: 7px;
  border-collapse: collapse;
  color: #34434d;
  background: #ffffff;
  font-size: 10px;
}

.protocol-review-table th,
.protocol-review-table td {
  padding: 8px;
  border: 1px solid #d9e3e9;
  vertical-align: top;
  text-align: left;
}

.protocol-review-table th {
  color: #ffffff;
  background: #00487d;
  font-weight: 600;
}

.protocol-review-table select,
.protocol-review-table input {
  max-width: 100%;
  height: 28px;
  padding: 2px 6px;
  border: 1px solid #c8d5dd;
  border-radius: 4px;
  background: #ffffff;
  font-size: 10px;
}

.protocol-action-select {
  width: 220px;
}

.protocol-new-name {
  display: block;
  width: 220px;
  margin-top: 5px;
}

.protocol-initial-stock {
  width: 100px;
}

.protocol-source-text {
  display: block;
  max-width: 330px;
  margin-top: 3px;
  color: #7b878f;
  font-size: 9px;
  line-height: 1.35;
}

.protocol-confidence {
  white-space: nowrap;
  color: #287440;
  font-weight: 600;
}

.protocol-confidence.is-low {
  color: #a06000;
}

.protocol-review-table tr.is-ignored td {
  color: #8a969d;
  background: #f5f6f7;
}

.protocol-review-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

.protocol-import-button {
  margin: 0;
}

.protocol-empty {
  padding: 14px;
  border: 1px solid #d3e0e8;
  border-radius: 6px;
  background: #ffffff;
  color: #5f6f79;
  font-size: 10px;
}

@media (max-width: 800px) {
  .protocol-drop-zone {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .protocol-drop-action {
    grid-column: 1 / -1;
    justify-self: start;
    margin-left: 46px;
  }

  .protocol-review-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .protocol-source-text {
    white-space: normal;
  }

  .protocol-review-header {
    align-items: flex-start;
    flex-direction: column;
  }
}


/* ================================================================
 * Purchase Proposals
 * ================================================================ */

.purchase-proposal-empty {
  padding: 16px;
  border: 1px solid #d6e2e9;
  border-radius: 7px;
  background: #f8fbfc;
  color: #40515d;
  font-size: 11px;
  line-height: 1.5;
}

.purchase-proposal-empty b {
  display: block;
  margin-bottom: 3px;
  color: #00487d;
}

.purchase-proposal-card {
  overflow: hidden;
  border: 1px solid #cfdee7;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(16, 55, 80, 0.06);
}

.purchase-proposal-card.is-late {
  border-left: 4px solid #f56b23;
}

.purchase-proposal-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 15px;
  border-bottom: 1px solid #e0e8ed;
  background: #f7fafc;
}

.purchase-proposal-card-header strong {
  display: block;
  margin-top: 2px;
  color: #00487d;
  font-size: 15px;
  line-height: 1.25;
}

.purchase-proposal-kicker,
.purchase-proposal-stock {
  display: block;
  color: #667984;
  font-size: 9px;
  line-height: 1.4;
}

.purchase-proposal-stock {
  margin-top: 4px;
}

.purchase-proposal-total {
  text-align: right;
  white-space: nowrap;
}

.purchase-proposal-total span {
  display: block;
  color: #6e7e87;
  font-size: 9px;
}

.purchase-proposal-total strong {
  margin-top: 2px;
  color: #263746;
  font-size: 15px;
}

.purchase-proposal-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: #e0e8ed;
}

.purchase-proposal-box {
  min-width: 0;
  padding: 11px 13px;
  background: #ffffff;
  color: #3d4c56;
  font-size: 10px;
  line-height: 1.45;
}

.purchase-proposal-box strong {
  display: block;
  margin: 2px 0;
  color: #263746;
  font-size: 11px;
}

.purchase-proposal-label {
  display: block;
  color: #75858f;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.purchase-proposal-reason {
  padding: 11px 15px;
  border-top: 1px solid #edf1f3;
  color: #43545f;
  font-size: 10px;
  line-height: 1.5;
}

.purchase-proposal-reason b {
  color: #00487d;
}

.purchase-proposal-budget {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  padding: 9px 15px;
  border-top: 1px solid #edf1f3;
  background: #fbfcfd;
  color: #4d5d67;
  font-size: 10px;
}

.purchase-proposal-budget b {
  color: #00487d;
}

.purchase-proposal-warning {
  color: #b14a25 !important;
  font-weight: 700;
}

.purchase-proposal-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 15px 12px;
  border-top: 1px solid #e6edf1;
}

.purchase-proposal-actions form {
  margin: 0;
}

.purchase-proposal-order-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.purchase-proposal-order-form .formtext {
  width: auto;
  min-width: 230px;
}

.purchase-proposal-alternatives {
  border-top: 1px solid #e1e9ee;
  background: #fafcfd;
}

.purchase-proposal-alternatives summary {
  padding: 9px 15px;
  color: #00487d;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
}

.purchase-proposal-alternative-list {
  border-top: 1px solid #e5ecef;
}

.purchase-proposal-alternative {
  display: grid;
  grid-template-columns:
    minmax(170px, 1.4fr)
    minmax(120px, 0.8fr)
    minmax(100px, 0.7fr)
    auto;
  align-items: center;
  gap: 10px;
  padding: 8px 15px;
  border-bottom: 1px solid #e8eef1;
  color: #45555f;
  font-size: 10px;
}

.purchase-proposal-alternative:last-child {
  border-bottom: 0;
}

.purchase-proposal-alternative strong {
  display: block;
  color: #263746;
}

.purchase-proposal-alternative span {
  display: block;
}

.purchase-proposal-alternative form {
  margin: 0;
}

@media (max-width: 900px) {
  .purchase-proposal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .purchase-proposal-alternative {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 620px) {
  .purchase-proposal-card-header {
    flex-direction: column;
  }

  .purchase-proposal-total {
    text-align: left;
  }

  .purchase-proposal-grid {
    grid-template-columns: 1fr;
  }

  .purchase-proposal-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .purchase-proposal-order-form {
    align-items: flex-start;
    flex-direction: column;
  }

  .purchase-proposal-order-form .formtext {
    width: 100%;
    min-width: 0;
  }

  .purchase-proposal-alternative {
    grid-template-columns: 1fr;
  }
}


/* ================================================================
 * Supplier Discovery
 * ================================================================ */

.supplier-discovery-select-form {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.supplier-discovery-select-form label {
  display: block;
  min-width: 320px;
}

.supplier-discovery-select-form label span {
  display: block;
  margin-bottom: 4px;
  color: #52636e;
  font-size: 10px;
  font-weight: 700;
}

.supplier-discovery-select-form .formtext {
  width: 100%;
}

.supplier-discovery-profile {
  padding: 14px 15px;
  border: 1px solid #d5e2e9;
  border-radius: 8px;
  background: #f8fbfc;
}

.supplier-discovery-profile-header {
  margin-bottom: 11px;
}

.supplier-discovery-profile-header b {
  color: #00487d;
  font-size: 12px;
}

.supplier-discovery-profile-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 12px;
}

.supplier-discovery-span-4 {
  grid-column: span 4;
}

.supplier-discovery-notes {
  width: 100%;
  min-height: 62px;
  box-sizing: border-box;
  resize: vertical;
}

.supplier-discovery-profile-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.supplier-discovery-run {
  padding: 11px 13px;
  border: 1px solid #d8e4ea;
  border-radius: 7px;
  background: #fff;
  color: #4c5d68;
  font-size: 10px;
  line-height: 1.45;
}

.supplier-discovery-run b {
  display: block;
  color: #00487d;
}

.supplier-discovery-run span {
  color: #74838c;
  font-size: 9px;
}

.supplier-discovery-summary {
  margin-top: 7px;
}

.supplier-discovery-error {
  margin-top: 7px;
  padding: 7px 9px;
  border-left: 3px solid #f56b23;
  background: #fff6f1;
  color: #9b3e24;
}

.supplier-discovery-table {
  table-layout: auto;
}

.supplier-discovery-table td {
  vertical-align: top;
  font-size: 9px;
}

.supplier-discovery-table form {
  margin: 0 0 4px 0;
}

.supplier-discovery-table a {
  color: #0066b3;
  font-weight: 700;
  text-decoration: none;
}

.supplier-discovery-table a:hover {
  text-decoration: underline;
}

.supplier-discovery-match {
  display: inline-flex;
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 8px;
  font-weight: 700;
}

.supplier-discovery-match.is-exact {
  background: #e8f6ed;
  color: #267340;
}

.supplier-discovery-match.is-acceptable {
  background: #eaf3f8;
  color: #005f99;
}

.supplier-discovery-match.is-review {
  background: #fff5df;
  color: #95620a;
}

.supplier-discovery-match.is-reject {
  background: #fdeceb;
  color: #a12828;
}

.supplier-discovery-warning {
  margin-top: 3px;
  color: #9a6420;
  font-size: 8px;
  line-height: 1.3;
}

.supplier-discovery-restriction {
  margin-top: 4px;
  color: #9b4a29;
  font-size: 8px;
  line-height: 1.35;
}

.supplier-discovery-accepted {
  color: #287440;
}

@media (max-width: 980px) {
  .supplier-discovery-profile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .supplier-discovery-span-4 {
    grid-column: span 2;
  }
}

@media (max-width: 620px) {
  .supplier-discovery-select-form label {
    min-width: 0;
    width: 100%;
  }

  .supplier-discovery-profile-grid {
    grid-template-columns: 1fr;
  }

  .supplier-discovery-span-4 {
    grid-column: span 1;
  }

  .supplier-discovery-profile-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .supplier-discovery-table {
    display: block;
    overflow-x: auto;
  }
}


/* ================================================================
 * Chemical Identifier Lookup
 * ================================================================ */

.chemical-identifier-panel {
  grid-column: 1 / -1;
  margin-bottom: 12px;
  padding: 12px 13px;
  border: 1px solid #cfdee7;
  border-radius: 7px;
  background: #ffffff;
}

.chemical-identifier-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 9px;
}

.chemical-identifier-panel-head b {
  display: block;
  color: #00487d;
  font-size: 11px;
}

.chemical-identifier-panel-head span {
  display: block;
  margin-top: 2px;
  color: #70808a;
  font-size: 9px;
  line-height: 1.4;
}

.chemical-identifier-linked {
  margin-bottom: 8px;
  padding: 7px 9px;
  border-left: 3px solid #0066b3;
  background: #f3f8fb;
  color: #43545e;
  font-size: 9px;
}

.chemical-identifier-linked b {
  display: block;
  color: #263746;
  font-size: 10px;
}

.chemical-identifier-linked span {
  display: block;
  margin-top: 2px;
}

.chemical-identifier-search-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 7px;
  align-items: center;
}

.chemical-identifier-search-row .formtext {
  width: 100%;
  box-sizing: border-box;
}

.chemical-identifier-status {
  min-height: 15px;
  margin-top: 6px;
  color: #64757f;
  font-size: 9px;
}

.chemical-identifier-status.is-working {
  color: #00487d;
}

.chemical-identifier-status.is-success {
  color: #287440;
}

.chemical-identifier-status.is-error {
  color: #a12828;
}

.chemical-identifier-results {
  margin-top: 5px;
}

.chemical-identifier-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 9px;
  border: 1px solid #d8e3e9;
  border-bottom: 0;
  background: #ffffff;
  font-size: 9px;
}

.chemical-identifier-result:first-of-type {
  border-radius: 5px 5px 0 0;
}

.chemical-identifier-result:last-child {
  border-bottom: 1px solid #d8e3e9;
  border-radius: 0 0 5px 5px;
}

.chemical-identifier-result.is-online {
  background: #fbfcfd;
}

.chemical-identifier-result-info {
  min-width: 0;
}

.chemical-identifier-result-info strong {
  display: block;
  color: #263746;
  font-size: 10px;
}

.chemical-identifier-result-info span,
.chemical-identifier-result-info small,
.chemical-identifier-result-info a {
  display: block;
  margin-top: 2px;
}

.chemical-identifier-result-info span {
  color: #53656f;
}

.chemical-identifier-result-info small {
  color: #7a8991;
  line-height: 1.35;
}

.chemical-identifier-result-info a {
  color: #0066b3;
  text-decoration: none;
}

.chemical-identifier-result-info a:hover {
  text-decoration: underline;
}

.chemical-identifier-online-action {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 235px;
}

.chemical-identifier-online-action .formtext {
  width: 120px;
}

.chemical-identifier-warning,
.chemical-identifier-empty {
  padding: 8px 9px;
  border: 1px solid #d8e3e9;
  border-radius: 5px;
  color: #52636e;
  background: #f8fbfc;
  font-size: 9px;
  line-height: 1.4;
}

.chemical-identifier-warning {
  margin-bottom: 6px;
  border-left: 3px solid #f56b23;
  background: #fff8f3;
  color: #744a34;
}

.chemical-identifier-no-cas {
  color: #8b5c25;
  font-size: 9px;
}

@media (max-width: 760px) {
  .chemical-identifier-panel-head {
    flex-direction: column;
  }

  .chemical-identifier-search-row {
    grid-template-columns: 1fr;
  }

  .chemical-identifier-result {
    align-items: flex-start;
    flex-direction: column;
  }

  .chemical-identifier-online-action {
    width: 100%;
    min-width: 0;
    flex-wrap: wrap;
  }
}


/* ================================================================
 * Supplier Discovery V2 - broad result review
 * ================================================================ */

.supplier-discovery-model-line {
  margin-top: 4px;
  color: #536975;
  font-size: 9px;
}

.supplier-discovery-results-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 7px;
  color: #647681;
  font-size: 9px;
}

.supplier-discovery-results-caption > div {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.supplier-discovery-results-caption b {
  color: #263746;
  font-size: 11px;
}

.supplier-discovery-results-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end !important;
  gap: 2px !important;
  text-align: right;
}

.supplier-discovery-status-legend {
  color: #657680;
  font-size: 8px;
  line-height: 1.25;
}

.supplier-discovery-results-panel {
  position: relative;
  height: 560px;
  min-height: 260px;
  max-height: 85vh;
  overflow: auto;
  resize: vertical;
  border: 1px solid #cbdbe4;
  border-radius: 6px;
  background: #ffffff;
}

.supplier-discovery-results-panel .supplier-discovery-table {
  margin: 0;
  min-width: 1320px;
  width: 100%;
}

.supplier-discovery-column-head td {
  position: sticky;
  top: 0;
  z-index: 3;
  border-top: 0;
  background: #eaf3f8;
  box-shadow: 0 1px 0 #cbdbe4;
  color: #29424f;
}

.supplier-discovery-table tr:hover td {
  background-color: #fbfdfe;
}

.supplier-discovery-column-head:hover td {
  background: #eaf3f8;
}

.supplier-discovery-metric {
  display: flex;
  min-width: 82px;
  padding: 6px 7px;
  border: 1px solid #d8e3e9;
  border-radius: 6px;
  background: #f8fbfc;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.supplier-discovery-metric.is-primary {
  border-color: #b9d6e7;
  background: #eef7fb;
}

.supplier-discovery-metric.is-delivery {
  border-color: #d6dfc8;
  background: #f7faf2;
}

.supplier-discovery-metric-label {
  color: #73838c;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: .06em;
}

.supplier-discovery-metric-value {
  color: #173746;
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
}

.supplier-discovery-metric-note {
  color: #61727c;
  font-size: 7.5px;
  line-height: 1.25;
}

.supplier-discovery-metric-note.is-warning {
  color: #95620a;
}

.supplier-discovery-availability {
  display: inline-flex;
  margin-top: 3px;
  padding: 2px 5px;
  border-radius: 9px;
  background: #edf1f3;
  color: #566872;
  font-size: 7.5px;
  font-weight: 700;
}

.supplier-discovery-availability.is-available {
  background: #e8f6ed;
  color: #267340;
}

.supplier-discovery-availability.is-limited,
.supplier-discovery-availability.is-on_request {
  background: #fff5df;
  color: #95620a;
}

.supplier-discovery-availability.is-out_of_stock {
  background: #fdeceb;
  color: #a12828;
}

.supplier-discovery-review-box {
  max-width: 220px;
  margin-bottom: 6px;
  padding: 6px 7px;
  border-left: 3px solid #f56b23;
  background: #fff7f2;
  color: #744a34;
  font-size: 7.8px;
  line-height: 1.3;
}

.supplier-discovery-review-box b {
  display: block;
  margin-bottom: 3px;
}

.supplier-discovery-review-box ul {
  margin: 0;
  padding-left: 14px;
}

.supplier-discovery-ready {
  max-width: 200px;
  margin-bottom: 6px;
  padding: 5px 7px;
  border-left: 3px solid #3b8a52;
  background: #edf8f0;
  color: #287440;
  font-size: 8px;
  line-height: 1.3;
}

@media (max-width: 760px) {
  .supplier-discovery-results-caption {
    align-items: flex-start;
    flex-direction: column;
  }

  .supplier-discovery-results-meta {
    align-items: flex-start !important;
    text-align: left;
  }

  .supplier-discovery-results-panel {
    height: 460px;
    min-height: 240px;
    max-height: 80vh;
  }
}


/* ================================================================
 * Supplier Discovery V3 - OpenAI background mode
 * ================================================================ */

.supplier-discovery-background-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 9px;
  padding: 8px 10px;
  border: 1px solid #bfd8e7;
  border-radius: 6px;
  background: #eef7fb;
}

.supplier-discovery-spinner {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  border: 2px solid #bdd5e4;
  border-top-color: #0066b3;
  border-radius: 50%;
  animation: supplierDiscoverySpin .9s linear infinite;
}

@keyframes supplierDiscoverySpin {
  to {
    transform: rotate(360deg);
  }
}

.supplier-discovery-live-status {
  color: #27566f;
  font-size: 9px;
  font-weight: 700;
}

.supplier-discovery-live-status.is-completed {
  color: #287440;
}

.supplier-discovery-live-status.is-failed,
.supplier-discovery-live-status.is-poll-error {
  color: #98531f;
}

.supplier-discovery-background-note {
  margin-top: 5px;
  color: #70808a;
  font-size: 8px;
  line-height: 1.4;
}


/* ================================================================
 * Supplier Discovery V4 - procurement-only safety fallback
 * ================================================================ */

.supplier-discovery-live-status.is-fallback {
  color: #8a5a14;
}

.supplier-discovery-background-progress:has(
  .supplier-discovery-live-status.is-fallback
) {
  border-color: #ead2aa;
  background: #fff8ec;
}

.supplier-discovery-background-progress:has(
  .supplier-discovery-live-status.is-fallback
) .supplier-discovery-spinner {
  border-color: #ecd9b8;
  border-top-color: #b27319;
}


/* ================================================================
 * Supplier Discovery V5 - laboratory UI refinements
 * ================================================================ */

/*
 * Native CSS resize handles are inconsistent/too subtle across browsers.
 * V5 uses an explicit draggable bar below the panel.
 */
.supplier-discovery-results-panel {
  height: 520px;
  min-height: 220px;
  max-height: none;
  resize: none;
  overflow: auto;
}

.supplier-discovery-resize-handle {
  display: flex;
  height: 14px;
  align-items: center;
  justify-content: center;
  cursor: ns-resize;
  user-select: none;
  touch-action: none;
  border: 1px solid #cbdbe4;
  border-top: 0;
  border-radius: 0 0 6px 6px;
  background: #f5f8fa;
}

.supplier-discovery-resize-handle span {
  display: block;
  width: 52px;
  height: 3px;
  border-radius: 3px;
  background: #b9c8d0;
}

.supplier-discovery-resize-handle:hover {
  background: #edf4f7;
}

.supplier-discovery-resize-handle:hover span {
  background: #7fa2b5;
}

body.supplier-discovery-resizing {
  cursor: ns-resize !important;
  user-select: none !important;
}

/* Match badges: fixed dimensions, pastel colours only. */
.supplier-discovery-match {
  width: 76px;
  height: 22px;
  box-sizing: border-box;
  padding: 0 7px;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 8px;
  line-height: 1;
}

.supplier-discovery-match.is-exact {
  background: #e7f5eb;
  color: #2f6f43;
}

.supplier-discovery-match.is-acceptable {
  background: #e8f2f8;
  color: #356b89;
}

.supplier-discovery-match.is-review {
  background: #fff4d9;
  color: #8c691f;
}

.supplier-discovery-match.is-reject {
  background: #fae9e7;
  color: #8e4a43;
}

/* Purchasing criteria use equal-height cards and colour, not size. */
.supplier-discovery-metric {
  min-width: 86px;
  min-height: 54px;
  box-sizing: border-box;
  justify-content: center;
  border-color: #d9e3e8;
  background: #f7fafb;
}

.supplier-discovery-metric.is-known {
  border-color: #c4dce8;
  background: #eef6fa;
}

.supplier-discovery-metric.is-missing {
  border-color: #ead9a8;
  background: #fff8e9;
}

.supplier-discovery-metric.is-price.is-known {
  border-color: #c9dfd0;
  background: #eef8f1;
}

.supplier-discovery-metric.is-delivery.is-known {
  border-color: #c8dbe7;
  background: #eef6fa;
}

.supplier-discovery-metric-value {
  font-size: 12px;
}

/* Compact source control. */
.supplier-discovery-source-button {
  display: inline-flex;
  width: 76px;
  height: 24px;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  border: 1px solid #bdd2df;
  border-radius: 6px;
  background: #eaf3f8;
  color: #356b89 !important;
  font-size: 8px;
  font-weight: 700;
  text-decoration: none !important;
}

.supplier-discovery-source-button:hover {
  background: #deedf5;
}

.supplier-discovery-source-state {
  display: inline-flex;
  width: 76px;
  height: 18px;
  margin-top: 4px;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  font-size: 7px;
  font-weight: 700;
}

.supplier-discovery-source-state.is-ok {
  background: #e7f5eb;
  color: #2f6f43;
}

.supplier-discovery-source-state.is-review {
  background: #fff4d9;
  color: #8c691f;
}

/*
 * Actions never grow with warning text. Warnings are available via tooltip.
 * All controls have identical footprint.
 */
.supplier-discovery-action-state {
  display: inline-flex;
  width: 76px;
  height: 22px;
  margin: 0 auto 5px;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 8px;
  font-weight: 700;
  cursor: default;
}

.supplier-discovery-action-state.is-ready {
  background: #e7f5eb;
  color: #2f6f43;
}

.supplier-discovery-action-state.is-review {
  background: #fff4d9;
  color: #8c691f;
}

.supplier-discovery-action-state.is-ignored {
  background: #e8f2f8;
  color: #506f82;
}

.supplier-discovery-action-button {
  display: inline-flex;
  width: 76px;
  height: 24px;
  margin: 2px auto;
  box-sizing: border-box;
  padding: 0 6px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 6px;
  font-family: inherit;
  font-size: 8px;
  font-weight: 700;
  cursor: pointer;
}

.supplier-discovery-action-button.is-accept {
  border-color: #bfd9c7;
  background: #e7f5eb;
  color: #2f6f43;
}

.supplier-discovery-action-button.is-accept:hover {
  background: #dcefe2;
}

.supplier-discovery-action-button.is-ignore {
  border-color: #bfd3e0;
  background: #e8f2f8;
  color: #456d84;
}

.supplier-discovery-action-button.is-ignore:hover {
  background: #dcebf3;
}

.supplier-discovery-table .procurement-actions {
  white-space: normal;
}

.supplier-discovery-table .procurement-actions form {
  margin: 0;
}

/* Retire the large V2 warning blocks inside action cells. */
.supplier-discovery-review-box,
.supplier-discovery-ready {
  display: none;
}

.supplier-discovery-live-status.is-fallback {
  color: #8c691f;
}

@media (max-width: 760px) {
  .supplier-discovery-results-panel {
    height: 420px;
    min-height: 220px;
    max-height: none;
  }
}


/* ================================================================
 * Supplier Discovery V6 - compact equal controls + column resize
 * ================================================================ */

.supplier-discovery-section {
  overflow: visible;
}

.supplier-discovery-results-panel {
  display: block;
  height: 520px;
  min-height: 220px;
  max-height: none;
  overflow: auto;
  resize: none;
  border: 1px solid #cbdbe4;
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  background: #ffffff;
}

.supplier-discovery-results-panel .supplier-discovery-table {
  min-width: 1480px;
  width: auto;
  border-collapse: collapse;
}

.supplier-discovery-column-head td {
  position: sticky;
  top: 0;
  z-index: 4;
  background: #eaf3f8;
  white-space: nowrap;
  padding-right: 14px;
}

.supplier-discovery-col-head {
  position: sticky;
}

.supplier-discovery-col-resizer {
  position: absolute;
  top: 0;
  right: -2px;
  width: 8px;
  height: 100%;
  cursor: col-resize;
  user-select: none;
  touch-action: none;
}

.supplier-discovery-col-resizer::after {
  content: "";
  position: absolute;
  top: 20%;
  right: 2px;
  width: 2px;
  height: 60%;
  border-radius: 2px;
  background: #c3d1d9;
}

.supplier-discovery-col-head:hover .supplier-discovery-col-resizer::after {
  background: #7c9bb0;
}

body.supplier-discovery-col-resizing {
  cursor: col-resize !important;
  user-select: none !important;
}

.supplier-discovery-results-caption {
  align-items: center;
}

.supplier-discovery-results-caption span {
  font-size: 10px;
}

.supplier-discovery-resize-handle {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  margin-top: 0;
  border: 1px solid #cbdbe4;
  border-top: 0;
  border-radius: 0 0 6px 6px;
  background: #f5f8fa;
  cursor: ns-resize;
}

.supplier-discovery-resize-text {
  display: inline-flex;
  min-width: 118px;
  height: 16px;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border-radius: 999px;
  background: #dde8ee;
  color: #5e7888;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.supplier-discovery-resize-handle:hover .supplier-discovery-resize-text {
  background: #d4e3eb;
  color: #4c6d80;
}

.supplier-discovery-metric,
.supplier-discovery-source-button,
.supplier-discovery-source-state,
.supplier-discovery-action-state,
.supplier-discovery-action-button {
  width: 84px;
}

.supplier-discovery-metric {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  min-width: 84px;
  min-height: 62px;
  padding: 6px 6px;
  box-sizing: border-box;
  gap: 3px;
  border: 1px solid #d4dde2;
  border-radius: 6px;
  background: #f8fbfc;
}

.supplier-discovery-metric-label {
  display: block;
  order: 0;
  color: #6d7f89;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  line-height: 1;
}

.supplier-discovery-metric-value {
  display: block;
  order: 1;
  color: #173746;
  font-size: 11px;
  line-height: 1.15;
  text-align: center;
  white-space: normal;
  word-break: break-word;
}

.supplier-discovery-metric-note {
  display: block;
  order: 2;
  text-align: center;
  font-size: 7px;
  line-height: 1.15;
}

.supplier-discovery-metric.is-known {
  background: #eef6fa;
  border-color: #c4dce8;
}

.supplier-discovery-metric.is-missing {
  background: #fff8e9;
  border-color: #ead9a8;
}

.supplier-discovery-metric.is-price.is-known {
  background: #eef8f1;
  border-color: #c9dfd0;
}

.supplier-discovery-metric.is-delivery.is-known {
  background: #eef6fa;
  border-color: #c8dbe7;
}

.supplier-discovery-source-button,
.supplier-discovery-source-state,
.supplier-discovery-action-state,
.supplier-discovery-action-button {
  display: inline-flex;
  height: 24px;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 8px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
}

.supplier-discovery-source-button {
  border: 1px solid #bfd3e0;
  background: #e8f2f8;
  color: #456d84 !important;
  text-decoration: none !important;
}

.supplier-discovery-source-button:hover {
  background: #dcebf3;
}

.supplier-discovery-source-state {
  margin-top: 4px;
  border: 1px solid #bfd3e0;
}

.supplier-discovery-source-state.is-ok {
  background: #e7f5eb;
  border-color: #bfd9c7;
  color: #2f6f43;
}

.supplier-discovery-source-state.is-review {
  background: #fff4d9;
  border-color: #ebd89f;
  color: #8c691f;
}

.supplier-discovery-action-state {
  margin: 0 auto 5px;
  border: 1px solid transparent;
}

.supplier-discovery-action-state.is-ready {
  background: #e7f5eb;
  border-color: #bfd9c7;
  color: #2f6f43;
}

.supplier-discovery-action-state.is-review {
  background: #fff4d9;
  border-color: #ebd89f;
  color: #8c691f;
}

.supplier-discovery-action-state.is-ignored {
  background: #f8f2db;
  border-color: #e8d998;
  color: #7c6815;
}

.supplier-discovery-action-button {
  margin: 2px auto;
  padding: 0 6px;
  border: 1px solid transparent;
  font-family: inherit;
  cursor: pointer;
}

.supplier-discovery-action-button.is-accept {
  background: #e7f5eb;
  border-color: #bfd9c7;
  color: #2f6f43;
}

.supplier-discovery-action-button.is-accept:hover {
  background: #dcefe2;
}

.supplier-discovery-action-button.is-ignore {
  background: #fff4d9;
  border-color: #ebd89f;
  color: #8c691f;
}

.supplier-discovery-action-button.is-ignore:hover {
  background: #f7edcf;
}

.supplier-discovery-warning {
  margin-top: 4px;
  font-size: 7px;
}

.supplier-discovery-table td.procurement-actions {
  min-width: 94px;
}

@media (max-width: 760px) {
  .supplier-discovery-results-panel {
    height: 420px;
  }
}


/* ================================================================
 * Supplier Discovery / Supplier Offers V7 - UI polish
 * ================================================================ */

/*
 * The resize control is now ABOVE the result list so it is immediately
 * visible without scrolling to the bottom of a long result panel.
 */
.supplier-discovery-resize-handle {
  height: 24px;
  margin: 0;
  border: 1px solid #cbdbe4;
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  background: #f5f8fa;
}

.supplier-discovery-results-panel {
  border: 1px solid #cbdbe4;
  border-radius: 0 0 6px 6px;
}

/*
 * Keep actions visually distinct even if generic button styles from older
 * intranet CSS are more specific.
 */
.supplier-discovery-action-button.is-accept {
  background: #dff3e5 !important;
  border-color: #9fc9aa !important;
  color: #2f6f43 !important;
}

.supplier-discovery-action-button.is-accept:hover {
  background: #d2ecd9 !important;
  border-color: #8fbd9b !important;
}

.supplier-discovery-action-button.is-ignore {
  background: #fff2cc !important;
  border-color: #d8bd63 !important;
  color: #7b6417 !important;
}

.supplier-discovery-action-button.is-ignore:hover {
  background: #f9e9b9 !important;
  border-color: #c9aa4d !important;
}

/* Review stays pastel yellow but is a status, not a second action counter. */
.supplier-discovery-action-state.is-review {
  background: #fff4d9 !important;
  border-color: #dfc57b !important;
  color: #81651f !important;
}

/* Verified behaves like the other compact controls. */
.supplier-discovery-source-state.is-ok {
  height: 24px;
  background: #e3f4e8 !important;
  border: 1px solid #a8cfb2 !important;
  color: #2f6f43 !important;
}

.supplier-discovery-source-state.is-review {
  height: 24px;
  background: #fff4d9 !important;
  border: 1px solid #dfc57b !important;
  color: #81651f !important;
}

/*
 * Supplier Offers toolbar:
 * Import Existing Prices and New Offer have exactly the same footprint.
 */
.supplier-offer-toolbar-button {
  display: inline-flex !important;
  width: 154px !important;
  height: 28px !important;
  box-sizing: border-box !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 8px !important;
  margin: 0 !important;
  white-space: nowrap !important;
  line-height: 1 !important;
  text-align: center !important;
  text-decoration: none !important;
  vertical-align: middle !important;
}

/*
 * Procurement new price:
 * 
 */
.procurement-new-price-button {
  display: inline-flex !important;
  width: 80px !important;
  height: 36px !important;
  box-sizing: border-box !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 8px !important;
  margin: 0 !important;
  white-space: nowrap !important;
  line-height: 1 !important;
  text-align: center !important;
  text-decoration: none !important;
  vertical-align: middle !important;
}

/* ================================================================
 * Supplier Discovery V8 - deterministic list resize
 * ================================================================ */

/*
 * V8 replaces the confusing drag handle with explicit minus/plus controls.
 * These directly change the visible result-list height and persist it.
 */
.supplier-discovery-resize-toolbar {
  display: flex;
  height: 30px;
  margin: 0;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #cbdbe4;
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  background: #f5f8fa;
}

.supplier-discovery-resize-toolbar .supplier-discovery-resize-text {
  display: inline-flex;
  min-width: 126px;
  height: 20px;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border-radius: 999px;
  background: #dde8ee;
  color: #5e7888;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.supplier-discovery-resize-button {
  display: inline-flex;
  width: 28px;
  height: 22px;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid #bfd3e0;
  border-radius: 6px;
  background: #e8f2f8;
  color: #456d84;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.supplier-discovery-resize-button:hover:not(:disabled) {
  background: #dcebf3;
}

.supplier-discovery-resize-button:disabled {
  opacity: .42;
  cursor: default;
}

.supplier-discovery-results-panel {
  border-radius: 0 0 6px 6px;
}

/* Old drag-handle presentation is retired. */
.supplier-discovery-resize-handle {
  display: none !important;
}

/*
 * Action column contains only actions now.
 * Review information is available through the Accept confirmation text.
 */
.supplier-discovery-table td.procurement-actions {
  vertical-align: middle;
}

.supplier-discovery-table td.procurement-actions form {
  display: block;
  margin: 3px 0;
}


/* ================================================================
 * Supplier Discovery V9 - drag resize + incomplete offer fix
 * ================================================================ */

.supplier-discovery-resize-toolbar {
  display: flex;
  height: 26px;
  margin: 0;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid #cbdbe4;
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  background: #f5f8fa;
  cursor: ns-resize;
  user-select: none;
  touch-action: none;
}

.supplier-discovery-resize-toolbar:hover,
.supplier-discovery-resize-toolbar.is-dragging {
  background: #edf4f7;
}

.supplier-discovery-resize-toolbar .supplier-discovery-resize-text {
  display: inline-flex;
  min-width: 126px;
  height: 18px;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border-radius: 999px;
  background: #dde8ee;
  color: #5e7888;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1;
  text-transform: uppercase;
  pointer-events: none;
}

.supplier-discovery-resize-grip {
  display: block;
  width: 38px;
  height: 3px;
  border-radius: 3px;
  background: #aebfc8;
  pointer-events: none;
}

.supplier-discovery-resize-toolbar:hover .supplier-discovery-resize-grip,
.supplier-discovery-resize-toolbar.is-dragging .supplier-discovery-resize-grip {
  background: #7699ad;
}

.supplier-discovery-resize-button {
  display: none !important;
}

body.supplier-discovery-resizing {
  cursor: ns-resize !important;
  user-select: none !important;
}

.supplier-discovery-results-panel {
  min-height: 220px;
  max-height: none !important;
  overflow: auto;
  resize: none !important;
  border-radius: 0 0 6px 6px;
}


/* ================================================================
 * Supplier Discovery V10 - visible drag feedback
 * ================================================================ */

.supplier-discovery-resize-toolbar {
  position: relative;
}

.supplier-discovery-resize-height {
  display: inline-flex;
  min-width: 48px;
  height: 18px;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  border: 1px solid #c7d7df;
  border-radius: 999px;
  background: #ffffff;
  color: #607986;
  font-size: 7px;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
}

.supplier-discovery-resize-toolbar.is-source-dragging {
  opacity: .42;
}

.supplier-discovery-resize-ghost {
  box-shadow: 0 2px 8px rgba(0, 72, 125, .14);
  pointer-events: none;
  opacity: .96;
}

.supplier-discovery-resize-ghost .supplier-discovery-resize-height {
  background: #eef6fa;
  border-color: #9ebfd0;
  color: #355f76;
}


/* ================================================================
 * Supplier Discovery V11 - pagination replaces list resizing
 * ================================================================ */

.supplier-discovery-resize-toolbar,
.supplier-discovery-resize-handle,
.supplier-discovery-resize-ghost,
.supplier-discovery-resize-height,
.supplier-discovery-resize-button {
  display: none !important;
}

.supplier-discovery-results-panel {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow-x: auto !important;
  overflow-y: visible !important;
  resize: none !important;
  border: 1px solid #cbdbe4;
  border-radius: 6px;
}

.supplier-discovery-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 9px;
}

.supplier-discovery-page-button,
.supplier-discovery-page-indicator {
  display: inline-flex;
  height: 26px;
  min-width: 42px;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  border: 1px solid #bfd3e0;
  border-radius: 6px;
  background: #e8f2f8;
  color: #456d84;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}

.supplier-discovery-page-button:hover {
  background: #dcebf3;
  text-decoration: none;
}

.supplier-discovery-page-button.is-disabled {
  opacity: .42;
  cursor: default;
}

.supplier-discovery-page-indicator {
  min-width: 58px;
  background: #f5f8fa;
  border-color: #d3dfe5;
  color: #526b79;
}


/* ================================================================
 * Supplier Discovery V12 - 5/page + robust same-path reload
 * ================================================================ */

.supplier-discovery-pagination {
  margin-top: 8px;
  margin-bottom: 2px;
}

.supplier-discovery-page-button,
.supplier-discovery-page-indicator {
  height: 24px;
}


/* ================================================================
 * Supplier Discovery V13 - AJAX pagination
 * ================================================================ */

#supplierDiscoveryResultsRegion {
  position: relative;
}

#supplierDiscoveryResultsRegion.is-loading {
  opacity: .62;
  pointer-events: none;
}

#supplierDiscoveryResultsRegion.is-loading::after {
  content: "Loading…";
  position: absolute;
  top: 8px;
  right: 10px;
  z-index: 20;
  padding: 4px 8px;
  border: 1px solid #c8d9e2;
  border-radius: 6px;
  background: #f5f8fa;
  color: #526b79;
  font-size: 8px;
  font-weight: 700;
}


/* ================================================================
 * Supplier Discovery V14 - navigation-free paging
 * ================================================================ */

button.supplier-discovery-page-button {
  font-family: inherit;
  padding: 0 10px;
  cursor: pointer;
}

button.supplier-discovery-page-button.is-disabled,
button.supplier-discovery-page-button:disabled {
  opacity: .42;
  cursor: default;
}

.supplier-discovery-page-error {
  margin-bottom: 8px;
  padding: 7px 9px;
  border: 1px solid #e2bf7b;
  border-radius: 6px;
  background: #fff7e4;
  color: #7b5d1d;
  font-size: 9px;
}


/* ================================================================
 * Supplier Discovery V17 - compact manual candidate status control
 * ================================================================ */

.supplier-discovery-status-form {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin: 0 !important;
}

.supplier-discovery-status-select {
  width: 92px;
  height: 26px;
  box-sizing: border-box;
  padding: 0 18px 0 6px;
  border: 1px solid #c9d0d5;
  border-radius: 6px;
  font-family: inherit;
  font-size: 8px;
  font-weight: 700;
  line-height: 24px;
  text-align: center;
  text-align-last: center;
  cursor: pointer;
  outline: none;
}

.supplier-discovery-status-select.is-pending {
  background: #f1f1f1;
  border-color: #c9c9c9;
  color: #555555;
}

.supplier-discovery-status-select.is-accepted {
  background: #e7f5eb;
  border-color: #9fc9aa;
  color: #2f6f43;
}

.supplier-discovery-status-select.is-ignored {
  background: #eee8df;
  border-color: #cdbfae;
  color: #6c5a46;
}

.supplier-discovery-status-apply {
  display: inline-flex;
  width: 92px;
  height: 26px;
  margin: 0;
  padding: 0 6px;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  border: 1px solid #bdcbd4;
  border-radius: 6px;
  background: #edf3f6;
  color: #405d6f;
  font-family: inherit;
  font-size: 8px;
  font-weight: 700;
  cursor: pointer;
}

.supplier-discovery-status-apply:hover {
  background: #e2ebf0;
  border-color: #aabdc8;
}


.supplier-discovery-table td.procurement-actions {
  min-width: 104px;
}

/* ================================================================
 * Supplier Discovery V18 - exact status control alignment
 * ================================================================ */

/*
 * .procurement-table select { width: 100%; } has higher selector
 * specificity than the single status class. Override it explicitly
 * so select and Apply button always have identical dimensions.
 */
.supplier-discovery-table .supplier-discovery-status-form {
  width: 96px;
  margin: 0 auto !important;
  align-items: stretch;
}

.supplier-discovery-table .supplier-discovery-status-select,
.supplier-discovery-table .supplier-discovery-status-apply {
  display: flex;
  width: 96px !important;
  min-width: 96px !important;
  max-width: 96px !important;
  height: 26px !important;
  min-height: 26px !important;
  max-height: 26px !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

.supplier-discovery-table .supplier-discovery-status-select {
  display: block;
}

.supplier-discovery-table td.procurement-actions {
  text-align: center;
}

