:root {
  --bg: #f3efe5;
  --surface: rgba(255, 250, 242, 0.82);
  --surface-strong: #fffaf2;
  --text: #1d2b28;
  --muted: #5b6664;
  --line: rgba(29, 43, 40, 0.12);
  --blue: #2a6f97;
  --amber: #d08a27;
  --green: #3b7d5a;
  --red: #ad4f41;
  --shadow: 0 24px 60px rgba(26, 35, 31, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Source Sans 3", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(42, 111, 151, 0.18), transparent 30%),
    radial-gradient(circle at bottom right, rgba(208, 138, 39, 0.16), transparent 28%),
    linear-gradient(160deg, #efe7d5 0%, #f7f2ea 45%, #ece7de 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(29, 43, 40, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29, 43, 40, 0.03) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent 85%);
}

.page-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 24px;
  padding: 24px;
}

.sidebar,
.panel,
.hero,
.stat-card {
  backdrop-filter: blur(18px);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.sidebar {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: calc(100vh - 48px);
  padding: 28px;
  border-radius: 28px;
}

.eyebrow {
  margin: 0 0 10px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
}

.sidebar h1,
.hero h2,
.panel h3,
.document-card h4,
.timeline-step h4 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
}

.sidebar h1 {
  font-size: clamp(2rem, 3vw, 2.6rem);
}

.sidebar-copy,
.hero-copy,
.panel p,
.document-card p,
.timeline-step p {
  color: var(--muted);
  line-height: 1.55;
}

.nav {
  display: grid;
  gap: 12px;
  margin: 32px 0;
}

.nav a {
  padding: 14px 16px;
  border-radius: 16px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid transparent;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.nav a:hover,
.nav a:focus-visible {
  transform: translateX(4px);
  border-color: rgba(42, 111, 151, 0.24);
  background: rgba(255, 255, 255, 0.78);
}

.notice-card {
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(59, 125, 90, 0.12), rgba(255, 255, 255, 0.46));
  border: 1px solid rgba(59, 125, 90, 0.18);
}

.notice-title {
  margin: 0 0 8px;
  font-weight: 700;
}

.content {
  display: grid;
  gap: 24px;
}

.hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
  border-radius: 28px;
}

.hero h2 {
  font-size: clamp(2rem, 4vw, 3.8rem);
  max-width: 11ch;
}

.primary-button,
.secondary-button {
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.primary-button {
  padding: 16px 22px;
  color: #fffdf8;
  background: linear-gradient(135deg, #235d7d, #2f7f6a);
  box-shadow: 0 18px 35px rgba(35, 93, 125, 0.28);
}

.secondary-button {
  padding: 12px 18px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
}

.primary-button:hover,
.secondary-button:hover,
.primary-button:focus-visible,
.secondary-button:focus-visible {
  transform: translateY(-2px);
}

.stats-grid,
.panel-grid,
.document-grid,
.timeline {
  display: grid;
  gap: 20px;
}

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

.stat-card {
  padding: 22px;
  border-radius: 24px;
  overflow: hidden;
}

.stat-card span,
.stat-card p {
  display: block;
}

.stat-card strong {
  display: block;
  margin: 12px 0 8px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 2.4rem;
}

.accent-blue { border-top: 6px solid var(--blue); }
.accent-amber { border-top: 6px solid var(--amber); }
.accent-green { border-top: 6px solid var(--green); }
.accent-red { border-top: 6px solid var(--red); }

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

.panel,
.timeline-panel {
  padding: 24px;
  border-radius: 26px;
}

.wide {
  grid-column: span 2;
}

.panel-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.pill,
.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  background: rgba(42, 111, 151, 0.12);
  color: var(--blue);
}

.table-wrap {
  overflow-x: auto;
}

.case-form {
  margin-bottom: 22px;
  padding: 20px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.48);
  border: 1px solid rgba(29, 43, 40, 0.08);
}

.form-mode {
  margin-bottom: 16px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  color: var(--blue);
}

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

.case-form label {
  display: grid;
  gap: 8px;
  font-weight: 600;
}

.case-form span {
  font-size: 0.95rem;
}

.case-form input,
.case-form select,
.case-form textarea {
  width: 100%;
  padding: 13px 14px;
  border-radius: 14px;
  border: 1px solid rgba(29, 43, 40, 0.14);
  background: rgba(255, 250, 242, 0.94);
  color: var(--text);
  font: inherit;
}

.case-form textarea {
  resize: vertical;
  min-height: 96px;
}

.case-form input:focus,
.case-form select:focus,
.case-form textarea:focus {
  outline: 2px solid rgba(42, 111, 151, 0.25);
  border-color: rgba(42, 111, 151, 0.42);
}

.full-width {
  margin-top: 16px;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.form-feedback {
  color: var(--green);
  font-weight: 700;
}

.form-feedback[data-state="error"] {
  color: var(--red);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 10px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

th {
  font-size: 0.9rem;
  color: var(--muted);
}

td small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

.status {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
}

.status-progress {
  color: var(--blue);
  background: rgba(42, 111, 151, 0.13);
}

.status-alert {
  color: var(--red);
  background: rgba(173, 79, 65, 0.12);
}

.status-ok {
  color: var(--green);
  background: rgba(59, 125, 90, 0.14);
}

.priority,
.table-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
}

.priority-hoch {
  color: var(--red);
  background: rgba(173, 79, 65, 0.12);
}

.priority-mittel {
  color: var(--amber);
  background: rgba(208, 138, 39, 0.14);
}

.priority-niedrig {
  color: var(--green);
  background: rgba(59, 125, 90, 0.14);
}

.table-action {
  border: 1px solid rgba(29, 43, 40, 0.12);
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  cursor: pointer;
}

.danger-action {
  color: var(--red);
  border-color: rgba(173, 79, 65, 0.18);
}

.action-cell {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.empty-state-cell {
  padding: 24px 10px;
  color: var(--muted);
  text-align: center;
}

.check-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 16px;
  line-height: 1.5;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--amber), var(--green));
}

.deadline-list {
  display: grid;
  gap: 14px;
}

.deadline-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 14px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(29, 43, 40, 0.08);
}

.deadline-item strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.2rem;
}

.deadline-item p,
.deadline-item span {
  margin: 0;
}

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

.document-card {
  padding: 20px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(29, 43, 40, 0.08);
}

.document-card h4 {
  margin-top: 14px;
  margin-bottom: 10px;
  font-size: 1.15rem;
}

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

.timeline-step {
  position: relative;
  padding: 20px 18px 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(29, 43, 40, 0.08);
}

.timeline-step span {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 16px;
  border-radius: 50%;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  color: #fffaf2;
  background: linear-gradient(135deg, var(--blue), var(--amber));
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 500ms ease, transform 500ms ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1100px) {
  .page-shell,
  .stats-grid,
  .timeline,
  .document-grid {
    grid-template-columns: 1fr;
  }

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

  .wide {
    grid-column: auto;
  }

  .sidebar {
    min-height: auto;
  }
}

@media (max-width: 760px) {
  .page-shell {
    padding: 14px;
    gap: 14px;
  }

  .sidebar,
  .hero,
  .panel,
  .timeline-panel,
  .stat-card {
    border-radius: 22px;
  }

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

  .panel-header {
    flex-direction: column;
  }

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