﻿html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.error-stack {
    white-space: pre-wrap;
    margin: 0;
}

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.page {
  position: relative;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

.sidebar {
  background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%);
}

.top-row {
  height: 4.5rem;
  background-color: rgba(0,0,0,0.4);
}

.navbar-brand {
  font-size: 1.1rem;
}

.navbar-home-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  width: 3.5rem;
  height: 2.5rem;
  color: white;
  position: absolute;
  top: 0.5rem;
  right: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.16);
  text-decoration: none;
}

.navbar-home-button:hover {
  border-color: rgba(255, 255, 255, 0.78);
  background-color: rgba(255, 255, 255, 0.22);
  text-decoration: none;
}

.navbar-home-button:active {
  border-color: rgba(255, 255, 255, 0.9);
  background-color: rgba(255, 255, 255, 0.34);
}

.navbar-home-button .bi {
  margin-right: 0;
  top: 0;
}

.bi {
  display: inline-block;
  position: relative;
  width: 1.25rem;
  height: 1.25rem;
  margin-right: 0.75rem;
  top: -1px;
  background-size: cover;
}

.bi-house-door-fill-nav-menu {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-house-door-fill' viewBox='0 0 16 16'%3E%3Cpath d='M6.5 14.5v-3.505c0-.245.25-.495.5-.495h2c.25 0 .5.25.5.5v3.5a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5v-7a.5.5 0 0 0-.146-.354L13 5.793V2.5a.5.5 0 0 0-.5-.5h-1a.5.5 0 0 0-.5.5v1.293L8.354 1.146a.5.5 0 0 0-.708 0l-6 6A.5.5 0 0 0 1.5 7.5v7a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5Z'/%3E%3C/svg%3E");
}

.navbar-home-button .bi-house-door-fill-nav-menu {
  display: inline-block;
  position: relative;
  width: 1.25rem;
  height: 1.25rem;
  background-size: cover;
}

.nav-item {
  font-size: 0.9rem;
  padding-bottom: 0.5rem;
}

.nav-item:first-of-type {
  padding-top: 1rem;
}

.nav-item:last-of-type {
  padding-bottom: 1rem;
}

.nav-item .nav-link {
  color: #d7d7d7;
  background: none;
  border: none;
  border-radius: 4px;
  display: flex;
  align-items: flex-start;
  padding: 0.75rem 0.75rem;
  min-height: 3rem;
  line-height: 1.25rem;
  width: 100%;
  white-space: normal;
}

.nav-item a.active {
  background-color: rgba(255,255,255,0.37);
  color: white;
}

.nav-item .nav-link:hover {
  background-color: rgba(255,255,255,0.1);
  color: white;
}

.nav-scrollable {
  display: none;
}

#blazor-error-ui {
  background: lightyellow;
  bottom: 0;
  box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
  display: none;
  left: 0;
  padding: 0.6rem 1.25rem 0.7rem 1.25rem;
  position: fixed;
  width: 100%;
  z-index: 1000;
}

#blazor-error-ui .dismiss {
  cursor: pointer;
  position: absolute;
  right: 0.75rem;
  top: 0.5rem;
}

@media (min-width: 1441px) {
  .page {
    flex-direction: row;
  }

  .sidebar {
    width: 250px;
    height: 100vh;
    position: sticky;
    top: 0;
  }

  .navbar-home-button {
    display: none;
  }

  .nav-scrollable {
    display: block;
    height: calc(100vh - 3.5rem);
    overflow-y: auto;
  }
}

.lohn-upload-dropzone {
    position: relative;
    border: 2px dashed #6c757d;
    width: 400px;
    height: 200px;
    padding: 28px;
    text-align: center;
    border-radius: 6px;
    background-color: #f8f9fa;
}

.lohn-upload-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.lohn-upload-hint {
    pointer-events: none;
}

.lohn-zuweisen-toolbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    padding: 12px;
    border: 1px solid #dee2e6;
    background-color: #ffffff;
}

