:root {
  --primary: #93ce18;
  --primary-dark: #64b400;
  --brand-gradient: linear-gradient(135deg, #93ce18 0%, #64b400 100%);
  --dark: #0f172a;
  --dark-2: #1e293b;
  --text: #334155;
  --muted: #64748b;
  --bg: #f5f7fa;
  --card: #ffffff;
  --border: #e6e9ee;
  --soft: #f7f9fb;
  --danger: #ff6348;
  --success: #43e97b;
  --radius: 16px;
  --shadow: 0 14px 34px rgba(15, 23, 42, 0.12);
  --sh-1: 0 1px 2px rgba(15,23,42,.06), 0 2px 8px rgba(15,23,42,.05);
  --sh-2: 0 4px 14px rgba(15,23,42,.08);
  --font: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); color: var(--text); line-height: 1.55;
  background:
    radial-gradient(38% 44% at 6% 2%, rgba(147,206,24,.10), transparent 60%),
    radial-gradient(34% 42% at 97% 10%, rgba(100,180,0,.07), transparent 58%),
    var(--bg);
  background-attachment: fixed;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 15% 10%, rgba(147,206,24,.18), transparent 36%),
    radial-gradient(circle at 85% 80%, rgba(100,180,0,.14), transparent 34%),
    #f8fafc;
}
.login-card {
  width: min(440px, 100%);
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(224,224,224,.8);
  border-radius: 26px;
  padding: 42px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}
