﻿.auth-error { max-width: 52rem; margin: 2rem auto; padding: 1.25rem; color: #8b1d1d; }
.flash { margin: 0 0 1rem; padding: .8rem 1rem; border-radius: .45rem; font-weight: 700; }
.flash.success { color: #245b28; background: #e8f5e9; border: 1px solid #8fc493; }
main {
  flex: 1 0 auto;
  width: 100%;
  margin: 0 auto;
  padding: 1.25rem clamp(.6rem, 1.5vw, 1.25rem) 3rem;
}
.panel {
  background: white;
  border: 1px solid #cddbeb;
  border-radius: .6rem;
  box-shadow: 0 2px 8px rgb(0 56 131 / 8%);
}
#filters { display: block; }
label { display: grid; gap: .35rem; min-width: 0; font-weight: 600; font-size: .84rem; }
input, select, button {
  min-height: 2.55rem;
  border: 1px solid #aeb9c8;
  border-radius: .35rem;
  padding: .55rem .7rem;
  font: inherit;
  background: white;
}
.column-filter {
  width: 100%;
  min-width: 0;
  min-height: 1.8rem;
  padding: .28rem .35rem;
  font-size: .68rem;
}
.column-filter:is(select) {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23536176' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .4rem center;
  background-size: 8px 5px;
  padding-right: 1.15rem;
}
#expirationDate::placeholder { font-size: clamp(.48rem, .65vw, .66rem); }
.multi-filter { position: relative; min-width: 0; font-weight: 400; }
.multi-filter summary {
  display: flex;
  min-height: 1.8rem;
  align-items: center;
  justify-content: space-between;
  gap: .4rem;
  padding: .28rem .35rem;
  overflow: hidden;
  color: #15243a;
  background: white;
  border: 1px solid #aeb9c8;
  border-radius: .35rem;
  cursor: pointer;
  list-style: none;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: .68rem;
}
.multi-filter summary::-webkit-details-marker { display: none; }
.multi-filter summary::after {
  flex: 0 0 auto;
  width: 0;
  height: 0;
  border-top: 5px solid #536176;
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
  content: "";
}
.multi-filter[open] summary { border-color: var(--eurofins-blue); outline: 3px solid rgb(0 56 131 / 20%); }
.multi-filter-options {
  position: absolute;
  top: calc(100% + .3rem);
  left: 0;
  z-index: 5;
  display: grid;
  min-width: 12rem;
  max-height: 16rem;
  padding: .35rem;
  overflow-y: auto;
  background: white;
  border: 1px solid #aeb9c8;
  border-radius: .35rem;
  box-shadow: 0 8px 22px rgb(0 35 82 / 18%);
}
.multi-filter-option {
  display: flex;
  min-height: 2rem;
  align-items: center;
  gap: .45rem;
  padding: .35rem .4rem;
  border-radius: .25rem;
  font-size: .78rem;
  font-weight: 500;
  cursor: pointer;
}
.multi-filter-option:hover { background: var(--eurofins-blue-soft); }
.multi-filter-option input { width: 1rem; min-height: 1rem; margin: 0; padding: 0; accent-color: var(--eurofins-orange); }
input:focus, select:focus, button:focus {
  outline: 3px solid rgb(0 56 131 / 20%);
  border-color: var(--eurofins-blue);
}
button { cursor: pointer; font-weight: 700; }
button[type="submit"] { color: white; background: var(--eurofins-orange); border-color: var(--eurofins-orange); }
button[type="reset"] { color: #26364d; background: #eef2f7; }
.tag-cell { min-width: 0; }
.tag-list {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: .12rem;
  align-items: flex-start;
}
.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: .08rem;
  max-width: 100%;
  padding: .06rem .12rem .06rem .26rem;
  color: var(--eurofins-blue);
  background: var(--eurofins-blue-soft);
  border: 1px solid #9eb8da;
  border-radius: 999px;
  font-size: .56rem;
  font-weight: 700;
  line-height: 1.05;
}
.tag-remove, .tag-add {
  width: .88rem;
  min-height: .88rem;
  padding: 0;
  border-radius: 999px;
  font-size: .58rem;
  line-height: 1;
}
.tag-remove { border: 0; color: var(--eurofins-blue); background: transparent; }
.tag-remove:hover { color: white; background: var(--eurofins-orange); }
.tag-add { border-style: dashed; color: var(--eurofins-orange); background: var(--eurofins-orange-soft); }
.tag-add-select {
  width: 100%;
  min-height: 1.45rem;
  padding: .12rem .25rem;
  font-size: .62rem;
}
.unassigned { color: #657287; font-style: italic; }
.results { overflow: hidden; }
.results-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #dce2ea;
}
.results-header h2 { margin: 0; font-size: 1.05rem; }
.results-actions { display: flex; align-items: center; gap: .75rem; }
#reset-filters, #export-csv { min-height: 2.25rem; padding: .35rem .65rem; color: var(--eurofins-blue); border-color: #9eb8da; }
#export-csv:disabled { cursor: not-allowed; opacity: .55; }
#select-for-alert { min-height: 2.25rem; color: var(--eurofins-blue); background: white; border-color: #9eb8da; }
#select-for-alert:disabled { cursor: not-allowed; opacity: .55; }
#set-alarm { min-height: 2.25rem; color: white; background: var(--eurofins-orange); border-color: var(--eurofins-orange); }
#set-alarm:disabled { cursor: not-allowed; opacity: .55; }
.results-summary { display: grid; gap: .3rem; }
.pagination { display: flex; align-items: center; gap: .55rem; }
.pagination button { min-height: 2rem; padding: .3rem .65rem; color: var(--eurofins-blue); border-color: #9eb8da; }
#status { color: #536176; font-size: .9rem; }
#status.error { color: #a32121; font-weight: 600; }
#sync-status { color: #536176; font-size: .78rem; }
#sync-status.degraded { color: #a32121; font-weight: 600; }
.table-wrap { min-height: min(20rem, 68vh); overflow-x: hidden; overflow-y: auto; max-height: 68vh; }
table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: clamp(.62rem, .72vw, .76rem); }
th, td {
  padding: .5rem .38rem;
  border-bottom: 1px solid #e2e7ee;
  text-align: left;
  vertical-align: top;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.25;
}
th { position: sticky; top: 0; z-index: 1; color: var(--eurofins-blue); background: var(--eurofins-blue-soft); }
th:has(.multi-filter[open]) { z-index: 4; }
.column-label { display: block; min-height: 1.8em; margin-bottom: .3rem; font-size: .7rem; font-weight: 800; line-height: 1.15; }
.column-resizer {
  position: absolute;
  top: 0;
  right: -4px;
  bottom: 0;
  width: 8px;
  z-index: 2;
  cursor: col-resize;
  touch-action: none;
}
.column-resizer::after {
  content: "";
  position: absolute;
  top: 20%;
  right: 3px;
  bottom: 20%;
  width: 1px;
  background: #aeb9c8;
}
.column-resizer:hover::after, body.resizing-columns .column-resizer::after {
  width: 2px;
  background: var(--eurofins-orange);
}
body.resizing-columns { cursor: col-resize; user-select: none; }
tbody tr:hover { background: #f3f7fc; }
.name { white-space: normal; }
.mono { font-family: Consolas, "Courier New", monospace; font-size: .68rem; }
.badge {
  display: inline-block;
  padding: .18rem .48rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 700;
}
.badge.expired { color: #8b1d1d; background: #fde8e8; }
.badge.near { color: #6f5200; background: #ffe58f; border: 1px solid #e5be36; }
.badge.active { color: var(--eurofins-blue); background: var(--eurofins-blue-soft); }
.empty { padding: 2rem; color: #657287; text-align: center; }
.select-cell { text-align: center; }
.select-cell input { width: 1rem; height: 1rem; min-height: auto; padding: 0; accent-color: var(--eurofins-orange); }
.alert-selection { margin-bottom: 1rem; overflow: hidden; background: #f8fbff; }
.alert-selection-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem .35rem; }
.alert-selection-header h2 { margin: 0 0 .2rem; color: var(--eurofins-blue); font-size: 1.05rem; }
.alert-selection-actions { display: flex; align-items: center; gap: .6rem; }
.alert-selection-hint { margin: 0; padding: 0 1.25rem; color: #536176; font-size: .84rem; }
#alert-cart-count { color: #536176; font-size: .82rem; }
.alert-cart-list { display: flex; flex-wrap: wrap; gap: .5rem; margin: .8rem 0 0; padding: 0 1.25rem 1.2rem; list-style: none; }
.alert-cart-item { display: inline-flex; align-items: center; gap: .5rem; padding: .38rem .42rem .38rem .65rem; color: var(--eurofins-blue); background: white; border: 1px solid #9eb8da; border-radius: 999px; font-size: .78rem; font-weight: 650; }
.alert-cart-item button { display: inline-grid; width: 1.45rem; min-height: 1.45rem; place-items: center; padding: 0; color: #8b1d1d; border: 0; border-radius: 999px; background: transparent; font-size: 1rem; line-height: 1; }
.alert-cart-item button:hover { color: white; background: #a32121; }
.alert-cart-empty { color: #657287; font-size: .84rem; }
dialog { width: min(620px, calc(100% - 2rem)); padding: 0; color: #15243a; border: 0; border-radius: .65rem; box-shadow: 0 20px 60px rgb(0 35 82 / 32%); }
dialog::backdrop { background: rgb(15 31 52 / 58%); }
.alert-dialog-form { display: grid; gap: 1rem; padding: 1.5rem; }
.alert-dialog-form h2 { margin: 0; color: var(--eurofins-blue); }
.alert-dialog-form > p { margin: -.5rem 0 0; color: #536176; }
.alert-dialog-fields { display: grid; grid-template-columns: 1fr 11rem; gap: .85rem; }
.alert-dialog-fields .wide { grid-column: 1 / -1; }
.recipient-entry { display: grid; grid-template-columns: 1fr auto; gap: .5rem; }
.recipient-entry button { min-width: 8.5rem; }
.recipient-entry button:disabled { cursor: not-allowed; opacity: .55; }
.recipient-status { min-height: 1.15rem; color: #536176; font-size: .78rem; font-weight: 500; }
.recipient-status.valid { color: #245b28; }
.recipient-status.invalid { color: #a32121; font-weight: 650; }
.recipient-list { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; list-style: none; }
.recipient-chip { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .45rem .35rem .65rem; color: var(--eurofins-blue); background: var(--eurofins-blue-soft); border: 1px solid #9eb8da; border-radius: 999px; font-size: .76rem; }
.recipient-chip button { min-height: 1.4rem; padding: .05rem .35rem; color: #8b1d1d; border: 0; border-radius: 999px; background: transparent; }
.alert-target-summary { max-height: 11rem; margin: 0; padding: .65rem .65rem .65rem 1.8rem; overflow: auto; color: #536176; background: #f4f7fb; border-radius: .4rem; font-size: .84rem; }
.dialog-actions { display: flex; align-items: center; justify-content: flex-end; gap: .65rem; }
.dialog-actions .primary { color: white; background: var(--eurofins-orange); border-color: var(--eurofins-orange); }
.dialog-status { min-height: 1.2rem; margin-right: auto; color: #a32121; font-size: .85rem; font-weight: 650; }
@media (max-width: 700px) {
  .header-content { align-items: flex-start; }
  .results-header { align-items: flex-start; flex-direction: column; }
  .alert-selection-header { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 1100px) {
  table { font-size: .6rem; }
  th, td { padding: .4rem .25rem; }
}
