/* Internes Vertriebs-Dashboard – eigenes, app-dichtes Styling im Blau-Gold-Look. */

.dash {
  --bg:#060c0f;
  --surface:#0d181d;
  --surface-2:#1a2a31;
  --line:rgba(193,224,230,.14);
  --text:#f1f6f5;
  --muted:#a3b5bb;
  --sidebar:#0d181d;
  --sidebar-2:#172b33;
  --gold: #d4a574;
  --gold-bright: #e8c4a0;
  --blue: #7cd5d0;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

* {
  box-sizing: border-box;
}
.dash h1,
.dash h2,
.dash h3,
.dash p {
  margin: 0;
}
.dash a {
  color: inherit;
  text-decoration: none;
}
.dash button {
  font: inherit;
  cursor: pointer;
}
.dash img {
  display: block;
  max-width: 100%;
}
[hidden] {
  display: none !important;
}

/* ---------------------------------------------------------------- Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  white-space: nowrap;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(16, 47, 85, 0.12);
}
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.btn--sm {
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.86rem;
  border-radius: 8px;
}
.btn--full {
  width: 100%;
}
.btn--gold {
  border-color: transparent;
  background: linear-gradient(135deg, #8b6a47, #d4a574 58%, #e8c4a0);
  color: #fff8e8;
  text-shadow: 0 1px 0 rgba(49, 31, 8, 0.4);
}
.btn--ghost {
  background: transparent;
}
.btn--danger {
  color: #c0392b;
  border-color: rgba(192, 57, 43, 0.4);
}
.btn--google {
  width: 100%;
  background: #fff;
  border-color: #dadce0;
  color: #3c4043;
}
.iconbtn {
  border: none;
  background: transparent;
  font-size: 1.1rem;
  color: var(--muted);
  width: 34px;
  height: 34px;
  border-radius: 8px;
}
.iconbtn:hover {
  background: var(--surface-2);
  color: var(--text);
}
.iconbtn--mini {
  width: 26px;
  height: 26px;
  font-size: 0.8rem;
}

/* ---------------------------------------------------------------- Screens */

.screen {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(120% 120% at 50% 0%, #163358 0%, #0f2747 55%, #0a1c34 100%);
}
.screen__card {
  width: min(420px, 100%);
  background: var(--surface);
  border-radius: 18px;
  padding: 38px 32px;
  text-align: center;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
}
.screen__card h1 {
  font-size: 1.5rem;
  margin: 6px 0 8px;
}
.screen__lead {
  color: var(--muted);
  margin-bottom: 22px;
}
.screen__hint {
  margin-top: 14px;
  color: #c0392b;
  font-weight: 600;
}
.screen__error {
  margin-top: 14px;
  color: #c0392b;
  font-size: 0.9rem;
}
.screen__back {
  display: inline-block;
  margin-top: 20px;
  color: var(--muted);
  font-size: 0.88rem;
}
.screen__icon {
  font-size: 2.6rem;
}
.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.brand-lockup__mark {
  width: 46px;
  height: 46px;
  object-fit: contain;
}
.brand-lockup__text {
  text-align: left;
  line-height: 1;
}
.brand-lockup__text strong {
  display: block;
  font-family: var(--font-logo);
  font-size: 1.2rem;
  letter-spacing: 0.04em;
  color: var(--color-ink);
}
.brand-lockup__text small {
  letter-spacing: 0.34em;
  font-size: 0.62rem;
  color: var(--gold);
}
.spinner {
  width: 38px;
  height: 38px;
  margin: 0 auto 14px;
  border: 3px solid var(--line);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------------------------------------------------------------- App shell */

.app {
  display: grid;
  grid-template-columns: 250px 1fr;
  height: 100vh;
}
.sidebar {
  background: var(--sidebar);
  color: #dce6f4;
  display: flex;
  flex-direction: column;
  padding: 18px 14px;
  gap: 8px;
}
.sidebar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.sidebar__brand img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}
.sidebar__brand strong {
  display: block;
  font-family: var(--font-logo);
  letter-spacing: 0.05em;
  font-size: 1.05rem;
  color: #fff;
}
.sidebar__brand small {
  letter-spacing: 0.28em;
  font-size: 0.6rem;
  color: var(--gold-bright);
  text-transform: uppercase;
}
.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 10px;
}
.sidebar__nav button {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  border: none;
  background: transparent;
  color: #cdd9ea;
  border-radius: 9px;
  font-weight: 600;
  text-align: left;
}
.sidebar__nav button span {
  font-size: 1.05rem;
}
.sidebar__nav button:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}
.sidebar__nav button.is-active {
  background: linear-gradient(135deg, rgba(157, 105, 31, 0.95), rgba(215, 173, 88, 0.9));
  color: #fff8e8;
}
.nav-badge {
  margin-left: auto;
  background: #7cd5d0;
  color: #08263f;
  font-style: normal;
  font-weight: 800;
  font-size: 0.72rem;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  padding: 0 6px;
}
.nav-badge--warn {
  background: #f59e0b;
  color: #3a2600;
}
.sidebar__foot {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.userchip {
  display: flex;
  align-items: center;
  gap: 10px;
}
.userchip img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}
.userchip strong {
  display: block;
  color: #fff;
  font-size: 0.9rem;
}
.userchip small {
  color: var(--gold-bright);
  font-size: 0.74rem;
}
.sidebar__foot .btn {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
  color: #dce6f4;
}

