:root {
  --navy: #0f172a;
  --navy-soft: #1e293b;
  --green: #22c55e;
  --green-dark: #15803d;
  --bg: #f3f4f6;
  --card: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  color: var(--text);
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
}

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

button {
  cursor: pointer;
}

a {
  color: inherit;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px 1fr;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  color: #f8fafc;
  background: var(--navy);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  text-decoration: none;
}

.brand-dark {
  color: var(--navy);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
  color: var(--navy);
  background: var(--green);
  font-weight: 900;
}

.side-nav {
  display: grid;
  gap: 8px;
  margin-top: 34px;
}

.nav-item,
.bottom-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: var(--radius);
  color: #cbd5e1;
  background: transparent;
  font-weight: 700;
  text-align: left;
}

.nav-item {
  padding: 0 14px;
}

.nav-item span,
.bottom-item span {
  width: 22px;
  text-align: center;
}

.nav-item:hover,
.nav-item.active {
  color: #fff;
  background: var(--navy-soft);
}

.settings-link {
  margin-top: auto;
  font-size: 14px;
}

.sidebar-legal {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 12px 14px 0;
  border-top: 1px solid rgba(203, 213, 225, 0.18);
}

.sidebar-legal a {
  color: #94a3b8;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.sidebar-legal a:hover {
  color: #fff;
}

.app-main {
  min-width: 0;
  padding: 36px;
}

.demo-notice {
  max-width: 1320px;
  margin: 0 auto 18px;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius);
  padding: 12px 14px;
  color: #166534;
  background: #f0fdf4;
  font-size: 14px;
  font-weight: 700;
}

.demo-mobile-legal {
  display: none;
}

.view {
  max-width: 1320px;
  margin: 0 auto;
}

.view-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.view-header h1 {
  margin: 0;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.05;
  letter-spacing: 0;
}

.view-header p,
.landing-copy p,
.panel p,
.customer-card p {
  color: var(--muted);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.button-primary {
  color: #052e16;
  background: var(--green);
}

.button-primary:hover {
  background: #4ade80;
}

.button-light {
  border-color: var(--line);
  color: var(--text);
  background: #fff;
}

.button-danger {
  color: #fff;
  background: #dc2626;
}

.button-large {
  min-height: 56px;
  padding-inline: 26px;
  font-size: 17px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.kpi-card,
.panel,
.customer-card,
.mobile-day-card,
.preview-panel,
.benefit-grid article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}

.kpi-card {
  padding: 20px;
}

.kpi-card span,
.kpi-card small {
  display: block;
  color: var(--muted);
  font-weight: 700;
}

.kpi-card strong {
  display: block;
  margin: 8px 0 4px;
  font-size: 30px;
  line-height: 1;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  gap: 22px;
}

.panel {
  padding: 22px;
}

.panel h2 {
  margin: 0 0 16px;
  font-size: 20px;
}

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

.panel-title h2 {
  margin: 0;
}

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

.order-item,
.compact-order {
  display: grid;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 74px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  text-align: left;
}

.order-item {
  grid-template-columns: 70px minmax(0, 1fr) auto;
  padding: 12px 14px;
}

.compact-order {
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 14px;
}

.compact-order:has(.order-time) {
  grid-template-columns: 68px minmax(0, 1fr);
}

.order-item:hover,
.compact-order:hover,
.customer-card:hover {
  border-color: #bbf7d0;
  box-shadow: 0 12px 30px rgba(34, 197, 94, 0.12);
}

.order-item strong,
.compact-order strong,
.customer-card h2,
.mobile-day-card strong {
  display: block;
}

.order-item em,
.compact-order em {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-style: normal;
}

.order-item small,
.compact-order small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.order-time {
  color: var(--green-dark);
  font-weight: 900;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.status-offen {
  color: #92400e;
  background: #fef3c7;
}

.status-geplant {
  color: #166534;
  background: #dcfce7;
}

.status-erledigt {
  color: #475569;
  background: #f1f5f9;
}

.toolbar {
  margin-bottom: 18px;
}

.split-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 12px;
}

.search-field,
.select-field,
.form-field {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.search-field input,
.select-field select,
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  color: var(--text);
  background: #fff;
  outline: none;
}

.form-field textarea {
  resize: vertical;
}

.search-field input:focus,
.select-field select:focus,
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}

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

.customer-card {
  padding: 18px;
  cursor: pointer;
}

.customer-card h2 {
  margin: 0 0 10px;
  font-size: 18px;
}

