:root {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #18332e;
  background: #f5f7f4;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.6;
}
header {
  height: 82px;
  background: #fff;
  border-bottom: 1px solid #e0e6de;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(6vw, 24px);
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 19px;
  font-weight: 750;
  letter-spacing: -0.6px;
}
.logo {
  background: #1d5a46;
  color: white;
  width: 35px;
  height: 35px;
  border-radius: 10px;
  display: grid;
  place-items: center;
}
.header-tag {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #75857c;
}
main {
  max-width: 1120px;
  margin: auto;
  padding: 58px 28px 72px;
}
.eyebrow {
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #557060;
  font-weight: 650;
}
h1 {
  font-size: clamp(34px, 5vw, 48px);
  letter-spacing: -2px;
  margin: 12px 0 13px;
  line-height: 1.12;
}
.intro {
  color: #6c7a72;
  line-height: 1.6;
  margin: 0;
  font-size: 16px;
}
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 34px;
}
.search-heading {
  margin: 0;
  padding: 8px 0;
  font-size: clamp(20px, 2vw, 24px);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.4px;
  text-wrap: balance;
}
.primary {
  border: 0;
  color: #fff;
  background: #205e49;
  border-radius: 8px;
  padding: 13px 20px;
  font-size: 14px;
  font-weight: 650;
  white-space: nowrap;
}
.primary:hover {
  background: #174a38;
}
.searchbox {
  background: white;
  border: 1px solid #d9e1d7;
  border-radius: 12px;
  box-shadow: 0 4px 12px #193c2410;
  padding: 20px;
  display: flex;
  gap: 14px;
  align-items: center;
}
.searchicon {
  color: #6e8075;
  font-size: 27px;
}
.searchbox input {
  border: 0;
  outline: 0;
  flex: 1;
  min-width: 0;
  color: #17362d;
  font-size: 16px;
  background: transparent;
}
.searchbox:focus-within {
  outline: 2px solid #438565;
  outline-offset: 2px;
}
.clear {
  border: 0;
  background: #f0f4ed;
  border-radius: 6px;
  padding: 6px 10px;
  color: #526859;
}
.hint {
  font-size: 12px;
  color: #78867b;
  margin: 12px 2px 34px;
}
.resultsbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 17px;
}
.resultsbar h2 {
  font-size: 16px;
  margin: 0;
}
.count {
  background: #e4ebe1;
  border-radius: 5px;
  padding: 4px 8px;
  margin-left: 8px;
  font-size: 12px;
  color: #46634d;
}
.sort {
  font-size: 12px;
  color: #7a887c;
}
.table {
  border: 1px solid #dfe5dc;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.row {
  display: grid;
  grid-template-columns: 210px 1fr 115px;
  gap: 24px;
  padding: 22px 25px;
  align-items: center;
  border-bottom: 1px solid #edf0e9;
}
.row:last-child {
  border: 0;
}
.tablehead {
  background: #edf2ea;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.4px;
  color: #647764;
  padding-top: 15px;
  padding-bottom: 15px;
}
.part {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-weight: 650;
  font-size: 14px;
  overflow-wrap: anywhere;
  color: #214e3d;
}
.desc {
  font-size: 14px;
  line-height: 1.65;
  color: #56655b;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.copy {
  border: 1px solid #dbe4d7;
  border-radius: 6px;
  background: #fff;
  padding: 9px 12px;
  color: #3f624e;
  font-size: 12px;
}
.copy:hover {
  background: #f0f5eb;
}
.empty {
  padding: 65px 24px;
  text-align: center;
}
.emptyicon {
  display: inline-grid;
  place-items: center;
  height: 52px;
  width: 52px;
  border-radius: 14px;
  background: #edf3e8;
  font-size: 24px;
  color: #5b7c5e;
}
.empty h3 {
  font-size: 19px;
  margin: 18px 0 8px;
  letter-spacing: -0.4px;
}
.empty p {
  font-size: 14px;
  color: #788579;
  line-height: 1.7;
}
.empty button {
  margin-top: 10px;
}
.error {
  color: #a32c2c;
}
.footer {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid #dfe5da;
  margin-top: 40px;
  padding-top: 20px;
  color: #879182;
  font-size: 11px;
  letter-spacing: 0.2px;
}
.pages {
  display: flex;
  gap: 15px;
  align-items: center;
  justify-content: flex-end;
  margin-top: 16px;
  font-size: 13px;
}
.pages button {
  border: 1px solid #dbe4d7;
  background: white;
  padding: 8px 14px;
  border-radius: 6px;
  color: #3f624e;
}
dialog {
  border: 1px solid #dae3d5;
  border-radius: 16px;
  max-width: 520px;
  width: calc(100% - 32px);
  padding: 30px;
  box-shadow: 0 20px 100px #173c3933;
  color: #18332e;
}
dialog::backdrop {
  background: #102c2466;
  backdrop-filter: blur(3px);
}
dialog h2 {
  margin: 0 0 8px;
  letter-spacing: -0.7px;
}
.modalintro {
  font-size: 14px;
  color: #6c7a72;
  line-height: 1.5;
  margin-bottom: 25px;
}
label {
  display: block;
  font-size: 13px;
  font-weight: 650;
  margin: 18px 0 8px;
}
.field {
  border: 1px solid #cfdbca;
  border-radius: 7px;
  padding: 12px;
  width: 100%;
  color: #18332e;
  background: #fafcf9;
}
.field:focus {
  outline: 2px solid #438565;
  outline-offset: 1px;
}
textarea {
  min-height: 130px;
  resize: vertical;
}
.actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 23px;
}
.secondary {
  background: white;
  border: 1px solid #d9e2d4;
  border-radius: 7px;
  padding: 12px 18px;
  color: #51624f;
}
.formerror {
  font-size: 13px;
  color: #a32c2c;
  min-height: 18px;
  margin-top: 12px;
}
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  background: #203e31;
  color: #fff;
  padding: 14px 22px;
  border-radius: 9px;
  box-shadow: 0 5px 30px #0002;
  font-size: 14px;
  z-index: 5;
}
mark {
  background: #e4f0ba;
  color: inherit;
  border-radius: 2px;
}
button:focus-visible {
  outline: 2px solid #438565;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
@media (max-width: 650px) {
  header {
    height: 70px;
  }
  .header-tag {
    display: none;
  }
  main {
    padding: 35px 20px;
  }
  .top {
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 24px;
  }
  h1 {
    letter-spacing: -1.3px;
  }
  .row {
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 20px;
  }
  .row .desc {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .tablehead {
    display: none;
  }
  .footer {
    gap: 20px;
    line-height: 1.5;
  }
  .searchbox {
    padding: 17px;
  }
  .sort {
    display: none;
  }
  .copy {
    grid-column: 2;
    grid-row: 1;
  }
}

/* Employee account controls and part actions. */
.account-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.login-status {
  color: #647764;
  font-size: 12px;
}
.part-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 7px;
}
.remove {
  border: 0;
  background: transparent;
  color: #9b3931;
  font-size: 12px;
  padding: 5px 8px;
}
.remove:hover {
  text-decoration: underline;
}
.danger {
  background: #a13c33;
}
.danger:hover {
  background: #843029;
}
@media (max-width: 650px) {
  .part-actions {
    grid-column: 2;
    grid-row: 1;
  }
  .login-status {
    display: none;
  }
  .account-actions .secondary {
    font-size: 12px;
    padding: 9px 12px;
  }
}

/* The directory stays hidden until the server confirms a valid login. */
#login-screen {
  padding-top: 64px;
}
.login-card {
  max-width: 440px;
  margin: 0 auto;
  padding: 32px;
  background: #fff;
  border: 1px solid #dfe5dc;
  border-radius: 14px;
  box-shadow: 0 6px 28px #193c240a;
}
.login-card h2 {
  margin: 0 0 8px;
  font-size: 25px;
  letter-spacing: -0.6px;
}
@media (max-width: 650px) {
  #login-screen {
    padding-top: 32px;
  }
  .login-card {
    padding: 24px;
  }
}