.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100vh;
}
.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.topbar h1 {
  font-size: 1.18rem;
}
.topbar__menu {
  display: none;
  border: none;
  background: transparent;
  font-size: 1.3rem;
}
.topbar__spacer {
  flex: 1;
}
.view {
  flex: 1;
  overflow: auto;
  padding: 22px 24px;
}
#view-map {
  padding: 0;
  overflow: hidden;
}

/* ---------------------------------------------------------------- Cards / panels */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
}
.card__icon {
  font-size: 1.7rem;
}
.card__value {
  font-size: 1.7rem;
  line-height: 1;
  display: block;
}
.card__label {
  color: var(--muted);
  font-size: 0.86rem;
}
.card__sub {
  display: block;
  color: #c0392b;
  font-size: 0.76rem;
  font-weight: 700;
}
.panel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
}
.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.panel__head h2 {
  font-size: 1.02rem;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.link {
  border: none;
  background: none;
  color: #7cd5d0;
  font-weight: 600;
  font-size: 0.86rem;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 0.82rem;
}
.pad {
  padding: 28px 4px;
}

.minilist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.minilist__row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 4px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.minilist__row:last-child {
  border-bottom: none;
}
.minilist__row:hover {
  background: var(--surface-2);
}
.minilist__name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.minilist__name small {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
}
.minilist__when {
  color: var(--muted);
  font-size: 0.8rem;
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  color: #fff;
  background: var(--badge, #64748b);
}
.pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
}
.pill--danger {
  background: #fde2e0;
  color: #c0392b;
}
.pill--warn {
  background: #fdecc9;
  color: #9a6400;
}
.pill--mute {
  background: var(--surface-2);
  color: var(--muted);
}
.pill--ok {
  background: #d8f3e0;
  color: #15803d;
}

.statusbars {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.statusbars__row {
  display: grid;
  grid-template-columns: 96px 1fr 28px;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
}
.statusbars__track {
  background: var(--surface-2);
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
}
.statusbars__fill {
  display: block;
  height: 100%;
  border-radius: 999px;
}
.statusbars__num {
  text-align: right;
  color: var(--muted);
}

/* ---------------------------------------------------------------- Toolbar / inputs */

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
}
.input {
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--text);
  width: 100%;
}
.input:focus {
  outline: 2px solid rgba(50, 173, 230, 0.4);
  border-color: #7cd5d0;
}
.toolbar .input {
  width: auto;
  flex: 1;
  min-width: 180px;
}
.input--select {
  flex: none;
  min-width: 150px;
}
.input--area {
  resize: vertical;
  min-height: 64px;
}
.checkline {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.88rem;
  color: var(--text);
  white-space: nowrap;
}

/* ---------------------------------------------------------------- Customer table */