.login-logo { display: flex; justify-content: center; margin-bottom: 22px; }
.login-logo img { max-height: 74px; width: auto; }
.login-badge { display: inline-flex; padding: 5px 12px; border-radius: 999px; background: rgba(147,206,24,.14); color: #4c8500; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.login-card h1 { margin: 18px 0 8px; font-size: 32px; color: var(--dark); }
.login-subline, .login-note { color: var(--muted); }
.login-note { font-size: 13px; margin-top: 22px; }
.login-form, .form-stack { display: grid; gap: 12px; }
.login-form label, .form-stack label { font-weight: 600; font-size: 14px; color: var(--dark); }
.login-form input, .form-stack input, .form-stack select, .form-stack textarea {
  width: 100%; border: 1px solid var(--border); border-radius: 12px; padding: 13px 14px; font: inherit; outline: none; background: white;
}
.login-form input:focus, .form-stack input:focus, .form-stack select:focus, .form-stack textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(147,206,24,.14); }
.login-form button, .form-stack button, .btn-primary-small {
  margin-top: 8px; border: none; border-radius: 999px; padding: 13px 20px; background: var(--brand-gradient); color: white; font-weight: 700; cursor: pointer; box-shadow: 0 8px 22px rgba(100,180,0,.24);
}
.alert { padding: 12px 14px; border-radius: 12px; margin: 16px 0; font-size: 14px; }
.alert-error { background: rgba(255,99,72,.10); color: #b12b18; border: 1px solid rgba(255,99,72,.20); }
.alert-success { background: rgba(67,233,123,.12); color: #147a3b; border: 1px solid rgba(67,233,123,.22); }

.app-topbar {
  position: fixed; top: 0; left: 0; right: 0; height: 72px; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 0 32px; background: rgba(255,255,255,.92); backdrop-filter: blur(14px); border-bottom: 1px solid var(--border);
}
.app-logo img { height: 50px; width: auto; }
.topbar-user { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 14px; }
.topbar-user a { color: var(--dark); border: 1px solid var(--border); padding: 8px 14px; border-radius: 999px; background: white; }
.app-shell { display: flex; padding-top: 72px; min-height: 100vh; }
.app-sidebar { width: 260px; flex: 0 0 260px; padding: 28px 18px; background: #fff; border-right: 1px solid var(--border); position: fixed; top: 72px; bottom: 0; left: 0; overflow-y: auto; }
.app-sidebar nav { display: grid; gap: 6px; }
.app-sidebar a { padding: 12px 14px; border-radius: 12px; color: var(--muted); font-weight: 600; }
.app-sidebar a:hover, .app-sidebar a.active { color: var(--dark); background: rgba(147,206,24,.14); }
.sidebar-label { margin: 22px 14px 6px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #98a2b3; font-weight: 800; }
.app-main { width: 100%; margin-left: 260px; padding: 42px; }

.page-hero { padding: 46px; border-radius: 28px; color: white; background: linear-gradient(135deg, #0f172a 0%, #1e293b 52%, #64b400 130%); box-shadow: var(--shadow); margin-bottom: 28px; }
.page-hero.compact { padding: 34px 40px; }
.page-hero h1 { font-size: clamp(30px, 4vw, 54px); line-height: 1.08; margin: 8px 0 14px; max-width: 880px; }
.page-hero p { max-width: 760px; color: rgba(255,255,255,.78); margin: 0; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-weight: 800; font-size: 12px; color: var(--primary); margin: 0 0 8px; }

.dashboard-grid, .cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 28px; }
.stat-card, .panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; box-shadow: 0 8px 24px rgba(15,23,42,.06); }
.stat-card span { display: block; font-size: 42px; font-weight: 800; color: var(--dark); line-height: 1; margin-bottom: 8px; }
.stat-card strong { color: var(--dark); }
.stat-card p, .panel p { color: var(--muted); }
.list-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--sh-2); }
.content-grid { display: grid; gap: 22px; }
.two-cols { grid-template-columns: 1fr 1fr; }
.panel h2 { margin-top: 0; color: var(--dark); }
.gradient-panel { background: var(--brand-gradient); color: white; }
.gradient-panel p { color: rgba(255,255,255,.82); }
.quick-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.quick-actions a { background: white; color: var(--dark); padding: 10px 14px; border-radius: 999px; font-weight: 700; }
.info-list { margin: 0; display: grid; gap: 14px; }
.info-list div { display: grid; grid-template-columns: 150px 1fr; gap: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.info-list dt { color: var(--muted); font-weight: 600; }
.info-list dd { margin: 0; color: var(--dark); font-weight: 700; }
.badge { display: inline-flex; padding: 4px 10px; border-radius: 999px; background: rgba(147,206,24,.16); color: #4c8500; font-weight: 800; font-size: 12px; }
.empty-state { text-align: center; padding: 42px 20px; }
.download-list, .timeline { display: grid; gap: 14px; }
.download-item { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px; border: 1px solid var(--border); border-radius: 14px; background: var(--soft); }
.download-item h3, .timeline-item h3 { margin: 0 0 6px; color: var(--dark); }
.download-item p { margin: 0 0 8px; }
.timeline-item { border-left: 4px solid var(--primary); padding: 4px 0 24px 18px; }
.timeline-item span { color: #4c8500; font-weight: 800; }
.doc-card span { color: var(--primary-dark); font-weight: 800; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.wide-table-panel { min-width: 0; }
.mobile-menu-btn { display: none; background: none; border: none; width: 42px; height: 42px; }
.mobile-menu-btn span { display: block; height: 2px; background: var(--dark); margin: 6px 0; }
.module-grid,
.platform-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 18px;
    margin: 32px 0;
}

.module-card,
.platform-item {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 14px;
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: #333333;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.module-card:hover,
.platform-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.module-card img,
.platform-item img {
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.module-card span,
.platform-item span {
    font-weight: 600;
}


@media (max-width: 980px) {
  .mobile-menu-btn { display: block; }
  .topbar-user span { display: none; }
  .app-sidebar { transform: translateX(-105%); transition: transform .25s ease; z-index: 25; box-shadow: var(--shadow); }
  .app-sidebar.open { transform: translateX(0); }
  .app-main { margin-left: 0; padding: 24px; }
  .dashboard-grid, .cards-grid, .two-cols { grid-template-columns: 1fr; }
  .page-hero { padding: 30px; }
}

@media (max-width: 560px) {
  .app-topbar { padding: 0 16px; }
  .app-logo img { height: 40px; }
  .topbar-user a { padding: 7px 10px; }
  .login-card { padding: 28px; }
  .info-list div { grid-template-columns: 1fr; gap: 4px; }
  .download-item { align-items: flex-start; flex-direction: column; }
}

/* ======================================================
   Dashboard Feinschliff
   ====================================================== */

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 18px;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.btn-primary {
  background: var(--brand-gradient);
  color: #fff;
  box-shadow: 0 10px 24px rgba(100,180,0,.26);
}

.btn-secondary {
  color: #fff;
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(255,255,255,.08);
}

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

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

.panel-headline h2 {
  margin: 0;
}

.panel-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--dark);
  font-weight: 700;
  font-size: 14px;
}

.system-panel {
  margin-bottom: 28px;
}

.system-grid {
  margin-bottom: 0;
}

.compact-stat {
  min-height: auto;
}

.quick-access-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin: 0 0 28px;
}

.module-card {
  position: relative;
  overflow: hidden;
  min-height: 98px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 8px 24px rgba(15,23,42,.06);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.module-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(147,206,24,.13), rgba(100,180,0,.03));
  opacity: 0;
  transition: opacity .22s ease;
}

.module-card img,
.module-card span {
  position: relative;
  z-index: 1;
}

.module-card img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.module-card span {
  color: var(--dark);
  font-weight: 800;
}

.module-card:hover {
  transform: translateY(-4px);
  border-color: rgba(147,206,24,.72);
  box-shadow: 0 14px 34px rgba(15,23,42,.12);
}

.module-card:hover::before {
  opacity: 1;
}

.dashboard-info-row {
  margin-bottom: 28px;
}

.brand-panel {
  position: relative;
  overflow: hidden;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brand-panel::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  right: -90px;
  bottom: -110px;
  border-radius: 50%;
  background: rgba(255,255,255,.14);
}

.gradient-logo {
  position: relative;
  z-index: 1;
  width: min(310px, 80%);
  height: auto;
  margin-bottom: 22px;
}

.gradient-logo-white {
  filter: brightness(0) invert(1);
}

.brand-panel p,
.brand-panel .quick-actions {
  position: relative;
  z-index: 1;
}

.platform-panel {
  width: 100%;
  margin-top: 0;
}

.platform-panel .platform-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin: 0;
}

.platform-panel .platform-item {
  position: relative;
  overflow: hidden;
  min-height: 132px;
  padding: 24px 20px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(15,23,42,.06);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 14px;
  transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease;
}

.platform-panel .platform-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(147,206,24,.15), rgba(100,180,0,.04));
  opacity: 0;
  transition: opacity .24s ease;
}