.lohn-seiten-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.lohn-seite-card {
    border: 1px solid #ced4da;
    padding: 12px;
    background-color: #ffffff;
}

.lohn-seite-kopf {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.lohn-seite-mitarbeiter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.lohn-seite-mitarbeiter-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 2px 6px;
    background-color: #f8f9fa;
}

.lohn-seite-bild {
    width: 100%;
    height: auto;
    display: block;
}

.email-settings-form {
  display: grid;
  grid-template-columns: 180px minmax(0, 420px);
  gap: 10px 12px;
  align-items: center;
}

.email-settings-form label {
  font-weight: 700;
}

.email-settings-check {
  min-height: 38px;
  display: flex;
  align-items: center;
}

.email-settings-check input {
  width: 18px;
  height: 18px;
}

.email-settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.email-test-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid #d5dee8;
  border-radius: 8px;
  background: #f8fbff;
  color: #263846;
}

.email-test-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid #c7d8eb;
  border-top-color: #1b6ec2;
  border-radius: 50%;
  animation: bestell-upload-spin 0.9s linear infinite;
}

/* Page "Einstellungen": one card per topic */
.settings-section {
  max-width: 960px;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid #d5dee8;
  border-radius: 10px;
  background: #ffffff;
}

.settings-section h2 {
  margin: 0 0 6px;
  font-size: 1.25rem;
}

.settings-help {
  margin: 0 0 12px;
  color: #4a5a6a;
}

/* API keys: program, key and actions in one aligned row per program */
.api-key-list {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: center;
}

.api-key-row {
  display: contents;
}

.api-key-client {
  font-weight: 700;
}

.api-key-value {
  display: block;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #d5dee8;
  border-radius: 6px;
  background: #f8fbff;
  color: #263846;
  font-size: 0.9rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.api-key-actions {
  display: flex;
  gap: 6px;
}

.api-key-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  white-space: nowrap;
}

.api-key-button svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.api-key-message {
  margin-top: 10px;
}

.api-key-dialog {
  width: min(100%, 520px);
}

@media (max-width: 860px) {
  .api-key-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .api-key-actions {
    flex-wrap: wrap;
    margin-bottom: 10px;
  }
}

.home-practice-header {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.home-practice-logo {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
}

.home-practice-title {
  margin: 0;
  text-align: left;
}

.home-action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  width: min(100%, 780px);
  margin: 0 auto;
}

.home-action-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 92px;
  height: 100%;
  padding: 12px 10px;
  border: 1px solid #b8c7d6;
  border-radius: 8px;
  background: #f4f9ff;
  color: #16395f;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  overflow-wrap: anywhere;
  hyphens: auto;
  cursor: pointer;
}

.home-action-button:hover {
  border-color: #1b6ec2;
  background: #eef6ff;
  color: #12345a;
  text-decoration: none;
}

.home-action-button:active {
  background: #d9ecff;
  border-color: #145ea8;
  color: #0f2f52;
}

.home-action-button:focus-visible {
  outline: 3px solid #82baf3;
  outline-offset: 2px;
}

.home-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  color: #1b6ec2;
}

.home-action-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.home-action-button-admin {
  border-color: #d1c7ae;
  background: #fff8ea;
  color: #4c3b15;
}

.home-action-button-admin:hover {
  border-color: #b88822;
  background: #fff1d1;
  color: #3f310f;
}

.home-action-button-admin:active {
  border-color: #9b7019;
  background: #ffe6ad;
  color: #33280d;
}

.home-action-button-admin .home-action-icon {
  color: #8a6414;
}

.bestell-page {
  width: 100%;
}

.bestell-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.bestell-header h1 {
  margin: 0;
}

.bestell-primary-action {
  min-width: 150px;
}

.bestell-message {
  margin-bottom: 12px;
}

.bestell-empty {
  padding: 16px;
  border: 1px solid #d5dee8;
  border-radius: 8px;
  background: #f8fbff;
}

.bestell-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.bestell-table {
  min-width: 560px;
  vertical-align: top;
}

