:root {
  --bg: #0f0f12;
  --bg2: #15151a;
  --panel: rgba(255, 255, 255, 0.06);
  --text: #f4f4f6;
  --muted: rgba(244, 244, 246, 0.72);
  --border: rgba(255, 255, 255, 0.14);
  --brand: #ff9d3d;
  --brand2: #ff6a3d;
}

* { box-sizing: border-box; }

img {
  max-width: 100%;
  height: auto;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  background: linear-gradient(135deg, #ffe6cf 0%, #ffffff 65%, #ffffff 100%);
  color: #111114;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }
a:hover { color: #b84a00; }

button,
input[type="button"],
input[type="submit"],
input[type="reset"] {
  cursor: pointer;
}

button:disabled,
input[type="button"]:disabled,
input[type="submit"]:disabled,
input[type="reset"]:disabled {
  cursor: not-allowed;
}

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

.edit-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.70);
  color: rgba(17, 17, 20, 0.80);
  font-weight: 800;
  cursor: pointer;
}

.add-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.70);
  color: rgba(17, 17, 20, 0.80);
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.add-icon:hover {
  color: #b84a00;
  border-color: rgba(184, 74, 0, 0.35);
}

.edit-icon:hover {
  color: #b84a00;
  border-color: rgba(184, 74, 0, 0.35);
}

.icon-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.icon-toggle__input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.icon-toggle__label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.70);
  color: rgba(17, 17, 20, 0.88);
  font-weight: 700;
  cursor: pointer;
  user-select: none;
}

.icon-toggle__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.75);
}

.icon-toggle__input:focus-visible + .icon-toggle__label {
  outline: 2px solid rgba(184, 74, 0, 0.45);
  outline-offset: 2px;
}

.icon-toggle__input:checked + .icon-toggle__label {
  border-color: rgba(184, 74, 0, 0.45);
  background: linear-gradient(90deg, rgba(184, 74, 0, 0.12) 0%, rgba(255, 138, 42, 0.12) 45%, rgba(255, 191, 107, 0.18) 100%);
}