.edit {
  border: 1px solid #dbe4d7;
  border-radius: 6px;
  background: #f5f8f2;
  color: #3f624e;
  padding: 8px;
  font-size: 12px;
}
.edit:hover {
  background: #eaf1e3;
}

/* Copy icons sit beside their value; information opens in a dialog. */
.part-with-copy,
.description-with-copy {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}
.part-with-copy > span,
.description-with-copy > span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.copy-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  margin-top: -3px;
  padding: 5px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #537461;
}
.copy-icon:hover {
  background: #edf3e7;
  color: #205e49;
}
.part-info-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin: 0 auto;
  border: 1px solid #dbe4d7;
  border-radius: 50%;
  background: #fff;
  font-size: 20px;
  color: #537461;
  cursor: pointer;
  list-style: none;
}
.part-info-button:hover {
  background: #edf3e7;
}
.part-info-button:focus-visible {
  outline: 2px solid #438565;
  outline-offset: 3px;
}
.info-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  border: 1px solid #dbe4d7;
  border-radius: 8px;
  background: #f7faf4;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.info-label {
  color: #748171;
  font-size: 11px;
}
.info-panel .remove {
  margin-top: 4px;
  border-top: 1px solid #e0e6da;
  padding-top: 12px;
}
@media (max-width: 650px) {
  .row .description-with-copy {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

#info-modal {
  width: min(520px, calc(100% - 32px));
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
}
.info-part-number {
  margin: 10px 0 24px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  color: #52705e;
  overflow-wrap: anywhere;
}
.info-panel .edit,
.info-panel .remove {
  padding: 12px 16px;
  font-size: 14px;
}

/* Admin access request dashboard. */
.admin-dashboard {
  margin-bottom: 36px;
  padding: 28px;
  border: 1px solid #dfe5dc;
  border-radius: 14px;
  background: #fff;
}
.dashboard-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.dashboard-heading h2 {
  margin: 0;
}
.dashboard-heading .modalintro {
  margin-bottom: 0;
}
#admin-requests {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 16px;
}
.request-card {
  padding: 22px;
  border: 1px solid #dfe5dc;
  border-radius: 10px;
  background: #f8faf6;
  min-width: 0;
}
.request-card h3 {
  margin: 0 0 18px;
  overflow-wrap: anywhere;
}
.request-card dl {
  margin: 0;
  font-size: 14px;
}
.request-card dt {
  color: #647764;
  font-size: 12px;
  margin-top: 12px;
}
.request-card dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
}
#access-modal {
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
}
@media (max-width: 650px) {
  header {
    min-height: 70px;
    height: auto;
    padding: 16px 20px;
    flex-wrap: wrap;
    gap: 12px;
  }
  .account-actions {
    flex-wrap: wrap;
    gap: 8px;
  }
  .admin-dashboard {
    padding: 20px;
  }
  .login-card .actions,
  .request-card .actions {
    flex-wrap: wrap;
  }
  .dashboard-heading {
    flex-wrap: wrap;
  }
}
#directory > .searchbox {
  margin-bottom: 30px;
}