.customer-card span {
  color: var(--green-dark);
  font-weight: 800;
}

.back-link {
  margin-bottom: 16px;
  border: 0;
  color: var(--green-dark);
  background: transparent;
  font-weight: 900;
}

.detail-header {
  align-items: center;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.note-panel {
  grid-column: span 1;
}

.detail-line {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 10px;
  margin: 12px 0;
}

.detail-line dt {
  color: var(--muted);
  font-weight: 800;
}

.detail-line dd {
  margin: 0;
}

.text-link {
  color: var(--green-dark);
  font-weight: 800;
}

.segmented {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.segmented button {
  min-height: 44px;
  border: 0;
  border-right: 1px solid var(--line);
  padding: 0 16px;
  background: #fff;
  font-weight: 800;
}

.segmented button:last-child {
  border-right: 0;
}

.segmented button.active {
  color: #052e16;
  background: var(--green);
}

.danger-zone {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

.calendar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 20px;
}

.calendar-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow);
}

.weekday-row,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.weekday-row {
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  background: #f8fafc;
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.weekday-row span {
  padding: 12px 4px;
}

.calendar-day {
  min-height: 106px;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 10px;
  background: #fff;
  text-align: left;
}

.calendar-day:nth-child(7n) {
  border-right: 0;
}

.calendar-day span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  font-weight: 900;
}

.calendar-day small {
  display: block;
  margin-top: 12px;
  color: var(--green-dark);
  font-weight: 900;
}

.calendar-day.muted {
  color: #94a3b8;
  background: #f8fafc;
}

.calendar-day.today span {
  color: #052e16;
  background: #bbf7d0;
}

.calendar-day.selected {
  outline: 3px solid rgba(34, 197, 94, 0.28);
  outline-offset: -3px;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 90px;
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius);
  color: var(--muted);
  background: #f8fafc;
  text-align: center;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.58);
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-card {
  width: min(760px, 100%);
  max-height: min(88vh, 900px);
  overflow: auto;
  border-radius: var(--radius);
  padding: 22px;
  background: #fff;
  box-shadow: 0 28px 90px rgba(15, 23, 42, 0.35);
}

.compact-modal {
  max-width: 460px;
}

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

.modal-header h2 {
  margin: 0;
}

.icon-button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  font-size: 24px;
  line-height: 1;
}

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

.form-field.full {
  grid-column: 1 / -1;
}

.inline-create {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
  margin-bottom: 14px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.bottom-nav,
.mobile-day-header,
.mobile-day-list {
  display: none;
}

.landing-page {
  background:
    radial-gradient(circle at top right, rgba(34, 197, 94, 0.18), transparent 30%),
    var(--bg);
}

.landing-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 46px;
}

.landing-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  align-items: center;
  gap: 44px;
  min-height: 68vh;
  padding: 44px 0 28px;
}

.landing-copy h1 {
  margin: 0;
  max-width: 620px;
  font-size: clamp(44px, 7vw, 82px);
  line-height: 0.98;
  letter-spacing: 0;
}

.landing-copy p {
  max-width: 580px;
  margin: 22px 0 28px;
  font-size: 20px;
  line-height: 1.55;
}

.landing-preview {
  display: flex;
  justify-content: flex-end;
}

.preview-panel {
  width: min(540px, 100%);
  padding: 18px;
}

.preview-top {
  display: flex;
  gap: 6px;
  margin-bottom: 18px;
}

.preview-top span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #cbd5e1;
}

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

.preview-card,
.preview-row {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: #f8fafc;
}

.preview-card.accent {
  background: #dcfce7;
}

.preview-card strong,
.preview-row span {
  display: block;
  color: var(--muted);
}

.preview-card b {
  display: block;
  margin-top: 8px;
  font-size: 26px;
}

.preview-row.wide {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 70px 1fr auto;
  align-items: center;
  gap: 12px;
}

.preview-row em {
  color: var(--green-dark);
  font-style: normal;
  font-weight: 900;
}

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

.benefit-grid article {
  padding: 22px;
}

.benefit-grid h2 {
  margin: 0 0 10px;
  font-size: 20px;
}

