@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
  --red: #F21F50;
  --purple: #C104D6;
  --bg: #f7f8fc;
  --card: #ffffff;
  --text: #1a1a2e;
  --muted: #6b7280;
  --border: #e5e7eb;
  --radius: 10px;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Poppins', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* ── Navigation ── */
.nav {
  background: var(--text);
  padding: 14px 40px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-logo { color: white; font-size: 18px; font-weight: 700; text-decoration: none; }
.nav-logo span { color: var(--red); }

/* ── Page layout ── */
.page { max-width: 860px; margin: 0 auto; padding: 40px 20px; }

.page-title { font-size: 26px; font-weight: 700; margin-bottom: 6px; }
.page-subtitle { color: var(--muted); font-size: 14px; margin-bottom: 32px; }

/* ── Card / Section ── */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  overflow: hidden;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  cursor: pointer;
  user-select: none;
  background: var(--card);
  border: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
}
.section-header:hover { background: #fafafa; }
.section-header.required { cursor: default; }

.section-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-badge {
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 20px;
  background: #fee2e2;
  color: var(--red);
}
.section-badge.optional {
  background: #f3e8ff;
  color: var(--purple);
}

.chevron {
  font-size: 12px;
  color: var(--muted);
  transition: transform 0.25s;
}
.section-body.open ~ .section-header .chevron,
.section-header[aria-expanded="true"] .chevron { transform: rotate(180deg); }

.section-body {
  padding: 0 24px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}
.section-body.open {
  max-height: 600px;
  padding: 4px 24px 24px;
}

/* ── Form fields ── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid.single { grid-template-columns: 1fr; }

.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group.span2 { grid-column: span 2; }

label { font-size: 13px; font-weight: 500; color: var(--text); }
label .req { color: var(--red); margin-left: 2px; }

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
select,
textarea {
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 7px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  background: white;
  transition: border-color 0.2s;
  width: 100%;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--red);
}
textarea { resize: vertical; min-height: 80px; }

/* ── Checkboxes ── */
.checkbox-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 4px;
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 7px;
  cursor: pointer;
  font-size: 14px;
  transition: border-color 0.2s, background 0.2s;
}
.checkbox-label:hover { border-color: var(--purple); background: #fdf4ff; }
.checkbox-label input[type="checkbox"] { accent-color: var(--purple); width: 16px; height: 16px; }

/* ── Submit button ── */
.btn-submit {
  background: linear-gradient(135deg, var(--red), var(--purple));
  color: white;
  border: none;
  padding: 14px 36px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  margin-top: 24px;
  display: block;
  width: 100%;
  transition: opacity 0.2s;
}
.btn-submit:hover { opacity: 0.9; }
.btn-submit:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Danke-Seite ── */
.thanks-card {
  text-align: center;
  padding: 60px 40px;
}
.thanks-icon { font-size: 48px; margin-bottom: 16px; }
.thanks-title { font-size: 24px; font-weight: 700; margin-bottom: 10px; }
.thanks-text { color: var(--muted); font-size: 15px; }

/* ── Admin ── */
.admin-nav {
  background: var(--text);
  padding: 14px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.admin-nav-title { color: white; font-weight: 600; font-size: 15px; }
.admin-nav a { color: #aaa; font-size: 13px; text-decoration: none; }
.admin-nav a:hover { color: white; }

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.tab {
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  background: var(--card);
  color: var(--muted);
  border: 1.5px solid var(--border);
  transition: all 0.2s;
}
.tab:hover, .tab.active { background: var(--red); color: white; border-color: var(--red); }

.table-wrap { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { padding: 12px 16px; text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid var(--border); }
td { padding: 13px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #fafafa; }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}
.badge.neu { background: #fee2e2; color: var(--red); }
.badge.bearbeitung { background: #f3e8ff; color: var(--purple); }
.badge.abgeschlossen { background: #dcfce7; color: #16a34a; }

.area-tag {
  display: inline-block;
  background: #f3f4f6;
  color: #374151;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  margin: 1px;
}

.btn { display: inline-block; padding: 8px 18px; border-radius: 7px; font-size: 13px; font-weight: 500; text-decoration: none; cursor: pointer; border: none; font-family: inherit; transition: opacity 0.2s; }
.btn:hover { opacity: 0.85; }
.btn-primary { background: var(--red); color: white; }
.btn-secondary { background: var(--purple); color: white; }
.btn-outline { background: white; color: var(--text); border: 1.5px solid var(--border); }
.btn-green { background: #16a34a; color: white; }
.btn-sm { padding: 5px 12px; font-size: 12px; }

.detail-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }
.detail-field { margin-bottom: 12px; }
.detail-label { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 3px; }
.detail-value { font-size: 14px; color: var(--text); }

.status-buttons { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.status-btn {
  padding: 8px 14px;
  border-radius: 7px;
  border: 1.5px solid var(--border);
  background: white;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
}
.status-btn.active-neu { background: #fee2e2; border-color: var(--red); color: var(--red); font-weight: 600; }
.status-btn.active-bearbeitung { background: #f3e8ff; border-color: var(--purple); color: var(--purple); font-weight: 600; }
.status-btn.active-abgeschlossen { background: #dcfce7; border-color: #16a34a; color: #16a34a; font-weight: 600; }

textarea.admin-notes { min-height: 120px; margin-top: 6px; }

.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 100; align-items: center; justify-content: center; }
.modal-overlay.open { display: flex; }
.modal { background: white; border-radius: var(--radius); padding: 30px; width: 100%; max-width: 500px; }
.modal h3 { margin-bottom: 16px; }

.csv-btn { float: right; }

@media (max-width: 700px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-group.span2 { grid-column: span 1; }
  .detail-grid { grid-template-columns: 1fr; }
  .checkbox-grid { grid-template-columns: 1fr; }
  .nav, .admin-nav { padding: 14px 16px; }
  .page { padding: 20px 12px; }
}

/* ── Landing page ── */
.landing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 32px;
}
.landing-card {
  display: block;
  text-decoration: none;
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.landing-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.12); }
.landing-card-primary { background: linear-gradient(135deg, var(--red), var(--purple)); }
.landing-card-secondary { background: var(--card); border: 2px solid var(--purple); }
.landing-card-icon { font-size: 36px; margin-bottom: 16px; }
.landing-card-title { font-size: 20px; font-weight: 700; margin-bottom: 10px; }
.landing-card-primary .landing-card-title { color: white; }
.landing-card-secondary .landing-card-title { color: var(--text); }
.landing-card-text { font-size: 14px; margin-bottom: 20px; line-height: 1.6; }
.landing-card-primary .landing-card-text { color: rgba(255,255,255,0.85); }
.landing-card-secondary .landing-card-text { color: var(--muted); }
.landing-card-cta {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 6px;
}
.landing-card-primary .landing-card-cta { background: rgba(255,255,255,0.2); color: white; }
.landing-card-secondary .landing-card-cta { background: var(--purple); color: white; }

/* ── Job status badges (extends existing .badge) ── */
.badge.vorgestellt { background: #dbeafe; color: #1d4ed8; }
.badge.besetzt { background: #dcfce7; color: #16a34a; }

/* ── Job status buttons (extends existing .status-btn) ── */
.status-btn.active-vorgestellt { background: #dbeafe; border-color: #1d4ed8; color: #1d4ed8; font-weight: 600; }
.status-btn.active-besetzt { background: #dcfce7; border-color: #16a34a; color: #16a34a; font-weight: 600; }

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