/* Admin tools open in the same modal style as part information. */
#admin-dashboard {
  width: min(900px, calc(100% - 32px));
  max-width: 900px;
  max-height: calc(100dvh - 40px);
  margin: auto;
  overflow-y: auto;
  padding: 28px;
}
.dashboard-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}
.dashboard-menu [aria-selected="true"] {
  background: #205e49;
  color: #fff;
  border-color: #205e49;
}
#requests-panel > .dashboard-heading {
  margin-bottom: 20px;
  align-items: center;
}
.users-heading {
  align-items: center;
  margin-bottom: 20px;
}
.users-heading .modalintro {
  margin: 0;
}
.new-user-form {
  padding: 22px;
  border: 1px solid #dfe5dc;
  border-radius: 10px;
  background: #f8faf6;
  margin-bottom: 24px;
}
.new-user-form h3 {
  margin: 0;
}
#admin-users {
  display: grid;
  gap: 12px;
}
.user-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 20px;
  border: 1px solid #dfe5dc;
  border-radius: 10px;
  background: #f8faf6;
  min-width: 0;
}
.user-card h3 {
  margin: 0 0 6px;
  font-size: 16px;
  overflow-wrap: anywhere;
}
.user-card p {
  margin: 4px 0;
  font-size: 13px;
  color: #647764;
  overflow-wrap: anywhere;
}
.user-card > div {
  min-width: 0;
}
.user-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  flex-shrink: 0;
}
.admin-switch {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  cursor: pointer;
  font-size: 13px;
}
.admin-switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.switch-track {
  width: 38px;
  height: 22px;
  border-radius: 20px;
  background: #a2afa4;
  padding: 3px;
  transition: background 0.15s;
}
.switch-track::after {
  content: "";
  display: block;
  width: 16px;
  height: 16px;
  background: white;
  border-radius: 50%;
  transition: transform 0.15s;
}
.admin-switch input:checked + .switch-track {
  background: #205e49;
}
.admin-switch input:checked + .switch-track::after {
  transform: translateX(16px);
}
.admin-switch input:focus-visible + .switch-track {
  outline: 2px solid #438565;
  outline-offset: 3px;
}
.admin-switch input:disabled + .switch-track {
  opacity: 0.5;
}
.remove-user {
  color: #9b3931;
  padding: 9px 12px;
  font-size: 13px;
}
@media (max-width: 650px) {
  #admin-dashboard {
    padding: 22px;
  }
  .user-card {
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
  }
  .user-controls {
    justify-content: space-between;
    gap: 12px;
  }
  .new-user-form {
    padding: 16px;
  }
}