.benefit-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.landing-footnote {
  margin: 28px 0 0;
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

.landing-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.landing-footer a {
  color: var(--green-dark);
  text-decoration: none;
}

.landing-footer a:hover {
  text-decoration: underline;
}

.landing-data-note {
  width: min(760px, 100%);
  margin: 24px auto 0;
  color: var(--muted);
  line-height: 1.55;
  text-align: center;
}

.settings-panel {
  display: grid;
  gap: 18px;
  max-width: 760px;
}

.settings-panel p {
  margin: 0;
  line-height: 1.55;
}

.settings-small {
  color: var(--muted);
  font-size: 14px;
}

.backup-note {
  border-left: 3px solid #bbf7d0;
  padding: 12px 14px;
  border-radius: var(--radius);
  color: var(--muted);
  background: #f8fafc;
}

.legal-page {
  background: var(--bg);
}

.legal-shell {
  width: min(900px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.legal-card {
  margin-top: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(24px, 5vw, 46px);
  background: #fff;
  box-shadow: var(--shadow);
}

.legal-card h1 {
  margin: 0 0 26px;
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.05;
  letter-spacing: 0;
}

.legal-card h2 {
  margin: 28px 0 10px;
  font-size: 20px;
}

.legal-card p,
.legal-card li {
  color: var(--muted);
  line-height: 1.65;
}

.legal-card a {
  color: var(--green-dark);
  font-weight: 800;
}

.legal-back {
  display: inline-block;
  margin-bottom: 22px;
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 220px 1fr;
  }

  .app-main {
    padding: 28px;
  }

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

  .dashboard-grid,
  .calendar-layout,
  .detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    display: none;
  }

  .app-main {
    padding: 22px 16px 96px;
  }

  .demo-notice {
    margin-bottom: 16px;
  }

  .demo-mobile-legal {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin: 22px auto 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
  }

  .demo-mobile-legal a {
    color: var(--green-dark);
    text-decoration: none;
  }

  .bottom-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 10;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-top: 1px solid var(--line);
    background: #fff;
    box-shadow: 0 -12px 30px rgba(15, 23, 42, 0.08);
  }

  .bottom-item {
    display: grid;
    place-items: center;
    gap: 3px;
    min-height: 68px;
    border-radius: 0;
    color: var(--muted);
    font-size: 12px;
    text-align: center;
  }

  .bottom-item span {
    width: auto;
    font-size: 18px;
  }

  .bottom-item.active {
    color: var(--green-dark);
    background: #f0fdf4;
  }

  .view-header {
    display: grid;
  }

  .view-header h1 {
    font-size: 32px;
  }

  .desktop-header {
    display: none;
  }

  .mobile-day-header,
  .mobile-day-list {
    display: grid;
  }

  .mobile-day-list {
    gap: 12px;
    margin-bottom: 18px;
  }

  .dashboard-view .kpi-grid,
  .dashboard-grid {
    display: none;
  }

  .mobile-day-card {
    padding: 18px;
  }

  .mobile-day-card h2 {
    margin: 8px 0;
    font-size: 22px;
  }

  .mobile-day-card p {
    margin: 0 0 16px;
    color: var(--muted);
    line-height: 1.5;
  }

  .mobile-day-card .button-row,
  .mobile-day-card .button {
    width: 100%;
  }

  .kpi-grid,
  .card-grid,
  .split-toolbar,
  .form-grid,
  .inline-create {
    grid-template-columns: 1fr;
  }

  .order-item {
    grid-template-columns: 1fr;
  }

  .compact-order,
  .compact-order:has(.order-time) {
    grid-template-columns: 1fr;
  }

  .status-badge {
    justify-self: start;
  }

  .detail-line {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .calendar-day {
    min-height: 70px;
    padding: 7px;
  }

  .calendar-day small {
    margin-top: 6px;
    font-size: 10px;
  }

  .modal-actions,
  .detail-header .button-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .modal-actions .button,
  .detail-header .button {
    width: 100%;
  }

  .landing-shell {
    width: min(100% - 32px, 1180px);
    padding-top: 22px;
  }

  .landing-hero {
    grid-template-columns: 1fr;
    gap: 26px;
    min-height: auto;
    padding: 54px 0 28px;
  }

  .landing-copy h1 {
    font-size: 48px;
  }

  .landing-copy p {
    font-size: 18px;
  }

  .landing-copy .button {
    width: 100%;
  }

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

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

@media (max-width: 430px) {
  .app-main {
    padding-inline: 12px;
  }

  .panel,
  .kpi-card,
  .customer-card,
  .mobile-day-card,
  .modal-card {
    padding: 16px;
  }

  .calendar-day {
    min-height: 58px;
  }

  .calendar-day span {
    width: 26px;
    height: 26px;
  }

  .calendar-day small {
    display: none;
  }
}
