:root {
  font-family:
    system-ui,
    -apple-system,
    Segoe UI,
    sans-serif;
  color: #18313a;
  background: #f4f8f7;
  font-size: 16px;
  line-height: 1.5;
  --teal: #087b76;
  --line: #dce7e4;
  --muted: #526970;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: #076d69;
  text-underline-offset: 3px;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
.btn {
  cursor: pointer;
  border: 1px solid #b9d8d3;
  background: #eaf5f2;
  color: #155b56;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  font-weight: 650;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}
button:hover,
.btn:hover {
  filter: brightness(0.95);
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
button.primary,
.btn.primary {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
}
button.danger {
  background: #fff0ed;
  color: #982920;
  border-color: #eac4be;
}
input,
select,
textarea {
  width: 100%;
  padding: 0.62rem 0.7rem;
  border: 1px solid #b9cfcb;
  border-radius: 7px;
  background: white;
  color: inherit;
}
textarea {
  min-height: 100px;
  resize: vertical;
}
label {
  display: block;
  font-size: 0.9rem;
  font-weight: 650;
  color: #3b565d;
}
label input,
label select,
label textarea {
  margin-top: 5px;
  font-weight: 400;
}
input[type="checkbox"],
input[type="radio"] {
  width: 20px;
  height: 20px;
  margin: 0;
  flex-shrink: 0;
}
input:focus-visible,
button:focus-visible,
a:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #ffc515;
  outline-offset: 3px;
}
.check {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 0.5rem 0;
}
.head {
  background: #fff;
  border-bottom: 4px solid var(--teal);
  padding: 1rem max(1rem, 3vw);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.identity {
  display: flex;
  gap: 24px;
  align-items: center;
}
.logo {
  width: 160px;
  max-width: 30vw;
}
.head h1 {
  font-size: 1.18rem;
  margin: 0;
  color: #075e5b;
}
.muted {
  color: var(--muted);
  font-size: 0.9rem;
}
.head .muted {
  margin-top: 3px;
}
.account {
  font-size: 0.9rem;
  text-align: right;
}
.account button {
  padding: 0.35rem 0.6rem;
  font-size: 0.85rem;
}
.layout {
  max-width: 1480px;
  margin: auto;
  padding: 20px 28px;
}
.nav {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.nav a {
  font-size: 0.9rem;
  padding: 9px 12px;
  border-radius: 7px;
  color: #245b56;
  text-decoration: none;
  background: #e7f1ee;
  font-weight: 650;
}
.nav a.active {
  background: var(--teal);
  color: #fff;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 16px;
}
.page-heading h2 {
  font-size: 1.55rem;
  margin: 0;
  letter-spacing: -0.025em;
}
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 18px;
}
.card h3 {
  font-size: 1.06rem;
  margin: 0 0 14px;
  color: #17534f;
}
.card p:first-child {
  margin-top: 0;
}
.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.full {
  grid-column: 1/-1;
}
.actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 16px;
}
.actions.flat {
  margin-top: 0;
}
.scan {
  border-left: 5px solid #ffc515;
  display: flex;
  gap: 10px;
  align-items: end;
}
.scan label {
  flex: 1;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}
.stat {
  background: #fff;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.stat strong {
  font-size: 1.7rem;
  display: block;
  font-weight: 650;
  line-height: 1.2;
}
.stat span {
  font-size: 0.9rem;
  color: var(--muted);
}
.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 9px;
}
table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}
th,
td {
  text-align: left;
  padding: 11px 12px;
  border-bottom: 1px solid #e7eeec;
  font-size: 0.9rem;
  vertical-align: top;
}
th {
  background: #e5f0ed;
  color: #24544e;
  font-weight: 650;
  white-space: nowrap;
}
td small {
  display: block;
  color: var(--muted);
}
tr:last-child td {
  border-bottom: 0;
}
tr:hover td {
  background: #f5faf8;
}
.nowrap {
  white-space: nowrap;
}
.badge {
  display: inline-block;
  font-size: 0.85rem;
  padding: 2px 9px;
  border-radius: 5px;
  white-space: nowrap;
  background: #edf1f2;
}
.badge.free,
.badge.vorhanden {
  background: #e8f4de;
  color: #3a5f2f;
}
.badge.loan {
  background: #fff2bc;
  color: #715500;
}
.badge.retired {
  background: #eee;
  color: #555;
}
.badge.fehlt {
  background: #ffebe6;
  color: #8b2c1d;
}
.badge.defekt {
  background: #fff0d1;
  color: #794c0c;
}
tr.retired td {
  background: repeating-linear-gradient(
    135deg,
    #fff4f1 0,
    #fff4f1 8px,
    #fff 8px,
    #fff 16px
  );
}
.error,
.notice,
.success {
  padding: 12px 14px;
  border-radius: 8px;
  margin: 12px 0;
  white-space: pre-wrap;
}
.error {
  background: #fff0ed;
  color: #8c2820;
  border: 1px solid #efccc5;
}
.notice {
  background: #fff8dc;
  color: #665221;
}
.success {
  background: #eaf5e4;
  color: #31572a;
}
.empty {
  padding: 30px;
  color: var(--muted);
  text-align: center;
}
.details {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.details dt {
  color: var(--muted);
  font-size: 0.86rem;
}
.details dd {
  margin: 3px 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.photos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}
.photos img {
  width: 100%;
  height: 200px;
  object-fit: contain;
  background: #f1f5f4;
  border-radius: 8px;
}
.photos figure {
  margin: 0;
}
.photos figcaption {
  font-size: 0.9rem;
}
.login {
  max-width: 440px;
  margin: 8vh auto;
  padding: 28px;
}
.login .logo {
  max-width: 100%;
  width: 220px;
  display: block;
  margin: 0 auto 25px;
}
.login h1 {
  font-size: 1.3rem;
}
.login label {
  margin-bottom: 15px;
}
.login button {
  width: 100%;
}
.loading {
  padding: 60px;
  text-align: center;
}
.danger-card {
  border-color: #edc6be;
}
.drag {
  cursor: grab;
}
#numberRows input {
  min-width: 100px;
  width: 120px;
}
.preview {
  border: 2px solid var(--teal);
}
.subtle {
  font-size: 0.9rem;
  color: var(--muted);
}
video {
  width: 100%;
  max-width: 560px;
}
.activity td:last-child {
  max-width: 380px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
summary {
  cursor: pointer;
}
footer {
  text-align: right;
  font-size: 0.82rem;
  color: #526970;
  padding: 18px 0;
}
.field-error {
  color: #922c24;
  font-size: 0.9rem;
}
.inline-form {
  display: flex;
  gap: 8px;
  align-items: center;
}
.inline-form select {
  min-width: 150px;
}
.scroll-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
@media (max-width: 950px) {
  .grid,
  .details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .head {
    align-items: flex-start;
  }
  .identity {
    gap: 14px;
  }
  .layout {
    padding: 16px;
  }
  .account {
    max-width: 200px;
  }
  .table-wrap table {
    min-width: 720px;
  }
}
@media (max-width: 600px) {
  .head {
    padding: 12px;
    flex-wrap: wrap;
    gap: 8px;
  }
  .logo {
    width: 105px;
  }
  .head h1 {
    font-size: 1rem;
  }
  .account {
    max-width: none;
    text-align: left;
    width: 100%;
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
  }
  .account .muted {
    display: none;
  }
  .layout {
    padding: 12px;
  }
  .grid,
  .grid.two,
  .details,
  .photos {
    grid-template-columns: 1fr;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .scan {
    flex-wrap: wrap;
  }
  .scan label {
    flex-basis: 100%;
  }
  .page-heading {
    align-items: flex-start;
  }
  .page-heading h2 {
    font-size: 1.3rem;
  }
  .nav {
    gap: 5px;
  }
  .nav a {
    font-size: 0.86rem;
    padding: 7px 9px;
  }
  .card {
    padding: 16px;
  }
  .login {
    margin: 24px 12px;
  }
  .stat strong {
    font-size: 1.4rem;
  }
}
@media print {
  .head,
  .nav,
  .no-print,
  button,
  form,
  footer {
    display: none !important;
  }
  .layout {
    max-width: none;
    padding: 0;
  }
  .card {
    border: 0;
    padding: 0;
    break-inside: avoid;
  }
  .table-wrap {
    overflow: visible;
    border: 0;
  }
  table {
    min-width: 0 !important;
  }
  td,
  th {
    font-size: 9pt;
    padding: 5px;
  }
  .stats {
    display: none;
  }
  a {
    color: #000;
    text-decoration: none;
  }
  .page-heading {
    margin-bottom: 20px;
  }
}