.icon-toggle__input:checked + .icon-toggle__label .icon-toggle__icon {
  border-color: rgba(184, 74, 0, 0.45);
  background: linear-gradient(90deg, #b84a00 0%, #ff8a2a 45%, #ffbf6b 100%);
  color: #111114;
}

.icon-toggle--success .icon-toggle__input:checked + .icon-toggle__label {
  border-color: rgba(0, 110, 70, 0.45);
  background: rgba(0, 170, 110, 0.12);
}

.icon-toggle--success .icon-toggle__input:checked + .icon-toggle__label .icon-toggle__icon {
  border-color: rgba(0, 110, 70, 0.45);
  background: linear-gradient(90deg, #19b56b 0%, #48d47f 55%, #a5f3c0 100%);
  color: #0f0f12;
}

.icon-toggle--danger .icon-toggle__input:checked + .icon-toggle__label {
  border-color: rgba(140, 0, 0, 0.35);
  background: rgba(255, 60, 60, 0.16);
}

.icon-toggle--danger .icon-toggle__input:checked + .icon-toggle__label .icon-toggle__icon {
  border-color: rgba(140, 0, 0, 0.35);
  background: linear-gradient(90deg, #ff3b3b 0%, #ff6b6b 55%, #ffd1d1 100%);
  color: #0f0f12;
}

.icon-toggle--small .icon-toggle__label {
  padding: 8px 10px;
  border-radius: 12px;
  font-weight: 700;
}

.icon-toggle--small .icon-toggle__icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
}

.icon-toggle--small .icon-toggle__text {
  font-size: 0.92rem;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.form-actions__left {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

 .form-actions__right {
   display: inline-flex;
   align-items: center;
   gap: 12px;
   flex-wrap: wrap;
 }

 .form-actions__right .auth-primary,
 .form-actions__right .auth-button {
  width: auto;
  min-width: 0;
  font-size: 1.05rem;
  padding: 12px 16px;
}

.buchhaltung-row--er {
  background: linear-gradient(90deg, rgba(245, 245, 245, 0.95) 0%, rgba(223, 169, 169, 0.98) 70%);
}

.buchhaltung-row--ar {
  background: linear-gradient(90deg, rgba(127, 187, 137, 0.85) 0%, rgba(255, 255, 255, 0.98) 70%);
}

.upload-dropzone__input {
  display: none;
}

.upload-dropzone {
  border: 2px dashed rgba(0, 0, 0, 0.25);
  border-radius: 16px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0.70) 100%);
  cursor: pointer;
  user-select: none;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
  outline: none;
}

.upload-dropzone:focus {
  border-color: rgba(0, 0, 0, 0.55);
  box-shadow: 0 0 0 4px rgba(255, 138, 42, 0.18);
}

.upload-dropzone.is-dragover {
  border-color: rgba(0, 0, 0, 0.7);
  background: rgba(0, 0, 0, 0.04);
  transform: translateY(-1px) scale(1.01);
}

.upload-dropzone__title {
  font-weight: 800;
  margin-bottom: 4px;
}

.upload-dropzone__sub {
  opacity: 0.75;
  margin-bottom: 10px;
}

.upload-dropzone__files {
  font-size: 0.95rem;
  opacity: 0.9;
  word-break: break-word;
}

.attachment-grid {
  display: flex;
  gap: 10px;
  margin: 10px 0 14px 0;
  overflow-x: auto;
  padding-bottom: 6px;
  scroll-snap-type: x mandatory;
  max-height: 140px;
  width: 100%;
  max-width: 700px;
  box-sizing: border-box;
}

.attachment-tile {
  position: relative;
  border: 1px solid rgba(0, 0, 0, 0.10);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.75);
  overflow: hidden;
  flex: 0 0 190px;
  scroll-snap-align: start;
  height: 140px;
}

.attachment-tile__click {
  appearance: none;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  width: 100%;
  height: 100%;
  display: block;
  cursor: pointer;
}

.attachment-tile__media {
  position: relative;
  height: 100%;
  background: rgba(0, 0, 0, 0.03);
}

.attachment-tile__img,
.attachment-tile__iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  object-fit: cover;
}

.attachment-tile__placeholder {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  color: rgba(17, 17, 20, 0.75);
}

.attachment-tile__placeholder-icon {
  font-size: 22px;
}

.attachment-tile__placeholder-name {
  width: 100%;
  font-weight: 800;
  font-size: 0.85rem;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-tile__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
}

.attachment-tile__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
  font-size: 0.95rem;
}

.attachment-tile__actions {
  display: inline-flex;
  gap: 8px;
}

.attachment-tile__loader {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.75);
  z-index: 2;
}

.attachment-tile__spinner {
  width: 18px;
  height: 18px;
  border: 3px solid rgba(0,0,0,0.18);
  border-top-color: rgba(0,0,0,0.65);
  border-radius: 999px;
  animation: spin 0.9s linear infinite;
}

.buchhaltung-layout {
  display: grid;
  grid-template-columns: 7fr 3fr;
  gap: 16px;
  align-items: start;
}

.buchhaltung-main {
  min-width: 0;
}

.buchhaltung-side {
  min-width: 0;
}

.buchhaltung-totals {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: flex-end;
  margin-bottom: 8px;
}

.buchhaltung-total {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.10);
  background: rgba(255, 255, 255, 0.75);
  min-width: 140px;
}

.buchhaltung-total__label {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: rgba(17, 17, 20, 0.62);
  text-transform: uppercase;
}

.buchhaltung-total__value {
  font-size: 1.05rem;
  font-weight: 900;
  color: rgba(17, 17, 20, 0.92);
}

.buchhaltung-total--income {
  border-color: rgba(11, 122, 55, 0.18);
  background: rgba(11, 122, 55, 0.08);
}

.buchhaltung-total--expense {
  border-color: rgba(176, 0, 32, 0.18);
  background: rgba(176, 0, 32, 0.08);
}

.buchhaltung-total--balance-positive {
  border-color: rgba(11, 122, 55, 0.22);
  background: rgba(11, 122, 55, 0.12);
}

