/* TP-Retail Intranet — mobil zuerst, Desktop ab 900px */

:root {
  --rot: #e30613;
  --rot-dunkel: #b3040f;
  --anthrazit: #2f3640;
  --anthrazit-hell: #3d4552;
  --text: #22262c;
  --text-leise: #6b7280;
  --linie: #dfe3e8;
  --flaeche: #f4f6f8;
  --weiss: #fff;
  --radius: 6px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--flaeche);
  color: var(--text);
  font: 16px/1.55 "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

h1 { font-size: 1.5rem; margin: 0 0 1rem; letter-spacing: -0.01em; }
h2 { font-size: 1.05rem; margin: 0 0 .6rem; }
a { color: var(--rot-dunkel); }
a:hover { color: var(--rot); }

:focus-visible { outline: 3px solid var(--rot); outline-offset: 2px; }

/* ---------------------------------------------------------------- Kopfbereich */

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: .7rem 1rem;
  background: var(--weiss); border-bottom: 3px solid var(--rot);
}

.brand {
  display: inline-flex; align-items: center; gap: .35rem;
  font-weight: 700; font-size: 1.15rem; letter-spacing: .04em;
  color: var(--text); text-decoration: none;
}
.brand-mark {
  display: inline-grid; place-items: center;
  width: 1.9em; height: 1.9em; border-radius: 50%;
  background: var(--rot); color: #fff; font-size: .72em; letter-spacing: 0;
}
.brand-lg { font-size: 1.5rem; margin-bottom: 1.5rem; }

.topbar-user { display: flex; align-items: center; gap: .75rem; font-size: .9rem; }
.topbar-name { color: var(--text-leise); }
.linkish {
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--rot-dunkel); font: inherit; text-decoration: underline;
}

/* ---------------------------------------------------------------- Navigation */

.mainnav {
  display: flex; gap: .25rem; overflow-x: auto;
  background: var(--anthrazit); padding: 0 .5rem;
  scrollbar-width: none;
}
.mainnav::-webkit-scrollbar { display: none; }
.mainnav a {
  flex: 0 0 auto; padding: .85rem .8rem;
  color: #c9cfd8; text-decoration: none; font-size: .9rem; white-space: nowrap;
  border-bottom: 3px solid transparent;
}
.mainnav a:hover { color: #fff; background: var(--anthrazit-hell); }
.mainnav a.is-active { color: #fff; border-bottom-color: var(--rot); }

/* ------------------------------------------------------------------- Flächen */

.wrap { max-width: 1100px; margin: 0 auto; padding: 1.25rem 1rem 3rem; }

.panel {
  background: var(--weiss); border: 1px solid var(--linie);
  border-radius: var(--radius); padding: 1rem; margin-bottom: 1rem;
}
.panel-alert { border-left: 4px solid var(--rot); }

.grid { display: grid; gap: 1rem; }

.card {
  max-width: 26rem; margin: 3rem auto; padding: 1.75rem;
  background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--radius);
}
body.plain { display: block; padding: 0 1rem; }

/* ------------------------------------------------------------------ Formulare */

.stack { display: grid; gap: .9rem; }
.stack label { display: grid; gap: .3rem; font-size: .875rem; color: var(--text-leise); }
.row { display: grid; gap: .9rem; }

input[type=text], input[type=email], input[type=password], input[type=search],
input:not([type]), select, textarea {
  width: 100%; padding: .6rem .7rem; font: inherit; color: var(--text);
  background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--radius);
}
input:focus, select:focus, textarea:focus { border-color: var(--rot); }

.check { display: flex !important; flex-direction: row; align-items: center; gap: .5rem; }
.check input { width: auto; }

.btn {
  display: inline-block; padding: .6rem 1.1rem; font: inherit; cursor: pointer;
  text-align: center; text-decoration: none;
  color: var(--text); background: var(--weiss);
  border: 1px solid var(--linie); border-radius: var(--radius);
}
.btn:hover { border-color: var(--text-leise); color: var(--text); }
.btn-primary { background: var(--rot); border-color: var(--rot); color: #fff; }
.btn-primary:hover { background: var(--rot-dunkel); border-color: var(--rot-dunkel); color: #fff; }
.btn-small { padding: .35rem .7rem; font-size: .8rem; }

.filters { display: grid; gap: .5rem; margin-bottom: 1rem; }

/* -------------------------------------------------------------------- Inhalte */

.muted { color: var(--text-leise); font-size: .875rem; }
.hint { color: var(--text-leise); font-size: .8rem; margin: -.4rem 0 0; }
.date { color: var(--text-leise); font-variant-numeric: tabular-nums; margin-right: .4rem; }

.tag {
  display: inline-block; padding: .1rem .45rem; border-radius: 3px;
  background: var(--flaeche); border: 1px solid var(--linie);
  font-size: .75rem; color: var(--text-leise);
}

.list { margin: 0; padding-left: 1.1rem; }
.list li + li { margin-top: .5rem; }

.people { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.people li { display: flex; align-items: center; gap: .6rem; }
.people img { border-radius: 50%; object-fit: cover; }

.preview { border-radius: var(--radius); border: 1px solid var(--linie); }

.notice { padding: .75rem 1rem; border-radius: var(--radius); margin: 0 0 1rem; font-size: .9rem; }
.notice-error { background: #fdecee; border: 1px solid #f5c2c7; color: #8a1220; }
.notice-warn  { background: #fff7e6; border: 1px solid #f2d492; color: #7a5600; }
.notice-info  { background: #eef4fb; border: 1px solid #c7dbf2; color: #1d4771; }

/* --------------------------------------------------------------------- Tabelle */

.table { width: 100%; border-collapse: collapse; background: var(--weiss); font-size: .9rem; }
.table th, .table td {
  padding: .6rem .5rem; text-align: left; vertical-align: top;
  border-bottom: 1px solid var(--linie);
}
.table th { font-size: .78rem; text-transform: none; color: var(--text-leise); font-weight: 600; }
.table tbody tr:hover { background: #fafbfc; }
.actions { white-space: nowrap; }
.actions form { display: inline-block; margin-right: .25rem; }

.table-scroll { overflow-x: auto; }

.foot {
  padding: 1.5rem 1rem; text-align: center;
  color: var(--text-leise); font-size: .8rem;
}

/* --------------------------------------------------------------------- Desktop */

@media (min-width: 700px) {
  .row { grid-template-columns: 1fr 1fr; }
  .filters { grid-template-columns: 2fr 1fr 1fr auto auto; align-items: center; }
  .form-wide { max-width: 44rem; }
}

@media (min-width: 900px) {
  h1 { font-size: 1.85rem; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .panel { padding: 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
