:root {
  color-scheme: light;
  --red: #d80f1f;
  --red-dark: #a40713;
  --black: #111316;
  --ink: #25272b;
  --muted: #666b73;
  --line: #d9dde3;
  --soft: #f4f5f7;
  --white: #ffffff;
  --ok: #166534;
  --warn: #b45309;
  --normal-priority: #eab308;
  --normal-priority-dark: #854d0e;
  --low-priority: #2563eb;
  --low-priority-dark: #1d4ed8;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at 18% 10%, rgba(216, 15, 31, 0.08), transparent 28%),
    radial-gradient(circle at 88% 18%, rgba(17, 19, 22, 0.06), transparent 24%),
    linear-gradient(180deg, #ffffff 0%, #f6f7f9 60%, #eceff3 100%);
  color: var(--ink);
  min-height: 100vh;
}

body.modal-open {
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

.app-header {
  position: relative;
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px 20px 6px;
}

.split-brand {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(220px, 0.75fr);
  gap: 26px;
  align-items: center;
  max-width: 980px;
}

.brand-home {
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.brand-home:focus-visible {
  outline: 3px solid rgba(216, 15, 31, 0.24);
  outline-offset: 8px;
  border-radius: var(--radius-md);
}

.brand-wordmark,
.brand-symbol {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.brand-symbol {
  max-height: 250px;
}

.admin-entry {
  position: absolute;
  top: 16px;
  right: 20px;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(217, 221, 227, 0.8);
  background: rgba(255, 255, 255, 0.78);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(17, 19, 22, 0.08);
  backdrop-filter: blur(18px);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  color: var(--black);
  font-size: clamp(2rem, 6vw, 4.3rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.intro {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
}

.layout {
  max-width: 1120px;
  margin: 0 auto;
  padding: 20px;
}

.report-panel,
.admin-panel,
.welcome-panel,
.company-panel {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 55px rgba(17, 19, 22, 0.11);
  backdrop-filter: blur(22px);
  padding: 24px;
}

.welcome-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.58)),
    linear-gradient(135deg, rgba(216, 15, 31, 0.08), transparent 48%);
  border-color: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  box-shadow: 0 24px 64px rgba(17, 19, 22, 0.12);
}

.welcome-panel h2,
.company-panel h2,
.report-panel h2 {
  margin-bottom: 8px;
  color: var(--black);
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  line-height: 1.05;
}

.welcome-panel h2 {
  color: var(--black);
}

.welcome-panel p {
  color: var(--muted);
  line-height: 1.55;
}

.welcome-panel .eyebrow {
  color: var(--red);
}

.welcome-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.welcome-panel .ghost-button {
  background: rgba(255, 255, 255, 0.72);
  color: var(--black);
  border-color: rgba(191, 196, 204, 0.72);
}

.report-panel,
.admin-panel,
.company-panel {
  border-top: 3px solid rgba(216, 15, 31, 0.82);
}

.company-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.company-facts div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(244, 245, 247, 0.72);
}

.company-facts strong {
  display: block;
  color: var(--black);
  font-size: 1.6rem;
}

.company-facts span {
  color: var(--muted);
  font-weight: 700;
}

.company-content {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: 24px;
  margin-bottom: 20px;
}

.company-content h3 {
  margin-bottom: 10px;
}

.company-content ul {
  margin: 0;
  padding-left: 20px;
  line-height: 1.6;
}

.company-content p {
  color: var(--muted);
  line-height: 1.6;
}

.quote-button {
  margin-top: 16px;
  border-color: rgba(22, 163, 74, 0.28);
  background: #dcfce7;
  color: #166534;
  box-shadow: 0 12px 28px rgba(22, 163, 74, 0.14);
}

.quote-button:hover {
  border-color: rgba(22, 163, 74, 0.48);
  background: #bbf7d0;
}

.company-gallery {
  display: grid;
  gap: 12px;
  margin: 22px 0;
}

.gallery-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.gallery-head h3 {
  margin: 0;
  color: var(--black);
}

.gallery-arrow {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  color: var(--black);
  cursor: pointer;
  font-size: 1.4rem;
}

.gallery-track {
  display: grid;
  gap: 20px;
}

.gallery-topic {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.gallery-topic h4 {
  margin: 0;
  color: var(--black);
  font-size: 1rem;
}

.gallery-row {
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: 8px 0 12px;
  border-radius: 26px;
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}

.gallery-strip {
  display: flex;
  align-items: center;
  gap: 16px;
  width: max-content;
  animation: galleryMarquee 52s linear infinite;
  will-change: transform;
}

.gallery-topic:nth-child(even) .gallery-strip {
  animation-direction: reverse;
  animation-duration: 54s;
}

.gallery-row:hover .gallery-strip {
  animation-play-state: paused;
}

.gallery-strip.single {
  animation: none;
}

.gallery-item {
  position: relative;
  flex: 0 0 clamp(260px, 34vw, 360px);
  aspect-ratio: 4 / 3;
  height: auto;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.42)),
    var(--soft);
  box-shadow: 0 18px 36px rgba(17, 19, 22, 0.12);
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.gallery-open {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.gallery-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 56px rgba(17, 19, 22, 0.2);
  filter: saturate(1.08) contrast(1.02);
}

.gallery-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@keyframes galleryMarquee {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

.report-topline {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
  margin-bottom: 20px;
}

fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 26px;
}

.single-task-note {
  display: grid;
  gap: 4px;
  margin-bottom: 22px;
  padding: 14px;
  border: 1px solid #f0c7cc;
  border-left: 5px solid var(--red);
  border-radius: var(--radius-md);
  background: #fff5f6;
}

.single-task-note strong {
  color: var(--black);
}

.single-task-note span {
  color: var(--muted);
  line-height: 1.45;
}

legend {
  margin-bottom: 14px;
  color: var(--black);
  font-size: 1.18rem;
  font-weight: 800;
}

legend::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 17px;
  margin-right: 8px;
  border-radius: 2px;
  background: var(--red);
  vertical-align: -3px;
}

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

.choice {
  display: grid;
  gap: 5px;
  min-height: 96px;
  padding: 14px;
  border: 1px solid rgba(217, 221, 227, 0.9);
  border-radius: var(--radius-md);
  cursor: pointer;
  background: rgba(244, 245, 247, 0.72);
}

.choice input {
  width: 18px;
  height: 18px;
  accent-color: var(--red);
}

.choice span {
  color: var(--black);
  font-weight: 800;
}

.choice small {
  color: var(--muted);
  line-height: 1.35;
}

.choice.urgent {
  position: relative;
  border-color: rgba(216, 15, 31, 0.38);
  background: linear-gradient(180deg, rgba(255, 245, 246, 0.9), rgba(255, 255, 255, 0.72));
}

.choice.urgent::after {
  content: "!";
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 24px;
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 900;
  line-height: 1;
  background: var(--red);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  padding-top: 5px;
}

.choice.urgent span {
  color: #a40713;
}

.choice.urgent small {
  color: #7f1d1d;
}

.choice:has(input:checked) {
  border-color: var(--red);
  background: #fff5f6;
  box-shadow: inset 0 0 0 1px var(--red), 0 10px 24px rgba(216, 15, 31, 0.08);
}

.choice.urgent:has(input:checked) {
  background: linear-gradient(180deg, #ffe8eb, #fff4f5);
  box-shadow: inset 0 0 0 2px var(--red), 0 14px 30px rgba(216, 15, 31, 0.18);
}

.choice.high:has(input:checked) {
  border-color: var(--warn);
  background: #fff7ed;
  box-shadow: inset 0 0 0 2px var(--warn), 0 14px 30px rgba(180, 83, 9, 0.14);
}

.choice.normal-priority:has(input:checked) {
  border-color: var(--normal-priority);
  background: #fefce8;
  box-shadow: inset 0 0 0 2px var(--normal-priority), 0 14px 30px rgba(234, 179, 8, 0.16);
}

.choice.low:has(input:checked) {
  border-color: var(--low-priority);
  background: #eff6ff;
  box-shadow: inset 0 0 0 2px var(--low-priority), 0 14px 30px rgba(37, 99, 235, 0.13);
}

.urgent-modal,
.weather-modal,
.quote-modal,
.privacy-modal,
.gallery-lightbox,
.knowledge-modal,
.help-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(18, 20, 24, 0.34);
  backdrop-filter: blur(12px);
}

.urgent-modal.hidden,
.weather-modal.hidden,
.quote-modal.hidden,
.privacy-modal.hidden,
.gallery-lightbox.hidden,
.knowledge-modal.hidden,
.help-modal.hidden {
  display: none;
}

.urgent-modal-card,
.weather-modal-card,
.quote-modal-card,
.privacy-modal-card,
.gallery-lightbox-card,
.knowledge-modal-card,
.help-modal-card {
  position: relative;
  display: grid;
  gap: 14px;
  width: min(460px, 100%);
  padding: 26px;
  border: 1px solid rgba(216, 15, 31, 0.22);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 28px 90px rgba(20, 20, 20, 0.28);
}

.urgent-modal-card {
  text-align: center;
}

.weather-modal-card {
  width: min(940px, 100%);
  max-height: min(86vh, 820px);
  overflow: auto;
  text-align: left;
}

.quote-modal-card {
  width: min(620px, 100%);
  max-height: min(88vh, 820px);
  overflow: auto;
  text-align: left;
}

.privacy-modal-card {
  width: min(820px, 100%);
  max-height: min(88vh, 820px);
  overflow: auto;
  text-align: left;
}

.privacy-modal-card h2 {
  margin: 0;
}

.privacy-modal-content {
  display: grid;
  gap: 12px;
}

.privacy-modal-content p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.privacy-modal-content strong {
  color: var(--ink);
}

.privacy-full-link {
  padding-top: 8px;
  font-weight: 800;
}

.quote-modal-card h2 {
  margin: 0;
}

.quote-modal-card form {
  display: grid;
  gap: 12px;
}

.gallery-lightbox-card {
  grid-template-rows: minmax(0, 1fr) auto;
  place-items: center;
  gap: 14px;
  width: min(1120px, 100%);
  height: min(86vh, 760px);
  padding: 18px 18px 22px;
  overflow: hidden;
  background: rgba(17, 19, 22, 0.84);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.38);
}