.buchhaltung-total--balance-negative {
  border-color: rgba(176, 0, 32, 0.22);
  background: rgba(176, 0, 32, 0.12);
}

.invoice-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.70);
  color: rgba(17, 17, 20, 0.78);
  margin-right: 8px;
}

.overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 2000;
}

.overlay.is-open {
  display: flex;
}

.overlay__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
}

.overlay__panel {
  position: relative;
  width: min(560px, 100%);
  border-radius: 18px;
  padding: 18px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.25);
}

.overlay__actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
}

.overlay__actions--split {
  justify-content: space-between;
}

.overlay__actions--split .auth-button,
.overlay__actions--split .auth-primary {
  flex: 1;
  min-width: 0;
}

.auth-button.auth-button--secondary {
  background: rgba(255, 255, 255, 0.98);
  color: #111114;
  border: 1px solid rgba(0, 0, 0, 0.14);
}

.auth-button.auth-button--secondary:hover {
  background: rgba(255, 255, 255, 1);
}

.overlay__panel h2 {
  margin: 0 0 8px 0;
}

.overlay__panel p {
  margin: 0 0 14px 0;
  color: rgba(17, 17, 20, 0.82);
}

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

.auth-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  min-height: 42px;
  min-width: 160px;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: linear-gradient(90deg, #b84a00 0%, #ff8a2a 45%, #ffbf6b 100%);
  color: #111114;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

button.auth-button,
a.auth-button,
button.auth-button:hover,
a.auth-button:hover {
  cursor: pointer;
}

.auth-button:disabled {
  cursor: not-allowed;
}

.auth-button--success {
  background: linear-gradient(90deg, #19b56b 0%, #48d47f 55%, #a5f3c0 100%);
}

.auth-button:hover {
  color: #111114;
  border-color: rgba(184, 74, 0, 0.35);
}

.inline-form {
  display: inline;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
  background: linear-gradient(90deg, #b84a00 0%, #ff8a2a 45%, #ffbf6b 100%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

.navbar {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 16px;
}

.brand {
  font-weight: 700;
  letter-spacing: 0.2px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #121212;
}

.brand__logo {
  height: 34px;
  width: auto;
  display: block;
  border-radius: 8px;
}

.brand__text {
  line-height: 1;
}

.nav-toggle {
  margin-left: auto;
  display: none;
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.18);
  border-radius: 10px;
  padding: 8px;
}

.nav-toggle__bar {
  display: block;
  width: 22px;
  height: 2px;
  background: #121212;
  margin: 4px 0;
}

.nav-links {
  display: flex;
  align-items: center;
  flex: 1;
}

.nav-links a {
  color: #121212;
}

.nav-links a:hover {
  color: #ffffff;
}

.nav-links__left {
  display: flex;
  gap: 14px;
  margin-left: 12px;
}

.nav-links__right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.member-link {
  padding: 10px 14px;
  border: 1px solid rgba(0, 0, 0, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.55);
  color: #121212;
  font-weight: 700;
}

.member-link--pulse {
  font-weight: 800;
  border-color: rgba(255, 40, 40, 0.95);
  background: rgba(255, 214, 0, 0.85);
  color: #7a0000;
  text-shadow: 0 0 10px rgba(255, 214, 0, 0.95);
  animation: meetingPulse 0.85s ease-in-out infinite;
}

.member-link:hover {
  color: #121212;
}

a.member-link {
  color: #121212;
  text-decoration: none;
}

a.member-link:hover {
  color: #121212;
}

.media-control {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.85);
  color: #19b56b;
}

.media-control__icon {
  width: 22px;
  height: 22px;
  display: block;
}

.media-control__slash {
  position: absolute;
  display: none;
  width: 34px;
  height: 2px;
  background: #ff3b3b;
  transform: rotate(-35deg);
  border-radius: 999px;
}

.media-control.is-off {
  color: #ff3b3b;
  border-color: rgba(140, 0, 0, 0.22);
  background: rgba(255, 60, 60, 0.10);
}

.media-control.is-off .media-control__slash {
  display: block;
}

.media-control:hover {
  border-color: rgba(184, 74, 0, 0.35);
}

.home-hero {
  padding: 26px 22px;
  border: 1px solid rgba(0, 0, 0, 0.10);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.78);
}

.home-soon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(184, 74, 0, 0.35);
  background: rgba(255, 255, 255, 0.70);
  color: rgba(17, 17, 20, 0.78);
  font-weight: 800;
  letter-spacing: 0.2px;
  margin-bottom: 12px;
  animation:
    homeEnter 950ms cubic-bezier(0.22, 1, 0.36, 1) both,
    homePulse 1.8s ease-in-out infinite 950ms;
}

