
/* Stats row */
.cal-stats-row {
  display: flex;
  gap: 1rem;
  margin-top: 0.75rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.cal-stat {
  flex: 1;
  min-width: 100px;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  backdrop-filter: blur(4px);
}
.cal-stat-val { font-size: 1.6rem; font-weight: 700; line-height: 1; }
.cal-stat-label { font-size: 0.7rem; color: #94a3b8; font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; }
.cal-stat:hover { background: rgba(255,255,255,0.06); transform: translateY(-2px); }

/* Table */
.cal-table-wrap {
  flex: 1;
  overflow: auto;
  border-radius: 0.5rem;
  border: 1px solid rgba(255,255,255,0.05);
  background: #162032;
  margin-bottom: 1.25rem;
  height: calc(100vh - 240px);
}
.cal-table {
  min-width: 100%;
  width: max-content;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.9rem;
}
.cal-table th {
  padding: 0.75rem 1rem;
  text-align: left;
  color: #94a3b8;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: rgba(30, 41, 59, 1);
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  user-select: none;
  white-space: nowrap;
}
.cal-table th:hover { color: #e2e8f0; }
.cal-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  color: var(--text-color, #e2e8f0);
  vertical-align: middle;
}
.cal-table tbody tr { transition: background 0.15s; }
.cal-table tbody tr:hover td { background: rgba(255,255,255,0.02); }
.cal-cell-nr { font-weight: 600; color: #c4b5fd; white-space: nowrap; }
.cal-cell-bemerkung { max-width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #94a3b8; font-size: 0.85rem; }

/* Status badges */
.cal-badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 0.3rem;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
}
.cal-badge-green { background: rgba(34,197,94,0.15); color: #4ade80; border: 1px solid rgba(34,197,94,0.25); }
.cal-badge-yellow { background: rgba(251,191,36,0.15); color: #fbbf24; border: 1px solid rgba(251,191,36,0.25); }
.cal-badge-red { background: rgba(248,113,113,0.15); color: #f87171; border: 1px solid rgba(248,113,113,0.25); }
.cal-badge-grey { background: rgba(100,116,139,0.15); color: #94a3b8; border: 1px solid rgba(100,116,139,0.25); }

/* Buttons */
.cal-btn {
  padding: 0.55rem 1.1rem;
  border-radius: 0.5rem;
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}
.cal-btn-primary {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
}
.cal-btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }
.cal-btn-secondary {
  background: rgba(255,255,255,0.06);
  color: #94a3b8;
  border: 1px solid rgba(255,255,255,0.12);
}
.cal-btn-secondary:hover { background: rgba(255,255,255,0.1); color: #e2e8f0; }

/* Action buttons (edit/delete in rows) */
.cal-action-btn {
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0.2rem 0.45rem;
  border-radius: 0.3rem;
  transition: all 0.15s;
  line-height: 1;
}
.cal-edit-btn { color: #818cf8; }
.cal-edit-btn:hover { background: rgba(99,102,241,0.15); border-color: rgba(99,102,241,0.3); }
.cal-del-btn { color: #f87171; }
.cal-del-btn:hover { background: rgba(248,113,113,0.15); border-color: rgba(248,113,113,0.3); }
.cal-restore-btn { color: #22c55e; font-size: 1rem; }
.cal-restore-btn:hover { background: rgba(34,197,94,0.15); border-color: rgba(34,197,94,0.3); }

/* Deleted rows */
.cal-row-deleted td { opacity: 0.5; }
.cal-row-deleted .cal-cell-nr { text-decoration: line-through; }

/* Filter active button */
.cal-btn-filter-active {
  background: rgba(248,113,113,0.12);
  color: #f87171;
  border: 1px solid rgba(248,113,113,0.25);
}
.cal-btn-filter-active:hover { background: rgba(248,113,113,0.2); }



/* Form elements */
.cal-label {
  display: block;
  color: #94a3b8;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.cal-input {
  width: 100%;
  padding: 0.55rem 0.75rem !important;
  background: rgba(255,255,255,0.05) !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  border-radius: 0.5rem !important;
  color: #f8fafc !important;
  font-family: 'Outfit', sans-serif !important;
  font-size: 0.9rem !important;
  transition: border-color 0.2s;
}
.cal-input:focus {
  outline: none !important;
  border-color: #6366f1 !important;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.1) !important;
}
textarea.cal-input { resize: vertical; min-height: 60px; }

/* Zuständig user pills in table */
.cal-user-pills { display: flex; gap: 4px; flex-wrap: wrap; }
.cal-user-pill {
  display: inline-flex; align-items: center;
  padding: 0.15rem 0.5rem; border-radius: 0.35rem;
  background: rgba(99,102,241,0.12); color: #a5b4fc;
  font-size: 0.75rem; font-weight: 500; white-space: nowrap;
  border: 1px solid rgba(99,102,241,0.2);
}

/* Zuständig multi-select picker in modal */
.cal-zustaendig-picker { position: relative; }
.cal-zustaendig-selected {
  display: flex; flex-wrap: wrap; gap: 0.35rem;
  min-height: 2rem; align-items: center;
}
.cal-zustaendig-tag {
  display: inline-flex; align-items: center; gap: 0.3rem;
  background: rgba(99,102,241,0.15); color: #c4b5fd;
  padding: 0.2rem 0.5rem; border-radius: 0.35rem;
  font-size: 0.8rem; font-weight: 500;
  border: 1px solid rgba(99,102,241,0.25);
}
.cal-zustaendig-tag-remove {
  cursor: pointer; font-size: 0.9rem; line-height: 1;
  color: #94a3b8; transition: color 0.15s;
}
.cal-zustaendig-tag-remove:hover { color: #f87171; }

.cal-zustaendig-list {
  list-style: none; padding: 0; margin: 0.35rem 0 0 0;
  max-height: 160px; overflow-y: auto;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 0.5rem;
  background: rgba(15,23,42,0.6);
}
.cal-zustaendig-option {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.45rem 0.75rem; cursor: pointer;
  font-size: 0.85rem; color: #cbd5e1;
  transition: background 0.15s;
}
.cal-zustaendig-option:hover { background: rgba(99,102,241,0.1); }
.cal-zustaendig-option.selected { background: rgba(99,102,241,0.08); color: #a5b4fc; }
.cal-zustaendig-check {
  width: 1rem; text-align: center;
  color: #6366f1; font-weight: 700; font-size: 0.75rem;
}

