/* ============================================================
   DashboardPage - Header Layout
   ============================================================ */

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.title {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
  color: var(--color-text);
}

/* ── Tabs ── */

.tabBar {
  display: flex;
  align-items: stretch;
  gap: 0;
  border-bottom: 2px solid var(--color-border);
  margin-bottom: 1.75rem;
}

.tab {
  padding: 0.625rem 1.375rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.tab:hover {
  color: var(--color-text);
}

.activeTab {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
  font-weight: 600;
}

.tabContent {
  min-height: 200px;
}

/* ── Profil-Bereich in der Tab-Leiste (rechts) ── */

.tabBarProfile {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0 0.75rem;
  border-left: 1px solid var(--color-border);
  background: var(--color-bg-card);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  /* leicht farblich abgesetzt */
  box-shadow: inset 0 -2px 0 var(--color-border);
}

.tabBarThemeGroup {
  display: flex;
  gap: 1px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 2px;
}

.tabBarThemeBtn {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  border-radius: 3px;
  color: var(--color-text-muted);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.15s;
}

.tabBarThemeBtn:hover {
  color: var(--color-text);
  background: var(--color-bg-card);
}

.tabBarThemeBtnActive {
  background: var(--color-primary) !important;
  color: white !important;
}

.tabBarUser {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.1875rem 0.4375rem 0.1875rem 0.1875rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}

.tabBarUser:hover {
  background: var(--color-bg);
  border-color: var(--color-border);
}

.tabBarUserName {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text);
  white-space: nowrap;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tabBarLogout {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}

.tabBarLogout:hover {
  background: var(--color-bg);
  color: var(--color-text);
}

/* ── Home-Layout (Inhalt links + Agenda rechts) ── */

.homeLayout {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.homeMain {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.homeSidebar {
  width: 300px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* ── Kompakter Messe-Ticker ── */

.compactMesse {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 0.625rem 0.75rem;
  box-shadow: var(--shadow-sm);
}

.compactMesseTitle {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin: 0 0 0.5rem 0;
}

.compactMesseList {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.messeRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  background: none;
  border: none;
  border-left: 3px solid transparent;
  padding: 0.3125rem 0.5rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s;
}

.messeRow:hover {
  background: var(--color-bg-subtle);
}

.messeRowName {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.messeRowCountdown {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Messe-Detail-Modal ── */

.messeModalBackdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  padding: 1rem;
}

.messeModal {
  background: var(--color-bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border-top: 4px solid #3b82f6;
  width: 100%;
  max-width: 440px;
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.messeModalHeader {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.messeModalTitle {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 0.25rem 0;
  line-height: 1.3;
}

.messeStatusChip {
  display: inline-flex;
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.messeChip_upcoming {
  background: #dbeafe;
  color: #1e40af;
}

.messeChip_ongoing {
  background: #dcfce7;
  color: #166534;
}

.messeChip_ended {
  background: var(--color-bg-subtle);
  color: var(--color-text-muted);
}

.messeModalClose {
  background: none;
  border: none;
  font-size: 1.375rem;
  line-height: 1;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.messeModalClose:hover {
  color: var(--color-text);
}

.messeModalCountdown {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
}

.messeProgressBar {
  width: 100%;
  height: 6px;
  background: var(--color-bg-subtle);
  border-radius: 3px;
  overflow: hidden;
}

.messeProgressFill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}

.messeModalMeta {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.messeModalMetaRow {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}

.messeModalMetaRow svg {
  flex-shrink: 0;
  color: var(--color-text-muted);
}

.messeModalDesc {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  margin: 0;
  line-height: 1.55;
  padding-top: 0.25rem;
  border-top: 1px solid var(--color-border);
}

.messeModalLink {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-primary);
  text-decoration: none;
}

.messeModalLink:hover {
  text-decoration: underline;
}

/* dark mode Messe-Modal */
:global([data-theme='dark']) .messeChip_upcoming {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
}

:global([data-theme='dark']) .messeChip_ongoing {
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
}

/* ── Spruch des Tages ── */

.quoteOfDay {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  max-width: 420px;
  flex-shrink: 1;
  opacity: 0.78;
}

.quoteText {
  font-size: 0.8125rem;
  font-style: italic;
  color: var(--color-text-secondary);
  text-align: right;
  line-height: 1.45;
}

.quoteAuthor {
  font-size: 0.6875rem;
  color: var(--color-text-muted);
  text-align: right;
  margin-top: 0.125rem;
}

/* ── Linke Spalte: Uhr + Wetter + Prognose ── */

.homeLeft {
  width: 240px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.875rem;
}

.homeWeatherBox {
  width: 100%;
}

/* WeatherWidget auf volle Spaltenbreite ziehen */
.homeWeatherBox > div {
  width: 100%;
  box-sizing: border-box;
}

.forecastStrip {
  width: 100%;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 0.625rem 0.75rem;
  box-shadow: var(--shadow-sm);
}

.forecastTitle {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin: 0 0 0.5rem 0;
}

.forecastDays {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.forecastDay {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.forecastDayLabel {
  font-size: 0.75rem;
  color: var(--color-text-secondary);
  flex: 1;
  min-width: 0;
}

.forecastDayIcon {
  font-size: 1rem;
  line-height: 1;
}

.forecastDayTemp {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
}

.forecastDayTempMin {
  font-weight: 400;
  color: var(--color-text-muted);
}

/* ── Home-Widget-Karten (mittlere Spalte) ── */

.homeWidgetCard {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.homeWidgetHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5625rem 0.875rem;
  border-bottom: 1px solid var(--color-border);
}

.homeWidgetTitle {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin: 0;
}

.homeWidgetAll {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-primary);
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.homeWidgetAll:hover {
  text-decoration: underline;
}

.homeWidgetFooter {
  padding: 0.4375rem 0.875rem;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  border-top: 1px solid var(--color-border);
  text-align: center;
}

/* Kompakte Aufgaben-Zeilen */

.homeTaskList {
  display: flex;
  flex-direction: column;
}

.homeTaskRow {
  display: flex;
  align-items: center;
  gap: 0.4375rem;
  padding: 0.4375rem 0.875rem;
  border-bottom: 1px solid var(--color-border);
  transition: background 0.1s;
}

.homeTaskRow:last-child {
  border-bottom: none;
}

.homeTaskRow:hover {
  background: var(--color-bg-subtle);
}

.homeTaskBadge {
  font-size: 0.5rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 0.1rem 0.25rem;
  border-radius: 3px;
  flex-shrink: 0;
  letter-spacing: 0.03em;
}

.homeTaskBadgeO365 {
  background: #dbeafe;
  color: #1e40af;
}

.homeTaskBadgeCrm {
  background: #f0fdf4;
  color: #166534;
}

:global([data-theme='dark']) .homeTaskBadgeO365 {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
}

:global([data-theme='dark']) .homeTaskBadgeCrm {
  background: rgba(34, 197, 94, 0.12);
  color: #86efac;
}

.homeTaskMain {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 0.375rem;
  overflow: hidden;
}

.homeTaskTitle {
  font-size: 0.8125rem;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.homeTaskDue {
  font-size: 0.6875rem;
  color: var(--color-text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.homeTaskDueOverdue {
  color: #ef4444;
  font-weight: 600;
}

.homeTaskComplete {
  background: none;
  border: 1.5px solid var(--color-border);
  color: var(--color-text-muted);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.625rem;
  flex-shrink: 0;
  padding: 0;
  transition: border-color 0.15s, color 0.15s;
}

.homeTaskComplete:hover:not(:disabled) {
  border-color: #22c55e;
  color: #22c55e;
}

.homeTaskComplete:disabled {
  opacity: 0.45;
  cursor: default;
}

/* Kompakte E-Mail-Zeilen */

.homeEmailList {
  display: flex;
  flex-direction: column;
}

.homeEmailRow {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.4375rem 0.875rem;
  border-bottom: 1px solid var(--color-border);
  text-decoration: none;
  color: inherit;
  transition: background 0.1s;
}

.homeEmailRow:last-child {
  border-bottom: none;
}

.homeEmailRow:hover {
  background: var(--color-bg-subtle);
}

.homeEmailUnread {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-primary);
  flex-shrink: 0;
  margin-top: 0.3rem;
}

.homeEmailReadDot {
  width: 7px;
  height: 7px;
  flex-shrink: 0;
}

.homeEmailContent {
  flex: 1;
  min-width: 0;
}

.homeEmailSender {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.homeEmailSubject {
  font-size: 0.75rem;
  color: var(--color-text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.homeEmailTime {
  font-size: 0.6875rem;
  color: var(--color-text-muted);
  white-space: nowrap;
  flex-shrink: 0;
  padding-top: 0.125rem;
}

.homeEmptyHint {
  padding: 0.875rem;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  text-align: center;
}

/* ── Platzhalter für bestehenden Home-Inhalt ── */

.placeholder {
  background: var(--color-bg-card);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
}

/* ── Coming Soon ── */

.comingSoon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
  gap: 0.5rem;
}

.comingSoonIcon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.comingSoonTitle {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 0;
}

.comingSoonSub {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  margin: 0;
}
