/* m.page Dashboard – v1
   Palette: Graphit-Sidebar, helle Arbeitsfläche, Petrol-Akzent */
:root {
  --ink:        #1c2126;
  --ink-soft:   #4a545e;
  --paper:      #f3f4f2;
  --card:       #ffffff;
  --line:       #dde1e0;
  --side:       #22282e;
  --side-line:  #323a42;
  --accent:     #0e7c74;
  --accent-ink: #0a5a54;
  --danger:     #b3372f;
  --radius:     8px;
  font-size: 16px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

/* ---------- Shell ---------- */
.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--side);
  color: #cdd5db;
  display: flex;
  flex-direction: column;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: .4rem;
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid var(--side-line);
}
.brand-mark {
  font-weight: 800;
  font-size: 1.5rem;
  color: #fff;
  background: var(--accent);
  border-radius: 6px;
  padding: 0 .45rem .1rem;
  line-height: 1.4;
}
.brand-name { font-weight: 600; color: #fff; letter-spacing: .02em; }

.sidebar nav { flex: 1; padding: .75rem 0; }
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: .6rem;
  color: #cdd5db;
  text-decoration: none;
  padding: .55rem 1.25rem;
  font-size: .95rem;
  border-left: 3px solid transparent;
}
.sidebar nav a:hover { background: rgba(255,255,255,.05); color: #fff; }
.sidebar nav a.active {
  background: rgba(14,124,116,.18);
  border-left-color: var(--accent);
  color: #fff;
}
.nav-icon { width: 1.2rem; text-align: center; opacity: .8; }

.sidebar-footer {
  border-top: 1px solid var(--side-line);
  padding: 1rem 1.25rem;
  font-size: .875rem;
}
.user-chip { display: flex; align-items: center; gap: .5rem; margin-bottom: .5rem; }
.user-chip strong { color: #fff; }
.role {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: .1rem .4rem;
  border-radius: 999px;
  background: var(--side-line);
}
.role-admin { background: var(--accent); color: #fff; }
.role-team  { background: #3d566b; color: #dfe8f0; }
.logout { color: #9aa6af; text-decoration: none; }
.logout:hover { color: #fff; }

/* ---------- Content ---------- */
.content { flex: 1; padding: 2rem 2.5rem; max-width: 1100px; }

.page-head h1 { margin: 0 0 .25rem; font-size: 1.6rem; }
.page-head .sub { margin: 0 0 1.5rem; color: var(--ink-soft); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
}
.card h1 { margin-top: 0; font-size: 1.3rem; }
.card h2 { font-size: 1.1rem; }

.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}
.module-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-decoration: none;
  color: var(--ink);
  transition: border-color .12s ease, transform .12s ease;
}
.module-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.module-icon { font-size: 1.4rem; color: var(--accent); }
.module-card h2 { margin: .5rem 0 .25rem; font-size: 1.05rem; }
.module-card p { margin: 0; font-size: .875rem; color: var(--ink-soft); }

@media (prefers-reduced-motion: reduce) {
  .module-card { transition: none; }
}

/* ---------- Formulare ---------- */
label { display: block; font-size: .85rem; font-weight: 600; margin: .75rem 0 .25rem; }
input, select, textarea {
  width: 100%;
  padding: .55rem .7rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  background: #fff;
}
input:focus, select:focus, textarea:focus, button:focus, a:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
button {
  margin-top: 1rem;
  padding: .6rem 1.2rem;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
button:hover { background: var(--accent-ink); }
button.btn-danger { background: var(--danger); }
button.btn-inline { margin-top: 0; padding: .35rem .7rem; font-size: .85rem; }

.alert {
  background: #fbeae9;
  border: 1px solid #e4b5b1;
  color: var(--danger);
  border-radius: 6px;
  padding: .6rem .9rem;
  margin-bottom: 1rem;
  font-size: .9rem;
}
.notice {
  background: #e8f3f2;
  border: 1px solid #b7d9d6;
  color: var(--accent-ink);
  border-radius: 6px;
  padding: .6rem .9rem;
  margin-bottom: 1rem;
  font-size: .9rem;
}

/* ---------- Tabellen ---------- */
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: .55rem .6rem; border-bottom: 1px solid var(--line); }
th { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); }
tr:hover td { background: #fafbfa; }

/* ---------- Login ---------- */
.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--side);
}
.login-box {
  width: 100%;
  max-width: 380px;
  background: var(--card);
  border-radius: var(--radius);
  padding: 2rem;
  margin: 1rem;
}
.brand-login { border-bottom: 0; padding: 0 0 1rem; }
.brand-login .brand-name { color: var(--ink); }

/* ---------- Mobil ---------- */
@media (max-width: 760px) {
  .shell { flex-direction: column; }
  .sidebar { width: 100%; }
  .sidebar nav { display: flex; flex-wrap: wrap; padding: .25rem 0; }
  .sidebar nav a { border-left: 0; border-bottom: 3px solid transparent; }
  .sidebar nav a.active { border-bottom-color: var(--accent); }
  .content { padding: 1.25rem 1rem; }
}