.ctable {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.ctable__head,
.ctable__row {
  display: grid;
  grid-template-columns: 2.2fr 1.2fr 1.8fr 1fr 0.9fr;
  gap: 12px;
  align-items: center;
  padding: 11px 16px;
}
.ctable__head {
  background: var(--surface-2);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-weight: 700;
}
.ctable__row {
  border-top: 1px solid var(--line);
  cursor: pointer;
}
.ctable__row:hover {
  background: var(--surface-2);
}
.ctable__name {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.ctable__name strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ctable__name small {
  color: var(--muted);
  font-size: 0.76rem;
}
.ctable__cat {
  font-size: 1.15rem;
}
.ctable__contact {
  display: flex;
  flex-direction: column;
  font-size: 0.8rem;
  min-width: 0;
}
.ctable__contact a {
  color: #7cd5d0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------------------------------------------------------------- Map view */

.maplayout {
  display: grid;
  grid-template-columns: 360px 1fr;
  height: 100%;
}
.searchpanel {
  border-right: 1px solid var(--line);
  background: var(--surface);
  overflow: auto;
}
.searchpanel__inner {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.searchpanel h2 {
  font-size: 1.05rem;
}
.mapwrap {
  position: relative;
  min-width: 0;
}
#map {
  position: absolute;
  inset: 0;
  height: 100%;
  width: 100%;
  background: #aadaff;
}
.field__label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chip {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.84rem;
  font-weight: 600;
}
.chip.is-active {
  border-color: var(--gold);
  background: rgba(215, 173, 88, 0.16);
  color: #8b6a47;
}
.chipgroups {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.chipgroup {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.chipgroup__label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.searchrow {
  display: flex;
  gap: 8px;
}
.searchrow .input {
  flex: 1;
}
.hint {
  font-size: 0.78rem;
  color: var(--muted);
}
.range {
  width: 100%;
  accent-color: var(--gold);
}
.centerbox {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 8px 11px;
  font-size: 0.82rem;
}
.centerbox__label {
  display: block;
  font-weight: 700;
  color: var(--muted);
  font-size: 0.72rem;
}
.results {
  margin-top: 6px;
}
.results__head {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 6px;
}
.results__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.result {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 11px;
  cursor: pointer;
}
.result:hover {
  border-color: #7cd5d0;
}
.result__main {
  flex: 1;
  min-width: 0;
}
.result__main strong {
  display: block;
  font-size: 0.9rem;
}
.result__main small {
  color: var(--muted);
  font-size: 0.76rem;
}
.result__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 3px;
  font-size: 0.74rem;
  color: var(--muted);
}
.result__in {
  color: #15803d;
  font-weight: 700;
  font-size: 0.8rem;
}

/* Leaflet popup & pins */
.map-pin {
  display: block;
  width: 16px;
  height: 16px;
  border-radius: 50% 50% 50% 0;
  background: var(--gold);
  border: 2px solid #fff;
  transform: rotate(-45deg);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}
.map-pin--in {
  background: #16a34a;
}
.map-popup {
  font-family: var(--font-main);
  min-width: 160px;
}
.map-popup strong {
  font-size: 0.95rem;
}
.map-popup__sub {
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 2px;
}
.map-popup__status {
  margin-top: 4px;
  font-size: 0.8rem;
}
.map-popup__btn {
  margin-top: 8px;
  border: none;
  background: var(--color-ink);
  color: #fff;
  border-radius: 7px;
  padding: 6px 10px;
  font-weight: 700;
  font-size: 0.8rem;
}

/* ---------------------------------------------------------------- Drawer */

.drawer {
  position: fixed;
  inset: 0;
  z-index: 1200;
}
.drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 22, 40, 0.4);
}
.drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: min(480px, 100%);
  background: var(--surface);
  box-shadow: -20px 0 50px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  overflow: auto;
  animation: slidein 0.2s ease;
}
@keyframes slidein {
  from {
    transform: translateX(30px);
    opacity: 0.6;
  }
}
.drawer__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 12px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 2;
}
.drawer__cat {
  font-size: 0.78rem;
  color: var(--gold);
  font-weight: 700;
}
.drawer__title {
  font-size: 1.25rem;
  margin-top: 2px;
}
.drawer__quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
}
.assigned {
  align-self: center;
  color: #15803d;
  font-weight: 700;
  font-size: 0.85rem;
}
.drawer__body {
  padding: 6px 20px 20px;
}
.drawer__section {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.drawer__h3 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 10px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 10px;
}
.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.drawer__actions {
  display: flex;
  gap: 10px;
  padding-top: 16px;
}
.drawer__actions .btn--gold {
  flex: 1;
}

