:root {
  --tec-max: 1180px;
  --tec-pad: 18px;

  --tec-bg: #ffffff;
  --tec-text: #0b1220;
  --tec-muted: #4b5563;

  --tec-border: #d1d5db;
  --tec-border2: #e5e7eb;

  --tec-accent: #1f5e3b; /* Jägergrün */
  --tec-accentSoft: rgba(31, 94, 59, 0.22);
}

/* Seiten-Hintergrund */
html,
body {
  background: #f4f4f4;
}

.tec-wrap {
  width: min(var(--tec-max), 100% - (var(--tec-pad) * 2));
  margin: 22px auto 70px;
  color: var(--tec-text);
  font-family:
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Arial,
    sans-serif;
}

.tec-head {
  margin-bottom: 10px;
}
.tec-title {
  margin: 0;
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 900;
  letter-spacing: -0.02em;
}

/* Toolbar */
.tec-toolbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 12px;
  background: #fff;
  border: 1px solid var(--tec-border);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  margin-bottom: 14px;
}

.tec-toolbar__left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

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

.tec-iconbtn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid var(--tec-border2);
  background: #fff;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  font-weight: 900;
  color: #111827;
  display: grid;
  place-items: center;
}

.tec-iconbtn:hover {
  background: #f9fafb;
}

.tec-btn {
  height: 38px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--tec-border2);
  background: var(--tec-accent);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

.tec-btn:hover {
  filter: brightness(1.04);
}

.tec-monthbtn {
  height: 38px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--tec-border2);
  background: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  color: #111827;
}

.tec-monthbtn:hover {
  background: #f9fafb;
}

.tec-caret {
  font-size: 14px;
  opacity: 0.8;
}

.tec-monthmenu {
  position: absolute;
  left: 0;
  top: calc(100% + 10px);
  z-index: 20;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--tec-border);
  background: #fff;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.12);
}

.tec-monthpicker {
  width: 320px;
}

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

.tec-mp-nav {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid var(--tec-border2);
  background: #fff;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  font-weight: 900;
  display: grid;
  place-items: center;
}

.tec-mp-nav:hover {
  background: #f9fafb;
}

.tec-mp-year {
  font-weight: 950;
  letter-spacing: -0.01em;
}

.tec-monthpicker__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.tec-mp-month {
  border: 1px solid var(--tec-border2);
  background: #fff;
  border-radius: 12px;
  padding: 10px 10px;
  cursor: pointer;
  font-weight: 850;
  text-align: center;
}

.tec-mp-month:hover {
  background: rgba(31, 94, 59, 0.06);
  border-color: rgba(31, 94, 59, 0.2);
}

.tec-mp-month.is-current {
  background: rgba(31, 94, 59, 0.12);
  border-color: rgba(31, 94, 59, 0.35);
}

.tec-view {
  display: inline-flex;
  border: 1px solid var(--tec-border2);
  border-radius: 999px;
  overflow: hidden;
  margin-left: 6px;
}

.tec-viewbtn {
  height: 38px;
  padding: 0 14px;
  background: #fff;
  border: 0;
  font-weight: 900;
  cursor: pointer;
}

.tec-viewbtn.is-active {
  background: var(--tec-accent);
  color: #fff;
}

.tec-search {
  position: relative;
  width: min(420px, 46vw);
}

.tec-search__icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.7;
  font-size: 16px;
}

.tec-search input {
  width: 100%;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--tec-border2);
  padding: 0 14px 0 36px;
  background: #fff;
  outline: none;
}

.tec-search input:focus {
  border-color: rgba(31, 94, 59, 0.35);
  box-shadow: 0 0 0 4px rgba(31, 94, 59, 0.14);
}

/* Month view */
.tec-month {
  background: #fff;
  border: 1px solid var(--tec-border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.07);
}

.tec-dow {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: #f8fafc;
  border-bottom: 1px solid var(--tec-border);
  font-weight: 950;
  color: rgba(17, 24, 39, 0.8);
  font-size: 13px;
}

.tec-dow > div {
  padding: 10px 10px;
  border-right: 1px solid var(--tec-border2);
}

.tec-dow > div:last-child {
  border-right: 0;
}

.tec-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.tec-day {
  position: relative;
  min-height: 132px;
  border-right: 1px solid var(--tec-border2);
  border-bottom: 1px solid var(--tec-border2);
  padding: 10px 10px 12px;
  padding-top: 40px; /* Platz für Balken */
  background: #fff;
}
.tec-day:nth-child(7n) {
  border-right: 0;
}