.help-modal-card {
  width: min(900px, 100%);
  max-height: min(88vh, 840px);
  overflow: auto;
  text-align: left;
}

.knowledge-modal-card {
  width: min(980px, 100%);
  max-height: min(90vh, 860px);
  overflow: auto;
  text-align: left;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--white);
  color: var(--black);
  cursor: pointer;
  font-size: 1.35rem;
  line-height: 1;
  z-index: 4;
}

.lightbox-close {
  background: rgba(255, 255, 255, 0.92);
}

.gallery-lightbox-card img {
  display: block;
  max-width: 100%;
  max-height: calc(86vh - 160px);
  min-height: 0;
  border-radius: 24px;
  object-fit: contain;
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.34);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--black);
  cursor: pointer;
  font-size: 2rem;
  line-height: 1;
  transform: translateY(-50%);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

.lightbox-nav:disabled {
  opacity: 0.35;
  cursor: default;
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

.lightbox-caption {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  width: min(100%, 860px);
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--black);
  font-weight: 900;
  backdrop-filter: blur(16px);
}

.modal-icon {
  display: grid;
  place-items: center;
  justify-self: center;
  width: 54px;
  height: 48px;
  color: var(--white);
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1;
  background: var(--red);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  padding-top: 10px;
}

.urgent-modal-card h2 {
  margin: 0;
  color: var(--black);
  font-size: clamp(1.35rem, 3vw, 1.8rem);
}