.activityform {
  display: grid;
  grid-template-columns: 130px 1fr auto;
  gap: 8px;
  margin-bottom: 12px;
}
.activitylog {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.activity {
  display: flex;
  gap: 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 11px;
}
.activity__icon {
  font-size: 1.1rem;
}
.activity__body {
  flex: 1;
  min-width: 0;
}
.activity__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.activity__note {
  margin-top: 3px;
  font-size: 0.88rem;
}

/* ---------------------------------------------------------------- Team */

.teamlist {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.teamrow {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 16px;
}
.teamrow__main {
  flex: 1;
  min-width: 0;
}
.teamrow__main strong {
  display: block;
}
.teamrow__tags {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}
.teamrow__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.avatar {
  border-radius: 50%;
  object-fit: cover;
  flex: none;
}
.avatar--fallback {
  display: inline-grid;
  place-items: center;
  background: linear-gradient(135deg, #5ab8b3, #7cd5d0);
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
}

/* ---------------------------------------------------------------- Toast */

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  background: var(--color-ink);
  color: #fff;
  padding: 12px 20px;
  border-radius: 10px;
  font-weight: 600;
  z-index: 2000;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
  max-width: 90vw;
}
.toast--error {
  background: #c0392b;
}
.toast--warn {
  background: #9a6400;
}

/* ---------------------------------------------------------------- Responsive */

.topbar__menu {
  display: none;
}
@media (max-width: 900px) {
  .app {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 250px;
    z-index: 1100;
    transform: translateX(-100%);
    transition: transform 0.22s ease;
  }
  body.sidebar-open .sidebar {
    transform: none;
    box-shadow: 20px 0 50px rgba(0, 0, 0, 0.3);
  }
  .topbar__menu {
    display: block;
  }
  .maplayout {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    overflow: auto;
  }
  .searchpanel {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
  .mapwrap {
    min-height: 60vh;
  }
  .ctable__head {
    display: none;
  }
  .ctable__row {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: auto;
  }
  .activityform {
    grid-template-columns: 1fr;
  }
}

/* ---- Eingebettetes Partnerportal (Märkte, Tour, Katalog, Bestellungen) ---- */
.sidebar__sep{margin:14px 12px 4px;font-size:11px;letter-spacing:.08em;color:var(--muted);opacity:.8}
.portal-frame{flex:1;width:100%;border:0;min-height:0;background:transparent}
.view--embed{padding:0}

/* ---- Marktsuche in Karte & Suche ---- */
.geo-field{position:relative}
.geo-suggest{position:absolute;top:100%;left:0;right:0;z-index:1200;margin:2px 0 0;padding:4px;list-style:none;background:#122127;color:#f1f6f5;border:1px solid rgba(193,224,230,.14);border-radius:10px;box-shadow:0 8px 24px rgba(0,0,0,.15);max-height:260px;overflow:auto}
.geo-suggest li{display:flex;flex-direction:column;gap:1px;padding:8px 10px;border-radius:7px;cursor:pointer}
.geo-suggest li:hover{background:#d7ad58;color:#fff}
.geo-suggest li strong{font-size:14px}
.geo-suggest li small{font-size:12px;opacity:.75}
.radius-presets{display:flex;flex-wrap:wrap;gap:6px;margin:6px 0 10px}
.chip--sm{padding:4px 10px;font-size:12px}
.map-pin--market{display:block;width:20px;height:20px;border-radius:50%;border:3px solid #fff;box-shadow:0 1px 6px rgba(0,0,0,.35)}
.map-pin--free{background:#16a34a}
.map-pin--locked{background:#ef4444}
.result__lock{color:#b91c1c;font-weight:600}
.result__free{color:#15803d;font-weight:600}


/* ======================================================================
   REDESIGN 2026-09 — ruhig, flach, klar. Überschreibt die Regeln oben.
   Eine Schrift, Tiefblau + ein Goldakzent, feine Linien statt Schatten.
   ====================================================================== */

.dash {
  color-scheme: dark;
  --bg: #060c0f;
  --surface: #0d181d;
  --surface-2: #122127;
  --line: rgba(193,224,230,.14);
  --line-strong: rgba(182,245,231,.34);
  --text: #f1f6f5;
  --ink: #f1f6f5;
  --muted: #a3b5bb;
  --sidebar: #091419;
  --sidebar-2: #12272e;
  --gold: #b6f5e7;
  --accent: #b6f5e7;
  --gold-soft: rgba(182,245,231,.09);
  --blue: #7cd5d0;
  --ok: #76dfad;
  --warn: #f1c67a;
  --danger: #ff9f91;
  --panel: #0d181d;
  --border: rgba(193,224,230,.14);
  --fg: #f1f6f5;
  --radius: 10px;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  letter-spacing: -0.005em;
}

/* ---------- Login: zweigeteilt ---------- */
/* Der Anmeldebildschirm ist per .screen `position:fixed` - damit scrollt die Seite NICHT.
   Mit drei Anmeldewegen (Google, E-Mail, TechnoStar-Postfach) ist die Spalte hoeher als
   viele Bildschirme, und der unterste Knopf war schlicht nicht erreichbar. Deshalb scrollt
   die Formularspalte selbst. `place-items:stretch` statt `center`, sonst zentriert das Raster
   den Inhalt und schneidet oben ab, sobald er hoeher als der Bildschirm ist. */
.screen--split { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); padding: 0; background: #060c0f !important; place-items: stretch; min-height: 100vh; max-height: 100vh; }
.split__brand {
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; gap: 18px; padding: 56px;
  color: #fff; background: #091419;
}
.split__brand::before { content: ""; position: absolute; inset: 0; background: radial-gradient(900px 600px at 20% 10%, rgba(80,154,158,.28) 0%, rgba(27,63,107,0) 60%); }
.split__butterfly { position: absolute; right: -8%; top: 4%; width: 66%; max-width: 620px; opacity: 0.14; filter: brightness(0) invert(1); pointer-events: none; }
.split__lockup { position: relative; line-height: 1; }
.split__lockup strong { display: block; font-family: var(--font-logo); font-size: 2rem; letter-spacing: 0.06em; }
.split__lockup small { display: block; margin-top: 8px; font-size: 0.72rem; letter-spacing: 0.42em; color: #d7ad58; }
.split__claim { position: relative; margin: 0; font-size: 1.15rem; line-height: 1.5; color: #c9d5e6; max-width: 34ch; }
.split__form { display: grid; place-items: center; align-content: safe center; padding: 48px 32px; background: #060c0f; overflow-y: auto; min-height: 0; }
.split__inner { width: min(380px, 100%); display: flex; flex-direction: column; gap: 14px; }
.split__inner .eyebrow { margin: 0; font-size: 0.7rem; letter-spacing: 0.28em; font-weight: 700; color: var(--gold); }
.split__inner h1 { font-size: 2rem; font-weight: 700; letter-spacing: -0.02em; color: var(--text); margin: 0; }
.split__inner .screen__lead { color: var(--muted); font-size: 0.95rem; line-height: 1.55; margin-bottom: 8px; }
.split__inner .btn--google { min-height: 48px; border-radius: var(--radius); border: 1px solid var(--line-strong); font-weight: 600; box-shadow: none; }
.split__inner .btn--google:hover { transform: none; border-color: var(--text); box-shadow: none; }
.split__inner .screen__back { margin-top: 6px; font-size: 0.86rem; color: var(--muted); }
.screen--split .screen__error { color: var(--danger); font-size: 0.86rem; }
@media (max-width: 860px) {
  .screen--split { grid-template-columns: 1fr; }
  /* Schmal: Markenspalte klein halten und die ganze Seite scrollen lassen. */
  .screen--split { max-height: none; overflow-y: auto; }
  .split__brand { min-height: 26vh; padding: 32px 28px; }
  .split__form { overflow-y: visible; padding: 32px 22px 48px; }
  .split__lockup strong { font-size: 1.5rem; }
  .split__claim { font-size: 1rem; }
}

/* Lade-/Warte-Screens: gleicher ruhiger Look */
.screen { background: radial-gradient(ellipse at 30% 10%,#17343c 0%,#060c0f 62%); }
.screen__card { border-radius: 14px; box-shadow: none; border: 1px solid rgba(255,255,255,0.08); }

/* ---------- Sidebar ---------- */
.sidebar { background: var(--sidebar); padding: 22px 14px 16px; gap: 6px; }
.sidebar__brand { padding: 4px 8px 18px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.sidebar__brand img { width: 30px; height: 30px; filter: brightness(0) invert(1); opacity: 0.92; }
.sidebar__brand strong { font-size: 1rem; letter-spacing: 0.06em; }
.sidebar__brand small { font-size: 0.58rem; letter-spacing: 0.32em; color: #d7ad58; }
.sidebar__nav { gap: 2px; margin-top: 8px; }
.sidebar__nav button { gap: 12px; padding: 10px 12px; border-radius: 8px; font-weight: 500; font-size: 0.92rem; color: #b8c6da; }
.sidebar__nav button:hover { background: rgba(255,255,255,0.06); color: #fff; }
.sidebar__nav button.is-active { background: rgba(255,255,255,0.1); color: #fff; box-shadow: inset 3px 0 0 #d7ad58; }
.nav-ico { width: 18px; height: 18px; flex: none; opacity: 0.85; }
.sidebar__nav button.is-active .nav-ico { opacity: 1; }
.sidebar__sep { margin: 16px 12px 6px; font-size: 0.64rem; letter-spacing: 0.22em; color: #7e90a8; opacity: 1; }
.nav-badge { background: #d7ad58; color: #0e2340; font-weight: 700; font-size: 0.7rem; }
.nav-badge--warn { background: #f0b85a; color: #3a2600; }
.userchip img { width: 32px; height: 32px; }
.userchip strong { font-size: 0.86rem; font-weight: 600; }
.userchip small { color: #8ea2be; font-size: 0.72rem; }
.sidebar__foot .btn { background: transparent; color: #b8c6da; border-color: rgba(255,255,255,0.14); }
.sidebar__foot .btn:hover { color: #fff; border-color: rgba(255,255,255,0.35); transform: none; box-shadow: none; }

/* ---------- Topbar / Main ---------- */
.topbar { padding: 16px 28px; border-bottom: 1px solid var(--line); }
.topbar h1 { font-size: 1.1rem; font-weight: 600; letter-spacing: -0.01em; }
.view { padding: 24px 28px; }

/* ---------- Buttons ---------- */
.btn { border-radius: 8px; font-weight: 600; font-size: 0.9rem; min-height: 40px; transition: background 0.15s, border-color 0.15s, color 0.15s; }
.btn:hover { transform: none; box-shadow: none; border-color: var(--line-strong); background: var(--surface-2); }
.btn--gold { background: #b6f5e7; color: #102724; text-shadow: none; border-color: #b6f5e7; }
.btn--gold:hover { background: #cef9ef; border-color: #cef9ef; color: #102724; }
.btn--gold:disabled { opacity: 0.45; cursor: not-allowed; }
.btn--sm { min-height: 34px; padding: 0 12px; font-size: 0.84rem; }
.btn--ghost { background: transparent; }
.link { color: #7cd5d0; font-weight: 600; background: none; border: 0; padding: 0; }

/* ---------- Karten / Panels ---------- */
.card, .panel, .ctable, .centerbox, .result { border-radius: var(--radius); border: 1px solid var(--line); box-shadow: none; }
.card { padding: 18px 20px; position: relative; }
.card::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 3px; background: var(--accent, var(--line-strong)); }
.card__label { display: block; font-size: 0.78rem; color: var(--muted); font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; }
.card__value { display: block; font-size: 1.9rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; margin-top: 4px; }
.card__sub { display: block; font-size: 0.78rem; color: var(--warn); margin-top: 2px; }
.card__icon { display: none; }
.panel { padding: 20px; }
.panel__head h2 { font-size: 0.98rem; font-weight: 600; }
.pill { font-weight: 600; font-size: 0.72rem; border-radius: 6px; }

/* ---------- Suchleiste (Karte & Suche) ---------- */
.searchpanel h2 { font-size: 1rem; font-weight: 600; }
.field__label { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.06em; }
.chipgroup__label { font-size: 0.68rem; letter-spacing: 0.1em; }
.chip { border-radius: 8px; padding: 7px 12px; font-weight: 500; font-size: 0.86rem; transition: border-color 0.15s, background 0.15s; }
.chip:hover { border-color: var(--line-strong); }
.chip.is-active { background: #b6f5e7; border-color: #b6f5e7; color: #102724; }
.chip--sm { padding: 4px 10px; font-size: 0.78rem; }
.input { border-radius: 8px; min-height: 40px; }
.input:focus { outline: none; border-color: #b6f5e7; box-shadow: 0 0 0 3px rgba(182,245,231,.11); }
.range { accent-color: #0e2340; }
.centerbox { background: var(--gold-soft); border-color: var(--line); }
.results__head { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.result { padding: 10px 12px; transition: border-color 0.15s, background 0.15s; }
.result:hover { border-color: var(--line-strong); background: var(--surface-2); }
.result__lock { color: var(--danger); font-weight: 600; font-size: 0.78rem; }
.result__free { color: var(--ok); font-weight: 600; font-size: 0.78rem; }
.geo-suggest { border-radius: 10px; box-shadow: 0 12px 32px rgba(14,35,64,0.14); }
.geo-suggest li:hover { background: #0e2340; }

/* Karten-Pins: dezenter */
.map-pin--market { width: 16px; height: 16px; border-width: 2.5px; box-shadow: 0 1px 4px rgba(0,0,0,0.3); }
.map-pin--free { background: var(--ok); }
.map-pin--locked { background: var(--danger); }
.map-popup__btn { border-radius: 6px; }

/* ---------- Sonstiges ---------- */
.toast { border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,0.25); font-weight: 500; }
.drawer__panel { box-shadow: -12px 0 40px rgba(0,0,0,0.18); }
.portal-frame { background: transparent; }

.result__facts{display:block;color:#7d8f9a;font-size:.78rem;margin-top:2px}

/* Unterreiter in der Kopfzeile (Bereichs-Navigation) */
.subnav{display:flex;gap:4px;margin-left:18px;padding:3px;border:1px solid var(--line);border-radius:10px;background:rgba(255,255,255,.03);overflow-x:auto;max-width:100%}
.subnav[hidden]{display:none}
.subnav button{display:inline-flex;align-items:center;gap:8px;border:0;border-radius:7px;padding:7px 13px;background:transparent;color:var(--muted);font:inherit;font-size:.86rem;font-weight:500;white-space:nowrap;cursor:pointer}
.subnav button:hover{color:var(--ink);background:rgba(255,255,255,.05)}
.subnav button.is-active{background:var(--surface-2,rgba(255,255,255,.09));color:var(--ink)}
.subnav .nav-badge{margin-left:2px}
@media (max-width:760px){.topbar{flex-wrap:wrap;padding:10px 14px}.subnav{order:3;width:100%;margin:8px 0 0}}

.cards--5{grid-template-columns:repeat(5,minmax(0,1fr))}.pill--ok{background:rgba(118,223,173,.13);color:#9ce8c2}.minilist__name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media(max-width:1100px){.cards--5{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:700px){.cards--5{grid-template-columns:1fr 1fr}}

.daterange{margin:14px 0 4px}.daterange__row{display:flex;align-items:center;gap:8px;margin:6px 0 8px}.daterange__row .input{flex:1;min-width:0}.daterange__sep{color:var(--muted);font-size:.85rem}.chip--ghost{opacity:.75}

.minilist--tasks .is-done .minilist__name{text-decoration:line-through;opacity:.6}

/* E-Mail-Login */
.auth-divider{display:flex;align-items:center;gap:12px;margin:22px 0 16px;color:var(--muted);font-size:.8rem}.auth-divider::before,.auth-divider::after{content:"";flex:1;height:1px;background:var(--line)}
.auth-form{display:grid;gap:12px}.auth-tabs{display:flex;gap:4px;padding:3px;border:1px solid var(--line);border-radius:10px;background:rgba(0,0,0,.03)}.auth-tabs button{flex:1;border:0;border-radius:7px;padding:8px;background:transparent;font:inherit;font-weight:600;color:var(--muted);cursor:pointer}.auth-tabs button.is-active{background:var(--sidebar,#0f2747);color:#fff}
.auth-form .link{background:none;border:0;padding:6px 0;font:inherit;font-size:.85rem;color:var(--muted);text-decoration:underline;cursor:pointer;justify-self:start}.auth-form .btn{width:100%}

.auth-form .screen__hint{color:var(--muted);font-weight:400}

/* Modal-Dialog (Postfach zuweisen u. a.) */
.modal-overlay{position:fixed;inset:0;background:rgba(6,12,15,.6);backdrop-filter:blur(4px);display:flex;align-items:center;justify-content:center;padding:20px;z-index:120}
.modal{width:min(520px,100%);max-height:90vh;overflow:auto;background:var(--panel,#0f1b1f);border:1px solid var(--border,rgba(255,255,255,.12));border-radius:16px;padding:20px 22px;box-shadow:0 24px 60px rgba(0,0,0,.45)}
.modal__head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:6px}
.modal__head h2{margin:0;font-size:1.15rem}
.modal__actions{display:flex;gap:10px;margin-top:16px}
.modal .grid2{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.iconbtn{background:none;border:none;color:var(--muted);font-size:1.1rem;cursor:pointer;padding:4px 8px;border-radius:8px}
.iconbtn:hover{background:rgba(255,255,255,.08);color:var(--fg,#fff)}
.teamrow__mail{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:8px}
.btn--danger{color:#fca5a5}
.btn--sm{padding:4px 10px;font-size:.82rem}
@media(max-width:560px){.modal .grid2{grid-template-columns:1fr}}

/* Darkmode-Kontrastkorrekturen */
.dash,.dash .main{background:var(--bg);color:var(--text)}
.dash .topbar{background:rgba(9,20,25,.92);color:var(--text);backdrop-filter:blur(18px)}
.dash .topbar h1,.dash .panel h2,.dash .card__value{color:var(--text)}
.dash .card,.dash .panel,.dash .ctable,.dash .result,.dash .drawer__panel,.dash .teamrow{background:var(--surface);color:var(--text);border-color:var(--line)}
.dash .subnav{background:rgba(182,245,231,.035)}
.dash .subnav button.is-active{background:rgba(182,245,231,.12);color:var(--text)}
.dash .subnav button:hover{background:rgba(182,245,231,.07);color:var(--text)}
.dash .input,.dash input,.dash select,.dash textarea{background:#091419;color:var(--text);border-color:var(--line);color-scheme:dark}
.dash .pill--danger{background:rgba(255,159,145,.12);color:#ffb5a9}.dash .pill--warn{background:rgba(241,198,122,.12);color:#f1c67a}
.dash .statusbars__track{background:#26383e}.dash .statusbars__fill{filter:saturate(.85) brightness(1.25)}
.dash .geo-suggest{background:#122127;color:var(--text);border-color:var(--line)}
.dash .geo-suggest li:hover{background:rgba(182,245,231,.12);color:var(--text)}
.dash .modal{background:#0d181d;color:var(--text)}

.teamrow__dealer{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:8px}

/* Nächste Märkte: Datum, Details, Entfernung, Wetter — eine Zeile pro Markt.
   Braucht die volle Breite, sonst werden Marktname und Kennzahlen abgeschnitten. */
.panel--markets{grid-column:1 / -1}
.panel--markets .panel__head{align-items:flex-start;gap:12px;flex-wrap:wrap}
.panel__tools{display:flex;align-items:center;gap:16px;margin-left:auto}
.sortbox{display:flex;align-items:center;gap:8px}
.sortbox small{color:var(--muted);font-size:11px;white-space:nowrap}
.mini-select{background:#0d181d;color:var(--ink);border:1px solid var(--line);border-radius:9px;padding:6px 10px;font-size:12px;min-height:34px}
.mini-select:focus{outline:2px solid var(--accent);outline-offset:2px}
.homebar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 0 12px;border-bottom:1px solid var(--line);margin-bottom:6px;flex-wrap:wrap}
.homebar small{color:var(--muted);font-size:11px}
.homebar strong{color:var(--ink);font-weight:600}
.homebar__tools{display:flex;gap:14px;align-items:center}
.homebar__edit{display:flex;gap:10px;align-items:center;position:relative;min-width:260px}
.homebar__edit input{flex:1;min-width:170px;padding:7px 10px;border-radius:9px;border:1px solid var(--line);background:rgba(255,255,255,.04);color:var(--text);font-size:13px}
.homebar__edit .geo-suggest{top:calc(100% + 4px)}

.minilist--markets{display:grid;gap:2px}
.market-row{display:grid;grid-template-columns:62px 1fr auto;gap:14px;align-items:center;padding:12px 8px;border-radius:12px;cursor:pointer;transition:background .2s}
.market-row:hover{background:#ffffff08}
.market-row__date{display:grid;gap:2px;text-align:center}
.market-row__date strong{font-size:14px;font-variant-numeric:tabular-nums;letter-spacing:-.02em}
.market-row__date small{font-size:9px;color:var(--muted);text-transform:uppercase;letter-spacing:.06em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.market-row__main{display:grid;gap:3px;min-width:0}
.market-row__title{font-size:14px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.market-row__place{display:flex;align-items:center;gap:10px;font-size:11px;color:var(--muted);min-width:0}
.market-row__km{flex:none;padding:2px 8px;border-radius:20px;background:#b6f5e714;color:var(--accent);font-variant-numeric:tabular-nums;font-weight:600}
.market-row__facts{font-size:11px;color:#9fb4bb;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.market-row__facts--none{color:#6d858d;font-style:italic}
.market-row__side{display:flex;align-items:center;gap:14px;justify-content:flex-end}
.weather{display:flex;align-items:center;gap:8px;min-width:104px}
.weather__icon{font-size:19px;line-height:1}
.weather__text{display:grid;line-height:1.25}
.weather__text strong{font-size:14px;font-variant-numeric:tabular-nums}
.weather__text small{font-size:10px;color:var(--muted);white-space:nowrap}
.weather--none{color:#6d858d;font-size:11px;justify-content:center}

@media(max-width:900px){
  .market-row{grid-template-columns:52px 1fr;gap:10px}
  .market-row__side{grid-column:1 / -1;justify-content:flex-start;padding-left:62px;gap:12px}
  .weather{min-width:0}
  .panel__tools{width:100%;margin-left:0;justify-content:space-between}
}

/* Team: Adressen vorab freigeben */
.invitepanel{margin-bottom:18px}
.inviteform{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin:10px 0 14px}
.inviteform input{flex:1;min-width:220px;padding:9px 12px;border-radius:10px;border:1px solid var(--line);background:rgba(255,255,255,.04);color:var(--text);font-size:14px}
.inviteform select{padding:9px 12px;border-radius:10px;border:1px solid var(--line);background:#0d181d;color:var(--ink);font-size:13px;min-height:38px}
.invitelist{display:grid;gap:8px}
.inviterow{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:9px 0;border-top:1px solid var(--line)}
.inviterow__mail{flex:1;min-width:180px;font-size:14px}

/* Knopfleiste unter einem Panel (Kontaktformular-Postfach). */
.panel__actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