@keyframes homeEnter {
  from {
    opacity: 0;
    transform: translateX(-100vw);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes homePulse {
  0%, 100% {
    transform: translateX(0) translateY(0);
    box-shadow: 0 0 0 0 rgba(184, 74, 0, 0.22);
  }
  50% {
    transform: translateX(0) translateY(-1px);
    box-shadow: 0 0 0 10px rgba(184, 74, 0, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-soon {
    animation: none;
  }
}

@keyframes meetingPulse {
  0%, 100% {
    transform: translateY(0) scale(1);
    background: rgba(255, 214, 0, 0.85);
    border-color: rgba(255, 40, 40, 0.95);
    color: #7a0000;
    text-shadow: 0 0 8px rgba(255, 214, 0, 0.90);
    box-shadow:
      0 0 0 0 rgba(255, 40, 40, 0.75),
      0 12px 26px rgba(0, 0, 0, 0.18);
  }
  50% {
    transform: translateY(-2px) scale(1.06);
    background: rgba(255, 40, 40, 0.95);
    border-color: rgba(255, 214, 0, 0.95);
    color: #ffffff;
    text-shadow: 0 0 14px rgba(255, 214, 0, 1.0);
    box-shadow:
      0 0 0 18px rgba(255, 214, 0, 0),
      0 0 28px rgba(255, 40, 40, 0.55),
      0 16px 34px rgba(0, 0, 0, 0.22);
  }
}

.home-hero__title {
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.3px;
  font-size: clamp(28px, 3.2vw, 44px);
}

.home-hero__lead {
  margin: 12px 0 0 0;
  font-size: clamp(16px, 1.4vw, 18px);
  line-height: 1.6;
  color: rgba(17, 17, 20, 0.76);
  max-width: 68ch;
}

.home-hero__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.home-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: linear-gradient(90deg, #e15c04 0%, #ff8a2a 45%, #ffbf6b 100%);
  color: #111114;
  font-weight: 700;
}

.home-cta--ghost {
  background: rgba(255, 255, 255, 0.65);
  background: linear-gradient(90deg, #e9e2de 0%, #f4f2f1 45%, #f1e7da 100%);
}

.home-sections {
  margin-top: 18px;
}

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

.home-card {
  padding: 18px;
  border: 1px solid rgba(0, 0, 0, 0.10);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.85);
}

.home-card__title {
  margin: 0 0 10px 0;
  font-size: 18px;
  letter-spacing: -0.2px;
}

.home-card__text {
  margin: 0;
  line-height: 1.6;
  color: rgba(17, 17, 20, 0.78);
}

.home-callout {
  margin-top: 16px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(0, 0, 0, 0.10);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88) 0%, rgba(255, 255, 255, 0.68) 100%);
}

.home-callout__title {
  margin: 0 0 8px 0;
}

.home-callout__text {
  margin: 0 0 12px 0;
  color: rgba(17, 17, 20, 0.78);
  line-height: 1.6;
}

.about-photo {
  width: 100%;
  max-width: 420px;
  height: auto;
  display: block;
  border-radius: 18px;
  border: 1px solid rgba(0, 0, 0, 0.10);
  background: rgba(255, 255, 255, 0.85);
}

.container {
  max-width: none;
  margin: 30px 50px;
  padding: 28px 30px 20px 30px;
  background: linear-gradient(180deg, #d7ae8e 0%, #f3f4f6 100%);
  color: #111114;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 40px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.20);
  flex: 1;
  width: calc(100% - 100px);
  min-height: calc(100vh - 76px - 60px);
}

.container > .detail-card,
.container > .auth-card,
.container > .upload-card,
.container > .home-hero,
.container > .home-sections {
  margin-top: 16px;
}

.container > .detail-card:first-child,
.container > .auth-card:first-child,
.container > .upload-card:first-child,
.container > .home-hero:first-child,
.container > .home-sections:first-child {
  margin-top: 0;
}

@media (max-width: 1024px) {
  .navbar {
    max-width: none;
  }

  .container {
    margin: 18px 16px;
    width: calc(100% - 32px);
    padding: 22px 18px 18px 18px;
    border-radius: 26px;
  }

  .customer-card {
    padding: 14px 16px;
  }

  .detail-card {
    padding: 18px;
  }
}

@media (max-width: 640px) {
  .container {
    margin: 12px;
    width: calc(100% - 24px);
    padding: 18px 14px 16px 14px;
    border-radius: 22px;
  }

  .navbar {
    padding: 10px 12px;
  }

  .brand__logo {
    height: 30px;
  }

  h1 {
    font-size: 26px;
  }

  .detail-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .detail-row span {
    width: 100%;
  }
}

.container a { color: inherit; }
.container a:hover { color: #b84a00; }

.auth-form {
  max-width: none;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel);
}

.auth-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 640px) {
  .auth-grid {
    grid-template-columns: 1fr;
  }
}

.auth-shell {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100%;
}

.auth-card {
  width: min(520px, 100%);
  padding: 22px;
  border-radius: 18px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.18);
}

.auth-card--wide {
  width: 100%;
  max-width: none;
}

.member-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 12px 0 14px 0;
}