.urgent-modal-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.call-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--red);
  color: var(--white);
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 14px 32px rgba(216, 15, 31, 0.22);
}

.weather-modal-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-right: 42px;
}

.weather-big-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(216, 15, 31, 0.2);
  border-radius: 50%;
  background: #fff5f6;
  color: var(--red);
  font-size: 1.6rem;
}

.weather-modal-card h2 {
  margin: 0 0 4px;
  color: var(--black);
}

.weather-modal-card p {
  margin: 0;
  color: var(--muted);
}

.weather-grid,
.weather-hour-grid {
  display: grid;
  gap: 10px;
}

.weather-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.weather-hour-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.weather-period {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.weather-period + .weather-period {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.weather-period h3 {
  margin: 0;
  color: var(--black);
  font-size: 1.05rem;
}

.weather-day,
.weather-hour {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(247, 248, 250, 0.86);
}

.weather-day strong,
.weather-day b,
.weather-hour strong,
.weather-hour b {
  color: var(--black);
}

.weather-day span,
.weather-hour span {
  color: var(--muted);
  font-size: 0.9rem;
}

.weather-day-icon {
  color: var(--red) !important;
  font-size: 1.8rem !important;
  line-height: 1;
}

.weather-source,
.weather-loading {
  margin-top: 12px !important;
  font-size: 0.92rem;
}

.weather-loading.error {
  color: var(--red);
  font-weight: 800;
}

.category-list {
  display: grid;
  gap: 10px;
}

.category {
  border: 1px solid rgba(217, 221, 227, 0.92);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.7);
}

.category summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  color: var(--black);
  cursor: pointer;
  font-weight: 800;
  list-style: none;
  background: rgba(255, 255, 255, 0.72);
}

.category summary::-webkit-details-marker {
  display: none;
}

.category[open] .chevron {
  transform: rotate(180deg);
}

.category[open] summary {
  border-bottom: 3px solid rgba(216, 15, 31, 0.82);
}

.chevron {
  transition: transform 160ms ease;
}

.subcategory-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0 16px 16px;
}

.subcategory {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.subcategory > button {
  width: 100%;
  border: 0;
  background: var(--black);
  color: var(--white);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  cursor: pointer;
  font-weight: 800;
  text-align: left;
}

.detail-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.detail-pills button {
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 999px;
  padding: 8px 10px;
  cursor: pointer;
  color: var(--ink);
}

.subcategory .subcategory-note,
.category-note {
  color: var(--red);
  font-weight: 900;
  line-height: 1.35;
}

.subcategory .subcategory-note {
  margin: 10px 0 0;
  font-size: 0.88rem;
}

.category-note {
  grid-column: 1 / -1;
  margin: 2px 0 0;
  font-size: 0.92rem;
}

.note-alert {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 9px 11px;
  border: 1px solid rgba(216, 15, 31, 0.24);
  border-radius: var(--radius-sm);
  background: #fff5f6;
}

.note-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--red);
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(216, 15, 31, 0.22);
}

.category[open] .note-alert {
  animation: noteAttention 1100ms ease-out 1;
}

@keyframes noteAttention {
  0% {
    background: #fff5f6;
    box-shadow: 0 0 0 0 rgba(216, 15, 31, 0);
    transform: translateY(0);
  }
  22% {
    background: #ffe0e4;
    box-shadow: 0 0 0 4px rgba(216, 15, 31, 0.16);
    transform: translateY(-1px);
  }
  54% {
    background: #fff5f6;
    box-shadow: 0 0 0 8px rgba(216, 15, 31, 0.06);
    transform: translateY(0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(216, 15, 31, 0);
  }
}

.category button.selected {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
}

.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.two-col legend {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 7px;
  color: var(--black);
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(191, 196, 204, 0.85);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  padding: 12px;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(216, 15, 31, 0.18);
  border-color: var(--red);
}

textarea {
  resize: vertical;
  min-height: 128px;
}

.image-upload {
  margin-top: 12px;
}

.image-upload span {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 400;
}

.privacy-consent {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: start;
  max-width: 820px;
  margin: 22px 0 16px;
  padding: 14px 16px;
  border: 1px solid rgba(224, 15, 39, 0.22);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 14px 34px rgba(15, 18, 24, 0.08);
  color: var(--ink);
  font-weight: 700;
  line-height: 1.35;
}

.privacy-consent input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--red);
}

