:root {
  --bg: #f6f3eb;
  --green: #193222;
  --green-2: #244d34;
  --muted: #667466;
  --soft: #e1eadb;
  --line: #d9dfd2;
  --card: rgba(255,255,255,.78);
  --shadow: 0 24px 60px rgba(25,50,34,.12);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: Arial, Helvetica, sans-serif; background: var(--bg); color: #1f2f24; }
a { color: inherit; text-decoration: none; }
.bg-orb { position: fixed; z-index: -1; border-radius: 999px; filter: blur(70px); opacity: .65; }
.orb-one { width: 340px; height: 340px; left: -120px; top: 80px; background: #bbf7d0; }
.orb-two { width: 420px; height: 420px; right: -150px; bottom: 20px; background: #d9f99d; }
.site-header { position: fixed; left: 0; right: 0; top: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center; padding: 16px clamp(18px, 5vw, 60px); background: rgba(246,243,235,.82); border-bottom: 1px solid rgba(255,255,255,.5); backdrop-filter: blur(16px); }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 18px; background: var(--green-2); color: white; font-size: 22px; box-shadow: 0 10px 24px rgba(25,50,34,.18); }
.brand strong { display: block; font-size: 18px; }
.brand small { display: block; margin-top: 2px; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: #70806f; }
.site-header nav { display: flex; align-items: center; gap: 26px; color: #526451; font-weight: 700; font-size: 14px; }
.nav-button, .button, button { display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 999px; padding: 13px 22px; font-weight: 800; cursor: pointer; }
.nav-button, .primary, button { background: var(--green-2); color: white; }
.secondary { background: rgba(255,255,255,.75); color: var(--green-2); border: 1px solid rgba(36,77,52,.18); }
.section-pad { padding: 90px clamp(18px, 5vw, 60px); }
.hero { max-width: 1280px; margin: 0 auto; padding-top: 150px; display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.eyebrow, .section-title span, .form-head span, aside span { display: inline-flex; color: #496049; background: rgba(255,255,255,.7); border: 1px solid rgba(25,50,34,.08); border-radius: 999px; padding: 10px 16px; font-weight: 800; font-size: 14px; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(48px, 7vw, 92px); line-height: .95; letter-spacing: -.06em; color: var(--green); margin: 24px 0; }
.hero p { color: #5f6f5f; font-size: 20px; line-height: 1.7; max-width: 700px; }
.hero-actions { display: flex; gap: 16px; margin: 34px 0; flex-wrap: wrap; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; max-width: 560px; }
.stats div { background: rgba(255,255,255,.65); border-radius: 26px; padding: 18px; box-shadow: 0 10px 30px rgba(25,50,34,.05); }
.stats strong { display: block; color: var(--green-2); font-size: 26px; }
.stats span { display: block; color: #70806f; font-weight: 700; font-size: 13px; margin-top: 5px; }
.hero-card { position: relative; border: 10px solid white; border-radius: 46px; overflow: hidden; box-shadow: var(--shadow); min-height: 520px; }
.hero-card img { width: 100%; height: 520px; object-fit: cover; display: block; }
.hero-badge { position: absolute; top: 24px; left: 24px; background: rgba(255,255,255,.88); border-radius: 24px; padding: 18px; color: #c59b42; box-shadow: var(--shadow); }
.hero-badge strong { color: var(--green-2); }
.image-caption { position: absolute; left: 24px; right: 24px; bottom: 24px; background: rgba(255,255,255,.86); padding: 22px; border-radius: 28px; }
.image-caption span { display: block; color: #70806f; font-size: 12px; text-transform: uppercase; letter-spacing: .18em; font-weight: 900; }
.image-caption strong { display: block; margin-top: 5px; color: var(--green); font-size: 28px; }
.section-title { max-width: 1040px; margin: 0 auto 44px; display: flex; justify-content: space-between; gap: 30px; align-items: end; }
.section-title h2 { font-size: clamp(36px, 5vw, 64px); line-height: 1; letter-spacing: -.04em; color: var(--green); margin: 14px 0 0; max-width: 720px; }
.section-title p { color: var(--muted); line-height: 1.7; max-width: 440px; }
.cards { max-width: 1280px; margin: 0 auto; display: grid; gap: 22px; }
.four { grid-template-columns: repeat(4, 1fr); }
.three { grid-template-columns: repeat(3, 1fr); }
.cards article { background: var(--card); border-radius: 34px; padding: 30px; box-shadow: 0 16px 40px rgba(25,50,34,.06); }
.icon { width: 58px; height: 58px; display: grid; place-items: center; background: var(--soft); border-radius: 20px; font-size: 28px; margin-bottom: 22px; }
.cards h3 { color: var(--green); font-size: 22px; }
.cards p, .cards li { color: var(--muted); line-height: 1.65; }
.price-grid strong { display: block; margin: 22px 0; font-size: 34px; color: var(--green-2); letter-spacing: -.04em; }
.price-grid ul { padding-left: 18px; }
.price-grid .highlight { background: var(--green); color: white; }
.price-grid .highlight h3, .price-grid .highlight strong { color: white; }
.price-grid .highlight p, .price-grid .highlight li { color: rgba(255,255,255,.75); }
.dark-panel { max-width: 1280px; margin: 0 auto; border-radius: 48px; background: var(--green); box-shadow: var(--shadow); }
.section-title.light span { color: #d9f99d; background: rgba(255,255,255,.08); }
.section-title.light h2 { color: white; }
.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.projects article { min-height: 390px; border-radius: 34px; overflow: hidden; background-size: cover; background-position: center; padding: 28px; display: flex; flex-direction: column; justify-content: end; position: relative; isolation: isolate; color: white; }
.projects article::before { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.72), rgba(0,0,0,.1)); z-index: -1; }
.projects span { background: rgba(255,255,255,.2); backdrop-filter: blur(10px); padding: 9px 14px; border-radius: 999px; width: fit-content; font-size: 12px; font-weight: 900; letter-spacing: .15em; text-transform: uppercase; }
.projects h3 { font-size: 26px; margin: 16px 0 0; }
.contact-wrap { max-width: 1280px; margin: 0 auto; }
.success, .error { padding: 16px 18px; border-radius: 18px; margin: 0 0 20px; font-weight: 800; }
.success { background: #dcfce7; color: #166534; }
.error { background: #fee2e2; color: #991b1b; }
.contact-card { display: grid; grid-template-columns: .9fr 1.1fr; gap: 28px; background: white; padding: 28px; border-radius: 48px; box-shadow: var(--shadow); }
.contact-card aside { background: var(--green); color: white; border-radius: 38px; padding: 42px; }
.contact-card aside span { color: #d9f99d; background: rgba(255,255,255,.08); }
.contact-card aside h2 { font-size: clamp(34px, 4vw, 54px); line-height: 1; letter-spacing: -.04em; margin: 22px 0; }
.contact-card aside p { color: rgba(255,255,255,.75); line-height: 1.75; }
.contact-info { margin-top: 34px; display: grid; gap: 12px; }
.contact-info p { margin: 0; color: rgba(255,255,255,.86); }
.request-form { padding: 8px; display: grid; gap: 18px; }
.form-head h3 { color: var(--green); font-size: 32px; letter-spacing: -.03em; margin: 10px 0; }
.form-head p { color: var(--muted); line-height: 1.65; }
fieldset { border: 0; margin: 0; background: #f8f7f2; border-radius: 28px; padding: 20px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
legend { padding: 0 0 14px; font-weight: 900; color: var(--green); }
input, textarea, select { width: 100%; min-height: 56px; border: 1px solid var(--line); border-radius: 18px; background: white; padding: 0 18px; color: var(--green); font: inherit; outline: none; }
textarea { min-height: 150px; padding: 18px; resize: vertical; grid-column: 1 / -1; }
input:focus, textarea:focus, select:focus { border-color: var(--green-2); box-shadow: 0 0 0 4px rgba(36,77,52,.08); }
.full-fieldset input, .full-fieldset select { grid-column: auto; }
.privacy { display: flex; gap: 12px; align-items: start; background: #f8f7f2; border-radius: 22px; padding: 16px; color: var(--muted); line-height: 1.55; }
.privacy input { width: 18px; min-height: 18px; margin-top: 2px; accent-color: var(--green-2); }
.request-form button { min-height: 64px; font-size: 16px; }
.form-note { text-align: center; color: var(--muted); font-size: 14px; }
footer { display: flex; justify-content: space-between; gap: 20px; padding: 30px clamp(18px, 5vw, 60px); border-top: 1px solid var(--line); color: var(--muted); }
footer div { display: flex; gap: 24px; }
.admin-body { background: var(--bg); }
.admin-header { display: flex; justify-content: space-between; align-items: center; padding: 22px clamp(18px, 5vw, 50px); background: white; box-shadow: 0 10px 30px rgba(25,50,34,.06); }
.admin-main { padding: 30px clamp(18px, 5vw, 50px); }
.admin-panel, .login-box { background: white; border-radius: 28px; padding: 24px; box-shadow: var(--shadow); margin-bottom: 22px; }
.login-box { max-width: 460px; margin: 80px auto; }
.center { justify-content: center; margin-bottom: 24px; }
.login-box label { display: block; font-weight: 800; margin: 14px 0 6px; }
.login-box button { margin-top: 16px; width: 100%; }
.search-form { display: flex; gap: 12px; flex-wrap: wrap; }
.search-form input { flex: 1; min-width: 260px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 980px; }
th, td { padding: 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--green); background: #f8f7f2; }
pre { white-space: pre-wrap; margin: 0; font-family: inherit; color: var(--muted); line-height: 1.45; }
.danger { background: #dc2626; color: white; }
@media (max-width: 980px) {
  .site-header nav { display: none; }
  .hero, .contact-card { grid-template-columns: 1fr; }
  .four, .three, .projects { grid-template-columns: 1fr 1fr; }
  .section-title { display: block; }
}
@media (max-width: 640px) {
  .section-pad { padding: 70px 18px; }
  .hero { padding-top: 120px; }
  h1 { font-size: 48px; }
  .stats, .four, .three, .projects, fieldset { grid-template-columns: 1fr; }
  .contact-card { padding: 16px; border-radius: 34px; }
  .contact-card aside { padding: 28px; border-radius: 28px; }
  footer { flex-direction: column; }
}

/* Verbesserungen Formular: Budget mit Euro-Zeichen */
.money-field {
  display: flex;
  align-items: center;
  min-height: 56px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
  overflow: hidden;
}
.money-field span {
  display: grid;
  place-items: center;
  width: 58px;
  align-self: stretch;
  background: #f0f4ed;
  color: var(--green-2);
  font-weight: 900;
  border-right: 1px solid var(--line);
}
.money-field input {
  border: 0;
  border-radius: 0;
  min-height: 54px;
}
.money-field:focus-within {
  border-color: var(--green-2);
  box-shadow: 0 0 0 4px rgba(36,77,52,.08);
}

/* Neues übersichtlicheres Admin-Layout */
.admin-main {
  max-width: 1500px;
  margin: 0 auto;
}
.search-panel {
  position: sticky;
  top: 0;
  z-index: 5;
}
.admin-overview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.admin-kicker {
  margin: 0 0 8px;
  color: #7c8d72;
  font-weight: 900;
  letter-spacing: .22em;
  text-transform: uppercase;
  font-size: 13px;
}
.admin-overview-head h1 {
  margin: 0;
  font-size: clamp(42px, 5vw, 76px);
}
.admin-subline {
  margin: 10px 0 0;
  color: var(--muted);
  font-weight: 700;
}
.request-list {
  display: grid;
  gap: 22px;
}
.request-card {
  background: white;
  border: 1px solid rgba(36,77,52,.10);
  border-left: 8px solid var(--green-2);
  border-radius: 32px;
  padding: 26px;
  box-shadow: var(--shadow);
}
.status-card-in-bearbeitung { border-left-color: #d97706; }
.status-card-erledigt { border-left-color: #16a34a; }
.request-card-top {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 22px;
}
.request-card h2 {
  margin: 10px 0 4px;
  color: var(--green);
  font-size: clamp(26px, 3vw, 40px);
  letter-spacing: -.035em;
}
.request-date {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 8px 14px;
  border-radius: 999px;
  background: #fee2e2;
  color: #991b1b;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .12em;
}
.status-pill-in-bearbeitung { background: #fef3c7; color: #92400e; }
.status-pill-erledigt { background: #dcfce7; color: #166534; }
.request-actions {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.status-form {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.status-form select {
  min-width: 210px;
}
.request-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.info-box,
.detail-chip,
.details-box {
  background: #f8f7f2;
  border: 1px solid rgba(36,77,52,.08);
  border-radius: 22px;
  padding: 16px;
}
.info-box span,
.detail-chip span,
.details-box span {
  display: block;
  color: #7c8d72;
  font-weight: 900;
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.info-box strong {
  display: block;
  color: var(--green);
  font-size: 18px;
  line-height: 1.35;
  word-break: break-word;
}
.info-box small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.35;
  word-break: break-word;
}
.info-box.important {
  background: var(--green);
}
.info-box.important span,
.info-box.important strong {
  color: white;
}
.budget-box strong {
  font-size: 22px;
  color: var(--green-2);
}
.request-detail-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.detail-chip {
  padding: 14px;
}
.detail-chip strong {
  color: var(--green);
  font-size: 14px;
  line-height: 1.35;
}
.details-box p {
  margin: 0;
  color: #4f5f4f;
  white-space: pre-wrap;
  line-height: 1.7;
  font-size: 16px;
}
.empty-state {
  text-align: center;
  padding: 50px;
}
.empty-state h2 {
  color: var(--green);
  font-size: 34px;
  margin-bottom: 8px;
}
.empty-state p {
  color: var(--muted);
}
@media (max-width: 1180px) {
  .request-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .request-detail-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .request-card-top { flex-direction: column; }
  .request-actions { width: 100%; justify-content: stretch; }
  .request-actions form, .status-form, .status-form select, .request-actions button { width: 100%; }
  .request-grid, .request-detail-grid { grid-template-columns: 1fr; }
  .admin-panel, .request-card { border-radius: 24px; padding: 18px; }
}

/* Admin Dashboard v4: strukturierte Abteilungen */
.admin-pro-body {
  background:
    radial-gradient(circle at 12% 8%, rgba(187,247,208,.42), transparent 34%),
    radial-gradient(circle at 88% 20%, rgba(217,249,157,.35), transparent 32%),
    var(--bg);
}
.admin-shell-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 18px clamp(18px, 4vw, 54px);
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(36,77,52,.08);
  box-shadow: 0 12px 34px rgba(25,50,34,.06);
}
.admin-header-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.admin-pro-main {
  max-width: 1580px;
  margin: 0 auto;
  padding: 30px clamp(18px, 4vw, 54px) 70px;
}
.admin-hero-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 26px;
  align-items: end;
  padding: clamp(26px, 4vw, 42px);
  border-radius: 34px;
  background: linear-gradient(135deg, rgba(255,255,255,.95), rgba(255,255,255,.72));
  border: 1px solid rgba(36,77,52,.08);
  box-shadow: var(--shadow);
}
.admin-hero-panel h1 {
  margin: 0;
  font-size: clamp(46px, 6vw, 88px);
  color: var(--green);
  letter-spacing: -.065em;
}
.admin-hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(106px, 1fr));
  gap: 12px;
}
.admin-hero-stats div {
  min-width: 110px;
  border-radius: 24px;
  padding: 18px;
  background: #f8f7f2;
  border: 1px solid rgba(36,77,52,.08);
}
.admin-hero-stats span {
  display: block;
  color: #7c8d72;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .16em;
  font-weight: 900;
}
.admin-hero-stats strong {
  display: block;
  margin-top: 6px;
  color: var(--green);
  font-size: 34px;
  line-height: 1;
}
.admin-toolbar-panel {
  margin-top: 18px;
  padding: 18px;
  border-radius: 28px;
  background: rgba(255,255,255,.86);
  border: 1px solid rgba(36,77,52,.08);
  box-shadow: 0 14px 36px rgba(25,50,34,.06);
}
.admin-pro-search {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
}
.admin-pro-search input {
  min-width: 0;
}
.department-overview {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0 24px;
}
.department-tile {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border-radius: 26px;
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(36,77,52,.08);
  box-shadow: 0 12px 30px rgba(25,50,34,.05);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.department-tile:hover {
  transform: translateY(-3px);
  background: white;
  box-shadow: 0 20px 42px rgba(25,50,34,.10);
}
.department-icon,
.department-big-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 20px;
  background: #e1eadb;
  font-size: 26px;
  flex: 0 0 auto;
}
.department-tile strong {
  display: block;
  color: var(--green);
  font-size: 16px;
}
.department-tile small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-weight: 800;
}
.department-stack {
  display: grid;
  gap: 26px;
}
.department-section {
  scroll-margin-top: 110px;
  padding: 24px;
  border-radius: 36px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(36,77,52,.08);
  box-shadow: var(--shadow);
}
.department-section-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(36,77,52,.10);
}
.department-title-wrap {
  display: flex;
  gap: 16px;
  align-items: center;
}
.department-section h2 {
  margin: 0;
  color: var(--green);
  font-size: clamp(28px, 3vw, 46px);
  letter-spacing: -.04em;
}
.department-section-head p:not(.admin-kicker) {
  margin: 6px 0 0;
  color: var(--muted);
  font-weight: 700;
}
.department-count {
  min-width: 122px;
  text-align: center;
  padding: 16px 18px;
  border-radius: 24px;
  background: var(--green);
  color: white;
}
.department-count strong {
  display: block;
  font-size: 34px;
  line-height: 1;
}
.department-count span {
  display: block;
  margin-top: 4px;
  color: rgba(255,255,255,.74);
  font-weight: 800;
}
.department-empty {
  padding: 26px;
  border-radius: 24px;
  background: #f8f7f2;
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}
.department-request-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.admin-request-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px;
  border-radius: 30px;
  background: white;
  border: 1px solid rgba(36,77,52,.10);
  box-shadow: 0 16px 44px rgba(25,50,34,.08);
  overflow: hidden;
}
.admin-request-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 7px;
  background: var(--green-2);
}
.admin-request-card.in-bearbeitung::before { background: #d97706; }
.admin-request-card.erledigt::before { background: #16a34a; }
.admin-request-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding-top: 4px;
}
.admin-request-card h3 {
  margin: 10px 0 4px;
  color: var(--green);
  font-size: clamp(24px, 2.4vw, 34px);
  letter-spacing: -.04em;
}
.request-id {
  padding: 8px 12px;
  border-radius: 999px;
  background: #f0f4ed;
  color: #7c8d72;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
}
.admin-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.mini-box {
  min-width: 0;
  padding: 14px;
  border-radius: 20px;
  background: #f8f7f2;
  border: 1px solid rgba(36,77,52,.08);
}
.mini-box span,
.data-list span {
  display: block;
  margin-bottom: 7px;
  color: #7c8d72;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .13em;
}
.mini-box strong,
.data-list strong {
  display: block;
  color: var(--green);
  line-height: 1.35;
  word-break: break-word;
}
.primary-mini {
  background: var(--green);
}
.primary-mini span,
.primary-mini strong {
  color: white;
}
.admin-section-block {
  padding: 16px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid rgba(36,77,52,.10);
}
.admin-section-block h4 {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 16px;
}
.muted-block {
  background: #f8f7f2;
}
.data-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.data-list.two {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.request-details-clean {
  border-radius: 22px;
  background: #f8f7f2;
  border: 1px solid rgba(36,77,52,.08);
  padding: 15px 16px;
}
.request-details-clean summary {
  cursor: pointer;
  color: var(--green);
  font-weight: 900;
}
.request-details-clean p {
  margin: 12px 0 0;
  white-space: pre-wrap;
  color: #4f5f4f;
  line-height: 1.7;
}
.admin-card-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding-top: 4px;
  border-top: 1px solid rgba(36,77,52,.08);
}
.clean-status-form {
  flex: 1;
}
.clean-status-form select {
  flex: 1;
  min-width: 180px;
}
.ghost-danger {
  background: #fee2e2;
  color: #991b1b;
}
.ghost-danger:hover {
  background: #dc2626;
  color: white;
}
@media (max-width: 1280px) {
  .admin-hero-panel { grid-template-columns: 1fr; }
  .admin-hero-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .department-overview { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .department-request-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .admin-shell-header, .department-section-head, .admin-card-actions { flex-direction: column; align-items: stretch; }
  .admin-header-actions, .admin-header-actions form, .admin-header-actions button, .admin-header-actions .button { width: 100%; }
  .admin-pro-search { grid-template-columns: 1fr; }
  .admin-hero-stats, .department-overview, .admin-card-grid, .data-list, .data-list.two { grid-template-columns: 1fr; }
  .department-section { padding: 16px; border-radius: 26px; }
  .department-title-wrap { align-items: flex-start; }
  .clean-status-form, .clean-status-form select, .clean-status-form button, .admin-card-actions form, .admin-card-actions button { width: 100%; }
}

.admin-user-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 999px;
  background: #f6f3eb;
  border: 1px solid #d9dfd2;
  color: #193222;
  font-weight: 800;
  box-shadow: 0 10px 26px rgba(25, 50, 34, 0.06);
}

.admin-user-chip strong {
  color: #244d34;
}

.admin-user-dot {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #e1eadb;
}

.activity-panel {
  margin-top: 28px;
}

.compact-head {
  margin-bottom: 18px;
}

.activity-list {
  display: grid;
  gap: 12px;
}

.activity-item {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding: 16px 18px;
  border-radius: 20px;
  background: #f8f7f2;
  border: 1px solid #d9dfd2;
}

.activity-item strong {
  display: block;
  color: #193222;
  font-size: 15px;
}

.activity-item span,
.activity-item small {
  display: block;
  margin-top: 4px;
  color: #667466;
  font-size: 13px;
  line-height: 1.5;
}

@media (max-width: 720px) {
  .activity-item {
    flex-direction: column;
  }
}

.backup-panel {
  margin-top: 28px;
}

.backup-list {
  display: grid;
  gap: 12px;
}

.backup-item {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  border-radius: 22px;
  background: #f8f7f2;
  border: 1px solid #d9dfd2;
}

.backup-file-info {
  display: flex;
  gap: 14px;
  align-items: center;
  min-width: 0;
}

.backup-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: #e1eadb;
  font-size: 22px;
}

.backup-file-info strong {
  display: block;
  color: #193222;
  font-size: 15px;
  overflow-wrap: anywhere;
}

.backup-file-info span {
  display: block;
  margin-top: 4px;
  color: #667466;
  font-size: 13px;
}

.backup-empty {
  padding: 20px;
  border-radius: 22px;
  background: #f8f7f2;
  border: 1px dashed #cbd6c8;
  color: #667466;
}

.backup-empty strong {
  display: block;
  color: #193222;
  margin-bottom: 6px;
}

.backup-empty p {
  margin: 0;
  line-height: 1.6;
}

@media (max-width: 720px) {
  .backup-item {
    flex-direction: column;
    align-items: stretch;
  }

  .backup-item .button {
    width: 100%;
    text-align: center;
  }
}

/* User-Verwaltung / Rollen */
.admin-user-chip em {
  font-style: normal;
  color: #7c8d72;
  font-weight: 900;
}
.user-hero-panel {
  grid-template-columns: 1fr auto;
  align-items: center;
}
.role-legend {
  display: grid;
  grid-template-columns: repeat(3, minmax(130px, 1fr));
  gap: 12px;
}
.role-legend div {
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(36,77,52,.10);
  border-radius: 22px;
  padding: 16px;
  box-shadow: 0 10px 24px rgba(25,50,34,.06);
}
.role-legend strong,
.role-legend span {
  display: block;
}
.role-legend strong {
  color: var(--green);
  font-size: 18px;
}
.role-legend span {
  margin-top: 4px;
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
}
.user-create-form {
  display: grid;
  grid-template-columns: 1fr 1fr 220px auto;
  gap: 14px;
  align-items: end;
}
.user-create-form label,
.inline-user-form,
.password-reset-form {
  display: grid;
  gap: 7px;
}
.user-create-form label span {
  font-weight: 900;
  color: var(--green);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .12em;
}
.user-table-wrap {
  overflow-x: auto;
}
.user-table {
  min-width: 1100px;
}
.user-table td strong,
.user-table td small {
  display: block;
}
.user-table td small {
  margin-top: 4px;
  color: #7c8d72;
  font-weight: 900;
}
.inline-user-form {
  grid-template-columns: 1fr auto;
  align-items: center;
}
.user-status {
  display: inline-flex;
  border-radius: 999px;
  padding: 9px 13px;
  font-weight: 900;
  font-size: 13px;
}
.user-status.active {
  background: #dcfce7;
  color: #166534;
}
.user-status.inactive {
  background: #fee2e2;
  color: #991b1b;
}
.inactive-user {
  opacity: .62;
}
.user-actions-grid {
  display: grid;
  gap: 10px;
}
.password-reset-form {
  grid-template-columns: minmax(180px, 1fr) auto;
  align-items: center;
}
.error-panel h2 {
  color: #991b1b;
}
@media (max-width: 980px) {
  .user-hero-panel,
  .user-create-form,
  .role-legend {
    grid-template-columns: 1fr;
  }
}

/* Foto-Uploads und interne Notizen */
.upload-fieldset .field-help {
  grid-column: 1 / -1;
  margin: 0 0 6px;
  color: #667466;
  line-height: 1.6;
  font-size: 14px;
}

.upload-fieldset input[type="file"],
.photo-upload-form input[type="file"] {
  width: 100%;
  padding: 14px;
  border: 1px dashed #b8c3b0;
  border-radius: 18px;
  background: #fff;
  color: #193222;
}

.evidence-block,
.internal-notes-block {
  margin-top: 18px;
  padding: 18px;
  border-radius: 24px;
  background: #f8f7f2;
  border: 1px solid #e2e6da;
}

.evidence-block h4,
.internal-notes-block h4 {
  margin: 0 0 12px;
  color: #193222;
}

.evidence-two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.evidence-section {
  padding: 14px;
  border-radius: 20px;
  background: rgba(255,255,255,0.7);
  border: 1px solid rgba(36,77,52,0.08);
}

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

.evidence-title span {
  font-weight: 900;
  color: #193222;
}

.evidence-title small,
.internal-note-hint,
.evidence-empty {
  color: #667466;
  font-size: 13px;
  line-height: 1.5;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}

.photo-card {
  margin: 0;
  padding: 8px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(36,77,52,0.08);
  box-shadow: 0 8px 20px rgba(25,50,34,0.06);
}

.photo-card img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  display: block;
  border-radius: 14px;
  background: #e1eadb;
}

.photo-card figcaption {
  margin-top: 8px;
  font-size: 11px;
  line-height: 1.4;
  color: #667466;
  word-break: break-word;
}

.small-button {
  width: 100%;
  margin-top: 8px;
  padding: 7px 9px;
  border-radius: 999px;
  font-size: 12px;
}

.photo-upload-form {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.photo-upload-form button,
.note-form button {
  border: 0;
  border-radius: 999px;
  background: #244d34;
  color: white;
  padding: 11px 14px;
  font-weight: 800;
  cursor: pointer;
}

.notes-list {
  display: grid;
  gap: 10px;
  margin: 12px 0;
}

.note-item {
  padding: 13px;
  border-radius: 18px;
  background: #fff;
  border-left: 4px solid #244d34;
}

.note-item p {
  margin: 0;
  white-space: pre-wrap;
  color: #193222;
  line-height: 1.55;
}

.note-item span {
  display: block;
  margin-top: 8px;
  color: #667466;
  font-size: 12px;
  font-weight: 700;
}

.note-form {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.note-form textarea {
  min-height: 95px;
  border-radius: 18px;
  border: 1px solid #d9dfd2;
  padding: 14px;
  resize: vertical;
  font: inherit;
}

@media (max-width: 900px) {
  .evidence-two-col {
    grid-template-columns: 1fr;
  }
}

.photo-download-link {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 7px 9px;
  border-radius: 999px;
  background: #eef6ed;
  color: #244d34;
  border: 1px solid #d8e8d6;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.photo-download-link:hover {
  background: #dfeedd;
}

/* Aufklappbare Bereiche im Admin-Dashboard */
.collapsible-admin-block {
  overflow: hidden;
}

.collapsible-admin-block summary {
  cursor: pointer;
  list-style: none;
  font-weight: 900;
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.collapsible-admin-block summary::-webkit-details-marker {
  display: none;
}

.collapsible-admin-block summary::before {
  content: "▶";
  font-size: 12px;
  margin-right: 8px;
  transition: transform .18s ease;
}

.collapsible-admin-block[open] summary::before {
  transform: rotate(90deg);
}

.collapsible-admin-content {
  margin-top: 16px;
}

.collapsible-admin-block:not([open]) {
  padding: 14px 18px;
}

/* Kundenantworten im Dashboard */
.customer-replies-block .summary-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.6rem;
  height: 1.6rem;
  padding: 0 0.45rem;
  margin-left: 0.5rem;
  border-radius: 999px;
  background: #e8efe7;
  color: #23452f;
  font-size: 0.8rem;
  font-weight: 800;
}

.reply-list {
  display: grid;
  gap: 0.85rem;
  margin-top: 1rem;
}

.reply-item {
  border: 1px solid rgba(35, 69, 47, 0.14);
  background: #fffdf7;
  border-radius: 18px;
  padding: 1rem;
}

.reply-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: #173722;
}

.reply-head span {
  color: #6f7e70;
  font-size: 0.9rem;
  white-space: nowrap;
}

.reply-subject {
  margin-top: 0.35rem;
  font-weight: 800;
  color: #244b31;
}

.reply-item pre {
  white-space: pre-wrap;
  font-family: inherit;
  line-height: 1.5;
  margin: 0.8rem 0 0;
  color: #33463a;
}

.reply-item small {
  display: block;
  margin-top: 0.7rem;
  color: #60715f;
  font-weight: 700;
}

.admin-alert {
  max-width: 1180px;
  margin: 0 auto 16px;
  padding: 14px 18px;
  border-radius: 16px;
  font-weight: 800;
  border: 1px solid rgba(20, 70, 42, 0.14);
}

.success-alert {
  background: #eaf7ee;
  color: #17472d;
}

.error-alert {
  background: #fff0f0;
  color: #8a1f1f;
}

.mail-sync-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.mail-sync-panel p {
  margin: 6px 0 0;
  color: #5d6b61;
}

.mail-sync-panel form {
  margin: 0;
}

.mail-sync-panel button[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Schönere Kundenantworten */
.clean-reply-list {
  gap: 1rem;
}

.clean-reply-item {
  border: 1px solid rgba(35, 69, 47, 0.14);
  background: linear-gradient(180deg, #fffdf8 0%, #fbf9ef 100%);
  box-shadow: 0 10px 24px rgba(21, 54, 34, 0.06);
}

.clean-reply-head {
  align-items: flex-start;
}

.clean-reply-head > div {
  display: grid;
  gap: 0.25rem;
}

.clean-reply-head time {
  color: #6f7e70;
  font-size: 0.88rem;
  white-space: nowrap;
  font-weight: 700;
}

.reply-label {
  display: inline-flex;
  width: fit-content;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  background: #e9f2e7;
  color: #265f38;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.clean-reply-subject {
  margin-top: 0.75rem;
  padding: 0.65rem 0.8rem;
  border-radius: 12px;
  background: rgba(37, 91, 52, 0.07);
  color: #173722;
}

.reply-message-box {
  margin-top: 0.85rem;
  padding: 0.95rem 1rem;
  border-left: 4px solid #255b34;
  background: #ffffff;
  border-radius: 12px;
}

.reply-message-box p {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.58;
  color: #273e2f;
}

.reply-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.reply-meta-row span {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: #f0f3ed;
  color: #556854;
  font-weight: 800;
  font-size: 0.82rem;
}


/* Kundenantworten lesbarer darstellen */
.clean-reply-item {
  border: 1px solid rgba(30, 86, 49, 0.14);
  border-radius: 18px;
  padding: 16px;
  background: #fffdf6;
  box-shadow: 0 10px 30px rgba(31, 64, 42, 0.06);
}
.clean-reply-subject {
  margin: 10px 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(33, 86, 52, 0.07);
  font-weight: 800;
}
.reply-message-clean {
  border-left: 4px solid #1f5a36;
  background: #ffffff;
  border-radius: 12px;
  padding: 12px 14px;
}
.reply-message-label {
  display: inline-block;
  margin-bottom: 6px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #789078;
  font-weight: 900;
}
.reply-message-clean p {
  white-space: pre-wrap;
  margin: 0;
  line-height: 1.55;
}
.reply-meta-row span {
  background: rgba(33, 86, 52, 0.08);
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 800;
}

/* Status-Update mit Vorlagen */
.status-update-panel,
.status-history-panel {
  margin-top: 14px;
  border: 1px solid rgba(36, 77, 52, 0.14);
  border-radius: 20px;
  background: #fffdf6;
  overflow: hidden;
}

.status-update-panel summary,
.status-history-panel summary {
  cursor: pointer;
  padding: 14px 16px;
  font-weight: 900;
  color: #193222;
  background: rgba(36, 77, 52, 0.06);
}

.status-smart-form {
  display: grid;
  gap: 14px;
  padding: 16px;
}

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

.status-smart-form label span,
.status-message-label span {
  display: block;
  margin-bottom: 7px;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #70806f;
}

.status-smart-form select,
.status-smart-form textarea {
  width: 100%;
  border: 1px solid #d9dfd2;
  border-radius: 14px;
  background: #fff;
  color: #193222;
  font: inherit;
  outline: none;
}

.status-smart-form select {
  min-height: 48px;
  padding: 0 12px;
}

.status-smart-form textarea {
  min-height: 130px;
  padding: 13px 14px;
  resize: vertical;
  line-height: 1.55;
}

.notify-customer-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(36, 77, 52, 0.06);
  color: #193222;
  font-weight: 800;
}

.notify-customer-row span {
  margin: 0 !important;
  font-size: 0.95rem !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  color: #193222 !important;
}

.status-email-hint {
  margin: -6px 0 0;
  color: #667466;
  font-size: 0.9rem;
  line-height: 1.5;
}

.status-history-list {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.status-history-item {
  padding: 12px 14px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(36, 77, 52, 0.1);
}

.status-history-item strong {
  display: block;
  color: #193222;
}

.status-history-item span {
  display: block;
  margin-top: 4px;
  color: #70806f;
  font-size: 0.86rem;
  font-weight: 800;
}

.status-history-item p {
  margin: 10px 0 0;
  white-space: pre-wrap;
  color: #3f5140;
  line-height: 1.55;
}

@media (max-width: 720px) {
  .status-form-grid {
    grid-template-columns: 1fr;
  }
}

/* Allgemeine E-Mails / Posteingang */
.general-mails-panel {
  margin-top: 24px;
}

.general-empty-state {
  border: 1px dashed rgba(36, 77, 52, 0.22);
  background: #f8f7f2;
  border-radius: 24px;
  padding: 22px;
  color: #667466;
}

.general-empty-state strong {
  display: block;
  color: #193222;
  margin-bottom: 6px;
}

.general-mail-list {
  display: grid;
  gap: 18px;
}

.general-mail-card {
  border: 1px solid rgba(36, 77, 52, 0.12);
  background: linear-gradient(180deg, #ffffff 0%, #fbfaf6 100%);
  border-radius: 28px;
  padding: 20px;
  box-shadow: 0 18px 45px rgba(25, 50, 34, 0.07);
}

.general-mail-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  border-bottom: 1px solid #e7eadf;
  padding-bottom: 14px;
  margin-bottom: 14px;
}

.general-mail-head h3 {
  margin: 8px 0 6px;
  color: #193222;
  font-size: 20px;
}

.general-mail-head p,
.general-mail-head time {
  margin: 0;
  color: #667466;
  font-size: 14px;
}

.general-mail-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  background: #e1eadb;
  color: #244d34;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.general-mail-message {
  background: #f8f7f2;
  border-radius: 20px;
  padding: 16px;
  margin-bottom: 14px;
}

.general-mail-message span {
  display: block;
  margin-bottom: 8px;
  color: #7c8d72;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .12em;
}

.general-mail-message p {
  white-space: pre-wrap;
  color: #334737;
  line-height: 1.65;
  margin: 0;
}

.general-mail-attachments {
  margin-bottom: 14px;
  color: #526451;
  font-size: 14px;
  font-weight: 700;
}

.general-mail-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, auto));
  gap: 10px;
  align-items: center;
}

.general-mail-actions form {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0;
}

.assign-mail-form {
  grid-column: span 2;
}

.assign-mail-form select {
  min-width: 260px;
  height: 44px;
  border: 1px solid #d9dfd2;
  border-radius: 999px;
  padding: 0 14px;
  background: white;
  color: #193222;
  font-weight: 700;
}

@media (max-width: 980px) {
  .general-mail-head,
  .general-mail-actions,
  .general-mail-actions form {
    display: grid;
    grid-template-columns: 1fr;
  }
  .assign-mail-form {
    grid-column: auto;
  }
  .assign-mail-form select {
    min-width: 0;
    width: 100%;
  }
}


.request-edit-block summary {
  cursor: pointer;
  font-weight: 900;
}

.request-edit-form {
  display: grid;
  gap: 16px;
}

.request-edit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

.request-edit-grid label,
.full-edit-field {
  display: grid;
  gap: 7px;
  color: #193222;
  font-weight: 800;
}

.request-edit-grid span,
.full-edit-field span {
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #7c8a70;
}

.request-edit-grid input,
.full-edit-field textarea {
  width: 100%;
  border: 1px solid rgba(25, 50, 34, .18);
  border-radius: 14px;
  padding: 12px 13px;
  background: #fffef8;
  color: #193222;
  font: inherit;
}

.full-edit-field textarea {
  min-height: 130px;
  resize: vertical;
}

.request-edit-form button {
  border: 0;
  border-radius: 999px;
  padding: 13px 18px;
  background: #1f5d38;
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

.auto-filled-box {
  margin-top: 10px;
  border-radius: 14px;
  background: #eaf7ea;
  color: #1f5d38;
  border: 1px solid rgba(31, 93, 56, .18);
  padding: 10px 12px;
  font-weight: 800;
  font-size: .9rem;
}

/* Kompakte Auftragskarten: erst nur Status, Name, Datum und Ticketnummer anzeigen */
.compact-request-card {
  padding: 0;
}

.compact-request-card::before {
  z-index: 1;
}

.request-card-details {
  width: 100%;
}

.request-card-summary {
  list-style: none;
  cursor: pointer;
  display: block;
  padding: 22px;
  position: relative;
  outline: none;
}

.request-card-summary::-webkit-details-marker {
  display: none;
}

.request-card-summary:hover {
  background: linear-gradient(135deg, rgba(232, 244, 226, .75), rgba(255,255,255,.2));
}

.request-card-summary:focus-visible {
  box-shadow: inset 0 0 0 3px rgba(36, 77, 52, .22);
  border-radius: 30px;
}

.compact-request-top {
  padding-top: 4px;
}

.request-open-hint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #eef6ed;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.request-open-hint::before {
  content: "▶";
  font-size: 11px;
  transition: transform .18s ease;
}

.request-card-details[open] .request-open-hint::before {
  transform: rotate(90deg);
}

.request-card-details[open] .request-open-hint {
  background: #e4f0df;
}

.request-card-details[open] .request-open-hint::after {
  content: "";
}

.request-card-details[open] .request-open-hint {
  color: var(--green);
}

.request-card-details[open] .request-open-hint {
  font-size: 0;
}

.request-card-details[open] .request-open-hint::before {
  font-size: 11px;
}

.request-card-details[open] .request-open-hint::after {
  content: "Details schließen";
  font-size: 12px;
}

.request-expanded-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0 22px 22px;
  animation: requestExpand .18s ease-out;
}

@keyframes requestExpand {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 760px) {
  .request-card-summary,
  .request-expanded-content {
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* Kompakteres Admin-Dashboard: kleinere Abteilungen und mehr Inhalt pro Bildschirm */
.admin-pro-main {
  max-width: 1720px;
  padding-top: 18px;
  padding-bottom: 44px;
}

.admin-hero-panel {
  padding: 20px 24px;
  border-radius: 26px;
  gap: 18px;
}

.admin-hero-panel h1 {
  font-size: clamp(34px, 4.4vw, 62px);
}

.admin-hero-panel .admin-kicker,
.department-section .admin-kicker {
  margin-bottom: 6px;
  font-size: 11px;
  letter-spacing: .18em;
}

.admin-hero-stats {
  gap: 8px;
}

.admin-hero-stats div {
  min-width: 86px;
  padding: 12px 14px;
  border-radius: 18px;
}

.admin-hero-stats span {
  font-size: 10px;
  letter-spacing: .12em;
}

.admin-hero-stats strong {
  margin-top: 4px;
  font-size: 26px;
}

.admin-toolbar-panel {
  margin-top: 12px;
  padding: 12px;
  border-radius: 20px;
}

.department-overview {
  gap: 8px;
  margin: 12px 0 16px;
}

.department-tile {
  gap: 9px;
  padding: 10px 12px;
  border-radius: 18px;
  box-shadow: 0 8px 20px rgba(25,50,34,.045);
}

.department-icon,
.department-big-icon {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  font-size: 19px;
}

.department-tile strong {
  font-size: 13px;
  line-height: 1.15;
}

.department-tile small {
  margin-top: 2px;
  font-size: 11px;
}

.department-stack {
  gap: 14px;
}

.department-section {
  scroll-margin-top: 88px;
  padding: 14px;
  border-radius: 24px;
  box-shadow: 0 12px 28px rgba(25,50,34,.06);
}

.department-section-head {
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 10px;
}

.department-title-wrap {
  gap: 10px;
}

.department-section h2 {
  font-size: clamp(20px, 2.1vw, 30px);
  letter-spacing: -.035em;
}

.department-section-head p:not(.admin-kicker) {
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.35;
}

.department-count {
  min-width: 82px;
  padding: 9px 12px;
  border-radius: 16px;
}

.department-count strong {
  font-size: 24px;
}

.department-count span {
  margin-top: 2px;
  font-size: 11px;
}

.department-empty {
  padding: 16px;
  border-radius: 16px;
}

.department-request-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.admin-request-card {
  border-radius: 22px;
  box-shadow: 0 10px 26px rgba(25,50,34,.06);
}

.admin-request-card::before {
  height: 5px;
}

.request-card-summary {
  padding: 14px 16px;
}

.compact-request-top {
  gap: 10px;
}

.admin-request-card h3 {
  margin: 6px 0 2px;
  font-size: clamp(19px, 1.7vw, 25px);
}

.status-pill {
  padding: 6px 9px;
  font-size: 10px;
}

.request-id {
  padding: 6px 9px;
  font-size: 10px;
}

.request-open-hint {
  margin-top: 9px;
  padding: 6px 9px;
  font-size: 10px;
}

.request-card-details[open] .request-open-hint::after {
  font-size: 10px;
}

.request-expanded-content {
  gap: 10px;
  padding: 0 16px 16px;
}

.admin-section-block,
.status-update-panel,
.status-history-panel,
.evidence-section,
.request-edit-block {
  padding: 12px;
  border-radius: 16px;
}

.admin-card-grid,
.data-list,
.data-list.two,
.request-edit-grid,
.status-form-grid {
  gap: 8px;
}

.mini-box {
  padding: 10px;
  border-radius: 14px;
}

.mini-box span,
.data-list span {
  margin-bottom: 4px;
  font-size: 10px;
}

@media (max-width: 1420px) {
  .department-request-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .department-request-grid { grid-template-columns: 1fr; }
  .admin-pro-main { padding-top: 14px; }
  .department-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .department-overview { grid-template-columns: 1fr; }
  .admin-hero-panel { padding: 16px; }
  .department-section { padding: 12px; }
}

/* Kalender-Update */
.calendar-panel {
  overflow: hidden;
}
.calendar-head {
  align-items: flex-start;
}
.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  font-size: 12px;
  color: #667466;
}
.calendar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #d9dfd2;
  background: #fff;
  border-radius: 999px;
  padding: 7px 10px;
  font-weight: 800;
}
.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}
.calendar-pending { background: #f59e0b; }
.calendar-confirmed { background: #16a34a; }
.calendar-working { background: #2563eb; }
.calendar-done { background: #64748b; }
.calendar-drag-pool {
  margin: 16px 0 18px;
  padding: 14px;
  border-radius: 24px;
  background: #f8f7f2;
  border: 1px solid #d9dfd2;
}
.calendar-drag-pool > strong {
  display: block;
  margin-bottom: 10px;
  color: #193222;
}
.calendar-drag-list {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.calendar-drag-item {
  min-width: 190px;
  cursor: grab;
  border-radius: 18px;
  background: white;
  border: 1px solid #d9dfd2;
  padding: 11px 13px;
  box-shadow: 0 8px 20px rgba(25,50,34,.06);
}
.calendar-drag-item span {
  display: block;
  color: #7c8d72;
  font-size: 11px;
  font-weight: 900;
}
.calendar-drag-item strong {
  display: block;
  color: #193222;
  margin-top: 2px;
}
.calendar-drag-item small {
  color: #667466;
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(190px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
}
.calendar-day {
  min-width: 190px;
  border: 1px solid #d9dfd2;
  background: #fff;
  border-radius: 24px;
  overflow: hidden;
}
.calendar-day.is-today {
  border-color: #244d34;
  box-shadow: 0 0 0 3px rgba(36,77,52,.08);
}
.calendar-day-head {
  padding: 12px 14px;
  background: #f8f7f2;
  border-bottom: 1px solid #d9dfd2;
}
.calendar-day-head strong {
  display: block;
  color: #193222;
}
.calendar-day-head span {
  color: #667466;
  font-size: 12px;
}
.calendar-slots {
  display: grid;
}
.calendar-slot {
  min-height: 58px;
  padding: 9px 10px;
  border-bottom: 1px solid #eef1ea;
  position: relative;
}
.calendar-slot:last-child { border-bottom: 0; }
.slot-time {
  color: #7c8d72;
  font-size: 11px;
  font-weight: 900;
  margin-bottom: 5px;
}
.slot-free {
  background: #fbfcf9;
}
.slot-free-label {
  display: inline-block;
  color: #9aa596;
  font-size: 12px;
}
.slot-drop-hover {
  outline: 3px dashed #244d34;
  outline-offset: -6px;
  background: #e9f2e4;
}
.calendar-event {
  display: block;
  text-decoration: none;
  border-radius: 14px;
  padding: 8px 9px;
  margin-top: 4px;
  color: white;
  box-shadow: 0 10px 20px rgba(25,50,34,.10);
}
.calendar-event span {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .08em;
  opacity: .85;
  font-weight: 900;
}
.calendar-event strong {
  display: block;
  margin-top: 2px;
  font-size: 13px;
}
.calendar-event small {
  display: block;
  opacity: .9;
  margin-top: 2px;
}
.calendar-event-pending { background: #f59e0b; }
.calendar-event-confirmed { background: #16a34a; }
.calendar-event-working { background: #2563eb; }
.calendar-event-done { background: #64748b; }
.calendar-request-panel {
  margin: 14px 0;
  border: 1px solid #d9dfd2;
  border-radius: 22px;
  background: #f8f7f2;
  overflow: hidden;
}
.calendar-request-panel summary {
  cursor: pointer;
  padding: 14px 16px;
  font-weight: 900;
  color: #193222;
}
.calendar-request-form {
  padding: 0 16px 16px;
}
.calendar-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.calendar-form-grid label span,
.appointment-grid label span {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 900;
  color: #526451;
}
.calendar-form-grid input,
.calendar-form-grid select,
.appointment-grid input,
.appointment-grid select {
  width: 100%;
  height: 44px;
  border-radius: 14px;
  border: 1px solid #d9dfd2;
  padding: 0 12px;
  background: white;
}
.calendar-form-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}
.appointment-fieldset .appointment-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.slot-hint {
  margin: 12px 0 0;
  color: #667466;
  font-size: 13px;
}
@media (max-width: 900px) {
  .calendar-grid { grid-template-columns: repeat(2, minmax(190px, 1fr)); }
  .calendar-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .calendar-grid { grid-template-columns: 1fr; }
  .calendar-form-grid,
  .appointment-fieldset .appointment-grid { grid-template-columns: 1fr; }
}

/* Inline-Bearbeitung direkt an jedem Datenfeld */
.inline-edit-master-form {
  display: none;
}
.editable-data-slot,
.editable-data-row,
.details-edit-row {
  position: relative;
}
.editable-data-slot {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
}
.editable-data-slot > div,
.editable-data-row > div,
.details-edit-row > p {
  min-width: 0;
  flex: 1;
}
.editable-data-row {
  display: flex !important;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
}
.inline-edit-pencil {
  width: 2rem;
  height: 2rem;
  min-width: 2rem;
  border: 1px solid rgba(22, 78, 48, 0.16);
  border-radius: 999px;
  background: #ffffff;
  color: #174b2b;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 0.35rem 0.9rem rgba(22, 78, 48, 0.08);
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.inline-edit-pencil:hover,
.inline-edit-pencil:focus-visible {
  background: #eaf6e9;
  border-color: rgba(22, 78, 48, 0.35);
  transform: translateY(-1px);
  outline: none;
}
.inline-edit-pencil.small {
  width: 1.75rem;
  height: 1.75rem;
  min-width: 1.75rem;
  font-size: 0.85rem;
}
.inline-edit-help {
  margin: 0.4rem 0 0.85rem;
  padding: 0.65rem 0.85rem;
  border-radius: 1rem;
  background: rgba(234, 246, 233, 0.95);
  color: #31533d;
  font-size: 0.88rem;
  font-weight: 700;
}
.details-edit-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}


/* Modal-Fix fuer Stift-Bearbeitung */
.inline-edit-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}
.inline-edit-modal.is-open { display: flex; }
.inline-edit-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(14, 37, 24, 0.45);
  backdrop-filter: blur(5px);
}
.inline-edit-modal-card {
  position: relative;
  width: min(560px, 100%);
  border: 1px solid rgba(22, 78, 48, 0.14);
  border-radius: 1.5rem;
  background: #fffdf7;
  box-shadow: 0 28px 80px rgba(15, 44, 27, 0.28);
  padding: 1.25rem;
}
.inline-edit-modal-card h3 {
  margin: 0 0 1rem;
  color: #143820;
}
.inline-edit-modal-close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  padding: 0;
  font-size: 1.3rem;
  line-height: 1;
}
.inline-edit-modal-label {
  display: block;
  margin-bottom: 0.45rem;
  font-weight: 800;
  color: #5f715e;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.inline-edit-modal-input {
  width: 100%;
  resize: vertical;
  border: 1px solid rgba(22, 78, 48, 0.18);
  border-radius: 1rem;
  padding: 0.9rem;
  font: inherit;
  color: #143820;
  background: #ffffff;
}
.inline-edit-modal-input:focus {
  outline: 3px solid rgba(34, 99, 61, 0.16);
  border-color: rgba(34, 99, 61, 0.45);
}
.inline-edit-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}
.inline-edit-modal-actions button {
  min-width: 130px;
}
.inline-edit-pencil {
  position: relative;
  z-index: 5;
}


/* Fix: kleinere Stift-Symbole + zuverlässiges Bearbeitungsfenster */
.inline-edit-pencil,
.inline-edit-pencil.small {
  width: 1.35rem !important;
  height: 1.35rem !important;
  min-width: 1.35rem !important;
  padding: 0 !important;
  font-size: 0.72rem !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 999px !important;
  cursor: pointer !important;
  position: relative !important;
  z-index: 20 !important;
}
.editable-data-row .inline-edit-pencil {
  margin-top: 0.05rem !important;
}
.editable-data-slot .inline-edit-pencil {
  align-self: flex-start !important;
}
.inline-edit-modal.is-v2 {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}
.inline-edit-modal.is-v2.is-open {
  display: flex !important;
}

/* Kompakter Kalender: Tageskarten statt dauerhaft langer Uhrzeitenliste */
.calendar-grid-compact {
  grid-template-columns: repeat(7, minmax(140px, 1fr));
  align-items: start;
  overflow-x: auto;
  gap: 10px;
}
.calendar-day-compact {
  min-width: 140px;
  overflow: visible;
  border-radius: 20px;
  background: #fffdf8;
  transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.calendar-day-compact[open] {
  min-width: 260px;
  box-shadow: 0 18px 38px rgba(25,50,34,.10);
  border-color: rgba(36,77,52,.28);
}
.calendar-day-compact summary {
  list-style: none;
}
.calendar-day-compact summary::-webkit-details-marker {
  display: none;
}
.calendar-day-summary {
  cursor: pointer;
  padding: 12px;
  display: grid;
  gap: 9px;
  min-height: 128px;
  border-radius: 20px;
  background: linear-gradient(180deg, #fffdf8 0%, #f7f6ef 100%);
}
.calendar-day-compact.is-today .calendar-day-summary {
  background: linear-gradient(180deg, #eff8ea 0%, #fffdf8 100%);
}
.calendar-day-title strong {
  display: block;
  color: #193222;
  font-size: 15px;
  line-height: 1.1;
}
.calendar-day-title span {
  color: #667466;
  font-size: 12px;
  font-weight: 800;
}
.calendar-day-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-content: start;
}
.day-stat {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 7px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
  background: #eef1ea;
  color: #526451;
  white-space: nowrap;
}
.day-stat.free { background: #e9f2e4; color: #244d34; }
.day-stat.total { background: #eef1ea; color: #193222; }
.day-stat.pending { background: #fff1d6; color: #b45309; }
.day-stat.confirmed { background: #dcfce7; color: #166534; }
.day-stat.working { background: #dbeafe; color: #1d4ed8; }
.day-stat.done { background: #e5e7eb; color: #475569; }
.calendar-open-hint {
  align-self: end;
  color: #244d34;
  font-size: 11px;
  font-weight: 900;
}
.calendar-day-compact[open] .calendar-open-hint::after { content: " ausblenden"; }
.calendar-day-compact:not([open]) .calendar-open-hint::after { content: ""; }
.compact-slots {
  border-top: 1px solid #eef1ea;
  max-height: 430px;
  overflow-y: auto;
  background: #fff;
  border-radius: 0 0 20px 20px;
}
.calendar-day-compact:not([open]) .compact-slots {
  display: none;
}
.calendar-day-compact[open] .calendar-slot {
  min-height: 48px;
  padding: 8px 10px;
}
.calendar-day-compact[open] .calendar-event {
  border-radius: 12px;
  padding: 7px 8px;
}
.calendar-day-compact[open] .calendar-event strong {
  font-size: 12px;
}
@media (max-width: 1100px) {
  .calendar-grid-compact { grid-template-columns: repeat(4, minmax(140px, 1fr)); }
}
@media (max-width: 760px) {
  .calendar-grid-compact { grid-template-columns: repeat(2, minmax(140px, 1fr)); }
  .calendar-day-compact[open] { min-width: 100%; grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .calendar-grid-compact { grid-template-columns: 1fr; }
}

/* Sidebar + Profil-Dropdown Update */
.admin-pro-body {
  padding-left: 260px;
}
.admin-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 260px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px 16px;
  background: rgba(18, 45, 29, .96);
  color: #f7fbf5;
  border-right: 1px solid rgba(255,255,255,.10);
  box-shadow: 16px 0 45px rgba(25,50,34,.16);
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px 18px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.sidebar-brand-icon {
  width: 42px;
  height: 42px;
  background: rgba(255,255,255,.12);
}
.sidebar-brand strong {
  display: block;
  color: #fff;
  font-size: 17px;
  line-height: 1;
}
.sidebar-brand small {
  display: block;
  margin-top: 4px;
  color: rgba(255,255,255,.65);
  letter-spacing: .15em;
  text-transform: uppercase;
  font-size: 10px;
  font-weight: 900;
}
.sidebar-nav {
  display: grid;
  gap: 7px;
  overflow-y: auto;
  padding-right: 2px;
}
.sidebar-link,
.sidebar-group summary,
.sidebar-group a,
.sidebar-logout {
  min-height: 42px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  color: rgba(255,255,255,.82);
  font-weight: 900;
  font-size: 14px;
}
.sidebar-link:hover,
.sidebar-group summary:hover,
.sidebar-group a:hover,
.sidebar-logout:hover {
  background: rgba(255,255,255,.10);
  color: #fff;
}
.sidebar-link.active {
  background: #f5f7ef;
  color: var(--green);
  box-shadow: 0 10px 24px rgba(0,0,0,.12);
}
.sidebar-group {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 18px;
  padding: 4px;
}
.sidebar-group summary {
  cursor: pointer;
  list-style: none;
}
.sidebar-group summary::-webkit-details-marker { display: none; }
.sidebar-group a {
  min-height: 34px;
  margin-left: 28px;
  padding: 8px 10px;
  font-size: 13px;
  color: rgba(255,255,255,.70);
}
.sidebar-bottom {
  margin-top: auto;
  display: grid;
  gap: 8px;
  border-top: 1px solid rgba(255,255,255,.12);
  padding-top: 14px;
}
.sidebar-bottom form { margin: 0; }
.sidebar-logout {
  width: 100%;
  justify-content: flex-start;
  border: 0;
  background: rgba(220,38,38,.14);
  color: #fecaca;
  cursor: pointer;
}
.admin-shell-header-compact {
  left: 260px;
  width: calc(100% - 260px);
  position: sticky;
  top: 0;
  z-index: 40;
  min-height: 72px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 14px clamp(18px, 3vw, 38px);
  background: rgba(246,243,235,.82);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(36,77,52,.10);
}
.admin-header-spacer { flex: 1; }
.admin-profile-menu {
  position: relative;
}
.admin-profile-menu summary {
  list-style: none;
  cursor: pointer;
}
.admin-profile-menu summary::-webkit-details-marker { display: none; }
.admin-profile-menu .admin-user-chip {
  gap: 8px;
  padding-right: 12px;
}
.profile-chevron {
  font-weight: 900;
  color: #789070;
}
.profile-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 230px;
  display: grid;
  gap: 6px;
  padding: 10px;
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(36,77,52,.14);
  border-radius: 22px;
  box-shadow: 0 22px 50px rgba(25,50,34,.18);
}
.profile-menu-panel a,
.profile-menu-panel button {
  width: 100%;
  justify-content: flex-start;
  border-radius: 14px;
  padding: 11px 13px;
  min-height: auto;
  background: transparent;
  color: var(--green);
  font-weight: 900;
}
.profile-menu-panel a:hover,
.profile-menu-panel button:hover {
  background: #f3f6ef;
}
.profile-menu-panel form { margin: 0; }
.profile-menu-panel button {
  color: #b91c1c;
  border: 0;
  cursor: pointer;
}
.sidebar-mobile-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 16px;
  padding: 0;
}
.security-hub-panel {
  scroll-margin-top: 90px;
}
.security-hub-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.security-hub-card {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid rgba(36,77,52,.12);
  border-radius: 22px;
  background: #f8faf4;
  transition: .15s ease;
}
.security-hub-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(25,50,34,.10);
}
.security-hub-card span { font-size: 24px; }
.security-hub-card strong { color: var(--green); }
.security-hub-card small { color: var(--muted); font-weight: 800; line-height: 1.4; }
.security-section-card {
  scroll-margin-top: 90px;
}
.placeholder-security-panel {
  background: rgba(255,255,255,.66);
}
#uebersicht, #emails, #kalender, #anfragen, #backups, #aktivitaetsprotokoll, #login-historie, #geloeschte-anfragen {
  scroll-margin-top: 92px;
}

@media (max-width: 980px) {
  .admin-pro-body { padding-left: 0; }
  .admin-sidebar {
    transform: translateX(-105%);
    transition: transform .2s ease;
  }
  .sidebar-open .admin-sidebar { transform: translateX(0); }
  .admin-shell-header-compact {
    left: 0;
    width: 100%;
    justify-content: space-between;
  }
  .sidebar-mobile-toggle { display: inline-flex; }
  .security-hub-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .security-hub-grid { grid-template-columns: 1fr; }
  .profile-menu-panel { right: -8px; }
}


/* Sidebar refinements: active page, standalone security page, right aligned profile */
.admin-shell-header-compact {
  justify-content: flex-end;
}
.admin-profile-menu {
  margin-left: auto;
}
.admin-profile-menu .admin-user-chip {
  white-space: nowrap;
}
.sidebar-security-group.active .sidebar-security-main,
.sidebar-security-main.active {
  background: #f5f7ef;
  color: var(--green);
  box-shadow: 0 10px 24px rgba(0,0,0,.12);
}
.sidebar-subnav {
  display: grid;
  gap: 2px;
  padding: 4px 4px 6px 18px;
}
.sidebar-subnav a {
  min-height: 28px;
  padding: 6px 10px;
  margin-left: 18px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 900;
  color: rgba(255,255,255,.72);
}
.sidebar-subnav a:hover,
.sidebar-subnav a.active {
  background: rgba(255,255,255,.11);
  color: #fff;
}
.sidebar-note {
  color: rgba(255,255,255,.70);
  line-height: 1.35;
}
.sidebar-note span {
  font-weight: 900;
  color: rgba(255,255,255,.88);
}
.sidebar-note small {
  display: block;
  margin-top: 2px;
  font-weight: 800;
  font-size: 11px;
  color: rgba(255,255,255,.56);
}
[data-admin-page][hidden] {
  display: none !important;
}
.security-hub-panel[data-admin-page="sicherheit"] {
  margin-top: 0;
}
@media (min-width: 981px) {
  .admin-shell-header-compact .admin-profile-menu {
    margin-right: 0;
  }
}


/* Fix: Sicherheitsbereich wirklich als eigene Seite + Profil ganz rechts */
[data-admin-page][hidden] {
  display: none !important;
}

@media (min-width: 981px) {
  .admin-shell-header-compact {
    position: fixed !important;
    top: 0 !important;
    left: 260px !important;
    right: 0 !important;
    width: auto !important;
    max-width: none !important;
    justify-content: flex-end !important;
    padding-right: 22px !important;
    padding-left: 22px !important;
  }
  .admin-header-spacer {
    flex: 1 1 auto !important;
  }
  .admin-profile-menu {
    margin-left: auto !important;
    margin-right: 0 !important;
    justify-self: end !important;
  }
  .admin-pro-main {
    padding-top: 96px !important;
  }
}

@media (max-width: 980px) {
  .admin-shell-header-compact {
    position: sticky !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
  }
}


/* Fix: Dashboard-Seiten sichtbar erreichbar + Übersicht mit Sprungkarten */
.overview-home-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: -18px 0 18px;
}
.overview-home-card {
  display: grid;
  gap: 8px;
  text-decoration: none;
  color: var(--green);
  background: rgba(255,255,255,.86);
  border: 1px solid rgba(20, 60, 38, .10);
  border-radius: 24px;
  padding: 18px;
  box-shadow: 0 16px 38px rgba(18, 59, 38, .08);
  min-height: 140px;
}
.overview-home-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 44px rgba(18, 59, 38, .12);
}
.overview-home-card span {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: #edf4e8;
}
.overview-home-card strong {
  font-size: 16px;
}
.overview-home-card small {
  color: var(--muted);
  line-height: 1.45;
  font-weight: 750;
}
.sidebar-subnav a.active {
  background: rgba(255,255,255,.16) !important;
  color: #fff !important;
}
@media (max-width: 1100px) {
  .overview-home-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .overview-home-grid { grid-template-columns: 1fr; }
}


/* FINAL: robuste echte Seiten-Navigation */
[data-admin-page][hidden] { display: none !important; }
.sidebar-link.active,
.sidebar-group.active > .sidebar-link {
  background: #f7f7ef !important;
  color: #15331f !important;
  box-shadow: 0 14px 28px rgba(0,0,0,.14) !important;
}
.sidebar-subnav a.active {
  color: #ffffff !important;
  background: rgba(255,255,255,.13) !important;
  border-radius: 12px !important;
}
@media (min-width: 981px) {
  .admin-shell-header-compact {
    position: fixed !important;
    top: 0 !important;
    left: 260px !important;
    right: 0 !important;
    width: auto !important;
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    padding-right: 22px !important;
    z-index: 30 !important;
  }
  .admin-shell-header-compact .admin-profile-menu {
    margin-left: auto !important;
    margin-right: 0 !important;
  }
}

/* Fix: echte Dashboard-Tabs müssen zuverlässig versteckt werden. */
[hidden],
.admin-page-hidden {
  display: none !important;
}

.sidebar-subnav a.active {
  color: #ffffff;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Update: breitere Auftragskarten im Dashboard */
.admin-pro-main,
.admin-page-shell {
  max-width: 1720px;
}

.department-request-grid {
  grid-template-columns: repeat(auto-fit, minmax(420px, 560px));
  justify-content: start;
  align-items: start;
  gap: 22px;
}

.admin-request-card {
  width: 100%;
  min-width: 0;
}

.admin-card-grid,
.data-list,
.data-list.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mini-box,
.data-list > div {
  min-width: 0;
}

.mini-box strong,
.data-list strong {
  overflow-wrap: anywhere;
  word-break: normal;
  hyphens: auto;
}

@media (min-width: 1500px) {
  .department-request-grid {
    grid-template-columns: repeat(auto-fit, minmax(460px, 620px));
  }
}

@media (max-width: 980px) {
  .department-request-grid {
    grid-template-columns: 1fr;
  }
}