.buchhaltung-layout {
  display: grid;
  grid-template-columns: 7fr 3fr;
  gap: 1.25rem;
  align-items: start;
}

.buchhaltung-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.buchhaltung-period-nav {
  display: flex;
  gap: 8px;
}

@media (max-width: 900px) {
  .buchhaltung-layout {
    grid-template-columns: 1fr;
  }
}

.buchhaltung-accordion details {
  border: 1px solid rgba(0, 0, 0, 0.10);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.85);
  padding: 0.25rem 0.9rem;
  margin-bottom: 0.75rem;
}

.buchhaltung-accordion summary {
  cursor: pointer;
  padding: 0.8rem 0;
  font-weight: 700;
}

.buchhaltung-accordion__content {
  padding: 0.25rem 0 0.85rem 0;
}

.buchhaltung-doc {
  padding: 0.6rem 0;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.buchhaltung-doc:first-child {
  border-top: none;
}

.buchhaltung-doc__title {
  font-weight: 800;
}

.buchhaltung-doc__meta {
  font-size: 0.9rem;
  color: rgba(17, 17, 20, 0.72);
}

.dropzone {
  border: 2px dashed rgba(0, 0, 0, 0.18);
  border-radius: 18px;
  padding: 1.1rem;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  outline: none;
  transition: border-color 120ms ease, background 120ms ease;
}

.dropzone--active {
  border-color: rgba(184, 74, 0, 0.55);
  background: rgba(184, 74, 0, 0.06);
}

.dropzone__title {
  font-weight: 800;
}

.dropzone__subtitle {
  margin-top: 0.25rem;
  color: rgba(17, 17, 20, 0.72);
}

.dropzone__filename {
  margin-top: 0.6rem;
  font-weight: 700;
}

.dropzone__input {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.auth-card__header h1 {
  margin: 0 0 6px 0;
}

.auth-card__header p {
  margin: 0 0 18px 0;
  color: rgba(17, 17, 20, 0.72);
}

.auth-field input,
.auth-field select,
.auth-field textarea {
  width: 100%;
}

.auth-primary {
  width: 100%;
}

.auth-actions {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 12px;
}

.auth-actions a {
  color: #b84a00;
  font-weight: 600;
}

.auth-actions a:hover {
  color: #ff6a3d;
}

.customer-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 18px;
}

.customer-card {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
  padding: 14px 18px;
  border: 1px solid rgba(0, 0, 0, 0.10);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.85);
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.customer-card__left {
  min-width: 0;
}

.customer-card__right {
  text-align: right;
  white-space: nowrap;
  margin-left: 16px;
}

.customer-card:hover {
  transform: translateY(-1px);
  border-color: rgba(184, 74, 0, 0.35);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
}

.customer-card__name {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.2px;
  margin-bottom: 4px;
  color: #111114;
}

.customer-card__linked {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  color: #ff3b3b;
  vertical-align: middle;
}

.customer-card__linked-icon {
  width: 16px;
  height: 16px;
  display: block;
}

.customer-card__addr {
  color: rgba(17, 17, 20, 0.72);
}

.customer-card__zipcity {
  color: rgba(17, 17, 20, 0.72);
}

.customer-card__addr2 {
  display: block;
  margin-top: 6px;
}

@media (max-width: 640px) {
  .customer-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 14px 14px;
  }

  .customer-card__right {
    text-align: left;
    margin-left: 0;
    margin-top: 6px;
    white-space: normal;
  }
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 18px;
}