.privacy-consent a,
.privacy-modal-content a {
  color: var(--red);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.privacy-consent a:focus-visible,
.privacy-consent input:focus-visible {
  outline: 3px solid rgba(224, 15, 39, 0.28);
  outline-offset: 3px;
}

.address-confirmation {
  display: grid;
  gap: 8px;
  max-width: 820px;
  margin: 14px 0 16px;
  padding: 16px;
  border: 1px solid rgba(234, 179, 8, 0.5);
  border-radius: 16px;
  background: #fffbeb;
  color: var(--ink);
  box-shadow: 0 14px 34px rgba(15, 18, 24, 0.08);
}

.address-confirmation span {
  color: var(--muted);
  line-height: 1.45;
}

.address-confirmation label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.address-confirmation input {
  width: 18px;
  height: 18px;
  accent-color: var(--red);
}

.street-field {
  position: relative;
}

.street-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 7px;
  padding: 8px;
  border: 1px solid rgba(227, 6, 19, 0.16);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.86);
}

.street-suggestions small {
  flex: 1 0 100%;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.street-suggestions button {
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-weight: 900;
  background: rgba(247, 248, 250, 0.95);
  cursor: pointer;
}

.street-suggestions button:hover {
  border-color: rgba(227, 6, 19, 0.4);
  background: rgba(227, 6, 19, 0.08);
}

.bot-check {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.wide {
  grid-column: 1 / -1;
}

.submit-button,
.primary-link,
.ghost-button {
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 800;
  text-decoration: none;
}

.submit-button,
.primary-link {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 48px;
  padding: 0 18px;
  background: var(--red);
  color: var(--white);
  box-shadow: 0 12px 26px rgba(216, 15, 31, 0.18);
}

.submit-button:hover,
.primary-link:hover {
  background: var(--red-dark);
}

#repeatContactReport {
  margin-left: 10px;
}

.ghost-button {
  min-height: 42px;
  padding: 0 14px;
  background: rgba(247, 248, 250, 0.78);
  color: var(--black);
  border: 1px solid rgba(200, 205, 213, 0.8);
}

.ghost-button.quote-button {
  border-color: rgba(22, 163, 74, 0.34);
  background: #dcfce7;
  color: #166534;
  box-shadow: 0 12px 28px rgba(22, 163, 74, 0.14);
}

.ghost-button.quote-button:hover {
  border-color: rgba(22, 163, 74, 0.52);
  background: #bbf7d0;
}

.form-note {
  min-height: 22px;
  margin: 12px 0 0;
  color: var(--ok);
  font-weight: 700;
}

.form-note.error {
  color: var(--red);
}

.hidden {
  display: none !important;
}

.admin-login {
  max-width: 420px;
}

.checkbox-line {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid rgba(200, 205, 213, 0.8);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.72);
}

.checkbox-line input {
  width: 18px;
  height: 18px;
  accent-color: var(--red);
}

.manual-staff-address {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 12px;
  grid-column: 1 / -1;
}

.company-admin,
.personnel-admin,
.objects-admin,
.email-admin,
.staff-ticket-box {
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.72);
}

.company-admin form,
.personnel-admin form,
.objects-admin form,
.email-admin form,
.staff-ticket-box form {
  display: grid;
  gap: 14px;
  padding: 0 14px 14px;
}

.staff-ticket-box summary {
  cursor: pointer;
  padding: 14px;
  color: var(--black);
  font-weight: 900;
}

.staff-ticket-box form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.staff-ticket-box .submit-button,
.staff-ticket-box .form-note {
  justify-self: start;
}

.admin-section-tabs {
  width: fit-content;
  margin-bottom: 18px;
}

.admin-subhead {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
  padding: 14px;
}

.admin-subhead h3 {
  margin: 0;
  color: var(--black);
}

.company-admin-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.admin-gallery-list {
  display: grid;
  gap: 8px;
}

.admin-gallery-list article {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--soft);
}

.admin-gallery-list img {
  width: 64px;
  height: 46px;
  border-radius: 8px;
  object-fit: cover;
}

.admin-gallery-list span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.admin-gallery-list strong {
  color: var(--red);
  font-size: 0.82rem;
}

.admin-gallery-list button {
  border: 1px solid rgba(216, 15, 31, 0.24);
  border-radius: var(--radius-sm);
  background: #fff5f6;
  color: var(--red-dark);
  cursor: pointer;
  font-weight: 800;
  min-height: 34px;
  padding: 0 10px;
}

.personnel-block {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(247, 248, 250, 0.78);
}

.hausverwaltung-list {
  display: grid;
  gap: 18px;
}

.hausverwaltung-row {
  display: grid;
  gap: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(15, 18, 24, 0.12);
  border-left: 7px solid var(--red);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 46px rgba(15, 18, 24, 0.08);
}

.hausverwaltung-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px 14px;
  border-bottom: 1px solid rgba(15, 18, 24, 0.08);
  background: linear-gradient(135deg, rgba(20, 20, 20, 0.96), rgba(43, 47, 56, 0.96));
  color: #fff;
  cursor: pointer;
  list-style: none;
}

