:root {
  --bg: #f3f4f6;
  --bg-top: #e0f2f1;
  --card-bg: #ffffff;
  --card-soft: #f9fafb;
  --border-soft: #e5e7eb;
  --text-main: #022c22;
  --text-muted: #6b7280;
  --primary: #047857;        /* Grün */
  --primary-soft: #ecfdf5;
  --primary-strong: #065f46;
  --danger: #b91c1c;
}

/* Reset & Basics */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: var(--text-main);
  background:
    linear-gradient(to bottom, var(--bg-top) 0, var(--bg) 220px, var(--bg) 100%);
}

/* Layout */
.app-root {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 1.5rem 1.5rem 3rem;
}

.app-card {
  width: 100%;
  max-width: 1200px;
  background: var(--card-soft);
  border-radius: 24px;
  padding: 1.6rem 2rem 2rem;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.3);
}

/* Header */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.app-header h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-strong);
}

.app-header p {
  margin: 0.25rem 0 0;
  color: var(--text-muted);
}

/* Navigation (falls du später Tabs einbaust) */
.app-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-pill {
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: var(--primary-soft);
  border: 1px solid rgba(34, 197, 94, 0.4);
  font-size: 0.8rem;
  color: var(--primary-strong);
}

/* Buttons */
.btn {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.5rem 1.3rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease,
    background-color 0.12s ease, color 0.12s ease, border-color 0.12s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  text-decoration: none;
}

.btn.primary {
  background: var(--primary);
  color: #f9fafb;
  box-shadow: 0 10px 20px rgba(4, 120, 87, 0.35);
}

.btn.primary:hover {
  background: var(--primary-strong);
  box-shadow: 0 14px 28px rgba(4, 120, 87, 0.45);
  transform: translateY(-1px);
}

.btn.ghost {
  background: #ffffff;
  color: var(--text-main);
  border-color: rgba(148, 163, 184, 0.7);
}

.btn.ghost:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
}

/* Alerts & Info-Box */
.alert,
.info-box {
  margin-top: 1rem;
  margin-bottom: 1rem;
  padding: 0.7rem 1rem;
  border-radius: 14px;
  font-size: 0.9rem;
  border: 1px solid transparent;
}

.alert.success {
  background: #ecfdf5;
  color: var(--primary-strong);
  border-color: #6ee7b7;
}

.alert.error {
  background: #fef2f2;
  color: var(--danger);
  border-color: #fecaca;
}

.info-box {
  background: #e0f2fe;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

/* Grid & Karten */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.4rem;
  margin-top: 1.5rem;
}

.card {
  background: var(--card-bg);
  border-radius: 22px;
  padding: 1.35rem 1.2rem 1.1rem;
  border: 1px solid var(--border-soft);
  box-shadow: 0 12px 30px rgba(148, 163, 184, 0.25);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.card h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-main);
}

.card-sub {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Formulare */
.form {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-top: 0.3rem;
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.85rem;
  color: var(--text-main);
}

input,
textarea,
select {
  border-radius: 10px;
  border: 1px solid #d1d5db;
  padding: 0.5rem 0.55rem;
  font: inherit;
  outline: none;
  background: #f9fafb;
  transition: border-color 0.12s ease, box-shadow 0.12s ease,
    background-color 0.12s ease;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 1px rgba(4, 120, 87, 0.35);
}

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

/* Select Styling (kleiner Pfeil) */
select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #9ca3af 50%),
    linear-gradient(135deg, #9ca3af 50%, transparent 50%);
  background-position: calc(100% - 14px) calc(50% - 3px),
    calc(100% - 10px) calc(50% + 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.hint {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Mobile */
@media (max-width: 768px) {
  .app-card {
    padding: 1.3rem 1.2rem 1.6rem;
  }

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

  .app-header-actions {
    width: 100%;
    justify-content: space-between;
  }
}
.card-subtitle {
  margin: 0.4rem 0 0.1rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.divider {
  position: relative;
  margin: 0.6rem 0;
  text-align: center;
  font-size: 0.75rem;
  color: #9ca3af;
}

.divider::before,
.divider::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: #e5e7eb;
}

.divider::before {
  left: 0;
}

.divider::after {
  right: 0;
}