.bestell-table th {
  white-space: nowrap;
}

.bestell-row-open {
  background: #ffffff;
}

.bestell-row-done {
  background: #f4f6f8;
  color: #59636e;
}

.bestell-row-clickable {
  cursor: pointer;
}

.bestell-row-clickable:hover {
  background: #eef6ff;
}

.bestell-row-clickable:active {
  background: #d9ecff;
}

.bestell-row-clickable:focus-visible {
  outline: 3px solid #82baf3;
  outline-offset: -3px;
}

.bestell-title {
  font-weight: 700;
  color: #172b3a;
}

.bestell-small {
  font-size: 0.86rem;
  color: #5d6a76;
}

.bestell-note {
  margin-top: 6px;
  font-size: 0.92rem;
  color: #283b4a;
  white-space: pre-wrap;
}

.bestell-status,
.bestell-urgency {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.86rem;
  font-weight: 700;
  white-space: nowrap;
}

.bestell-status-neuerstellt {
  background: #eaf3ff;
  color: #164d82;
}

.bestell-status-erneutangefordert {
  background: #fff3d7;
  color: #765014;
}

.bestell-status-bestellt {
  background: #edf7ef;
  color: #286137;
}

.bestell-status-geliefert {
  background: #e9f8f7;
  color: #12605b;
}

.bestell-status-einsortiertundabgeschlossen {
  background: #eceff3;
  color: #49525c;
}

.bestell-urgency-normal {
  background: #edf2f7;
  color: #415160;
}

.bestell-urgency-eilig {
  background: #fff0cf;
  color: #78540d;
}

.bestell-urgency-sehrdringend {
  background: #ffe4e0;
  color: #8b2419;
}

.bestell-status-urgency {
  margin-top: 5px;
}

.bestell-photo-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 118px;
}

.bestell-photo-link {
  display: block;
  width: 52px;
  height: 52px;
  border: 1px solid #c9d4df;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
}

.bestell-photo-link:hover {
  border-color: #1b6ec2;
}

.bestell-photo-link:active {
  border-color: #145ea8;
}

.bestell-photo-link img,
.bestell-dialog-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bestell-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 170px;
}

.bestell-admin-status {
  display: grid;
  grid-template-columns: minmax(170px, 1fr);
  gap: 6px;
}

.bestell-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1050;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 24px 10px;
  overflow-y: auto;
  background: rgba(23, 34, 45, 0.42);
}

.bestell-dialog {
  width: min(100%, 760px);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.24);
  padding: 16px;
}

.bestell-detail-dialog {
  width: min(100%, 820px);
}

.bestell-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.bestell-dialog-head h2 {
  margin: 0;
  font-size: 1.35rem;
}

.bestell-icon-button {
  width: 36px;
  height: 36px;
  border: 1px solid #c4cfda;
  border-radius: 6px;
  background: #ffffff;
  color: #263846;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}

.bestell-icon-button:hover {
  background: #eef5fc;
  border-color: #1b6ec2;
}

.bestell-icon-button:active {
  background: #dbeafa;
}

.bestell-form-grid {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 10px 12px;
  align-items: start;
}

.bestell-form-grid label {
  padding-top: 7px;
  font-weight: 700;
}

.bestell-form-grid textarea {
  min-height: 74px;
}

.bestell-dialog-hints {
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid #d5dee8;
  border-radius: 8px;
  background: #f8fbff;
  color: #263846;
}

.bestell-dialog-hints ul {
  margin: 0;
  padding-left: 18px;
}

.bestell-dialog-hints li + li {
  margin-top: 4px;
}

.bestell-photo-section {
  margin-top: 16px;
}

.bestell-section-title {
  margin-bottom: 8px;
  font-weight: 700;
}

.bestell-upload-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.bestell-upload-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 6px 12px;
  border: 1px solid #1b6ec2;
  border-radius: 6px;
  background: #1b6ec2;
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
  overflow: hidden;
}