.tec-day.is-out {
  background: #fbfbfb;
  color: rgba(17, 24, 39, 0.5);
}

.tec-day.is-today {
  outline: 3px solid var(--tec-accentSoft);
  outline-offset: -3px;
}

/* ✅ ausgewählter Tag (Mobile) */
.tec-day.is-selected {
  outline: 3px solid rgba(31, 94, 59, 0.35);
  outline-offset: -3px;
}

/* Day number */
.tec-daynum {
  position: absolute;
  top: 10px;
  left: 10px;
  font-weight: 900;
  font-size: 14px;
  margin: 0;
  color: #111827;
}

/* Singles container */
.tec-events {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Single events as line (with dot + time + title) */
.tec-evtline {
  display: grid;
  grid-template-columns: 10px auto 1fr;
  gap: 8px;
  align-items: center;
  text-decoration: none;
  color: #111827;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tec-evtline:hover .tec-evttitle {
  text-decoration: underline;
}

.tec-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(31, 94, 59, 0.9);
}

.tec-evttime {
  font-variant-numeric: tabular-nums;
  opacity: 0.8;
  font-weight: 900;
}

.tec-evttitle {
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 800;
}

/* “+3 mehr” link */
.tec-more {
  margin-top: 8px;
  font-size: 12px;
  color: var(--tec-accent);
  font-weight: 900;
  cursor: pointer;
  user-select: none;
}

/* Week bars (multi-day) */
.tec-weekbars {
  position: absolute;
  top: 30px;
  left: 8px;
  right: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tec-bar {
  height: 18px;
  border-radius: 10px;
  background: rgba(31, 94, 59, 0.12);
  border: 1px solid rgba(31, 94, 59, 0.25);
  color: rgba(31, 94, 59, 0.9);
  font-weight: 900;
  font-size: 12px;
  padding: 2px 8px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.tec-bar:hover {
  background: rgba(31, 94, 59, 0.2);
  border-color: rgba(31, 94, 59, 0.3);
  box-shadow: 0 10px 30px rgba(31, 94, 59, 0.18);
}
.tec-bar.is-continued-left {
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px;
}
.tec-bar.is-continued-right {
  border-top-right-radius: 10px;
  border-bottom-right-radius: 10px;
}

/* Agenda */

/* Agenda-Liste: keine innere Scrollbar – wir paginieren unten */
#agendaList {
  padding-right: 0;
  max-height: none;
  overflow: visible;
}

.tec-agenda__pager {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.tec-ag-pager__dots {
  display: flex;
  gap: 8px;
  align-items: center;
}

.tec-ag-pager__dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: 0;
  background: rgba(17, 24, 39, 0.22);
  cursor: pointer;
  padding: 0;
}

.tec-ag-pager__dot[aria-current="true"] {
  background: rgba(31, 94, 59, 0.9);
}

.tec-ag-pager__btn {
  height: 36px;
  min-width: 36px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--tec-border2);
  background: #fff;
  cursor: pointer;
  font-weight: 950;
  color: #111827;
}

.tec-ag-pager__btn:hover {
  background: #f9fafb;
}

.tec-agenda {
  margin-top: 18px;
  background: #fff;
  border: 1px solid var(--tec-border);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.07);
}

.tec-agenda__title {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 950;
}

.tec-empty {
  color: var(--tec-muted);
}

.tec-ag-item {
  border: 1px solid var(--tec-border);
  border-radius: 18px;
  padding: 28px;
  background: #fff;
  margin-bottom: 14px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.07);
}

.tec-ag-item h3 {
  margin: 0;
  font-weight: 950;
  font-size: 20px;
}

.tec-ag-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
  color: var(--tec-muted);
  font-size: 14px;
}

.tec-ag-meta b {
  color: rgba(17, 24, 39, 0.85);
}

.tec-ag-desc {
  margin-top: 14px;
  color: rgba(17, 24, 39, 0.78);
  line-height: 1.6;
}

.tec-ag-chiprow {
  margin-top: 14px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tec-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--tec-border2);
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 900;
  color: rgba(17, 24, 39, 0.8);
  background: #fff;
}

/* Responsive Toolbar / Search */
@media (max-width: 900px) {
  .tec-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .tec-toolbar__right {
    width: 100%;
  }

  .tec-search {
    width: 100%;
  }
}