.hausverwaltung-card-header::-webkit-details-marker {
  display: none;
}

.hausverwaltung-card-body {
  display: grid;
  gap: 14px;
  padding: 14px 0 0;
}

.hausverwaltung-card-header span {
  display: block;
  margin-bottom: 3px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  font-weight: 1000;
  text-transform: uppercase;
}

.hausverwaltung-card-header h4 {
  margin: 0;
  font-size: 20px;
  line-height: 1.18;
}

.hausverwaltung-card-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 7px 12px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
  font-weight: 900;
}

.hausverwaltung-card-meta strong {
  color: #fff;
  font-size: 16px;
}

.hausverwaltung-chevron {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-left: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 18px;
  transition: transform 0.18s ease;
}

.hausverwaltung-row[open] .hausverwaltung-chevron {
  transform: rotate(180deg);
}

.hausverwaltung-row-head,
.hausverwaltung-address-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.hausverwaltung-row-head {
  padding: 0 18px;
}

.object-address-admin,
.object-street-admin {
  display: grid;
  gap: 9px;
  margin: 0 18px;
  padding: 14px 0 0;
  border-top: 1px solid rgba(15, 18, 24, 0.1);
  background: transparent;
}

.object-address-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.object-address-head h4 {
  margin: 0;
  font-size: 17px;
}

.object-address-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.object-address-head span {
  flex: 0 0 auto;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  background: rgba(247, 248, 250, 0.94);
}

.object-address-table {
  display: grid;
  border: 1px solid rgba(15, 18, 24, 0.08);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.object-address-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  align-items: center;
  min-height: 34px;
  background: rgba(255, 255, 255, 0.96);
}

.object-address-row + .object-address-row {
  border-top: 1px solid var(--line);
}

.object-address-row span {
  padding: 7px 10px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.icon-danger-button,
.street-pattern-pill button {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  color: var(--red);
  font-weight: 1000;
  background: rgba(227, 6, 19, 0.08);
  cursor: pointer;
}

.object-address-add {
  display: grid;
  grid-template-columns: minmax(150px, 2fr) minmax(90px, 0.8fr) minmax(86px, 0.7fr) minmax(130px, 1.3fr) auto;
  gap: 8px;
  align-items: end;
  padding: 10px;
  border-radius: 10px;
  background: rgba(247, 248, 250, 0.82);
}

.object-street-add {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto;
  gap: 8px;
  padding: 10px;
  border-radius: 10px;
  background: rgba(247, 248, 250, 0.82);
}

.object-street-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.street-pattern-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 6px 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  font-weight: 800;
}

.compact-empty {
  margin: 0;
  padding: 9px 10px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  background: rgba(247, 248, 250, 0.68);
}

.hausverwaltung-row-actions,
.admin-subhead-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.hausverwaltung-row > label {
  margin: 0 18px;
}

.hausverwaltung-row-actions {
  padding: 0 18px 16px;
}

.check-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  font-weight: 900;
}

.task-hausverwaltung {
  margin: 2px 0 8px;
  color: var(--red-dark);
  font-weight: 900;
}

.gallery-topic-admin {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(247, 248, 250, 0.78);
}

.topic-add {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topic-add input {
  min-width: 210px;
}

.topic-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.topic-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 10px 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--black);
  cursor: pointer;
  font-weight: 800;
}

.topic-chip strong {
  color: var(--red);
  font-size: 1.05rem;
  line-height: 1;
}

.topic-chip:hover {
  border-color: rgba(216, 15, 31, 0.34);
  background: #fff5f6;
}

.personnel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.personnel-title h4,
.personnel-title p {
  margin: 0;
}

.personnel-title h4 {
  color: var(--black);
  font-size: 1rem;
}

.personnel-title p {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.personnel-list {
  display: grid;
  gap: 8px;
}

.personnel-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 8px;
  align-items: end;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.82);
}

.personnel-row.colleague-row {
  grid-template-columns: minmax(130px, 1fr) minmax(180px, 1.4fr) minmax(130px, 0.8fr) auto;
}

.personnel-row .danger-button {
  min-height: 42px;
  border: 1px solid rgba(216, 15, 31, 0.24);
  border-radius: var(--radius-sm);
  background: #fff5f6;
  color: var(--red-dark);
  cursor: pointer;
  font-weight: 900;
  padding: 0 12px;
}

.personnel-row .danger-button:hover {
  border-color: var(--red);
  background: #ffe8eb;
}

.template-help {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(247, 248, 250, 0.78);
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.45;
}

.email-template-list {
  display: grid;
  gap: 12px;
}

.email-template-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(247, 248, 250, 0.78);
}

.email-template-card h4 {
  margin: 0;
  color: var(--black);
}

.email-template-card textarea {
  min-height: 220px;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.45;
}

.admin-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.admin-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.help-button,
.book-button {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(216, 15, 31, 0.24);
  border-radius: 50%;
  background: #fff5f6;
  color: var(--red);
  cursor: pointer;
  font-size: 1.15rem;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(216, 15, 31, 0.08);
}

.book-button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.help-button:hover,
.book-button:hover {
  border-color: var(--red);
  background: #ffe8eb;
}