.detail-card {
  padding: 22px;
  border: 1px solid rgba(0, 0, 0, 0.10);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.85);
}

.detail-card h2 {
  margin: 0 0 14px 0;
}

.detail-card--span2 {
  grid-column: 1 / -1;
}

.detail-wide-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 16px;
  align-items: start;
}

.detail-notes-block .detail-row {
  align-items: flex-start;
}

.detail-notes-block .detail-row span:last-child {
  text-align: left;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-label {
  color: rgba(17, 17, 20, 0.70);
  font-weight: 700;
}

.detail-notes {
  color: rgba(17, 17, 20, 0.80);
}

.animal-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.detail-list--compact {
  max-height: 260px;
  overflow: auto;
  padding-right: 6px;
}

.animal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(0, 0, 0, 0.10);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.80);
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.animal-row:hover {
  transform: translateY(-1px);
  border-color: rgba(184, 74, 0, 0.35);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.10);
}

.animal-row__left {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.animal-row__name {
  font-weight: 800;
  color: #111114;
}

.animal-row__breed {
  color: rgba(17, 17, 20, 0.72);
  font-weight: 600;
}

.animal-row__right {
  color: rgba(17, 17, 20, 0.72);
  font-weight: 600;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .animal-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .animal-row__left {
    flex-wrap: wrap;
  }

  .animal-row__right {
    white-space: normal;
    width: 100%;
    overflow-wrap: anywhere;
  }
}

.stars {
  color: #b84a00;
  letter-spacing: 1px;
}

.session-layout {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 16px;
  align-items: start;
  margin-top: 18px;
}

.customer-contact-card h2 {
  margin: 0;
}

.contact-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.contact-header h2 {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex: 0 0 auto;
}

.contact-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.10);
  font-weight: 900;
  line-height: 1;
}

.contact-icon--yes {
  color: #0b7a37;
  background: rgba(11, 122, 55, 0.10);
}

.contact-icon--no {
  color: #b00020;
  background: rgba(176, 0, 32, 0.10);
}

.contact-icon--delete {
  color: #b00020;
  background: rgba(176, 0, 32, 0.10);
  border-color: rgba(176, 0, 32, 0.18);
}

.contact-icon--delete:hover {
  background: rgba(176, 0, 32, 0.16);
}

.contact-grid {
  display: grid;
  gap: 10px;
}

.contact-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.contact-item {
  padding: 10px 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.70);
  color: rgba(17, 17, 20, 0.84);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-row--address .contact-item:last-child {
  text-align: right;
}

.contact-notes {
  padding: 12px 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.70);
  color: rgba(17, 17, 20, 0.80);
  line-height: 1.55;
}

.detail-card--offset {
  margin-top: 38px;
}

.session-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  align-items: end;
}

.upload-card {
  padding: 22px;
  border: 1px solid rgba(0, 0, 0, 0.10);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.85);
}