/* Mobile month view tweaks */
@media (max-width: 700px) {
  .tec-dow {
    font-size: 12px;
  }
  .tec-dow > div {
    padding: 8px 8px;
  }
}

/* ===================================
   Tages-Panel (unter Monatsansicht)
=================================== */

.tec-dayagenda {
  margin-top: 12px;
  border: 1px solid var(--tec-border);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}

.tec-dayagenda__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  background: #f8fafc;
  border-bottom: 1px solid var(--tec-border);
}

.tec-dayagenda__date {
  font-weight: 950;
  color: #111827;
}

.tec-dayagenda__list,
.tec-dayagenda__cards {
  padding: 10px 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tec-dayagenda__item {
  display: grid;
  grid-template-columns: 10px 86px 1fr;
  gap: 10px;
  align-items: start;
  padding: 10px 10px;
  border-radius: 12px;
  border: 1px solid var(--tec-border2);
  background: #fff;
  text-decoration: none;
  color: #111827;
}

.tec-dayagenda__item:hover {
  background: #f9fafb;
  border-color: #cbd5e1;
}

.tec-dayagenda__dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(31, 94, 59, 0.9);
  margin-top: 6px;
}

.tec-dayagenda__time {
  font-variant-numeric: tabular-nums;
  font-weight: 900;
  color: rgba(17, 24, 39, 0.82);
  font-size: 13px;
}

.tec-dayagenda__title {
  font-weight: 850;
  line-height: 1.2;
  font-size: 13px;
}

.tec-dayagenda__meta {
  margin-top: 2px;
  color: var(--tec-muted);
  font-size: 12px;
  line-height: 1.2;
}

.tec-dayagenda__empty {
  padding: 14px 14px;
  border: 1px dashed var(--tec-border2);
  border-radius: 12px;
  background: #fff;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  color: var(--tec-muted);
  font-weight: 750;
  font-size: 14px;
  line-height: 1.25;
  text-align: center;
}

.tec-dayagenda__empty::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(31, 94, 59, 0.35);
  box-shadow: 0 0 0 4px rgba(31, 94, 59, 0.12);
  flex: 0 0 auto;
}

/* Karten im Tages-Panel kompakter als in der Haupt-Liste */
.tec-dayagenda .tec-ag-item {
  margin: 0;
  padding: 16px;
  border-radius: 14px;
  box-shadow: none;
}

.tec-dayagenda .tec-ag-item:hover {
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.08);
}

@media (max-width: 700px) {
  /* Month Grid kompakt wie Google Calendar */
  .tec-day {
    min-height: 66px;
    padding: 8px 8px 10px;
    padding-top: 30px;
  }

  .tec-daynum {
    top: 8px;
    left: 8px;
    font-size: 13px;
  }

  /* in Zellen nur Punkte anzeigen */
  .tec-events {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
  }

  .tec-evtline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 12px;
    height: 12px;
    padding: 0;
    background: transparent;
    text-decoration: none;
  }

  .tec-evttime,
  .tec-evttitle {
    display: none;
  }

  .tec-dot {
    width: 8px;
    height: 8px;
  }

  /* "+3" statt "+3 mehr" */
  .tec-more {
    margin: 0;
    font-size: 12px;
    padding: 2px 4px;
  }

  /* Multi-day Balken kompakter */
  .tec-weekbars {
    top: 24px;
    left: 6px;
    right: 6px;
    gap: 4px;
  }

  .tec-bar {
    font-size: 11px;
    padding: 2px 6px;
    height: 16px;
    display: flex;
    align-items: center;
  }

  /* Text nur auf dem Start-Segment zeigen */
  .tec-bar.is-continued-left {
    color: transparent;
  }

  /* Tagesliste kompakter */
  .tec-dayagenda__item {
    grid-template-columns: 10px 76px 1fr;
  }
}


/* UX-Pass 2: kurze Orientierung vor Kalenderbedienung */
.tec-helper {
  margin: 0 0 14px;
  padding: 14px 16px;
  border-left: 4px solid var(--tec-accent);
  background: #fffdf8;
  color: var(--tec-muted);
  line-height: 1.55;
}

.tec-helper p {
  margin: 0;
}

.tec-toolbar {
  border-radius: 0;
  box-shadow: none;
}

.tec-btn,
.tec-iconbtn,
.tec-monthbtn,
.tec-viewbtn {
  border-radius: 0;
}