.bestell-upload-button:hover {
  background: #155ca4;
  border-color: #155ca4;
}

.bestell-upload-button:active {
  background: #104b86;
  border-color: #104b86;
}

.bestell-upload-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.bestell-upload-progress {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid #d5dee8;
  border-radius: 8px;
  background: #f8fbff;
}

.bestell-upload-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid #c7d8eb;
  border-top-color: #1b6ec2;
  border-radius: 50%;
  animation: bestell-upload-spin 0.9s linear infinite;
}

.bestell-upload-progress-content {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.bestell-upload-progress-bar {
  height: 8px;
  border-radius: 999px;
  background: #dde7f1;
  overflow: hidden;
}

.bestell-upload-progress-bar > div {
  height: 100%;
  border-radius: 999px;
  background: #1b6ec2;
}

@keyframes bestell-upload-spin {
  to {
    transform: rotate(360deg);
  }
}

.bestell-dialog-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 10px;
}

.bestell-dialog-photo {
  display: grid;
  gap: 6px;
}

.bestell-dialog-photo img {
  aspect-ratio: 1;
  border: 1px solid #c9d4df;
  border-radius: 6px;
}

.bestell-details-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.bestell-detail-grid {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 8px 12px;
}

.bestell-detail-grid > div:nth-child(odd) {
  font-weight: 700;
  color: #344657;
}

.bestell-dialog-photo-link {
  display: block;
  aspect-ratio: 1;
  border: 1px solid #c9d4df;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
}

.bestell-dialog-photo-link:hover {
  border-color: #1b6ec2;
}

.bestell-dialog-photo-link:active {
  border-color: #145ea8;
}

.bestell-dialog-photo-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bestell-detail-action-title {
  margin-top: 18px;
}

.bestell-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
}

.bestell-detail-admin-status {
  min-width: min(100%, 320px);
}

.bestell-order-history-list {
  display: grid;
  gap: 8px;
}

.bestell-order-history-item {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 9px 10px;
  border: 1px solid #d8e3ee;
  border-radius: 6px;
  background: #ffffff;
  text-align: left;
  cursor: pointer;
}

.bestell-order-history-item:hover {
  border-color: #1b6ec2;
  background: #eef6ff;
}

.bestell-order-history-item:active {
  background: #d9ecff;
}

.bestell-order-history-item-current {
  border-color: #8bb9e9;
  background: #f4f9ff;
}

.bestell-order-history-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-weight: 700;
  color: #263846;
}

.bestell-order-history-name {
  font-weight: 700;
  color: #172b3a;
}

.bestell-current-marker {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 7px;
  border-radius: 6px;
  background: #eaf3ff;
  color: #164d82;
  font-size: 0.82rem;
  font-weight: 700;
}

.bestell-history-list {
  display: grid;
  gap: 8px;
}

.bestell-history-item {
  padding: 8px 10px;
  border: 1px solid #d8e3ee;
  border-radius: 6px;
  background: #f8fbff;
}

.bestell-history-action {
  font-weight: 700;
  color: #263846;
}

.bestell-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}

.bestell-dialog-actions .btn-danger {
  margin-right: auto;
}

/* Dokumente & Informationen */
.home-action-button-docs {
  position: relative;
}

.home-action-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #c0392b;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 22px;
}

.docs-page {
  width: 100%;
  max-width: 980px;
}

.docs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 6px;
}

.docs-header h1 {
  margin: 0;
}

.docs-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.docs-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  font-weight: 600;
  cursor: pointer;
}

.docs-button-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.docs-upload-button {
  position: relative;
  overflow: hidden;
  margin: 0;
}

.docs-upload-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.docs-preview-banner {
  margin: 4px 0 12px;
  padding: 10px 12px;
  border: 1px solid #d1c7ae;
  border-radius: 8px;
  background: #fff8ea;
  color: #4c3b15;
  font-weight: 600;
}

.docs-hint {
  margin-bottom: 10px;
  color: #59636e;
}

