/* ═══════════════════════════════════════════════════════════════
   DIENSTWERK v2.5 — EXCLUSIVES BRAND DESIGN "CREAM & SAGE"
   Richtlinien-getreu · Premium Vintage · Erdige Eleganz
   Basierend auf Brand-Presentation-Board (Juni 2026)
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* ── Brand Guidelines Farbskala ───────────── */
  --bg-app:       #F4F2ED;      /* Ebene 0: Sanftes Elfenbein / Hintergrundweiß */
  --bg-card:      #FFFFFF;      /* Ebene 1: Schwebende Karten, reines Weiß */
  --bg-header:    #333333;      /* Ebene 2: Satte Anthrazit-Kontraste für Header/Footer */
  
  --sage:         #6F8573;      /* Haupt-Akzent: Edles Salbeigrün */
  --moss:         #A8B39F;      /* Sekundär-Akzent: Gedämpftes Oliv- bzw. Moosgrün */
  --taupe:        #C9C3B3;      /* Neutral: Kieselgrau / Taupe */
  --sand:         #E3DDD2;      /* Sanftes Sandgelb / Off-White */
  
  /* ── Layout & Kontraste ───────────────────── */
  --text-main:    #333333;      /* Tiefes Anthrazit für exzellente Lesbarkeit */
  --text-soft:    #5A5F66;      /* Weicheres Anthrazit für Begleittexte */
  --text-muted:   #8C929A;      /* Dezent stilisierte Labels */
  --border:       #E3DDD2;      /* Warme Sand-Grenzlinien */
  --border-focus: #6F8573;      /* Salbeigrün bei Aktivierung */
  
  /* ── Funktionale Farben ───────────────────── */
  --green:        #6F8573;      /* Salbeigrün als Erfolgsfarbe */
  --green-light:  #F4F6F4;
  --red:          #B85C5C;      /* Ruhiges, edles Rot für Notfälle/Fehler */
  --red-light:    #FBF3F3;

  /* ── Typografie (Echte Richtlinie-Serife) ──── */
  --ff-head:      'Cinzel', 'Playfair Display', 'Georgia', 'Times New Roman', serif;
  --ff-sans:      'Inter', system-ui, -apple-system, sans-serif;

  /* ── Grafische Schatten & Tiefe (Layered) ─── */
  --shadow-low:   0 1px 2px rgba(111, 133, 115, 0.04);
  --shadow-mid:   0 4px 10px -1px rgba(111, 133, 115, 0.06), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
  --shadow-high:  0 12px 20px -3px rgba(111, 133, 115, 0.12), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
  --shadow-layer: 0 20px 30px -5px rgba(47, 56, 49, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.03);

  --radius:       16px;         /* Großzügige, weiche Ecken für organischen Look */
  --transition:   .28s cubic-bezier(.4, 0, .2, 1);
}

/* ═══════════════════════════════════════════════════════════════
   BASIC LAYOUT
   ═══════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background-color: var(--bg-app);
  color: var(--text-main);
  font-family: var(--ff-sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* Topografisches Linien-Feeling im Hintergrund */
  background-image: 
    radial-gradient(1000px 600px at 50% 0%, rgba(111, 133, 115, 0.06), transparent 82%),
    radial-gradient(800px 500px at 100% 100%, rgba(168, 179, 159, 0.04), transparent 75%);
  background-attachment: fixed;
}

/* App-Zentrierung (Mobile-First Frame) */
.app-container {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background-color: var(--bg-app);
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 0 50px rgba(111, 133, 115, 0.08);
}

/* ─── APP HEADER ─── */
.header-bar {
  background: var(--bg-header);
  color: #ffffff;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-mid);
}

.logo-badge {
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo-icon {
  background: var(--sage);
  color: #ffffff;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  box-shadow: 0 2px 6px rgba(111, 133, 115, 0.3);
}
.logo-text {
  font-family: var(--ff-head);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .8px;
  text-transform: uppercase;
}
.logo-text span {
  display: block;
  font-family: var(--ff-sans);
  font-weight: 500;
  font-size: 9px;
  color: var(--moss);
  letter-spacing: .4px;
  text-transform: none;
  margin-top: -1px;
}

/* ─── SCHWEBENDE KARTEN (Ebene 1) ─── */
.layer-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-mid);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.layer-card:hover {
  transform: translateY(-2px);
  border-color: var(--moss);
  box-shadow: var(--shadow-high);
}
.layer-card--highlight {
  border-left: 3px solid var(--sage);
}
.layer-card--green {
  border-left: 3px solid var(--sage);
}

/* ─── SEITENTITEL (Corporate) ─── */
.title-block {
  text-align: center;
  padding: 36px 16px 20px;
}
.title-block h1 {
  font-family: var(--ff-head);
  font-size: 23px;
  font-weight: 700;
  margin: 0 0 10px;
  letter-spacing: -.2px;
  color: var(--text-main);
  text-transform: uppercase;
}
.title-block p {
  font-size: 13.5px;
  color: var(--text-soft);
  margin: 0;
  letter-spacing: .1px;
}

