:root {
  --bg-1: #f6f8fc;
  --bg-2: #eef2f8;
  --bg-3: #f6f8fb;
  --surface: #ffffff;
  --surface-strong: #ffffff;
  --line: rgba(52, 60, 84, 0.14);
  --line-strong: rgba(52, 60, 84, 0.24);
  --text: #1f2638;
  --muted: #5a637b;
  --brand: #1f2f57;
  --brand-strong: #343c54;
  --accent: #2b8a3e;
  --ok: #17603d;
  --warn: #8a5a18;
  --bad: #952b28;
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 8px;
  --shadow-1: 0 6px 18px rgba(52, 60, 84, 0.06);
  --shadow-2: 0 3px 10px rgba(52, 60, 84, 0.05);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Poppins", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #f7f9fc 0%, #f1f4f9 100%);
  min-height: 100vh;
}

.bg-glow {
  display: none;
}

h1,
h2,
h3,
h4 {
  font-family: "Montserrat", sans-serif;
  margin: 0;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

.app {
  max-width: 1360px;
  margin: 0 auto;
  padding: 18px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  box-shadow: 0 1px 4px rgba(52, 60, 84, 0.06);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-link {
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  color: inherit;
  text-align: left;
}

.brand-link h1 {
  font-size: 1.06rem;
}

.brand-badge {
  display: grid;
  place-content: center;
  width: 154px;
  height: 44px;
  border-radius: 8px;
  background: transparent;
  border: none;
  padding: 0;
}

.brand-badge img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.brand p {
  color: var(--muted);
  font-size: 0.84rem;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.topbar .status {
  font-size: 0.7rem;
  padding: 2px 7px;
  background: #f2f4f8;
  border-color: rgba(52, 60, 84, 0.1);
}

.top-user-menu {
  display: flex;
  gap: 8px;
  align-items: center;
}

.control {
  display: grid;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--muted);
}

select,
input,
textarea {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font: inherit;
  color: inherit;
  background: #fff;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

select:focus,
input:focus,
textarea:focus {
  outline: none;
  border-color: rgba(15, 118, 110, 0.7);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}

.btn {
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 13px;
  background: var(--brand-strong);
  color: #fff;
  cursor: pointer;
  font-weight: 600;
  transition: transform 140ms ease, box-shadow 140ms ease, filter 140ms ease;
  box-shadow: 0 2px 8px rgba(52, 60, 84, 0.16);
}

.btn:hover {
  transform: none;
  filter: brightness(0.96);
}

.btn:active {
  transform: translateY(0);
}

.btn.ghost {
  background: var(--surface-strong);
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: none;
}

.btn.ghost:hover {
  border-color: var(--line-strong);
  background: #fff;
}

.layout {
  display: grid;
  grid-template-columns: 252px 1fr;
  gap: 12px;
  margin-top: 12px;
}

.sidebar,
.content {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-2);
}

.sidebar {
  padding: 10px;
  display: grid;
  gap: 7px;
  align-content: start;
}

.nav-item {
  border: 1px solid transparent;
  background: transparent;
  border-radius: 8px;
  padding: 9px 10px;
  text-align: left;
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-weight: 500;
}

.nav-item:hover,
.nav-item.active {
  border-color: rgba(52, 60, 84, 0.26);
  background: rgba(255, 255, 255, 0.9);
}

.badge {
  font-size: 0.72rem;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  padding: 2px 8px;
}

.content {
  padding: 14px;
  min-height: 72vh;
}

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

.section-title h2 {
  font-size: 1.12rem;
}

.section-title p {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 2px;
}

.grid {
  display: grid;
  gap: 10px;
}

.grid.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
  border: 1px solid rgba(20, 31, 55, 0.1);
  border-radius: 10px;
  background: #fff;
  padding: 11px;
  box-shadow: 0 2px 8px rgba(25, 43, 74, 0.05);
}

.card h4 {
  margin-bottom: 8px;
}

.card p {
  color: var(--muted);
  font-size: 0.9rem;
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 12px;
  max-width: 980px;
}

.auth-panel,
.auth-aside {
  border: 1px solid rgba(20, 31, 55, 0.14);
  border-radius: 10px;
  background: #fff;
  padding: 16px;
  box-shadow: none;
}

.auth-panel {
  display: grid;
  gap: 10px;
}

.auth-logo {
  width: min(230px, 90%);
  height: auto;
  object-fit: contain;
}

.auth-panel h3 {
  font-size: 1.05rem;
}

.auth-copy {
  color: var(--muted);
}

.auth-note {
  font-size: 0.8rem;
  color: #5b6580;
}

.auth-aside {
  position: relative;
  overflow: hidden;
}

.auth-aside::after {
  display: none;
}

.auth-list {
  margin: 8px 0 0;
  padding-left: 16px;
  color: var(--muted);
  display: grid;
  gap: 6px;
}

.auth-demo {
  margin-top: 14px;
  font-size: 0.84rem;
}

.notice {
  border-left: 4px solid var(--brand);
  background: #fbfeff;
}

.news-post {
  border: 1px solid rgba(20, 31, 55, 0.11);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}

.news-image {
  height: 165px;
  background: linear-gradient(135deg, #44506f, #2f3955);
}

.news-body {
  padding: 10px;
  display: grid;
  gap: 8px;
}

.row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

label {
  display: grid;
  gap: 4px;
  font-size: 0.84rem;
  color: var(--muted);
}

.status {
  border-radius: 999px;
  font-size: 0.74rem;
  padding: 2px 8px;
  background: rgba(52, 60, 84, 0.08);
  color: #343c54;
  border: 1px solid rgba(52, 60, 84, 0.12);
}

.status.offen {
  background: #fde6e2;
  color: var(--bad);
  border-color: rgba(149, 43, 40, 0.18);
}

.status.in-arbeit {
  background: #ffefd9;
  color: var(--warn);
  border-color: rgba(138, 90, 24, 0.2);
}

.status.erledigt {
  background: #dff4e9;
  color: var(--ok);
  border-color: rgba(23, 96, 61, 0.18);
}

.status.fehlerhaft {
  background: #f9dada;
  color: var(--bad);
  border-color: rgba(149, 43, 40, 0.2);
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  border-bottom: 1px solid rgba(20, 31, 55, 0.1);
  text-align: left;
  padding: 7px 6px;
  font-size: 0.86rem;
}

.table th {
  color: #32435c;
  font-weight: 600;
}

.kpi {
  display: grid;
  gap: 4px;
}

.kpi strong {
  font-size: 1.25rem;
  font-family: "Montserrat", sans-serif;
}

.mobile-nav {
  display: none;
}

.hidden {
  display: none !important;
}

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

  .sidebar {
    display: none;
  }

  .mobile-nav {
    position: sticky;
    bottom: 8px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    margin-top: 12px;
    background: var(--surface-strong);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 8px;
    box-shadow: var(--shadow-2);
  }

  .mobile-nav .nav-item {
    padding: 8px;
    justify-content: center;
    font-size: 0.82rem;
  }

  .grid.cols-2 {
    grid-template-columns: 1fr;
  }

  .auth-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .app {
    padding: 12px;
  }

  .topbar {
    padding: 12px;
    border-radius: 16px;
  }

  .brand-badge {
    width: 150px;
    height: 50px;
  }

  .content {
    padding: 14px;
  }

  .card {
    padding: 12px;
  }
}
