/* ============================================================
   Office365Page — Microsoft 365 Übersicht
   ============================================================ */

.pageHeader {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.pageTitle {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
}

.connectedBadge {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #22c55e;
}

.disconnectedBadge {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text-muted);
}

/* ---- Connect Prompt ---- */

.connectPrompt {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  color: var(--color-text-muted);
}

.connectButton {
  margin-top: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}

.connectButton:hover { opacity: 0.9; }

/* ---- Tabs ---- */

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

.tab {
  padding: 0.625rem 1.25rem;
  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: all 0.15s;
}

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

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

.tabContent {
  min-height: 200px;
}

/* ---- States ---- */

.loadingText, .emptyText {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  padding: 1.5rem 0;
}

.errorText {
  color: #ef4444;
  font-size: 0.9375rem;
  padding: 1.5rem 0;
}

/* ---- Shared list ---- */

.list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* ---- Email Cards ---- */

.emailCard {
  display: block;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.875rem 1rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.emailCard:hover {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.08);
}

.emailHeader {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.25rem;
}

.emailSubject {
  font-size: 0.9375rem;
  font-weight: 400;
  color: var(--color-text);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.unread {
  font-weight: 600;
}

.emailDate {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.emailMeta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.emailFrom {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.attachmentBadge {
  font-size: 0.75rem;
}

.emailPreview {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---- Calendar Cards ---- */

.calendarCard {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.875rem 1rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.calendarCard:hover {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.08);
}

.calendarDate {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 80px;
  text-align: center;
  flex-shrink: 0;
}

.calendarDay {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-primary);
}

.calendarTime {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

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

.calendarSubject {
  font-size: 0.9375rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.calendarLocation, .calendarAttendees {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.onlineBadge {
  font-size: 0.75rem;
  font-weight: 500;
  color: #22c55e;
  background: rgba(34, 197, 94, 0.1);
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  flex-shrink: 0;
}

/* ---- Contacts Grid ---- */

.searchInput {
  width: 100%;
  max-width: 320px;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  background: var(--color-bg);
  color: var(--color-text);
  margin-bottom: 1rem;
}

.contactGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.75rem;
}

.contactCard {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.875rem;
  position: relative;
}

.contactAvatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  flex-shrink: 0;
}

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

.contactName {
  font-size: 0.9375rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.contactEmail {
  font-size: 0.8125rem;
  color: var(--color-primary);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.importButton {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.5rem;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
  align-self: flex-start;
}

.importButton:hover {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

/* ---- Task Cards ---- */

.taskCard {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
}

.taskImportance {
  font-size: 1rem;
  font-weight: 700;
  min-width: 1rem;
  text-align: center;
}

.taskContent {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  flex: 1;
}

.taskTitle {
  font-size: 0.9375rem;
  font-weight: 500;
}

.taskMeta {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.taskStatus {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  background: var(--color-bg);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  flex-shrink: 0;
  white-space: nowrap;
}

.status_inProgress {
  background: rgba(59, 130, 246, 0.1);
  color: var(--color-primary);
  border-color: var(--color-primary);
}