/* ─── BRAND CHIPS (Ebene 1 Interaktiv) ─── */
.chip-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}
.chip-item {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all var(--transition);
}
.chip-item:hover {
  border-color: var(--sage);
  background: var(--green-light);
}
.chip-item.active {
  border-color: var(--sage);
  background: var(--green-light);
  box-shadow: 0 0 0 3.5px rgba(111, 133, 115, 0.12);
}
.chip-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 12px;
}
.chip-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  display: grid;
  place-items: center;
  transition: all var(--transition);
}
.chip-item.active .chip-check {
  border-color: var(--sage);
  background: var(--sage);
}
.chip-item.active .chip-check::after {
  content: "";
  width: 5px;
  height: 5px;
  background: #fff;
  border-radius: 50%;
}

.chip-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}
.chip-row .chip-item {
  justify-content: center;
  text-align: center;
  padding: 15px;
}

/* ─── WIZARD SEQUENCE ─── */
.step-pane {
  display: none;
  animation: fadeIn .32s ease-out forwards;
}
.step-pane.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.progress-container {
  padding: 0 20px;
  margin-top: 18px;
}
.progress-track {
  background: var(--sand);
  height: 5px;
  border-radius: var(--radius);
  overflow: hidden;
}
.progress-fill {
  background: var(--sage);
  height: 100%;
  width: 33%;
  transition: width var(--transition);
}

/* ─── FORMS & INPUTS ─── */
.form-group {
  margin-bottom: 22px;
}
.form-group label {
  display: block;
  font-weight: 700;
  font-size: 11px;
  color: var(--text-main);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: .8px;
  font-family: var(--ff-head);
}
.form-control {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 13px 15px;
  font-size: 14.5px;
  font-family: inherit;
  transition: all var(--transition);
  background: #FAF9F6; /* Ganz leicht cremiger als Plain White */
}
.form-control:focus {
  outline: none;
  border-color: var(--sage);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(111, 133, 115, 0.12);
}
textarea.form-control {
  min-height: 110px;
  resize: none;
}

label .req {
  color: var(--sage);
  font-weight: 500;
}

/* ─── BUTTONS (Premium Touch) ─── */
.btn-modern {
  width: 100%;
  background: var(--sage);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 16px;
  font-size: 14px;
  font-family: var(--ff-head);
  letter-spacing: .5px;
  text-transform: uppercase;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 3px 10px rgba(111, 133, 115, 0.2);
}
.btn-modern:hover {
  background: var(--moss);
  box-shadow: 0 5px 16px rgba(111, 133, 115, 0.3);
}
.btn-modern:disabled {
  opacity: .5;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-secondary {
  background: transparent;
  color: var(--text-soft);
  border: 1.5px solid var(--border);
  box-shadow: none;
}
.btn-secondary:hover {
  border-color: var(--text-soft);
  background: #FAF9F6;
  box-shadow: none;
}

.btn-group {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 12px;
  margin-top: 24px;
}

/* ─── BOTTOM MENU (Modern-Clean Profile / Tabs) ─── */
.bottom-nav {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 64px;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 90;
}
.nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-soft);
  font-size: 10.5px;
  font-weight: 600;
  text-decoration: none;
  padding: 8px;
  transition: color var(--transition);
  font-family: var(--ff-head);
  letter-spacing: .4px;
  text-transform: uppercase;
}
.nav-link.active {
  color: var(--sage);
}
.nav-icon {
  font-size: 16px;
  line-height: 1;
}

/* ─── BADGES ─── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .68rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius);
  font-family: var(--ff-head);
  letter-spacing: .06em;
  text-transform: uppercase;
}
.badge--new      { background: var(--green-light); color: var(--sage); border: 1px solid var(--border); }
.badge--active   { background: var(--green-light); color: var(--sage); }
.badge--urgent   { background: var(--red-light); color: var(--red); }
.badge--done     { background: #ffffff; color: var(--text-muted); border: 1px solid var(--border); }

/* ─── ALERTS ─── */
.alert {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: .88rem;
  font-weight: 500;
  margin-bottom: 16px;
  display: none;
}
.alert--error {
  background: var(--red-light);
  color: var(--red);
  border: 1.5px solid #F1D4D4;
  display: block;
}

/* Success View */
.status-indicator {
  width: 56px;
  height: 56px;
  background: var(--green-light);
  color: var(--sage);
  border: 2px solid var(--sage);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 24px;
  margin: 0 auto 20px;
  box-shadow: 0 4px 12px rgba(111, 133, 115, 0.15);
}

/* Success Card */
.success-pane .ref-id {
  font-family: var(--ff-sans);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: .5px;
}

/* ─── ADMIN TABLE ─── */
.admin-wrap {
  max-width: 960px;
  margin: 0 auto;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-mid);
  border: 1px solid var(--border);
}
.admin-table th {
  background: var(--bg-header);
  color: #ffffff;
  font-family: var(--ff-head);
  font-weight: 600;
  font-size: .74rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 12px 14px;
  text-align: left;
}
.admin-table td {
  padding: 14px;
  border-bottom: 1px solid var(--border);
  font-size: .88rem;
  vertical-align: top;
}
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table tr:hover td { background: var(--bg-app); }

.btn-wa {
  background: var(--sage);
  color: #ffffff;
  border-radius: 8px;
  font-family: var(--ff-head);
  font-size: 11px;
  letter-spacing: .5px;
  text-transform: uppercase;
  padding: 8px 12px;
}
.btn-wa:hover {
  background: var(--moss);
}

:focus-visible {
  outline: 2.5px solid var(--sage);
  outline-offset: 3px;
  border-radius: 4px;
}

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); font-size: .82rem; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