.upload-card h2 {
  margin: 0 0 14px 0;
}

.upload-dropzone {
  position: relative;
  border: 1px dashed rgba(0, 0, 0, 0.22);
  border-radius: 14px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.65);
}

.upload-input {
  width: 100%;
}

.upload-hint {
  margin-top: 10px;
  color: rgba(17, 17, 20, 0.72);
  font-weight: 600;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.80);
  border: 1px solid rgba(0, 0, 0, 0.10);
  border-radius: 14px;
}

.table th,
.table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  text-align: left;
  white-space: nowrap;
}

.table thead th {
  font-weight: 800;
  color: rgba(17, 17, 20, 0.76);
}

.table tbody tr:last-child td,
.table tfoot tr:last-child td {
  border-bottom: none;
}

@media (max-width: 820px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .detail-wide-grid {
    grid-template-columns: 1fr;
  }

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

  .session-layout {
    grid-template-columns: 1fr;
  }

  .buchhaltung-layout {
    grid-template-columns: 1fr;
  }

  .contact-row {
    grid-template-columns: 1fr;
  }

  .session-form-row {
    grid-template-columns: 1fr;
  }

  .detail-card--offset {
    margin-top: 0;
  }
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

input {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  background: rgba(255, 255, 255, 0.9);
  color: #111114;
}

select {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  background: rgba(255, 255, 255, 0.9);
  color: #111114;
}

textarea {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  background: rgba(255, 255, 255, 0.9);
  color: #111114;
}

button {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: linear-gradient(90deg, #d77428 0%, #ff8a2a 45%, #ffbf6b 100%);
  color: #111114;
  cursor: pointer;
}

input[type="submit"],
input[type="button"] {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: linear-gradient(90deg, #d45a00 0%, #ff8a2a 45%, #ffbf6b 100%);
  color: #111114;
  cursor: pointer;
}

.star-rating {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  margin-top: 6px;
}

.star-rating--create {
  margin-bottom: 50px;
}

.star-rating__star {
  border: 1px solid rgba(0, 0, 0, 0.14);
  background: rgba(255, 255, 255, 0.85);
  padding: 8px 10px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  color: rgba(17, 17, 20, 0.55);
}

.star-rating__star.is-active {
  color: #b84a00;
  border-color: rgba(184, 74, 0, 0.30);
}

.star-rating__star:hover {
  border-color: rgba(184, 74, 0, 0.35);
}

.link-button {
  background: transparent;
  border: none;
  padding: 8px 10px;
  color: rgba(18, 18, 18, 0.78);
}

.link-button:hover {
  color: #ffffff;
}

.nav-inline-form { margin: 0; }

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border: 1px solid rgba(0, 0, 0, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.55);
  color: #121212;
}

.icon-button:hover {
  color: #ffffff;
}

.icon {
  width: 18px;
  height: 18px;
  display: block;
  fill: currentColor;
}

@media (max-width: 820px) {
  .nav-toggle {
    display: inline-flex;
    padding: 6px;
    border-radius: 12px;
  }

  .nav-toggle__bar {
    width: 18px;
    margin: 3px 0;
  }

  .brand__text { display: none; }

  .nav-links {
    display: none;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    margin-top: 10px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
    padding: 10px;
  }

  .nav-links.is-open { display: flex; }

  .nav-links a {
    display: block;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.10);
    background: rgba(255, 255, 255, 0.70);
    color: #121212;
    font-weight: 700;
    text-decoration: none;
  }

  .nav-links a:hover {
    color: #121212;
    border-color: rgba(184, 74, 0, 0.35);
    background: rgba(255, 255, 255, 0.92);
  }

  .nav-links__left {
    margin-left: 0;
    flex-direction: column;
    gap: 8px;
    padding: 6px 0;
  }

  .nav-links__right {
    margin-left: 0;
    justify-content: flex-start;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding-bottom: 6px;
  }

  .nav-inline-form {
    width: 100%;
  }

  .icon-button {
    width: 100%;
    justify-content: center;
    padding: 12px 14px;
  }
}