.docs-summary {
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid #d5dee8;
  border-radius: 8px;
  background: #f8fbff;
  color: #263846;
}

.docs-summary-unread {
  border-color: #e3b6b0;
  background: #fff4f2;
  color: #6b1f17;
}

.docs-message {
  margin-bottom: 12px;
}

.docs-empty {
  padding: 16px;
  border: 1px solid #d5dee8;
  border-radius: 8px;
  background: #f8fbff;
}

.docs-folder {
  margin-bottom: 14px;
  border: 1px solid #d5dee8;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.docs-folder-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 6px 8px 6px 12px;
  border-bottom: 1px solid #e3e9ef;
  background: #f4f9ff;
}

.docs-folder-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  fill: #dbeafa;
  stroke: #1b6ec2;
  stroke-width: 1.8;
  stroke-linejoin: round;
}

.docs-folder-name {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #16395f;
  overflow-wrap: anywhere;
}

.docs-folder-count {
  min-width: 24px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #dde7f1;
  color: #344657;
  font-size: 0.82rem;
  font-weight: 700;
  text-align: center;
}

.docs-folder-edit {
  margin-left: auto;
}

.docs-folder-empty {
  padding: 10px 12px;
  color: #59636e;
}

.docs-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.docs-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-right: 8px;
}

.docs-row + .docs-row {
  border-top: 1px solid #edf1f5;
}

.docs-open {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 8px 12px;
  color: #263846;
  text-decoration: none;
  cursor: pointer;
}

.docs-open:hover {
  background: #eef6ff;
  color: #12345a;
  text-decoration: none;
}

.docs-open:active {
  background: #d9ecff;
}

.docs-open:focus-visible {
  outline: 3px solid #82baf3;
  outline-offset: -3px;
}

.docs-file-type {
  flex: 0 0 48px;
  padding: 4px 0;
  border: 1px solid #c4cfda;
  border-radius: 6px;
  background: #f8fbff;
  color: #344657;
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
}

.docs-file-text {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
}

.docs-file-title {
  overflow-wrap: anywhere;
}

.docs-file-meta {
  color: #59636e;
  font-size: 0.85rem;
}

.docs-row-unread .docs-file-title {
  font-weight: 700;
  color: #12345a;
}

.docs-row-unread .docs-file-type {
  border-color: #c0392b;
}

.docs-new-badge {
  flex: 0 0 auto;
  padding: 2px 8px;
  border-radius: 999px;
  background: #c0392b;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.docs-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  padding: 0;
  border: 1px solid #c4cfda;
  border-radius: 6px;
  background: #ffffff;
  color: #263846;
  cursor: pointer;
}

.docs-icon-button:hover {
  background: #eef5fc;
  border-color: #1b6ec2;
}

.docs-icon-button:active {
  background: #dbeafa;
}

.docs-icon-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.docs-drop-overlay {
  position: fixed;
  inset: 0;
  z-index: 1060;
  display: none;
  align-items: center;
  justify-content: center;
  border: 4px dashed #1b6ec2;
  background: rgba(27, 110, 194, 0.14);
}

.docs-drop-overlay.is-active {
  display: flex;
}

.docs-drop-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
}

.docs-drop-hint {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 26px;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.24);
  color: #16395f;
  font-size: 1.3rem;
  font-weight: 700;
  pointer-events: none;
}

.docs-drop-hint svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: #1b6ec2;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.docs-dialog {
  width: min(100%, 620px);
}

.docs-dialog-text {
  margin-bottom: 8px;
}

.docs-dialog-note {
  margin-top: 12px;
  color: #59636e;
}

.docs-dialog-files {
  margin: 0 0 14px;
  padding: 8px 12px 8px 28px;
  border: 1px solid #d5dee8;
  border-radius: 8px;
  background: #f8fbff;
  overflow-wrap: anywhere;
}

.docs-form-label {
  padding-top: 2px;
  font-weight: 700;
}

.docs-form-value {
  padding-top: 2px;
  color: #344657;
  overflow-wrap: anywhere;
}