.platform-panel .platform-item::after {
  content: "";
  position: absolute;
  width: 90px;
  height: 90px;
  right: -34px;
  bottom: -36px;
  border-radius: 50%;
  background: rgba(147,206,24,.12);
  transform: scale(.6);
  opacity: 0;
  transition: transform .24s ease, opacity .24s ease;
}

.platform-panel .platform-item img,
.platform-panel .platform-item span {
  position: relative;
  z-index: 1;
}

.platform-panel .platform-item img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.platform-panel .platform-item span {
  color: var(--dark);
  font-weight: 800;
}

.platform-panel .platform-item:hover {
  transform: translateY(-6px);
  border-color: rgba(147,206,24,.75);
  box-shadow: 0 16px 36px rgba(15,23,42,.14);
}

.platform-panel .platform-item:hover::before,
.platform-panel .platform-item:hover::after {
  opacity: 1;
}

.platform-panel .platform-item:hover::after {
  transform: scale(1);
}

@media (max-width: 1200px) {
  .quick-access-grid,
  .platform-panel .platform-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .quick-access-grid,
  .platform-panel .platform-grid {
    grid-template-columns: 1fr;
  }

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

  .brand-panel {
    min-height: 220px;
  }
}

/* ======================================================
   Dashboard-Feinschliff (Restyling R1)
   ====================================================== */
.stat-card { transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.stat-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  box-shadow: 0 14px 30px rgba(100,180,0,.16);
}
.stat-card span { color: var(--primary-dark); }   /* grüne Kennzahlen */

/* Wartungsmodus-Banner (nur für Admin sichtbar) */
.maint-banner {
  background: #fff7e6;
  border: 1px solid #f4d27a;
  color: #946400;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 20px;
  font-size: 14px;
}
.maint-banner a { color: #946400; font-weight: 800; text-decoration: underline; }