.knowledge-head {
  padding-right: 42px;
}

.knowledge-head h2,
.knowledge-head p {
  margin: 0;
}

.knowledge-head p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.45;
}

.knowledge-shell {
  display: grid;
  grid-template-columns: minmax(230px, 280px) minmax(0, 1fr);
  min-height: min(78vh, 760px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background: #1f2027;
  color: #f5f6fb;
}

.knowledge-sidebar {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 4px;
  padding: 10px 8px;
  overflow: auto;
  background: #16171d;
}

.knowledge-server-title {
  display: grid;
  gap: 2px;
  padding: 4px 8px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.knowledge-server-title strong {
  color: #ffffff;
  font-size: 1.05rem;
}

.knowledge-server-title span {
  color: #9ca3af;
  font-weight: 800;
}

.knowledge-channel-create {
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.knowledge-channel-create summary {
  padding: 7px 8px;
  cursor: pointer;
  color: #d7d9e2;
  font-weight: 900;
}

.knowledge-channel-create form {
  display: grid;
  gap: 6px;
  padding: 0 8px 8px;
}

.knowledge-channel-create label {
  color: #d7d9e2;
}

.knowledge-channel-create input {
  min-height: 36px;
  border-color: rgba(255, 255, 255, 0.14);
  background: #282a33;
  color: #f5f6fb;
}

.knowledge-channel-create input[name="emoji"] {
  max-width: 86px;
  font-size: 1.1rem;
  text-align: center;
}

.knowledge-channel-list,
.knowledge-channel-group {
  display: grid;
  gap: 16px;
  align-content: start;
  align-items: start;
}

.knowledge-channel-group h3 {
  display: none;
  margin: 0;
  color: #8f94a3;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.knowledge-channel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  width: 100%;
  min-height: 22px;
  padding: 1px 7px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #a7abb8;
  cursor: pointer;
  text-align: left;
}

.knowledge-channel-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22px;
  gap: 0;
  align-items: center;
  margin: 0;
  align-self: start;
}

.knowledge-channel-row .knowledge-channel {
  min-width: 0;
}

.knowledge-channel-delete,
.knowledge-message-delete {
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #8f94a3;
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: 900;
}

.knowledge-channel-delete {
  width: 22px;
  height: 22px;
}

.knowledge-channel-delete:hover,
.knowledge-message-delete:hover {
  background: rgba(216, 15, 31, 0.16);
  color: #ffffff;
}

.knowledge-channel strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.knowledge-channel em {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #d7d9e2;
  font-size: 0.75rem;
  font-style: normal;
}

.knowledge-channel:hover,
.knowledge-channel.active {
  background: #30323d;
  color: #ffffff;
}

.knowledge-main {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-width: 0;
  background: #23242c;
}

.knowledge-channel-head {
  padding: 18px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.knowledge-channel-head h2,
.knowledge-channel-head p {
  margin: 0;
}

.knowledge-channel-head h2 {
  color: #ffffff;
}

.knowledge-channel-head p:not(.eyebrow) {
  color: #9ca3af;
}

.knowledge-feed {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 0;
  padding: 22px;
  overflow: auto;
}

.knowledge-feed .empty {
  color: #a7abb8;
}

.knowledge-message {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 4px 0;
}

.knowledge-avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #d80f1f;
  color: #fff;
  font-weight: 900;
}

.knowledge-message-body {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.knowledge-message-body header {
  display: flex;
  gap: 10px;
  align-items: baseline;
}

.knowledge-message-body header strong {
  color: #ffffff;
}

.knowledge-message-body header span {
  color: #8f94a3;
  font-size: 0.86rem;
}

.knowledge-message-body h3,
.knowledge-message-body p {
  margin: 0;
}

.knowledge-message-body h3,
.knowledge-message-body h3 a {
  color: #ffffff;
  text-decoration: none;
}

.knowledge-message-body p {
  color: #d7d9e2;
  line-height: 1.48;
  white-space: pre-wrap;
}

.knowledge-message-delete {
  width: 32px;
  height: 32px;
  opacity: 0;
}

.knowledge-message:hover .knowledge-message-delete,
.knowledge-message-delete:focus-visible {
  opacity: 1;
}

.knowledge-attachment {
  display: grid;
  gap: 8px;
  width: min(520px, 100%);
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: #2d2f39;
  color: #ffffff;
  text-decoration: none;
}

.knowledge-attachment.image {
  padding: 0;
  overflow: hidden;
}

.knowledge-attachment img {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  background: #111217;
}

.knowledge-attachment.image strong {
  padding: 0 12px 12px;
}

.knowledge-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  padding: 16px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #23242c;
}

.knowledge-composer label {
  color: #d7d9e2;
}

.knowledge-composer input,
.knowledge-composer textarea {
  border-color: rgba(255, 255, 255, 0.12);
  background: #30323d;
  color: #ffffff;
}

.knowledge-composer textarea {
  min-height: 74px;
}

.knowledge-composer .wide,
.knowledge-composer .form-note {
  grid-column: 1 / -1;
}

.knowledge-composer-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.file-pill {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: #30323d;
  cursor: pointer;
  font-weight: 900;
}

.file-pill input {
  width: 1px;
  height: 1px;
  opacity: 0;
  position: absolute;
}

.help-content {
  display: grid;
  gap: 14px;
  margin-top: 6px;
}

.help-content section {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(247, 248, 250, 0.78);
}

.help-content h3 {
  margin: 0 0 8px;
  color: var(--black);
  font-size: 1rem;
}

.help-content p,
.help-content ul {
  margin: 0;
  color: var(--ink);
  line-height: 1.5;
}

.help-content ul {
  padding-left: 20px;
}

.help-content li + li {
  margin-top: 6px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.stats div {
  padding: 14px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.stats strong {
  display: block;
  color: var(--black);
  font-size: 1.6rem;
}

.stats span {
  color: var(--muted);
  font-weight: 700;
}

.filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.report-button {
  align-self: end;
  min-height: 44px;
}

.view-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
  margin: -4px 0 18px;
}

.view-summary {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.25;
}

.segmented {
  display: inline-flex;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(247, 248, 250, 0.86);
}

.segmented button {
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 900;
  padding: 0 14px;
}

.segmented button.active {
  background: var(--red);
  color: var(--white);
}

.segmented button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.task-list {
  display: grid;
  gap: 10px;
}

.calendar-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.calendar-day {
  min-height: 180px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.74);
}

.calendar-day h3 {
  margin: 0 0 10px;
  color: var(--black);
  font-size: 1rem;
}

.calendar-items {
  display: grid;
  gap: 7px;
}

.calendar-items p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.calendar-ticket {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 9px;
  border: 1px solid var(--line);
  border-left: 7px solid var(--black);
  border-radius: var(--radius-sm);
  background: var(--soft);
  color: var(--black);
  cursor: pointer;
  text-align: left;
}

.calendar-ticket strong {
  font-size: 0.9rem;
}

.calendar-ticket span {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.25;
}

.calendar-ticket.new {
  border-left-color: var(--red);
  background: #fff1f3;
}

.calendar-ticket.in_progress {
  border-left-color: #2563eb;
  background: #eff6ff;
}

.calendar-ticket.waiting {
  border-left-color: var(--warn);
  background: #fff7ed;
}

.calendar-ticket.done {
  border-left-color: var(--ok);
  background: #f0fdf4;
  opacity: 0.78;
}

.task {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 12px 14px 12px 18px;
  background: var(--white);
}

.task::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 10px;
  background: var(--black);
}

.task-highlight {
  box-shadow: 0 0 0 3px rgba(216, 15, 31, 0.22), 0 18px 34px rgba(17, 19, 22, 0.12);
}

.task.dringend {
  border-color: rgba(216, 15, 31, 0.28);
  background: linear-gradient(90deg, #fff1f3 0, #ffffff 48%);
  box-shadow: 0 14px 34px rgba(216, 15, 31, 0.08);
}

.task.dringend::before {
  background: var(--red);
}

.task.hoch {
  border-color: rgba(180, 83, 9, 0.28);
  background: linear-gradient(90deg, #fff7ed 0, #ffffff 48%);
}

.task.hoch::before {
  background: var(--warn);
}

.task.normal {
  border-color: rgba(234, 179, 8, 0.34);
  background: linear-gradient(90deg, #fefce8 0, #ffffff 48%);
}

.task.normal::before {
  background: var(--normal-priority);
}

.task.niedrig {
  border-color: rgba(37, 99, 235, 0.26);
  background: linear-gradient(90deg, #eff6ff 0, #ffffff 48%);
}

.task.niedrig::before {
  background: var(--low-priority);
}

.task.status-done {
  border-color: rgba(22, 101, 52, 0.36);
  background: linear-gradient(90deg, #ecfdf3 0, #ffffff 52%);
}

.task.status-done::before {
  background: var(--ok);
}

.task-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, auto);
  gap: 10px;
  align-items: flex-start;
}

.task-actions {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  justify-content: end;
  min-width: 0;
}

.task-selects {
  display: grid;
  grid-template-columns: minmax(96px, 112px) minmax(130px, 150px) minmax(150px, 174px);
  gap: 6px;
  width: min(100%, 456px);
  min-width: 0;
}

.task-selects label {
  gap: 4px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.task-selects select,
.task-selects input {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  padding: 7px 10px;
  font-size: 0.88rem;
}

.assignment-mail-button {
  grid-column: 2 / 4;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 12px;
  border: 1px solid rgba(216, 15, 31, 0.22);
  background: #ffffff;
  color: var(--red);
  cursor: pointer;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(17, 19, 22, 0.06);
}

.assignment-mail-button:hover:not(:disabled) {
  border-color: var(--red);
  background: #fff5f6;
}

.assignment-mail-button:disabled {
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.68;
  box-shadow: none;
}

.weather-button {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(216, 15, 31, 0.22);
  border-radius: 50%;
  background: #fff5f6;
  color: var(--red);
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
}

.weather-button:hover {
  border-color: var(--red);
  background: #ffe8eb;
  box-shadow: 0 10px 22px rgba(216, 15, 31, 0.12);
}

.task-head strong {
  display: block;
  color: var(--black);
}

.task-title-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.done-mark {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--ok);
  color: var(--white) !important;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
}

.task-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.priority-badge,
.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
}

.priority-badge.dringend {
  background: var(--red);
  color: var(--white);
}

.priority-badge.hoch {
  background: var(--warn);
  color: var(--white);
}

.priority-badge.normal {
  background: var(--normal-priority);
  color: var(--black);
}

.priority-badge.niedrig {
  background: var(--low-priority);
  color: var(--white);
}

.status-badge.new {
  background: #fff1f3;
  color: var(--red-dark);
  border: 1px solid rgba(216, 15, 31, 0.28);
}

.status-badge.in_progress {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid rgba(37, 99, 235, 0.28);
}

.status-badge.waiting {
  background: #fff7ed;
  color: #9a3412;
  border: 1px solid rgba(180, 83, 9, 0.28);
}

.status-badge.done {
  background: var(--ok);
  color: var(--white);
  border: 1px solid rgba(22, 101, 52, 0.52);
}

.task-head span,
.address {
  color: var(--muted);
}

.task h3 {
  margin: 10px 0 4px;
  font-size: 1.02rem;
  line-height: 1.25;
}

.task-message {
  margin: 8px 0 0;
  line-height: 1.42;
}

.task dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 10px 0 0;
}

.task dt {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.task dd {
  margin: 2px 0 0;
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.task dd a {
  color: var(--red-dark);
  font-weight: 800;
  text-decoration: none;
}

.task dd a:hover {
  text-decoration: underline;
}

.task-image {
  margin: 14px 0 0;
}

.task-image img {
  display: block;
  max-width: min(360px, 100%);
  max-height: 260px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  object-fit: contain;
  background: var(--soft);
}

.task-image figcaption {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.88rem;
}

.email-preview {
  margin-top: 10px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.email-preview summary {
  cursor: pointer;
  color: var(--black);
  font-weight: 800;
}

.email-preview pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 10px 0 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--soft);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.45;
}

.empty {
  color: var(--muted);
  font-weight: 700;
}

.done-page {
  display: grid;
  place-items: center;
  padding: 20px;
}

.done-card {
  max-width: 520px;
  padding: 30px;
  text-align: center;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.done-card img {
  width: 140px;
  margin-bottom: 18px;
}

@media (max-width: 820px) {
  .app-header,
  .priority-grid,
  .subcategory-grid,
  .two-col,
  .welcome-panel,
  .gallery-track,
  .company-admin-facts,
  .company-facts,
  .company-content,
  .stats,
  .filters,
  .task dl {
    grid-template-columns: 1fr;
  }

  .app-header {
    gap: 10px;
    text-align: left;
  }

  .split-brand {
    grid-template-columns: minmax(0, 1.25fr) minmax(100px, 0.75fr);
    gap: 10px;
    max-width: calc(100vw - 40px);
  }

  .brand-wordmark {
    order: 1;
  }

  .brand-symbol {
    order: 2;
    max-height: 118px;
  }

  .report-panel,
  .admin-panel,
  .welcome-panel,
  .company-panel {
    padding: 16px;
  }

  .admin-topline,
  .report-topline,
  .task-head {
    align-items: stretch;
    flex-direction: column;
    grid-template-columns: 1fr;
  }

  .task-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-actions {
    width: 100%;
    justify-content: space-between;
  }

  .task-selects,
  .task-actions select {
    min-width: 0;
    width: 100%;
    flex: 1;
  }

  .task-selects {
    grid-template-columns: 1fr;
  }

  .assignment-mail-button {
    grid-column: 1;
  }

  .knowledge-shell,
  .knowledge-composer,
  .knowledge-message {
    grid-template-columns: 1fr;
  }

  .knowledge-shell {
    max-height: none;
  }

  .knowledge-sidebar,
  .knowledge-feed {
    max-height: 42vh;
  }

  .view-controls,
  .admin-section-tabs,
  .view-controls label,
  .view-controls input,
  .view-controls select,
  .view-summary,
  .segmented {
    width: 100%;
  }

  .segmented button {
    flex: 1;
  }

  .admin-subhead {
    flex-direction: column;
  }

  .gallery-row {
    mask-image: none;
    padding: 12px 0 16px;
  }

  .gallery-strip {
    width: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    animation: none;
  }

  .gallery-item {
    flex: 0 0 82%;
    aspect-ratio: 4 / 3;
    scroll-snap-align: center;
    transform: none;
  }

  .admin-gallery-list article {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .admin-gallery-list button {
    grid-column: 1 / -1;
  }

  .staff-ticket-box form {
    grid-template-columns: 1fr;
  }

  .personnel-row,
  .personnel-row.colleague-row,
  .hausverwaltung-row-head,
  .hausverwaltung-address-grid,
  .object-address-add,
  .object-street-add {
    grid-template-columns: 1fr;
  }

  .object-address-head {
    flex-direction: column;
  }

  .hausverwaltung-card-header {
    flex-direction: column;
  }

  .hausverwaltung-card-meta {
    justify-content: flex-start;
  }

  .personnel-title {
    align-items: stretch;
    flex-direction: column;
  }

  .topic-add {
    align-items: stretch;
    flex-direction: column;
  }

  .topic-add input {
    min-width: 0;
  }

  .weather-grid {
    grid-template-columns: 1fr;
  }

  .weather-hour-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .welcome-actions {
    justify-content: stretch;
  }

  .welcome-actions .submit-button,
  .welcome-actions .ghost-button,
  #repeatContactReport {
    width: 100%;
  }

  #repeatContactReport {
    margin: 10px 0 0;
  }
}