.docs-readers-title {
  margin-top: 16px;
}

.docs-readers {
  margin: 0;
  padding: 0;
  border: 1px solid #d5dee8;
  border-radius: 8px;
  list-style: none;
  overflow: hidden;
}

.docs-reader {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  color: #59636e;
}

.docs-reader + .docs-reader {
  border-top: 1px solid #edf1f5;
}

.docs-reader-read {
  color: #263846;
}

.docs-reader-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: #9aa8b5;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.docs-reader-read .docs-reader-icon {
  stroke: #1e8449;
}

.docs-reader-opened {
  color: #7a4f08;
}

.docs-reader-opened .docs-reader-icon {
  stroke: #b7791f;
}

.docs-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 2px;
  font-weight: 700;
  cursor: pointer;
}

.docs-check input {
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
}

.docs-check-help {
  margin-left: 26px;
  color: #59636e;
  font-size: 0.88rem;
}

.docs-confirm-hint {
  margin-top: 2px;
  color: #8a1f14;
  font-size: 0.85rem;
  font-weight: 600;
}

.docs-confirm-button {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 4px 10px;
  font-size: 0.9rem;
}

.docs-reader-name {
  overflow-wrap: anywhere;
}

.docs-reader-state {
  font-size: 0.85rem;
  text-align: right;
  white-space: nowrap;
}

.docs-confirm {
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid #e3b6b0;
  border-radius: 8px;
  background: #fff4f2;
  color: #6b1f17;
}

.dienstplan-portrait-view {
  display: none;
}

@media (orientation: portrait) {
  .dienstplan-table-view {
    display: none;
  }

  .dienstplan-portrait-view {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    width: 100%;
  }

  .dienstplan-person-card {
    border: 1px solid #cbd8e6;
    border-radius: 8px;
    background: #f7fbff;
    padding: 10px;
  }

  .dienstplan-person-name {
    margin: 0 0 8px 0;
    color: #16395f;
    font-size: 1rem;
    font-weight: 700;
  }

  .dienstplan-person-days {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .dienstplan-person-day {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 6px 8px;
    border: 1px solid #d8e3ee;
    border-radius: 6px;
    background: #ffffff;
  }

  .dienstplan-person-day-free {
    background: #f2f4f7;
    color: #6c757d;
  }

  .dienstplan-person-day-name {
    font-weight: 700;
  }

  .dienstplan-person-day-times {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 4px 10px;
    min-width: 0;
    text-align: right;
  }
}

@media (orientation: portrait) and (min-width: 720px) {
  .dienstplan-portrait-view {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  .home-action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .home-action-button {
    min-height: 88px;
    padding: 10px 8px;
    font-size: 0.92rem;
  }

  .email-settings-form {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .bestell-header {
    align-items: stretch;
    flex-direction: column;
  }

  .bestell-primary-action {
    width: 100%;
  }

  .bestell-dialog {
    padding: 12px;
  }

  .bestell-form-grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .bestell-detail-grid {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .bestell-detail-grid > div:nth-child(odd) {
    margin-top: 6px;
  }

  .bestell-form-grid label {
    padding-top: 0;
  }

  .bestell-dialog-actions {
    flex-wrap: wrap;
  }

  .bestell-dialog-actions .btn {
    flex: 1 1 120px;
  }

  .bestell-dialog-actions .btn-danger {
    flex-basis: 100%;
    margin-right: 0;
  }

  .docs-header-actions,
  .docs-header-actions .docs-button {
    width: 100%;
  }

  .docs-form-label {
    margin-top: 6px;
  }

  .docs-row {
    flex-wrap: wrap;
  }

  .docs-confirm-button {
    order: 3;
    flex: 1 1 calc(100% - 12px);
    margin: 0 0 8px 12px;
  }
}

@media (max-width: 330px) {
  .home-action-grid {
    grid-template-columns: 1fr;
  }
}

@media (display-mode: standalone) {
  #installButton {
    display: none;
  }
}
